@stencil/cli 5.0.0-rc.1 → 5.0.0-rc.10
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/index.mjs +19 -24
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1263,7 +1263,7 @@ function clearInheritedProductionEnv() {
|
|
|
1263
1263
|
}
|
|
1264
1264
|
//#endregion
|
|
1265
1265
|
//#region src/wizard/splash.ts
|
|
1266
|
-
const CLI_VERSION = "5.0.0-rc.
|
|
1266
|
+
const CLI_VERSION = "5.0.0-rc.10";
|
|
1267
1267
|
const isTTY = process.stdout.isTTY;
|
|
1268
1268
|
const noColor = !isTTY || "NO_COLOR" in process.env;
|
|
1269
1269
|
const RESET = noColor ? "" : "\x1B[0m";
|
|
@@ -1648,6 +1648,15 @@ const devModeRule = {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
};
|
|
1650
1650
|
//#endregion
|
|
1651
|
+
//#region src/migrations/utils.ts
|
|
1652
|
+
/**
|
|
1653
|
+
* Removes an empty `extras` option from a Stencil config, along with the commas it no longer needs.
|
|
1654
|
+
*
|
|
1655
|
+
* @param text The source text to clean up
|
|
1656
|
+
* @returns The source text without the empty `extras` option
|
|
1657
|
+
*/
|
|
1658
|
+
const removeEmptyExtras = (text) => text.replace(/(,?)\s*(?<![\w$])extras\s*:\s*\{\s*\}(\s*,(\s*\})?)?/g, (_match, leadingComma, trailingComma, closingBrace = "") => (trailingComma && !closingBrace ? leadingComma : "") + closingBrace);
|
|
1659
|
+
//#endregion
|
|
1651
1660
|
//#region src/migrations/rules/enable-import-injection-default.ts
|
|
1652
1661
|
/**
|
|
1653
1662
|
* Migration rule: drop `extras.enableImportInjection: true`.
|
|
@@ -1700,13 +1709,9 @@ const enableImportInjectionDefaultRule = {
|
|
|
1700
1709
|
}
|
|
1701
1710
|
text = text.slice(0, start) + text.slice(end);
|
|
1702
1711
|
}
|
|
1703
|
-
|
|
1704
|
-
return text;
|
|
1712
|
+
return removeEmptyExtras(text);
|
|
1705
1713
|
}
|
|
1706
1714
|
};
|
|
1707
|
-
function cleanupEmptyExtras$2(text) {
|
|
1708
|
-
return text.replace(/,?\s*extras\s*:\s*\{\s*\},?/g, "");
|
|
1709
|
-
}
|
|
1710
1715
|
//#endregion
|
|
1711
1716
|
//#region src/migrations/rules/encapsulation-api.ts
|
|
1712
1717
|
/**
|
|
@@ -2094,7 +2099,7 @@ const globalStyleInjectRule = {
|
|
|
2094
2099
|
}
|
|
2095
2100
|
let text = original;
|
|
2096
2101
|
for (const edit of edits.sort((a, b) => b.start - a.start)) text = text.slice(0, edit.start) + edit.text + text.slice(edit.end);
|
|
2097
|
-
return
|
|
2102
|
+
return removeEmptyExtras(text);
|
|
2098
2103
|
}
|
|
2099
2104
|
};
|
|
2100
2105
|
/**
|
|
@@ -2186,14 +2191,6 @@ function insertionOfOutputTarget(text, array, props) {
|
|
|
2186
2191
|
text: (hasTrailingComma ? "" : ",") + "\n" + indent + newTarget
|
|
2187
2192
|
};
|
|
2188
2193
|
}
|
|
2189
|
-
/**
|
|
2190
|
-
* Clean up empty extras object after removing addGlobalStyleToComponents.
|
|
2191
|
-
* @param text The source text to clean up
|
|
2192
|
-
* @returns The cleaned up text with empty extras removed
|
|
2193
|
-
*/
|
|
2194
|
-
function cleanupEmptyExtras$1(text) {
|
|
2195
|
-
return text.replace(/,?\s*extras\s*:\s*\{\s*\},?/g, "");
|
|
2196
|
-
}
|
|
2197
2194
|
//#endregion
|
|
2198
2195
|
//#region src/migrations/rules/hash-file-names.ts
|
|
2199
2196
|
/**
|
|
@@ -2389,24 +2386,22 @@ const lightDomPatchesRule = {
|
|
|
2389
2386
|
const node = match.node;
|
|
2390
2387
|
let start = node.getStart();
|
|
2391
2388
|
let end = node.getEnd();
|
|
2389
|
+
if (!replacementInserted && replacement !== null) {
|
|
2390
|
+
text = text.slice(0, start) + replacement + text.slice(end);
|
|
2391
|
+
replacementInserted = true;
|
|
2392
|
+
continue;
|
|
2393
|
+
}
|
|
2392
2394
|
const trailingComma = text.slice(end).match(/^(\s*,)/);
|
|
2393
2395
|
if (trailingComma) end += trailingComma[1].length;
|
|
2394
2396
|
else {
|
|
2395
2397
|
const leadingComma = text.slice(0, start).match(/,\s*$/);
|
|
2396
2398
|
if (leadingComma) start -= leadingComma[0].length;
|
|
2397
2399
|
}
|
|
2398
|
-
|
|
2399
|
-
text = text.slice(0, start) + replacement + text.slice(end);
|
|
2400
|
-
replacementInserted = true;
|
|
2401
|
-
} else text = text.slice(0, start) + text.slice(end);
|
|
2400
|
+
text = text.slice(0, start) + text.slice(end);
|
|
2402
2401
|
}
|
|
2403
|
-
|
|
2404
|
-
return text;
|
|
2402
|
+
return removeEmptyExtras(text);
|
|
2405
2403
|
}
|
|
2406
2404
|
};
|
|
2407
|
-
function cleanupEmptyExtras(text) {
|
|
2408
|
-
return text.replace(/,?\s*extras\s*:\s*\{\s*\},?/g, "");
|
|
2409
|
-
}
|
|
2410
2405
|
//#endregion
|
|
2411
2406
|
//#region src/migrations/rules/output-target-renames.ts
|
|
2412
2407
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/cli",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.10",
|
|
4
4
|
"description": "CLI for Stencil - Web component compiler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"nypm": "^0.3.12",
|
|
43
43
|
"std-env": "^3.10.0",
|
|
44
44
|
"typescript": ">5.0.0 <7.0.0",
|
|
45
|
-
"@stencil/
|
|
46
|
-
"@stencil/
|
|
45
|
+
"@stencil/dev-server": "5.0.0-rc.10",
|
|
46
|
+
"@stencil/templates": "5.0.0-rc.10"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"tsdown": "^0.22.14",
|
|
50
50
|
"vitest": "^4.1.10",
|
|
51
|
-
"@stencil/core": "5.0.0-rc.
|
|
51
|
+
"@stencil/core": "5.0.0-rc.10"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@stencil/core": "^5.0.0 || 5.0.0-rc.
|
|
54
|
+
"@stencil/core": "^5.0.0 || 5.0.0-rc.10"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=22.0.0"
|