lerna-update-wizard
Advanced tools
Comparing version 0.11.0 to 0.11.1
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"main": "index.js", | ||
@@ -9,0 +9,0 @@ "license": "MIT", |
module.exports = signature => { | ||
const [name, version] = signature.split("@"); | ||
const firstIndex = signature.indexOf("@"); | ||
const lastIndex = signature.lastIndexOf("@"); | ||
let name; | ||
let version; | ||
if (firstIndex !== lastIndex) { | ||
name = signature.substring(0, lastIndex); | ||
version = signature.substring(lastIndex + 1); | ||
} else if (firstIndex > 0) { | ||
[name, version] = signature.split("@"); | ||
} else { | ||
name = signature; | ||
} | ||
return { name, version }; | ||
}; |
@@ -114,2 +114,31 @@ const { default: runProgram } = require("./utils/runProgram"); | ||
}); | ||
describe("when updating existing scoped dependency", () => { | ||
it("should install package", async () => { | ||
const projectPath = await generateProject({ | ||
name: "project-noninteractive-updating-scoped-dependency", | ||
packages: [ | ||
{ | ||
name: "sub-package", | ||
dependencies: { | ||
"@ngrx/entity": "6.1.0", | ||
}, | ||
}, | ||
], | ||
}); | ||
await runProgram(projectPath, `Installed 1 packages in`, { | ||
flags: "--non-interactive --dependency @ngrx/entity@7.0.0", | ||
}); | ||
expect( | ||
require(resolve( | ||
projectPath, | ||
"packages/sub-package/node_modules/@ngrx/entity/package.json" | ||
)), | ||
"to satisfy", | ||
{ version: "7.0.0" } | ||
); | ||
}); | ||
}); | ||
}); |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
22911720
1850
14