Skip to content

Commit

Permalink
add pnpm files to watch ignore list (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz authored May 10, 2023
1 parent 4740c02 commit d81c2e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .changeset/rotten-ducks-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@cloudflare/next-on-pages': patch
---

add pnpm files to ignored list for watch mode

add the following files to the list of files we ignore for watch mode:

- `pnpm-lock.yaml`: for consistency since all the other lock files are ignored
- `.pnpm-store`: to prevent potential infinite loops (https://github.com/cloudflare/next-on-pages/issues/212)
- `_tmp_*`: to prevent infinite loops, this is needed because pnpm saves/deletes temporary files to get the relative path to its store (https://github.com/pnpm/pnpm/blob/3f85e75dad4f5560a17367e5faad5a387bd47d05/store/store-path/src/index.ts#L41), such files start with `_tmp_` (see: https://github.com/zkochan/packages/blob/f559aef5b63c2477dd72ce156f35d6111af780f6/path-temp/index.js#L6)
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ function setWatchMode(fn: () => void): void {
'.wrangler',
'package-lock.json',
'yarn.lock',
'pnpm-lock.yaml',
'.pnpm-store',
'_tmp_*',
],
ignoreInitial: true,
}).on('all', fn);
Expand Down

0 comments on commit d81c2e3

Please sign in to comment.