diff --git a/.changeset/spicy-terms-grin.md b/.changeset/spicy-terms-grin.md new file mode 100644 index 000000000..5394ac0e9 --- /dev/null +++ b/.changeset/spicy-terms-grin.md @@ -0,0 +1,5 @@ +--- +'providence-analytics': patch +--- + +Relative source path util take posix path for both full path and root path, to ensure the replace happens properly. diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 59b9ab57e..ca66be255 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -68,10 +68,11 @@ jobs: node-tests: name: Node tests - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: node-version: [12.x, 14.x] + os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v2 diff --git a/packages/providence-analytics/src/program/utils/relative-source-path.js b/packages/providence-analytics/src/program/utils/relative-source-path.js index 74bfcd6c3..347b7aacd 100644 --- a/packages/providence-analytics/src/program/utils/relative-source-path.js +++ b/packages/providence-analytics/src/program/utils/relative-source-path.js @@ -20,7 +20,7 @@ function isRelativeSourcePath(source) { * @param {string} rootPath like '/path/to/repo' */ function toRelativeSourcePath(fullPath, rootPath) { - return toPosixPath(fullPath).replace(rootPath, '.'); + return toPosixPath(fullPath).replace(toPosixPath(rootPath), '.'); } module.exports = { isRelativeSourcePath, toRelativeSourcePath };