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\"",

packages/nextjs/package.json

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

packages/node/package.json

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

packages/react/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"fix": "run-s fix:eslint fix:prettier",
6363
"fix:eslint": "eslint . --format stylish --fix",
6464
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
65-
"link:yarn": "yarn link",
6665
"lint": "run-s lint:prettier lint:eslint",
6766
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
6867
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",

packages/serverless/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"fix": "run-s fix:eslint fix:prettier",
5454
"fix:eslint": "eslint . --format stylish --fix",
5555
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
56-
"link:yarn": "yarn link",
5756
"lint": "run-s lint:prettier lint:eslint",
5857
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
5958
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",

packages/tracing/package.json

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

packages/types/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"build:types:watch": "tsc -p tsconfig.types.json --watch",
2727
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
2828
"clean": "rimraf build sentry-types-*.tgz",
29-
"link:yarn": "yarn link",
3029
"lint": "run-s lint:prettier lint:eslint",
3130
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
3231
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",

packages/typescript/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
},
1616
"scripts": {
1717
"clean": "yarn rimraf sentry-internal-typescript-*.tgz",
18-
"link:yarn": "yarn link",
1918
"build:npm": "npm pack"
2019
},
2120
"volta": {

packages/utils/package.json

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

packages/vue/package.json

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

packages/wasm/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"fix": "run-s fix:eslint fix:prettier",
4747
"fix:eslint": "eslint . --format stylish --fix",
4848
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
49-
"link:yarn": "yarn link",
5049
"lint": "run-s lint:prettier lint:eslint",
5150
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
5251
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",

0 commit comments

Comments
 (0)