Skip to content

Commit 2a09fd6

Browse files
authored
chore: lerna optimizations (#7057)
1 parent 8ef71d1 commit 2a09fd6

File tree

29 files changed

+573
-1002
lines changed

29 files changed

+573
-1002
lines changed

.yarnrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
workspaces-experimental true
2-
env:
3-
NODE_OPTIONS --stack-trace-limit=10000
1+
env: NODE_OPTIONS --stack-trace-limit=10000

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ To run the test suite and our code linter, node.js and yarn are required.
1616
[`node` download](https://nodejs.org/download)
1717
[`yarn` download](https://yarnpkg.com/en/docs/install)
1818

19-
`sentry-javascript` is a monorepo containing several packages, and we use `lerna` to manage them. To get started, install all dependencies, use `lerna` to bootstrap the workspace, and then perform an initial build, so TypeScript can read all of the linked type definitions.
19+
`sentry-javascript` is a monorepo containing several packages, and we use `lerna` to manage them. To get started, install all dependencies, and then perform an initial build, so TypeScript can read all of the linked type definitions.
2020

2121
```
2222
$ yarn
23-
$ yarn lerna bootstrap
2423
$ yarn build
2524
```
2625

lerna.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
33
"version": "7.36.0",
4-
"packages": [
5-
"packages/*"
6-
],
74
"npmClient": "yarn",
85
"useWorkspaces": true
96
}

nx.json

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,44 @@
66
"cacheableOperations": [
77
"build:bundle",
88
"build:transpile",
9-
"build:types"
9+
"build:types",
10+
"lint:eslint"
1011
]
1112
}
1213
}
1314
},
1415
"namedInputs": {
16+
"default": ["{projectRoot}/**/*", "sharedGlobals"],
1517
"sharedGlobals": [
1618
"{workspaceRoot}/*.js",
17-
"{workspaceRoot}/*.json",
18-
"{workspaceRoot}/yarn.lock"
19+
"{workspaceRoot}/*.json"
1920
],
20-
"default": [
21-
"{projectRoot}/**/*",
22-
"sharedGlobals",
21+
"production": [
22+
"default",
2323
"!{projectRoot}/test/**/*",
2424
"!{projectRoot}/**/*.md"
2525
]
2626
},
2727
"targetDefaults": {
2828
"build:bundle": {
29+
"inputs": ["production", "^production"],
2930
"dependsOn": [
30-
"^build:transpile",
3131
"build:transpile"
3232
],
3333
"outputs": [
3434
"{projectRoot}/build/bundles"
3535
]
3636
},
3737
"build:tarball": {
38+
"inputs": ["production", "^production"],
3839
"dependsOn": [
39-
"^build:transpile",
4040
"build:transpile",
41-
"^build:types",
4241
"build:types"
4342
],
4443
"outputs": []
4544
},
4645
"build:transpile": {
46+
"inputs": ["production", "^production"],
4747
"dependsOn": [
4848
"^build:transpile:uncached",
4949
"^build:transpile",
@@ -56,28 +56,18 @@
5656
]
5757
},
5858
"build:types": {
59+
"inputs": ["production", "^production"],
5960
"dependsOn": [
6061
"^build:types"
6162
],
6263
"outputs": [
6364
"{projectRoot}/build/types",
6465
"{projectRoot}/build/npm/types"
6566
]
66-
}
67-
},
68-
"targets": {
69-
"@sentry/serverless": {
70-
"build:bundle": {
71-
"dependsOn": [
72-
"^build:transpile",
73-
"build:transpile",
74-
"^build:types",
75-
"build:types"
76-
],
77-
"outputs": [
78-
"{projectRoot}/build/aws"
79-
]
80-
}
67+
},
68+
"lint:eslint": {
69+
"inputs": ["default"],
70+
"outputs": []
8171
}
8272
}
8373
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"private": true,
33
"scripts": {
4-
"build": "node ./scripts/verify-packages-versions.js && run-s build:types build:transpile build:bundle",
4+
"build": "node ./scripts/verify-packages-versions.js && lerna run build:types,build:transpile,build:bundle",
55
"build:bundle": "lerna run build:bundle",
6-
"build:dev": "run-s build:types build:transpile",
6+
"build:dev": "lerna run build:types,build:transpile",
77
"build:dev:filter": "lerna run build:dev --include-filtered-dependencies --include-filtered-dependents --scope",
88
"build:transpile": "lerna run build:transpile",
99
"build:types": "lerna run build:types",
@@ -85,7 +85,7 @@
8585
"jsdom": "^19.0.0",
8686
"karma-browserstack-launcher": "^1.5.1",
8787
"karma-firefox-launcher": "^1.1.0",
88-
"lerna": "^6.0.3",
88+
"lerna": "6.5.0-alpha.2",
8989
"madge": "4.0.2",
9090
"magic-string": "^0.27.0",
9191
"mocha": "^6.1.4",

packages/angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"fix:eslint": "eslint . --format stylish --fix",
5555
"fix:prettier": "prettier --write \"{src,test,scripts}/**/**.ts\"",
5656
"lint": "run-s lint:prettier lint:eslint",
57-
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
57+
"lint:eslint": "eslint . --format stylish",
5858
"lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
5959
"test": "yarn test:unit",
6060
"test:unit": "jest",

packages/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"fix:eslint": "eslint . --format stylish --fix",
6262
"fix:prettier": "prettier --write \"{src,test,scripts}/**/**.ts\"",
6363
"lint": "run-s lint:prettier lint:eslint",
64-
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
64+
"lint:eslint": "eslint . --format stylish",
6565
"lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
6666
"size:check": "run-p size:check:es5 size:check:es6",
6767
"size:check:es5": "cat build/bundles/bundle.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES5: \",$1,\"kB\";}'",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"fix:eslint": "eslint . --format stylish --fix",
3737
"fix:prettier": "prettier --write \"{src,test,scripts}/**/**.ts\"",
3838
"lint": "run-s lint:prettier lint:eslint",
39-
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
39+
"lint:eslint": "eslint . --format stylish",
4040
"lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
4141
"test": "jest",
4242
"test:watch": "jest --watch",

packages/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"fix:eslint": "eslint . --format stylish --fix",
1212
"fix:prettier": "prettier --config ../../.prettierrc.json --write . ",
1313
"lint": "run-s lint:prettier lint:eslint",
14-
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
14+
"lint:eslint": "eslint . --format stylish",
1515
"lint:prettier": "prettier --config ../../.prettierrc.json --check .",
1616
"test:e2e": "run-s test:validate-configuration test:validate-test-app-setups test:run",
1717
"test:run": "ts-node run.ts",

packages/eslint-plugin-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"fix:eslint": "eslint . --format stylish --fix",
3131
"fix:prettier": "prettier --write \"{src,test}/**/*.js\"",
3232
"lint": "run-s lint:prettier lint:eslint",
33-
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
33+
"lint:eslint": "eslint . --format stylish",
3434
"lint:prettier": "prettier --check \"{src,test}/**/*.js\"",
3535
"test": "mocha test --recursive",
3636
"build:tarball": "npm pack",

0 commit comments

Comments
 (0)