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

0 commit comments

Comments
 (0)