Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
fix: Watch mode not working on Windows (#26)
Browse files Browse the repository at this point in the history
* chore: Update setup-node action to v1.4.4

- v1.4.2 used the add-path command which was deprecated and disabled due to a security vulnerability
- This was causing consumer workflows to fail

* fix: Watch mode not working on Windows
  • Loading branch information
stephan-noel authored Dec 4, 2020
1 parent dc9cc65 commit 1967429
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].4

- name: Install dependencies
run: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].4
with:
registry-url: 'https://registry.npmjs.org'
scope: '@garment'
Expand Down
3 changes: 2 additions & 1 deletion core/garment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"memfs": "^3.1.2",
"multimatch": "^4.0.0",
"tempy": "0.3.0",
"unionfs": "^4.4.0"
"unionfs": "^4.4.0",
"normalize-path": "^3.0.0"
},
"files": [
"lib",
Expand Down
5 changes: 3 additions & 2 deletions core/garment/src/garment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { dependencyGraphFromWorkspace } from './dependencyGraphFromWorkspace';
import { FileCache } from './FileCache';
import { getProjectsByName } from './getProjectsByName';
import globby = require('globby');
import normalizePath = require('normalize-path');

export type Cache =
| {
Expand Down Expand Up @@ -919,7 +920,7 @@ async function garmentFromWorkspace(

if (
subscription.type === 'glob' &&
event.path.startsWith(subscription.input.rootDir)
normalizePath(event.path).startsWith(subscription.input.rootDir)
) {
const matched = multimatch(
event.path,
Expand All @@ -928,7 +929,7 @@ async function garmentFromWorkspace(
)
);
if (matched.length) {
changesBySubscription[event.path] = event.type;
changesBySubscription[normalizePath(event.path)] = event.type;
changesBySubscriptionMap.set(subscription, changesBySubscription);
}
} else if (
Expand Down

0 comments on commit 1967429

Please sign in to comment.