Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not automatically publish eslint packages #10722

Merged
merged 6 commits into from Nov 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions Makefile
Expand Up @@ -219,6 +219,11 @@ 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 @@ -270,3 +275,10 @@ 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
1 change: 1 addition & 0 deletions eslint/babel-eslint-config-internal/package.json
Expand Up @@ -5,6 +5,7 @@
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/babel/eslint-config-babel"
Expand Down
2 changes: 1 addition & 1 deletion eslint/babel-eslint-parser/package.json
Expand Up @@ -4,6 +4,7 @@
"description": "Custom parser for ESLint",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"license": "MIT",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/babel/babel-eslint.git"
Expand All @@ -14,7 +15,6 @@
"homepage": "https://github.com/babel/babel-eslint",
"scripts": {
"test": "cd test && mocha specs && cd -",
"preversion": "npm test",
"changelog": "git log `git describe --tags --abbrev=0`..HEAD --pretty=format:' * %s (%an)' | grep -v 'Merge pull request'"
},
"engines": {
Expand Down
1 change: 1 addition & 0 deletions eslint/babel-eslint-plugin-development/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "@babel/eslint-plugin-development",
"version": "1.0.1",
"description": "A set of eslint rules to enforce best practices in the development of Babel plugins.",
"private": true,
"keywords": [
"eslint",
"eslintplugin",
Expand Down
1 change: 1 addition & 0 deletions eslint/babel-eslint-plugin/package.json
Expand Up @@ -19,6 +19,7 @@
],
"author": "Jason Quense @monasticpanic",
"license": "MIT",
"private": true,
"engines": {
"node": ">=4"
},
Expand Down
4 changes: 3 additions & 1 deletion lerna.json
Expand Up @@ -22,7 +22,9 @@
"test/**",
"codemods/**",
"# We ignore every JSON file, except for built-in-modules, built-ins and plugins defined in babel-preset-env/data.",
"@(!(built-in-modules|built-ins|plugins|package)).json"
"@(!(built-in-modules|built-ins|plugins|package)).json",
"# Until the ESLint packages version are aligned with Babel's, we ignore them",
"eslint/**"
]
}
},
Expand Down
12 changes: 12 additions & 0 deletions scripts/integration-tests/publish-local.sh
Expand Up @@ -11,6 +11,13 @@ source utils/local-registry.sh
source utils/git.sh
source utils/cleanup.sh

function publishESLintPkg {
cd eslint/$1
yarn version --patch --no-git-tag-version
cd ../..
make publish-eslint PKG=$1
}

# Echo every command being executed
set -x

Expand All @@ -30,4 +37,9 @@ loginLocalRegistry

I_AM_USING_VERDACCIO=I_AM_SURE make publish-test

publishESLintPkg babel-eslint-config-internal
publishESLintPkg babel-eslint-parser
publishESLintPkg babel-eslint-plugin
publishESLintPkg babel-eslint-plugin-development

cleanup