Skip to content

feat: update npm specifiers in extends with dprint config update - #1464

Merged
dsherret merged 3 commits into
mainfrom
feat-config-update-npm-extends
Nov 16, 2026
Merged

dsherret merged 3 commits into
mainfrom
feat-config-update-npm-extends

Conversation

@dsherret

Copy link
Copy Markdown
Member

Closes #1394

dprint config update now also updates versioned npm: specifiers in a configuration file's extends (string or array) to the latest version, the same way it does for npm plugins:

// before
{ "extends": "npm:[email protected]" }
// after
{ "extends": "npm:[email protected]" }
  • The minimum dependency age (--minimum-dependency-age or min-release-age in .npmrc) is respected, and versions never go backwards.
  • A sub path is kept (ex. npm:[email protected]/other.json -> npm:[email protected]/other.json).
  • A checksum is replaced with the checksum of the new version's tarball. Configuration extended with a checksum is trusted to configure process plugins, so this asks for confirmation first unless --yes is passed. Responses are remembered per new specifier across config files.
  • The new specifier is resolved the same way as when the configuration is used before it's written. An update that wouldn't resolve (ex. invalid configuration, or it extends something without the checksum it needs) is reported as a warning and the entry is left alone.
  • Unversioned specifiers (node_modules) are skipped with a warning, the same as for plugins.
  • --dry-run previews the change. Its "no updates" message is now "No updates available." since it's no longer only about plugins.
  • Only a configuration file's own extends are updated, not what an extended configuration file extends.

@dsherret
dsherret merged commit 41a97ff into main Nov 16, 2026
6 checks passed
@dsherret
dsherret deleted the feat-config-update-npm-extends branch November 16, 2026 22:29
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.

[Feature Request] Support updating npm: config in extends

1 participant