Skip to content

chore(tsconfig-utils): sync vitest config with latest setup #11239

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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
f61d1f3
chore(`tsconfig-utils`): sync `vitest` config with latest setup
aryaemami59 May 21, 2025
756ae7d
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 May 27, 2025
7c54967
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 May 29, 2025
e4c2c3b
revert dependency changes
aryaemami59 May 30, 2025
a162165
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 May 30, 2025
2e7e7a8
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jun 2, 2025
7e63053
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jun 3, 2025
b0d0f91
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jun 5, 2025
cc5f2b0
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jun 24, 2025
25ff238
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jun 30, 2025
65ad42f
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jul 1, 2025
454d253
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jul 1, 2025
a931bcd
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jul 2, 2025
e827cad
Merge branch 'main' into chore/tsconfig-utils-vitest-migration
kirkwaiblinger Jul 14, 2025
0bbbaa7
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jul 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path';
import * as path from 'node:path';
import * as ts from 'typescript';

import { getParsedConfigFile } from '../../src/getParsedConfigFile';
import { getParsedConfigFile } from '../src/getParsedConfigFile.js';

const mockGetParsedCommandLineOfConfigFile = vi.fn();

Expand All @@ -22,9 +22,9 @@ describe(getParsedConfigFile, () => {
});

it('throws an error when tsserver.sys is undefined', () => {
expect(() =>
getParsedConfigFile({} as typeof ts, './tsconfig.json'),
).toThrow(
expect(() => {
getParsedConfigFile({} as typeof ts, './tsconfig.json');
}).toThrow(
'`getParsedConfigFile` is only supported in a Node-like environment.',
);
});
Expand Down Expand Up @@ -72,9 +72,9 @@ describe(getParsedConfigFile, () => {
},
] satisfies ts.Diagnostic[],
});
expect(() => getParsedConfigFile(mockTsserver, './tsconfig.json')).toThrow(
/.+ error TS1234: Oh no!/,
);
expect(() => {
getParsedConfigFile(mockTsserver, './tsconfig.json');
}).toThrow(/.+ error TS1234: Oh no!/);
});

it('throws a diagnostic error when getParsedCommandLineOfConfigFile throws an error', () => {
Expand All @@ -96,9 +96,9 @@ describe(getParsedConfigFile, () => {
} satisfies ts.Diagnostic);
},
);
expect(() => getParsedConfigFile(mockTsserver, './tsconfig.json')).toThrow(
/.+ error TS1234: Oh no!/,
);
expect(() => {
getParsedConfigFile(mockTsserver, './tsconfig.json');
}).toThrow(/.+ error TS1234: Oh no!/);
});

it('uses compiler options when parsing a config file succeeds', () => {
Expand Down
13 changes: 2 additions & 11 deletions packages/tsconfig-utils/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
"emitDeclarationOnly": false,
"types": ["node"]
},
"include": ["src/**/*.ts", "typings"],
"exclude": ["vitest.config.mts", "src/**/*.spec.ts", "src/**/*.test.ts"],
"extends": "../../tsconfig.build.json",
"compilerOptions": {},
"references": []
}
14 changes: 1 addition & 13 deletions packages/tsconfig-utils/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc/packages/tsconfig-utils",
"module": "NodeNext",
"resolveJsonModule": true,
"types": ["node", "vitest/globals", "vitest/importMeta"]
"outDir": "../../dist/packages/tsconfig-utils"
},
"include": [
"vitest.config.mts",
"package.json",
"src/**/*.test.ts",
"src/**/*.spec.ts",
"src/**/*.d.ts",
"tests"
],
"exclude": ["**/fixtures/**"],
"references": [
{
"path": "./tsconfig.build.json"
Expand Down
5 changes: 0 additions & 5 deletions packages/tsconfig-utils/vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@ const vitestConfig = mergeConfig(
root: import.meta.dirname,

test: {
diff: {
maxDepth: 1,
},

dir: path.join(import.meta.dirname, 'tests'),
name: packageJson.name.replace('@typescript-eslint/', ''),
root: import.meta.dirname,
testTimeout: 10_000,
},
}),
);
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy