@stencil/vitest 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.js +11 -1
- package/package.json +2 -2
package/dist/config.js
CHANGED
|
@@ -162,6 +162,16 @@ function applyStencilDefaults(config, stencilConfig) {
|
|
|
162
162
|
if (!result.server.watch) {
|
|
163
163
|
result.server.watch = {};
|
|
164
164
|
}
|
|
165
|
+
// Ignore source map files to prevent unnecessary test re-runs
|
|
166
|
+
// Stencil may touch .map files without changing content, triggering Vite's watcher
|
|
167
|
+
if (!result.server.watch.ignored) {
|
|
168
|
+
result.server.watch.ignored = [];
|
|
169
|
+
}
|
|
170
|
+
const ignoredArray = Array.isArray(result.server.watch.ignored)
|
|
171
|
+
? result.server.watch.ignored
|
|
172
|
+
: [result.server.watch.ignored];
|
|
173
|
+
const mapIgnorePatterns = ['**/*.map', '**/*.map.js', '**/dist/**/*.d.ts'];
|
|
174
|
+
result.server.watch.ignored = [...new Set([...ignoredArray, ...mapIgnorePatterns])];
|
|
165
175
|
// Ensure test config exists
|
|
166
176
|
if (!result.test) {
|
|
167
177
|
result.test = {};
|
|
@@ -195,7 +205,7 @@ function applyStencilDefaults(config, stencilConfig) {
|
|
|
195
205
|
const existingTriggers = Array.isArray(result.test.forceRerunTriggers)
|
|
196
206
|
? result.test.forceRerunTriggers
|
|
197
207
|
: [result.test.forceRerunTriggers];
|
|
198
|
-
const outputDirTriggers = outputDirs.map((dir) => `**/${dir}
|
|
208
|
+
const outputDirTriggers = outputDirs.map((dir) => `**/${dir}/**/*.js`);
|
|
199
209
|
result.test.forceRerunTriggers = [...new Set([...existingTriggers, ...outputDirTriggers])];
|
|
200
210
|
// Add globals if not set
|
|
201
211
|
if (result.test.globals === undefined) {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "https://github.com/stenciljs/vitest"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.6.
|
|
7
|
+
"version": "1.6.2",
|
|
8
8
|
"description": "First-class testing utilities for Stencil design systems with Vitest",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"type": "module",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"jiti": "^2.6.1",
|
|
99
99
|
"local-pkg": "^1.1.2",
|
|
100
|
-
"vitest-environment-stencil": "1.6.
|
|
100
|
+
"vitest-environment-stencil": "1.6.2"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@eslint/js": "^9.39.2",
|