@lerna-lite/core
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -177,3 +177,3 @@ import { loadJsonFile, loadJsonFileSync } from 'load-json-file'; | ||
if (this.peerDependencies?.[depName]) { | ||
if (allowPeerDependenciesUpdate && /^(workspace:)?[~^]?[\d\.]+([\-]+[\w\.\-\+]+)*$/i.test(this.peerDependencies[depName] || '')) { | ||
if (allowPeerDependenciesUpdate && /^(workspace:)?[~^*]?[\d\.]*([\-]+[\w\.\-\+]+)*$/i.test(this.peerDependencies[depName] || '')) { | ||
updatingDependencies.push(this.peerDependencies); | ||
@@ -183,2 +183,5 @@ } | ||
this.peerDependencies[depName] = this.peerDependencies[depName].replace('workspace:', ''); | ||
if (/^[~^]$/.test(this.peerDependencies[depName])) { | ||
this.peerDependencies[depName] = resolved.fetchSpec || ''; | ||
} | ||
} | ||
@@ -185,0 +188,0 @@ } |
@@ -1,5 +0,6 @@ | ||
import { cosmiconfigSync } from 'cosmiconfig'; | ||
import { cosmiconfigSync, defaultLoaders } from 'cosmiconfig'; | ||
import dedent from 'dedent'; | ||
import { globbySync } from 'globby'; | ||
import globParent from 'glob-parent'; | ||
import JSON5 from 'json5'; | ||
import log from 'npmlog'; | ||
@@ -19,2 +20,20 @@ import { basename, dirname, join, normalize, resolve as pathResolve } from 'node:path'; | ||
explorer = cosmiconfigSync('lerna', { | ||
loaders: { | ||
...defaultLoaders, | ||
'.json': (filepath, content) => { | ||
if (!filepath.endsWith('lerna.json')) { | ||
return defaultLoaders['.json'](filepath, content); | ||
} | ||
try { | ||
return JSON5.parse(content); | ||
} | ||
catch (err) { | ||
if (err instanceof Error) { | ||
err.name = 'JSONError'; | ||
err.message = `Error in: ${filepath}\n${err.message}`; | ||
} | ||
throw err; | ||
} | ||
}, | ||
}, | ||
searchPlaces: ['lerna.json', 'package.json'], | ||
@@ -21,0 +40,0 @@ transform(obj) { |
{ | ||
"name": "@lerna-lite/core", | ||
"description": "Lerna-Lite core implementation module", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"publishConfig": { | ||
@@ -48,3 +48,3 @@ "access": "public" | ||
"dependencies": { | ||
"@npmcli/run-script": "^6.0.0", | ||
"@npmcli/run-script": "^6.0.1", | ||
"chalk": "^5.2.0", | ||
@@ -59,4 +59,5 @@ "clone-deep": "^4.0.1", | ||
"globby": "^13.1.4", | ||
"inquirer": "^9.1.5", | ||
"inquirer": "^9.2.0", | ||
"is-ci": "^3.0.1", | ||
"json5": "^2.2.3", | ||
"load-json-file": "^7.0.1", | ||
@@ -66,9 +67,9 @@ "minimatch": "^9.0.0", | ||
"npmlog": "^7.0.1", | ||
"p-map": "^5.5.0", | ||
"p-map": "^6.0.0", | ||
"p-queue": "^7.3.4", | ||
"resolve-from": "^5.0.0", | ||
"semver": "^7.5.0", | ||
"slash": "^5.0.0", | ||
"slash": "^5.0.1", | ||
"strong-log-transformer": "^2.1.0", | ||
"write-file-atomic": "^5.0.0", | ||
"write-file-atomic": "^5.0.1", | ||
"write-json-file": "^5.0.0", | ||
@@ -81,3 +82,3 @@ "write-pkg": "^5.1.0" | ||
}, | ||
"gitHead": "18f096fa680f7b29497b1f1bd95da34bec2035f9" | ||
"gitHead": "8de85218848581f1e7527f56b63b9dc0c8796145" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
220566
3277
26
+ Addedjson5@^2.2.3
+ Addedjson5@2.2.3(transitive)
+ Addedp-map@6.0.0(transitive)
- Removedaggregate-error@4.0.1(transitive)
- Removedclean-stack@4.2.0(transitive)
- Removedescape-string-regexp@5.0.0(transitive)
- Removedindent-string@5.0.0(transitive)
- Removedp-map@5.5.0(transitive)
Updated@npmcli/run-script@^6.0.1
Updatedinquirer@^9.2.0
Updatedp-map@^6.0.0
Updatedslash@^5.0.1
Updatedwrite-file-atomic@^5.0.1