Skip to content

Commit

Permalink
[babel 8] Add "exports" to every package (#14013)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Dec 29, 2021
1 parent 2c68d03 commit d1cabf6
Show file tree
Hide file tree
Showing 145 changed files with 1,717 additions and 125 deletions.
8 changes: 4 additions & 4 deletions .yarn/plugins/@yarnpkg/plugin-conditions.cjs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,17 @@
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
"author": "The Babel Team (https://babel.dev/team)",
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,17 @@
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
"author": "The Babel Team (https://babel.dev/team)",
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
12 changes: 12 additions & 0 deletions constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,15 @@ gen_enforced_field(WorkspaceCwd, FieldName, ExpectedValue) :-
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, null, 'devDependencies') :-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, _, 'devDependencies'),
workspace_has_dependency(WorkspaceCwd, DependencyIdent, _, 'dependencies').

% Enforces `exports` to be consistent
gen_enforced_field(WorkspaceCwd, 'exports', '{ ".": "./lib/index.js", "./package.json": "./package.json" }') :-
\+ workspace_field(WorkspaceCwd, 'private', true),
% Exclude packages with more complex `exports`
workspace_ident(WorkspaceCwd, WorkspaceIdent),
WorkspaceIdent \= '@babel/eslint-parser',
WorkspaceIdent \= '@babel/compat-data',
WorkspaceIdent \= '@babel/plugin-transform-react-jsx', % TODO: Remove in Babel 8
WorkspaceIdent \= '@babel/helper-plugin-test-runner', % TODO: Remove in Babel 8
WorkspaceIdent \= '@babel/standalone',
\+ atom_concat('@babel/runtime', _, WorkspaceIdent).
12 changes: 12 additions & 0 deletions packages/babel-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,17 @@
},
"engines": {
"node": ">=6.9.0"
},
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
12 changes: 12 additions & 0 deletions packages/babel-code-frame/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,17 @@
},
"engines": {
"node": ">=6.9.0"
},
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
12 changes: 12 additions & 0 deletions packages/babel-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,17 @@
"@types/resolve": "^1.3.2",
"@types/semver": "^5.4.0",
"@types/source-map": "^0.5.0"
},
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
12 changes: 12 additions & 0 deletions packages/babel-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,17 @@
},
"engines": {
"node": ">=6.9.0"
},
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
14 changes: 13 additions & 1 deletion packages/babel-helper-annotate-as-pure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,17 @@
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
"author": "The Babel Team (https://babel.dev/team)",
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,17 @@
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
"author": "The Babel Team (https://babel.dev/team)",
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
14 changes: 13 additions & 1 deletion packages/babel-helper-builder-react-jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,17 @@
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
"author": "The Babel Team (https://babel.dev/team)",
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
3 changes: 2 additions & 1 deletion packages/babel-helper-compilation-targets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"main": "./lib/index.js",
"exports": {
".": "./lib/index.js"
".": "./lib/index.js",
"./package.json": "./package.json"
},
"publishConfig": {
"access": "public"
Expand Down
12 changes: 12 additions & 0 deletions packages/babel-helper-create-class-features-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,17 @@
},
"engines": {
"node": ">=6.9.0"
},
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
12 changes: 12 additions & 0 deletions packages/babel-helper-create-regexp-features-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,17 @@
},
"engines": {
"node": ">=6.9.0"
},
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
14 changes: 13 additions & 1 deletion packages/babel-helper-define-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,17 @@
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
"author": "The Babel Team (https://babel.dev/team)",
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
3 changes: 2 additions & 1 deletion packages/babel-helper-environment-visitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"main": "./lib/index.js",
"exports": {
".": "./lib/index.js"
".": "./lib/index.js",
"./package.json": "./package.json"
},
"dependencies": {
"@babel/types": "workspace:^"
Expand Down
14 changes: 13 additions & 1 deletion packages/babel-helper-explode-assignable-expression/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,17 @@
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
"author": "The Babel Team (https://babel.dev/team)",
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
12 changes: 12 additions & 0 deletions packages/babel-helper-fixtures/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,17 @@
},
"engines": {
"node": ">=6.9.0"
},
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
14 changes: 13 additions & 1 deletion packages/babel-helper-function-name/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,17 @@
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
"author": "The Babel Team (https://babel.dev/team)",
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
14 changes: 13 additions & 1 deletion packages/babel-helper-get-function-arity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,17 @@
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
"author": "The Babel Team (https://babel.dev/team)",
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
14 changes: 13 additions & 1 deletion packages/babel-helper-hoist-variables/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,17 @@
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)"
"author": "The Babel Team (https://babel.dev/team)",
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
12 changes: 12 additions & 0 deletions packages/babel-helper-member-expression-to-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,17 @@
},
"engines": {
"node": ">=6.9.0"
},
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}
12 changes: 12 additions & 0 deletions packages/babel-helper-module-imports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,17 @@
},
"engines": {
"node": ">=6.9.0"
},
"conditions": {
"BABEL_8_BREAKING": [
null,
{
"exports": null
}
]
},
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
}
}

0 comments on commit d1cabf6

Please sign in to comment.