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

Remove some watcher hacks and update version #31768

Merged
merged 5 commits into from
Nov 25, 2021
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
16 changes: 0 additions & 16 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ jobs:
- run: npm i -g [email protected] && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: node run-tests.js --type development
name: Run test/development
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
Expand Down Expand Up @@ -214,10 +210,6 @@ jobs:
- run: npm i -g [email protected] && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: node run-tests.js --type production
name: Run test/production
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
Expand Down Expand Up @@ -261,10 +253,6 @@ jobs:
- run: npm i -g [email protected] && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/6
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

Expand Down Expand Up @@ -300,10 +288,6 @@ jobs:
name: next-swc-dev-binary
path: packages/next-swc/native

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: cd test/integration/with-electron/app && yarn
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test_react_experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
path: ./*
key: ${{ github.sha }}-react-experimental

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

- run: npm i -g [email protected] && npx playwright install-deps

- run: node run-tests.js --timings -g ${{ matrix.group }}/6
3 changes: 0 additions & 3 deletions .github/workflows/test_react_next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
path: ./*
key: ${{ github.sha }}-react-next

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

- run: npm i -g [email protected] && npx playwright install-deps

- run: node run-tests.js --timings -g ${{ matrix.group }}/6
18 changes: 6 additions & 12 deletions packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ import { getRawPageExtensions } from './utils'
import browserslist from 'browserslist'
import loadJsConfig from './load-jsconfig'

const watchOptions = Object.freeze({
aggregateTimeout: 5,
ignored: ['**/.git/**', '**/node_modules/**', '**/.next/**'],
})

function getSupportedBrowsers(
dir: string,
isDevelopment: boolean
Expand Down Expand Up @@ -941,8 +946,6 @@ export default async function getBaseWebpackConfig(
// Default behavior: bundle the code!
}

const emacsLockfilePattern = '**/.#*'

const codeCondition = {
test: /\.(tsx|ts|js|cjs|mjs|jsx)$/,
...(config.experimental.externalDir
Expand Down Expand Up @@ -1095,16 +1098,7 @@ export default async function getBaseWebpackConfig(
...entrypoints,
}
},
watchOptions: {
aggregateTimeout: 5,
ignored: [
'**/.git/**',
'**/node_modules/**',
'**/.next/**',
// can be removed after https://github.com/paulmillr/chokidar/issues/955 is released
emacsLockfilePattern,
],
},
watchOptions,
output: {
// we must set publicPath to an empty value to override the default of
// auto which doesn't work in IE11
Expand Down
Loading