@hublo/sentinel 1.2.0-alpha.30 → 1.2.0-alpha.31
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/sentinel.js
CHANGED
|
@@ -1037,14 +1037,15 @@ var movedSpecifiers = (toolchain) => new Set(toolchain.owned.map((entry) => entr
|
|
|
1037
1037
|
var defaultExportNames = (toolchain) => Object.fromEntries(
|
|
1038
1038
|
toolchain.owned.filter((entry) => entry.default !== void 0).map((entry) => [entry.specifier, entry.default])
|
|
1039
1039
|
);
|
|
1040
|
-
function renderImport(bindings, presetSpecifier) {
|
|
1040
|
+
function renderImport(bindings, presetSpecifier, semi) {
|
|
1041
1041
|
const render = (list) => list.map((b) => b.exported === b.local ? b.exported : `${b.exported} as ${b.local}`).sort((left, right) => left.localeCompare(right)).join(", ");
|
|
1042
|
+
const end = semi ? ";" : "";
|
|
1042
1043
|
const values = bindings.filter((b) => !b.typeOnly);
|
|
1043
1044
|
const types = bindings.filter((b) => b.typeOnly);
|
|
1044
1045
|
const lines = [];
|
|
1045
|
-
if (values.length > 0) lines.push(`import { ${render(values)} } from '${presetSpecifier}'`);
|
|
1046
|
+
if (values.length > 0) lines.push(`import { ${render(values)} } from '${presetSpecifier}'${end}`);
|
|
1046
1047
|
if (types.length > 0) {
|
|
1047
|
-
lines.push(`import type { ${render(types)} } from '${presetSpecifier}'`);
|
|
1048
|
+
lines.push(`import type { ${render(types)} } from '${presetSpecifier}'${end}`);
|
|
1048
1049
|
}
|
|
1049
1050
|
return lines.join("\n");
|
|
1050
1051
|
}
|
|
@@ -1113,7 +1114,8 @@ function rewriteToolchainImports(toolchain, source, fileName) {
|
|
|
1113
1114
|
const after = out.slice(span.end).match(/^\r?\n/)?.[0].length ?? 0;
|
|
1114
1115
|
out = out.slice(0, span.start) + out.slice(span.end + after);
|
|
1115
1116
|
}
|
|
1116
|
-
|
|
1117
|
+
const semi = source.slice(first.start, first.end).trimEnd().endsWith(";");
|
|
1118
|
+
out = out.slice(0, first.start) + renderImport(bindings, toolchain.presetSpecifier, semi) + out.slice(first.end);
|
|
1117
1119
|
return {
|
|
1118
1120
|
kind: "rewritten",
|
|
1119
1121
|
source: out,
|
|
@@ -7032,4 +7034,4 @@ export {
|
|
|
7032
7034
|
detectFramework,
|
|
7033
7035
|
dispatch
|
|
7034
7036
|
};
|
|
7035
|
-
//# sourceMappingURL=chunk-
|
|
7037
|
+
//# sourceMappingURL=chunk-PLZ45MWU.js.map
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hublo/sentinel",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.31",
|
|
4
4
|
"description": "One CLI that guards code health across Hublo repos: shared lint/typescript/build/test presets, static & dynamic analysis, and architecture checks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|