@starci/eslint-canon-be 3.4.18 → 3.4.20
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/runtime/knowledge/hfs/canon-pins.yaml +4 -4
- package/runtime/scripts/hfs/architecture/canon-clones.mjs +1 -1
- package/runtime/scripts/hfs/architecture/i18n-keys.mjs +6 -4
- package/runtime/scripts/hfs/architecture/transport-owner.mjs +1 -1
- package/runtime/scripts/hfs/rule-catalog.mjs +5 -2
- package/runtime/scripts/lib/env.mjs +2 -1
- package/runtime/scripts/lib/path-key.mjs +1 -1
- package/runtime/scripts/lib/secret-patterns.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.4.20 - 2026-10-20
|
|
4
|
+
- Changed: republished for the complete alpha.24 cohort; 3.4.19 was published alone by an interrupted publication and bundles a canon-pins copy taken before the cohort was complete, so it is not used.
|
|
5
|
+
|
|
6
|
+
## 3.4.19 - 2026-10-20
|
|
7
|
+
- Fixed: bundled runtime source clears the SonarCloud code smells of alpha.23 (regex complexity, concise classes, string prefix and suffix checks, block braces, optional chaining, export-from, default parameters, synchronous awaits, dead stores) without behavior change; canon pins follow the matching package cohort.
|
|
8
|
+
|
|
3
9
|
## 3.4.18 - 2026-10-19
|
|
4
10
|
- Fixed: bundled runtime source analysis retains nullable contracts and explicit callback arguments; canon pins follow the matching HFS and CLI cohort.
|
|
5
11
|
|
package/package.json
CHANGED
|
@@ -29,14 +29,14 @@ pins:
|
|
|
29
29
|
source: packages/grammar/package.json
|
|
30
30
|
why: 'the grammar front ends read: the brand layer sets `--font-sans` and `--font-mono` and the grammar reads them; it carries the Input tel kind, the copyable and read-only Input, the IconButton disclosure props and count badge, ChatBubble, FillViewport, Textarea mentions and Enter-to-send, the leading PrimaryRailLayout rail, the plate-less Image, ListRow, the soft Alert, Progress steps, the floating primary IconButton, FlowGraph, the STATE-8 loading views and the bordered selectable TagGroup chips. The runtime source version wins for a @starci package.'
|
|
31
31
|
'@starci/eslint-canon-be':
|
|
32
|
-
version: 3.4.
|
|
32
|
+
version: 3.4.20
|
|
33
33
|
group: starci
|
|
34
34
|
install: registry
|
|
35
35
|
side: be
|
|
36
36
|
source: packages/eslint/be/package.json
|
|
37
37
|
why: 'the back-end ESLint canon: `loadHfs(import.meta.url)` of be/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the be side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; `starciBeConfig({ hfs: loadHfs(import.meta.url) })` is the typed factory and the BE-CONVENTION laws are its rules.'
|
|
38
38
|
'@starci/eslint-canon-fe':
|
|
39
|
-
version: 8.4.
|
|
39
|
+
version: 8.4.19
|
|
40
40
|
group: starci
|
|
41
41
|
install: registry
|
|
42
42
|
side: fe
|
|
@@ -76,14 +76,14 @@ pins:
|
|
|
76
76
|
source: packages/test-world/package.json
|
|
77
77
|
why: 'the shared e2e library of every back end (R47, R48), a devDependency of every back end: the warm stack behind toxiproxy, the network-edge fakes, the Nest boot, the typed useTestWorld handle, useSandbox for contract specs and the outage lock. Kafka is real own infra (the one digest-pinned apache/kafka KRaft image, a broker listener and proxy per slot, slot-prefixed topics, consumer groups and client ids) and Postgres is schema-per-context (a schema and a login role per context in a shared database). Each worker has its own data slot (<ns>_w<k>) with its own databases, Keycloak realm, leased Redis DB, bucket/collection/topic prefixes, fakes host, toxiproxy proxies and outage lock; a run provisions min(jest workers, workers cap, default 2) slots, and state file protocol 2 pairs exactly with @starci/jest-preset (TEST_WORLD_PAIR_MISMATCH otherwise). A modules world boots real peer apps beside its modules, world.apps.<name>.during(fn) is the outage of a peer app, w.keycloak.clientSecret(client) answers the run-generated secret of a confidential realm client, world.keycloak.events/sessions read the realm user events and live sessions, world.infra.postgresql.connection(name) takes one database connection down while the others serve, and world.resolve and scope.resolve take any Nest token. Every path a declaration names (`stack`, seeds, the realm, Dockerfiles) resolves from the app root (the directory of hfs.json); the globalSetup registers the path aliases as TypeScript resolves them. Its CLI main is exported at ./cli for starci app stack.'
|
|
78
78
|
'@starci/cli':
|
|
79
|
-
version: 1.7.
|
|
79
|
+
version: 1.7.13
|
|
80
80
|
group: starci
|
|
81
81
|
install: registry
|
|
82
82
|
side: both
|
|
83
83
|
source: packages/cli/package.json
|
|
84
84
|
why: 'the only StarCi command package; product repositories install it for starci app, while @starci/hfs remains its pinned transitive implementation.'
|
|
85
85
|
'@starci/hfs':
|
|
86
|
-
version: 4.7.
|
|
86
|
+
version: 4.7.13
|
|
87
87
|
group: starci
|
|
88
88
|
install: registry
|
|
89
89
|
side: both
|
|
@@ -106,7 +106,7 @@ function queueMethods(env, declaration, constructor, excluded) {
|
|
|
106
106
|
&& decoratorsHave(env, parameter, 'InjectQueueOutbox', '@modules/platform/queue'));
|
|
107
107
|
if (!outbox || !env.ts.isIdentifier(outbox.name)) return;
|
|
108
108
|
for (const method of declaration.members) {
|
|
109
|
-
if (!env.ts.isMethodDeclaration(method) ||
|
|
109
|
+
if (!env.ts.isMethodDeclaration(method) || method.body?.statements.length !== 1) continue;
|
|
110
110
|
const call = statementCall(env.ts, method.body.statements[0]);
|
|
111
111
|
if (call && env.ts.isCallExpression(call) && receiverMember(env.ts, call) === outbox.name.text && call.expression.name.text === 'write'
|
|
112
112
|
&& call.arguments.length === 3 && call.arguments.every(argument => mapping(env, argument))) excluded.add(method);
|
|
@@ -62,11 +62,13 @@ function catalogsPerApp(config, graph) {
|
|
|
62
62
|
|
|
63
63
|
/** Each interpolation can fill part or all of a segment; the template's static fragments keep their literal spelling. */
|
|
64
64
|
function templatePatternOf(node) {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
const pattern = [];
|
|
66
|
+
for (const segment of [node.head.text, ...node.templateSpans.map(span => span.literal.text)].join('\u0000').split('.')) {
|
|
67
|
+
if (!segment.includes('\u0000')) { pattern.push(segment); continue; }
|
|
67
68
|
const parts = segment.split('\u0000');
|
|
68
|
-
|
|
69
|
-
}
|
|
69
|
+
pattern.push(parts.every(part => part === '') ? '*' : new RegExp(`^${parts.map((part) => escapeRegExp(part)).join('.*')}$`, 'su'));
|
|
70
|
+
}
|
|
71
|
+
return pattern;
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
function patternsOf(ts, files) {
|
|
@@ -94,7 +94,7 @@ function moduleSpecifierOf(ts, node) {
|
|
|
94
94
|
function isApolloClientConstruction(ts, kit, checker, node) {
|
|
95
95
|
if (!ts.isNewExpression(node)) return false;
|
|
96
96
|
const binding = kit.importBinding(checker, node.expression);
|
|
97
|
-
return Boolean(binding
|
|
97
|
+
return Boolean(binding?.name === 'ApolloClient' && binding.module.startsWith('@apollo/client'));
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
function inspectLibraryImport({ ts, file, node, transport, report }) {
|
|
@@ -21,7 +21,10 @@ const RULE_KEYS = new Set(['id', 'code', 'law', 'scope', 'kinds', 'gates', 'fail
|
|
|
21
21
|
const CASE_KEYS = new Set(['id', 'date', 'source', 'ruling', 'quote', 'supersedes', 'status', 'staleWhen', 'amendedBy']);
|
|
22
22
|
const CASE_DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
23
23
|
const ENFORCER_KEYS = new Set(['kind', 'id', 'status', 'at', 'editions', 'editionWhy']);
|
|
24
|
-
const
|
|
24
|
+
const CASE_ID = /case-[1-9]\d*/;
|
|
25
|
+
const RULING_REFERENCE = new RegExp(String.raw`(?:ruling:)?R\d{2,3}(?:/${CASE_ID.source})?`);
|
|
26
|
+
const OWNER_REFERENCE = /owner:[a-z][a-z0-9]*(?:-[a-z0-9]+)*/;
|
|
27
|
+
const CASE_REFERENCE = new RegExp(`^(?:${CASE_ID.source}|${RULING_REFERENCE.source}|${OWNER_REFERENCE.source})$`);
|
|
25
28
|
const EVIDENCE_KEYS = new Set(['path', 'edition', 'editions']);
|
|
26
29
|
const PROOF_KEYS = new Set([...EVIDENCE_KEYS, 'codes', 'fixtures']);
|
|
27
30
|
const WITNESS_KEYS = new Set(['edition', 'base', 'mutate', 'expect']);
|
|
@@ -191,7 +194,7 @@ function checkRuleCases(rule, label, bad) {
|
|
|
191
194
|
const at = `${label}.cases[${index}]`;
|
|
192
195
|
if (!isPlainObject(item)) { bad.push(`${at} is not a map`); return; }
|
|
193
196
|
for (const key of Object.keys(item)) if (!CASE_KEYS.has(key)) bad.push(`${at} has unknown key ${key}`);
|
|
194
|
-
if (typeof item.id !== 'string' || !/^case-[1-9]
|
|
197
|
+
if (typeof item.id !== 'string' || !/^case-[1-9]\d*$/.test(item.id) || ids.has(item.id)) bad.push(`${at}.id must be a unique case-N`);
|
|
195
198
|
ids.add(item.id);
|
|
196
199
|
if (typeof item.date !== 'string' || !CASE_DATE.test(item.date)) bad.push(`${at}.date must be YYYY-MM-DD`);
|
|
197
200
|
if (item.source !== 'owner') bad.push(`${at}.source must be owner`);
|
|
@@ -15,6 +15,7 @@ export const isSpecRun = (env = process.env) => Boolean(env.NODE_TEST_CONTEXT);
|
|
|
15
15
|
* would pass red specs from inside a test process. The runner marks the spec files it starts itself, so isSpecRun stays true inside them.
|
|
16
16
|
*/
|
|
17
17
|
export function withoutTestRunner(env = process.env) {
|
|
18
|
-
const
|
|
18
|
+
const rest = { ...env };
|
|
19
|
+
delete rest.NODE_TEST_CONTEXT;
|
|
19
20
|
return rest;
|
|
20
21
|
}
|
|
@@ -44,7 +44,7 @@ export const pathsOverlap = (a, b) => sameOrUnder(a, b) || sameOrUnder(b, a);
|
|
|
44
44
|
* @param {{trim?: boolean, collapse?: boolean, dot?: boolean, glob?: string|null, fold?: boolean}} [options]
|
|
45
45
|
*/
|
|
46
46
|
export const normPath = (p, { trim = false, collapse = false, dot = false, glob = null, fold = false } = {}) => {
|
|
47
|
-
let s =
|
|
47
|
+
let s = p == null ? '' : String(p);
|
|
48
48
|
if (trim) s = s.trim();
|
|
49
49
|
s = slash(s);
|
|
50
50
|
if (collapse) s = s.replace(/\/{2,}/g, '/');
|
|
@@ -161,7 +161,7 @@ function readmeBadgeText(text, manifestText) {
|
|
|
161
161
|
let url;
|
|
162
162
|
try { url = new URL(address); } catch { return image; }
|
|
163
163
|
if (!hosts.has(url.host) || url.username || url.password) return image;
|
|
164
|
-
const badgePath = url.host === 'codecov.io' ?
|
|
164
|
+
const badgePath = url.host === 'codecov.io' ? url.pathname.endsWith('/graph/badge.svg') : url.pathname === '/api/project_badges/measure';
|
|
165
165
|
if (!badgePath) return image;
|
|
166
166
|
const fragment = address.indexOf('#');
|
|
167
167
|
const queryEnd = fragment < 0 ? address.length : fragment;
|