Rewritten Search For NPM 4.0
Written by Kay Ewbank   
Friday, 28 October 2016

 The latest version of NPM has been released with some breaking changes, a rewritten search, and deprecated prepublish.

While this is the first major release since npm 3 back in 2015, the developers say that most of the changes are limited to the command line interface. The new version is still officially a trial release.

npmpic

Writing about the new release on Github, software engineer Kat Marchán described it as the end of an era, explaining that it:

"marks the release when we move both npm@2 and npm@3 into maintenance: We will no longer be updating those release branches with anything except critical bugfixes and security patches."

He also explained that npm is:

"still committed to NPM 2 and NPM 3 working, and NPM 2 remains our LTS (long term support) version, because both of these are going to be used by Node 4 and Node 6 respectively." 

Search is another area that has been worked on. Marchán said on Github that it is still going to be some time before the CLI, registry, and web team are able to overhaul npm search altogether, but until then, they've rewritten the previous implementation to stream results on the fly, from both the search endpoint and a local cache. This won't provide faster results, and this patch does come at the cost of sorting capabilities, but what it does do is start outputting results as it finds them. Marchán said that this should make the experience much better, overall, and the developers believe this is an "acceptable band-aid" until that search endpoint is in place.

Another change to npm 4.0 is the deprecation of the republish lifecycle script. It has been replaced with a prepare script. As Marchán explained on Github:

"If there's anything that really seemed to confuse users, it's that the prepublish script ran when invoking npm install without any arguments.

Turns out many, many people really expected that it would only run on npm publish, even if it actually did what most people expected: prepare the package for publishing on the registry.

And so, we've added a prepare command that runs in the exact same cases where prepublish ran, and we've begun a deprecation cycle for prepublish itself only when run by npm install, which will now include a warning any time you use it that way."

Other changes include the removal of support for partial shrinkwraps. npm-shrinkwrap.json is now considered a complete installation manifest except for devDependencies.

npm

More Information

npm On Github

Related Articles

Yarn The New JavaScript Package Manager  

Package Manager Library Open Sourced

Node.js v6 Released 

Node.js Foundation Releases First Joint Code 

Getting Started with Node.js   

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter,subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin

 

Banner


Wing Python Offers Better Remote Dev Connections
20/09/2019

Wing Python 7.1.1 has been updated with better handling of remote development connections, and fixes so that Pandas DataFrame and Series values are displayed correctly among a number of improvements.

 [ ... ]



Eclipse Launches Working Group For Cloud Development Tools
15/10/2019

The Eclipse Foundation has launched a new working group for cloud development tools. The Eclipse Cloud Development Tools Working Group is designed to drive the evolution and broad adoption of de facto [ ... ]


More News

 

graphics

 



 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Friday, 28 October 2016 )