-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(visitor-keys): migrate from jest
to vitest
#10773
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
JoshuaKGoldberg
merged 39 commits into
typescript-eslint:main
from
aryaemami59:chore/visitor-keys-vitest-migration
Apr 10, 2025
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
900804d
Install `vitest`
aryaemami59 9e01b88
Rename `jest.config.js` to `vitest.config.mts`
aryaemami59 943cea4
chore(visitor-keys): migrate to `vitest`
aryaemami59 10b1fb1
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 76b61ae
Update `vitest` to version 3.0.8
aryaemami59 9b31dc6
Remove `vitest/no-done-callback` as it is deprecated.
aryaemami59 78bd0b1
Fix Vitest config
aryaemami59 e6950ca
Include `vitest.config.mts` in `tsconfig.spec.json`
aryaemami59 37317ac
Add `vitest.config.mts` files to ESLint configuration
aryaemami59 1646f3d
Use `defineProject` instead of `defineConfig`
aryaemami59 fa20bb8
Simplify `workspace` and `coverage.exclude`
aryaemami59 7dbfcb0
Explicitly enable `resolveJsonModule`
aryaemami59 04a2e1a
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 3ad8f00
Use `.replace` instead of `.split`
aryaemami59 3cecd1e
Type check `vitest.config.mts` files using project references.
aryaemami59 78aa2d5
Fix `@nx/vite/plugin` usage in `nx.json`
aryaemami59 9410d8b
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 cc90c67
Update `@vitest/eslint-plugin` to version 1.1.37
aryaemami59 593c863
Fix Vitest config
aryaemami59 c05f436
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 3dee53e
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 6324278
Update `vite` to version 6.2.2
aryaemami59 008698e
Fix `typecheck` task
aryaemami59 c806ec9
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 6600e84
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 e8e1baf
Update `vitest` to version 3.0.9
aryaemami59 bd97ae0
Update `@vitest/eslint-plugin` to version 1.1.38
aryaemami59 86fa55b
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 f36c314
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 434d13f
Update `vitest` to version 3.1.1
aryaemami59 a90d7c3
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 237a701
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 53bf358
Move `nonIgnoredKeys` out of the `describe` block
aryaemami59 c81cbab
Update `@vitest/eslint-plugin` to version 1.1.39
aryaemami59 a61e8fc
Fix `knip` config
aryaemami59 94b1cd1
Update `vite` to version 6.2.5
aryaemami59 734dc65
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 b497d0c
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 e7ad033
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
{ | ||
"name": "visitor-keys", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"type": "library", | ||
"implicitDependencies": [], | ||
"projectType": "library", | ||
"root": "packages/visitor-keys", | ||
"sourceRoot": "packages/visitor-keys/src", | ||
"targets": { | ||
"lint": { | ||
"executor": "@nx/eslint:lint", | ||
"outputs": ["{options.outputFile}"] | ||
}, | ||
"test": { | ||
"executor": "@nx/vite:test" | ||
} | ||
} | ||
} |
aryaemami59 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import * as path from 'node:path'; | ||
import { defineProject, mergeConfig } from 'vitest/config'; | ||
|
||
import { vitestBaseConfig } from '../../vitest.config.base.mjs'; | ||
import packageJson from './package.json' with { type: 'json' }; | ||
|
||
const vitestConfig = mergeConfig( | ||
vitestBaseConfig, | ||
|
||
defineProject({ | ||
root: import.meta.dirname, | ||
|
||
test: { | ||
dir: path.join(import.meta.dirname, 'tests'), | ||
name: packageJson.name.replace('@typescript-eslint/', ''), | ||
root: import.meta.dirname, | ||
}, | ||
}), | ||
); | ||
|
||
export default vitestConfig; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't change the result but since we have
vite
in ourdevDependencies
, the vite plugin forknip
still infers that that this is avite
project which is not accurate, on top of thatknip
has to do a little bit less work which makes things a teeny tiny bit faster.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okie dokie, makes sense. I think as a followup once all projects are converted it might be good to look into removing both the devDependency and this project. Not a blocker for this PR IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, We do need
vite
as a devDependency since We're using@nx/vite
.