npm v7.zero.zero able to ship with long-awaited options
Npm has introduced that npm v7.zero.zero will ship with the Node.js 15.zero.zero launch subsequent week.
Npm v7.zero.zero introduces a lot of extremely requested options, equivalent to Workspaces, the flexibility to mechanically set up peer dependencies, and package-lock v2 and help for yarn.lock
Workspaces are a set of options that supply help from managing a number of packages inside a single top-level package deal.
This launch additionally goals to make it simple to mechanically set up peer dependencies, whereas earlier than builders would want to manually handle and set up such dependencies. There’s a new peer dependency algorithm that ensures a validly matching peer dependency is discovered at or above the peer-dependent’s location within the node_modules tree, the npm staff defined.
Npm v7.zero.zero additionally provides a brand new package-lock format that can allow builders to do deterministically reproducible builds. The CLI can now additionally use yarn.lock as a supply of package deal metadata and determination steering.
Along with these new options, the internals of npm have additionally been considerably refactored to make sure that the code base is extra dependable over time and simpler to take care of. “With fewer bugs and a sooner iteration cycle we will ship updates to npm sooner than ever earlier than,” npm wrote in a publish.
There are a variety of breaking modifications on this launch that builders ought to pay attention to. The flexibility to mechanically set up peer dependencies would possibly break sure workflows, require() can now not use, npx has been fully rewritten, and the output of npm audit has modified in each the human-readable and –json outputs.