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 #260

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Migrate to Vitest #260

wants to merge 3 commits into from

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Feb 26, 2025

This replaces Jest with Vitest. Vitest has better support for ESM (which we use in some repositories), works with Prettier 3, and generally "just works," without too much additional configuration.

Examples

We are using Vitest in a few repos, including:

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/@ampproject/remapping@2.3.0 🔁 npm/@ampproject/remapping@2.2.1 None 0 78.9 kB jridgewell
npm/@babel/code-frame@7.26.2 🔁 npm/@babel/code-frame@7.22.13 environment 0 33.2 kB nicolo-ribaudo
npm/@babel/compat-data@7.26.8 🔁 npm/@babel/compat-data@7.23.2 None 0 66.4 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/core@7.26.9 🔁 npm/@babel/core@7.23.2 None +2 3.44 MB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/generator@7.26.9 🔁 npm/@babel/generator@7.23.0 None 0 559 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/helper-compilation-targets@7.26.5 🔁 npm/@babel/helper-compilation-targets@7.22.15 environment +2 84.2 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.0 None 0 161 kB nicolo-ribaudo
npm/@babel/helper-string-parser@7.25.9 🔁 npm/@babel/helper-string-parser@7.22.5 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.22.15 None 0 11.8 kB nicolo-ribaudo
npm/@babel/helpers@7.26.9 🔁 npm/@babel/helpers@7.23.2 None 0 863 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/template@7.26.9 🔁 npm/@babel/template@7.22.15 None 0 70.3 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/traverse@7.26.9 🔁 npm/@babel/traverse@7.23.2 None +1 714 kB existentialism, hzoo, jlhwung, ...1 more
npm/@esbuild/aix-ppc64@0.25.0 None 0 11.3 MB esbuild, evanw
npm/@esbuild/android-arm@0.25.0 None 0 12.1 MB esbuild, evanw
npm/@esbuild/android-arm64@0.25.0 None 0 10.7 MB esbuild, evanw
npm/@esbuild/android-x64@0.25.0 None 0 12.1 MB esbuild, evanw
npm/@esbuild/darwin-arm64@0.25.0 None 0 9.8 MB esbuild, evanw
npm/@esbuild/darwin-x64@0.25.0 None 0 10.5 MB evanw
npm/@esbuild/freebsd-arm64@0.25.0 None 0 9.5 MB esbuild, evanw
npm/@esbuild/freebsd-x64@0.25.0 None 0 10.2 MB esbuild, evanw
npm/@esbuild/linux-arm@0.25.0 None 0 9.7 MB esbuild, evanw
npm/@esbuild/linux-arm64@0.25.0 None 0 9.57 MB esbuild, evanw
npm/@esbuild/linux-ia32@0.25.0 None 0 9.65 MB esbuild, evanw
npm/@esbuild/linux-loong64@0.25.0 None 0 9.9 MB esbuild, evanw
npm/@esbuild/linux-mips64el@0.25.0 None 0 11.1 MB evanw
npm/@esbuild/linux-ppc64@0.25.0 None 0 9.96 MB esbuild, evanw
npm/@esbuild/linux-riscv64@0.25.0 None 0 9.57 MB esbuild, evanw
npm/@esbuild/linux-s390x@0.25.0 None 0 10.7 MB esbuild, evanw
npm/@esbuild/linux-x64@0.25.0 None 0 10.2 MB esbuild, evanw
npm/@esbuild/netbsd-arm64@0.25.0 None 0 9.5 MB esbuild, evanw
npm/@esbuild/netbsd-x64@0.25.0 None 0 10.2 MB esbuild, evanw
npm/@esbuild/openbsd-arm64@0.25.0 None 0 9.57 MB esbuild, evanw
npm/@esbuild/openbsd-x64@0.25.0 None 0 10.2 MB esbuild, evanw
npm/@esbuild/sunos-x64@0.25.0 None 0 10.2 MB esbuild, evanw
npm/@esbuild/win32-arm64@0.25.0 None 0 9.64 MB esbuild, evanw
npm/@esbuild/win32-ia32@0.25.0 None 0 9.91 MB esbuild, evanw
npm/@esbuild/win32-x64@0.25.0 None 0 10.5 MB esbuild, evanw
npm/@istanbuljs/schema@0.1.3 🔁 npm/@istanbuljs/schema@0.1.2 None 0 17.2 kB coreyfarrell
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/@jridgewell/sourcemap-codec@1.5.0 🔁 npm/@jridgewell/sourcemap-codec@1.4.15 None 0 113 kB jridgewell
npm/@jridgewell/trace-mapping@0.3.25 🔁 npm/@jridgewell/trace-mapping@0.3.20 None 0 169 kB jridgewell
npm/@metamask/eslint-config-vitest@1.0.0 None 0 6.5 kB metamaskbot
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/@vitest/coverage-istanbul@3.0.7 None 0 13.7 kB vitestbot
npm/@vitest/eslint-plugin@1.1.35 None 0 283 kB antfu, oreanno, patak, ...2 more
npm/@vitest/expect@3.0.7 None 0 0 B
npm/@vitest/mocker@3.0.7 None +1 17.6 kB
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.1 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.30001550 None 0 0 B
npm/chai@5.2.0 None +1 575 kB chaijs
npm/check-error@2.1.1 None 0 11.4 kB chaijs
npm/deep-eql@5.0.2 None 0 23.9 kB chaijs
npm/detect-indent@7.0.1 🔁 npm/detect-indent@6.1.0 None 0 9.75 kB sindresorhus
npm/detect-newline@4.0.1 🔁 npm/detect-newline@3.1.0 None 0 3.96 kB sindresorhus
npm/electron-to-chromium@1.5.105 🔁 npm/electron-to-chromium@1.4.559 None 0 157 kB kilianvalkhof
npm/es-module-lexer@1.6.0 🔁 npm/es-module-lexer@1.5.4 None 0 91.3 kB guybedford
npm/esbuild@0.25.0 environment, filesystem, network, shell 0 134 kB evanw
npm/escalade@3.2.0 🔁 npm/escalade@3.1.1 None 0 12.4 kB lukeed
npm/expect-type@1.1.0 None 0 110 kB mmkale
npm/fdir@6.4.3 filesystem 0 45.2 kB thecodrr
npm/fsevents@2.3.3 🔁 npm/fsevents@2.3.2 None 0 173 kB pipobscure
npm/get-stdin@9.0.0 None 0 4.54 kB sindresorhus
npm/git-hooks-list@3.2.0 🔁 npm/git-hooks-list@1.0.3 None 0 5.51 kB fisker
npm/is-plain-obj@4.1.0 🔁 npm/is-plain-obj@2.1.0 None 0 4.08 kB sindresorhus
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@5.1.0 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.0 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/jackspeak@3.4.3 🔁 npm/jackspeak@2.3.6 None 0 297 kB isaacs
npm/jsesc@3.1.0 🔁 npm/jsesc@2.5.2 None 0 32.3 kB mathias
npm/magicast@0.3.5 filesystem +1 2.57 MB antfu
npm/make-dir@4.0.0 🔁 npm/make-dir@3.1.0 None 0 9.91 kB sindresorhus
npm/nanoid@3.3.8 🔁 npm/nanoid@3.3.6 None 0 57.1 kB ai
npm/node-releases@2.0.19 🔁 npm/node-releases@2.0.13 None 0 37.2 kB chicoxyzzy
npm/package-json-from-dist@1.0.1 None 0 36.5 kB isaacs
npm/path-scurry@1.11.1 🔁 npm/path-scurry@1.10.2 None 0 535 kB isaacs
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 🔁 npm/postcss@8.4.31 None 0 202 kB ai
npm/prettier-plugin-packagejson@2.5.8 🔁 npm/prettier-plugin-packagejson@2.3.0 None 0 5.55 kB matzkoh
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/sort-package-json@2.14.0 🔁 npm/sort-package-json@1.57.0 None 0 132 kB keithamus
npm/source-map-js@1.2.1 🔁 npm/source-map-js@1.0.2 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 🔁 npm/test-exclude@6.0.0 None 0 11.5 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/tinyglobby@0.2.12 None +1 85.2 kB
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.3 🔁 npm/update-browserslist-db@1.0.13 None 0 0 B
npm/vite-node@3.0.7 None 0 0 B
npm/vite@6.2.0 None 0 0 B
npm/vitest@3.0.7 None +1 467 kB
npm/why-is-node-running@2.3.0 filesystem, unsafe 0 7.3 kB mafintosh

🚮 Removed packages: npm/@babel/helper-environment-visitor@7.22.20, npm/@babel/helper-function-name@7.23.0, npm/@babel/helper-hoist-variables@7.22.5, npm/@babel/helper-simple-access@7.22.5, npm/@babel/helper-split-export-declaration@7.22.6, npm/@babel/highlight@7.22.20, npm/@babel/plugin-syntax-async-generators@7.8.4, npm/@babel/plugin-syntax-bigint@7.8.3, npm/@babel/plugin-syntax-class-properties@7.12.13, npm/@babel/plugin-syntax-import-meta@7.10.4, npm/@babel/plugin-syntax-json-strings@7.8.3, npm/@babel/plugin-syntax-logical-assignment-operators@7.10.4, npm/@babel/plugin-syntax-nullish-coalescing-operator@7.8.3, npm/@babel/plugin-syntax-numeric-separator@7.10.4, npm/@babel/plugin-syntax-object-rest-spread@7.8.3, npm/@babel/plugin-syntax-optional-catch-binding@7.8.3, npm/@babel/plugin-syntax-optional-chaining@7.8.3, npm/@babel/plugin-syntax-top-level-await@7.14.5, npm/@babel/plugin-syntax-typescript@7.22.5, npm/@bcoe/v8-coverage@0.2.3, npm/@inquirer/confirm@0.0.14-alpha.0, npm/@inquirer/core@0.0.15-alpha.0, npm/@inquirer/input@0.0.15-alpha.0, npm/@istanbuljs/load-nyc-config@1.1.0, npm/@jest/console@28.1.3, npm/@jest/core@28.1.3, npm/@jest/environment@28.1.3, npm/@jest/expect-utils@28.1.3, npm/@jest/expect@28.1.3, npm/@jest/fake-timers@28.1.3, npm/@jest/globals@28.1.3, npm/@jest/reporters@28.1.3, npm/@jest/schemas@28.1.3, npm/@jest/source-map@28.1.2, npm/@jest/test-result@28.1.3, npm/@jest/test-sequencer@28.1.3, npm/@jest/transform@28.1.3, npm/@jest/types@28.1.3, npm/@metamask/eslint-config-jest@14.0.0, npm/@sinclair/typebox@0.24.28, npm/@sinonjs/commons@1.8.1, npm/@sinonjs/fake-timers@9.1.2, npm/@types/babel__core@7.1.19, npm/@types/babel__generator@7.6.1, npm/@types/babel__template@7.0.2, npm/@types/babel__traverse@7.0.14, npm/@types/glob@7.1.3, npm/@types/graceful-fs@4.1.5, npm/@types/istanbul-lib-coverage@2.0.3, npm/@types/istanbul-lib-report@3.0.0, npm/@types/istanbul-reports@3.0.0, npm/@types/jest@28.1.7, npm/@types/prettier@2.4.4, npm/@types/stack-utils@2.0.0, npm/@types/yargs-parser@15.0.0, npm/@types/yargs@17.0.11, npm/ansi-colors@4.1.3, npm/babel-jest@28.1.3, npm/babel-plugin-istanbul@6.1.1, npm/babel-plugin-jest-hoist@28.1.3, npm/babel-preset-current-node-syntax@1.0.1, npm/babel-preset-jest@28.1.3, npm/bs-logger@0.2.6, npm/bser@2.1.1, npm/buffer-from@1.1.1, npm/ci-info@3.3.0, npm/cli-spinners@2.6.1, npm/cli-width@3.0.0, npm/co@4.6.0, npm/collect-v8-coverage@1.0.1, npm/convert-source-map@1.7.0, npm/dedent@0.7.0, npm/deepmerge@4.2.2, npm/diff-sequences@28.1.1, npm/dir-glob@3.0.1, npm/emittery@0.10.2, npm/escape-string-regexp@2.0.0, npm/eslint-plugin-jest@28.8.3, npm/exit@0.1.2, npm/expect@28.1.3, npm/fb-watchman@2.0.1, npm/get-package-type@0.1.0, npm/globby@10.0.0, npm/import-local@3.0.2, npm/is-generator-fn@2.1.0, npm/jest-changed-files@28.1.3, npm/jest-circus@28.1.3, npm/jest-cli@28.1.3, npm/jest-config@28.1.3, npm/jest-diff@28.1.3, npm/jest-docblock@28.1.1, npm/jest-each@28.1.3, npm/jest-environment-node@28.1.3, npm/jest-get-type@28.0.2, npm/jest-haste-map@28.1.3, npm/jest-it-up@2.0.2, npm/jest-leak-detector@28.1.3, npm/jest-matcher-utils@28.1.3, npm/jest-message-util@28.1.3, npm/jest-mock@28.1.3, npm/jest-pnp-resolver@1.2.2, npm/jest-regex-util@28.0.2, npm/jest-resolve-dependencies@28.1.3, npm/jest-resolve@28.1.3, npm/jest-runner@28.1.3, npm/jest-runtime@28.1.3, npm/jest-snapshot@28.1.3, npm/jest-util@28.1.3, npm/jest-validate@28.1.3, npm/jest-watcher@28.1.3, npm/jest-worker@28.1.3, npm/jest@28.1.3, npm/kleur@3.0.3, npm/leven@3.1.0, npm/lodash.memoize@4.1.2, npm/makeerror@1.0.12, npm/mute-stream@0.0.8, npm/node-int64@0.4.0, npm/p-try@2.2.0, npm/pirates@4.0.6, npm/pkg-dir@4.2.0, npm/pretty-format@28.1.3, npm/prompts@2.3.2, npm/react-is@18.2.0, npm/resolve-cwd@3.0.0, npm/resolve.exports@1.1.0, npm/run-async@2.4.1, npm/sisteransi@1.0.5, npm/slash@3.0.0, npm/source-map-support@0.5.13, npm/stack-utils@2.0.5, npm/string-length@4.0.1, npm/strip-bom@4.0.0, npm/terminal-link@2.1.1, npm/tmpl@1.0.5, npm/to-fast-properties@2.0.0, npm/ts-jest@28.0.8, npm/type-detect@4.0.8, npm/type-fest@0.11.0, npm/v8-to-istanbul@9.0.1, npm/walker@1.0.8

