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

Migrate from Jest to to Vitest, close #104 #115

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

Kocal
Copy link
Member

@Kocal Kocal commented Jan 29, 2025

See #104

Moving from Jest to Vitest removed ~3k lines in the pnpm lock file and removed ~300 devDependencies 😍 :

  • before:
Progress: resolved 1, reused 0, downloaded 0, added 0
Progress: resolved 101, reused 1, downloaded [8](https://github.com/symfony/stimulus-bridge/actions/runs/13020917798/job/36321161304?pr=114#step:6:9)7, added 0
Progress: resolved 251, reused 1, downloaded 214, added 0
Progress: resolved 441, reused 1, downloaded 3[9](https://github.com/symfony/stimulus-bridge/actions/runs/13020917798/job/36321161304?pr=114#step:6:10)0, added 0
Progress: resolved 694, reused 1, downloaded 627, added 0
 WARN  11 deprecated subdependencies found: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Packages: +7[11](https://github.com/symfony/stimulus-bridge/actions/runs/13020917798/job/36321161304?pr=114#step:6:12)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 732, reused 1, downloaded 714, added 711, done
.../node_modules/core-js-pure postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../node_modules/@biomejs/biome postinstall$ node scripts/postinstall.js
.../node_modules/core-js-pure postinstall: Done
.../node_modules/@biomejs/biome postinstall: Done

dependencies:
+ @hotwired/stimulus-webpack-helpers 1.0.1
+ @types/webpack-env 1.18.8
+ loader-utils 3.3.1
+ schema-utils 4.3.0

devDependencies:
+ @babel/core 7.26.7
+ @babel/preset-env 7.26.7
+ @babel/preset-typescript 7.26.0
+ @biomejs/biome 1.9.4
+ @hotwired/stimulus 3.2.2
+ @rollup/plugin-typescript [12](https://github.com/symfony/stimulus-bridge/actions/runs/13020917798/job/36321161304?pr=114#step:6:13).1.2
+ @symfony/mock-module 1.0.0
+ @symfony/stimulus-testing 2.0.1
+ acorn 8.14.0
+ babel-jest 27.5.1 (29.7.0 is available)
+ jest 27.5.1 (29.7.0 is available)
+ rolldown 1.0.0-beta.3
+ tslib 2.8.1
+ typescript 4.9.5 (5.7.3 is available)
+ webpack 5.97.1
+ webpack-cli 5.1.4 (6.0.1 is available)

 WARN  Issues with peer dependencies found
.
└─┬ valibot 1.0.0-beta.12
  └── ✕ unmet peer typescript@>=5: found 4.9.5

Done in 6.3s
  • after:
Progress: resolved 1, reused 0, downloaded 0, added 0
Progress: resolved 11[8](https://github.com/symfony/stimulus-bridge/actions/runs/13026638540/job/36336794852?pr=115#step:6:9), reused 1, downloaded 99, added 0
Progress: resolved 284, reused 1, downloaded 243, added 0
Packages: +360
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 423, reused 1, downloaded 364, added 360, done
.../[email protected]/node_modules/esbuild postinstall$ node install.js
.../node_modules/@biomejs/biome postinstall$ node scripts/postinstall.js
.../[email protected]/node_modules/esbuild postinstall: Done
.../node_modules/@biomejs/biome postinstall: Done

dependencies:
+ @hotwired/stimulus-webpack-helpers 1.0.1
+ @types/webpack-env 1.18.8
+ loader-utils 3.3.1
+ schema-utils 4.3.0

devDependencies:
+ @babel/core 7.26.7
+ @babel/parser 7.26.7
+ @babel/preset-env 7.26.7
+ @babel/preset-typescript 7.26.0
+ @babel/types 7.26.7
+ @biomejs/biome 1.[9](https://github.com/symfony/stimulus-bridge/actions/runs/13026638540/job/36336794852?pr=115#step:6:10).4
+ @hotwired/stimulus 3.2.2
+ @rollup/plugin-typescript 12.1.2
+ @symfony/mock-module 1.0.0
+ @testing-library/jest-dom 6.6.3
+ acorn 8.14.0
+ jsdom 26.0.0
+ json5 2.2.3
+ rolldown 1.0.0-beta.3
+ tslib 2.8.1
+ typescript 4.9.5 (5.7.3 is available)
+ vitest 3.0.4
+ webpack 5.97.1
+ webpack-cli 5.1.4 (6.0.1 is available)

 WARN  Issues with peer dependencies found
.
└─┬ valibot 1.0.0-beta.[12](https://github.com/symfony/stimulus-bridge/actions/runs/13026638540/job/36336794852?pr=115#step:6:13)
  └── ✕ unmet peer typescript@>=5: found 4.9.5

Done in 3.9s

@Kocal Kocal changed the title Remove Jest and related dependencies, and migrate to Vitest, close #104 Migrate from Jest to to Vitest, close #104 Jan 29, 2025
"@biomejs/biome": "^1.9.4",
"@hotwired/stimulus": "^3.0",
"@rollup/plugin-typescript": "^12.1.2",
"@symfony/mock-module": "file:test/fixtures/module",
"@symfony/stimulus-testing": "^2.0.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

You won't be missed 👋🏻

But maybe in the future, https://github.com/symfony/stimulus-testing will:

  • remove Babel from their dependencies (or put it in peerDeps)
  • create subpackages like @symfony/stimulus-testing-jest and @symfony/stimulus-testing-vite?
  • or, being deprecated in favor of documentation...

@Kocal Kocal merged commit 0a416c2 into symfony:main Jan 29, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant