Skip to content

Commit

Permalink
Revert "chore: enforce types starts with ./"
Browse files Browse the repository at this point in the history
This reverts commit a685df9.
  • Loading branch information
merceyz committed May 26, 2021
1 parent a685df9 commit 889f988
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions constraints.pro
Expand Up @@ -57,12 +57,10 @@ gen_enforced_field(WorkspaceCwd, 'author', 'The Babel Team (https://babel.dev/te
gen_enforced_field(WorkspaceCwd, 'author', null) :-
workspace_field(WorkspaceCwd, 'private', true).

% Enforces the main and types field to start with ./
gen_enforced_field(WorkspaceCwd, FieldName, ExpectedValue) :-
% Fields the rule applies to
member(FieldName, ['main', 'types']),
% Enforces the main field to start with ./
gen_enforced_field(WorkspaceCwd, 'main', ExpectedValue) :-
% Get current value
workspace_field(WorkspaceCwd, FieldName, CurrentValue),
workspace_field(WorkspaceCwd, 'main', CurrentValue),
% Must not start with ./ already
\+ atom_concat('./', _, CurrentValue),
% Store './' + CurrentValue in ExpectedValue
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-parser/package.json
Expand Up @@ -23,7 +23,7 @@
"directory": "packages/babel-parser"
},
"main": "./lib/index.js",
"types": "./typings/babel-parser.d.ts",
"types": "typings/babel-parser.d.ts",
"files": [
"bin",
"lib",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-types/package.json
Expand Up @@ -15,7 +15,7 @@
"directory": "packages/babel-types"
},
"main": "./lib/index.js",
"types": "./lib/index-legacy.d.ts",
"types": "lib/index-legacy.d.ts",
"typesVersions": {
">=3.7": {
"lib/index-legacy.d.ts": [
Expand Down

0 comments on commit 889f988

Please sign in to comment.