Releases: lostpebble/generate-package-json-webpack-plugin
2.5.0 - exclude dependencies
Added the option to exclude dependencies, for example:
{
excludeDependencies: ["aws-sdk"],
}
Here you can set any dependencies you absolutely never want in your output package.json
file, even if they happen to be used by your code. This is useful in some edge cases, such as where an execution environment provides these dependencies for you automatically, without installation required.
2.3.0 - better `package.json` resolving
Fixes #34 - due to the issues discussed here: nodejs/node#33460 - package.json
is not always resolvable using Nodejs's available module methods (require.resolve
) - so a new function has been devised to get around this.
2.2.0 : Force Webpack version option
This release adds the ability to force the plugin to act as if it were under an exact Webpack version. This is useful in environments (such as Nx) where Webpack versions seem to clash and confuses the library as to which methods it should be using.
Simply add the new option:
{
forceWebpackVersion: "webpack4" | "webpack5"
}
2.1.0 - Webpack 5 support
Thanks to @lorenzodallavecchia for bringing this plugin up to scratch for Webpack 5, along with maintaining its backwards compatibility!
2.0.0 API Simplification Release
Breaking Changes
Simplification of the API.
- Only two parameters to be provided now, the
basePackage
andoptions
- Made
useInstalledVersions
defaulted totrue
- The old way of specifying
versionsPackageFiles
is still possible - needs to be provided as an option now
Webpack 4 support
Thanks to @zhaofengli for the relevant changes! This module should now be compatible with the latest version of Webpack.
v0.4.2: Fix plugin if used while "watch"-ing
Fixed an issue which prevented the plugin working correctly while watching. This was due to the final generated package.json
object being mutated instead of re-assigned, which caused issues on the next watch build cycle.
Much thanks to @mjmasn for discovering the issue and the cause!
v0.4.0 Debugging and Additional source package.json files
Added the ability to have some debugging output in the console if you like.
There is also the ability to add more package.json files as additional sources to grab versions from. This is especially useful if you are bundling some external module with your Node.js code which has dependencies it relies on which are outside of your base project package.json file. Now, if Webpack encounters any of those dependencies in your bundle code, it will also include them in your final generated package.json file - which should mitigate problems of missing modules, or having to deliberately set them in your base project package.json file (prone to becoming stale and outdated).
There is now a third argument to the plugin that you can pass an option object to:
generatePackageJsonPlugin(
...,
...,
{
debug: true,
extraSourcePackageFilenames: [
join(__dirname, "../../node_modules/@mycompany/services/package.json"),
],
}
)
v0.3.0 Allow non-bundled dependencies
Added the ability to put non-webpack dependencies into the generated package.json
, by adding them in the basePackageValues
. They can either pull their version from your original package.json
by keeping the version string empty (""
), or set their version deliberately as you would in any regular package.json
.
See Readme for more details.