Skip to content

Commit 98c0c67

Browse files
committed
setup caching
1 parent c692c94 commit 98c0c67

File tree

26 files changed

+165
-117
lines changed

26 files changed

+165
-117
lines changed

nx.json

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,69 @@
44
"runner": "nx/tasks-runners/default",
55
"options": {
66
"cacheableOperations": [
7-
"build",
8-
"build:{bundle,npm,extras,rollup,types,dev}",
9-
"lint",
10-
"lint:*"
7+
"build:bundle",
8+
"build:pack",
9+
"build:tarball",
10+
"build:extras",
11+
"build:types"
1112
]
1213
}
1314
}
1415
},
1516
"targetDefaults": {
16-
"build": {
17+
"build:bundle": {
18+
"dependsOn": ["^build:types"],
1719
"outputs": [
18-
"{projectRoot}/packages/*/build"
20+
"{projectRoot}/build/bundles"
1921
]
22+
},
23+
"build:tarball": {
24+
"dependsOn": [
25+
"build:pack",
26+
"^build:pack",
27+
"^build:types"
28+
],
29+
"outputs": [
30+
"{projectRoot}/build"
31+
]
32+
},
33+
"build:pack": {
34+
"dependsOn": [
35+
"^build:pack",
36+
"^build:types"
37+
],
38+
"outputs": [
39+
"{projectRoot}/build/npm",
40+
"{projectRoot}/build/esm",
41+
"{projectRoot}/build/cjs"
42+
]
43+
},
44+
"build:extras": {
45+
"dependsOn": [
46+
"^build:pack"
47+
],
48+
"outputs": [
49+
"{projectRoot}/build"
50+
]
51+
},
52+
"build:types": {
53+
"dependsOn": [
54+
"^build:types"
55+
],
56+
"outputs": [
57+
"{projectRoot}/build/types",
58+
"{projectRoot}/build/npm/types"
59+
]
60+
}
61+
},
62+
"targets": {
63+
"@sentry/serverless": {
64+
"build:bundle": {
65+
"dependsOn": [],
66+
"outputs": [
67+
"{projectRoot}/build/aws"
68+
]
69+
}
2070
}
2171
}
2272
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"private": true,
33
"scripts": {
4-
"build": "node ./scripts/verify-packages-versions.js && yarn run-p build:rollup build:types build:bundle && yarn build:extras",
4+
"build": "node ./scripts/verify-packages-versions.js && yarn run-p build:pack build:types build:bundle && yarn build:extras",
55
"build:bundle": "lerna run build:bundle",
6-
"build:dev": "run-p build:types build:rollup",
6+
"build:dev": "run-p build:types build:pack",
77
"build:dev:filter": "lerna run build:dev --include-filtered-dependencies --include-filtered-dependents --scope",
88
"build:extras": "lerna run build:extras",
9-
"build:rollup": "lerna run build:rollup",
9+
"build:pack": "lerna run build:pack",
1010
"build:types": "lerna run --stream build:types",
1111
"build:watch": "lerna run build:watch",
1212
"build:dev:watch": "lerna run build:dev:watch",
1313
"build:types:watch": "ts-node scripts/build-types-watch.ts",
14-
"build:npm": "lerna run build:npm",
14+
"build:tarball": "lerna run build:tarball",
1515
"circularDepCheck": "lerna run circularDepCheck",
1616
"clean": "run-p clean:build clean:caches",
1717
"clean:build": "lerna run clean",

packages/angular/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@
4242
},
4343
"scripts": {
4444
"build": "yarn build:ngc",
45-
"build:ngc": "ng build --prod",
45+
"build:pack": "ng build --prod",
4646
"build:dev": "run-s build",
47-
"build:extras": "yarn build",
4847
"build:watch": "run-p build:ngc:watch",
49-
"build:ngc:watch": "ng build --prod --watch",
50-
"build:npm": "npm pack ./build",
48+
"build:pack:watch": "ng build --prod --watch",
49+
"build:tarball": "npm pack ./build",
5150
"circularDepCheck": "madge --circular src/index.ts",
5251
"clean": "rimraf build coverage sentry-angular-*.tgz",
5352
"fix": "run-s fix:eslint fix:prettier",

packages/browser/package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,15 @@
4343
"webpack": "^4.30.0"
4444
},
4545
"scripts": {
46-
"build": "run-p build:rollup build:bundle build:types",
46+
"build": "run-p build:pack build:bundle build:types",
4747
"build:bundle": "rollup --config rollup.bundle.config.js",
48-
"build:dev": "run-p build:rollup build:types",
49-
"build:rollup": "rollup -c rollup.npm.config.js",
48+
"build:pack": "rollup -c rollup.npm.config.js",
5049
"build:types": "tsc -p tsconfig.types.json",
51-
"build:watch": "run-p build:rollup:watch build:bundle:watch build:types:watch",
50+
"build:watch": "run-p build:pack:watch build:bundle:watch build:types:watch",
5251
"build:bundle:watch": "rollup --config rollup.bundle.config.js --watch",
53-
"build:dev:watch": "run-p build:rollup:watch build:types:watch",
54-
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
52+
"build:pack:watch": "rollup -c rollup.npm.config.js --watch",
5553
"build:types:watch": "tsc -p tsconfig.types.json --watch",
56-
"build:npm": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
54+
"build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
5755
"circularDepCheck": "madge --circular src/index.ts",
5856
"clean": "rimraf build coverage .rpt2_cache sentry-browser-*.tgz",
5957
"fix": "run-s fix:eslint fix:prettier",

packages/core/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
"tslib": "^1.9.3"
2222
},
2323
"scripts": {
24-
"build": "run-p build:rollup build:types",
24+
"build": "run-p build:pack build:types",
2525
"build:dev": "run-s build",
26-
"build:rollup": "rollup -c rollup.npm.config.js",
26+
"build:pack": "rollup -c rollup.npm.config.js",
2727
"build:types": "tsc -p tsconfig.types.json",
28-
"build:watch": "run-p build:rollup:watch build:types:watch",
28+
"build:watch": "run-p build:pack:watch build:types:watch",
2929
"build:dev:watch": "run-s build:watch",
30-
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
30+
"build:pack:watch": "rollup -c rollup.npm.config.js --watch",
3131
"build:types:watch": "tsc -p tsconfig.types.json --watch",
32-
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
32+
"build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
3333
"circularDepCheck": "madge --circular src/index.ts",
3434
"clean": "rimraf build coverage sentry-core-*.tgz",
3535
"fix": "run-s fix:eslint fix:prettier",

packages/ember/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"scripts": {
2020
"build": "ember build --environment=production",
21-
"build:npm": "ember ts:precompile && npm pack && ember ts:clean",
21+
"build:tarball": "ember ts:precompile && npm pack && ember ts:clean",
2222
"clean": "yarn rimraf sentry-ember-*.tgz",
2323
"lint": "run-p lint:js lint:hbs lint:ts",
2424
"lint:hbs": "ember-template-lint .",

packages/eslint-config-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"clean": "yarn rimraf sentry-internal-eslint-config-sdk-*.tgz",
4040
"lint": "prettier --check \"**/*.js\"",
4141
"fix": "prettier --write \"**/*.js\"",
42-
"build:npm": "npm pack",
42+
"build:tarball": "npm pack",
4343
"circularDepCheck": "madge --circular src/index.js"
4444
},
4545
"volta": {

packages/eslint-plugin-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
3434
"lint:prettier": "prettier --check \"{src,test}/**/*.js\"",
3535
"test": "mocha test --recursive",
36-
"build:npm": "npm pack",
36+
"build:tarball": "npm pack",
3737
"circularDepCheck": "madge --circular src/index.js"
3838
},
3939
"volta": {

packages/gatsby/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,18 @@
3535
"react": "^18.0.0"
3636
},
3737
"scripts": {
38-
"build": "run-p build:rollup build:types && yarn build:extras",
38+
"build": "run-p build:pack build:types && yarn build:extras",
3939
"build:dev": "run-s build",
4040
"build:extras": "yarn build:plugin",
4141
"build:plugin": "tsc -p tsconfig.plugin.json",
42+
"build:pack": "run-p build:rollup build:plugin",
4243
"build:rollup": "rollup -c rollup.npm.config.js",
4344
"build:types": "tsc -p tsconfig.types.json",
44-
"build:watch": "run-p build:rollup:watch build:types:watch",
45+
"build:watch": "run-p build:pack:watch build:types:watch",
4546
"build:dev:watch": "run-s build:watch",
46-
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
47+
"build:pack:watch": "rollup -c rollup.npm.config.js --watch",
4748
"build:types:watch": "tsc -p tsconfig.types.json --watch",
48-
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
49+
"build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
4950
"circularDepCheck": "madge --circular src/index.ts",
5051
"clean": "rimraf build coverage *.d.ts sentry-gatsby-*.tgz",
5152
"fix": "run-s fix:eslint fix:prettier",

packages/hub/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
"tslib": "^1.9.3"
2323
},
2424
"scripts": {
25-
"build": "run-p build:rollup build:types",
25+
"build": "run-p build:pack build:types",
2626
"build:dev": "run-s build",
27-
"build:rollup": "rollup -c rollup.npm.config.js",
27+
"build:pack": "rollup -c rollup.npm.config.js",
2828
"build:types": "tsc -p tsconfig.types.json",
29-
"build:watch": "run-p build:rollup:watch build:types:watch",
29+
"build:watch": "run-p build:pack:watch build:types:watch",
3030
"build:dev:watch": "run-s build:watch",
31-
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
31+
"build:pack:watch": "rollup -c rollup.npm.config.js --watch",
3232
"build:types:watch": "tsc -p tsconfig.types.json --watch",
33-
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
33+
"build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
3434
"circularDepCheck": "madge --circular src/index.ts",
3535
"clean": "rimraf build coverage sentry-hub-*.tgz",
3636
"fix": "run-s fix:eslint fix:prettier",

packages/integrations/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
"chai": "^4.1.2"
2626
},
2727
"scripts": {
28-
"build": "run-p build:rollup build:types build:bundle",
28+
"build": "run-p build:pack build:types build:bundle",
2929
"build:bundle": "ts-node scripts/buildBundles.ts",
30-
"build:dev": "run-p build:rollup build:types",
31-
"build:rollup": "rollup -c rollup.npm.config.js",
30+
"build:dev": "run-p build:pack build:types",
31+
"build:pack": "rollup -c rollup.npm.config.js",
3232
"build:types": "tsc -p tsconfig.types.json",
33-
"build:watch": "run-p build:rollup:watch build:types:watch",
33+
"build:watch": "run-p build:pack:watch build:types:watch",
3434
"build:dev:watch": "run-s build:watch",
35-
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
35+
"build:pack:watch": "rollup -c rollup.npm.config.js --watch",
3636
"build:types:watch": "tsc -p tsconfig.types.json --watch",
37-
"build:npm": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
37+
"build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
3838
"circularDepCheck": "madge --circular src/index.ts",
3939
"clean": "rimraf build coverage .rpt2_cache sentry-integrations-*.tgz",
4040
"fix": "run-s fix:eslint fix:prettier",

packages/nextjs/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@
4848
}
4949
},
5050
"scripts": {
51-
"build": "run-p build:rollup build:types",
51+
"build": "run-p build:pack build:types",
5252
"build:dev": "run-s build",
53-
"build:rollup": "ts-node scripts/buildRollup.ts",
53+
"build:pack": "ts-node scripts/buildRollup.ts",
5454
"build:types": "tsc -p tsconfig.types.json",
55-
"build:watch": "run-p build:rollup:watch build:types:watch",
55+
"build:watch": "run-p build:pack:watch build:types:watch",
5656
"build:dev:watch": "run-s build:watch",
57-
"build:rollup:watch": "nodemon --ext ts --watch src scripts/buildRollup.ts",
57+
"build:pack:watch": "nodemon --ext ts --watch src scripts/buildRollup.ts",
5858
"build:types:watch": "tsc -p tsconfig.types.json --watch",
59-
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
59+
"build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
6060
"circularDepCheck": "madge --circular src/index.client.ts && madge --circular --exclude 'config/types\\.ts' src/index.server.ts # see https://github.com/pahen/madge/issues/306",
6161
"clean": "rimraf build coverage sentry-nextjs-*.tgz",
6262
"fix": "run-s fix:eslint fix:prettier",

packages/node/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@
3333
"nock": "^13.0.5"
3434
},
3535
"scripts": {
36-
"build": "run-p build:rollup build:types",
36+
"build": "run-p build:pack build:types",
3737
"build:dev": "run-s build",
38-
"build:rollup": "rollup -c rollup.npm.config.js",
38+
"build:pack": "rollup -c rollup.npm.config.js",
3939
"build:types": "tsc -p tsconfig.types.json",
40-
"build:watch": "run-p build:rollup:watch build:types:watch",
40+
"build:watch": "run-p build:pack:watch build:types:watch",
4141
"build:dev:watch": "run-s build:watch",
42-
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
42+
"build:pack:watch": "rollup -c rollup.npm.config.js --watch",
4343
"build:types:watch": "tsc -p tsconfig.types.json --watch",
44-
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
44+
"build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
4545
"circularDepCheck": "madge --circular src/index.ts",
4646
"clean": "rimraf build coverage sentry-node-*.tgz",
4747
"fix": "run-s fix:eslint fix:prettier",

packages/opentelemetry-node/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
"@sentry/node": "7.26.0"
3737
},
3838
"scripts": {
39-
"build": "run-p build:rollup build:types",
39+
"build": "run-p build:pack build:types",
4040
"build:dev": "run-s build",
41-
"build:rollup": "rollup -c rollup.npm.config.js",
41+
"build:pack": "rollup -c rollup.npm.config.js",
4242
"build:types": "tsc -p tsconfig.types.json",
43-
"build:watch": "run-p build:rollup:watch build:types:watch",
43+
"build:watch": "run-p build:pack:watch build:types:watch",
4444
"build:dev:watch": "run-s build:watch",
45-
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
45+
"build:pack:watch": "rollup -c rollup.npm.config.js --watch",
4646
"build:types:watch": "tsc -p tsconfig.types.json --watch",
47-
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
47+
"build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
4848
"circularDepCheck": "madge --circular src/index.ts",
4949
"clean": "rimraf build coverage sentry-node-*.tgz",
5050
"fix": "run-s fix:eslint fix:prettier",

packages/react/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@
5151
"redux": "^4.0.5"
5252
},
5353
"scripts": {
54-
"build": "run-p build:rollup build:types",
54+
"build": "run-p build:pack build:types",
5555
"build:dev": "run-s build",
56-
"build:rollup": "rollup -c rollup.npm.config.js",
56+
"build:pack": "rollup -c rollup.npm.config.js",
5757
"build:types": "tsc -p tsconfig.types.json",
58-
"build:watch": "run-p build:rollup:watch build:types:watch",
58+
"build:watch": "run-p build:pack:watch build:types:watch",
5959
"build:dev:watch": "run-s build:watch",
60-
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
60+
"build:pack:watch": "rollup -c rollup.npm.config.js --watch",
6161
"build:types:watch": "tsc -p tsconfig.types.json --watch",
62-
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
62+
"build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
6363
"circularDepCheck": "madge --circular src/index.ts",
6464
"clean": "rimraf build coverage sentry-react-*.tgz",
6565
"fix": "run-s fix:eslint fix:prettier",

packages/remix/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@
4444
"react": "16.x || 17.x || 18.x"
4545
},
4646
"scripts": {
47-
"build": "run-p build:rollup build:types",
47+
"build": "run-p build:pack build:types",
4848
"build:dev": "run-s build",
49-
"build:rollup": "rollup -c rollup.npm.config.js",
49+
"build:pack": "rollup -c rollup.npm.config.js",
5050
"build:types": "tsc -p tsconfig.types.json",
51-
"build:watch": "run-p build:rollup:watch build:types:watch",
51+
"build:watch": "run-p build:pack:watch build:types:watch",
5252
"build:dev:watch": "run-s build:watch",
53-
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
53+
"build:pack:watch": "rollup -c rollup.npm.config.js --watch",
5454
"build:types:watch": "tsc -p tsconfig.types.json --watch",
55-
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
55+
"build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
5656
"circularDepCheck": "madge --circular src/index.server.ts",
5757
"clean": "rimraf build coverage sentry-remix-*.tgz",
5858
"fix": "run-s fix:eslint fix:prettier",

packages/replay/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"sideEffects": false,
99
"scripts": {
1010
"build": "run-s build:worker && run-p build:core build:types build:bundle",
11-
"build:rollup": "run-s build:worker build:core",
11+
"build:pack": "run-s build:worker build:core",
1212
"build:bundle": "rollup -c rollup.bundle.config.js",
13-
"build:dev": "run-p build:worker build:rollup build:types",
13+
"build:dev": "run-p build:worker build:pack build:types",
1414
"build:worker": "rollup -c rollup.config.worker.js",
1515
"build:core": "rollup -c rollup.npm.config.js",
1616
"build:types": "tsc -p tsconfig.types.json",
@@ -20,7 +20,7 @@
2020
"build:worker:watch": "yarn build:worker --watch",
2121
"build:bundle:watch": "yarn build:bundle --watch",
2222
"build:types:watch": "tsc -p tsconfig.types.json --watch",
23-
"build:npm": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
23+
"build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
2424
"circularDepCheck": "madge --circular src/index.ts",
2525
"clean": "rimraf build sentry-replay-*.tgz",
2626
"fix": "run-s fix:eslint fix:prettier",

0 commit comments

Comments
 (0)