View full report↗︎

Have feedback? Participate in our User Experience Survey 📊

Copy link

socket-security bot commented Feb 26, 2025

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/tinypool@1.0.2, npm/tinyexec@0.3.2, npm/esbuild@0.25.0, npm/istanbul-lib-report@3.0.1

View full report↗︎

Next steps

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

Copy link
Member Author

Choose a reason for hiding this comment

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

This file demonstrates that Vitest has support for type tests out of the box. I figured it may be helpful to make developers aware of this.

@@ -1,6 +1,8 @@
import { describe, it, expect } from 'vitest';
Copy link
Member Author

Choose a reason for hiding this comment

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

Vitest doesn't inject globals like describe, it, expect by default. We could enable a setting for this, but I think importing is preferred over using globals.

Copy link
Member Author

Choose a reason for hiding this comment

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

Since Vite uses esbuild under the hood, tests aren't type checked by default. Using a separate tsconfig seemed to be the most reliable way to get type checking and tests working.

For example, if a test in a test-d.ts file fails, Vitest outputs the following error:

 FAIL  src/index.test-d.ts > greeter > returns a string
TypeCheckError: Type 'number' does not satisfy the constraint '"Expected number, Actual string"'.
 ❯ src/index.test-d.ts:7:49
      5| describe('greeter', () => {
      6|   it('returns a string', () => {
      7|     expectTypeOf(greeter('Huey')).toEqualTypeOf<number>();
       |                                                 ^
      8|   });
      9| });

