Skip to content

Commit

Permalink
chore: reduce number of things turbo builds for build (#9046)
Browse files Browse the repository at this point in the history
* chore: reduce number of things turbo builds for build

* fix
  • Loading branch information
runspired authored Oct 24, 2023
1 parent 79931ff commit 26c396f
Show file tree
Hide file tree
Showing 20 changed files with 54 additions and 31 deletions.
20 changes: 11 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@ dist
dist-*
tmp
unstable-preview-types
packages/tracking/addon
packages/request/addon
packages/store/addon
# packages/-ember-data/addon
packages/active-record/addon
packages/adapter/addon
packages/serializer/addon
packages/model/addon
packages/json-api/addon
packages/core-types/addon
packages/data-worker/addon
# packages/debug/addon
packages/graph/addon
packages/json-api/addon
packages/legacy-compat/addon
packages/model/addon
packages/request-utils/addon
packages/request/addon
packages/rest/addon
packages/active-record/addon
packages/data-worker/addon
packages/schema-record/addon/
packages/core-types/addon
packages/serializer/addon
packages/store/addon
packages/tracking/addon

# dependencies
bower_components
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"url": "git+ssh://[email protected]:emberjs/data.git"
},
"scripts": {
"takeoff": "FORCE_COLOR=2 pnpm install --reporter=append-only",
"prepare": "pnpm build",
"build": "pnpm turbo build --filter=./packages/*",
"build": "turbo _build --log-order=stream --filter=./packages/*",
"build:docs": "mkdir -p packages/-ember-data/dist && cd ./docs-generator && node ./compile-docs.js",
"lint": "pnpm run -r --workspace-concurrency=-1 --if-present lint",
"preinstall": "npx only-allow pnpm",
Expand Down
2 changes: 1 addition & 1 deletion packages/-ember-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"move-dts": "bun ../../scripts/copy-declarations.mjs addon",
"build:types": "tsc --build --force",
"build": "pnpm build:types && pnpm move-dts",
"_build": "pnpm build:types && pnpm move-dts",
"prepack": "pnpm build && cd ../../ && pnpm build:docs",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/active-record/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:types": "tsc --build --force",
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:types": "tsc --build --force",
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:types": "tsc --build --force",
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/diagnostic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"build:tests": "rm -rf dist-test && cp -R test dist-test && mkdir -p dist-test/@warp-drive && cp -R dist dist-test/@warp-drive/diagnostic",
"build:types": "tsc --build --force",
"build:runtime": "rollup --config",
"build": "pnpm build:runtime && pnpm build:types",
"_build": "pnpm build:runtime && pnpm build:types",
"start": "rollup --config --watch",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
Expand Down
2 changes: 1 addition & 1 deletion packages/graph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:types": "tsc --build --force",
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/holodeck/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"scripts": {
"build:types": "tsc --build --force",
"build:client": "rollup --config",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"start": "rollup --config --watch",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
Expand Down
2 changes: 1 addition & 1 deletion packages/json-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:types": "tsc --build --force",
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:types": "tsc --build --force",
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"move-dts": "bun ../../scripts/copy-declarations.mjs src",
"build:types": "tsc --build --force && pnpm move-dts",
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/request-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:types": "tsc --build --force",
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:types": "tsc --build --force",
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:types": "tsc --build --force",
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/schema-record/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "",
"scripts": {
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client",
"_build": "pnpm build:client",
"start": "rollup --config --watch",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
Expand Down
2 changes: 1 addition & 1 deletion packages/serializer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:types": "tsc --build --force",
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build": "pnpm build:client && pnpm build:types",
"_build": "pnpm build:client && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:runtime": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build:types": "tsc --build --force",
"build": "pnpm build:runtime && pnpm build:types",
"_build": "pnpm build:runtime && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/tracking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs",
"build:runtime": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
"build:types": "tsc --build --force",
"build": "pnpm build:runtime && pnpm build:types",
"_build": "pnpm build:runtime && pnpm build:types",
"prepack": "pnpm build",
"_syncPnpm": "pnpm sync-dependencies-meta-injected"
},
Expand Down
28 changes: 24 additions & 4 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/////////////////////////////////////////////////
/////////////////////////////////////////////////
"start": {
"dependsOn": ["_syncPnpm", "^build"],
"dependsOn": ["_syncPnpm", "^_build"],
"outputs": [],
"cache": false,
"persistent": true
Expand All @@ -30,6 +30,26 @@
//
/////////////////////////////////////////////////
/////////////////////////////////////////////////
"_build": {
"inputs": [
// + V2-Addon convention
"src/**",
"addon-main.*",
"tsconfig.json",
"babel.*",
"rollup-config.*"
],
"outputs": [
// V1-Addon convention
"addon/**",
"addon-test-support/**",
// V2-Addon convention
"dist/**",
"declarations/**",
"unstable-preview-types/**"
],
"dependsOn": ["_syncPnpm"]
},
"build": {
"inputs": [
// + V2-Addon convention
Expand Down Expand Up @@ -72,7 +92,7 @@
"declarations/**",
"unstable-preview-types/**"
],
"dependsOn": ["_syncPnpm", "^build"]
"dependsOn": ["_syncPnpm", "^_build"]
},
"build:production": {
"inputs": [
Expand All @@ -93,11 +113,11 @@
"dist-test/**",
"declarations/**"
],
"dependsOn": ["_syncPnpm", "^build"]
"dependsOn": ["_syncPnpm", "^_build"]
},
// See: https://github.com/pnpm/pnpm/issues/4965
"_syncPnpm": {
"dependsOn": ["^build"],
"dependsOn": ["^_build"],
"cache": false
},
"test": {
Expand Down

0 comments on commit 26c396f

Please sign in to comment.