From 8dfe754ba0f893997e862970ceed6c40089e43ac Mon Sep 17 00:00:00 2001 From: webdiscus Date: Mon, 28 Aug 2023 18:58:27 +0200 Subject: [PATCH] fix: remove needless double new lines in console output when the `verbose` option is enabled - chore: add Community Standards files - chore: update dev packages - test: remove the test strategy for node versions 12.x on GitHub to allows use the latest dev packages. The plugin is still compatible with node 12.x. - test: add the test strategies for node versions 18.x and 20.x on GitHub - test: refactor test utilities - test: add tests for alternative way using the html-bundler-webpack-plugin - docs: update readme --- .github/CONTRIBUTING.md | 113 +++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 44 +++++ .github/workflows/test.yml | 28 +-- .gitignore | 6 +- CHANGELOG.md | 39 ++-- CODE_OF_CONDUCT.md | 1 + README.md | 118 ++++++------ SECURITY.md | 14 ++ package.json | 37 ++-- src/index.js | 4 +- .../expected/assets/css/style.css | 5 + .../expected/style.css | 5 + .../_bundler-css-entry-only/src/style.css | 5 + .../_bundler-css-entry-only/webpack.config.js | 34 ++++ .../_bundler-css-import/expected/main.css | 9 + .../_bundler-css-import/expected/main.js | 1 + .../_bundler-css-import/expected/style.css | 6 + test/cases/_bundler-css-import/src/main.js | 2 + test/cases/_bundler-css-import/src/style.css | 5 + test/cases/_bundler-css-import/src/vendor.css | 3 + .../_bundler-css-import/webpack.config.js | 42 +++++ test/cases/css-entry-only/expected.json | 4 - test/cases/css-entry-only/webpack.config.js | 2 +- .../webpack.config.js | 2 +- .../css-entry-with-query/webpack.config.js | 2 +- test/cases/css-import/webpack.config.js | 2 +- .../webpack.config.js | 2 +- .../multi-configuration/webpack.config.js | 2 +- .../webpack.config.js | 2 +- .../webpack.config.js | 2 +- .../webpack.config.js | 2 +- .../webpack.config.js | 2 +- .../cases/multi-page+styles/webpack.config.js | 2 +- .../option-extension-array/webpack.config.js | 2 +- .../option-extension-regexp/webpack.config.js | 3 +- .../option-ignore-array/expected/script.js | 2 +- .../option-ignore-array/webpack.config.js | 2 +- .../option-ignore-string/webpack.config.js | 2 +- test/cases/option-remove/webpack.config.js | 2 +- .../plugin-webpack-manifest/webpack.config.js | 2 +- .../webpack.config.js | 12 +- .../webpack.config.js | 2 +- .../single-js+css-entry/webpack.config.js | 2 +- .../webpack.config.js | 2 +- .../single-mjs+css-entry/webpack.config.js | 2 +- test/cases/single-mjs-entry/webpack.config.js | 2 +- .../webpack.config.js | 2 +- .../webpack.config.js | 2 +- test/config.js | 26 +-- test/index.integration.test.js | 119 ------------ test/integration.test.js | 70 +++++++ test/jest.config.js | 15 +- test/utils-old/file.js | 60 ++++++ test/utils-old/helpers.js | 84 +++++++++ test/utils-old/webpack.js | 62 ++++++ test/utils/file.js | 104 ++++++++-- test/utils/helpers.js | 178 ++++++++++++------ test/utils/webpack.js | 107 ++++++++--- test/webpack.common.js | 17 +- 59 files changed, 1061 insertions(+), 369 deletions(-) create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 SECURITY.md create mode 100644 test/cases/_bundler-css-entry-only/expected/assets/css/style.css create mode 100644 test/cases/_bundler-css-entry-only/expected/style.css create mode 100644 test/cases/_bundler-css-entry-only/src/style.css create mode 100644 test/cases/_bundler-css-entry-only/webpack.config.js create mode 100644 test/cases/_bundler-css-import/expected/main.css create mode 100644 test/cases/_bundler-css-import/expected/main.js create mode 100644 test/cases/_bundler-css-import/expected/style.css create mode 100644 test/cases/_bundler-css-import/src/main.js create mode 100644 test/cases/_bundler-css-import/src/style.css create mode 100644 test/cases/_bundler-css-import/src/vendor.css create mode 100644 test/cases/_bundler-css-import/webpack.config.js delete mode 100644 test/cases/css-entry-only/expected.json delete mode 100644 test/index.integration.test.js create mode 100644 test/integration.test.js create mode 100644 test/utils-old/file.js create mode 100644 test/utils-old/helpers.js create mode 100644 test/utils-old/webpack.js diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..76f8d76 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,113 @@ +# Contributing in webpack-remove-empty-scripts + +- [Questions and Suggestions](#question) +- [Issues and Bugs](#issue) +- [Feature Requests](#feature) +- [Pull Request Submission Guidelines](#submit-pr) +- [Commit Message Conventions](#commit) + +## Got a Question or Suggestion? + +If you have questions or suggestions, please create a new [discussion](https://github.com/webdiscus/webpack-remove-empty-scripts/discussions). + + +## Found an Issue or Bug? + +Before you submit an issue, please search the issue tracker, +maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available. + +We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. + +Tell us versions of your environment: + +- OS: macOS, Linux, Windows +- version of Node.js +- version of Webpack +- version of the Plugin +- the use-case that fails + +Ideally create a small repository with a reproducible issue. + + +## Feature Requests? + +You can _request_ a new feature by creating an [issue](https://github.com/webdiscus/webpack-remove-empty-scripts/issues). + +The title must begins with `[FEATURE]`. + + +## Pull Request Submission Guidelines + +Before you submit your Pull Request (PR) consider the following guidelines: + +- Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). +- Your PR must have only `one` commit. If you have many commits, please squash all commits into one. +- Please test your pull request: + - new/changed code `must` be completely covered, at last `95%` + - create a new test case under `./test/cases/` directory + - all already existing tests must be passed: `npm test` + + +## Commit Conventions + +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type**, a **scope** and a **subject**: + +``` +(): + + + +