Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !4734
An error occurred while fetching the assigned milestone of the selected merge_request.

Fix formatMessage wrongly filtering warning messages

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/braceta/fix-format-webpack-messages-bug into next 7 years ago
  • Overview 3
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: braceta

If a webpack warning message is present with a line:

"Module Warning (from ./node_modules/thread-loader/dist/cjs.js):"

The formatMessage function was wrongly slicing the warning message.

This fix filters out the lines as initially intended and keeps the remaining warning message to output correctly.

Compare
  • next (base)

and
  • latest version
    14a2f74d
    1 commit, 2 years ago

1 file
+ 2
- 12

    Preferences

    File browser
    Compare changes
packages/react-dev-utils/formatWebpackMessages.js
+ 2
- 12
  • View file @ 14a2f74d


@@ -41,20 +41,10 @@ function formatMessage(message, isError) {
}
// Remove unnecessary stack added by `thread-loader`
var threadLoaderIndex = -1;
lines.forEach(function(line, index) {
if (threadLoaderIndex !== -1) {
return;
}
if (/thread.loader/i.test(line)) {
threadLoaderIndex = index;
}
lines = lines.filter(function(line) {
return /thread.loader/i.test(line) === false;
});
if (threadLoaderIndex !== -1) {
lines = lines.slice(0, threadLoaderIndex);
}
lines = lines.filter(function(line) {
// Webpack adds a list of entry points to warning messages:
// @ ./src/index.js
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: github/fork/braceta/fix-format-webpack-messages-bug

Menu

Explore Projects Groups Snippets