New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lerna/has-npm-version

Package Overview
Dependencies
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lerna/has-npm-version - npm Package Compare versions

Comparing version 3.16.5 to 4.0.0

30

CHANGELOG.md

@@ -6,2 +6,32 @@ # Change Log

# [4.0.0](https://github.com/lerna/lerna/compare/v3.22.1...v4.0.0) (2021-02-10)
### Features
* **deps:** Bump dependencies ([affed1c](https://github.com/lerna/lerna/commit/affed1ce0fce91f01b0a9eafe357db2d985b974f))
* **has-npm-version:** Remove unused makePredicate() export ([56cba2f](https://github.com/lerna/lerna/commit/56cba2ffc4dccf3380548567a36a35345fb7c747))
* Consume named exports of sibling modules ([63499e3](https://github.com/lerna/lerna/commit/63499e33652bc78fe23751875d74017e2f16a689))
* Drop support for Node v6.x & v8.x ([ff4bb4d](https://github.com/lerna/lerna/commit/ff4bb4da215555e3bb136f5af09b5cbc631e57bb))
* Expose named export ([c1303f1](https://github.com/lerna/lerna/commit/c1303f13adc4cf15f96ff25889b52149f8224c0e))
* Remove default export ([e2f1ec3](https://github.com/lerna/lerna/commit/e2f1ec3dd049d2a89880029908a2aa7c66f15082))
* **deps:** semver@^7.3.2 ([003ad66](https://github.com/lerna/lerna/commit/003ad6641fab8b4e3a82251ebffd27061bd6a31b))
### BREAKING CHANGES
* **has-npm-version:** The makePredicate() export has been removed, memoization is now the responsibility of the caller.
* The default export has been removed, please use a named export instead.
* Node v6.x & v8.x are no longer supported. Please upgrade to the latest LTS release.
Here's the gnarly one-liner I used to make these changes:
```
npx lerna exec --concurrency 1 --stream -- 'json -I -f package.json -e '"'"'this.engines=this.engines||{};this.engines.node=">= 10.18.0"'"'"
```
(requires `npm i -g json` beforehand)
## [3.16.5](https://github.com/lerna/lerna/compare/v3.16.4...v3.16.5) (2019-10-07)

@@ -8,0 +38,0 @@

9

lib/has-npm-version.js

@@ -6,4 +6,3 @@ "use strict";

module.exports = hasNpmVersion;
module.exports.makePredicate = makePredicate;
module.exports.hasNpmVersion = hasNpmVersion;

@@ -14,8 +13,2 @@ function hasNpmVersion(range) {

function makePredicate() {
const npmVersion = getNpmVersion();
return range => rangeSatisfies(npmVersion, range);
}
function rangeSatisfies(npmVersion, range) {

@@ -22,0 +15,0 @@ return Boolean(semver.satisfies(npmVersion, range));

{
"name": "@lerna/has-npm-version",
"version": "3.16.5",
"version": "4.0.0",
"description": "Test if the current version of npm satisfies a given semver range",

@@ -17,3 +17,3 @@ "keywords": [

"engines": {
"node": ">= 6.9.0"
"node": ">= 10.18.0"
},

@@ -32,6 +32,6 @@ "publishConfig": {

"dependencies": {
"@lerna/child-process": "3.16.5",
"semver": "^6.2.0"
"@lerna/child-process": "4.0.0",
"semver": "^7.3.4"
},
"gitHead": "f0574092a2db90142b3a27ec1a4941cddbdcdf62"
"gitHead": "4582c476e07dddddd6b2e3ab6e7f52c1f9eed59a"
}

@@ -8,3 +8,3 @@ # `@lerna/has-npm-version`

```js
const hasNpmVersion = require("@lerna/has-npm-version");
const { hasNpmVersion } = require("@lerna/has-npm-version");

@@ -17,6 +17,2 @@ // `npm --version` === 6.3.0

// makePredicate() caches the call to `npm --version`
// useful if you're calling it repeatedly in a loop
const predicate = hasNpmVersion.makePredicate();
// `npm --version` === 6.3.0

@@ -23,0 +19,0 @@ hasNpmVersion(">=5"); // => true

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc