Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(scope-manager): migrate fromjest tovitest#10677

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
47 commits
Select commitHold shift + click to select a range
d5cd6ab
Install `vitest`
aryaemami59Jan 18, 2025
da8743f
Rename `jest.config.js` to `vitest.config.mts`
aryaemami59Jan 18, 2025
c81f4a6
chore(scope-manager): migrate to `vitest`
aryaemami59Jan 18, 2025
9075172
Update `vitest` to version 3.0.8
aryaemami59Mar 7, 2025
0774859
Fix Vitest config
aryaemami59Mar 7, 2025
acb87d8
Include `vitest.config.mts` in `tsconfig.spec.json`
aryaemami59Mar 8, 2025
ee81176
Add `vitest.config.mts` files to ESLint configuration
aryaemami59Mar 8, 2025
2e6ca49
Use `defineProject` instead of `defineConfig`
aryaemami59Mar 10, 2025
6b7c18f
Explicitly enable `resolveJsonModule`
aryaemami59Mar 10, 2025
c53aea8
Use `.replace` instead of `.split`
aryaemami59Mar 10, 2025
01d31d1
Type check `vitest.config.mts` files using project references.
aryaemami59Mar 10, 2025
38bbad5
Fix Vitest config
aryaemami59Mar 12, 2025
59cf7c5
Fix `typecheck` task
aryaemami59Mar 16, 2025
c620ae5
Update `vitest` to version 3.0.9
aryaemami59Mar 26, 2025
4a2f091
Update `@vitest/eslint-plugin` to version 1.1.38
aryaemami59Mar 26, 2025
cb58d7b
Update `vitest` to version 3.1.1
aryaemami59Mar 31, 2025
2bd4d35
Update `@vitest/eslint-plugin` to version 1.1.39
aryaemami59Apr 2, 2025
4470e91
Fix `knip` config
aryaemami59Apr 3, 2025
6d0b6bb
Update `vite` to version 6.2.5
aryaemami59Apr 3, 2025
467d464
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59Apr 7, 2025
dad38a7
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59Apr 10, 2025
b710354
Update `vite` to version 6.2.6
aryaemami59Apr 10, 2025
0b3bb37
Update `@vitest/eslint-plugin` to version 1.1.40
aryaemami59Apr 10, 2025
9d92962
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59Apr 10, 2025
7049c20
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59Apr 11, 2025
51aa1fc
Update `@vitest/eslint-plugin` to version 1.1.42
aryaemami59Apr 11, 2025
a5f46a0
Enable the new `vitest/prefer-describe-function-title` rule
aryaemami59Apr 11, 2025
1f6327b
Fix `scope-manager` tests
aryaemami59Apr 11, 2025
b7e8ca5
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59Apr 11, 2025
7acc9f0
Use `vitestPlugin.configs.env`
aryaemami59Apr 11, 2025
5c8c5e5
Include test `setupFiles` in ESLint config
aryaemami59Apr 11, 2025
aad0109
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59Apr 11, 2025
f33bf72
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59Apr 11, 2025
f382f9c
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59Apr 11, 2025
2128e85
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59Apr 11, 2025
fe0b2c3
Run `ast-spec:typecheck` during `postinstall`
aryaemami59Apr 11, 2025
3e9c2e1
Fix `ast-spec:test`
aryaemami59Apr 11, 2025
3bc0e8f
Fix `ast-spec:build`
aryaemami59Apr 11, 2025
0c6d484
Try disabling remote cache
aryaemami59Apr 12, 2025
1b2e0ac
Try disabling remote cache
aryaemami59Apr 12, 2025
b460a94
Update `typecheck` output path in `nx.json`
aryaemami59Apr 12, 2025
cfd2235
Fix `vitest` coverage output when run with `nx`
aryaemami59Apr 12, 2025
7b2aa04
Fix `scope-manager` tests
aryaemami59Apr 12, 2025
edc1b9d
Merge branch 'main'
JoshuaKGoldbergApr 14, 2025
9a26ce3
remove downlevel-dts line
JoshuaKGoldbergApr 14, 2025
b1aad69
remove postbuild in scope-manager package.json
JoshuaKGoldbergApr 14, 2025
45e2a9e
Merge branch 'main'
JoshuaKGoldbergApr 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletionseslint.config.mjs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,6 +37,8 @@ const vitestFiles = [
'packages/parser/tests/lib/**/*.test.{ts,tsx,cts,mts}',
'packages/parser/tests/test-utils/**/*.{ts,tsx,cts,mts}',
'packages/rule-tester/tests/**/*.test.{ts,tsx,cts,mts}',
'packages/scope-manager/tests/**/*.test.{ts,tsx,cts,mts}',
'packages/scope-manager/tests/test-utils/serializers/index.ts',
'packages/type-utils/tests/**/*.test.{ts,tsx,cts,mts}',
'packages/typescript-eslint/tests/**/*.test.{ts,tsx,cts,mts}',
'packages/utils/tests/**/*.test?(-d).{ts,tsx,cts,mts}',
Expand Down
14 changes: 13 additions & 1 deletionknip.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,11 @@ export default {
workspaces: {
'.': {
entry: ['tools/release/changelog-renderer.js', 'tools/scripts/**/*.mts'],
ignore: ['tools/scripts/typings/typescript.d.ts', 'typings/*.d.ts'],
ignore: [
'jest.config.base.js',
'tools/scripts/typings/typescript.d.ts',
'typings/*.d.ts',
],
ignoreDependencies: [
'@babel/code-frame',
'@babel/core',
Expand DownExpand Up@@ -78,6 +82,14 @@ export default {
},
'packages/scope-manager': {
ignore: ['tests/fixtures/**'],

vitest: {
config: ['vitest.config.mts'],
entry: [
'tests/**/*.{bench,test,test-d}.?(c|m)ts?(x)',
'tests/test-utils/serializers/index.ts',
],
},
},
'packages/type-utils': {
ignore: ['tests/fixtures/**', 'typings/typescript.d.ts'],
Expand Down
14 changes: 0 additions & 14 deletionspackages/scope-manager/jest.config.js
View file
Open in desktop

This file was deleted.

16 changes: 7 additions & 9 deletionspackages/scope-manager/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,29 +37,27 @@
"estree"
],
"scripts": {
"build": "npx nxbuild",
"clean": "npx nx clean",
"clean-fixtures": "npx nx clean-fixtures",
"build": "tsc -b tsconfig.build.json",
"clean": "rimraf dist/ _ts4.3/ coverage/",
"clean-fixtures": "rimraf -g \"./src/**/fixtures/**/snapshots\"",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"generate-lib": "npx nx generate-lib repo",
"lint": "npx nx lint",
"test": "jest",
"test": "vitest --run --config=$INIT_CWD/vitest.config.mts",
"check-types": "npx nx typecheck"
},
"dependencies": {
"@typescript-eslint/types": "8.29.1",
"@typescript-eslint/visitor-keys": "8.29.1"
},
"devDependencies": {
"@jest/types": "29.6.3",
"@typescript-eslint/typescript-estree": "8.29.1",
"@vitest/coverage-v8": "^3.1.1",
"glob": "*",
"jest": "29.7.0",
"jest-specific-snapshot": "*",
"make-dir": "*",
"prettier": "^3.2.5",
"pretty-format": "*",
"typescript": "*"
"typescript": "*",
"vitest": "^3.1.1"
},
"funding": {
"type": "opencollective",
Expand Down
36 changes: 2 additions & 34 deletionspackages/scope-manager/project.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,16 @@
{
"name": "scope-manager",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"root": "packages/scope-manager",
"sourceRoot": "packages/scope-manager/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"executor": "nx:run-commands",
"outputs": ["{projectRoot}/dist"],
"options": {
"parallel": false,
"cwd": "packages/scope-manager",
"commands": ["tsc -b tsconfig.build.json"]
}
},
"clean": {
"executor": "nx:run-commands",
"options": {
"parallel": false,
"cwd": "packages/scope-manager",
"commands": [
"tsc -b tsconfig.build.json --clean",
"rimraf dist",
"rimraf coverage"
]
}
},
"clean-fixtures": {
"executor": "nx:run-commands",
"options": {
"parallel": false,
"cwd": "packages/scope-manager",
"commands": ["rimraf -g \"./src/**/fixtures/**/snapshots\""]
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "packages/scope-manager/jest.config.js"
}
"executor": "@nx/vite:test"
}
}
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,7 @@ describe('Class fields', () => {
expect(classFieldInitializerScope.variables).toHaveLength(0);
});

describe('class C { f }', () => {
it('class C { f }', () => {
const { scopeManager } = parseAndAnalyze('class C { f }');

const globalScope = scopeManager.scopes[0];
Expand All@@ -57,7 +57,7 @@ describe('Class fields', () => {
expect(classScope.variables[0].name).toBe('C');
});

describe('class C { [fname] }', () => {
it('class C { [fname] }', () => {
const { scopeManager } = parseAndAnalyze('class C { [fname] }');

const globalScope = scopeManager.scopes[0];
Expand All@@ -72,7 +72,7 @@ describe('Class fields', () => {
expect(classScope.childScopes).toHaveLength(0);
});

describe('class C { [fname] = value }', () => {
it('class C { [fname] = value }', () => {
const { scopeManager } = parseAndAnalyze('class C { [fname] = value }');

const globalScope = scopeManager.scopes[0];
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp