Skip to content

Commit

Permalink
Use workspace:^ to specify @babel/ dependencies (#13772)
Browse files Browse the repository at this point in the history
* Enforce `workspace:^` to specify `@babel/` dependencies

* `yarn constraints --fix`

* Update lockfile
  • Loading branch information
nicolo-ribaudo committed Oct 25, 2021
1 parent 62b2c5e commit c7ddb1a
Show file tree
Hide file tree
Showing 151 changed files with 1,502 additions and 1,500 deletions.
16 changes: 8 additions & 8 deletions benchmark/package.json
Expand Up @@ -9,14 +9,14 @@
"@babel-baseline/parser": "npm:@babel/parser@7.14.8",
"@babel-baseline/traverse": "npm:@babel/traverse@7.15.4",
"@babel-baseline/types": "npm:@babel/types@7.15.6",
"@babel/core": "workspace:*",
"@babel/generator": "workspace:*",
"@babel/helper-validator-identifier": "workspace:*",
"@babel/parser": "workspace:*",
"@babel/preset-env": "workspace:*",
"@babel/preset-flow": "workspace:*",
"@babel/traverse": "workspace:*",
"@babel/types": "workspace:*",
"@babel/core": "workspace:^",
"@babel/generator": "workspace:^",
"@babel/helper-validator-identifier": "workspace:^",
"@babel/parser": "workspace:^",
"@babel/preset-env": "workspace:^",
"@babel/preset-flow": "workspace:^",
"@babel/traverse": "workspace:^",
"@babel/types": "workspace:^",
"benchmark": "^2.1.4"
},
"version": "7.15.0"
Expand Down
Expand Up @@ -23,8 +23,8 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*"
"@babel/core": "workspace:^",
"@babel/helper-plugin-test-runner": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
Expand Up @@ -23,8 +23,8 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*"
"@babel/core": "workspace:^",
"@babel/helper-plugin-test-runner": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
10 changes: 6 additions & 4 deletions constraints.pro
@@ -1,8 +1,10 @@
% Enforces that all workspaces depend on other workspaces using `workspace:*` in devDependencies
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:*', 'devDependencies') :-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, 'devDependencies'),
% Enforces that all workspaces depend on other workspaces using `workspace:^`
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:^', DependencyType) :-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType),
% Only consider dependency ranges that start with 'workspace:'
atom_concat('workspace:', _, DependencyRange).
atom_concat('workspace:', _, DependencyRange),
% Only consider 'dependencies' and 'devDependencies'
(DependencyType = 'dependencies'; DependencyType = 'devDependencies').

% Enforces the license in all public workspaces while removing it from private workspaces
gen_enforced_field(WorkspaceCwd, 'license', 'MIT') :-
Expand Down
2 changes: 1 addition & 1 deletion eslint/babel-eslint-parser/package.json
Expand Up @@ -36,7 +36,7 @@
"semver": "condition:BABEL_8_BREAKING ? ^7.3.4 : ^6.3.0"
},
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/core": "workspace:^",
"dedent": "^0.7.0",
"eslint": "^7.27.0"
}
Expand Down
22 changes: 11 additions & 11 deletions eslint/babel-eslint-shared-fixtures/package.json
Expand Up @@ -4,17 +4,17 @@
"description": "Shared fixtures for testing @babel/eslint-* packages",
"private": true,
"dependencies": {
"@babel/core": "workspace:^7.14.5",
"@babel/eslint-parser": "workspace:^7.14.5",
"@babel/plugin-proposal-class-properties": "workspace:^7.14.5",
"@babel/plugin-proposal-decorators": "workspace:^7.14.5",
"@babel/plugin-proposal-do-expressions": "workspace:^7.14.5",
"@babel/plugin-proposal-pipeline-operator": "workspace:^7.14.5",
"@babel/plugin-proposal-private-methods": "workspace:^7.14.5",
"@babel/plugin-syntax-export-default-from": "workspace:^7.14.5",
"@babel/preset-env": "workspace:^7.14.5",
"@babel/preset-flow": "workspace:^7.14.5",
"@babel/preset-react": "workspace:^7.14.5",
"@babel/core": "workspace:^",
"@babel/eslint-parser": "workspace:^",
"@babel/plugin-proposal-class-properties": "workspace:^",
"@babel/plugin-proposal-decorators": "workspace:^",
"@babel/plugin-proposal-do-expressions": "workspace:^",
"@babel/plugin-proposal-pipeline-operator": "workspace:^",
"@babel/plugin-proposal-private-methods": "workspace:^",
"@babel/plugin-syntax-export-default-from": "workspace:^",
"@babel/preset-env": "workspace:^",
"@babel/preset-flow": "workspace:^",
"@babel/preset-react": "workspace:^",
"eslint": "^7.27.0"
}
}
6 changes: 3 additions & 3 deletions eslint/babel-eslint-tests/package.json
Expand Up @@ -4,9 +4,9 @@
"description": "Tests for babel/eslint-* packages",
"private": true,
"dependencies": {
"@babel/core": "workspace:^7.14.5",
"@babel/eslint-parser": "workspace:^7.14.5",
"@babel/preset-react": "workspace:^7.14.5",
"@babel/core": "workspace:^",
"@babel/eslint-parser": "workspace:^",
"@babel/preset-react": "workspace:^",
"dedent": "^0.7.0",
"eslint": "^7.27.0",
"eslint-plugin-import": "^2.23.4",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -20,10 +20,10 @@
"devDependencies": {
"@babel/cli": "^7.14.8",
"@babel/core": "^7.15.0",
"@babel/eslint-config-internal": "workspace:*",
"@babel/eslint-parser": "workspace:*",
"@babel/eslint-plugin-development": "workspace:*",
"@babel/eslint-plugin-development-internal": "workspace:*",
"@babel/eslint-config-internal": "workspace:^",
"@babel/eslint-parser": "workspace:^",
"@babel/eslint-plugin-development": "workspace:^",
"@babel/eslint-plugin-development-internal": "workspace:^",
"@babel/plugin-proposal-dynamic-import": "^7.14.5",
"@babel/plugin-proposal-export-namespace-from": "^7.14.5",
"@babel/plugin-proposal-object-rest-spread": "^7.14.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-cli/package.json
Expand Up @@ -40,8 +40,8 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-fixtures": "workspace:*",
"@babel/core": "workspace:^",
"@babel/helper-fixtures": "workspace:^",
"rimraf": "^3.0.0"
},
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-code-frame/package.json
Expand Up @@ -16,7 +16,7 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/highlight": "workspace:^7.14.5"
"@babel/highlight": "workspace:^"
},
"devDependencies": {
"@types/chalk": "^2.0.0",
Expand Down
20 changes: 10 additions & 10 deletions packages/babel-core/package.json
Expand Up @@ -48,15 +48,15 @@
"./src/transformation/util/clone-deep.ts": "./src/transformation/util/clone-deep-browser.ts"
},
"dependencies": {
"@babel/code-frame": "workspace:^7.15.8",
"@babel/generator": "workspace:^7.15.8",
"@babel/helper-compilation-targets": "workspace:^7.15.4",
"@babel/code-frame": "workspace:^",
"@babel/generator": "workspace:^",
"@babel/helper-compilation-targets": "workspace:^",
"@babel/helper-module-transforms": "condition:BABEL_8_BREAKING ? : workspace:^7.15.8",
"@babel/helpers": "workspace:^7.15.4",
"@babel/parser": "workspace:^7.15.8",
"@babel/template": "workspace:^7.15.4",
"@babel/traverse": "workspace:^7.15.4",
"@babel/types": "workspace:^7.15.6",
"@babel/helpers": "workspace:^",
"@babel/parser": "workspace:^",
"@babel/template": "workspace:^",
"@babel/traverse": "workspace:^",
"@babel/types": "workspace:^",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
Expand All @@ -65,8 +65,8 @@
"source-map": "^0.5.0"
},
"devDependencies": {
"@babel/helper-transform-fixture-test-runner": "workspace:*",
"@babel/plugin-transform-modules-commonjs": "workspace:*",
"@babel/helper-transform-fixture-test-runner": "workspace:^",
"@babel/plugin-transform-modules-commonjs": "workspace:^",
"@types/convert-source-map": "^1.5.1",
"@types/debug": "^4.1.0",
"@types/resolve": "^1.3.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-generator/package.json
Expand Up @@ -19,13 +19,13 @@
"lib"
],
"dependencies": {
"@babel/types": "workspace:^7.15.6",
"@babel/types": "workspace:^",
"jsesc": "condition: BABEL_8_BREAKING ? ^3.0.2 : ^2.5.1",
"source-map": "^0.5.0"
},
"devDependencies": {
"@babel/helper-fixtures": "workspace:*",
"@babel/parser": "workspace:*",
"@babel/helper-fixtures": "workspace:^",
"@babel/parser": "workspace:^",
"@types/jsesc": "^2.5.0",
"@types/source-map": "^0.5.0",
"charcodes": "^0.2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-helper-annotate-as-pure/package.json
Expand Up @@ -14,7 +14,7 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/types": "workspace:^7.15.4"
"@babel/types": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
Expand Up @@ -14,8 +14,8 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/helper-explode-assignable-expression": "workspace:^7.15.4",
"@babel/types": "workspace:^7.15.4"
"@babel/helper-explode-assignable-expression": "workspace:^",
"@babel/types": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-helper-builder-react-jsx/package.json
Expand Up @@ -14,8 +14,8 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/helper-annotate-as-pure": "workspace:^7.15.4",
"@babel/types": "workspace:^7.15.4"
"@babel/helper-annotate-as-pure": "workspace:^",
"@babel/types": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/babel-helper-compilation-targets/package.json
Expand Up @@ -21,17 +21,17 @@
"babel-plugin"
],
"dependencies": {
"@babel/compat-data": "workspace:^7.15.0",
"@babel/helper-validator-option": "workspace:^7.14.5",
"@babel/compat-data": "workspace:^",
"@babel/helper-validator-option": "workspace:^",
"browserslist": "^4.16.6",
"semver": "condition:BABEL_8_BREAKING ? ^7.3.4 : ^6.3.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
},
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*",
"@babel/core": "workspace:^",
"@babel/helper-plugin-test-runner": "workspace:^",
"@types/semver": "^5.5.0"
},
"engines": {
Expand Down
18 changes: 9 additions & 9 deletions packages/babel-helper-create-class-features-plugin/package.json
Expand Up @@ -18,21 +18,21 @@
"babel-plugin"
],
"dependencies": {
"@babel/helper-annotate-as-pure": "workspace:^7.15.4",
"@babel/helper-function-name": "workspace:^7.15.4",
"@babel/helper-member-expression-to-functions": "workspace:^7.15.4",
"@babel/helper-optimise-call-expression": "workspace:^7.15.4",
"@babel/helper-replace-supers": "workspace:^7.15.4",
"@babel/helper-split-export-declaration": "workspace:^7.15.4"
"@babel/helper-annotate-as-pure": "workspace:^",
"@babel/helper-function-name": "workspace:^",
"@babel/helper-member-expression-to-functions": "workspace:^",
"@babel/helper-optimise-call-expression": "workspace:^",
"@babel/helper-replace-supers": "workspace:^",
"@babel/helper-split-export-declaration": "workspace:^"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
},
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*",
"@babel/core": "workspace:^",
"@babel/helper-plugin-test-runner": "workspace:^",
"@babel/plugin-syntax-class-static-block": "^7.14.5",
"@babel/preset-env": "workspace:*"
"@babel/preset-env": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
Expand Up @@ -18,15 +18,15 @@
"babel-plugin"
],
"dependencies": {
"@babel/helper-annotate-as-pure": "workspace:^7.14.5",
"@babel/helper-annotate-as-pure": "workspace:^",
"regexpu-core": "^4.7.1"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
},
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*"
"@babel/core": "workspace:^",
"@babel/helper-plugin-test-runner": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-helper-define-map/package.json
Expand Up @@ -14,8 +14,8 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/helper-function-name": "workspace:^7.15.4",
"@babel/types": "workspace:^7.15.4"
"@babel/helper-function-name": "workspace:^",
"@babel/types": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
Expand Up @@ -14,10 +14,10 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/types": "workspace:^7.15.4"
"@babel/types": "workspace:^"
},
"devDependencies": {
"@babel/traverse": "workspace:*"
"@babel/traverse": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-helper-function-name/package.json
Expand Up @@ -14,9 +14,9 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/helper-get-function-arity": "workspace:^7.15.4",
"@babel/template": "workspace:^7.15.4",
"@babel/types": "workspace:^7.15.4"
"@babel/helper-get-function-arity": "workspace:^",
"@babel/template": "workspace:^",
"@babel/types": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-helper-get-function-arity/package.json
Expand Up @@ -14,7 +14,7 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/types": "workspace:^7.15.4"
"@babel/types": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-helper-hoist-variables/package.json
Expand Up @@ -14,11 +14,11 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/types": "workspace:^7.15.4"
"@babel/types": "workspace:^"
},
"TODO": "The @babel/traverse dependency is only needed for the NodePath TS type. We can consider exporting it from @babel/core.",
"devDependencies": {
"@babel/traverse": "workspace:*"
"@babel/traverse": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
Expand Up @@ -15,10 +15,10 @@
"main": "./lib/index.js",
"author": "The Babel Team (https://babel.dev/team)",
"dependencies": {
"@babel/types": "workspace:^7.15.4"
"@babel/types": "workspace:^"
},
"devDependencies": {
"@babel/traverse": "workspace:*"
"@babel/traverse": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-helper-module-imports/package.json
Expand Up @@ -15,11 +15,11 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/types": "workspace:^7.15.4"
"@babel/types": "workspace:^"
},
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/traverse": "workspace:*"
"@babel/core": "workspace:^",
"@babel/traverse": "workspace:^"
},
"engines": {
"node": ">=6.9.0"
Expand Down

0 comments on commit c7ddb1a

Please sign in to comment.