Skip to content

Commit d9722dc

Browse files
authored
ref(dev): Use lerna exec for top-level link:yarn yarn script (#5084)
Many of our packages have a `link:yarn` yarn script, which runs `yarn link`. At first this is puzzling (why is it better to type `yarn link:yarn` than `yarn link`?) until you realize that they're only there in aid of the repo-level `link:yarn` script, which allows you to set up the entire repo for linking into a test project in one go. Convenient! But also accomplishable without all of the package-level scripts, by switching from `lerna run` to `lerna exec`, which will run a shell command in every package. This makes that change, and removes the unnecessary package-level scripts. (While it's true that this means that `yarn link` is run in the two integration test packages (where it wasn't before), that's a harmless change, as all `yarn linnk` actually does is create a symlink in `~/.config/yarn/link/`.)
1 parent e5bfbaa commit d9722dc

File tree

20 files changed

+1
-20
lines changed

20 files changed

+1
-20
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"clean": "lerna run --parallel clean && lerna clean --yes && yarn rimraf eslintcache",
1616
"codecov": "codecov",
1717
"fix": "lerna run --parallel fix",
18-
"link:yarn": "lerna run --stream --concurrency 1 link:yarn",
18+
"link:yarn": "lerna exec --parallel yarn link",
1919
"lint": "lerna run --parallel lint",
2020
"lint:eslint": "lerna run --parallel lint:eslint",
2121
"postpublish": "make publish-docs && lerna run --stream --concurrency 1 postpublish",

packages/angular/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"fix": "run-s fix:eslint fix:prettier",
5050
"fix:eslint": "eslint . --format stylish --fix",
5151
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
52-
"link:yarn": "yarn link",
5352
"lint": "run-s lint:prettier lint:eslint",
5453
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
5554
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\""

packages/browser/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
"fix": "run-s fix:eslint fix:prettier",
6060
"fix:eslint": "eslint . --format stylish --fix",
6161
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
62-
"link:yarn": "yarn link",
6362
"lint": "run-s lint:prettier lint:eslint",
6463
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
6564
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",

packages/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"fix": "run-s fix:eslint fix:prettier",
3737
"fix:eslint": "eslint . --format stylish --fix",
3838
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
39-
"link:yarn": "yarn link",
4039
"lint": "run-s lint:prettier lint:eslint",
4140
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
4241
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",

packages/ember/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"build": "ember build --environment=production",
2121
"build:npm": "ember ts:precompile && npm pack && ember ts:clean",
2222
"clean": "yarn rimraf sentry-ember-*.tgz",
23-
"link:yarn": "yarn link",
2423
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
2524
"lint:hbs": "ember-template-lint .",
2625
"lint:js": "eslint . --cache --cache-location '../../eslintcache/'",

packages/eslint-config-sdk/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
},
3838
"scripts": {
3939
"clean": "yarn rimraf sentry-internal-eslint-config-sdk-*.tgz",
40-
"link:yarn": "yarn link",
4140
"lint": "prettier --check \"**/*.js\"",
4241
"fix": "prettier --write \"**/*.js\"",
4342
"build:npm": "npm pack",

packages/eslint-plugin-sdk/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
},
2727
"scripts": {
2828
"clean": "yarn rimraf sentry-internal-eslint-plugin-sdk-*.tgz",
29-
"link:yarn": "yarn link",
3029
"fix": "run-s fix:eslint fix:prettier",
3130
"fix:eslint": "eslint . --format stylish --fix",
3231
"fix:prettier": "prettier --write \"{src,test}/**/*.js\"",

packages/gatsby/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"fix": "run-s fix:eslint fix:prettier",
5151
"fix:eslint": "eslint . --format stylish --fix",
5252
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
53-
"link:yarn": "yarn link",
5453
"lint": "run-s lint:prettier lint:eslint",
5554
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
5655
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",

packages/hub/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"fix": "run-s fix:eslint fix:prettier",
3636
"fix:eslint": "eslint . --format stylish --fix",
3737
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
38-
"link:yarn": "yarn link",
3938
"lint": "run-s lint:prettier lint:eslint",
4039
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
4140
"lint:prettier": "prettier --check \"{src,test}/**/*.ts\"",

packages/integrations/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"fix": "run-s fix:eslint fix:prettier",
4141
"fix:eslint": "eslint . --format stylish --fix",
4242
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
43-
"link:yarn": "yarn link",
4443
"lint": "run-s lint:prettier lint:eslint",
4544
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
4645
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",

0 commit comments

Comments
 (0)