Skip to content

Commit

Permalink
Prepare to publish @babel/eslint-* packages (#11894)
Browse files Browse the repository at this point in the history
* remove private flag, bump node and babel versions

* disallow submodule imports

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

This reverts commit 5ca8acd.

# 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
  • Loading branch information
JLHwung committed Jul 30, 2020
1 parent 0e4cf1e commit 4c9929c
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 46 deletions.
12 changes: 0 additions & 12 deletions Makefile
Expand Up @@ -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
Expand Down Expand Up @@ -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
10 changes: 7 additions & 3 deletions eslint/babel-eslint-config-internal/package.json
Expand Up @@ -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 <sebmck@gmail.com>",
"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"
Expand Down
14 changes: 9 additions & 5 deletions eslint/babel-eslint-parser/package.json
Expand Up @@ -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 <sebmck@gmail.com>",
"author": "The Babel Team (https://babeljs.io/team)",
"license": "MIT",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
Expand All @@ -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": {
Expand Down
5 changes: 1 addition & 4 deletions eslint/babel-eslint-plugin-development-internal/package.json
Expand Up @@ -18,15 +18,12 @@
"author": "Kai Cataldo <kai@kaicataldo.com>",
"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": {
Expand Down
10 changes: 7 additions & 3 deletions eslint/babel-eslint-plugin-development/package.json
Expand Up @@ -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",
Expand All @@ -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"
Expand Down
12 changes: 8 additions & 4 deletions eslint/babel-eslint-plugin/package.json
Expand Up @@ -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",
Expand All @@ -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": {
Expand Down
4 changes: 1 addition & 3 deletions lerna.json
Expand Up @@ -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"
]
}
},
Expand Down
12 changes: 0 additions & 12 deletions scripts/integration-tests/publish-local.sh
Expand Up @@ -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

Expand All @@ -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

0 comments on commit 4c9929c

Please sign in to comment.