Unverified Commit 03ecbcf1 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

Remove some watcher hacks and update version (#31768)



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
parent 1bc9b1ac
...@@ -162,10 +162,6 @@ jobs: ...@@ -162,10 +162,6 @@ jobs:
- run: npm i -g playwright-chromium@1.14.1 && npx playwright install-deps - run: npm i -g playwright-chromium@1.14.1 && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}} 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 - run: node run-tests.js --type development
name: Run test/development name: Run test/development
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -214,10 +210,6 @@ jobs: ...@@ -214,10 +210,6 @@ jobs:
- run: npm i -g playwright-chromium@1.14.1 && npx playwright install-deps - run: npm i -g playwright-chromium@1.14.1 && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}} 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 - run: node run-tests.js --type production
name: Run test/production name: Run test/production
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -261,10 +253,6 @@ jobs: ...@@ -261,10 +253,6 @@ jobs:
- run: npm i -g playwright-chromium@1.14.1 && npx playwright install-deps - run: npm i -g playwright-chromium@1.14.1 && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}} 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 - run: xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/6
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
...@@ -300,10 +288,6 @@ jobs: ...@@ -300,10 +288,6 @@ jobs:
name: next-swc-dev-binary name: next-swc-dev-binary
path: packages/next-swc/native 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 - run: cd test/integration/with-electron/app && yarn
if: ${{needs.build.outputs.docsChange != 'docs only change'}} if: ${{needs.build.outputs.docsChange != 'docs only change'}}
......
...@@ -44,9 +44,6 @@ jobs: ...@@ -44,9 +44,6 @@ jobs:
path: ./* path: ./*
key: ${{ github.sha }}-react-experimental 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 playwright-chromium@1.14.1 && npx playwright install-deps - run: npm i -g playwright-chromium@1.14.1 && npx playwright install-deps
- run: node run-tests.js --timings -g ${{ matrix.group }}/6 - run: node run-tests.js --timings -g ${{ matrix.group }}/6
...@@ -44,9 +44,6 @@ jobs: ...@@ -44,9 +44,6 @@ jobs:
path: ./* path: ./*
key: ${{ github.sha }}-react-next 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 playwright-chromium@1.14.1 && npx playwright install-deps - run: npm i -g playwright-chromium@1.14.1 && npx playwright install-deps
- run: node run-tests.js --timings -g ${{ matrix.group }}/6 - run: node run-tests.js --timings -g ${{ matrix.group }}/6
...@@ -54,6 +54,11 @@ import { getRawPageExtensions } from './utils' ...@@ -54,6 +54,11 @@ import { getRawPageExtensions } from './utils'
import browserslist from 'browserslist' import browserslist from 'browserslist'
import loadJsConfig from './load-jsconfig' import loadJsConfig from './load-jsconfig'
const watchOptions = Object.freeze({
aggregateTimeout: 5,
ignored: ['**/.git/**', '**/node_modules/**', '**/.next/**'],
})
function getSupportedBrowsers( function getSupportedBrowsers(
dir: string, dir: string,
isDevelopment: boolean isDevelopment: boolean
...@@ -941,8 +946,6 @@ export default async function getBaseWebpackConfig( ...@@ -941,8 +946,6 @@ export default async function getBaseWebpackConfig(
// Default behavior: bundle the code! // Default behavior: bundle the code!
} }
const emacsLockfilePattern = '**/.#*'
const codeCondition = { const codeCondition = {
test: /\.(tsx|ts|js|cjs|mjs|jsx)$/, test: /\.(tsx|ts|js|cjs|mjs|jsx)$/,
...(config.experimental.externalDir ...(config.experimental.externalDir
...@@ -1095,16 +1098,7 @@ export default async function getBaseWebpackConfig( ...@@ -1095,16 +1098,7 @@ export default async function getBaseWebpackConfig(
...entrypoints, ...entrypoints,
} }
}, },
watchOptions: { watchOptions,
aggregateTimeout: 5,
ignored: [
'**/.git/**',
'**/node_modules/**',
'**/.next/**',
// can be removed after https://github.com/paulmillr/chokidar/issues/955 is released
emacsLockfilePattern,
],
},
output: { output: {
// we must set publicPath to an empty value to override the default of // we must set publicPath to an empty value to override the default of
// auto which doesn't work in IE11 // auto which doesn't work in IE11
......
This diff is collapsed.
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
"use-subscription": "1.5.1", "use-subscription": "1.5.1",
"util": "0.12.4", "util": "0.12.4",
"vm-browserify": "1.1.2", "vm-browserify": "1.1.2",
"watchpack": "2.1.1" "watchpack": "2.3.0"
}, },
"peerDependencies": { "peerDependencies": {
"fibers": ">= 3.1.0", "fibers": ">= 3.1.0",
......
...@@ -19884,10 +19884,10 @@ watchpack-chokidar2@^2.0.0: ...@@ -19884,10 +19884,10 @@ watchpack-chokidar2@^2.0.0:
dependencies: dependencies:
chokidar "^2.1.8" chokidar "^2.1.8"
watchpack@2.1.1: watchpack@2.3.0, watchpack@^2.2.0:
version "2.1.1" version "2.3.0"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.1.1.tgz#e99630550fca07df9f90a06056987baa40a689c7" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.0.tgz#a41bca3da6afaff31e92a433f4c856a0c25ea0c4"
integrity sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw== integrity sha512-MnN0Q1OsvB/GGHETrFeZPQaOelWh/7O+EiFlj8sM9GPjtQkis7k01aAxrg/18kTfoIVcLL+haEVFlXDaSRwKRw==
dependencies: dependencies:
glob-to-regexp "^0.4.1" glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2" graceful-fs "^4.1.2"
...@@ -19903,14 +19903,6 @@ watchpack@^1.7.4: ...@@ -19903,14 +19903,6 @@ watchpack@^1.7.4:
chokidar "^3.4.1" chokidar "^3.4.1"
watchpack-chokidar2 "^2.0.0" watchpack-chokidar2 "^2.0.0"
watchpack@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.2.0.tgz#47d78f5415fe550ecd740f99fe2882323a58b1ce"
integrity sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==
dependencies:
glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2"
wcwidth@^1.0.0, wcwidth@^1.0.1: wcwidth@^1.0.0, wcwidth@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment