jantimon / favicons-webpack-plugin

Let webpack generate all your favicons and icons for you
MIT License
1.2k stars 210 forks source link

>= dependency on html-webpack-plugin should be ^ instead #268

Closed zburke closed 2 years ago

zburke commented 3 years ago

Current behaviour 💣

The version 4.x optional dependency on html-webpack-plugin uses >=4.0.0 || ^4.0.0-beta.11 instead of ^4.0.0 || ^4.0.0-beta.11. This allows it to pull in v5, which expresses a peer-dependency on webpack v5; this is incompatible with html-webpack-plugin's peer-dependency on webpack v4 and causes a build warning:

warning "favicons-webpack-plugin > html-webpack-plugin@5.3.1" has incorrect peer dependency "webpack@^5.20.0".

Expected behaviour ☀️

favicons-webpack-plugin should only express dependencies on package versions it is compatible with.

Reproduction Example 👾

https://codesandbox.io/s/favicons-webpack-plugin-demo-forked-h28qm?file=/package.json

Environment 🖥

$ node -e "var os=require('os');console.log('Node.js ' + process.version + '\n' + os.platform() + ' ' + os.release())"
Node.js v16.0.0
darwin 20.4.0
$ npm ls webpack webpack-cli html-webpack-plugin favicons-webpack-plugin favicons
@folio/stripes-webpack@1.2.0 /Users/zburke/temp/stripes-webpack
├─┬ add-asset-html-webpack-plugin@3.2.0
│ ├── html-webpack-plugin@4.5.2 deduped
│ └── webpack@4.46.0 deduped
├─┬ babel-loader@8.2.2
│ └── webpack@4.46.0 deduped
├─┬ css-loader@1.0.1
│ └── webpack@4.46.0 deduped
├─┬ favicons-webpack-plugin@4.2.0
│ ├─┬ cache-loader@4.1.0
│ │ └── webpack@4.46.0 deduped
│ ├── favicons@6.2.2
│ ├─┬ html-webpack-plugin@5.3.1
│ │ └── webpack@4.46.0 deduped invalid
│ └── webpack@4.46.0 deduped
├─┬ file-loader@1.1.11
│ └── webpack@4.46.0 deduped
├─┬ html-webpack-plugin@4.5.2
│ └── webpack@4.46.0 deduped
├─┬ lodash-webpack-plugin@0.11.6
│ └── webpack@4.46.0 deduped
├─┬ mini-css-extract-plugin@0.4.5
│ └── webpack@4.46.0 deduped
├─┬ optimize-css-assets-webpack-plugin@5.0.6
│ └── webpack@4.46.0 deduped
├─┬ style-loader@1.3.0
│ └── webpack@4.46.0 deduped
├─┬ ts-loader@8.3.0
│ └── webpack@4.46.0 deduped
├─┬ webpack-dev-middleware@3.7.3
│ └── webpack@4.46.0 deduped
└─┬ webpack@4.46.0
  └─┬ terser-webpack-plugin@1.4.5
    └── webpack@4.46.0 deduped

npm ERR! code ELSPROBLEMS
npm ERR! invalid: webpack@4.46.0 /Users/zburke/temp/stripes-webpack/node_modules/webpack

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/zburke/.npm/_logs/2021-05-21T11_44_18_586Z-debug.log
stale[bot] commented 2 years ago

This issue had no activity for at least half a year. It's subject to automatic issue closing if there is no activity in the next 15 days.