Skip to content

chore: migrate to pnpm #11248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 71 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
0b9c67d
feat: migrated to pnpm
xaos7991 May 18, 2025
d78c30d
fix: replaced the variable with your own path
Jester175 May 19, 2025
e738b1b
fix: changed init path
Jester175 May 19, 2025
8227be7
fix: added files to ignore
Jester175 May 19, 2025
e1080b5
fix: changed init path
Jester175 May 19, 2025
ae63c55
Merge pull request #2 from xaos7991/replacing-variables
xaos7991 May 20, 2025
e4500eb
chore: migrated scripts from yarn to pnpm
xaos7991 May 20, 2025
78f97ca
chore: migrate scripts to pnpm
Jester175 May 20, 2025
b2740d3
chore: replaced yarn reference with pnpm
Jester175 May 20, 2025
47bca3f
chore: replaced yarn reference with pnpm
Jester175 May 20, 2025
caae48b
Merge pull request #4 from xaos7991/chore/migrate-scripts-to-pnpm
xaos7991 May 20, 2025
6ff72a1
chore: replaced yarn reference with pnpm
Jester175 May 20, 2025
83ea658
Merge pull request #5 from xaos7991/chore/migrate-scripts-to-pnpm
xaos7991 May 20, 2025
df07c3c
chore: added rule schema types
Jester175 May 21, 2025
0ffc5cc
Merge pull request #6 from xaos7991/chore/add-rule-schema-types
xaos7991 May 22, 2025
feb01b1
chore: fixed types
Jester175 May 22, 2025
9ed6376
Merge pull request #7 from xaos7991/chore/types
xaos7991 May 22, 2025
a497ac5
ci: migrated yarn to pnpm
xaos7991 May 23, 2025
351de42
fix: resolved issues with eslint-plugin tests
xaos7991 May 23, 2025
03bd8d3
chore: migrated to pnpm
Jester175 May 24, 2025
1de3fca
Merge pull request #8 from xaos7991/chore/launching-app-pnpm
xaos7991 May 24, 2025
77ca6dd
fix: resolved problems with versions of babel packages
xaos7991 May 24, 2025
644216b
fix: resolved problems with babel types
Jester175 May 25, 2025
0fe7f92
Merge pull request #9 from xaos7991/fix/babel-types
xaos7991 May 25, 2025
a6f9007
docs: updated comments to reflect pnpm usage instead of yarn
Jester175 May 25, 2025
08f458c
Merge pull request #10 from xaos7991/chore/docs-update-pnpm-comments
xaos7991 May 25, 2025
de5ee8b
ci: migrated from yarn to pnpm
xaos7991 May 25, 2025
46e0620
ci: removed pnpm version
xaos7991 May 25, 2025
88af74c
fix: added dependency ignore configuration
Jester175 May 25, 2025
7e51137
fix: added dependency ignore configuration
Jester175 May 25, 2025
d064374
fix: added dependency ignore configuration
Jester175 May 25, 2025
8b0b3f5
fix: added dependency ignore configuration
Jester175 May 25, 2025
1f4cdf3
fix: adjusted types and dependencies
Jester175 May 26, 2025
a285fd3
chore: added dependency ignore configuration
Jester175 May 26, 2025
8c0b7a7
fix: resolved issues in integration tests
Jester175 May 27, 2025
319a153
chore: removed duplicate plugin
Jester175 May 27, 2025
354e19f
Merge pull request #11 from xaos7991/fix/integration-tests-dependencies
xaos7991 May 27, 2025
7156616
Merge branch 'main' into migrate-to-pnpm
xaos7991 May 27, 2025
5883023
chore: added additional dependency
Jester175 May 27, 2025
2bbb8d1
chore: added dependency ignore configuration
Jester175 May 27, 2025
66cf651
Merge pull request #12 from xaos7991/chore/additional-dependency
Jester175 May 27, 2025
cb29a89
ci: removed unnecessary script
xaos7991 May 29, 2025
ca45552
chore: simplify scripts with `-w` flag and clean up dependencies
Jester175 May 29, 2025
facb3b4
ci: removed unnecessary script
xaos7991 May 29, 2025
1eb19aa
chore: simplify scripts with `-w` flag and clean up dependencies
Jester175 May 29, 2025
178a63d
Merge branch 'resolving-issues' of https://github.com/xaos7991/typesc…
Jester175 May 29, 2025
3cbb725
chore: update lockfile to match package.json
Jester175 May 29, 2025
883d0ea
chore: update lockfile to match package.json
Jester175 May 29, 2025
fbf1124
chore: simplify scripts with `-w` flag
Jester175 May 29, 2025
2f26b78
Merge branch 'resolving-issues' of github.com:xaos7991/typescript-esl…
xaos7991 May 29, 2025
d301b3f
Merge branch 'main' into resolving-issues
xaos7991 May 29, 2025
9370c28
Merge pull request #13 from xaos7991/resolving-issues
xaos7991 May 29, 2025
f1ad8b9
chore: trigger CI pipeline
Jester175 May 29, 2025
635d1ef
fix: adjusted CI pipeline configuration
Jester175 May 29, 2025
caa05cd
fix: resolved issues
xaos7991 May 29, 2025
4649727
fix: resolved issues
Jester175 May 29, 2025
42d001f
Merge remote-tracking branch 'origin/main' into migrate-to-pnpm
Jester175 May 31, 2025
9318d86
Merge remote-tracking branch 'origin/main' into migrate-to-pnpm
Jester175 Jun 2, 2025
fe0e30d
fix: resolved issues
Jester175 Jun 2, 2025
7159cac
chore: updated vitest
Jester175 Jun 2, 2025
53f325f
fix: reverted @focusaurus to an earlier stable version
Jester175 Jun 2, 2025
88f10a7
some changes
Jester175 Jun 2, 2025
3fc4202
Merge pull request #15 from xaos7991/fix/resolve-issues
Jester175 Jun 2, 2025
59fefad
Merge branch 'main' into migrate-to-pnpm
xaos7991 Jun 3, 2025
5368940
Merge branch 'main' into migrate-to-pnpm
Jester175 Jun 6, 2025
ec4bd4e
Merge branch 'main' into migrate-to-pnpm
xaos7991 Jun 8, 2025
7ecfd88
fix: resolved issues with tests
xaos7991 Jun 8, 2025
7383a07
Merge branch 'main' into migrate-to-pnpm
xaos7991 Jun 9, 2025
f87275a
Merge branch 'main' into migrate-to-pnpm
xaos7991 Jun 9, 2025
99086f1
chore: lock Docusaurus library versions
xaos7991 Jun 9, 2025
f684ddc
fix: resolved issue with tests
xaos7991 Jun 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"**/node_modules/**",
"packages/website/.docusaurus/**",
"packages/website/build/**",
"packages/website/src/vendor/**",
"yarn.lock"
"packages/website/src/vendor/**"
],
"dictionaries": [
"typescript",
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/08-bug-report-complex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ body:
description: The steps we need to take to reproduce the bug using your repro
value: |
1) clone the repo
2) `yarn install`
3) `yarn lint`
2) `pnpm install`
3) `pnpm run lint`
validations:
required: true
- type: textarea
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/prepare-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
if: steps['build-cache'].outputs.cache-hit == 'true'
shell: bash
run: |
yarn nx run types:build
pnpm exec nx run types:build
env:
SKIP_AST_SPEC_REBUILD: true

