Commit a897f99
authored
tests: silence
Node 22.12 enables `require(esm)` by default.
As part of this, the `module-sync` export condition gets used whereas in
22.11 that export condition gets ignored.
We've setup out package.json exports for `react-router` to use the
`module-sync` condition to point to the ESM version so that no matter
where you get `react-router` from you always get the same copy.
That's a good thing!
So in 22.11, you get a (duplicate) CJS version of `react-router`
and in 22.12 you get a (deduplicated) ESM version of `react-router`.
This is all intended behavior, but Node shipped this new default while
still logging warnings for `require(esm)` to stderr.
Since many of our integration tests check stderr for warnings, those
started failing.
Again, everything is working correctly (and better than in 22.11) so
this commit simply silences the experimental warnings from Node so that
our integration tests don't mistake expected Node warnings for
unexpected warnings/errors.require(esm) warnings for Node 22.12 (#12545)1 parent c9487e6 commit a897f99
2 files changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
| |||
0 commit comments