@wuchale/svelte 0.16.2 → 0.16.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.
@@ -26,7 +26,7 @@ export class SvelteTransformer extends Transformer {
26
26
  return msgs;
27
27
  }
28
28
  const needsWrapping = msgs.some(msg => {
29
- if (['$props', '$derived', '$derived.by'].includes(msg.details.topLevelCall)) {
29
+ if (['$props', '$state', '$derived', '$derived.by'].includes(msg.details.topLevelCall)) {
30
30
  return false;
31
31
  }
32
32
  if (msg.details.declaring !== 'variable') {
@@ -299,7 +299,7 @@ export class SvelteTransformer extends Transformer {
299
299
  this.moduleExportRanges.push([declaration.start, declaration.end]);
300
300
  continue;
301
301
  }
302
- for (const decl of declaration.declarations) {
302
+ for (const decl of declaration?.declarations ?? []) {
303
303
  if (!decl.init) {
304
304
  continue;
305
305
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wuchale/svelte",
3
- "version": "0.16.2",
3
+ "version": "0.16.4",
4
4
  "description": "Protobuf-like i18n from plain code: Svelte adapter",
5
5
  "scripts": {
6
6
  "dev": "tsc --watch",