Expand All @@ -31,6 +31,6 @@ runs:
shell: bash
# Website will be built by the Netlify GitHub App
run: |
yarn nx run-many --target=build --parallel --exclude=website --exclude=website-eslint
pnpm exec nx run-many --target=build --parallel --exclude=website --exclude=website-eslint
env:
SKIP_AST_SPEC_REBUILD: true
40 changes: 7 additions & 33 deletions .github/actions/prepare-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,50 +30,24 @@ runs:
working-directory: ${{ inputs.working-directory }}
run: echo ${{ github.ref }}

- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ inputs.node-version }}
registry-url: ${{ inputs.registry-url }}

# Yarn 3 caching strategy which follows taken from https://gist.github.com/belgattitude/042f9caf10d029badbde6cf9d43e400a

- name: Expose yarn config as "$GITHUB_OUTPUT"
id: yarn-config
shell: bash
run: |
echo "CACHE_FOLDER=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

# Yarn rotates the downloaded cache archives, @see https://github.com/actions/setup-node/issues/325
# Yarn cache is also reusable between arch and os.
- name: Restore yarn cache
uses: actions/cache@v4
id: yarn-download-cache
with:
path: ${{ steps.yarn-config.outputs.CACHE_FOLDER }}
key: yarn-download-cache-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-download-cache-