And type errors in regular test files are detected as well, as unhandled source errors:

TypeCheckError: Type 'string' is not assignable to type 'number'.
 ❯ src/index.test.ts:7:11
      5| describe('greeter', () => {
      6|   it('greets', () => {
      7|     const name: number = 'Huey';
       |           ^
      8|     const result = greeter(name);
      9|     expect(result).toBe('Hello, Huey!');

Comment on lines +12 to +13
"skipLibCheck": true,
"skipDefaultLibCheck": true,
Copy link
Member Author

Choose a reason for hiding this comment

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

Vite's own declarations seem to rely on "dom" types. I don't think we should worry about Vite's declarations, and we can simply ignore checking those. These two options potentially speed up type checking slightly as well.

@Mrtenz
Copy link
Member Author

Mrtenz commented Feb 26, 2025

@SocketSecurity ignore npm/tinypool@1.0.2
@SocketSecurity ignore npm/tinyexec@0.3.2

These are expected to use child_process as they are used by Vitest.

@SocketSecurity ignore npm/esbuild@0.25.0

Network access is ok. Esbuild uses network access to download the right binary version depending on the platform.

@SocketSecurity ignore npm/istanbul-lib-report@3.0.1

New author is ok.

@Mrtenz Mrtenz marked this pull request as ready for review February 26, 2025 20:45
@Mrtenz Mrtenz requested a review from a team as a code owner February 26, 2025 20:45
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

This looks good, I just had a few questions.

"forceConsistentCasingInFileNames": true,
"lib": ["ES2023"],
"module": "ES2022",
"moduleResolution": "Bundler",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why use bundler here?

@@ -0,0 +1,19 @@
{
"compilerOptions": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth extending from tsconfig.json?

"esModuleInterop": true,
"exactOptionalPropertyTypes": true,
"forceConsistentCasingInFileNames": true,
"lib": ["ES2023"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Where does ES2023 come from, and why does module use a different number?

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.

2 participants