parseman 0.15.0 → 0.17.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.
@@ -2,6 +2,14 @@ import MagicString from 'magic-string';
2
2
  export type ParsecraftPluginOptions = {
3
3
  /** Extra module specifiers to treat as parseman re-exports */
4
4
  moduleAliases?: string[];
5
+ /**
6
+ * Warn when a regex terminal can't LOWER to a fast `charCodeAt` scan and falls
7
+ * back to `RegExp.exec`. **Default `false` (opt-in).** `RegExp.exec` is an
8
+ * accepted, JIT-fast compiled path — most un-lowered regexes are perfectly fine
9
+ * and lowering them often shows no real gain — so this is a diagnostic you turn
10
+ * ON when specifically auditing lowering coverage, not a build-time nag.
11
+ */
12
+ warnUnloweredRegex?: boolean;
5
13
  };
6
14
  declare const _default: import("unplugin").UnpluginInstance<ParsecraftPluginOptions, boolean>;
7
15
  export default _default;
@@ -11,5 +19,5 @@ export type TransformMacroResult = {
11
19
  /** Diagnostics for macro-referencing shapes that fell back to the interpreter. */
12
20
  warnings: string[];
13
21
  };
14
- export declare function transformMacro(code: string, id: string, moduleAliases?: Set<string>): TransformMacroResult | null;
22
+ export declare function transformMacro(code: string, id: string, moduleAliases?: Set<string>, warnUnloweredRegex?: boolean): TransformMacroResult | null;
15
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAuBA,OAAO,WAAW,MAAM,cAAc,CAAA;AAgBtC,MAAM,MAAM,uBAAuB,GAAG;IACpC,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;;;AA+KD,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAA;IAC3C,kFAAkF;IAClF,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB,CAAA;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,aAAa,cAA6B,GACzC,oBAAoB,GAAG,IAAI,CAshB7B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAuBA,OAAO,WAAW,MAAM,cAAc,CAAA;AAiBtC,MAAM,MAAM,uBAAuB,GAAG;IACpC,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;;;AA4MD,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAA;IAC3C,kFAAkF;IAClF,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB,CAAA;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,aAAa,cAA6B,EAC1C,kBAAkB,UAAQ,GACzB,oBAAoB,GAAG,IAAI,CAynB7B"}