wuchale 0.23.3 → 0.23.4

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.
@@ -441,7 +441,12 @@ export class Transformer {
441
441
  // for e.g. svelte to surrounded with $derived
442
442
  visitVariableDeclarator = this.defaultVisitVariableDeclarator;
443
443
  visitVariableDeclaration = (node) => node.declarations.flatMap(this.visitVariableDeclarator);
444
- visitExportNamedDeclaration = (node) => node.declaration ? this.visit(node.declaration) : [];
444
+ visitExportNamedDeclaration = (node) => {
445
+ this.heuristciDetails.exported = true;
446
+ const msgs = node.declaration ? this.visit(node.declaration) : [];
447
+ delete this.heuristciDetails.exported;
448
+ return msgs;
449
+ };
445
450
  visitExportDefaultDeclaration = this.visitExportNamedDeclaration;
446
451
  visitStatementsNSaveRealBodyStart = (nodes) => {
447
452
  const msgs = [];
@@ -22,6 +22,8 @@ export type HeuristicDetails = HeuristicDetailsBase & {
22
22
  topLevelCall?: string | undefined;
23
23
  /** the name of the nearest call (for arguments) */
24
24
  call?: string | undefined;
25
+ /** inside an export const ... etc */
26
+ exported?: boolean | undefined;
25
27
  };
26
28
  export type MessageType = 'message' | 'url';
27
29
  export type Message = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wuchale",
3
- "version": "0.23.3",
3
+ "version": "0.23.4",
4
4
  "description": "Protobuf-like i18n from plain code",
5
5
  "scripts": {
6
6
  "dev": "tsc --watch",