From 889f98868e3e25db3a998e90a299e66386e64c49 Mon Sep 17 00:00:00 2001 From: merceyz Date: Wed, 26 May 2021 18:41:12 +0200 Subject: [PATCH] Revert "chore: enforce `types` starts with `./`" This reverts commit a685df90acd0147ad4cbc3b372c2ee1092e5d1e4. --- constraints.pro | 8 +++----- packages/babel-parser/package.json | 2 +- packages/babel-types/package.json | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/constraints.pro b/constraints.pro index 8beae223e6b4..39eebacb9df9 100644 --- a/constraints.pro +++ b/constraints.pro @@ -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 diff --git a/packages/babel-parser/package.json b/packages/babel-parser/package.json index 8dc297752cec..db2591bc699c 100644 --- a/packages/babel-parser/package.json +++ b/packages/babel-parser/package.json @@ -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", diff --git a/packages/babel-types/package.json b/packages/babel-types/package.json index ea103ec8fb28..e930875eb6de 100644 --- a/packages/babel-types/package.json +++ b/packages/babel-types/package.json @@ -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": [