Skip to content

Commit 053adbf

Browse files
committed
fix: windows test
1 parent c2d6774 commit 053adbf

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

lib/StencilContextAnalyzer.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fs from 'fs';
2-
import upath from 'path';
2+
import upath from 'upath';
33
import Paper from '@bigcommerce/stencil-paper';
44

55
class StencilContextAnalyzer {
@@ -322,9 +322,12 @@ class StencilContextAnalyzer {
322322

323323
this.variableUsage[variablePath].count += 1;
324324

325+
// Normalize path to Unix-style (forward slashes) for cross-platform consistency
326+
const normalizedPath = upath.toUnix(templatePath);
327+
325328
// Only add path if it's not already in the array
326-
if (!this.variableUsage[variablePath].paths.includes(templatePath)) {
327-
this.variableUsage[variablePath].paths.push(templatePath);
329+
if (!this.variableUsage[variablePath].paths.includes(normalizedPath)) {
330+
this.variableUsage[variablePath].paths.push(normalizedPath);
328331
}
329332
}
330333

0 commit comments

Comments
 (0)