# Invalidated on yarn.lock changes
- name: Restore yarn install state
id: yarn-install-state-cache
uses: actions/cache@v4
with:
path: .yarn/ci-cache/
key: ${{ runner.os }}-yarn-install-state-cache-${{ hashFiles('yarn.lock', '.yarnrc.yml') }}

- name: Install dependencies
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
yarn install --immutable --inline-builds
yarn check-clean-workspace-after-install
pnpm install --frozen-lockfile
pnpm run check-clean-workspace-after-install
env:
# CI optimizations. Overrides yarnrc.yml options (or their defaults) in the CI action.
YARN_ENABLE_GLOBAL_CACHE: 'false' # Use local cache folder to keep downloaded archives
YARN_NM_MODE: 'hardlinks-local' # Hardlinks-(local|global) reduces io / node_modules size
YARN_INSTALL_STATE_PATH: .yarn/ci-cache/install-state.gz # Very small speedup when lock does not change
# Other environment variables
HUSKY: '0' # By default do not run HUSKY install
SKIP_POSTINSTALL: 'true'
5 changes: 1 addition & 4 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@
enabled: false,
},

postUpdateOptions: [
// Run yarn dedupe to cleanup the lockfile after updates.
'yarnDedupeHighest',
],
postUpdateOptions: ['pnpmDedupe'],

// By default renovate will auto-rebase whenever the dep pranch falls behind main.
// This is annoying as it spams notifications and creates unnecessary action runs.
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ jobs:
uses: ./.github/actions/prepare-install
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
- run: yarn nx run generate-configs
- run: pnpm exec nx run generate-configs
- run: git status --porcelain
- if: failure()
run: echo "Outdated result detected from yarn generate-configs. Please check in any file changes."
run: echo "Outdated result detected from pnpm run generate-configs. Please check in any file changes."

lint_without_build:
name: Lint without build
Expand All @@ -101,7 +101,7 @@ jobs:
node-version: ${{ env.PRIMARY_NODE_VERSION }}

- name: Run Check
run: yarn ${{ matrix.lint-task }}
run: pnpm run ${{ matrix.lint-task }}

lint_with_build:
name: Lint with build
Expand All @@ -124,7 +124,7 @@ jobs:
uses: ./.github/actions/prepare-build

- name: Run Check
run: yarn ${{ matrix.lint-task }}
run: pnpm ${{ matrix.lint-task }}
env:
ESLINT_USE_FLAT_CONFIG: true

Expand All @@ -142,7 +142,7 @@ jobs:
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
- name: Run stylelint check
run: yarn stylelint
run: pnpm run stylelint
working-directory: packages/website

integration_tests:
Expand All @@ -162,7 +162,7 @@ jobs:
uses: ./.github/actions/prepare-build

- name: Run integration tests
run: yarn test-integration
run: pnpm run test-integration
env:
CI: true

