Repository navigation
feat(package-source-overrides): 1.1.0 - uv, Yarn Berry, Corepack, install-order fixes - #20
Merged
Merged
Conversation
…tall-order fixes Cover package managers that ignore the existing npm/pip config, fix two replace-policy gaps found by testing, and correct the install-order docs. Fixes - NuGet: list nuget.org under <disabledPackageSources> so scope=system really replaces it (the .NET SDK's default user config re-adds nuget.org) - pnpm ignores NPM_CONFIG_GLOBALCONFIG (/etc/npmrc): always write the per-user ~/.npmrc, also for scope=system - Docs: the spec sorts each install round alphabetically by registry path, so ghcr.io/devcontainers/* installs before this Feature. Document overrideFeatureInstallOrder, and pairing with common-utils for VS Code dev.containers.defaultFeatures (official Features installsAfter it) - Warn when npm/pip/uv/dotnet/... already exist at install time Additions - uv: /etc/uv/uv.toml + ~/.config/uv/uv.toml ([[index]] default = true) from pipIndexUrl; new uvPythonInstallMirror option (python-install-mirror); allow-insecure-host when strictSsl=false - Yarn Berry: ~/.yarnrc.yml npmRegistryServer (+ enableStrictSsl, unsafeHttpWhitelist for http registries) - Corepack: COREPACK_NPM_REGISTRY via /etc/profile.d (runtime) - New opt-in bashEnvHook option: BASH_ENV exports env-only overrides to later Features' install scripts; an existing BASH_ENV is chained - Validate URL options; XML-escape NuGet values; reject nugetSourceName=nuget.org Tests: new scope-system and bash-env-hook scenarios; extended existing ones. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9a35c641-c703-4ecf-b6a0-b7775b16551f
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.
Summary
v1.1.0 of
package-source-overrides. It adds package managers that ignore the existing npm and pip config (uv, Yarn Berry, Corepack). It also fixes two problems found in testing where public feeds stayed in use, and corrects the install-order docs, particularly for VS Code'sdev.containers.defaultFeatures.Fixes (each verified)
scope: "system"left nuget.org enabled. The .NET SDK's default user config adds nuget.org back.nuget.orgis now listed under<disabledPackageSources>. Onmcr.microsoft.com/dotnet/sdk:8.0,dotnet nuget list sourcenow showsnuget.org [Disabled].NPM_CONFIG_GLOBALCONFIG(/etc/npmrc), confirmed with pnpm 12.7. The per-user~/.npmrcis now written for every scope.ghcr.io/devcontainers/*installs before this Feature. The old "noinstallsAftermeans it installs early" claim was wrong. Results fromdevcontainer read-configuration --include-features-configuration --additional-features:common-utils: common-utils, this Feature, then dotnet, node, python. The official Features declareinstallsAfter: common-utils.overrideFeatureInstallOrder(per repo), thecommon-utilspairing fordefaultFeatures(machine-wide), and base images.Additions
/etc/uv/uv.tomland~/.config/uv/uv.toml([[index]]withdefault = true) frompipIndexUrl. uv ignorespip.confandPIP_INDEX_URL. The newuvPythonInstallMirroroption setspython-install-mirror, andallow-insecure-hostis set whenstrictSslisfalse. Checked with uv 0.9.30: no parse errors, and both the proxy index and the Python mirror are used.npmRegistryServerto~/.yarnrc.yml, plusenableStrictSslandunsafeHttpWhitelistforhttp://registries. Checked with Yarn 4.18.1.COREPACK_NPM_REGISTRYthrough/etc/profile.dfor runtime use. Confirmed that Corepack ignores.npmrcand requests<registry>/pnpm/<version>.bashEnvHook(opt-in): usesBASH_ENVto pass environment-variable-only overrides to the install scripts of Features that run later. An existingBASH_ENVis chained.BASH_ENVitself is always set becausecontainerEnvis static, but bash silently ignores the file when it doesn't exist.nugetSourceName=nuget.orgis rejected.Testing
shellcheckpasses oninstall.shand all test scripts.devcontainer features testonmcr.microsoft.com/devcontainers/base:ubuntu: the default test plus 7 scenarios (2 new:scope-system,bash-env-hook), 69 checks passed, 0 failed.