Skip to content

feat(upgrade): allow dedupe instead of deleting lockfile #554

@OrbisK

Description

@OrbisK

it should be possible to run a dedupe instead of a lockfile delete with most package managers. The topic came up in the office-hours 2 weeks ago. I thought I would put together here how and whether this could be implemented

Package manager support

npm

npm should have build in dedupe https://docs.npmjs.com/cli/v10/commands/npm-dedupe

pnpm

https://pnpm.io/cli/dedupe

yarn

https://yarnpkg.com/cli/dedupe

bun

planned: oven-sh/bun#8594 (comment)

nuxi upgrade

  • nuxi upgrade should prompt if user wants to dedupe lockfile, recreate lockfile or just update nuxt
  • nuxi upgrade --dedupe should skip prompt and dedupe lockfile if supported. Should fallback to nuxi upgrade if not supported and warn user
  • --force should have higher priority than --dedupe
  • (--force could inform the user if --dedupe is supported)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions