Skip to content

Commit 1ddde63

Browse files
committed
build: adjust dts test setup
1 parent d10a81e commit 1ddde63

28 files changed

+50
-45
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = {
3232
overrides: [
3333
// tests, no restrictions (runs in Node / jest with jsdom)
3434
{
35-
files: ['**/__tests__/**', 'test-dts/**'],
35+
files: ['**/__tests__/**', 'packages/dts-test/**'],
3636
rules: {
3737
'no-restricted-globals': 'off',
3838
'no-restricted-syntax': 'off',

package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"test-unit": "vitest -c vitest.unit.config.ts",
1818
"test-e2e": "node scripts/build.mjs vue -f global -d && vitest -c vitest.e2e.config.ts",
1919
"test-dts": "run-s build-dts test-dts-only",
20-
"test-dts-only": "tsc -p ./test-dts/tsconfig.build.json",
20+
"test-dts-only": "tsc -p ./packages/dts-test/tsconfig.test.json",
2121
"test-coverage": "vitest -c vitest.unit.config.ts --coverage",
2222
"release": "node scripts/release.mjs",
2323
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
@@ -37,7 +37,6 @@
3737
"preinstall": "node ./scripts/preinstall.mjs",
3838
"postinstall": "simple-git-hooks"
3939
},
40-
"types": "test-dts/index.d.ts",
4140
"simple-git-hooks": {
4241
"pre-commit": "pnpm lint-staged && pnpm check",
4342
"commit-msg": "node scripts/verifyCommit.mjs"
@@ -69,9 +68,6 @@
6968
"@typescript-eslint/parser": "^5.23.0",
7069
"@vitest/coverage-istanbul": "^0.28.2",
7170
"@vue/consolidate": "0.17.3",
72-
"@vue/reactivity": "workspace:*",
73-
"@vue/runtime-core": "workspace:*",
74-
"@vue/runtime-dom": "workspace:*",
7571
"brotli": "^1.3.2",
7672
"chalk": "^4.1.0",
7773
"conventional-changelog-cli": "^2.0.31",
@@ -105,7 +101,6 @@
105101
"tslib": "^2.4.0",
106102
"typescript": "^4.9.0",
107103
"vite": "^4.0.4",
108-
"vitest": "^0.28.2",
109-
"vue": "workspace:*"
104+
"vitest": "^0.28.2"
110105
}
111106
}

packages/dts-test/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# dts-test
2+
3+
Tests Typescript types to ensure the types remain as expected.
4+
5+
- This directory is included in the root `tsconfig.json`, where package imports are aliased to `src` directories, so in IDEs and the `pnpm check` script the types are validated against source code.
6+
7+
- When runnong `tsc` with `packages/dts-test/tsconfig.test.json`, packages are resolved using using normal `node` resolution, so the types are validated against actual **built** types. This requires the types to be built first via `pnpm build-types`.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)