Skip to content

Commit

Permalink
chore: enforce engines.node
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz committed May 24, 2021
1 parent c43198c commit 6b1ea57
Show file tree
Hide file tree
Showing 147 changed files with 484 additions and 24 deletions.
Expand Up @@ -25,5 +25,8 @@
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
Expand Up @@ -25,5 +25,8 @@
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
26 changes: 26 additions & 0 deletions constraints.pro
Expand Up @@ -25,3 +25,29 @@ gen_enforced_field(WorkspaceCwd, 'publishConfig.access', 'public') :-
\+ workspace_field(WorkspaceCwd, 'private', true).
gen_enforced_field(WorkspaceCwd, 'publishConfig.access', null) :-
workspace_field(WorkspaceCwd, 'private', true).

% Enforces the engines.node field for all workspaces except '@babel/eslint*'
gen_enforced_field(WorkspaceCwd, 'engines.node', '>=6.9.0') :-
\+ workspace_field(WorkspaceCwd, 'private', true),
% Get the workspace name
workspace_ident(WorkspaceCwd, WorkspaceIdent),
% Exempt from the rule as it supports '>=4'. TODO: remove with the next major
WorkspaceIdent \= '@babel/plugin-proposal-unicode-property-regex',
% Exempt from the rule as it supports '>=6.0.0'. TODO: remove with the next major
WorkspaceIdent \= '@babel/parser',
% Skip '@babel/eslint*' workspaces. TODO: remove with the next major
\+ atom_concat('@babel/eslint', _, WorkspaceIdent).

% Enforces the engines.node field for '@babel/eslint*' workspaces
% TODO: remove with the next major
gen_enforced_field(WorkspaceCwd, 'engines.node', '^10.13.0 || ^12.13.0 || >=14.0.0') :-
\+ workspace_field(WorkspaceCwd, 'private', true),
% Get the workspace name
workspace_ident(WorkspaceCwd, WorkspaceIdent),
% Only target '@babel/eslint*' workspaces
atom_concat('@babel/eslint', _, WorkspaceIdent).

% Removes the 'engines.node' field from private workspaces
gen_enforced_field(WorkspaceCwd, 'engines.node', null) :-
workspace_field(WorkspaceCwd, 'private', true).

