Skip to content

Upgrade TypeScript lockfile to v2 (upgrade to NPM v7 or higher) #49726

@Jack-Works

Description

@Jack-Works

Suggestion

https://github.com/microsoft/TypeScript/blob/main/package-lock.json

This file should be upgraded to use NPM lock file V2 (needs NPM v7 or higher).

🔍 Search Terms

lock file

List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

⭐ Suggestion

Upgrade to NPM v7

📃 Motivating Example

Since there is no way to disallow NPM v7 or higher to not update the lock file to v2, it is very annoying when working on the TypeScript repo.

TypeScript > npm install

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile

image

Every time you run npm install, this will happen.

Upgrading to npm v7/8 is a good way to solve this problem.

Metadata

Metadata

Assignees

Labels

Fix AvailableA PR has been opened for this issueInfrastructureIssue relates to TypeScript team infrastructure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions