8000 fix: add `cypress install` to `prepare` script to fix pnpm 10 compatibility by haoqunjiang · Pull Request #679 · vuejs/create-vue · GitHub
[go: up one dir, main page]

Skip to content

fix: add cypress install to prepare script to fix pnpm 10 compatibility #679

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

Merged
merged 2 commits into from
Feb 6, 2025
Merged
Changes from 1 commit
Commits
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
Next Next commit
fix: add cypress install to prepare script to fix pnpm 10 compati…
…bility

This approach works with both pnpm 10 and other package managers:
- If Cypress's `postinstall` script has been run, it'll do nothing other
than print a message.
- If `postinstall` hasn't been run, it'll download the Cypress binary.

As for why using `prepare` instead of `postinstall`, please refer to the
discussion thread where `husky` decided to use `prepare`:
- <typicode/husky#884>
  • Loading branch information
haoqunjiang committed Feb 6, 2025
commit 19b413eddc3030ca9685d8b7e4b062e8b4afbb2c
1 change: 1 addition & 0 deletions template/config/cypress/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"scripts": {
"prepare": "cypress install",
"test:e2e": "start-server-and-test preview http://localhost:4173 'cypress run --e2e'",
"test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'"
},
Expand Down
Loading
0