Prepare to publish @babel/eslint-* packages (#11894)

* remove private flag, bump node and babel versions

* disallow submodule imports

* Revert "Do not automatically publish eslint packages (#10722)"

This reverts commit 5ca8acdb38bc7a9a4669ad3249c219531f8f6579.

# Conflicts:
#	Makefile
#	eslint/babel-eslint-parser/package.json
#	eslint/babel-eslint-plugin-development/package.json
#	lerna.json
#	scripts/integration-tests/publish-local.sh

* disable submodule imports for babel-eslint-config-internal

* chore: push back a bit to make tests happy
This commit is contained in:
Huáng Jùnliàng 2020-07-30 13:32:38 -04:00 committed by GitHub
parent 0e4cf1e6a2
commit 4c9929ca28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 33 additions and 46 deletions

View File

@ -249,11 +249,6 @@ endif
$(YARN) lerna publish from-git --registry http://localhost:4873 --yes --tag-version-prefix="version-e2e-test-" $(YARN) lerna publish from-git --registry http://localhost:4873 --yes --tag-version-prefix="version-e2e-test-"
$(MAKE) clean $(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 bootstrap-only: lerna-bootstrap
yarn-install: clean-all yarn-install: clean-all
@ -312,10 +307,3 @@ define clean-source-all
rm -rf $(1)/*/package-lock.json rm -rf $(1)/*/package-lock.json
endef endef
define set-json-field
$(NODE) -e "\
require('fs').writeFileSync('$1'.trim(), \
JSON.stringify({ ...require('$1'.trim()), $2: $3 }, null, 2) + '\\n' \
)"
endef

View File

@ -2,16 +2,20 @@
"name": "@babel/eslint-config-internal", "name": "@babel/eslint-config-internal",
"version": "7.10.4", "version": "7.10.4",
"description": "The Babel Team's ESLint configuration. Since it's internal, it might not respect semver.", "description": "The Babel Team's ESLint configuration. Since it's internal, it might not respect semver.",
"author": "Sebastian McKenzie <sebmck@gmail.com>", "author": "The Babel Team (https://babeljs.io/team)",
"homepage": "https://babeljs.io/", "homepage": "https://babeljs.io/",
"license": "MIT", "license": "MIT",
"private": true,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/babel/babel.git", "url": "https://github.com/babel/babel.git",
"directory": "eslint/babel-eslint-config-internal" "directory": "eslint/babel-eslint-config-internal"
}, },
"main": "index.js", "main": "./index.js",
"type": "commonjs",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"peerDependencies": { "peerDependencies": {
"@babel/eslint-parser": "^7.10.4", "@babel/eslint-parser": "^7.10.4",
"eslint-plugin-flowtype": "^3.0.0" "eslint-plugin-flowtype": "^3.0.0"

View File

@ -2,9 +2,8 @@
"name": "@babel/eslint-parser", "name": "@babel/eslint-parser",
"version": "7.10.4", "version": "7.10.4",
"description": "ESLint parser that allows for linting of experimental syntax transformed by Babel", "description": "ESLint parser that allows for linting of experimental syntax transformed by Babel",
"author": "Sebastian McKenzie <sebmck@gmail.com>", "author": "The Babel Team (https://babeljs.io/team)",
"license": "MIT", "license": "MIT",
"private": true,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/babel/babel.git", "url": "https://github.com/babel/babel.git",
@ -15,11 +14,16 @@
}, },
"homepage": "https://babeljs.io/", "homepage": "https://babeljs.io/",
"engines": { "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": { "peerDependencies": {
"@babel/core": ">=7.10.4", "@babel/core": ">=7.10.0",
"eslint": ">=7.5.0" "eslint": ">=7.5.0"
}, },
"dependencies": { "dependencies": {

View File

@ -18,15 +18,12 @@
"author": "Kai Cataldo <kai@kaicataldo.com>", "author": "Kai Cataldo <kai@kaicataldo.com>",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"engines": {
"node": ">=10.9"
},
"bugs": { "bugs": {
"url": "https://github.com/babel/babel/issues" "url": "https://github.com/babel/babel/issues"
}, },
"homepage": "https://github.com/babel/babel/tree/master/eslint/babel-eslint-plugin-development-internal", "homepage": "https://github.com/babel/babel/tree/master/eslint/babel-eslint-plugin-development-internal",
"peerDependencies": { "peerDependencies": {
"@babel/eslint-parser": ">=7.10.4", "@babel/eslint-parser": ">=7.11.0",
"eslint": ">=7.5.0" "eslint": ">=7.5.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -2,7 +2,6 @@
"name": "@babel/eslint-plugin-development", "name": "@babel/eslint-plugin-development",
"version": "7.10.4", "version": "7.10.4",
"description": "ESLint rules that enforce best practices in the development of Babel plugins.", "description": "ESLint rules that enforce best practices in the development of Babel plugins.",
"private": true,
"keywords": [ "keywords": [
"eslint", "eslint",
"eslintplugin", "eslintplugin",
@ -13,9 +12,14 @@
"email": "nicolo.ribaudo@gmail.com", "email": "nicolo.ribaudo@gmail.com",
"url": "https://github.com/nicolo-ribaudo" "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": { "engines": {
"node": ">=10.9" "node": "^10.13.0 || ^12.13.0 || >=14.0.0"
}, },
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"

View File

@ -2,7 +2,12 @@
"name": "@babel/eslint-plugin", "name": "@babel/eslint-plugin",
"version": "7.10.4", "version": "7.10.4",
"description": "Companion rules for @babel/eslint-parser", "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": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/babel/babel.git", "url": "https://github.com/babel/babel.git",
@ -17,16 +22,15 @@
], ],
"author": "Jason Quense @monasticpanic", "author": "Jason Quense @monasticpanic",
"license": "MIT", "license": "MIT",
"private": true,
"engines": { "engines": {
"node": ">=10.9" "node": "^10.13.0 || ^12.13.0 || >=14.0.0"
}, },
"bugs": { "bugs": {
"url": "https://github.com/babel/babel/issues" "url": "https://github.com/babel/babel/issues"
}, },
"homepage": "https://babeljs.io/", "homepage": "https://babeljs.io/",
"peerDependencies": { "peerDependencies": {
"@babel/eslint-parser": ">=7.10.4", "@babel/eslint-parser": ">=7.11.0",
"eslint": ">=7.5.0" "eslint": ">=7.5.0"
}, },
"dependencies": { "dependencies": {

View File

@ -24,9 +24,7 @@
"**/test/**", "**/test/**",
"codemods/**", "codemods/**",
"# We ignore every JSON file, except for native-modules, built-ins and plugins defined in babel-preset-env/data.", "# 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", "@(!(native-modules|built-ins|plugins|package)).json"
"# Until the ESLint packages version are aligned with Babel's, we ignore them",
"eslint/**"
] ]
} }
}, },

View File

@ -11,13 +11,6 @@ source utils/local-registry.sh
source utils/git.sh source utils/git.sh
source utils/cleanup.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 # Echo every command being executed
set -x set -x
@ -43,9 +36,4 @@ VERSION=$(
I_AM_USING_VERDACCIO=I_AM_SURE VERSION="$VERSION" make publish-test 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 cleanup