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 to Vitest #167

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Migrate to Vitest #167

wants to merge 4 commits into from

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Feb 26, 2025

Work in progress.

This migrates from Jest to Vitest, since the latter has much better compatibility with ESM.

Copy link

socket-security bot commented Feb 26, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/code-frame@7.26.2 🔁 npm/@babel/code-frame@7.23.5 environment 0 33.2 kB nicolo-ribaudo
npm/@babel/compat-data@7.26.8 🔁 npm/@babel/compat-data@7.23.5 None 0 66.4 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/core@7.26.9 🔁 npm/@babel/core@7.23.5 None 0 794 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/generator@7.26.9 🔁 npm/@babel/generator@7.23.5 None +1 728 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/helper-compilation-targets@7.26.5 🔁 npm/@babel/helper-compilation-targets@7.22.15 environment 0 53.7 kB nicolo-ribaudo
npm/@babel/helper-module-imports@7.25.9 🔁 npm/@babel/helper-module-imports@7.22.15 None 0 63.7 kB nicolo-ribaudo
npm/@babel/helper-module-transforms@7.26.0 🔁 npm/@babel/helper-module-transforms@7.23.3 None +1 835 kB nicolo-ribaudo
npm/@babel/helper-string-parser@7.25.9 🔁 npm/@babel/helper-string-parser@7.23.4 None 0 31.8 kB nicolo-ribaudo
npm/@babel/helper-validator-identifier@7.25.9 🔁 npm/@babel/helper-validator-identifier@7.22.20 None 0 48.3 kB nicolo-ribaudo
npm/@babel/helper-validator-option@7.25.9 🔁 npm/@babel/helper-validator-option@7.23.5 None 0 11.8 kB nicolo-ribaudo
npm/@babel/helpers@7.26.9 🔁 npm/@babel/helpers@7.23.5 None 0 863 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/parser@7.26.9 🔁 npm/@babel/parser@7.23.5 None 0 1.92 MB nicolo-ribaudo
npm/@babel/template@7.26.9 🔁 npm/@babel/template@7.22.15 None 0 70.3 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/types@7.26.9 🔁 npm/@babel/types@7.23.5 None 0 2.58 MB nicolo-ribaudo
npm/@esbuild/aix-ppc64@0.25.0 None 0 11.3 MB esbuild, evanw
npm/@esbuild/netbsd-arm64@0.25.0 None 0 9.5 MB esbuild, evanw
npm/@esbuild/openbsd-arm64@0.25.0 None 0 9.57 MB esbuild, evanw
npm/@jridgewell/gen-mapping@0.3.8 🔁 npm/@jridgewell/gen-mapping@0.3.3 None 0 81.6 kB jridgewell
npm/@jridgewell/set-array@1.2.1 🔁 npm/@jridgewell/set-array@1.1.2 None 0 17.9 kB jridgewell
npm/@rollup/rollup-android-arm-eabi@4.34.8 None 0 1.6 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-android-arm64@4.34.8 None 0 2.24 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-darwin-arm64@4.34.8 None 0 2.21 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-darwin-x64@4.34.8 None 0 2.36 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-freebsd-arm64@4.34.8 None 0 2.12 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-freebsd-x64@4.34.8 None 0 2.49 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-linux-arm-gnueabihf@4.34.8 None 0 2.23 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-linux-arm-musleabihf@4.34.8 None 0 2.22 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-linux-arm64-gnu@4.34.8 None 0 2.21 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-linux-arm64-musl@4.34.8 None 0 2.11 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-linux-loongarch64-gnu@4.34.8 None 0 2.56 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-linux-powerpc64le-gnu@4.34.8 None 0 2.76 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-linux-riscv64-gnu@4.34.8 None 0 2.29 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-linux-s390x-gnu@4.34.8 None 0 3.89 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-linux-x64-gnu@4.34.8 None 0 2.5 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-linux-x64-musl@4.34.8 None 0 2.48 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-win32-arm64-msvc@4.34.8 None 0 2.72 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-win32-ia32-msvc@4.34.8 None 0 2.53 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@rollup/rollup-win32-x64-msvc@4.34.8 None 0 3.32 MB guybedford, lukastaegert, rich_harris, ...1 more
npm/@types/estree@1.0.6 None 0 25.8 kB types
npm/@types/node@17.0.45 None 0 1.68 MB types
npm/@vitest/coverage-istanbul@3.0.7 None 0 13.7 kB vitestbot
npm/@vitest/expect@3.0.7 None 0 0 B
npm/@vitest/mocker@3.0.7 None 0 0 B
npm/@vitest/pretty-format@3.0.7 None 0 0 B
npm/@vitest/runner@3.0.7 None 0 0 B
npm/@vitest/snapshot@3.0.7 None 0 0 B
npm/@vitest/spy@3.0.7 None 0 0 B
npm/@vitest/utils@3.0.7 None 0 0 B
npm/assertion-error@2.0.1 None 0 5.83 kB chaijs
npm/browserslist@4.24.4 🔁 npm/browserslist@4.22.2 None 0 64.9 kB ai
npm/cac@6.7.14 None 0 81.8 kB egoist
npm/caniuse-lite@1.0.30001701 🔁 npm/caniuse-lite@1.0.30001566 None 0 0 B
npm/chai@5.2.0 None 0 515 kB chaijs
npm/check-error@2.1.1 None 0 11.4 kB chaijs
npm/debug@4.4.0 🔁 npm/debug@4.3.4 None 0 42.8 kB qix
npm/deep-eql@5.0.2 None 0 23.9 kB chaijs
npm/electron-to-chromium@1.5.105 🔁 npm/electron-to-chromium@1.4.605 None 0 157 kB kilianvalkhof
npm/es-module-lexer@1.6.0 None 0 91.3 kB guybedford
npm/escalade@3.2.0 🔁 npm/escalade@3.1.1 None 0 12.4 kB lukeed
npm/estree-walker@3.0.3 None 0 17.6 kB rich_harris
npm/expect-type@1.1.0 None 0 110 kB mmkale
npm/istanbul-lib-coverage@3.2.2 🔁 npm/istanbul-lib-coverage@3.2.0 None 0 34.4 kB oss-bot
npm/istanbul-lib-instrument@6.0.3 🔁 npm/istanbul-lib-instrument@6.0.1 None 0 72 kB oss-bot
npm/istanbul-lib-report@3.0.1 🔁 npm/istanbul-lib-report@3.0.0 None 0 37.6 kB oss-bot
npm/istanbul-lib-source-maps@5.0.6 🔁 npm/istanbul-lib-source-maps@4.0.1 None 0 37.7 kB oss-bot
npm/istanbul-reports@3.1.7 🔁 npm/istanbul-reports@3.1.4 None 0 294 kB oss-bot
npm/jsesc@3.1.0 🔁 npm/jsesc@2.5.2 None 0 32.3 kB mathias
npm/magic-string@0.30.17 None 0 467 kB antfu
npm/magicast@0.3.5 filesystem 0 649 kB antfu
npm/make-dir@4.0.0 🔁 npm/make-dir@3.1.0 None 0 9.91 kB sindresorhus
npm/ms@2.1.3 🔁 npm/ms@2.1.2 None 0 6.72 kB styfle
npm/nanoid@3.3.8 🔁 npm/nanoid@3.3.4 None 0 57.1 kB ai
npm/node-releases@2.0.19 🔁 npm/node-releases@2.0.14 None 0 37.2 kB chicoxyzzy
npm/pathe@2.0.3 None 0 51.3 kB danielroe, pi0
npm/pathval@2.0.0 None 0 15 kB chaijs
npm/picocolors@1.1.1 🔁 npm/picocolors@1.0.0 None 0 6.37 kB alexeyraspopov
npm/postcss@8.5.3 None 0 202 kB ai
npm/react-is@18.3.1 🔁 npm/react-is@18.2.0 None 0 24 kB react-bot
npm/rollup@4.34.8 None 0 2.69 MB eventualbuddha, lukastaegert, rich_harris, ...2 more
npm/siginfo@2.0.0 None 0 4.79 kB emilbayes
npm/source-map-js@1.2.1 None 0 140 kB 7rulnik
npm/stackback@0.0.2 None 0 6.88 kB shtylman
npm/std-env@3.8.0 None 0 25.9 kB pi0
npm/test-exclude@7.0.1 Transitive: environment +2 458 kB bcoe
npm/tinybench@2.9.0 None 0 62.9 kB aslemammad
npm/tinyexec@0.3.2 environment, shell 0 46.1 kB 43081j
npm/tinypool@1.0.2 filesystem, shell, unsafe 0 57.3 kB ariperkkio
npm/tinyrainbow@2.0.0 environment 0 8.11 kB oreanno
npm/tinyspy@3.0.2 None 0 17.6 kB oreanno
npm/update-browserslist-db@1.1.2 🔁 npm/update-browserslist-db@1.0.13 environment 0 14.7 kB ai
npm/vite-node@3.0.7 None 0 0 B
npm/vite@6.2.0 None 0 0 B
npm/vitest-when@0.6.0 None 0 66.2 kB mcous
npm/vitest@3.0.7 None 0 0 B
npm/why-is-node-running@2.3.0 filesystem, unsafe 0 7.3 kB mafintosh

