fix: support Verdaccio 6.5.0 ui-options external script#213
Merged
n4bb12 merged 1 commit intoApr 13, 2026
Merged
Conversation
Verdaccio 6.5.0 (verdaccio/verdaccio@df612faef, #5792) moved __VERDACCIO_BASENAME_UI_OPTIONS from an inline script in the HTML to an external ui-options.js file. The PatchHtml guard checked for that string in the response body, so the plugin script was never injected - causing the login button to show the default username/password modal instead of redirecting to GitHub OAuth. Check for both the legacy inline marker and the new external script filename so the plugin works with Verdaccio <=6.4 and >=6.5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Verdaccio 6.5.0 moved
__VERDACCIO_BASENAME_UI_OPTIONSfrom an inline<script>tag in the HTML to an externalui-options.jsfile (verdaccio/verdaccio@df612faef, #5792).The
PatchHtmlguard checks for__VERDACCIO_BASENAME_UI_OPTIONSin the response body to detect the Verdaccio web UI HTML before injecting the plugin's client script. Since the string is no longer in the HTML, the plugin script is never injected - causing the login button to show the default username/password modal instead of redirecting to GitHub OAuth.Fix
Also check for
ui-options.jsin the response body, which is the new external script that Verdaccio 6.5.0 uses to load UI options. This keeps backward compatibility with Verdaccio <=6.4 (which still inlines the options).Test plan
PatchHtml.insertTagscovering legacy HTML (<=6.4), modern HTML (>=6.5), and non-HTML responses