From 6af71b86084175bc30224a1faf36df68754f8f3e Mon Sep 17 00:00:00 2001 From: Nathaniel Tucker Date: Fri, 24 Nov 2023 12:02:11 +0000 Subject: [PATCH] internal: Update workspace scripts for yarn 4 --- .github/workflows/benchmark.yml | 2 +- package.json | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 7d1e30b109dc..2071774a56da 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -38,7 +38,7 @@ jobs: yarn install --immutable - name: Build packages run: | - NODE_ENV=production BROWSERSLIST_ENV=modern yarn workspaces foreach -ptivR --from @data-client/core run build:lib && NODE_ENV=production BROWSERSLIST_ENV=modern yarn workspaces foreach -ptivR --from @data-client/endpoint run build:lib + NODE_ENV=production BROWSERSLIST_ENV=modern yarn workspaces foreach -WptivR --from @data-client/core run build:lib && NODE_ENV=production BROWSERSLIST_ENV=modern yarn workspaces foreach -WptivR --from @data-client/endpoint run build:lib - name: Run benchmark run: yarn workspace example-benchmark build && yarn workspace example-benchmark start | tee output.txt diff --git a/package.json b/package.json index 89015cff2add..9b2c33ce69da 100644 --- a/package.json +++ b/package.json @@ -13,12 +13,12 @@ "lint": "eslint --ext .ts,.tsx,.js", "format": "eslint --fix \"packages/*/src/**/*.{js,ts,tsx,cts}\"", "clean:types": "rimraf packages/*/*.tsbuildinfo", - "build": "yarn build:types && yarn workspaces foreach -ptiv --no-private run build", - "build:bundle": "yarn workspaces foreach -ptiv --no-private run build:bundle", - "build:clean": "yarn workspaces foreach -pti --no-private run build:clean", - "build:types": "yarn build:copy:ambient && tsc --build && yarn workspaces foreach -pti --no-private run build:legacy-types", - "ci:build:types": "yarn build:copy:ambient && tsc --build && yarn workspaces foreach -ptivR --from @data-client/react --from @data-client/rest --from @data-client/graphql --from @data-client/hooks run build:legacy-types", - "ci:build": "yarn workspaces foreach -ptivR --from @data-client/react --from @data-client/rest --from @data-client/graphql --from @data-client/hooks --from @data-client/test run build:lib && yarn workspace @data-client/test run build:bundle && yarn workspace @data-client/normalizr run build:js:node && yarn workspace @data-client/endpoint run build:js:node", + "build": "yarn build:types && yarn workspaces foreach -Wptiv --no-private run build", + "build:bundle": "yarn workspaces foreach -Wptiv --no-private run build:bundle", + "build:clean": "yarn workspaces foreach -Wpti --no-private run build:clean", + "build:types": "yarn build:copy:ambient && tsc --build && yarn workspaces foreach -Wpti --no-private run build:legacy-types", + "ci:build:types": "yarn build:copy:ambient && tsc --build && yarn workspaces foreach -WptivR --from @data-client/react --from @data-client/rest --from @data-client/graphql --from @data-client/hooks run build:legacy-types", + "ci:build": "yarn workspaces foreach -WptivR --from @data-client/react --from @data-client/rest --from @data-client/graphql --from @data-client/hooks --from @data-client/test run build:lib && yarn workspace @data-client/test run build:bundle && yarn workspace @data-client/normalizr run build:js:node && yarn workspace @data-client/endpoint run build:js:node", "build:copy:ambient": "mkdirp ./packages/endpoint/lib && copyfiles --flat ./packages/endpoint/src/schema.d.ts ./packages/endpoint/lib/ && copyfiles --flat ./packages/endpoint/src/endpoint.d.ts ./packages/endpoint/lib/ && copyfiles --flat ./packages/rest/src/RestEndpoint.d.ts ./packages/rest/lib && copyfiles --flat ./packages/rest/src/next/RestEndpoint.d.ts ./packages/rest/lib/next", "copy:websitetypes": "./scripts/copywebsitetypes.sh", "test": "NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest", @@ -26,7 +26,7 @@ "test:coverage": "yarn test --coverage", "prepare": "yarn build:copy:ambient && tsc --build", "prepack": "yarn prepare", - "prepublishOnly": "yarn workspaces foreach -pti --no-private run build:legacy-types", + "prepublishOnly": "yarn workspaces foreach -Wpti --no-private run build:legacy-types", "g:babel": "cd $INIT_CWD && babel --root-mode upward src --source-maps inline --extensions '.ts,.tsx,.cts,.js' --ignore '**/__tests__/**' --ignore '**/*.d.ts'", "g:babel-lite": "cd $INIT_CWD && babel --root-mode upward src --source-maps inline --ignore '**/__tests__/**' --ignore '**/*.d.ts'", "g:rollup": "cd $INIT_CWD && rollup -c",