Skip to content

feat(package-source-overrides): 1.1.0 - uv, Yarn Berry, Corepack, install-order fixes - #20

Merged
rosstaco merged 1 commit into
mainfrom
feat/package-source-overrides-1.1
Oct 4, 2026
Merged

rosstaco merged 1 commit into
mainfrom
feat/package-source-overrides-1.1

Conversation

@rosstaco

@rosstaco rosstaco commented Oct 4, 2026

Copy link
Copy Markdown
Owner

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's dev.containers.defaultFeatures.

Fixes (each verified)

  • NuGet scope: "system" left nuget.org enabled. The .NET SDK's default user config adds nuget.org back. nuget.org is now listed under <disabledPackageSources>. On mcr.microsoft.com/dotnet/sdk:8.0, dotnet nuget list source now shows nuget.org [Disabled].
  • pnpm ignores NPM_CONFIG_GLOBALCONFIG (/etc/npmrc), confirmed with pnpm 12.7. The per-user ~/.npmrc is now written for every scope.
  • Docs: install order. Within each install round, the spec sorts Features alphabetically by registry path, so ghcr.io/devcontainers/* installs before this Feature. The old "no installsAfter means it installs early" claim was wrong. Results from devcontainer read-configuration --include-features-configuration --additional-features:
    • In global defaults alone: dotnet, node, python, then this Feature last.
    • Global defaults plus common-utils: common-utils, this Feature, then dotnet, node, python. The official Features declare installsAfter: common-utils.
    • The docs now cover overrideFeatureInstallOrder (per repo), the common-utils pairing for defaultFeatures (machine-wide), and base images.
  • Late-install warning. The Feature warns if npm, pip, uv, dotnet, etc. already exist when it runs.

Additions

  • uv: writes /etc/uv/uv.toml and ~/.config/uv/uv.toml ([[index]] with default = true) from pipIndexUrl. uv ignores pip.conf and PIP_INDEX_URL. The new uvPythonInstallMirror option sets python-install-mirror, and allow-insecure-host is set when strictSsl is false. Checked with uv 0.9.30: no parse errors, and both the proxy index and the Python mirror are used.
  • Yarn Berry: writes npmRegistryServer to ~/.yarnrc.yml, plus enableStrictSsl and unsafeHttpWhitelist for http:// registries. Checked with Yarn 4.18.1.
  • Corepack: sets COREPACK_NPM_REGISTRY through /etc/profile.d for runtime use. Confirmed that Corepack ignores .npmrc and requests <registry>/pnpm/<version>.
  • bashEnvHook (opt-in): uses BASH_ENV to pass environment-variable-only overrides to the install scripts of Features that run later. An existing BASH_ENV is chained. BASH_ENV itself is always set because containerEnv is static, but bash silently ignores the file when it doesn't exist.
  • URL options are validated, NuGet values are XML-escaped, and nugetSourceName=nuget.org is rejected.

Testing

  • shellcheck passes on install.sh and all test scripts.
  • devcontainer features test on mcr.microsoft.com/devcontainers/base:ubuntu: the default test plus 7 scenarios (2 new: scope-system, bash-env-hook), 69 checks passed, 0 failed.
  • The generated configs were checked against the real tools: uv, dotnet, Yarn Berry, and Corepack.

…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
@rosstaco
rosstaco merged commit 84d1a53 into main Oct 4, 2026
30 checks passed
@rosstaco
rosstaco deleted the feat/package-source-overrides-1.1 branch October 4, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant