@@ -205,42 +205,44 @@ export default defineConfig({
205
205
return new Promise ( async ( resolve , reject ) => {
206
206
try {
207
207
console . log ( 'Loading incremental validator module...' ) ;
208
-
208
+
209
209
// Use CommonJS require for better compatibility
210
- const { IncrementalValidator } = require ( './.github/scripts/incremental-validator.cjs' ) ;
210
+ const {
211
+ IncrementalValidator,
212
+ } = require ( './.github/scripts/incremental-validator.cjs' ) ;
211
213
console . log ( '✅ Incremental validator loaded successfully' ) ;
212
-
214
+
213
215
const validator = new IncrementalValidator ( ) ;
214
216
const results = await validator . validateFiles ( filePaths ) ;
215
217
resolve ( results ) ;
216
218
} catch ( error ) {
217
219
console . error ( `Incremental validation error: ${ error . message } ` ) ;
218
220
console . error ( `Stack: ${ error . stack } ` ) ;
219
-
221
+
220
222
// Don't fail the entire test run due to cache issues
221
223
// Fall back to validating all files
222
224
console . warn ( 'Falling back to validate all files without cache' ) ;
223
225
resolve ( {
224
226
validationStrategy : {
225
227
unchanged : [ ] ,
226
- changed : filePaths . map ( filePath => ( {
228
+ changed : filePaths . map ( ( filePath ) => ( {
227
229
filePath,
228
230
fileHash : 'unknown' ,
229
- links : [ ]
231
+ links : [ ] ,
230
232
} ) ) ,
231
233
newLinks : [ ] ,
232
- total : filePaths . length
234
+ total : filePaths . length ,
233
235
} ,
234
- filesToValidate : filePaths . map ( filePath => ( {
236
+ filesToValidate : filePaths . map ( ( filePath ) => ( {
235
237
filePath,
236
- fileHash : 'unknown'
238
+ fileHash : 'unknown' ,
237
239
} ) ) ,
238
240
cacheStats : {
239
241
totalFiles : filePaths . length ,
240
242
cacheHits : 0 ,
241
243
cacheMisses : filePaths . length ,
242
- hitRate : 0
243
- }
244
+ hitRate : 0 ,
245
+ } ,
244
246
} ) ;
245
247
}
246
248
} ) ;
@@ -249,7 +251,9 @@ export default defineConfig({
249
251
cacheValidationResults ( filePath , fileHash , results ) {
250
252
return new Promise ( async ( resolve , reject ) => {
251
253
try {
252
- const { IncrementalValidator } = require ( './.github/scripts/incremental-validator.cjs' ) ;
254
+ const {
255
+ IncrementalValidator,
256
+ } = require ( './.github/scripts/incremental-validator.cjs' ) ;
253
257
const validator = new IncrementalValidator ( ) ;
254
258
const success = await validator . cacheResults (
255
259
filePath ,
@@ -275,7 +279,9 @@ export default defineConfig({
275
279
} catch ( error ) {
276
280
console . error ( `URL transformation error: ${ error . message } ` ) ;
277
281
// Fallback: return the file path as-is if transformation fails
278
- console . warn ( `Using fallback URL transformation for: ${ filePath } ` ) ;
282
+ console . warn (
283
+ `Using fallback URL transformation for: ${ filePath } `
284
+ ) ;
279
285
resolve ( filePath ) ;
280
286
}
281
287
} ) ;
0 commit comments