{"id":13725834,"url":"https://github.com/lukeed/webpack-format-messages","last_synced_at":"2025-10-09T18:23:52.950Z","repository":{"id":45536492,"uuid":"97895660","full_name":"lukeed/webpack-format-messages","owner":"lukeed","description":"Beautiful formatting for Webpack messages; ported from Create React App!","archived":false,"fork":false,"pushed_at":"2021-12-09T19:54:01.000Z","size":18,"stargazers_count":111,"open_issues_count":1,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-19T23:07:12.701Z","etag":null,"topics":["console","create-react-app","prettify","pretty-print","stats","webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukeed.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-21T02:08:22.000Z","updated_at":"2025-05-04T09:21:23.000Z","dependencies_parsed_at":"2022-09-07T00:22:17.096Z","dependency_job_id":null,"html_url":"https://github.com/lukeed/webpack-format-messages","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/lukeed/webpack-format-messages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fwebpack-format-messages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fwebpack-format-messages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fwebpack-format-messages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fwebpack-format-messages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukeed","download_url":"https://codeload.github.com/lukeed/webpack-format-messages/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fwebpack-format-messages/sbom","scorecard":{"id":604559,"data":{"date":"2025-08-11","repo":{"name":"github.com/lukeed/webpack-format-messages","commit":"12523a11e21ef2f98d886a8e3c60ea92220578cf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 4/30 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license:0","Info: FSF or OSI recognized license: MIT License: license:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T01:16:47.717Z","repository_id":45536492,"created_at":"2025-08-21T01:16:47.718Z","updated_at":"2025-08-21T01:16:47.718Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001940,"owners_count":26083226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console","create-react-app","prettify","pretty-print","stats","webpack"],"created_at":"2024-08-03T01:02:36.906Z","updated_at":"2025-10-09T18:23:52.921Z","avatar_url":"https://github.com/lukeed.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# webpack-format-messages\n\n\u003e Beautiful formatting for Webpack messages; ported from [Create React App](https://github.com/facebookincubator/create-react-app)!\n\nThe console output from CRA is very well-done! Unfortunately, the only way to use it is to install _all_ of `react-dev-utils`, which is quite a module-rich tree. While there is **nothing** wrong with this, many times I'd prefer a quick install for my custom Webpack configs (which aren't always React-related).\n\nIf you are already using `react-dev-utils`, you do not need this module and should do this instead:\n\n```js\nconst formatMessages = require('react-dev-utils/formatWebpackMessages');\n```\n\n#### Differences\n\nThe source code of this module is (nearly) a direct copy-paste of the original file. Only two modifications have been made:\n\n1. The code has been tailored to run in a Node-specific environment --- the original can also be run in the browser.\n2. The module input expects a Webpack `stats` object --- the original required a `toJson()` transformation\n\n\n## Install\n\n```\n$ npm install webpack-format-messages --save-dev\n```\n\n\n## Usage\n\n```js\nconst webpack = require('webpack');\nconst formatMessages = require('webpack-format-messages');\n// or\nconst { formatMessages } = require('webpack-format-messages');\n\nconst compiler = webpack(/* config */);\n\ncompiler.hooks.invalid.tap('invalid', function() {\n  console.log('Compiling...');\n});\n\ncompiler.hooks.done.tap('done', (stats) =\u003e {\n  const messages = formatMessages(stats);\n\n  if (!messages.errors.length \u0026\u0026 !messages.warnings.length) {\n    console.log('Compiled successfully!');\n  }\n\n  if (messages.errors.length) {\n    console.log('Failed to compile.');\n    messages.errors.forEach(e =\u003e console.log(e));\n    return;\n  }\n\n  if (messages.warnings.length) {\n    console.log('Compiled with warnings.');\n    messages.warnings.forEach(w =\u003e console.log(w));\n  }\n});\n```\n\n\n## API\n\n### formatMessages(stats)\nReturns: `{ errors: string[], warnings: string[] }`\n\nExtracts \u0026 prettifies warning and error messages from Webpack.\n\n\u003e **Note:** This is also the `default` export.\n\n#### stats\n\nType: `Object`\n\nA Webpack [`stats`](https://github.com/webpack/docs/wiki/node.js-api#stats) object.\n\n\n### formatMessage(message)\nReturns: `string`\n\nTransforms an individual webpack `stats` message object into a string.\n\n\u003e **Note:** You probably don't want to use this directly! It's used by `formatMessages` for you.\n\n## Related\n\n* [`webpack-messages`](https://github.com/lukeed/webpack-messages) -- Wraps this module as a Webpack plugin, with lifecycle hooks\n\n\n## Credits\n\nThis module is pulled directly from [`react-dev-utils`](https://github.com/facebookincubator/create-react-app/tree/master/packages/react-dev-utils), provided by Facebook Incubator.\n\nThis package exists solely as a standalone install~!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeed%2Fwebpack-format-messages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukeed%2Fwebpack-format-messages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeed%2Fwebpack-format-messages/lists"}