diff --git a/Makefile b/Makefile index c44393339ab8..0e792557f673 100644 --- a/Makefile +++ b/Makefile @@ -249,11 +249,6 @@ endif $(YARN) lerna publish from-git --registry http://localhost:4873 --yes --tag-version-prefix="version-e2e-test-" $(MAKE) clean -publish-eslint: - $(call set-json-field, ./eslint/$(PKG)/package.json, private, false) - cd eslint/$(PKG); yarn publish - $(call set-json-field, ./eslint/$(PKG)/package.json, private, true) - bootstrap-only: lerna-bootstrap yarn-install: clean-all @@ -312,10 +307,3 @@ define clean-source-all rm -rf $(1)/*/package-lock.json endef - -define set-json-field - $(NODE) -e "\ - require('fs').writeFileSync('$1'.trim(), \ - JSON.stringify({ ...require('$1'.trim()), $2: $3 }, null, 2) + '\\n' \ - )" -endef diff --git a/eslint/babel-eslint-config-internal/package.json b/eslint/babel-eslint-config-internal/package.json index 3e720875ef3f..cdcf537af4b4 100644 --- a/eslint/babel-eslint-config-internal/package.json +++ b/eslint/babel-eslint-config-internal/package.json @@ -2,16 +2,20 @@ "name": "@babel/eslint-config-internal", "version": "7.10.4", "description": "The Babel Team's ESLint configuration. Since it's internal, it might not respect semver.", - "author": "Sebastian McKenzie ", + "author": "The Babel Team (https://babeljs.io/team)", "homepage": "https://babeljs.io/", "license": "MIT", - "private": true, "repository": { "type": "git", "url": "https://github.com/babel/babel.git", "directory": "eslint/babel-eslint-config-internal" }, - "main": "index.js", + "main": "./index.js", + "type": "commonjs", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, "peerDependencies": { "@babel/eslint-parser": "^7.10.4", "eslint-plugin-flowtype": "^3.0.0" diff --git a/eslint/babel-eslint-parser/package.json b/eslint/babel-eslint-parser/package.json index 2c7f73e7347e..2cd150eab58e 100644 --- a/eslint/babel-eslint-parser/package.json +++ b/eslint/babel-eslint-parser/package.json @@ -2,9 +2,8 @@ "name": "@babel/eslint-parser", "version": "7.10.4", "description": "ESLint parser that allows for linting of experimental syntax transformed by Babel", - "author": "Sebastian McKenzie ", + "author": "The Babel Team (https://babeljs.io/team)", "license": "MIT", - "private": true, "repository": { "type": "git", "url": "https://github.com/babel/babel.git", @@ -15,11 +14,16 @@ }, "homepage": "https://babeljs.io/", "engines": { - "node": ">=10.9" + "node": "^10.13.0 || ^12.13.0 || >=14.0.0" + }, + "main": "./lib/index.js", + "type": "commonjs", + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" }, - "main": "lib/index.js", "peerDependencies": { - "@babel/core": ">=7.10.4", + "@babel/core": ">=7.10.0", "eslint": ">=7.5.0" }, "dependencies": { diff --git a/eslint/babel-eslint-plugin-development-internal/package.json b/eslint/babel-eslint-plugin-development-internal/package.json index 2ca61ad2299d..af0b7fccdad6 100644 --- a/eslint/babel-eslint-plugin-development-internal/package.json +++ b/eslint/babel-eslint-plugin-development-internal/package.json @@ -18,15 +18,12 @@ "author": "Kai Cataldo ", "license": "MIT", "private": true, - "engines": { - "node": ">=10.9" - }, "bugs": { "url": "https://github.com/babel/babel/issues" }, "homepage": "https://github.com/babel/babel/tree/master/eslint/babel-eslint-plugin-development-internal", "peerDependencies": { - "@babel/eslint-parser": ">=7.10.4", + "@babel/eslint-parser": ">=7.11.0", "eslint": ">=7.5.0" }, "devDependencies": { diff --git a/eslint/babel-eslint-plugin-development/package.json b/eslint/babel-eslint-plugin-development/package.json index c885be49ede8..a677eb3499a0 100644 --- a/eslint/babel-eslint-plugin-development/package.json +++ b/eslint/babel-eslint-plugin-development/package.json @@ -2,7 +2,6 @@ "name": "@babel/eslint-plugin-development", "version": "7.10.4", "description": "ESLint rules that enforce best practices in the development of Babel plugins.", - "private": true, "keywords": [ "eslint", "eslintplugin", @@ -13,9 +12,14 @@ "email": "nicolo.ribaudo@gmail.com", "url": "https://github.com/nicolo-ribaudo" }, - "main": "lib/index.js", + "main": "./lib/index.js", + "type": "commonjs", + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "engines": { - "node": ">=10.9" + "node": "^10.13.0 || ^12.13.0 || >=14.0.0" }, "publishConfig": { "access": "public" diff --git a/eslint/babel-eslint-plugin/package.json b/eslint/babel-eslint-plugin/package.json index 406f844361ba..d48b3e387858 100644 --- a/eslint/babel-eslint-plugin/package.json +++ b/eslint/babel-eslint-plugin/package.json @@ -2,7 +2,12 @@ "name": "@babel/eslint-plugin", "version": "7.10.4", "description": "Companion rules for @babel/eslint-parser", - "main": "lib/index.js", + "main": "./lib/index.js", + "type": "commonjs", + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "repository": { "type": "git", "url": "https://github.com/babel/babel.git", @@ -17,16 +22,15 @@ ], "author": "Jason Quense @monasticpanic", "license": "MIT", - "private": true, "engines": { - "node": ">=10.9" + "node": "^10.13.0 || ^12.13.0 || >=14.0.0" }, "bugs": { "url": "https://github.com/babel/babel/issues" }, "homepage": "https://babeljs.io/", "peerDependencies": { - "@babel/eslint-parser": ">=7.10.4", + "@babel/eslint-parser": ">=7.11.0", "eslint": ">=7.5.0" }, "dependencies": { diff --git a/lerna.json b/lerna.json index ecc214e2002a..c09415f6f7c2 100644 --- a/lerna.json +++ b/lerna.json @@ -24,9 +24,7 @@ "**/test/**", "codemods/**", "# We ignore every JSON file, except for native-modules, built-ins and plugins defined in babel-preset-env/data.", - "@(!(native-modules|built-ins|plugins|package)).json", - "# Until the ESLint packages version are aligned with Babel's, we ignore them", - "eslint/**" + "@(!(native-modules|built-ins|plugins|package)).json" ] } }, diff --git a/scripts/integration-tests/publish-local.sh b/scripts/integration-tests/publish-local.sh index 210bcc04b25b..7c1410735bd9 100755 --- a/scripts/integration-tests/publish-local.sh +++ b/scripts/integration-tests/publish-local.sh @@ -11,13 +11,6 @@ source utils/local-registry.sh source utils/git.sh source utils/cleanup.sh -function publishESLintPkg { - cd eslint/$1 - yarn version --new-version $2 --no-git-tag-version - cd ../.. - make -j publish-eslint PKG=$1 -} - # Echo every command being executed set -x @@ -43,9 +36,4 @@ VERSION=$( I_AM_USING_VERDACCIO=I_AM_SURE VERSION="$VERSION" make publish-test -publishESLintPkg babel-eslint-config-internal "$VERSION" -publishESLintPkg babel-eslint-parser "$VERSION" -publishESLintPkg babel-eslint-plugin "$VERSION" -publishESLintPkg babel-eslint-plugin-development "$VERSION" - cleanup