Repository navigation
chore(deps): update dependencies, rechoir v1 and ejs v7; harden stderr assertions #4873
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
Merged
+5,521
−6,906
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
cb662f9
chore(deps): update dependencies within their current majors
claude de6bd2f
chore(deps): update rechoir to v1 and ejs to v7
claude 321ed2a
test: drop multi-line Node.js warnings in cleanStderr
claude 9cadf5d
ci: drop Node.js 25 from the test matrix
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "create-webpack-app": patch | ||
| --- | ||
|
|
||
| chore: update `ejs` to v7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "webpack-cli": patch | ||
| --- | ||
|
|
||
| chore: update `rechoir` to v1, which resolves loaders with Node.js's own resolver and drops the `resolve` dependency |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| "use strict"; | ||
|
|
||
| const { cleanStderr } = require("../utils/test-utils"); | ||
|
|
||
| const TRACE_WARNINGS_HINT = | ||
| "(Use `node --trace-warnings ...` to show where the warning was created)"; | ||
| const TRACE_DEPRECATION_HINT = | ||
| "(Use `node --trace-deprecation ...` to show where the warning was created)"; | ||
|
|
||
| describe("cleanStderr", () => { | ||
| it("should return non-string values as is", () => { | ||
| expect(cleanStderr(undefined)).toBeUndefined(); | ||
| }); | ||
|
|
||
| it("should drop a Node.js experimental warning and its hint", () => { | ||
| expect( | ||
| cleanStderr( | ||
| `(node:1) ExperimentalWarning: Type Stripping is experimental\n${TRACE_WARNINGS_HINT}\n`, | ||
| ), | ||
| ).toBe(""); | ||
| }); | ||
|
|
||
| it("should drop a multi-line Node.js warning up to its hint", () => { | ||
| expect( | ||
| cleanStderr( | ||
| `(node:1) ExperimentalWarning: first line\nsecond line\n${TRACE_WARNINGS_HINT}\n(node:1) ExperimentalWarning: again\n`, | ||
| ), | ||
| ).toBe(""); | ||
| }); | ||
|
|
||
| it("should drop Node.js core deprecations raised inside dependencies", () => { | ||
| expect( | ||
| cleanStderr(`(node:1) [DEP0040] DeprecationWarning: punycode\n${TRACE_DEPRECATION_HINT}`), | ||
| ).toBe(""); | ||
| }); | ||
|
|
||
| it("should drop webpack infrastructure info logs", () => { | ||
| expect(cleanStderr("<i> [webpack-bundle-analyzer] Started\n<i> Use Ctrl+C to close it\n")).toBe( | ||
| "", | ||
| ); | ||
| }); | ||
|
|
||
| it("should keep webpack deprecations, warnings and errors", () => { | ||
| const stderr = [ | ||
| "(node:1) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: deprecated", | ||
| "<w> [plugin] warning", | ||
| "<e> [plugin] error", | ||
| ].join("\n"); | ||
|
|
||
| expect(cleanStderr(stderr)).toBe(stderr); | ||
| }); | ||
|
|
||
| it("should keep CLI output found between a warning without hint and a later hint", () => { | ||
| expect( | ||
| cleanStderr( | ||
| `(node:1) ExperimentalWarning: no hint here\n[webpack-cli] Error: boom\n${TRACE_WARNINGS_HINT}`, | ||
| ), | ||
| ).toContain("[webpack-cli] Error: boom"); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,21 @@ | ||
| "use strict"; | ||
|
|
||
| const { run } = require("../../utils/test-utils"); | ||
| const { cleanStderr, run } = require("../../utils/test-utils"); | ||
|
|
||
| describe("bail and watch warning", () => { | ||
| it("should not log warning in not watch mode", async () => { | ||
| const { exitCode, stderr, stdout } = await run(__dirname, ["-c", "bail-webpack.config.js"]); | ||
|
|
||
| expect(exitCode).toBe(0); | ||
| expect(stderr).toBeFalsy(); | ||
| expect(cleanStderr(stderr)).toBeFalsy(); | ||
| expect(stdout).toBeTruthy(); | ||
| }); | ||
|
|
||
| it('should not log warning in not watch mode without the "bail" option', async () => { | ||
| const { exitCode, stderr, stdout } = await run(__dirname, ["-c", "no-bail-webpack.config.js"]); | ||
|
|
||
| expect(exitCode).toBe(0); | ||
| expect(stderr).toBeFalsy(); | ||
| expect(cleanStderr(stderr)).toBeFalsy(); | ||
| expect(stdout).toBeTruthy(); | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.