sinwan-compiler 0.3.1 → 1.0.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/cli.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  runAnalyzeCli2,
5
5
  runCliIfMain2
6
- } from "./chunk-fadpxq9v.js";
6
+ } from "./chunk-rshqq0t3.js";
7
7
  export {
8
8
  runAnalyzeCli2 as runAnalyzeCli,
9
9
  runCliIfMain2 as runCliIfMain
package/dist/exports.d.ts CHANGED
@@ -4,10 +4,11 @@
4
4
  * Shared utility for detecting top-level exported component bindings in a
5
5
  * module. Used by the Vite and Bun plugins for HMR boundary injection.
6
6
  *
7
- * Detection is intentionally conservative: only top-level exports whose name
8
- * starts with an uppercase letter (the component naming convention) are
9
- * returned. The runtime safely ignores anything that is not used as a
10
- * component, so over-matching is harmless.
7
+ * Detection is intentionally conservative: only top-level *value* exports
8
+ * whose name starts with an uppercase letter (the component naming
9
+ * convention) are returned. Type-only exports (`export type { Foo }`,
10
+ * `export { type Foo }`) must be skipped: HMR footers reference the local
11
+ * binding, and a type has no runtime binding (`ReferenceError`).
11
12
  */
12
13
  export interface ExportedComponent {
13
14
  /** Local binding name in the module (referenced in the accept callback). */
@@ -18,8 +19,8 @@ export interface ExportedComponent {
18
19
  /**
19
20
  * Collect top-level exported component bindings from a module source string.
20
21
  *
21
- * Parses the source with Babel, then walks top-level export declarations to
22
- * find functions and variables whose name starts with an uppercase letter.
22
+ * Parses the source with oxc-parser, then walks top-level export declarations
23
+ * to find functions and variables whose name starts with an uppercase letter.
23
24
  *
24
25
  * Returns an array of `{ local, key }` pairs. Returns an empty array if the
25
26
  * source cannot be parsed.