From 3a4a804ff7803e9349f5a5e69cb0166105066dd4 Mon Sep 17 00:00:00 2001 From: Alex Sanders Date: Wed, 8 May 2024 13:53:18 +0100 Subject: [PATCH 1/6] =?UTF-8?q?`nx`=20=E2=86=92=20`wireit`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/dependabot.yml | 8 - .github/labeler.yml | 2 +- .github/workflows/canaries.yml | 1 - .github/workflows/changesets.yml | 3 +- .github/workflows/chromatic.yml | 2 - .github/workflows/ci.yml | 7 - .nxignore | 2 - Makefile | 229 +++-- README.md | 31 +- apps/github-pages/package.json | 13 +- configs/jest.config.js | 3 - libs/@guardian/ab-core/.eslintrc.cjs | 1 + libs/@guardian/ab-core/package.json | 113 +- libs/@guardian/ab-react/.eslintrc.cjs | 1 + libs/@guardian/ab-react/package.json | 113 +- .../browserslist-config/.eslintrc.cjs | 1 + .../browserslist-config/package.json | 43 +- libs/@guardian/cobalt-plugin-ts/.eslintrc.cjs | 1 + libs/@guardian/cobalt-plugin-ts/package.json | 43 +- libs/@guardian/core-web-vitals/.eslintrc.cjs | 1 + libs/@guardian/core-web-vitals/package.json | 113 +- libs/@guardian/design-tokens/.eslintrc.cjs | 1 + libs/@guardian/design-tokens/README.md | 2 +- libs/@guardian/design-tokens/package.json | 68 +- .../eslint-config-typescript/.eslintrc.cjs | 1 + .../eslint-config-typescript/package.json | 43 +- libs/@guardian/eslint-config/.eslintrc.cjs | 1 + libs/@guardian/eslint-config/package.json | 43 +- .../.eslintrc.cjs | 1 + .../package.json | 110 +- .../.eslintrc.cjs | 1 + .../package.json | 113 +- .../identity-auth-frontend/.eslintrc.cjs | 1 + .../identity-auth-frontend/package.json | 125 ++- libs/@guardian/identity-auth/.eslintrc.cjs | 1 + libs/@guardian/identity-auth/package.json | 107 +- libs/@guardian/libs/.eslintrc.cjs | 1 + libs/@guardian/libs/package.json | 115 ++- libs/@guardian/newsletter-types/.eslintrc.cjs | 1 + libs/@guardian/newsletter-types/package.json | 81 +- .../newsletter-types/rollup.config.js | 4 +- libs/@guardian/prettier/.eslintrc.cjs | 1 + libs/@guardian/prettier/package.json | 43 +- .../source-foundations/.eslintrc.cjs | 2 +- .../@guardian/source-foundations/package.json | 147 +-- .../.eslintrc.cjs | 2 +- .../package.json | 114 ++- .../source-react-components/.eslintrc.cjs | 1 + .../source-react-components/package.json | 106 +- libs/@guardian/tsconfig/.eslintrc.cjs | 1 + libs/@guardian/tsconfig/package.json | 43 +- nx.json | 73 -- package.json | 10 +- pnpm-lock.yaml | 965 +----------------- tools/scripts/lib/get-tasks.mjs | 8 +- tools/scripts/maintain-makefile/index.mjs | 7 +- .../maintain-readme/get-cached-tasks.mjs | 24 - tools/scripts/maintain-readme/index.mjs | 8 - 58 files changed, 1139 insertions(+), 1967 deletions(-) delete mode 100644 .nxignore delete mode 100644 nx.json delete mode 100644 tools/scripts/maintain-readme/get-cached-tasks.mjs diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1c3b53870..7ec3662b7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -37,11 +37,6 @@ updates: babel: patterns: - '@babel/*' - nx: - patterns: - - '@nx*' - - '@nrwl*' - - 'nx*' eslint: patterns: - '*eslint*' @@ -74,9 +69,6 @@ updates: - '@storybook*' - 'storybook' - '@babel*' - - '@nx*' - - '@nrwl*' - - 'nx*' - '*eslint*' - '@rollup*' - 'rollup' diff --git a/.github/labeler.yml b/.github/labeler.yml index 8f6e7a339..4f0734d08 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -8,7 +8,7 @@ - any-glob-to-any-file: 'libs/@csnx/**/*' 🛠 workspace: - changed-files: - - any-glob-to-any-file: ['nx.json', 'workspace.json', 'tools/**/*'] + - any-glob-to-any-file: ['tools/**/*'] # individual npm packages '@guardian/ab-core': diff --git a/.github/workflows/canaries.yml b/.github/workflows/canaries.yml index abf2b0bbf..453bb8261 100644 --- a/.github/workflows/canaries.yml +++ b/.github/workflows/canaries.yml @@ -21,7 +21,6 @@ jobs: # generate changelogs with the correct commits fetch-depth: 0 - - uses: nrwl/nx-set-shas@v4 - uses: ./.github/actions/setup-node-env - name: Version diff --git a/.github/workflows/changesets.yml b/.github/workflows/changesets.yml index 4123c288a..b068bf83a 100644 --- a/.github/workflows/changesets.yml +++ b/.github/workflows/changesets.yml @@ -25,10 +25,9 @@ jobs: # generate changelogs with the correct commits fetch-depth: 0 - - uses: nrwl/nx-set-shas@v4 - uses: ./.github/actions/setup-node-env - - run: pnpm nx run-many --target=build --all=true + - run: make build # down to business... - name: Use GitHub App Token diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index e5b20a6f1..e23ed9701 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -31,8 +31,6 @@ jobs: - uses: ./.github/actions/setup-node-env - # This will just retrieve the output from Nx's build cache. - # It's simpler than using github actions cache. - run: make build:storybooks - uses: chromaui/action@v11 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27e8dfe49..bd5f3d239 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,6 @@ on: pull_request: types: [opened, synchronize] -env: - # The `accessToken` in `nx.json` is a read-only token for use in dev. - # This overrides it with a read-write token so that CI run results are - # remotely cached. - NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - jobs: validate: runs-on: ubuntu-latest @@ -30,7 +24,6 @@ jobs: with: fetch-depth: 0 - - uses: nrwl/nx-set-shas@v4 - uses: ./.github/actions/setup-node-env - run: make ${{ matrix.task }} diff --git a/.nxignore b/.nxignore deleted file mode 100644 index c2227bbb7..000000000 --- a/.nxignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.wireit diff --git a/Makefile b/Makefile index 9ec41f182..8e0c0a06d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ # standardise on a shell export SHELL := /usr/bin/env bash + ################################## DEFAULT TARGET ############################## # lists available `make` targets @@ -21,7 +22,7 @@ storybooks: env .PHONY: dev dev: env $(call log,"Starting dev tasks") - @corepack pnpm nx run-many --target=dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm -r --parallel dev ################################# CODE QUALITY ################################# @@ -29,25 +30,25 @@ dev: env .PHONY: test test: env $(call log,"Running unit tests") - @corepack pnpm nx run-many --target=test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm -r test # runs the e2e tests for all projects .PHONY: e2e e2e: env $(call log,"Running e2e tests") - @corepack pnpm nx run-many --target=e2e --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm -r e2e # runs unit tests against dist for all projects .PHONY: verify-dist verify-dist: env $(call log,"Running unit tests against dist") - @corepack pnpm nx run-many --target=verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm -r verify-dist # checks all projects for lint errors .PHONY: lint lint: install $(call log,"Linting projects") - @corepack pnpm nx run-many --target=lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm -r lint @node ./tools/scripts/check-packages-for-tslib.mjs # check repo for formatting errors @@ -60,26 +61,28 @@ formatting\:check: install .PHONY: fix fix: install $(call log,"Attempting to fix issues across all projects") - @corepack pnpm nx run-many --target=fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm -r fix @corepack pnpm prettier --ignore-unknown --cache --write . # makes sure absolutely everything is working .PHONY: validate -validate: env clean lint test e2e build verify-dist build\:storybooks +validate: env lint test e2e build verify-dist build\:storybooks ##################################### BUILD #################################### -# removes all build artifacts +# removes all build artifacts and task caches .PHONY: clean -clean: env - $(call log,"Cleaning all build assets") - @rm -rf dist/** +clean: + $(call log,"Clearing all task caches") + @find . -type d \( -path '*/node_modules*' -prune \) \ + -o \( -type d \( -name 'dist' -o -name '.wireit' \) \ + -exec rm -rf {} + \) # builds all projects .PHONY: build -build: env clean +build: env $(call log,"Building projects") - @corepack pnpm nx run-many --target=build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm -r build # builds all storybooks .PHONY: build\:storybooks @@ -128,7 +131,7 @@ install: check-node-version # # IT IS AUTOGENERATED BY tools/scripts/maintain-makefile/index.mjs # -# It enables running the relevant npm-scripts/Nx targets wrapped in the +# It enables running the relevant npm-scripts wrapped in the # standardised Makefile prerequisites. # # It also enables us to abstract away things like package manager vendor/version @@ -136,271 +139,271 @@ install: check-node-version .PHONY: @guardian/ab-core\:build @guardian/ab-core\:build: env - @corepack pnpm nx run @guardian/ab-core:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-core build .PHONY: @guardian/ab-core\:dev @guardian/ab-core\:dev: env - @corepack pnpm nx run @guardian/ab-core:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-core dev .PHONY: @guardian/ab-core\:fix @guardian/ab-core\:fix: env - @corepack pnpm nx run @guardian/ab-core:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-core fix .PHONY: @guardian/ab-core\:lint @guardian/ab-core\:lint: env - @corepack pnpm nx run @guardian/ab-core:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-core lint .PHONY: @guardian/ab-core\:test @guardian/ab-core\:test: env - @corepack pnpm nx run @guardian/ab-core:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-core test .PHONY: @guardian/ab-core\:verify-dist @guardian/ab-core\:verify-dist: env - @corepack pnpm nx run @guardian/ab-core:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-core verify-dist .PHONY: @guardian/ab-react\:build @guardian/ab-react\:build: env - @corepack pnpm nx run @guardian/ab-react:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-react build .PHONY: @guardian/ab-react\:dev @guardian/ab-react\:dev: env - @corepack pnpm nx run @guardian/ab-react:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-react dev .PHONY: @guardian/ab-react\:fix @guardian/ab-react\:fix: env - @corepack pnpm nx run @guardian/ab-react:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-react fix .PHONY: @guardian/ab-react\:lint @guardian/ab-react\:lint: env - @corepack pnpm nx run @guardian/ab-react:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-react lint .PHONY: @guardian/ab-react\:test @guardian/ab-react\:test: env - @corepack pnpm nx run @guardian/ab-react:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-react test .PHONY: @guardian/ab-react\:verify-dist @guardian/ab-react\:verify-dist: env - @corepack pnpm nx run @guardian/ab-react:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/ab-react verify-dist .PHONY: @guardian/browserslist-config\:fix @guardian/browserslist-config\:fix: env - @corepack pnpm nx run @guardian/browserslist-config:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/browserslist-config fix .PHONY: @guardian/browserslist-config\:lint @guardian/browserslist-config\:lint: env - @corepack pnpm nx run @guardian/browserslist-config:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/browserslist-config lint .PHONY: @guardian/browserslist-config\:update-readme @guardian/browserslist-config\:update-readme: env - @corepack pnpm nx run @guardian/browserslist-config:update-readme --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/browserslist-config update-readme .PHONY: @guardian/cobalt-plugin-ts\:fix @guardian/cobalt-plugin-ts\:fix: env - @corepack pnpm nx run @guardian/cobalt-plugin-ts:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/cobalt-plugin-ts fix .PHONY: @guardian/cobalt-plugin-ts\:lint @guardian/cobalt-plugin-ts\:lint: env - @corepack pnpm nx run @guardian/cobalt-plugin-ts:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/cobalt-plugin-ts lint .PHONY: @guardian/core-web-vitals\:build @guardian/core-web-vitals\:build: env - @corepack pnpm nx run @guardian/core-web-vitals:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/core-web-vitals build .PHONY: @guardian/core-web-vitals\:dev @guardian/core-web-vitals\:dev: env - @corepack pnpm nx run @guardian/core-web-vitals:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/core-web-vitals dev .PHONY: @guardian/core-web-vitals\:fix @guardian/core-web-vitals\:fix: env - @corepack pnpm nx run @guardian/core-web-vitals:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/core-web-vitals fix .PHONY: @guardian/core-web-vitals\:lint @guardian/core-web-vitals\:lint: env - @corepack pnpm nx run @guardian/core-web-vitals:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/core-web-vitals lint .PHONY: @guardian/core-web-vitals\:test @guardian/core-web-vitals\:test: env - @corepack pnpm nx run @guardian/core-web-vitals:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/core-web-vitals test .PHONY: @guardian/core-web-vitals\:verify-dist @guardian/core-web-vitals\:verify-dist: env - @corepack pnpm nx run @guardian/core-web-vitals:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/core-web-vitals verify-dist .PHONY: @guardian/design-tokens\:build @guardian/design-tokens\:build: env - @corepack pnpm nx run @guardian/design-tokens:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/design-tokens build .PHONY: @guardian/design-tokens\:fix @guardian/design-tokens\:fix: env - @corepack pnpm nx run @guardian/design-tokens:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/design-tokens fix .PHONY: @guardian/design-tokens\:lint @guardian/design-tokens\:lint: env - @corepack pnpm nx run @guardian/design-tokens:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/design-tokens lint .PHONY: @guardian/eslint-config\:fix @guardian/eslint-config\:fix: env - @corepack pnpm nx run @guardian/eslint-config:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-config fix .PHONY: @guardian/eslint-config\:lint @guardian/eslint-config\:lint: env - @corepack pnpm nx run @guardian/eslint-config:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-config lint .PHONY: @guardian/eslint-config-typescript\:fix @guardian/eslint-config-typescript\:fix: env - @corepack pnpm nx run @guardian/eslint-config-typescript:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-config-typescript fix .PHONY: @guardian/eslint-config-typescript\:lint @guardian/eslint-config-typescript\:lint: env - @corepack pnpm nx run @guardian/eslint-config-typescript:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-config-typescript lint .PHONY: @guardian/eslint-plugin-source-foundations\:build @guardian/eslint-plugin-source-foundations\:build: env - @corepack pnpm nx run @guardian/eslint-plugin-source-foundations:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-foundations build .PHONY: @guardian/eslint-plugin-source-foundations\:dev @guardian/eslint-plugin-source-foundations\:dev: env - @corepack pnpm nx run @guardian/eslint-plugin-source-foundations:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-foundations dev .PHONY: @guardian/eslint-plugin-source-foundations\:fix @guardian/eslint-plugin-source-foundations\:fix: env - @corepack pnpm nx run @guardian/eslint-plugin-source-foundations:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-foundations fix .PHONY: @guardian/eslint-plugin-source-foundations\:lint @guardian/eslint-plugin-source-foundations\:lint: env - @corepack pnpm nx run @guardian/eslint-plugin-source-foundations:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-foundations lint .PHONY: @guardian/eslint-plugin-source-foundations\:test @guardian/eslint-plugin-source-foundations\:test: env - @corepack pnpm nx run @guardian/eslint-plugin-source-foundations:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-foundations test .PHONY: @guardian/eslint-plugin-source-foundations\:verify-dist @guardian/eslint-plugin-source-foundations\:verify-dist: env - @corepack pnpm nx run @guardian/eslint-plugin-source-foundations:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-foundations verify-dist .PHONY: @guardian/eslint-plugin-source-react-components\:build @guardian/eslint-plugin-source-react-components\:build: env - @corepack pnpm nx run @guardian/eslint-plugin-source-react-components:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-react-components build .PHONY: @guardian/eslint-plugin-source-react-components\:dev @guardian/eslint-plugin-source-react-components\:dev: env - @corepack pnpm nx run @guardian/eslint-plugin-source-react-components:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-react-components dev .PHONY: @guardian/eslint-plugin-source-react-components\:fix @guardian/eslint-plugin-source-react-components\:fix: env - @corepack pnpm nx run @guardian/eslint-plugin-source-react-components:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-react-components fix .PHONY: @guardian/eslint-plugin-source-react-components\:lint @guardian/eslint-plugin-source-react-components\:lint: env - @corepack pnpm nx run @guardian/eslint-plugin-source-react-components:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-react-components lint .PHONY: @guardian/eslint-plugin-source-react-components\:test @guardian/eslint-plugin-source-react-components\:test: env - @corepack pnpm nx run @guardian/eslint-plugin-source-react-components:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-react-components test .PHONY: @guardian/eslint-plugin-source-react-components\:verify-dist @guardian/eslint-plugin-source-react-components\:verify-dist: env - @corepack pnpm nx run @guardian/eslint-plugin-source-react-components:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/eslint-plugin-source-react-components verify-dist .PHONY: @guardian/identity-auth\:build @guardian/identity-auth\:build: env - @corepack pnpm nx run @guardian/identity-auth:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth build .PHONY: @guardian/identity-auth\:dev @guardian/identity-auth\:dev: env - @corepack pnpm nx run @guardian/identity-auth:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth dev .PHONY: @guardian/identity-auth\:fix @guardian/identity-auth\:fix: env - @corepack pnpm nx run @guardian/identity-auth:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth fix .PHONY: @guardian/identity-auth\:lint @guardian/identity-auth\:lint: env - @corepack pnpm nx run @guardian/identity-auth:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth lint .PHONY: @guardian/identity-auth\:test @guardian/identity-auth\:test: env - @corepack pnpm nx run @guardian/identity-auth:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth test .PHONY: @guardian/identity-auth\:verify-dist @guardian/identity-auth\:verify-dist: env - @corepack pnpm nx run @guardian/identity-auth:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth verify-dist .PHONY: @guardian/identity-auth-frontend\:build @guardian/identity-auth-frontend\:build: env - @corepack pnpm nx run @guardian/identity-auth-frontend:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth-frontend build .PHONY: @guardian/identity-auth-frontend\:dev @guardian/identity-auth-frontend\:dev: env - @corepack pnpm nx run @guardian/identity-auth-frontend:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth-frontend dev .PHONY: @guardian/identity-auth-frontend\:fix @guardian/identity-auth-frontend\:fix: env - @corepack pnpm nx run @guardian/identity-auth-frontend:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth-frontend fix .PHONY: @guardian/identity-auth-frontend\:lint @guardian/identity-auth-frontend\:lint: env - @corepack pnpm nx run @guardian/identity-auth-frontend:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth-frontend lint .PHONY: @guardian/identity-auth-frontend\:test @guardian/identity-auth-frontend\:test: env - @corepack pnpm nx run @guardian/identity-auth-frontend:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth-frontend test .PHONY: @guardian/identity-auth-frontend\:verify-dist @guardian/identity-auth-frontend\:verify-dist: env - @corepack pnpm nx run @guardian/identity-auth-frontend:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/identity-auth-frontend verify-dist .PHONY: @guardian/libs\:build @guardian/libs\:build: env - @corepack pnpm nx run @guardian/libs:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/libs build .PHONY: @guardian/libs\:dev @guardian/libs\:dev: env - @corepack pnpm nx run @guardian/libs:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/libs dev .PHONY: @guardian/libs\:e2e @guardian/libs\:e2e: env - @corepack pnpm nx run @guardian/libs:e2e --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/libs e2e .PHONY: @guardian/libs\:fix @guardian/libs\:fix: env - @corepack pnpm nx run @guardian/libs:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/libs fix .PHONY: @guardian/libs\:lint @guardian/libs\:lint: env - @corepack pnpm nx run @guardian/libs:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/libs lint .PHONY: @guardian/libs\:test @guardian/libs\:test: env - @corepack pnpm nx run @guardian/libs:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/libs test .PHONY: @guardian/libs\:verify-dist @guardian/libs\:verify-dist: env - @corepack pnpm nx run @guardian/libs:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/libs verify-dist .PHONY: @guardian/newsletter-types\:build @guardian/newsletter-types\:build: env - @corepack pnpm nx run @guardian/newsletter-types:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/newsletter-types build .PHONY: @guardian/newsletter-types\:dev @guardian/newsletter-types\:dev: env - @corepack pnpm nx run @guardian/newsletter-types:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/newsletter-types dev .PHONY: @guardian/newsletter-types\:fix @guardian/newsletter-types\:fix: env - @corepack pnpm nx run @guardian/newsletter-types:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/newsletter-types fix .PHONY: @guardian/newsletter-types\:lint @guardian/newsletter-types\:lint: env - @corepack pnpm nx run @guardian/newsletter-types:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/newsletter-types lint .PHONY: @guardian/prettier\:fix @guardian/prettier\:fix: env - @corepack pnpm nx run @guardian/prettier:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/prettier fix .PHONY: @guardian/prettier\:lint @guardian/prettier\:lint: env - @corepack pnpm nx run @guardian/prettier:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/prettier lint .PHONY: @guardian/source\:build @guardian/source\:build: env @@ -444,130 +447,130 @@ install: check-node-version .PHONY: @guardian/source-foundations\:build @guardian/source-foundations\:build: env - @corepack pnpm nx run @guardian/source-foundations:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-foundations build .PHONY: @guardian/source-foundations\:build-storybook @guardian/source-foundations\:build-storybook: env - @corepack pnpm nx run @guardian/source-foundations:build-storybook --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-foundations build-storybook .PHONY: @guardian/source-foundations\:build-type-presets @guardian/source-foundations\:build-type-presets: env - @corepack pnpm nx run @guardian/source-foundations:build-type-presets --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-foundations build-type-presets .PHONY: @guardian/source-foundations\:dev @guardian/source-foundations\:dev: env - @corepack pnpm nx run @guardian/source-foundations:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-foundations dev .PHONY: @guardian/source-foundations\:fix @guardian/source-foundations\:fix: env - @corepack pnpm nx run @guardian/source-foundations:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-foundations fix .PHONY: @guardian/source-foundations\:lint @guardian/source-foundations\:lint: env - @corepack pnpm nx run @guardian/source-foundations:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-foundations lint .PHONY: @guardian/source-foundations\:storybook @guardian/source-foundations\:storybook: env - @corepack pnpm nx run @guardian/source-foundations:storybook --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-foundations storybook .PHONY: @guardian/source-foundations\:test @guardian/source-foundations\:test: env - @corepack pnpm nx run @guardian/source-foundations:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-foundations test .PHONY: @guardian/source-foundations\:verify-dist @guardian/source-foundations\:verify-dist: env - @corepack pnpm nx run @guardian/source-foundations:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-foundations verify-dist .PHONY: @guardian/source-react-components\:build @guardian/source-react-components\:build: env - @corepack pnpm nx run @guardian/source-react-components:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components build .PHONY: @guardian/source-react-components\:build-storybook @guardian/source-react-components\:build-storybook: env - @corepack pnpm nx run @guardian/source-react-components:build-storybook --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components build-storybook .PHONY: @guardian/source-react-components\:create-icons @guardian/source-react-components\:create-icons: env - @corepack pnpm nx run @guardian/source-react-components:create-icons --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components create-icons .PHONY: @guardian/source-react-components\:dev @guardian/source-react-components\:dev: env - @corepack pnpm nx run @guardian/source-react-components:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components dev .PHONY: @guardian/source-react-components\:fix @guardian/source-react-components\:fix: env - @corepack pnpm nx run @guardian/source-react-components:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components fix .PHONY: @guardian/source-react-components\:lint @guardian/source-react-components\:lint: env - @corepack pnpm nx run @guardian/source-react-components:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components lint .PHONY: @guardian/source-react-components\:storybook @guardian/source-react-components\:storybook: env - @corepack pnpm nx run @guardian/source-react-components:storybook --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components storybook .PHONY: @guardian/source-react-components\:test @guardian/source-react-components\:test: env - @corepack pnpm nx run @guardian/source-react-components:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components test .PHONY: @guardian/source-react-components\:verify-dist @guardian/source-react-components\:verify-dist: env - @corepack pnpm nx run @guardian/source-react-components:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components verify-dist .PHONY: @guardian/source-react-components-development-kitchen\:build @guardian/source-react-components-development-kitchen\:build: env - @corepack pnpm nx run @guardian/source-react-components-development-kitchen:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components-development-kitchen build .PHONY: @guardian/source-react-components-development-kitchen\:build-storybook @guardian/source-react-components-development-kitchen\:build-storybook: env - @corepack pnpm nx run @guardian/source-react-components-development-kitchen:build-storybook --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components-development-kitchen build-storybook .PHONY: @guardian/source-react-components-development-kitchen\:dev @guardian/source-react-components-development-kitchen\:dev: env - @corepack pnpm nx run @guardian/source-react-components-development-kitchen:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components-development-kitchen dev .PHONY: @guardian/source-react-components-development-kitchen\:fix @guardian/source-react-components-development-kitchen\:fix: env - @corepack pnpm nx run @guardian/source-react-components-development-kitchen:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components-development-kitchen fix .PHONY: @guardian/source-react-components-development-kitchen\:lint @guardian/source-react-components-development-kitchen\:lint: env - @corepack pnpm nx run @guardian/source-react-components-development-kitchen:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components-development-kitchen lint .PHONY: @guardian/source-react-components-development-kitchen\:storybook @guardian/source-react-components-development-kitchen\:storybook: env - @corepack pnpm nx run @guardian/source-react-components-development-kitchen:storybook --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components-development-kitchen storybook .PHONY: @guardian/source-react-components-development-kitchen\:test @guardian/source-react-components-development-kitchen\:test: env - @corepack pnpm nx run @guardian/source-react-components-development-kitchen:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components-development-kitchen test .PHONY: @guardian/source-react-components-development-kitchen\:verify-dist @guardian/source-react-components-development-kitchen\:verify-dist: env - @corepack pnpm nx run @guardian/source-react-components-development-kitchen:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source-react-components-development-kitchen verify-dist .PHONY: @guardian/tsconfig\:fix @guardian/tsconfig\:fix: env - @corepack pnpm nx run @guardian/tsconfig:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/tsconfig fix .PHONY: @guardian/tsconfig\:lint @guardian/tsconfig\:lint: env - @corepack pnpm nx run @guardian/tsconfig:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/tsconfig lint .PHONY: github-pages\:build github-pages\:build: env - @corepack pnpm nx run github-pages:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter github-pages build .PHONY: github-pages\:dev github-pages\:dev: env - @corepack pnpm nx run github-pages:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter github-pages dev .PHONY: github-pages\:start github-pages\:start: env - @corepack pnpm nx run github-pages:start --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter github-pages start .PHONY: storybooks\:dev storybooks\:dev: env - @corepack pnpm nx run storybooks:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter storybooks dev ############################### END PROJECT_TASKS ############################## diff --git a/README.md b/README.md index 2dcdc1784..2fa171e02 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Tasks that apply to all projects are defined in the [`Makefile`](./Makefile): - `make build` _builds all projects_ - `make build:storybooks` _builds all storybooks_ - `make changeset` _creates a new [changeset](https://github.com/changesets/changesets/blob/main/docs/intro-to-using-changesets.md)_ -- `make clean` _removes all build artifacts_ +- `make clean` _removes all build artifacts and task caches_ - `make dev` _runs the dev targets for all projects in single instance_ - `make e2e` _runs the e2e tests for all projects_ - `make fix` _attemps to fix lint errors across all projects_ @@ -251,35 +251,6 @@ Project-specific tasks are defined as `scripts` in a `package.json` or `targets` -### Task caching - -Tasks are managed by [Nx](https://nx.dev/). - - - - -[Nx remotely caches the output](https://nx.dev/using-nx/mental-model#computation-hashing-and-caching) of `build`, `lint`, `test`, and `verify-dist`. - - - -This means only one full iteration of these tasks runs for a given state of a project – _ever_ – which makes them extremely fast to re-run. - -For example, you're working on something, run the tests and they pass. Nx remotely caches the result. You push your changes to CI. When CI runs the tests, nothing has changed, so Nx fetches the (passing) cached results, the build goes green and you can merge. - -When I pull your changes, my copy of the code is identical to what you pushed and merged, so I _also_ get the cached results. If I then change the code, Nx re-runs the tests and, again, caches the results. - -This happens _per project_. So if you change `project-a` but not `project-b`, Nx will get the cached results for `project-b`, but still run the tests for `project-a`. From then on, until `project-a` changes again, Nx will always use the cached results for both. - -This includes between development and CI, between machines, pulls etc. - -#### Skipping the cache - -To force the tasks in the [`Makefile`](./Makefile) to skip the Nx cache, set `SKIP_NX_CACHE=true`, e.g. - -```sh -SKIP_NX_CACHE=true make test -``` - ## Chromatic CSNX uses [Chromatic](https://www.chromatic.com/) for visual regression testing, and all PRs require the Chromatic checks to pass before merging. diff --git a/apps/github-pages/package.json b/apps/github-pages/package.json index 1dde5a12a..a77b34ccf 100644 --- a/apps/github-pages/package.json +++ b/apps/github-pages/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "build": "wireit", - "dev": "astro dev", + "dev": "wireit", "start": "wireit" }, "devDependencies": { @@ -30,6 +30,17 @@ "../../libs/@guardian/libs:build" ] }, + "dev": { + "command": "astro dev", + "service": { + "readyWhen": { + "lineMatches": "use --host to expose" + } + }, + "dependencies": [ + "../../libs/@guardian/libs:build" + ] + }, "start": { "dependencies": [ "build" diff --git a/configs/jest.config.js b/configs/jest.config.js index 87c64736f..e7a1b4d62 100644 --- a/configs/jest.config.js +++ b/configs/jest.config.js @@ -3,9 +3,6 @@ export const config = { clearMocks: true, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - // uninstall @nx/jest when removing this - resolver: '@nx/jest/plugins/resolver', - transformIgnorePatterns: ['node_modules/(?!@guardian)'], transform: { '^.+\\.[tj]sx?$': [ diff --git a/libs/@guardian/ab-core/.eslintrc.cjs b/libs/@guardian/ab-core/.eslintrc.cjs index 4702175fa..9d32dc06a 100644 --- a/libs/@guardian/ab-core/.eslintrc.cjs +++ b/libs/@guardian/ab-core/.eslintrc.cjs @@ -5,6 +5,7 @@ module.exports = { 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it 'dist', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/ab-core/package.json b/libs/@guardian/ab-core/package.json index e995dcf5e..5436f3a80 100644 --- a/libs/@guardian/ab-core/package.json +++ b/libs/@guardian/ab-core/package.json @@ -17,17 +17,18 @@ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "dev": "jest --watch", - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", - "test": "jest", - "verify-dist": "jest --setupFilesAfterEnv ./jest.dist.setup.js" + "fix": "wireit", + "lint": "wireit", + "test": "wireit", + "verify-dist": "wireit" }, "devDependencies": { "rollup": "4.17.2", "tslib": "2.6.2", - "typescript": "5.3.3" + "typescript": "5.3.3", + "wireit": "0.14.4" }, "peerDependencies": { "tslib": "^2.6.2", @@ -41,51 +42,61 @@ "publishConfig": { "access": "public" }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "test": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "verify-dist": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "dev": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - } + "wireit": { + "build": { + "command": "rollup -c", + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] + }, + "test": { + "command": "jest", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] + }, + "verify-dist": { + "command": "jest --setupFilesAfterEnv ./jest.dist.setup.js", + "dependencies": [ + "build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] } } } diff --git a/libs/@guardian/ab-react/.eslintrc.cjs b/libs/@guardian/ab-react/.eslintrc.cjs index 4702175fa..9d32dc06a 100644 --- a/libs/@guardian/ab-react/.eslintrc.cjs +++ b/libs/@guardian/ab-react/.eslintrc.cjs @@ -5,6 +5,7 @@ module.exports = { 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it 'dist', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/ab-react/package.json b/libs/@guardian/ab-react/package.json index fe925a8e5..750479e8a 100644 --- a/libs/@guardian/ab-react/package.json +++ b/libs/@guardian/ab-react/package.json @@ -17,12 +17,12 @@ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "dev": "jest --watch", - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", - "test": "jest", - "verify-dist": "jest --setupFilesAfterEnv ./jest.dist.setup.js" + "fix": "wireit", + "lint": "wireit", + "test": "wireit", + "verify-dist": "wireit" }, "devDependencies": { "@guardian/ab-core": "7.0.0", @@ -32,7 +32,8 @@ "react-dom": "18.2.0", "rollup": "4.17.2", "tslib": "2.6.2", - "typescript": "5.3.3" + "typescript": "5.3.3", + "wireit": "0.14.4" }, "peerDependencies": { "@guardian/ab-core": "^7.0.0", @@ -53,51 +54,61 @@ "publishConfig": { "access": "public" }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "test": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "verify-dist": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "dev": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - } + "wireit": { + "build": { + "command": "rollup -c", + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] + }, + "test": { + "command": "jest", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] + }, + "verify-dist": { + "command": "jest --setupFilesAfterEnv ./jest.dist.setup.js", + "dependencies": [ + "build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] } } } diff --git a/libs/@guardian/browserslist-config/.eslintrc.cjs b/libs/@guardian/browserslist-config/.eslintrc.cjs index 4f01fa8a4..cabd7c652 100644 --- a/libs/@guardian/browserslist-config/.eslintrc.cjs +++ b/libs/@guardian/browserslist-config/.eslintrc.cjs @@ -4,6 +4,7 @@ module.exports = { '!**/*', 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/browserslist-config/package.json b/libs/@guardian/browserslist-config/package.json index e87fb322d..0b88428b4 100644 --- a/libs/@guardian/browserslist-config/package.json +++ b/libs/@guardian/browserslist-config/package.json @@ -8,14 +8,15 @@ "browserslist-stats.json" ], "scripts": { - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", + "fix": "wireit", + "lint": "wireit", "update-readme": "node ./scripts/update-readme.mjs" }, "devDependencies": { "@guardian/browserslist-config": "workspace:*", "browserslist": "4.23.0", - "tslib": "2.6.2" + "tslib": "2.6.2", + "wireit": "0.14.4" }, "peerDependencies": { "browserslist": "^4.22.2", @@ -24,23 +25,25 @@ "publishConfig": { "access": "public" }, - "nx": { - "targets": { - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - } + "wireit": { + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "**", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "**", + "../../../.eslint*" + ], + "output": [] } } } diff --git a/libs/@guardian/cobalt-plugin-ts/.eslintrc.cjs b/libs/@guardian/cobalt-plugin-ts/.eslintrc.cjs index ce9ae37cd..a0d213fca 100644 --- a/libs/@guardian/cobalt-plugin-ts/.eslintrc.cjs +++ b/libs/@guardian/cobalt-plugin-ts/.eslintrc.cjs @@ -4,6 +4,7 @@ module.exports = { '!**/*', 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/cobalt-plugin-ts/package.json b/libs/@guardian/cobalt-plugin-ts/package.json index 231b01a26..7c8995bb3 100644 --- a/libs/@guardian/cobalt-plugin-ts/package.json +++ b/libs/@guardian/cobalt-plugin-ts/package.json @@ -5,8 +5,8 @@ "type": "module", "main": "./index.js", "scripts": { - "fix": "pnpm lint --fix", - "lint": "eslint --cache ." + "fix": "wireit", + "lint": "wireit" }, "devDependencies": { "@cobalt-ui/cli": "^1.11.0", @@ -15,28 +15,31 @@ "@cobalt-ui/plugin-js": "^1.4.3", "@cobalt-ui/utils": "^1.2.2", "tslib": "2.6.2", - "typescript": "5.3.3" + "typescript": "5.3.3", + "wireit": "0.14.4" }, "peerDependencies": { "tslib": "^2.6.2" }, - "nx": { - "targets": { - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - } + "wireit": { + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "**", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "**", + "../../../.eslint*" + ], + "output": [] } } } diff --git a/libs/@guardian/core-web-vitals/.eslintrc.cjs b/libs/@guardian/core-web-vitals/.eslintrc.cjs index 54325ff0a..4985560e5 100644 --- a/libs/@guardian/core-web-vitals/.eslintrc.cjs +++ b/libs/@guardian/core-web-vitals/.eslintrc.cjs @@ -5,6 +5,7 @@ module.exports = { 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it 'dist', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/core-web-vitals/package.json b/libs/@guardian/core-web-vitals/package.json index bf3a3bc86..5ca14e3bc 100644 --- a/libs/@guardian/core-web-vitals/package.json +++ b/libs/@guardian/core-web-vitals/package.json @@ -16,19 +16,20 @@ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "dev": "jest --watch", - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", - "test": "jest", - "verify-dist": "jest --setupFilesAfterEnv ./jest.dist.setup.js" + "fix": "wireit", + "lint": "wireit", + "test": "wireit", + "verify-dist": "wireit" }, "devDependencies": { "@guardian/libs": "16.0.0", "rollup": "4.17.2", "tslib": "2.6.2", "typescript": "5.3.3", - "web-vitals": "3.5.0" + "web-vitals": "3.5.0", + "wireit": "0.14.4" }, "peerDependencies": { "@guardian/libs": "^16.0.0", @@ -44,51 +45,61 @@ "publishConfig": { "access": "public" }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "test": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "verify-dist": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "dev": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - } + "wireit": { + "build": { + "command": "rollup -c", + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] + }, + "test": { + "command": "jest", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] + }, + "verify-dist": { + "command": "jest --setupFilesAfterEnv ./jest.dist.setup.js", + "dependencies": [ + "build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] } } } diff --git a/libs/@guardian/design-tokens/.eslintrc.cjs b/libs/@guardian/design-tokens/.eslintrc.cjs index 1577d2f42..19aac8ed5 100644 --- a/libs/@guardian/design-tokens/.eslintrc.cjs +++ b/libs/@guardian/design-tokens/.eslintrc.cjs @@ -5,6 +5,7 @@ module.exports = { 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it 'dist', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/design-tokens/README.md b/libs/@guardian/design-tokens/README.md index 11296e26f..b16ef08b1 100644 --- a/libs/@guardian/design-tokens/README.md +++ b/libs/@guardian/design-tokens/README.md @@ -15,7 +15,7 @@ Once changes are made to the `tokens.json` file, the next step is to generate th To do this, run the following command. ```sh -pnpm nx run @guardian/design-tokens:build +make @guardian/design-tokens:build ``` This command triggers the token generation process, which compiles the tokens.json file into different formats (like CSS, SCSS, JavaScript, TypeScript). diff --git a/libs/@guardian/design-tokens/package.json b/libs/@guardian/design-tokens/package.json index 6c5a44a08..104a323c2 100644 --- a/libs/@guardian/design-tokens/package.json +++ b/libs/@guardian/design-tokens/package.json @@ -9,46 +9,52 @@ "__generated__" ], "scripts": { - "build": "co build && prettier --write __generated__/**", - "fix": "pnpm lint --fix", - "lint": "eslint --cache ." + "build": "wireit", + "fix": "wireit", + "lint": "wireit" }, "devDependencies": { "@cobalt-ui/cli": "1.11.0", "@cobalt-ui/core": "1.11.0", "@cobalt-ui/plugin-css": "1.7.0", - "@guardian/cobalt-plugin-ts": "workspace:*" + "@guardian/cobalt-plugin-ts": "workspace:*", + "wireit": "0.14.4" }, "peerDependencies": { "tslib": "^2.5.3" }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/tokens.config.js", - "{projectRoot}/tokens.json", - "{projectRoot}/package.json" - ], - "outputs": [ - "{projectRoot}/__generated__" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - } + "wireit": { + "build": { + "command": "co build && prettier --write src/__generated__/**", + "files": [ + "./tokens.config.js", + "./tokens.json", + "./package.json" + ], + "output": [ + "./__generated__" + ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] } } } diff --git a/libs/@guardian/eslint-config-typescript/.eslintrc.cjs b/libs/@guardian/eslint-config-typescript/.eslintrc.cjs index 4f01fa8a4..cabd7c652 100644 --- a/libs/@guardian/eslint-config-typescript/.eslintrc.cjs +++ b/libs/@guardian/eslint-config-typescript/.eslintrc.cjs @@ -4,6 +4,7 @@ module.exports = { '!**/*', 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/eslint-config-typescript/package.json b/libs/@guardian/eslint-config-typescript/package.json index 1819f9acc..d7f5c6763 100644 --- a/libs/@guardian/eslint-config-typescript/package.json +++ b/libs/@guardian/eslint-config-typescript/package.json @@ -4,8 +4,8 @@ "description": "ESLint config for Guardian TypeScript projects", "main": "index.js", "scripts": { - "fix": "pnpm lint --fix", - "lint": "eslint --cache ." + "fix": "wireit", + "lint": "wireit" }, "dependencies": { "@guardian/eslint-config": "workspace:*", @@ -17,30 +17,33 @@ "devDependencies": { "eslint": "8.56.0", "tslib": "2.6.2", - "typescript": "5.3.3" + "typescript": "5.3.3", + "wireit": "0.14.4" }, "peerDependencies": { "eslint": "^8.56.0", "tslib": "^2.6.2", "typescript": "~5.3.3" }, - "nx": { - "targets": { - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - } + "wireit": { + "lint": { + "command": "eslint --cache --color .", + "files": [ + "**", + "../../../.eslint*" + ], + "output": [] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "**", + "../../../.eslint*" + ], + "output": [ + "." + ] } } } diff --git a/libs/@guardian/eslint-config/.eslintrc.cjs b/libs/@guardian/eslint-config/.eslintrc.cjs index 4f01fa8a4..cabd7c652 100644 --- a/libs/@guardian/eslint-config/.eslintrc.cjs +++ b/libs/@guardian/eslint-config/.eslintrc.cjs @@ -4,6 +4,7 @@ module.exports = { '!**/*', 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/eslint-config/package.json b/libs/@guardian/eslint-config/package.json index f9d157fb1..748b0803f 100644 --- a/libs/@guardian/eslint-config/package.json +++ b/libs/@guardian/eslint-config/package.json @@ -4,8 +4,8 @@ "description": "ESLint config for Guardian JavaScript projects", "main": "index.js", "scripts": { - "fix": "pnpm lint --fix", - "lint": "eslint --cache ." + "fix": "wireit", + "lint": "wireit" }, "dependencies": { "eslint-config-prettier": "9.1.0", @@ -14,29 +14,32 @@ }, "devDependencies": { "eslint": "8.56.0", - "tslib": "^2.6.2" + "tslib": "^2.6.2", + "wireit": "0.14.4" }, "peerDependencies": { "eslint": "^8.56.0", "tslib": "^2.6.2" }, - "nx": { - "targets": { - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - } + "wireit": { + "lint": { + "command": "eslint --cache --color .", + "files": [ + "**", + "../../../.eslint*" + ], + "output": [] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "**", + "../../../.eslint*" + ], + "output": [ + "." + ] } } } diff --git a/libs/@guardian/eslint-plugin-source-foundations/.eslintrc.cjs b/libs/@guardian/eslint-plugin-source-foundations/.eslintrc.cjs index ef983a648..846cd70f7 100644 --- a/libs/@guardian/eslint-plugin-source-foundations/.eslintrc.cjs +++ b/libs/@guardian/eslint-plugin-source-foundations/.eslintrc.cjs @@ -5,6 +5,7 @@ module.exports = { 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it 'dist', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/eslint-plugin-source-foundations/package.json b/libs/@guardian/eslint-plugin-source-foundations/package.json index d46368b96..f48080872 100644 --- a/libs/@guardian/eslint-plugin-source-foundations/package.json +++ b/libs/@guardian/eslint-plugin-source-foundations/package.json @@ -14,12 +14,12 @@ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "dev": "jest --watch", - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", - "test": "jest", - "verify-dist": "jest --setupFilesAfterEnv ./jest.dist.setup.js" + "fix": "wireit", + "lint": "wireit", + "test": "wireit", + "verify-dist": "wireit" }, "dependencies": { "@typescript-eslint/eslint-plugin": "6.21.0", @@ -53,51 +53,61 @@ "optional": true } }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "test": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "verify-dist": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "dev": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - } + "wireit": { + "build": { + "command": "rollup -c", + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] + }, + "test": { + "command": "jest", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] + }, + "verify-dist": { + "command": "jest --setupFilesAfterEnv ./jest.dist.setup.js", + "dependencies": [ + "build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] } } } diff --git a/libs/@guardian/eslint-plugin-source-react-components/.eslintrc.cjs b/libs/@guardian/eslint-plugin-source-react-components/.eslintrc.cjs index ef983a648..846cd70f7 100644 --- a/libs/@guardian/eslint-plugin-source-react-components/.eslintrc.cjs +++ b/libs/@guardian/eslint-plugin-source-react-components/.eslintrc.cjs @@ -5,6 +5,7 @@ module.exports = { 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it 'dist', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/eslint-plugin-source-react-components/package.json b/libs/@guardian/eslint-plugin-source-react-components/package.json index 40772884d..3411c2f29 100644 --- a/libs/@guardian/eslint-plugin-source-react-components/package.json +++ b/libs/@guardian/eslint-plugin-source-react-components/package.json @@ -14,12 +14,12 @@ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "dev": "jest --watch", - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", - "test": "jest", - "verify-dist": "jest --setupFilesAfterEnv ./jest.dist.setup.js" + "fix": "wireit", + "lint": "wireit", + "test": "wireit", + "verify-dist": "wireit" }, "dependencies": { "@typescript-eslint/eslint-plugin": "6.21.0", @@ -36,7 +36,8 @@ "react": "18.2.0", "rollup": "4.17.2", "tslib": "2.6.2", - "typescript": "5.3.3" + "typescript": "5.3.3", + "wireit": "0.14.4" }, "peerDependencies": { "@guardian/libs": "^16.0.0", @@ -55,51 +56,61 @@ "optional": true } }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "test": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "verify-dist": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "dev": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - } + "wireit": { + "build": { + "command": "rollup -c", + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] + }, + "test": { + "command": "jest", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] + }, + "verify-dist": { + "command": "jest --setupFilesAfterEnv ./jest.dist.setup.js", + "dependencies": [ + "build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] } } } diff --git a/libs/@guardian/identity-auth-frontend/.eslintrc.cjs b/libs/@guardian/identity-auth-frontend/.eslintrc.cjs index bd301cafc..742d05b33 100644 --- a/libs/@guardian/identity-auth-frontend/.eslintrc.cjs +++ b/libs/@guardian/identity-auth-frontend/.eslintrc.cjs @@ -5,6 +5,7 @@ module.exports = { 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it 'dist', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/identity-auth-frontend/package.json b/libs/@guardian/identity-auth-frontend/package.json index f6e7f8ea9..ff36429e1 100644 --- a/libs/@guardian/identity-auth-frontend/package.json +++ b/libs/@guardian/identity-auth-frontend/package.json @@ -17,12 +17,12 @@ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "dev": "jest --watch", - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", - "test": "jest", - "verify-dist": "jest --setupFilesAfterEnv ./jest.dist.setup.js" + "fix": "wireit", + "lint": "wireit", + "test": "wireit", + "verify-dist": "wireit" }, "devDependencies": { "@guardian/identity-auth": "2.1.0", @@ -30,7 +30,8 @@ "jest-fetch-mock": "3.0.3", "rollup": "4.17.2", "tslib": "2.6.2", - "typescript": "5.3.3" + "typescript": "5.3.3", + "wireit": "0.14.4" }, "peerDependencies": { "@guardian/identity-auth": "^2.1.0", @@ -46,51 +47,73 @@ "publishConfig": { "access": "public" }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "test": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "verify-dist": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "dev": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - } + "wireit": { + "build": { + "command": "rollup -c", + "dependencies": [ + "../identity-auth:build" + ], + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "dependencies": [ + "build" + ], + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "dependencies": [ + "build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] + }, + "test": { + "command": "jest", + "dependencies": [ + "../identity-auth:build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] + }, + "verify-dist": { + "command": "jest --setupFilesAfterEnv ./jest.dist.setup.js", + "dependencies": [ + "build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] } } } diff --git a/libs/@guardian/identity-auth/.eslintrc.cjs b/libs/@guardian/identity-auth/.eslintrc.cjs index 4702175fa..9d32dc06a 100644 --- a/libs/@guardian/identity-auth/.eslintrc.cjs +++ b/libs/@guardian/identity-auth/.eslintrc.cjs @@ -5,6 +5,7 @@ module.exports = { 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it 'dist', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/identity-auth/package.json b/libs/@guardian/identity-auth/package.json index 9beac2277..3bd443a0f 100644 --- a/libs/@guardian/identity-auth/package.json +++ b/libs/@guardian/identity-auth/package.json @@ -17,12 +17,12 @@ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "dev": "jest --watch", - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", - "test": "jest", - "verify-dist": "jest --setupFilesAfterEnv ./jest.dist.setup.js" + "fix": "wireit", + "lint": "wireit", + "test": "wireit", + "verify-dist": "wireit" }, "devDependencies": { "@guardian/libs": "16.0.0", @@ -32,7 +32,8 @@ "rollup": "4.17.2", "ts-jest": "29.1.1", "tslib": "2.6.2", - "typescript": "5.3.3" + "typescript": "5.3.3", + "wireit": "0.14.4" }, "peerDependencies": { "@guardian/libs": "^16.0.0", @@ -47,45 +48,61 @@ "publishConfig": { "access": "public" }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "test": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "verify-dist": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - } + "wireit": { + "build": { + "command": "rollup -c", + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] + }, + "test": { + "command": "jest", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] + }, + "verify-dist": { + "command": "jest --setupFilesAfterEnv ./jest.dist.setup.js", + "dependencies": [ + "build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] } } } diff --git a/libs/@guardian/libs/.eslintrc.cjs b/libs/@guardian/libs/.eslintrc.cjs index 3898e5d33..e6f6f3a3d 100644 --- a/libs/@guardian/libs/.eslintrc.cjs +++ b/libs/@guardian/libs/.eslintrc.cjs @@ -5,6 +5,7 @@ module.exports = { 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it 'dist', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/libs/package.json b/libs/@guardian/libs/package.json index d77781d3c..7052a65ea 100644 --- a/libs/@guardian/libs/package.json +++ b/libs/@guardian/libs/package.json @@ -16,13 +16,13 @@ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "dev": "jest --watch", "e2e": "wireit", - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", - "test": "jest", - "verify-dist": "jest -c=./jest.dist.config.js --setupFilesAfterEnv ./jest.dist.setup.js" + "fix": "wireit", + "lint": "wireit", + "test": "wireit", + "verify-dist": "wireit" }, "devDependencies": { "@types/wcag-contrast": "3.0.3", @@ -49,64 +49,73 @@ "publishConfig": { "access": "public" }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "test": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "verify-dist": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "dev": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - } - } - }, "wireit": { + "build": { + "command": "rollup -c", + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, "e2e": { "command": "cypress run --headless", "files": [ - "**", + "!(dist)/**", + "!(.eslintcache)", "!(jest*)" ], "output": [], "dependencies": [ "../../../apps/github-pages:start" ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] + }, + "test": { + "command": "jest", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] + }, + "verify-dist": { + "command": "jest -c=./jest.dist.config.js --setupFilesAfterEnv ./jest.dist.setup.js", + "dependencies": [ + "build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] } } } diff --git a/libs/@guardian/newsletter-types/.eslintrc.cjs b/libs/@guardian/newsletter-types/.eslintrc.cjs index 54325ff0a..4985560e5 100644 --- a/libs/@guardian/newsletter-types/.eslintrc.cjs +++ b/libs/@guardian/newsletter-types/.eslintrc.cjs @@ -5,6 +5,7 @@ module.exports = { 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it 'dist', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/newsletter-types/package.json b/libs/@guardian/newsletter-types/package.json index c05b9d320..b6d5c6d65 100644 --- a/libs/@guardian/newsletter-types/package.json +++ b/libs/@guardian/newsletter-types/package.json @@ -6,25 +6,23 @@ "sideEffects": false, "type": "module", "exports": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "require": "./dist/index.cjs" + "types": "./dist/index.d.ts" }, - "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "dev": "jest --watch", - "fix": "pnpm lint --fix", - "lint": "eslint --cache ." + "fix": "wireit", + "lint": "wireit" }, "devDependencies": { "rollup": "4.17.2", "tslib": "2.6.2", - "typescript": "5.3.3" + "typescript": "5.3.3", + "wireit": "0.14.4" }, "peerDependencies": { "tslib": "^2.6.2", @@ -38,39 +36,40 @@ "publishConfig": { "access": "public" }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "dev": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - } + "wireit": { + "build": { + "command": "rollup -c", + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] } } } diff --git a/libs/@guardian/newsletter-types/rollup.config.js b/libs/@guardian/newsletter-types/rollup.config.js index 1ab1d03d6..675eb5162 100644 --- a/libs/@guardian/newsletter-types/rollup.config.js +++ b/libs/@guardian/newsletter-types/rollup.config.js @@ -1 +1,3 @@ -export * as default from '../../../configs/rollup.config.js'; +import baseConfigs from '../../../configs/rollup.config.js'; + +export default baseConfigs[2]; diff --git a/libs/@guardian/prettier/.eslintrc.cjs b/libs/@guardian/prettier/.eslintrc.cjs index 4f01fa8a4..cabd7c652 100644 --- a/libs/@guardian/prettier/.eslintrc.cjs +++ b/libs/@guardian/prettier/.eslintrc.cjs @@ -4,6 +4,7 @@ module.exports = { '!**/*', 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/prettier/package.json b/libs/@guardian/prettier/package.json index eb8d6f0ff..11f180cc2 100644 --- a/libs/@guardian/prettier/package.json +++ b/libs/@guardian/prettier/package.json @@ -7,34 +7,37 @@ "index.d.ts" ], "scripts": { - "fix": "pnpm lint --fix", - "lint": "eslint --cache ." + "fix": "wireit", + "lint": "wireit" }, "devDependencies": { "prettier": "3.2.2", - "tslib": "2.6.2" + "tslib": "2.6.2", + "wireit": "0.14.4" }, "peerDependencies": { "prettier": "^3.2.2", "tslib": "^2.6.2" }, - "nx": { - "targets": { - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - } + "wireit": { + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "**", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "**", + "../../../.eslint*" + ], + "output": [] } } } diff --git a/libs/@guardian/source-foundations/.eslintrc.cjs b/libs/@guardian/source-foundations/.eslintrc.cjs index 3653d6d3d..225c156a0 100644 --- a/libs/@guardian/source-foundations/.eslintrc.cjs +++ b/libs/@guardian/source-foundations/.eslintrc.cjs @@ -4,9 +4,9 @@ module.exports = { '!**/*', 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it - '.wireit', 'dist', 'storybook-static', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/source-foundations/package.json b/libs/@guardian/source-foundations/package.json index bb5016a52..01f4ebbb7 100644 --- a/libs/@guardian/source-foundations/package.json +++ b/libs/@guardian/source-foundations/package.json @@ -15,14 +15,15 @@ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "build-storybook": "wireit", + "build-type-presets": "wireit", "dev": "jest --watch", - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", + "fix": "wireit", + "lint": "wireit", "storybook": "storybook dev --port 4401", - "test": "jest", - "verify-dist": "jest --setupFilesAfterEnv ./jest.dist.setup.js" + "test": "wireit", + "verify-dist": "wireit" }, "dependencies": { "mini-svg-data-uri": "1.4.4" @@ -48,77 +49,95 @@ "optional": true } }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json", - "{workspaceRoot}/libs/@guardian/design-tokens/__generated__/**" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "test": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "verify-dist": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "dev": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "build-type-presets": { - "executor": "nx:run-commands", - "options": { - "command": "tsx ./scripts/build-type-presets.ts", - "cwd": "{projectRoot}", - "color": true - } - } - } - }, "wireit": { + "build": { + "command": "rollup -c", + "dependencies": [ + "../design-tokens:build", + "build-type-presets" + ], + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, "build-storybook": { "command": "NODE_ENV=production storybook build --webpack-stats-json", - "//": "dependency should really be 'build' but that needs to be wireit'd first", "dependencies": [ - "../design-tokens:build" + "build" ], "files": [ "**/*.{ts,tsx,js,json,mdx,md}", "!storybook-static/**", - "!jest*" + "!(jest*)" ], "output": [ "storybook-static/**/*" ] + }, + "build-type-presets": { + "command": "tsx ./scripts/build-type-presets.ts", + "dependencies": [ + "../design-tokens:build" + ], + "files": [ + "./scripts/build-type-presets.ts", + "./src/utils/convert-value" + ], + "output": [ + "src/__generated__/typography" + ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] + }, + "test": { + "command": "jest", + "dependencies": [ + "../design-tokens:build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] + }, + "verify-dist": { + "command": "jest --setupFilesAfterEnv ./jest.dist.setup.js", + "dependencies": [ + "build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] } } } diff --git a/libs/@guardian/source-react-components-development-kitchen/.eslintrc.cjs b/libs/@guardian/source-react-components-development-kitchen/.eslintrc.cjs index f37db6613..df8760ee5 100644 --- a/libs/@guardian/source-react-components-development-kitchen/.eslintrc.cjs +++ b/libs/@guardian/source-react-components-development-kitchen/.eslintrc.cjs @@ -4,9 +4,9 @@ module.exports = { '!**/*', 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it - '.wireit', 'dist', 'storybook-static', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/source-react-components-development-kitchen/package.json b/libs/@guardian/source-react-components-development-kitchen/package.json index e494f1da7..a08c11ef2 100644 --- a/libs/@guardian/source-react-components-development-kitchen/package.json +++ b/libs/@guardian/source-react-components-development-kitchen/package.json @@ -14,14 +14,14 @@ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "build-storybook": "wireit", "dev": "jest --watch", - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", + "fix": "wireit", + "lint": "wireit", "storybook": "storybook dev --port 4403", - "test": "jest", - "verify-dist": "jest --setupFilesAfterEnv ./jest.dist.setup.js" + "test": "wireit", + "verify-dist": "wireit" }, "devDependencies": { "@babel/core": "7.24.0", @@ -54,65 +54,73 @@ "optional": true } }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "test": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "verify-dist": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "dev": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - } - } - }, "wireit": { + "build": { + "command": "rollup -c", + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, "build-storybook": { "command": "NODE_ENV=production storybook build --webpack-stats-json", "dependencies": [], "files": [ "**/*.{ts,tsx,js,json,mdx,md}", "!storybook-static/**", - "!jest*" + "!(jest*)" ], "output": [ "storybook-static" ] + }, + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../.eslint*" + ], + "output": [] + }, + "test": { + "command": "jest", + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] + }, + "verify-dist": { + "command": "jest --setupFilesAfterEnv ./jest.dist.setup.js", + "dependencies": [ + "build" + ], + "files": [ + "!(dist)/**", + "!(.eslintcache)", + "../../../jest.*" + ], + "output": [] } } } diff --git a/libs/@guardian/source-react-components/.eslintrc.cjs b/libs/@guardian/source-react-components/.eslintrc.cjs index 918c919f0..97c988273 100644 --- a/libs/@guardian/source-react-components/.eslintrc.cjs +++ b/libs/@guardian/source-react-components/.eslintrc.cjs @@ -6,6 +6,7 @@ module.exports = { 'jest.dist.*', // depends on build output, so don't lint it 'dist', 'storybook-static', + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/source-react-components/package.json b/libs/@guardian/source-react-components/package.json index e5537db3e..37ad898da 100644 --- a/libs/@guardian/source-react-components/package.json +++ b/libs/@guardian/source-react-components/package.json @@ -15,15 +15,15 @@ "dist" ], "scripts": { - "build": "rm -rf dist && rollup -c", + "build": "wireit", "build-storybook": "wireit", "create-icons": "ts-node scripts/create-icons", "dev": "jest --watch", - "fix": "pnpm lint --fix", - "lint": "eslint --cache .", + "fix": "wireit", + "lint": "wireit", "storybook": "storybook dev --port 4402", - "test": "jest", - "verify-dist": "jest --setupFilesAfterEnv ./jest.dist.setup.js" + "test": "wireit", + "verify-dist": "wireit" }, "devDependencies": { "@babel/core": "7.24.0", @@ -66,58 +66,68 @@ "optional": true } }, - "nx": { - "targets": { - "build": { - "inputs": [ - "{projectRoot}/src/**", - "{projectRoot}/package.json", - "{projectRoot}/tsconfig.json" - ], - "outputs": [ - "{projectRoot}/dist" - ] - }, - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - }, - "test": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - }, - "verify-dist": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/jest.*" - ] - } - } - }, "wireit": { + "build": { + "command": "rollup -c", + "files": [ + "../../../configs/rollup.config.js", + "./rollup.config.js", + "src/**", + "package.json", + "tsconfig.json" + ], + "output": [ + "dist" + ] + }, "build-storybook": { "command": "NODE_ENV=production storybook build --webpack-stats-json", "files": [ "**/*.{ts,tsx,js,json,mdx,md}", - "!storybook-static/**", - "!jest*" + "!(dist|storybook-static)/**", + "!(jest*)" ], "output": [ "storybook-static" ] + }, + "fix": { + "command": "pnpm lint --fix", + "clean": false, + "files": [ + "!(dist|storybook-static)/**", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "!(dist|storybook-static)/**", + "../../../.eslint*" + ], + "output": [] + }, + "test": { + "command": "jest", + "files": [ + "!(dist|storybook-static)/**", + "../../../jest.*" + ], + "output": [] + }, + "verify-dist": { + "command": "jest --setupFilesAfterEnv ./jest.dist.setup.js", + "dependencies": [ + "build" + ], + "files": [ + "!(dist|storybook-static)/**", + "../../../jest.*" + ], + "output": [] } } } diff --git a/libs/@guardian/tsconfig/.eslintrc.cjs b/libs/@guardian/tsconfig/.eslintrc.cjs index 4f01fa8a4..cabd7c652 100644 --- a/libs/@guardian/tsconfig/.eslintrc.cjs +++ b/libs/@guardian/tsconfig/.eslintrc.cjs @@ -4,6 +4,7 @@ module.exports = { '!**/*', 'node_modules', 'jest.dist.*', // depends on build output, so don't lint it + '.wireit', ], overrides: [ { diff --git a/libs/@guardian/tsconfig/package.json b/libs/@guardian/tsconfig/package.json index 78114b8e1..612edce7d 100644 --- a/libs/@guardian/tsconfig/package.json +++ b/libs/@guardian/tsconfig/package.json @@ -4,26 +4,31 @@ "description": "TSConfig base for Guardian TypeScript projects", "main": "tsconfig.json", "scripts": { - "fix": "pnpm lint --fix", - "lint": "eslint --cache ." + "fix": "wireit", + "lint": "wireit" }, - "nx": { - "targets": { - "lint": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ] - }, - "fix": { - "inputs": [ - "{projectRoot}/**", - "{workspaceRoot}/.eslint*" - ], - "outputs": [ - "{projectRoot}" - ] - } + "devDependencies": { + "wireit": "0.14.4" + }, + "wireit": { + "fix": { + "command": "eslint --cache --color . --fix", + "clean": false, + "files": [ + "**", + "../../../.eslint*" + ], + "output": [ + "." + ] + }, + "lint": { + "command": "eslint --cache --color .", + "files": [ + "**", + "../../../.eslint*" + ], + "output": [] } } } diff --git a/nx.json b/nx.json deleted file mode 100644 index 1f514416f..000000000 --- a/nx.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$schema": "./node_modules/nx/schemas/nx-schema.json", - "affected": { - "defaultBase": "main" - }, - "npmScope": "csnx", - "targetDefaults": { - "build": { - "dependsOn": ["^build"], - "inputs": ["production", "^production"] - }, - "e2e": { - "dependsOn": ["^build"] - }, - "test": { - "dependsOn": ["^build"] - }, - "lint": { - "dependsOn": ["^build"] - }, - "fix": { - "dependsOn": ["^build"] - }, - "verify-dist": { - "dependsOn": ["build", "^build"] - } - }, - "tasksRunnerOptions": { - "default": { - "options": { - "accessToken": "ZDI5NGQyNWMtYzRiNS00YjM0LWJkNDItMWEzMGQ2NWMwNWJkfHJlYWQtb25seQ==", - "cacheableOperations": ["build", "lint", "test", "verify-dist"] - }, - "runner": "nx-cloud" - } - }, - "workspaceLayout": { - "appsDir": "apps", - "libsDir": "libs" - }, - "generators": { - "@nx/react": { - "application": { - "style": "@emotion/styled", - "linter": "eslint", - "babel": true - }, - "component": { - "style": "@emotion/styled" - }, - "library": { - "style": "@emotion/styled", - "linter": "eslint" - } - } - }, - "namedInputs": { - "default": ["{projectRoot}/**/*", "sharedGlobals", "internalTools"], - "sharedGlobals": [ - "{workspaceRoot}/**/tsconfig*.json", - "{workspaceRoot}/.storybook/main.js", - "{workspaceRoot}/.nvmrc", - "{workspaceRoot}/.eslintrc.*", - "{workspaceRoot}/configs/rollup.config.js" - ], - "internalTools": [ - "{workspaceRoot}/libs/@guardian/eslint-*/**/*", - "{workspaceRoot}/libs/@guardian/tsconfig/**/*", - "{workspaceRoot}/tools/nx-plugins/**/*" - ], - "production": ["default"] - } -} diff --git a/package.json b/package.json index b24c42a68..125c97ca4 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,6 @@ "@guardian/eslint-config-typescript": "workspace:*", "@guardian/prettier": "workspace:*", "@manypkg/get-packages": "2.2.0", - "@nx/devkit": "18.3.4", - "@nx/eslint-plugin": "18.3.4", - "@nx/jest": "18.3.4", - "@nx/workspace": "18.3.4", "@storybook/addon-a11y": "8.0.5", "@storybook/addon-docs": "8.0.5", "@storybook/addon-essentials": "8.0.5", @@ -52,8 +48,6 @@ "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "lint-staged": "15.2.0", - "nx": "18.3.4", - "nx-cloud": "latest", "prettier": "3.2.2", "react": "18.2.0", "react-dom": "18.2.0", @@ -63,7 +57,8 @@ "ts-jest": "29.1.1", "typescript": "5.3.3", "update-section": "0.3.3", - "webpack": "5.91.0" + "webpack": "5.91.0", + "wireit": "0.14.4" }, "packageManager": "pnpm@8.14.0", "pnpm": { @@ -71,7 +66,6 @@ "ignoreMissing": [ "@types/node", "eslint", - "nx", "prettier" ] }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 935c051d8..e539e89e9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,18 +47,6 @@ importers: '@manypkg/get-packages': specifier: 2.2.0 version: 2.2.0 - '@nx/devkit': - specifier: 18.3.4 - version: 18.3.4(nx@18.3.4) - '@nx/eslint-plugin': - specifier: 18.3.4 - version: 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(nx@18.3.4)(typescript@5.3.3) - '@nx/jest': - specifier: 18.3.4 - version: 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(nx@18.3.4)(typescript@5.3.3) - '@nx/workspace': - specifier: 18.3.4 - version: 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0) '@storybook/addon-a11y': specifier: 8.0.5 version: 8.0.5 @@ -143,12 +131,6 @@ importers: lint-staged: specifier: 15.2.0 version: 15.2.0 - nx: - specifier: 18.3.4 - version: 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0) - nx-cloud: - specifier: latest - version: 18.0.1 prettier: specifier: 3.2.2 version: 3.2.2 @@ -179,6 +161,9 @@ importers: webpack: specifier: 5.91.0 version: 5.91.0(@swc/core@1.4.0)(esbuild@0.20.2) + wireit: + specifier: 0.14.4 + version: 0.14.4 apps/github-pages: devDependencies: @@ -245,6 +230,9 @@ importers: typescript: specifier: 5.3.3 version: 5.3.3 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/ab-react: devDependencies: @@ -272,6 +260,9 @@ importers: typescript: specifier: 5.3.3 version: 5.3.3 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/browserslist-config: devDependencies: @@ -284,6 +275,9 @@ importers: tslib: specifier: 2.6.2 version: 2.6.2 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/cobalt-plugin-ts: devDependencies: @@ -308,6 +302,9 @@ importers: typescript: specifier: 5.3.3 version: 5.3.3 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/core-web-vitals: devDependencies: @@ -326,6 +323,9 @@ importers: web-vitals: specifier: 3.5.0 version: 3.5.0 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/design-tokens: dependencies: @@ -345,6 +345,9 @@ importers: '@guardian/cobalt-plugin-ts': specifier: workspace:* version: link:../cobalt-plugin-ts + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/eslint-config: dependencies: @@ -364,6 +367,9 @@ importers: tslib: specifier: ^2.6.2 version: 2.6.2 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/eslint-config-typescript: dependencies: @@ -392,6 +398,9 @@ importers: typescript: specifier: 5.3.3 version: 5.3.3 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/eslint-plugin-source-foundations: dependencies: @@ -475,6 +484,9 @@ importers: typescript: specifier: 5.3.3 version: 5.3.3 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/identity-auth: devDependencies: @@ -502,6 +514,9 @@ importers: typescript: specifier: 5.3.3 version: 5.3.3 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/identity-auth-frontend: devDependencies: @@ -523,6 +538,9 @@ importers: typescript: specifier: 5.3.3 version: 5.3.3 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/libs: devDependencies: @@ -571,6 +589,9 @@ importers: typescript: specifier: 5.3.3 version: 5.3.3 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/prettier: devDependencies: @@ -580,6 +601,9 @@ importers: tslib: specifier: 2.6.2 version: 2.6.2 + wireit: + specifier: 0.14.4 + version: 0.14.4 libs/@guardian/source: dependencies: @@ -808,7 +832,11 @@ importers: specifier: 0.14.4 version: 0.14.4 - libs/@guardian/tsconfig: {} + libs/@guardian/tsconfig: + devDependencies: + wireit: + specifier: 0.14.4 + version: 0.14.4 packages: @@ -1157,21 +1185,6 @@ packages: - supports-color dev: true - /@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.24.0): - resolution: {integrity: sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/core': 7.24.0 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-plugin-utils': 7.24.5 - debug: 4.3.4(supports-color@8.1.1) - lodash.debounce: 4.0.8 - resolve: 1.22.8 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/helper-environment-visitor@7.22.20: resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} engines: {node: '>=6.9.0'} @@ -1477,18 +1490,6 @@ packages: '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-proposal-decorators@7.24.1(@babel/core@7.24.0): - resolution: {integrity: sha512-zPEvzFijn+hRvJuX2Vu3KbEBN39LN3f7tW3MQO2LsIs57B26KU+kUc82BdAktS1VCM6libzh45eKGI65lg0cpA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.0 - '@babel/helper-create-class-features-plugin': 7.24.5(@babel/core@7.24.0) - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-decorators': 7.24.1(@babel/core@7.24.0) - dev: true - /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.0): resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} engines: {node: '>=6.9.0'} @@ -1535,16 +1536,6 @@ packages: '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-decorators@7.24.1(@babel/core@7.24.0): - resolution: {integrity: sha512-05RJdO/cCrtVWuAaSn1tS3bH8jbsJa/Y1uD186u6J4C/1mnHFxseeuWpsqr9anvo7TUulev7tm7GDwRV+VuhDw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.24.0): resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} peerDependencies: @@ -2267,23 +2258,6 @@ packages: '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-runtime@7.24.3(@babel/core@7.24.0): - resolution: {integrity: sha512-J0BuRPNlNqlMTRJ72eVptpt9VcInbxO6iP3jaxr+1NPhC0UkKL+6oeX6VXMEYdADnuqmMmsBspt4d5w8Y/TCbQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.0 - '@babel/helper-module-imports': 7.24.3 - '@babel/helper-plugin-utils': 7.24.5 - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.24.0) - babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.0) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.24.0) - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/plugin-transform-shorthand-properties@7.23.3(@babel/core@7.24.0): resolution: {integrity: sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg==} engines: {node: '>=6.9.0'} @@ -4016,353 +3990,6 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.16.0 - /@nrwl/devkit@18.3.4(nx@18.3.4): - resolution: {integrity: sha512-Fty9Huqm12OYueU3uLJl3uvBUl5BvEyPfvw8+rLiNx9iftdEattM8C+268eAbIRRSLSOVXlWsJH4brlc6QZYYw==} - dependencies: - '@nx/devkit': 18.3.4(nx@18.3.4) - transitivePeerDependencies: - - nx - dev: true - - /@nrwl/eslint-plugin-nx@18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(nx@18.3.4)(typescript@5.3.3): - resolution: {integrity: sha512-IiBAxWgOZC4dIqnirpoRJ0YvDeR9HjlOyKna2CZoUj4Dr5uYOiNHbxVbfLPhsIenRLEbjttCxrA9Mm9k++bdjA==} - dependencies: - '@nx/eslint-plugin': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(nx@18.3.4)(typescript@5.3.3) - transitivePeerDependencies: - - '@babel/traverse' - - '@swc-node/register' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - '@typescript-eslint/parser' - - debug - - eslint - - eslint-config-prettier - - nx - - supports-color - - typescript - - verdaccio - dev: true - - /@nrwl/jest@18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(nx@18.3.4)(typescript@5.3.3): - resolution: {integrity: sha512-pIYd8WBQz6DKfhIKkZn9VsNBPR0QGnbAdI9AfrQPoGfj19x3tzqLSjcg/O5UvIs6174U1b+0ccxWmQvFep22Kw==} - dependencies: - '@nx/jest': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(nx@18.3.4)(typescript@5.3.3) - transitivePeerDependencies: - - '@babel/traverse' - - '@swc-node/register' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - babel-plugin-macros - - debug - - node-notifier - - nx - - supports-color - - ts-node - - typescript - - verdaccio - dev: true - - /@nrwl/js@18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(nx@18.3.4)(typescript@5.3.3): - resolution: {integrity: sha512-oyiMoxzDVGQe5E4UFGO/WAOU211HEIdRxSEOfs1lPhvA8lKbUa0IWDqPOugNws/YHAr+vUTU3sZDJ3uU3RJuYQ==} - dependencies: - '@nx/js': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(nx@18.3.4)(typescript@5.3.3) - transitivePeerDependencies: - - '@babel/traverse' - - '@swc-node/register' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - debug - - nx - - supports-color - - typescript - - verdaccio - dev: true - - /@nrwl/nx-cloud@18.0.1: - resolution: {integrity: sha512-uYVxoOXf0xlWJX8O5GBWajmIeL0PfIGvfqtvVNVnl7C6FiZRbmKEhXkWxEDekI6Jq+mI1G86o7d5YsIzq6e36A==} - dependencies: - nx-cloud: 18.0.1 - transitivePeerDependencies: - - debug - dev: true - - /@nrwl/tao@18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0): - resolution: {integrity: sha512-+7KsDYmGj1cvNaXZcjSYOPN1h17hsGFBtVX7MqnpJLLkQTUhKg2rQxqyluzshJ+RoDUVtYPGyHg1AizlB66RIA==} - hasBin: true - dependencies: - nx: 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0) - tslib: 2.6.2 - transitivePeerDependencies: - - '@swc-node/register' - - '@swc/core' - - debug - dev: true - - /@nrwl/workspace@18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0): - resolution: {integrity: sha512-ziPHZcSYj46aPYrRHaKu56/SmYCijLT5vIm/UaoWD5v5Fy5CRigO/ezUImsHGHMEZWfHt44s4jsv7QdJWAXe7w==} - dependencies: - '@nx/workspace': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0) - transitivePeerDependencies: - - '@swc-node/register' - - '@swc/core' - - debug - dev: true - - /@nx/devkit@18.3.4(nx@18.3.4): - resolution: {integrity: sha512-M3htxl5WvlNKK5KNOndCAApbyBCZNTFFs+rtdwvudNZk5+84zAAPaWzSoX9C4XLAW78/f98LzF68/ch05aN12A==} - peerDependencies: - nx: '>= 16 <= 19' - peerDependenciesMeta: - nx: - optional: true - dependencies: - '@nrwl/devkit': 18.3.4(nx@18.3.4) - ejs: 3.1.10 - enquirer: 2.3.6 - ignore: 5.3.1 - nx: 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0) - semver: 7.5.4 - tmp: 0.2.3 - tslib: 2.6.2 - yargs-parser: 21.1.1 - dev: true - - /@nx/eslint-plugin@18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(nx@18.3.4)(typescript@5.3.3): - resolution: {integrity: sha512-rGQX/w+qexGWOLjHECZeZ2RDgaKEUvQW+zGBNlw/5u7tZcTYUpG10VG1j+BrwBZ1gT9YV1b/0IUYdwdEo1NNwA==} - peerDependencies: - '@typescript-eslint/parser': ^6.13.2 || ^7.0.0 - eslint-config-prettier: ^9.0.0 - peerDependenciesMeta: - eslint-config-prettier: - optional: true - dependencies: - '@nrwl/eslint-plugin-nx': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(nx@18.3.4)(typescript@5.3.3) - '@nx/devkit': 18.3.4(nx@18.3.4) - '@nx/js': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(nx@18.3.4)(typescript@5.3.3) - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/type-utils': 7.8.0(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/utils': 7.8.0(eslint@8.56.0)(typescript@5.3.3) - chalk: 4.1.2 - confusing-browser-globals: 1.0.11 - jsonc-eslint-parser: 2.4.0 - semver: 7.5.4 - tslib: 2.6.2 - transitivePeerDependencies: - - '@babel/traverse' - - '@swc-node/register' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - debug - - eslint - - nx - - supports-color - - typescript - - verdaccio - dev: true - - /@nx/jest@18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(nx@18.3.4)(typescript@5.3.3): - resolution: {integrity: sha512-sWbrhz8RYZ7j1uUbyB7tvulnRncNwtnEEMIGYUrHSQB1of+aG+FA2VtI3KCoWrfzMc5EDl7DLpKY1VMW2ArWhQ==} - dependencies: - '@jest/reporters': 29.7.0 - '@jest/test-result': 29.7.0 - '@nrwl/jest': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(nx@18.3.4)(typescript@5.3.3) - '@nx/devkit': 18.3.4(nx@18.3.4) - '@nx/js': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(nx@18.3.4)(typescript@5.3.3) - '@phenomnomnominal/tsquery': 5.0.1(typescript@5.3.3) - chalk: 4.1.2 - identity-obj-proxy: 3.0.0 - jest-config: 29.7.0(@types/node@20.12.11)(ts-node@10.9.2) - jest-resolve: 29.7.0 - jest-util: 29.7.0 - minimatch: 9.0.3 - resolve.exports: 1.1.0 - tslib: 2.6.2 - yargs-parser: 21.1.1 - transitivePeerDependencies: - - '@babel/traverse' - - '@swc-node/register' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - babel-plugin-macros - - debug - - node-notifier - - nx - - supports-color - - ts-node - - typescript - - verdaccio - dev: true - - /@nx/js@18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(nx@18.3.4)(typescript@5.3.3): - resolution: {integrity: sha512-+MPacp/B09e5QwaFQBkev9pW862ZpmesqR2lUUnFAXUBKtjYVIAmhJWHOtevqC1om4OxvTsbluYHsbAkAUzlMA==} - peerDependencies: - verdaccio: ^5.0.4 - peerDependenciesMeta: - verdaccio: - optional: true - dependencies: - '@babel/core': 7.24.0 - '@babel/plugin-proposal-decorators': 7.24.1(@babel/core@7.24.0) - '@babel/plugin-transform-class-properties': 7.24.1(@babel/core@7.24.0) - '@babel/plugin-transform-runtime': 7.24.3(@babel/core@7.24.0) - '@babel/preset-env': 7.24.0(@babel/core@7.24.0) - '@babel/preset-typescript': 7.24.1(@babel/core@7.24.0) - '@babel/runtime': 7.24.5 - '@nrwl/js': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0)(@types/node@20.12.11)(nx@18.3.4)(typescript@5.3.3) - '@nx/devkit': 18.3.4(nx@18.3.4) - '@nx/workspace': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0) - '@phenomnomnominal/tsquery': 5.0.1(typescript@5.3.3) - babel-plugin-const-enum: 1.2.0(@babel/core@7.24.0) - babel-plugin-macros: 2.8.0 - babel-plugin-transform-typescript-metadata: 0.3.2(@babel/core@7.24.0) - chalk: 4.1.2 - columnify: 1.6.0 - detect-port: 1.5.1 - fast-glob: 3.2.7 - fs-extra: 11.2.0 - ignore: 5.3.1 - js-tokens: 4.0.0 - minimatch: 9.0.3 - npm-package-arg: 11.0.1 - npm-run-path: 4.0.1 - ora: 5.3.0 - semver: 7.5.4 - source-map-support: 0.5.19 - ts-node: 10.9.1(@swc/core@1.4.0)(@types/node@20.12.11)(typescript@5.3.3) - tsconfig-paths: 4.2.0 - tslib: 2.6.2 - transitivePeerDependencies: - - '@babel/traverse' - - '@swc-node/register' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - debug - - nx - - supports-color - - typescript - dev: true - - /@nx/nx-darwin-arm64@18.3.4: - resolution: {integrity: sha512-MOGk9z4fIoOkJB68diH3bwoWrC8X9IzMNsz1mu0cbVfgCRAfIV3b+lMsiwQYzWal3UWW5DE5Rkss4F8whiV5Uw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@nx/nx-darwin-x64@18.3.4: - resolution: {integrity: sha512-tSzPRnNB3QdPM+KYiIuRCUtyCwcuIRC95FfP0ZB3WvfDeNxJChEAChNqmCMDE4iFvZhGuze8WqkJuIVdte+lyQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@nx/nx-freebsd-x64@18.3.4: - resolution: {integrity: sha512-bjSPak/d+bcR95/pxHMRhnnpHc6MnrQcG6f5AjX15Esm4JdrdQKPBmG1RybuK0WKSyD5wgVhkAGc/QQUom9l8g==} - engines: {node: '>= 10'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@nx/nx-linux-arm-gnueabihf@18.3.4: - resolution: {integrity: sha512-/1HnUL7jhH0S7PxJqf6R1pk3QlAU22GY89EQV9fd+RDUtp7IyzaTlkebijTIqfxlSjC4OO3bPizaxEaxdd3uKQ==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@nx/nx-linux-arm64-gnu@18.3.4: - resolution: {integrity: sha512-g/2IaB2bZTKaBNPEf9LxtIXb1XHdhh3VO9PnePIrwkkixPMLN0dTxT5Sttt75lvLP3EU1AUR5w3Aaz2Q1mYtWA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@nx/nx-linux-arm64-musl@18.3.4: - resolution: {integrity: sha512-MgfKLoEF6I1cCS+0ooFLEjJSSVdCYyCT9Q96IHRJntAEL8u/0GR2OUoBoLC+q1lnbIkJr/uqTJxA2Jh+sJTIbA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@nx/nx-linux-x64-gnu@18.3.4: - resolution: {integrity: sha512-vbHxv7m3gjthBvw50EYCtgyY0Zg5nVTaQtX+wRsmKybV2i7wHbw5zIe1aL4zHUm6TcPGbIQK+utVM+hyCqKHVA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@nx/nx-linux-x64-musl@18.3.4: - resolution: {integrity: sha512-qIJKJCYFRLVSALsvg3avjReOjuYk91Q0hFXMJ2KaEM1Y3tdzcFN0fKBiaHexgbFIUk8zJuS4dJObTqSYMXowbg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@nx/nx-win32-arm64-msvc@18.3.4: - resolution: {integrity: sha512-UxC8mRkFTPdZbKFprZkiBqVw8624xU38kI0xyooxKlFpt5lccTBwJ0B7+R8p1RoWyvh2DSyFI9VvfD7lczg1lA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@nx/nx-win32-x64-msvc@18.3.4: - resolution: {integrity: sha512-/RqEjNU9hxIBxRLafCNKoH3SaB2FShf+1ZnIYCdAoCZBxLJebDpnhiyrVs0lPnMj9248JbizEMdJj1+bs/bXig==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@nx/workspace@18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0): - resolution: {integrity: sha512-H5HmEOWb9wnrNXfI2DhK6AmMVz1snuJvjT2jcMf9kxlVW0pKGTFW+OyHfSYq6Ni3OGWb1f9O63erLYHo45zPeA==} - dependencies: - '@nrwl/workspace': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0) - '@nx/devkit': 18.3.4(nx@18.3.4) - chalk: 4.1.2 - enquirer: 2.3.6 - nx: 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0) - tslib: 2.6.2 - yargs-parser: 21.1.1 - transitivePeerDependencies: - - '@swc-node/register' - - '@swc/core' - - debug - dev: true - - /@phenomnomnominal/tsquery@5.0.1(typescript@5.3.3): - resolution: {integrity: sha512-3nVv+e2FQwsW8Aw6qTU6f+1rfcJ3hrcnvH/mu9i8YhxO+9sqbOfpL8m6PbET5+xKOlz/VSbp0RoYWYCtIsnmuA==} - peerDependencies: - typescript: ^3 || ^4 || ^5 - dependencies: - esquery: 1.5.0 - typescript: 5.3.3 - dev: true - /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -5807,10 +5434,6 @@ packages: engines: {node: '>=10.13.0'} dev: true - /@tsconfig/node10@1.0.11: - resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} - dev: true - /@tsconfig/node10@1.0.9: resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} dev: true @@ -6344,14 +5967,6 @@ packages: '@typescript-eslint/visitor-keys': 7.3.1 dev: false - /@typescript-eslint/scope-manager@7.8.0: - resolution: {integrity: sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==} - engines: {node: ^18.18.0 || >=20.0.0} - dependencies: - '@typescript-eslint/types': 7.8.0 - '@typescript-eslint/visitor-keys': 7.8.0 - dev: true - /@typescript-eslint/type-utils@6.21.0(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==} engines: {node: ^16.0.0 || >=18.0.0} @@ -6395,28 +6010,6 @@ packages: - supports-color dev: false - /@typescript-eslint/type-utils@7.8.0(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - eslint: - optional: true - typescript: - optional: true - dependencies: - '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.3.3) - '@typescript-eslint/utils': 7.8.0(eslint@8.56.0)(typescript@5.3.3) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.56.0 - ts-api-utils: 1.3.0(typescript@5.3.3) - typescript: 5.3.3 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/types@5.62.0: resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6431,11 +6024,6 @@ packages: engines: {node: ^18.18.0 || >=20.0.0} dev: false - /@typescript-eslint/types@7.8.0: - resolution: {integrity: sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==} - engines: {node: ^18.18.0 || >=20.0.0} - dev: true - /@typescript-eslint/typescript-estree@5.62.0(typescript@5.3.3): resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6500,28 +6088,6 @@ packages: - supports-color dev: false - /@typescript-eslint/typescript-estree@7.8.0(typescript@5.3.3): - resolution: {integrity: sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 7.8.0 - '@typescript-eslint/visitor-keys': 7.8.0 - debug: 4.3.4(supports-color@8.1.1) - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.4 - semver: 7.5.4 - ts-api-utils: 1.3.0(typescript@5.3.3) - typescript: 5.3.3 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6588,28 +6154,6 @@ packages: - typescript dev: false - /@typescript-eslint/utils@7.8.0(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - peerDependenciesMeta: - eslint: - optional: true - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.8.0 - '@typescript-eslint/types': 7.8.0 - '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.3.3) - eslint: 8.56.0 - semver: 7.5.4 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /@typescript-eslint/visitor-keys@5.62.0: resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6633,14 +6177,6 @@ packages: eslint-visitor-keys: 3.4.3 dev: false - /@typescript-eslint/visitor-keys@7.8.0: - resolution: {integrity: sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==} - engines: {node: ^18.18.0 || >=20.0.0} - dependencies: - '@typescript-eslint/types': 7.8.0 - eslint-visitor-keys: 3.4.3 - dev: true - /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -6855,34 +6391,15 @@ packages: engines: {node: '>=12 <14 || 14.2 - 14.9 || >14.10.0'} dependencies: '@yarnpkg/libzip': 2.3.0 - tslib: 1.14.1 - dev: true - - /@yarnpkg/libzip@2.3.0: - resolution: {integrity: sha512-6xm38yGVIa6mKm/DUCF2zFFJhERh/QWp1ufm4cNUvxsONBmfPg8uZ9pZBdOmF6qFGr/HlT6ABBkCSx/dlEtvWg==} - engines: {node: '>=12 <14 || 14.2 - 14.9 || >14.10.0'} - dependencies: - '@types/emscripten': 1.39.10 - tslib: 1.14.1 - dev: true - - /@yarnpkg/lockfile@1.1.0: - resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} - dev: true - - /@yarnpkg/parsers@3.0.0-rc.46: - resolution: {integrity: sha512-aiATs7pSutzda/rq8fnuPwTglyVwjM22bNnK2ZgjrpAjQHSSl3lztd2f9evst1W/qnC58DRz7T7QndUDumAR4Q==} - engines: {node: '>=14.15.0'} - dependencies: - js-yaml: 3.14.1 - tslib: 2.6.2 + tslib: 1.14.1 dev: true - /@zkochan/js-yaml@0.0.6: - resolution: {integrity: sha512-nzvgl3VfhcELQ8LyVrYOru+UtAy1nrygk2+AGbTm8a5YcO6o8lSjAT+pfg3vJWxIoZKOUhrK6UU7xW/+00kQrg==} - hasBin: true + /@yarnpkg/libzip@2.3.0: + resolution: {integrity: sha512-6xm38yGVIa6mKm/DUCF2zFFJhERh/QWp1ufm4cNUvxsONBmfPg8uZ9pZBdOmF6qFGr/HlT6ABBkCSx/dlEtvWg==} + engines: {node: '>=12 <14 || 14.2 - 14.9 || >14.10.0'} dependencies: - argparse: 2.0.1 + '@types/emscripten': 1.39.10 + tslib: 1.14.1 dev: true /abab@2.0.6: @@ -7336,16 +6853,6 @@ packages: engines: {node: '>=4'} dev: true - /axios@1.6.7: - resolution: {integrity: sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==} - dependencies: - follow-redirects: 1.15.6 - form-data: 4.0.0 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - dev: true - /axobject-query@4.0.0: resolution: {integrity: sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==} dependencies: @@ -7397,19 +6904,6 @@ packages: webpack: 5.91.0(@swc/core@1.4.0)(esbuild@0.20.2) dev: true - /babel-plugin-const-enum@1.2.0(@babel/core@7.24.0): - resolution: {integrity: sha512-o1m/6iyyFnp9MRsK1dHF3bneqyf3AlM2q3A/YbgQr2pCat6B6XJVDv2TXqzfY2RYUi4mak6WAksSBPlyYGx9dg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.0) - '@babel/traverse': 7.24.5 - transitivePeerDependencies: - - supports-color - dev: true - /babel-plugin-istanbul@6.1.1: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} @@ -7433,14 +6927,6 @@ packages: '@types/babel__traverse': 7.20.5 dev: true - /babel-plugin-macros@2.8.0: - resolution: {integrity: sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==} - dependencies: - '@babel/runtime': 7.24.5 - cosmiconfig: 6.0.0 - resolve: 1.22.8 - dev: true - /babel-plugin-macros@3.1.0: resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} engines: {node: '>=10', npm: '>=6'} @@ -7450,19 +6936,6 @@ packages: resolve: 1.22.8 dev: true - /babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.24.0): - resolution: {integrity: sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/compat-data': 7.24.4 - '@babel/core': 7.24.0 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.0) - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: true - /babel-plugin-polyfill-corejs2@0.4.9(@babel/core@7.24.0): resolution: {integrity: sha512-BXIWIaO3MewbXWdJdIGDWZurv5OGJlFNo7oy20DpB3kWDVJLcY2NRypRsRUbRe5KMqSNLuOGnWTFQQtY5MAsRw==} peerDependencies: @@ -7476,18 +6949,6 @@ packages: - supports-color dev: true - /babel-plugin-polyfill-corejs3@0.10.4(@babel/core@7.24.0): - resolution: {integrity: sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/core': 7.24.0 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.0) - core-js-compat: 3.37.0 - transitivePeerDependencies: - - supports-color - dev: true - /babel-plugin-polyfill-corejs3@0.9.0(@babel/core@7.24.0): resolution: {integrity: sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg==} peerDependencies: @@ -7511,30 +6972,6 @@ packages: - supports-color dev: true - /babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.24.0): - resolution: {integrity: sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/core': 7.24.0 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.0) - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-transform-typescript-metadata@0.3.2(@babel/core@7.24.0): - resolution: {integrity: sha512-mWEvCQTgXQf48yDqgN7CH50waTyYBeP2Lpqx4nNWab9sxEpdXVeKgfj1qYI2/TgUPQtNFZ85i3PemRtnXVYYJg==} - peerDependencies: - '@babel/core': ^7 - '@babel/traverse': ^7 - peerDependenciesMeta: - '@babel/traverse': - optional: true - dependencies: - '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - /babel-preset-current-node-syntax@1.0.1(@babel/core@7.24.0): resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} peerDependencies: @@ -7808,12 +7245,6 @@ packages: engines: {node: '>=6'} dev: true - /builtins@5.1.0: - resolution: {integrity: sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==} - dependencies: - semver: 7.5.4 - dev: true - /bytes@3.0.0: resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} engines: {node: '>= 0.8'} @@ -8038,11 +7469,6 @@ packages: restore-cursor: 4.0.0 dev: true - /cli-spinners@2.6.1: - resolution: {integrity: sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==} - engines: {node: '>=6'} - dev: true - /cli-spinners@2.9.2: resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} engines: {node: '>=6'} @@ -8171,14 +7597,6 @@ packages: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true - /columnify@1.6.0: - resolution: {integrity: sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q==} - engines: {node: '>=8.0.0'} - dependencies: - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - dev: true - /combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -8256,10 +7674,6 @@ packages: /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - /confusing-browser-globals@1.0.11: - resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} - dev: true - /consola@3.2.3: resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} engines: {node: ^14.18.0 || >=16.10.0} @@ -8304,12 +7718,6 @@ packages: browserslist: 4.23.0 dev: true - /core-js-compat@3.37.0: - resolution: {integrity: sha512-vYq4L+T8aS5UuFg4UwDhc7YNRWVeVZwltad9C/jV3R2LgVOpS9BDr7l/WL6BN0dbV3k1XejPTHqqEzJgsa0frA==} - dependencies: - browserslist: 4.23.0 - dev: true - /core-util-is@1.0.2: resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} dev: true @@ -8318,17 +7726,6 @@ packages: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: true - /cosmiconfig@6.0.0: - resolution: {integrity: sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==} - engines: {node: '>=8'} - dependencies: - '@types/parse-json': 4.0.2 - import-fresh: 3.3.0 - parse-json: 5.2.0 - path-type: 4.0.0 - yaml: 1.10.2 - dev: true - /cosmiconfig@7.1.0: resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} engines: {node: '>=10'} @@ -8988,16 +8385,6 @@ packages: engines: {node: '>=12'} dev: true - /dotenv@10.0.0: - resolution: {integrity: sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==} - engines: {node: '>=10'} - dev: true - - /dotenv@16.3.2: - resolution: {integrity: sha512-HTlk5nmhkm8F6JcdXvHIzaorzCoziNQT9mGxLPVXW8wJF1TiGSL60ZGB4gHWabHOaMmWmhvk2/lPHfnBiT78AQ==} - engines: {node: '>=12'} - dev: true - /dotenv@16.4.1: resolution: {integrity: sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==} engines: {node: '>=12'} @@ -9013,10 +8400,6 @@ packages: engines: {node: '>=4'} dev: true - /duplexer@0.1.2: - resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} - dev: true - /duplexify@3.7.1: resolution: {integrity: sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==} dependencies: @@ -9924,17 +9307,6 @@ packages: dev: true optional: true - /fast-glob@3.2.7: - resolution: {integrity: sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==} - engines: {node: '>=8'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.5 - dev: true - /fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -10098,11 +9470,6 @@ packages: keyv: 4.5.4 rimraf: 3.0.2 - /flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - dev: true - /flatted@3.2.9: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} @@ -10116,16 +9483,6 @@ packages: engines: {node: '>=0.4.0'} dev: true - /follow-redirects@1.15.6: - resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - dev: true - /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: @@ -10550,10 +9907,6 @@ packages: engines: {node: '>=6'} dev: true - /harmony-reflect@1.6.2: - resolution: {integrity: sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==} - dev: true - /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -10744,13 +10097,6 @@ packages: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true - /hosted-git-info@7.0.2: - resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} - engines: {node: ^16.14.0 || >=18.0.0} - dependencies: - lru-cache: 10.2.2 - dev: true - /html-encoding-sniffer@3.0.0: resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} engines: {node: '>=12'} @@ -10915,13 +10261,6 @@ packages: postcss: 8.4.38 dev: true - /identity-obj-proxy@3.0.0: - resolution: {integrity: sha512-00n6YnVHKrinT9t0d9+5yZC6UBNJANpYEQvL2LlX6Ab9lnmxzIRcEmTPuyGScvl1+jKuCICX1Z0Ab1pPKKdikA==} - engines: {node: '>=4'} - dependencies: - harmony-reflect: 1.6.2 - dev: true - /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: true @@ -12055,16 +11394,6 @@ packages: hasBin: true dev: true - /jsonc-eslint-parser@2.4.0: - resolution: {integrity: sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - acorn: 8.11.3 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - semver: 7.5.4 - dev: true - /jsonc-parser@2.3.1: resolution: {integrity: sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==} dev: true @@ -12250,11 +11579,6 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true - /lines-and-columns@2.0.4: - resolution: {integrity: sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true - /lint-staged@15.2.0: resolution: {integrity: sha512-TFZzUEV00f+2YLaVPWBWGAMq7So6yQx+GG8YRMDeOEIf95Zn5RyiLMsEiX4KTNl9vq/w+NqRJkLA1kPIo15ufQ==} engines: {node: '>=18.12.0'} @@ -13260,10 +12584,6 @@ packages: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} dev: true - /node-machine-id@1.1.12: - resolution: {integrity: sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ==} - dev: true - /node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true @@ -13282,16 +12602,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /npm-package-arg@11.0.1: - resolution: {integrity: sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ==} - engines: {node: ^16.14.0 || >=18.0.0} - dependencies: - hosted-git-info: 7.0.2 - proc-log: 3.0.0 - semver: 7.5.4 - validate-npm-package-name: 5.0.0 - dev: true - /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -13316,88 +12626,6 @@ packages: resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} dev: true - /nx-cloud@18.0.1: - resolution: {integrity: sha512-nxJfz0ZmW+DKSr8evmVVm6t1XcLn9WHR5I8kiE2BFNkLVwC+nx+MimjJ53opfHOepMqQiGJAdstZ5Ks630bJgg==} - hasBin: true - dependencies: - '@nrwl/nx-cloud': 18.0.1 - axios: 1.6.7 - chalk: 4.1.2 - dotenv: 10.0.0 - fs-extra: 11.2.0 - node-machine-id: 1.1.12 - open: 8.4.2 - strip-json-comments: 3.1.1 - tar: 6.2.1 - yargs-parser: 21.1.1 - transitivePeerDependencies: - - debug - dev: true - - /nx@18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0): - resolution: {integrity: sha512-7rOHRyxpnZGJ3pHnwmpoAMHt9hNuwibWhOhPBJDhJVcbQJtGfwcWWyV/iSEnVXwKZ2lfHVE3TwE+gXFdT/GFiw==} - hasBin: true - requiresBuild: true - peerDependencies: - '@swc-node/register': ^1.8.0 - '@swc/core': ^1.3.85 - peerDependenciesMeta: - '@swc-node/register': - optional: true - '@swc/core': - optional: true - dependencies: - '@nrwl/tao': 18.3.4(@swc-node/register@1.9.0)(@swc/core@1.4.0) - '@swc-node/register': 1.9.0(@swc/core@1.4.0)(@swc/types@0.1.6)(typescript@5.3.3) - '@swc/core': 1.4.0(@swc/helpers@0.5.3) - '@yarnpkg/lockfile': 1.1.0 - '@yarnpkg/parsers': 3.0.0-rc.46 - '@zkochan/js-yaml': 0.0.6 - axios: 1.6.7 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-spinners: 2.6.1 - cliui: 8.0.1 - dotenv: 16.3.2 - dotenv-expand: 10.0.0 - enquirer: 2.3.6 - figures: 3.2.0 - flat: 5.0.2 - fs-extra: 11.2.0 - ignore: 5.3.1 - jest-diff: 29.7.0 - js-yaml: 4.1.0 - jsonc-parser: 3.2.0 - lines-and-columns: 2.0.4 - minimatch: 9.0.3 - node-machine-id: 1.1.12 - npm-run-path: 4.0.1 - open: 8.4.2 - ora: 5.3.0 - semver: 7.5.4 - string-width: 4.2.3 - strong-log-transformer: 2.1.0 - tar-stream: 2.2.0 - tmp: 0.2.3 - tsconfig-paths: 4.2.0 - tslib: 2.6.2 - yargs: 17.7.2 - yargs-parser: 21.1.1 - optionalDependencies: - '@nx/nx-darwin-arm64': 18.3.4 - '@nx/nx-darwin-x64': 18.3.4 - '@nx/nx-freebsd-x64': 18.3.4 - '@nx/nx-linux-arm-gnueabihf': 18.3.4 - '@nx/nx-linux-arm64-gnu': 18.3.4 - '@nx/nx-linux-arm64-musl': 18.3.4 - '@nx/nx-linux-x64-gnu': 18.3.4 - '@nx/nx-linux-x64-musl': 18.3.4 - '@nx/nx-win32-arm64-msvc': 18.3.4 - '@nx/nx-win32-x64-msvc': 18.3.4 - transitivePeerDependencies: - - debug - dev: true - /nypm@0.3.8: resolution: {integrity: sha512-IGWlC6So2xv6V4cIDmoV0SwwWx7zLG086gyqkyumteH2fIgCAM4nDVFB2iDRszDvmdSVW9xb1N+2KjQ6C7d4og==} engines: {node: ^14.16.0 || >=16.10.0} @@ -13522,20 +12750,6 @@ packages: prelude-ls: 1.2.1 type-check: 0.4.0 - /ora@5.3.0: - resolution: {integrity: sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==} - engines: {node: '>=10'} - dependencies: - bl: 4.1.0 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-spinners: 2.6.1 - is-interactive: 1.0.0 - log-symbols: 4.1.0 - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - dev: true - /ora@5.4.1: resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} engines: {node: '>=10'} @@ -14055,11 +13269,6 @@ packages: engines: {node: '>=6'} dev: true - /proc-log@3.0.0: - resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dev: true - /process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true @@ -14113,10 +13322,6 @@ packages: resolution: {integrity: sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==} dev: true - /proxy-from-env@1.1.0: - resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - dev: true - /pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} dev: true @@ -14623,11 +13828,6 @@ packages: /resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - /resolve.exports@1.1.0: - resolution: {integrity: sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==} - engines: {node: '>=10'} - dev: true - /resolve.exports@2.0.2: resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} engines: {node: '>=10'} @@ -15139,13 +14339,6 @@ packages: source-map: 0.6.1 dev: true - /source-map-support@0.5.19: - resolution: {integrity: sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: @@ -15434,16 +14627,6 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - /strong-log-transformer@2.1.0: - resolution: {integrity: sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA==} - engines: {node: '>=4'} - hasBin: true - dependencies: - duplexer: 0.1.2 - minimist: 1.2.8 - through: 2.3.8 - dev: true - /style-loader@3.3.4(webpack@5.91.0): resolution: {integrity: sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w==} engines: {node: '>= 12.13.0'} @@ -15788,6 +14971,7 @@ packages: typescript: '>=4.2.0' dependencies: typescript: 5.3.3 + dev: false /ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} @@ -15829,40 +15013,6 @@ packages: yargs-parser: 21.1.1 dev: true - /ts-node@10.9.1(@swc/core@1.4.0)(@types/node@20.12.11)(typescript@5.3.3): - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - '@types/node': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@swc/core': 1.4.0(@swc/helpers@0.5.3) - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 20.12.11 - acorn: 8.11.3 - acorn-walk: 8.3.2 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.3.3 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - dev: true - /ts-node@10.9.2(@swc/core@1.4.0)(@types/node@20.12.11)(typescript@5.3.3): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true @@ -16388,13 +15538,6 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /validate-npm-package-name@5.0.0: - resolution: {integrity: sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dependencies: - builtins: 5.1.0 - dev: true - /vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} diff --git a/tools/scripts/lib/get-tasks.mjs b/tools/scripts/lib/get-tasks.mjs index f41515cf9..0b9742cb6 100644 --- a/tools/scripts/lib/get-tasks.mjs +++ b/tools/scripts/lib/get-tasks.mjs @@ -10,19 +10,15 @@ export const getTasks = async () => { const tasks = new Set(); for (const pkg of packages) { - const { scripts, name, nx } = JSON.parse(await readFile(pkg, 'utf8')); + const { scripts, name } = JSON.parse(await readFile(pkg, 'utf8')); - if (!scripts && !nx) { + if (!scripts) { continue; } for (const script of Object.keys(scripts ?? {})) { tasks.add(`${name}:${script}`); } - - for (const nxTarget of Object.keys(nx?.targets ?? {})) { - tasks.add(`${name}:${nxTarget}`); - } } return Array.from(tasks) diff --git a/tools/scripts/maintain-makefile/index.mjs b/tools/scripts/maintain-makefile/index.mjs index 9fbe07f81..b09512045 100644 --- a/tools/scripts/maintain-makefile/index.mjs +++ b/tools/scripts/maintain-makefile/index.mjs @@ -39,7 +39,7 @@ const tasksList = [ '#', `# IT IS AUTOGENERATED BY ${thisFilePathFromRoot}`, '#', - '# It enables running the relevant npm-scripts/Nx targets wrapped in the', + '# It enables running the relevant npm-scripts wrapped in the', '# standardised Makefile prerequisites.', '#', '# It also enables us to abstract away things like package manager vendor/version', @@ -49,12 +49,11 @@ const tasksList = [ for (const task of tasks) { const escapedTaskName = task.replace(/:/g, '\\:'); + const [project, script] = task.split(':'); tasksList.push(`.PHONY: ${escapedTaskName}`); tasksList.push(`${escapedTaskName}: env`); - tasksList.push( - ` @corepack pnpm nx run ${task} --skip-nx-cache=$(SKIP_NX_CACHE)`, - ); + tasksList.push(` @corepack pnpm --filter ${project} ${script}`); tasksList.push(''); } diff --git a/tools/scripts/maintain-readme/get-cached-tasks.mjs b/tools/scripts/maintain-readme/get-cached-tasks.mjs deleted file mode 100644 index 059856128..000000000 --- a/tools/scripts/maintain-readme/get-cached-tasks.mjs +++ /dev/null @@ -1,24 +0,0 @@ -import { readFile } from 'node:fs/promises'; -import path from 'node:path'; -import { projectRoot } from '../project-paths.mjs'; - -import { createRequire } from 'module'; -const require = createRequire(import.meta.url); - -export const getCachedTasks = async () => { - const nxConfig = path.resolve(projectRoot, 'nx.json'); - const { cacheableOperations } = - require(nxConfig).tasksRunnerOptions.default.options; - - const listFormatter = new Intl.ListFormat('en', { - style: 'long', - type: 'conjunction', - }); - - const formattedTasks = cacheableOperations.map((op) => '`' + op + '`'); - const taskList = listFormatter.format(formattedTasks); - - const markdown = `[Nx remotely caches the output](https://nx.dev/using-nx/mental-model#computation-hashing-and-caching) of ${taskList}.`; - - return markdown; -}; diff --git a/tools/scripts/maintain-readme/index.mjs b/tools/scripts/maintain-readme/index.mjs index 5ff0cbfae..e582a1152 100644 --- a/tools/scripts/maintain-readme/index.mjs +++ b/tools/scripts/maintain-readme/index.mjs @@ -5,7 +5,6 @@ import { pathFromRoot, projectRoot } from '../project-paths.mjs'; import { getPackageList } from './get-package-list.mjs'; import { getMakeTargets } from '../lib/get-make-targets.mjs'; import { getTasks } from '../lib/get-tasks.mjs'; -import { getCachedTasks } from './get-cached-tasks.mjs'; import _updateSection from 'update-section'; const updateSection = ({ contents, tag, updates, updater }) => { @@ -78,11 +77,4 @@ contents = updateSection({ updater: thisFilePathFromRoot, }); -contents = updateSection({ - contents, - tag: 'CACHED_TASKS', - updates: await getCachedTasks(), - updater: thisFilePathFromRoot, -}); - await writeFile(readMePath, contents); From ad7baa3610689024849182a24e606c3a232f52f8 Mon Sep 17 00:00:00 2001 From: Alex Sanders Date: Wed, 15 May 2024 17:11:26 +0100 Subject: [PATCH 2/6] ensure stroybook deps are built --- .../package.json | 9 ++++++++- libs/@guardian/source-react-components/package.json | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/libs/@guardian/source-react-components-development-kitchen/package.json b/libs/@guardian/source-react-components-development-kitchen/package.json index a08c11ef2..57eac8814 100644 --- a/libs/@guardian/source-react-components-development-kitchen/package.json +++ b/libs/@guardian/source-react-components-development-kitchen/package.json @@ -57,6 +57,10 @@ "wireit": { "build": { "command": "rollup -c", + "dependencies": [ + "../source-foundations:build", + "../source-react-components:build" + ], "files": [ "../../../configs/rollup.config.js", "./rollup.config.js", @@ -70,7 +74,10 @@ }, "build-storybook": { "command": "NODE_ENV=production storybook build --webpack-stats-json", - "dependencies": [], + "dependencies": [ + "../source-foundations:build", + "../source-react-components:build" + ], "files": [ "**/*.{ts,tsx,js,json,mdx,md}", "!storybook-static/**", diff --git a/libs/@guardian/source-react-components/package.json b/libs/@guardian/source-react-components/package.json index 37ad898da..70896d24d 100644 --- a/libs/@guardian/source-react-components/package.json +++ b/libs/@guardian/source-react-components/package.json @@ -69,6 +69,9 @@ "wireit": { "build": { "command": "rollup -c", + "dependencies": [ + "../source-foundations:build" + ], "files": [ "../../../configs/rollup.config.js", "./rollup.config.js", @@ -82,6 +85,9 @@ }, "build-storybook": { "command": "NODE_ENV=production storybook build --webpack-stats-json", + "dependencies": [ + "../source-foundations:build" + ], "files": [ "**/*.{ts,tsx,js,json,mdx,md}", "!(dist|storybook-static)/**", From 35b27ff243a0b0f423be806f9a9ad4a62b2dbe36 Mon Sep 17 00:00:00 2001 From: Alex Sanders Date: Thu, 16 May 2024 10:20:30 +0100 Subject: [PATCH 3/6] build design tokens to the correct place --- Makefile | 20 ++++++++++---------- libs/@guardian/design-tokens/package.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 8e0c0a06d..0bc31fd96 100644 --- a/Makefile +++ b/Makefile @@ -407,43 +407,43 @@ install: check-node-version .PHONY: @guardian/source\:build @guardian/source\:build: env - @corepack pnpm nx run @guardian/source:build --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source build .PHONY: @guardian/source\:build-storybook @guardian/source\:build-storybook: env - @corepack pnpm nx run @guardian/source:build-storybook --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source build-storybook .PHONY: @guardian/source\:build-type-presets @guardian/source\:build-type-presets: env - @corepack pnpm nx run @guardian/source:build-type-presets --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source build-type-presets .PHONY: @guardian/source\:create-icons @guardian/source\:create-icons: env - @corepack pnpm nx run @guardian/source:create-icons --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source create-icons .PHONY: @guardian/source\:dev @guardian/source\:dev: env - @corepack pnpm nx run @guardian/source:dev --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source dev .PHONY: @guardian/source\:fix @guardian/source\:fix: env - @corepack pnpm nx run @guardian/source:fix --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source fix .PHONY: @guardian/source\:lint @guardian/source\:lint: env - @corepack pnpm nx run @guardian/source:lint --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source lint .PHONY: @guardian/source\:storybook @guardian/source\:storybook: env - @corepack pnpm nx run @guardian/source:storybook --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source storybook .PHONY: @guardian/source\:test @guardian/source\:test: env - @corepack pnpm nx run @guardian/source:test --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source test .PHONY: @guardian/source\:verify-dist @guardian/source\:verify-dist: env - @corepack pnpm nx run @guardian/source:verify-dist --skip-nx-cache=$(SKIP_NX_CACHE) + @corepack pnpm --filter @guardian/source verify-dist .PHONY: @guardian/source-foundations\:build @guardian/source-foundations\:build: env diff --git a/libs/@guardian/design-tokens/package.json b/libs/@guardian/design-tokens/package.json index 104a323c2..263d32838 100644 --- a/libs/@guardian/design-tokens/package.json +++ b/libs/@guardian/design-tokens/package.json @@ -25,7 +25,7 @@ }, "wireit": { "build": { - "command": "co build && prettier --write src/__generated__/**", + "command": "co build && prettier --write __generated__/**", "files": [ "./tokens.config.js", "./tokens.json", From 67c4526a1787af389eb82e06e99d1a4172bf1cfa Mon Sep 17 00:00:00 2001 From: oliverabrahams Date: Thu, 16 May 2024 10:30:45 +0100 Subject: [PATCH 4/6] Rollup config fix --- configs/rollup.config.js | 2 +- libs/@guardian/newsletter-types/rollup.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/rollup.config.js b/configs/rollup.config.js index 7e440eddc..2ef583ce4 100644 --- a/configs/rollup.config.js +++ b/configs/rollup.config.js @@ -35,7 +35,7 @@ const defaultPlugins = [ * @param {Input} param0.input * @returns {import("rollup").RollupOptions[]} */ -export default ({ input = defaultInput, plugins = [] }) => [ +export default ({ input = defaultInput, plugins = [] } = {}) => [ { input, output, diff --git a/libs/@guardian/newsletter-types/rollup.config.js b/libs/@guardian/newsletter-types/rollup.config.js index 675eb5162..4c92efff0 100644 --- a/libs/@guardian/newsletter-types/rollup.config.js +++ b/libs/@guardian/newsletter-types/rollup.config.js @@ -1,3 +1,3 @@ import baseConfigs from '../../../configs/rollup.config.js'; -export default baseConfigs[2]; +export default baseConfigs()[2]; From bcd6b9369d8e315ed4e40533252715beb8809e3f Mon Sep 17 00:00:00 2001 From: Alex Sanders Date: Thu, 16 May 2024 12:37:15 +0100 Subject: [PATCH 5/6] add a npm script running checker Co-authored-by: James Mockett <1166188+jamesmockett@users.noreply.github.com> Co-authored-by: Oliver Abrahams --- scripts/deno/check-npm-scripts.ts | 136 ++++++++++++++++++++++++++++++ scripts/deno/deno.lock | 54 ++++++++++++ 2 files changed, 190 insertions(+) create mode 100644 scripts/deno/check-npm-scripts.ts create mode 100644 scripts/deno/deno.lock diff --git a/scripts/deno/check-npm-scripts.ts b/scripts/deno/check-npm-scripts.ts new file mode 100644 index 000000000..6e2bfada5 --- /dev/null +++ b/scripts/deno/check-npm-scripts.ts @@ -0,0 +1,136 @@ +/** + * Runs all npm-scripts in the workspace one at a time, with no caching or old build files in place. + * + * This should help pinpoint eny issues with how we've orchestrated running them, defined dependent tasks etc. + */ + +import { exists } from 'https://deno.land/std@0.224.0/fs/exists.ts'; +import * as colors from 'https://deno.land/std@0.224.0/fmt/colors.ts'; +import { expandGlob } from 'https://deno.land/std@0.224.0/fs/expand_glob.ts'; +import { existsSync } from 'https://deno.land/std@0.224.0/fs/exists.ts'; + +interface Package { + path: string; + scripts: { [key: string]: string }; +} + +interface ErrorLog { + packageName: string; + script: string; + error: string; +} + +async function getWorkspacePackages(): Promise { + const command = new Deno.Command('pnpm', { + args: ['-r', 'ls', '--json'], + }); + const { code: _code, stdout } = await command.output(); + const result = new TextDecoder().decode(stdout); + + const packages = JSON.parse(result) as { path: string }[]; + const packageDetails: Package[] = []; + + for (const pkg of packages) { + const packageJsonPath = `${pkg.path}/package.json`; + if (await exists(packageJsonPath)) { + const packageJson = JSON.parse(await Deno.readTextFile(packageJsonPath)); + if (packageJson.scripts) { + packageDetails.push({ + path: pkg.path, + scripts: packageJson.scripts, + }); + } + } + } + + return packageDetails; +} + +async function deleteDirs(name: string) { + const distDirectories = expandGlob(`**/${name}`, { + globstar: true, + exclude: ['**/node_modules/**'], + }); + + for await (const distDir of distDirectories) { + if (distDir.isDirectory && existsSync(distDir.path)) { + console.log(`Removing directory: ${distDir.path}`); + try { + await Deno.remove(distDir.path, { recursive: true }); + console.log(`Successfully removed: ${distDir.path}`); + } catch (error) { + console.error(`Failed to remove: ${distDir.path}`); + console.error(error); + } + } + } +} + +async function runNpmScript(pkgPath: string, script: string) { + // Skip these scripts as they are long-running + if ( + ['dev', 'start', 'storybook', 'create-icons', 'update-readme'].includes( + script, + ) + ) { + return { result: 'skipping', error: '' }; + } + + const command = new Deno.Command('pnpm', { + args: ['run', script], + cwd: pkgPath, + }); + const { success, stdout, stderr } = await command.output(); + if (success) { + return new TextDecoder().decode(stdout); + } + throw new Error(new TextDecoder().decode(stderr)); +} + +async function main() { + const packages = await getWorkspacePackages(); + const errorLogs: ErrorLog[] = []; + + for (const pkg of packages) { + for (const [scriptName] of Object.entries(pkg.scripts)) { + console.log(`Removing wireit caches`); + await deleteDirs('.wireit'); + + console.log(`Removing dist folders`); + await deleteDirs('dist'); + + try { + console.log(`Running ${scriptName} in ${pkg.path}`); + await runNpmScript(pkg.path, scriptName); + console.log( + colors.green(`Successfully ran ${scriptName} in ${pkg.path}`), + ); + } catch (error) { + console.log(colors.red(`Failed to run ${scriptName} in ${pkg.path}`)); + console.error(error.message); + + errorLogs.push({ + packageName: pkg.path, + script: scriptName, + error: error.message, + }); + } + console.log(''); + } + } + + if (errorLogs.length > 0) { + console.log(`\n ${errorLogs.length} scripts failed:`); + for (const log of errorLogs) { + console.log(`Package: ${log.packageName}`); + console.log(`Script: ${log.script}`); + console.log(`Error: ${log.error}\n`); + } + } else { + console.log('All scripts ran successfully.'); + } +} + +if (import.meta.main) { + await main(); +} diff --git a/scripts/deno/deno.lock b/scripts/deno/deno.lock new file mode 100644 index 000000000..35fcd85c4 --- /dev/null +++ b/scripts/deno/deno.lock @@ -0,0 +1,54 @@ +{ + "version": "3", + "remote": { + "https://deno.land/std@0.224.0/assert/assert.ts": "09d30564c09de846855b7b071e62b5974b001bb72a4b797958fe0660e7849834", + "https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917", + "https://deno.land/std@0.224.0/fmt/colors.ts": "508563c0659dd7198ba4bbf87e97f654af3c34eb56ba790260f252ad8012e1c5", + "https://deno.land/std@0.224.0/fs/_create_walk_entry.ts": "5d9d2aaec05bcf09a06748b1684224d33eba7a4de24cf4cf5599991ca6b5b412", + "https://deno.land/std@0.224.0/fs/_to_path_string.ts": "29bfc9c6c112254961d75cbf6ba814d6de5349767818eb93090cecfa9665591e", + "https://deno.land/std@0.224.0/fs/exists.ts": "3d38cb7dcbca3cf313be343a7b8af18a87bddb4b5ca1bd2314be12d06533b50f", + "https://deno.land/std@0.224.0/fs/expand_glob.ts": "2e428d90acc6676b2aa7b5c78ef48f30641b13f1fe658e7976c9064fb4b05309", + "https://deno.land/std@0.224.0/fs/walk.ts": "cddf87d2705c0163bff5d7767291f05b0f46ba10b8b28f227c3849cace08d303", + "https://deno.land/std@0.224.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8", + "https://deno.land/std@0.224.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2", + "https://deno.land/std@0.224.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c", + "https://deno.land/std@0.224.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf", + "https://deno.land/std@0.224.0/path/_common/glob_to_reg_exp.ts": "6cac16d5c2dc23af7d66348a7ce430e5de4e70b0eede074bdbcf4903f4374d8d", + "https://deno.land/std@0.224.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", + "https://deno.land/std@0.224.0/path/_common/normalize_string.ts": "33edef773c2a8e242761f731adeb2bd6d683e9c69e4e3d0092985bede74f4ac3", + "https://deno.land/std@0.224.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a", + "https://deno.land/std@0.224.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15", + "https://deno.land/std@0.224.0/path/basename.ts": "7ee495c2d1ee516ffff48fb9a93267ba928b5a3486b550be73071bc14f8cc63e", + "https://deno.land/std@0.224.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36", + "https://deno.land/std@0.224.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069", + "https://deno.land/std@0.224.0/path/glob_to_regexp.ts": "7f30f0a21439cadfdae1be1bf370880b415e676097fda584a63ce319053b5972", + "https://deno.land/std@0.224.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7", + "https://deno.land/std@0.224.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141", + "https://deno.land/std@0.224.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a", + "https://deno.land/std@0.224.0/path/join_globs.ts": "5b3bf248b93247194f94fa6947b612ab9d3abd571ca8386cf7789038545e54a0", + "https://deno.land/std@0.224.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352", + "https://deno.land/std@0.224.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d", + "https://deno.land/std@0.224.0/path/posix/basename.ts": "d2fa5fbbb1c5a3ab8b9326458a8d4ceac77580961b3739cd5bfd1d3541a3e5f0", + "https://deno.land/std@0.224.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1", + "https://deno.land/std@0.224.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40", + "https://deno.land/std@0.224.0/path/posix/glob_to_regexp.ts": "76f012fcdb22c04b633f536c0b9644d100861bea36e9da56a94b9c589a742e8f", + "https://deno.land/std@0.224.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede", + "https://deno.land/std@0.224.0/path/posix/join.ts": "7fc2cb3716aa1b863e990baf30b101d768db479e70b7313b4866a088db016f63", + "https://deno.land/std@0.224.0/path/posix/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91", + "https://deno.land/std@0.224.0/path/posix/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/posix/resolve.ts": "08b699cfeee10cb6857ccab38fa4b2ec703b0ea33e8e69964f29d02a2d5257cf", + "https://deno.land/std@0.224.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d", + "https://deno.land/std@0.224.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808", + "https://deno.land/std@0.224.0/path/windows/basename.ts": "6bbc57bac9df2cec43288c8c5334919418d784243a00bc10de67d392ab36d660", + "https://deno.land/std@0.224.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5", + "https://deno.land/std@0.224.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01", + "https://deno.land/std@0.224.0/path/windows/glob_to_regexp.ts": "e45f1f89bf3fc36f94ab7b3b9d0026729829fabc486c77f414caebef3b7304f8", + "https://deno.land/std@0.224.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a", + "https://deno.land/std@0.224.0/path/windows/join.ts": "8d03530ab89195185103b7da9dfc6327af13eabdcd44c7c63e42e27808f50ecf", + "https://deno.land/std@0.224.0/path/windows/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780", + "https://deno.land/std@0.224.0/path/windows/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972" + } +} From 40720d712f514ead4c4cccc4ee72e8274b38f093 Mon Sep 17 00:00:00 2001 From: Alex Sanders Date: Thu, 16 May 2024 12:37:41 +0100 Subject: [PATCH 6/6] prettify typography generated code --- .../@guardian/source-foundations/package.json | 1 + .../scripts/build-type-presets.ts | 19 ++++++++++++++++--- pnpm-lock.yaml | 13 +++++++++++-- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/libs/@guardian/source-foundations/package.json b/libs/@guardian/source-foundations/package.json index 01f4ebbb7..c61319f87 100644 --- a/libs/@guardian/source-foundations/package.json +++ b/libs/@guardian/source-foundations/package.json @@ -32,6 +32,7 @@ "@emotion/react": "11.11.1", "@guardian/design-tokens": "workspace:*", "lightningcss": "1.24.0", + "prettier": "3.2.5", "react": "18.2.0", "react-dom": "18.2.0", "rollup": "4.17.2", diff --git a/libs/@guardian/source-foundations/scripts/build-type-presets.ts b/libs/@guardian/source-foundations/scripts/build-type-presets.ts index 09ede8655..e0c1f507b 100644 --- a/libs/@guardian/source-foundations/scripts/build-type-presets.ts +++ b/libs/@guardian/source-foundations/scripts/build-type-presets.ts @@ -1,5 +1,7 @@ import fs from 'node:fs'; import { typography, typographyPresets } from '@guardian/design-tokens'; +import prettierConfig from '@guardian/prettier'; +import { format } from 'prettier'; import { fontArrayToString, pxStringToRem } from '../src/utils/convert-value'; const STRIP_WHITESPACE = /^\s+/gm; @@ -61,6 +63,17 @@ const object = Object.entries(typographyPresets) .join('') .replace(STRIP_TABS, ''); -fs.writeFileSync(cssOutputPath, banner + css); -fs.writeFileSync(objectOutputPath, banner + object); -console.log(`✓ ${presetTotal} presets built`); +void (async () => { + fs.writeFileSync( + cssOutputPath, + await format(banner + css, { filepath: cssOutputPath, ...prettierConfig }), + ); + fs.writeFileSync( + objectOutputPath, + await format(banner + object, { + filepath: objectOutputPath, + ...prettierConfig, + }), + ); + console.log(`✓ ${presetTotal} presets built`); +})(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e539e89e9..750e125ab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -702,6 +702,9 @@ importers: lightningcss: specifier: 1.24.0 version: 1.24.0 + prettier: + specifier: 3.2.5 + version: 3.2.5 react: specifier: 18.2.0 version: 18.2.0 @@ -4548,7 +4551,7 @@ packages: jscodeshift: 0.15.2(@babel/preset-env@7.24.0) leven: 3.1.0 ora: 5.4.1 - prettier: 3.2.2 + prettier: 3.2.5 prompts: 2.4.2 read-pkg-up: 7.0.1 semver: 7.5.4 @@ -4587,7 +4590,7 @@ packages: globby: 11.1.0 jscodeshift: 0.15.2(@babel/preset-env@7.24.0) lodash: 4.17.21 - prettier: 3.2.2 + prettier: 3.2.5 recast: 0.23.6 tiny-invariant: 1.3.3 transitivePeerDependencies: @@ -13229,6 +13232,12 @@ packages: hasBin: true dev: true + /prettier@3.2.5: + resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} + engines: {node: '>=14'} + hasBin: true + dev: true + /pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'}