Expand Down Expand Up @@ -213,12 +213,12 @@ jobs:
# we don't collect coverage on other node versions so they run faster
- name: Run unit tests with coverage for ${{ matrix.package }}
if: env.PRIMARY_NODE_VERSION == matrix.node-version && matrix.os == 'ubuntu-latest'
run: yarn nx run ${{ matrix.package }}:test -- --coverage
run: pnpm exec nx run ${{ matrix.package }}:test -- --coverage
env:
CI: true
- name: Run unit tests for ${{ matrix.package }}
if: env.PRIMARY_NODE_VERSION != matrix.node-version || matrix.os != 'ubuntu-latest'
run: yarn nx test ${{ matrix.package }}
run: pnpm exec nx test ${{ matrix.package }}
env:
CI: true

Expand Down Expand Up @@ -254,7 +254,7 @@ jobs:
- name: Build
uses: ./.github/actions/prepare-build
- name: Run unit tests for ${{ matrix.package }}
run: yarn nx test ${{ matrix.package }} --coverage=false
run: pnpm exec nx test ${{ matrix.package }} --coverage=false
env:
CI: true
TYPESCRIPT_ESLINT_PROJECT_SERVICE: true
Expand Down Expand Up @@ -306,7 +306,7 @@ jobs:
run: npx tsx tools/release/apply-canary-version.mts

- name: Publish all packages to npm with the canary tag
# NOTE: this needs to be npx, rather than yarn, to make sure the authenticated npm registry is used
# NOTE: this needs to be npx, rather than pnpm, to make sure the authenticated npm registry is used
run: npx nx release publish --tag canary --verbose
env:
NX_CLOUD_DISTRIBUTED_EXECUTION: false
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/nx-migrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,31 @@ jobs:
# Get the version of Nx we are migrating to
NX_VERSION=$(node -e "console.log(require('./package.json').devDependencies['nx'])")

# Revert renovate's changes to package.json and yarn.lock so that it is a clean migrate from the status quo
git checkout HEAD~1 -- package.json yarn.lock
# Revert renovate's changes to package.json and pnpm-lock.yaml so that it is a clean migrate from the status quo
git checkout HEAD~1 -- package.json pnpm-lock.yaml

YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
pnpm install

yarn nx migrate $NX_VERSION
pnpm exec nx migrate $NX_VERSION

# Sometimes Nx can require config formatting changes after a migrate command
YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
yarn nx format
pnpm install
pnpm exec nx format

# migrations.json may or may not exist after running nx migrate
if [ -f migrations.json ]; then
# This will also invoke yarn automatically
yarn nx migrate --run-migrations=migrations.json
# This will also invoke pnpm automatically
pnpm exec nx migrate --run-migrations=migrations.json

# After we have run its migrations, we no longer need the migrations.json file
rm migrations.json
fi

# Run the special nx repair command to ensure config matches latest and greatest
yarn nx repair
pnpm exec nx repair

# Ensure all the changed files are formatted appropriately
yarn format
pnpm run format

# Commit all the changes to the PR (see note on not being able to use secrets.GITHUB_TOKEN for this)
git config --global user.email "james@henry.sc"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prettier-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
# We cannot use secrets.GITHUB_TOKEN for this because it is not permitted to kick off subsequent actions worfklow runs, so we use a PAT instead
GITHUB_TOKEN: ${{ secrets.JAMES_HENRY_GITHUB_TOKEN }}
run: |
yarn --mode skip-build
yarn format
pnpm install --ignore-scripts
pnpm run format

# Commit all the changes to the PR (see note on not being able to use secrets.GITHUB_TOKEN for this)
git config --global user.email "james@henry.sc"
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn pre-commit
pnpm run pre-commit
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
package-lock=false
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
**/.vs
CONTRIBUTORS.md

.yarn/plugins
.yarn/releases
pnpm-lock.yaml
pnpm-workspace.yaml

packages/eslint-plugin/tests/fixtures/indent/

Expand Down

This file was deleted.

Loading