Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore package json on 6.5.x #728

Merged
merged 3 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Setup node
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -40,11 +40,11 @@ jobs:
needs: build
strategy:
matrix:
node: [10, 12] # add 14 when we drop support for webpack 4 as fsevents 1 is not compatible with node 14
node: [12] # add 14 when we drop support for webpack 4 as fsevents 1 is not compatible with node 14
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1

- name: Setup node
uses: actions/setup-node@v1
with:
Expand All @@ -61,7 +61,7 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --frozen-lockfile

Expand All @@ -76,7 +76,7 @@ jobs:

- name: Run e2e tests
run: yarn test:e2e

release:
runs-on: ubuntu-latest
env:
Expand All @@ -86,7 +86,7 @@ jobs:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta')
steps:
- uses: actions/checkout@v1

- name: Setup node
uses: actions/setup-node@v1
with:
Expand Down
1 change: 1 addition & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
branches: [
'+([0-9])?(.{+([0-9]),x}).x',
'main',
{
name: 'alpha',
Expand Down
5 changes: 5 additions & 0 deletions src/watch/InclusiveNodeWatchFileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { clearFilesChange, updateFilesChange } from '../reporter';
import minimatch from 'minimatch';

const BUILTIN_IGNORED_DIRS = ['node_modules', '.git', '.yarn', '.pnp'];
// we ignore package.json file because of https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/674
const BUILTIN_IGNORED_FILES = ['package.json'];

function createIsIgnored(
ignored: WatchFileSystemOptions['ignored'] | undefined,
Expand All @@ -32,6 +34,9 @@ function createIsIgnored(
ignoredFunctions.push((path: string) =>
BUILTIN_IGNORED_DIRS.some((ignoredDir) => path.includes(`/${ignoredDir}/`))
);
ignoredFunctions.push((path: string) =>
BUILTIN_IGNORED_FILES.some((ignoredFile) => path.endsWith(`/${ignoredFile}`))
);

return function isIgnored(path: string) {
return ignoredFunctions.some((ignoredFunction) => ignoredFunction(path));
Expand Down