🚮 Removed packages: npm/@babel/highlight@7.23.4, npm/@bcoe/v8-coverage@0.2.3, npm/@jest/console@29.7.0, npm/@jest/core@29.7.0, npm/@jest/environment@29.7.0, npm/@jest/expect-utils@29.7.0, npm/@jest/expect@29.7.0, npm/@jest/fake-timers@29.7.0, npm/@jest/globals@29.7.0, npm/@jest/reporters@29.7.0, npm/@jest/source-map@29.6.3, npm/@jest/test-result@29.7.0, npm/@jest/test-sequencer@29.7.0, npm/@sinonjs/commons@2.0.0, npm/@sinonjs/fake-timers@10.0.2, npm/@types/jest-when@3.5.2, npm/@types/jest@29.5.10, npm/@types/stack-utils@2.0.1, npm/buffer-from@1.1.2, npm/chalk@2.4.2, npm/char-regex@1.0.2, npm/cjs-module-lexer@1.2.2, npm/co@4.6.0, npm/collect-v8-coverage@1.0.1, npm/create-jest@29.7.0, npm/dedent@1.5.1, npm/detect-newline@3.1.0, npm/diff-sequences@29.6.3, npm/emittery@0.13.1, npm/error-ex@1.3.2, npm/exit@0.1.2, npm/expect@29.7.0, npm/has-flag@3.0.0, npm/import-local@3.1.0, npm/is-arrayish@0.2.1, npm/is-generator-fn@2.1.0, npm/jest-changed-files@29.7.0, npm/jest-circus@29.7.0, npm/jest-cli@29.7.0, npm/jest-config@29.7.0, npm/jest-diff@29.7.0, npm/jest-docblock@29.7.0, npm/jest-each@29.7.0, npm/jest-environment-node@29.7.0, npm/jest-get-type@29.6.3, npm/jest-leak-detector@29.7.0, npm/jest-matcher-utils@29.7.0, npm/jest-message-util@29.7.0, npm/jest-mock@29.7.0, npm/jest-pnp-resolver@1.2.2, npm/jest-resolve-dependencies@29.7.0, npm/jest-resolve@29.7.0, npm/jest-runner@29.7.0, npm/jest-runtime@29.7.0, npm/jest-snapshot@29.7.0, npm/jest-validate@29.7.0, npm/jest-watcher@29.7.0, npm/jest-when@3.5.2, npm/jest@29.7.0, npm/kleur@3.0.3, npm/leven@3.1.0, npm/lines-and-columns@1.2.4, npm/parse-json@5.2.0, npm/pkg-dir@4.2.0, npm/prompts@2.4.2, npm/pure-rand@6.0.2, npm/resolve-cwd@3.0.0, npm/resolve.exports@2.0.2, npm/sisteransi@1.0.5, npm/source-map-support@0.5.13, npm/source-map@0.6.1, npm/stack-utils@2.0.5, npm/string-length@4.0.2, npm/supports-color@5.5.0, npm/to-fast-properties@2.0.0, npm/type-detect@4.0.8, npm/v8-to-istanbul@9.0.1

View full report↗︎

Have feedback? Participate in our User Experience Survey 📊

Copy link

socket-security bot commented Feb 26, 2025

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Shell access npm/tinypool@1.0.2 🚫
Shell access npm/tinyexec@0.3.2 🚫
New author npm/istanbul-lib-report@3.0.1 🚫

View full report↗︎

Next steps

What is shell access?

This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.

Packages should avoid accessing the shell which can reduce portability, and make it easier for malicious shell access to be introduced.

What is new author?

A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.

Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/tinypool@1.0.2
  • @SocketSecurity ignore npm/tinyexec@0.3.2
  • @SocketSecurity ignore npm/istanbul-lib-report@3.0.1

@cryptodev-2s
Copy link
Contributor

@mcmire is this PR now ready?

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.

3 participants