1 change: 0 additions & 1 deletion package.json
Expand Up @@ -88,7 +88,6 @@
"babel-plugin-polyfill-corejs2/@babel/compat-data": "workspace:*"
},
"engines": {
"node": ">= 6.9.0",
"yarn": ">=1.4.0"
},
"lint-staged": {
Expand Down
3 changes: 3 additions & 0 deletions packages/babel-cli/package.json
Expand Up @@ -47,5 +47,8 @@
"bin": {
"babel": "./bin/babel.js",
"babel-external-helpers": "./bin/babel-external-helpers.js"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-code-frame/package.json
Expand Up @@ -22,5 +22,8 @@
"@types/chalk": "^2.0.0",
"chalk": "^2.0.0",
"strip-ansi": "^4.0.0"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-compat-data/package.json
Expand Up @@ -32,5 +32,8 @@
"@mdn/browser-compat-data": "^3.1.1",
"core-js-compat": "^3.9.0",
"electron-to-chromium": "1.3.672"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-generator/package.json
Expand Up @@ -28,5 +28,8 @@
"@babel/parser": "workspace:*",
"@types/jsesc": "^2.5.0",
"@types/source-map": "^0.5.0"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-annotate-as-pure/package.json
Expand Up @@ -15,5 +15,8 @@
"main": "lib/index.js",
"dependencies": {
"@babel/types": "workspace:^7.12.13"
},
"engines": {
"node": ">=6.9.0"
}
}
Expand Up @@ -16,5 +16,8 @@
"dependencies": {
"@babel/helper-explode-assignable-expression": "workspace:^7.12.13",
"@babel/types": "workspace:^7.12.13"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-builder-react-jsx/package.json
Expand Up @@ -16,5 +16,8 @@
"dependencies": {
"@babel/helper-annotate-as-pure": "workspace:^7.12.13",
"@babel/types": "workspace:^7.12.13"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-compilation-targets/package.json
Expand Up @@ -33,5 +33,8 @@
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*",
"@types/semver": "^5.5.0"
},
"engines": {
"node": ">=6.9.0"
}
}
Expand Up @@ -32,5 +32,8 @@
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*",
"@babel/preset-env": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
Expand Up @@ -27,5 +27,8 @@
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-define-map/package.json
Expand Up @@ -16,5 +16,8 @@
"dependencies": {
"@babel/helper-function-name": "workspace:^7.12.13",
"@babel/types": "workspace:^7.13.12"
},
"engines": {
"node": ">=6.9.0"
}
}
Expand Up @@ -18,5 +18,8 @@
},
"devDependencies": {
"@babel/traverse": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-fixtures/package.json
Expand Up @@ -19,5 +19,8 @@
},
"devDependencies": {
"@types/semver": "^7.3.4"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-function-name/package.json
Expand Up @@ -17,5 +17,8 @@
"@babel/helper-get-function-arity": "workspace:^7.12.13",
"@babel/template": "workspace:^7.12.13",
"@babel/types": "workspace:^7.14.2"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-get-function-arity/package.json
Expand Up @@ -15,5 +15,8 @@
"main": "lib/index.js",
"dependencies": {
"@babel/types": "workspace:^7.12.13"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-hoist-variables/package.json
Expand Up @@ -17,5 +17,8 @@
"dependencies": {
"@babel/traverse": "workspace:^7.13.15",
"@babel/types": "workspace:^7.13.16"
},
"engines": {
"node": ">=6.9.0"
}
}
Expand Up @@ -19,5 +19,8 @@
},
"devDependencies": {
"@babel/traverse": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-module-imports/package.json
Expand Up @@ -20,5 +20,8 @@
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/traverse": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-module-transforms/package.json
Expand Up @@ -23,5 +23,8 @@
"@babel/template": "workspace:^7.12.13",
"@babel/traverse": "workspace:^7.14.2",
"@babel/types": "workspace:^7.14.2"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-optimise-call-expression/package.json
Expand Up @@ -19,5 +19,8 @@
"devDependencies": {
"@babel/generator": "workspace:*",
"@babel/parser": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-plugin-test-runner/package.json
Expand Up @@ -15,5 +15,8 @@
"main": "lib/index.js",
"dependencies": {
"@babel/helper-transform-fixture-test-runner": "workspace:^7.13.10"
},
"engines": {
"node": ">=6.9.0"
}
}
5 changes: 4 additions & 1 deletion packages/babel-helper-plugin-utils/package.json
Expand Up @@ -13,5 +13,8 @@
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-helper-plugin-utils"
},
"main": "lib/index.js"
"main": "lib/index.js",
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-remap-async-to-generator/package.json
Expand Up @@ -20,5 +20,8 @@
},
"devDependencies": {
"@babel/traverse": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-replace-supers/package.json
Expand Up @@ -18,5 +18,8 @@
"@babel/helper-optimise-call-expression": "workspace:^7.12.13",
"@babel/traverse": "workspace:^7.14.2",
"@babel/types": "workspace:^7.14.2"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-simple-access/package.json
Expand Up @@ -19,5 +19,8 @@
},
"devDependencies": {
"@babel/traverse": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
Expand Up @@ -21,5 +21,8 @@
},
"devDependencies": {
"@babel/traverse": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-split-export-declaration/package.json
Expand Up @@ -15,5 +15,8 @@
"main": "lib/index.js",
"dependencies": {
"@babel/types": "workspace:^7.12.13"
},
"engines": {
"node": ">=6.9.0"
}
}
Expand Up @@ -25,5 +25,8 @@
},
"devDependencies": {
"@types/jest": "^25.2.2"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-validator-identifier/package.json
Expand Up @@ -18,5 +18,8 @@
"@unicode/unicode-13.0.0": "^1.0.6",
"benchmark": "^2.1.4",
"charcodes": "^0.2.0"
},
"engines": {
"node": ">=6.9.0"
}
}
5 changes: 4 additions & 1 deletion packages/babel-helper-validator-option/package.json
Expand Up @@ -12,5 +12,8 @@
"access": "public"
},
"main": "./lib/index.js",
"exports": "./lib/index.js"
"exports": "./lib/index.js",
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helper-wrap-function/package.json
Expand Up @@ -18,5 +18,8 @@
"@babel/template": "workspace:^7.12.13",
"@babel/traverse": "workspace:^7.13.0",
"@babel/types": "workspace:^7.13.0"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-helpers/package.json
Expand Up @@ -21,5 +21,8 @@
},
"devDependencies": {
"@babel/helper-plugin-test-runner": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-highlight/package.json
Expand Up @@ -22,5 +22,8 @@
"devDependencies": {
"@types/chalk": "^2.0.0",
"strip-ansi": "^4.0.0"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-node/package.json
Expand Up @@ -43,5 +43,8 @@
},
"bin": {
"babel-node": "./bin/babel-node.js"
},
"engines": {
"node": ">=6.9.0"
}
}
Expand Up @@ -34,5 +34,8 @@
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*",
"@babel/traverse": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
3 changes: 3 additions & 0 deletions packages/babel-plugin-external-helpers/package.json
Expand Up @@ -25,5 +25,8 @@
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*"
},
"engines": {
"node": ">=6.9.0"
}
}
Expand Up @@ -32,5 +32,8 @@
"@babel/traverse": "workspace:*",
"@babel/types": "workspace:*"
},
"homepage": "https://babel.dev/docs/en/next/babel-plugin-proposal-async-do-expressions"
"homepage": "https://babel.dev/docs/en/next/babel-plugin-proposal-async-do-expressions",
"engines": {
"node": ">=6.9.0"
}
}

0 comments on commit 6b1ea57

Please sign in to comment.