Skip to content
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

Switch to pnpm + vitest (away from yarn @ 1 and jest) #2196

Merged
merged 11 commits into from
Oct 23, 2024

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Oct 22, 2024

pnpm is a strict package manager, and yarn can't be trusted.

Some tooling we want to use doesn't support yarn (release-plan, fixturify-project / scenario-tester, etc).


I needed to include a vitest switch in here, because I needed to debug some failures when I switch to pnpm, and jest in just bad at debugging (no integration with the debug terminal in vscode)

It's way faster to switch to vitest (done in < 1 minute) than to fix jest.


Additionally, it looks like there was a failing situation with the no-get rule. So that's been fixed here: 55571e2

@NullVoxPopuli NullVoxPopuli changed the title Switch to pnpm (away from yarn @ 1) Switch to pnpm + vitest (away from yarn @ 1 and jest) Oct 22, 2024
@NullVoxPopuli NullVoxPopuli force-pushed the switch-to-pnpm branch 2 times, most recently from dca0bed to 96ef8ae Compare October 22, 2024 21:12
@@ -119,7 +103,9 @@
"release-it": "^17.0.0",
"sort-package-json": "^2.6.0",
"typescript": "^5.2.2",
"typescript-eslint": "^8.7.0"
"typescript-eslint": "^8.7.0",
"vite": "^5.4.9",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NullVoxPopuli is this intentionally added? Why would we need it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, we import from vite in the vitest.config

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NullVoxPopuli can/should we explicitly set the version? just thinking that it won't drift some day to v10 once it released plus it's explicit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it uses the packageManager field

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh cool! TIL

"engines": {
"node": "18.* || 20.* || >= 21"
},
"volta": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NullVoxPopuli maybe e could keep volta config but pin pnpm using it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure thing

@NullVoxPopuli NullVoxPopuli merged commit 6b218a5 into master Oct 23, 2024
9 checks passed
@NullVoxPopuli NullVoxPopuli deleted the switch-to-pnpm branch October 23, 2024 02:35
@github-actions github-actions bot mentioned this pull request Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants