@penvhq/cli 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.cjs +32 -22
- package/dist/bin.cjs.map +1 -1
- package/dist/{chunk-OBIHFXCK.js → chunk-4RR6UFVZ.js} +48 -23
- package/dist/chunk-4RR6UFVZ.js.map +1 -0
- package/dist/index.cjs +32 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/install.cjs +48 -22
- package/dist/install.cjs.map +1 -1
- package/dist/install.d.cts +29 -4
- package/dist/install.d.ts +29 -4
- package/dist/install.js +3 -1
- package/package.json +7 -7
- package/dist/chunk-OBIHFXCK.js.map +0 -1
package/dist/bin.cjs
CHANGED
|
@@ -51029,6 +51029,10 @@ function declaredIn(dir, name) {
|
|
|
51029
51029
|
}
|
|
51030
51030
|
return void 0;
|
|
51031
51031
|
}
|
|
51032
|
+
function blockPresentIn(dir, dev) {
|
|
51033
|
+
const block = manifestOf(dir)?.[dev ? "devDependencies" : "dependencies"];
|
|
51034
|
+
return block !== null && typeof block === "object" && !Array.isArray(block);
|
|
51035
|
+
}
|
|
51032
51036
|
function isPnpmWorkspaceRoot(root) {
|
|
51033
51037
|
return (0, import_node_fs2.existsSync)((0, import_node_path2.join)(root, PNPM_WORKSPACE)) && (0, import_node_fs2.existsSync)((0, import_node_path2.join)(root, "package.json"));
|
|
51034
51038
|
}
|
|
@@ -51153,6 +51157,7 @@ function stepFor(manager, manifest, packages, options) {
|
|
|
51153
51157
|
packages,
|
|
51154
51158
|
command: addCommand(manager, options, specs),
|
|
51155
51159
|
dev: options.dev,
|
|
51160
|
+
blockPresent: blockPresentIn(options.dir, options.dev),
|
|
51156
51161
|
satisfied: pending.length === 0
|
|
51157
51162
|
};
|
|
51158
51163
|
}
|
|
@@ -51193,31 +51198,35 @@ function planInstall(root, version2 = engineVersion()) {
|
|
|
51193
51198
|
const steps = [
|
|
51194
51199
|
stepFor(manager, "package.json", packages, {
|
|
51195
51200
|
workspaceRoot,
|
|
51201
|
+
dir: root,
|
|
51196
51202
|
dev: runtime?.dev === true && pending.every((entry) => entry.name === RUNTIME_PACKAGE) && pending.length > 0
|
|
51197
51203
|
}),
|
|
51198
|
-
stepFor(manager, "package.json", [typesPackage], { workspaceRoot, dev: true })
|
|
51204
|
+
stepFor(manager, "package.json", [typesPackage], { workspaceRoot, dir: root, dev: true })
|
|
51199
51205
|
];
|
|
51200
|
-
for (const
|
|
51201
|
-
const
|
|
51202
|
-
|
|
51203
|
-
|
|
51204
|
-
|
|
51205
|
-
|
|
51206
|
-
|
|
51206
|
+
for (const name of [RUNTIME_PACKAGE, TYPES_PACKAGE]) {
|
|
51207
|
+
for (const dir of workspaceMembers(root, name)) {
|
|
51208
|
+
const declared = declaredIn(dir, name);
|
|
51209
|
+
steps.push(
|
|
51210
|
+
stepFor(
|
|
51211
|
+
manager,
|
|
51212
|
+
manifestPathOf(root, dir),
|
|
51213
|
+
[
|
|
51214
|
+
{
|
|
51215
|
+
name,
|
|
51216
|
+
version: version2,
|
|
51217
|
+
declared: declared.version,
|
|
51218
|
+
satisfied: declared.version === version2
|
|
51219
|
+
}
|
|
51220
|
+
],
|
|
51207
51221
|
{
|
|
51208
|
-
|
|
51209
|
-
|
|
51210
|
-
|
|
51211
|
-
|
|
51222
|
+
filter: `./${(0, import_node_path2.relative)(root, dir).split(import_node_path2.sep).join("/")}`,
|
|
51223
|
+
workspaceRoot: false,
|
|
51224
|
+
dir,
|
|
51225
|
+
dev: declared.dev
|
|
51212
51226
|
}
|
|
51213
|
-
|
|
51214
|
-
|
|
51215
|
-
|
|
51216
|
-
workspaceRoot: false,
|
|
51217
|
-
dev: declared.dev
|
|
51218
|
-
}
|
|
51219
|
-
)
|
|
51220
|
-
);
|
|
51227
|
+
)
|
|
51228
|
+
);
|
|
51229
|
+
}
|
|
51221
51230
|
}
|
|
51222
51231
|
return {
|
|
51223
51232
|
root,
|
|
@@ -51246,12 +51255,13 @@ function renderStep(step) {
|
|
|
51246
51255
|
const added = pending.filter((entry) => entry.declared === void 0);
|
|
51247
51256
|
const replaced = pending.filter((entry) => entry.declared !== void 0);
|
|
51248
51257
|
const block = step.dev ? "devDependencies" : "dependencies";
|
|
51258
|
+
const edge = step.blockPresent ? " " : " +";
|
|
51249
51259
|
return [
|
|
51250
51260
|
step.manifest,
|
|
51251
51261
|
...added.length === 0 ? [] : [
|
|
51252
|
-
|
|
51262
|
+
`${edge} "${block}": {`,
|
|
51253
51263
|
...added.map((entry) => ` + "${entry.name}": "${entry.version}"`),
|
|
51254
|
-
|
|
51264
|
+
`${edge} }`
|
|
51255
51265
|
],
|
|
51256
51266
|
...replaced.flatMap((entry) => [
|
|
51257
51267
|
` - "${entry.name}": "${entry.declared}"`,
|