Skip to content

fix: Add explicit dependency for vue-loader@legacy - #1496

Merged
danxuliu merged 1 commit into
masterfrom
add-explicit-dependency-for-vue-loader-legacy
Aug 7, 2026
Merged

fix: Add explicit dependency for vue-loader@legacy#1496
danxuliu merged 1 commit into
masterfrom
add-explicit-dependency-for-vue-loader-legacy

Conversation

@danxuliu

@danxuliu danxuliu commented Aug 6, 2026

Copy link
Copy Markdown
Member

Current vue-loader@legacy installed as transitive has a vulnerable dependency, and there is no fix for the installed major version. When npm audit fix is run it tries to update vue-loader to another major, because no version is explicitly specified in the project. Fortunately, the postinstall script of webpack-vue-config verifies that the right version of vue-loader is installed and aborts the process (with a nice warning) if it is not.

However, due to all of the above, when npm audit fix is run by the workflow the command fails and no fix is applied (although the error is only visible when debug logs are enabled). To solve that now an explicit dependency is added again for vue-loader@legacy.

Note that the explicit dependency was removed in the past due to being automatically handled when the dependencies are installed, but it is necessary when nothing is installed and the dependency has a vulnerability.

Thanks @ShGKme for the explanation!

Current vue-loader@legacy installed as transitive has a vulnerable
dependency, and there is no fix for the installed major version. When
"npm audit fix" is run it tries to update vue-loader to another major,
because no version is explicitly specified in the project. Fortunately,
the postinstall script of webpack-vue-config verifies that the right
version of vue-loader is installed and aborts the process (with a nice
warning) if it is not.

However, due to all of the above, when "npm audit fix" is run by the
workflow the command fails and no fix is applied. To solve that now an
explicit dependency is added again for vue-loader@legacy.

Note that the explicit dependency was removed in the past due to being
automatically handled when the dependencies are installed, but it is
necessary when nothing is installed and the dependency has a
vulnerability.

Thanks ShGKme for the explanation!

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu

danxuliu commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

/backport to stable34 please

@danxuliu

danxuliu commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

/backport to stable33 please

@danxuliu

danxuliu commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

/backport to stable32 please

@danxuliu
danxuliu marked this pull request as ready for review August 7, 2026 04:16
@danxuliu
danxuliu merged commit 19f5a81 into master Aug 7, 2026
36 checks passed
@danxuliu
danxuliu deleted the add-explicit-dependency-for-vue-loader-legacy branch August 7, 2026 04:16
@backportbot

backportbot Bot commented Aug 7, 2026

Copy link
Copy Markdown

The backport to stable32 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable32
git pull origin stable32

# Create the new backport branch
git checkout -b backport/1496/stable32

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 48073f89

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1496/stable32

Error: Failed to check for changes with origin/stable32: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@danxuliu

danxuliu commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

The backport to stable32 failed. Please do this backport manually.

[...]

Error: Failed to check for changes with origin/stable32: No changes found in backport branch

I did not realize that the backport to stable32 was not needed, as vue-loader is already an explicit dependency in that branch and therefore npm audit fix works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants