From a94dc905b34f1d2cac0c6145311ec8699293c277 Mon Sep 17 00:00:00 2001 From: dish Date: Tue, 4 Feb 2025 11:20:52 -0500 Subject: [PATCH] webpack-cli: 5.1.4 -> 6.0.1 --- nixos/doc/manual/release-notes/rl-2505.section.md | 2 ++ pkgs/by-name/we/webpack-cli/package.nix | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index afece2446840..cdeb306cdc30 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -288,6 +288,8 @@ - `zig_0_9` and `zig_0_10` have been removed, you should upgrade to `zig_0_13` (also available as just `zig`), `zig_0_12` or `zig_0_11` instead. +- `webpack-cli` was updated to major version 6, which has breaking changes from the previous version 5.1.4. See the [upstream release notes](https://github.com/webpack/webpack-cli/releases/tag/webpack-cli%406.0.0) for details on these changes. + - `programs.less.lessopen` is now null by default. To restore the previous behaviour, set it to `''|${lib.getExe' pkgs.lesspipe "lesspipe.sh"} %s''`. - `hardware.pulseaudio` has been renamed to `services.pulseaudio`. The deprecated option names will continue to work, but causes a warning. diff --git a/pkgs/by-name/we/webpack-cli/package.nix b/pkgs/by-name/we/webpack-cli/package.nix index 134f939b495d..646800bf252a 100644 --- a/pkgs/by-name/we/webpack-cli/package.nix +++ b/pkgs/by-name/we/webpack-cli/package.nix @@ -12,20 +12,20 @@ stdenv.mkDerivation (finalAttrs: { pname = "webpack-cli"; - version = "5.1.4"; + version = "6.0.1"; src = fetchFromGitHub { owner = "webpack"; repo = "webpack-cli"; tag = "webpack-cli@${finalAttrs.version}"; - hash = "sha256-OjehyUw54n7/CKbDTVFCtcUp88tJCLUlBCJBQRXoyZM="; + hash = "sha256-teQWaWWt3rKHEVbj3twt8WQXQO9HuzIBNuvFUfRmxqY="; }; yarnKeepDevDeps = true; yarnOfflineCache = fetchYarnDeps { yarnLock = finalAttrs.src + "/yarn.lock"; - hash = "sha256-+SntrxvFoReQXqyFqnCRCx3nftzcNioQCw6IHe8GztI="; + hash = "sha256-iYyH1/ZyNKq4MqMcCl7y5WvDnuGnRY0sj8hHsQhe7z4="; }; nativeBuildInputs = [ @@ -42,6 +42,12 @@ stdenv.mkDerivation (finalAttrs: { cd packages/webpack-cli ''; + # Removes dangling symlinks that are created as part of the `yarn pack` process. + # They are not needed at runtime, so it's safe to remove them. + postInstall = '' + rm -rf $out/lib/node_modules/webpack-cli/node_modules/{.bin,webpack-cli,create-new-webpack-app,@webpack-cli} + ''; + postFixup = '' mv $out/bin/webpack-cli $out/bin/webpack '';