typebulb 0.17.1 → 0.17.2

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.
@@ -11,7 +11,7 @@
11
11
  * `export =` / `import =`, `module {}`, redundant `tb`) applies to both.
12
12
  */
13
13
  export type LintTarget = 'client' | 'server';
14
- export type LintIssueType = 'DYNAMIC_IMPORT' | 'COMMONJS_REQUIRE' | 'JS_EXTENSION_IMPORT' | 'URL_IMPORT' | 'VERSION_SPECIFIER_IMPORT' | 'REDUNDANT_TB_DECLARATION' | 'CONST_ENUM' | 'NAMESPACE_DECLARATION' | 'COMMONJS_EXPORT_EQUALS' | 'COMMONJS_IMPORT_EQUALS' | 'MODULE_DECLARATION' | 'CSS_FILE_IMPORT' | 'NAVIGATION';
14
+ export type LintIssueType = 'DYNAMIC_IMPORT' | 'COMMONJS_REQUIRE' | 'JS_EXTENSION_IMPORT' | 'URL_IMPORT' | 'VERSION_SPECIFIER_IMPORT' | 'REDUNDANT_TB_DECLARATION' | 'CONST_ENUM' | 'NAMESPACE_DECLARATION' | 'COMMONJS_EXPORT_EQUALS' | 'COMMONJS_IMPORT_EQUALS' | 'MODULE_DECLARATION' | 'CSS_FILE_IMPORT' | 'NAVIGATION' | 'UNDECLARED_IMPORT';
15
15
  export type LintIssue = {
16
16
  type: LintIssueType;
17
17
  severity: 'error';
@@ -22,8 +22,18 @@ export type LintIssue = {
22
22
  /**
23
23
  * Lint a bulb code block. `target` selects the ruleset: `client` (`code.tsx`,
24
24
  * the browser superset) or `server` (`server.ts`, the Sucrase / ESM core only).
25
+ *
26
+ * `dependencies` opts a caller into the UNDECLARED_IMPORT rule: every bare client
27
+ * import must appear in this set (config.json's `dependencies`). It is the CLI's
28
+ * **authored-config** contract — the CLI always asks the model for config.json and
29
+ * passes the declared set here, so a config-less or under-declared bulb fails the
30
+ * lint instead of silently CDN-resolving "latest" (the resolver is import-driven and
31
+ * would otherwise resolve undeclared imports anyway). typebulb.com omits it: the web
32
+ * *derives* config.json from the imports, so there's nothing to enforce. Pass `{}` to
33
+ * enforce against an empty/absent dependencies block (every bare import then fails).
25
34
  */
26
35
  export declare function lint(source: string, options: {
27
36
  target: LintTarget;
37
+ dependencies?: Record<string, string>;
28
38
  }): LintIssue[];
29
39
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lint/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE5C,MAAM,MAAM,aAAa,GACrB,gBAAgB,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,YAAY,GAC5E,0BAA0B,GAAG,0BAA0B,GAAG,YAAY,GACtE,uBAAuB,GAAG,wBAAwB,GAAG,wBAAwB,GAC7E,oBAAoB,GAAG,iBAAiB,GAAG,YAAY,CAAA;AAE3D,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,aAAa,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AA4BD;;;GAGG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GAAG,SAAS,EAAE,CAuBjF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lint/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE5C,MAAM,MAAM,aAAa,GACrB,gBAAgB,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,YAAY,GAC5E,0BAA0B,GAAG,0BAA0B,GAAG,YAAY,GACtE,uBAAuB,GAAG,wBAAwB,GAAG,wBAAwB,GAC7E,oBAAoB,GAAG,iBAAiB,GAAG,YAAY,GAAG,mBAAmB,CAAA;AAEjF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,aAAa,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAiDD;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,SAAS,EAAE,CA4BxH"}
@@ -32,14 +32,43 @@ const RULES = [
32
32
  { type: 'NAVIGATION', pattern: /window\.(location\.(reload|assign|replace)\s*\(|open\s*\()/, targets: CLIENT },
33
33
  { type: 'NAVIGATION', pattern: /window\.location(\.href)?\s*=[^=]/, targets: CLIENT },
34
34
  ];
35
+ // Bare-import detection for the UNDECLARED_IMPORT rule — the same import/export-from shapes the
36
+ // resolver extracts from (packageService), kept in step so lint and resolution agree on what counts
37
+ // as a package import.
38
+ const IMPORT_FROM = [
39
+ /\bimport\s+(?:[^'";]*?from\s*)?['"]([^'"]+)['"]/g,
40
+ /\bexport\s+[^'";]*?from\s*['"]([^'"]+)['"]/g,
41
+ ];
42
+ /**
43
+ * The root package name of a bare specifier (`react-dom/client` → `react-dom`,
44
+ * `@scope/pkg/sub` → `@scope/pkg`), or `null` for a non-bare specifier — relative
45
+ * (`./x`), absolute (`/x`), or a URL/scheme (`https:`, `node:`). Non-bare specifiers
46
+ * aren't config-declared dependencies, so they're not this rule's concern (URL imports
47
+ * have their own rule; relative paths aren't packages).
48
+ */
49
+ function importRoot(spec) {
50
+ if (/^[./]/.test(spec) || /^[a-z][a-z0-9+.-]*:/i.test(spec))
51
+ return null;
52
+ const parts = spec.split('/');
53
+ return spec.startsWith('@') ? parts.slice(0, 2).join('/') : parts[0];
54
+ }
35
55
  /**
36
56
  * Lint a bulb code block. `target` selects the ruleset: `client` (`code.tsx`,
37
57
  * the browser superset) or `server` (`server.ts`, the Sucrase / ESM core only).
58
+ *
59
+ * `dependencies` opts a caller into the UNDECLARED_IMPORT rule: every bare client
60
+ * import must appear in this set (config.json's `dependencies`). It is the CLI's
61
+ * **authored-config** contract — the CLI always asks the model for config.json and
62
+ * passes the declared set here, so a config-less or under-declared bulb fails the
63
+ * lint instead of silently CDN-resolving "latest" (the resolver is import-driven and
64
+ * would otherwise resolve undeclared imports anyway). typebulb.com omits it: the web
65
+ * *derives* config.json from the imports, so there's nothing to enforce. Pass `{}` to
66
+ * enforce against an empty/absent dependencies block (every bare import then fails).
38
67
  */
39
68
  export function lint(source, options) {
40
69
  if (!source)
41
70
  return [];
42
- const { target } = options;
71
+ const { target, dependencies } = options;
43
72
  const issues = [];
44
73
  const lines = source.split('\n');
45
74
  for (let i = 0; i < lines.length; i++) {
@@ -59,8 +88,58 @@ export function lint(source, options) {
59
88
  });
60
89
  }
61
90
  }
91
+ // Undeclared-import rule — client-only (server.ts deps are npm-installed by name, not declared),
92
+ // and only when the caller supplied the declared set (typebulb.com omits it; it derives config
93
+ // from the imports, so the rule stays dormant there).
94
+ if (target === 'client' && dependencies)
95
+ issues.push(...undeclaredImportIssues(lines, dependencies));
62
96
  return issues;
63
97
  }
98
+ /**
99
+ * Bare client imports absent from the declared `dependencies` set — one issue per missing root
100
+ * (first line it appears on), so a package imported many times reports once. The root, not the
101
+ * specifier, is what's declared (`react-dom/client` → `react-dom`).
102
+ */
103
+ function undeclaredImportIssues(lines, dependencies) {
104
+ const declared = new Set(Object.keys(dependencies));
105
+ const seen = new Set();
106
+ const issues = [];
107
+ for (let i = 0; i < lines.length; i++) {
108
+ for (const pattern of IMPORT_FROM) {
109
+ for (const m of lines[i].matchAll(pattern)) {
110
+ const root = importRoot(m[1]);
111
+ if (!root || declared.has(root) || seen.has(root))
112
+ continue;
113
+ seen.add(root);
114
+ issues.push({
115
+ type: 'UNDECLARED_IMPORT',
116
+ severity: 'error',
117
+ message: undeclaredImportMessage(root, i + 1),
118
+ lineNumber: i + 1,
119
+ lineContent: lines[i],
120
+ });
121
+ }
122
+ }
123
+ }
124
+ return issues;
125
+ }
126
+ function undeclaredImportMessage(root, lineNumber) {
127
+ return `Import "${root}" is not declared in config.json dependencies! Found on line ${lineNumber}.
128
+
129
+ **CRITICAL**: Every bare import in code.tsx must be declared in the **config.json** "dependencies" block. A bulb that imports a package it doesn't declare is incomplete — it won't type-check, its versions aren't pinned, and it can't be reliably re-run or ported to typebulb.com.
130
+
131
+ ✅ CORRECT - declare every import:
132
+ \`\`\`json
133
+ {
134
+ "description": "…",
135
+ "dependencies": {
136
+ "${root}": "*"
137
+ }
138
+ }
139
+ \`\`\`
140
+
141
+ **Fix:** Add a **config.json** block (or extend the existing one) with a "dependencies" entry for "${root}" — and for every other bare import in code.tsx. Pin a real version where you can (e.g. "react": "^19.2.7").`;
142
+ }
64
143
  function messageFor(type, lineNumber) {
65
144
  if (type === 'URL_IMPORT') {
66
145
  return `Direct URL imports are not supported! Found on line ${lineNumber}.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lint/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAkBH,MAAM,MAAM,GAA0B,CAAC,QAAQ,CAAC,CAAA;AAChD,MAAM,IAAI,GAA0B,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;AAIxD,MAAM,KAAK,GAAW;IACpB,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,EAAE;IAC7E,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,wBAAwB,EAAE,OAAO,EAAE,IAAI,EAAE;IAC9E,yEAAyE;IACzE,gFAAgF;IAChF,8EA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