@tsrx/prettier-plugin 0.3.117 → 0.3.118

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +11 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsrx/prettier-plugin",
3
- "version": "0.3.117",
3
+ "version": "0.3.118",
4
4
  "description": "Ripple plugin for Prettier",
5
5
  "type": "module",
6
6
  "module": "src/index.js",
@@ -27,7 +27,7 @@
27
27
  "prettier": "^3.9.6"
28
28
  },
29
29
  "dependencies": {
30
- "@tsrx/core": "0.1.55"
30
+ "@tsrx/core": "0.1.56"
31
31
  },
32
32
  "files": [
33
33
  "src/"
package/src/index.js CHANGED
@@ -2300,16 +2300,17 @@ function printRippleNode(node, path, options, print, args) {
2300
2300
  case 'TSModuleDeclaration': {
2301
2301
  // `declare global` augments the global scope; printing it as
2302
2302
  // `declare module global` declares an unrelated module named `global`.
2303
- nodeContent = node.global
2304
- ? [node.declare ? 'declare ' : '', path.call(print, 'id'), ' ', path.call(print, 'body')]
2305
- : [
2306
- node.declare ? 'declare ' : '',
2307
- node.metadata?.module_keyword ?? 'module',
2308
- ' ',
2309
- path.call(print, 'id'),
2310
- ' ',
2311
- path.call(print, 'body'),
2312
- ];
2303
+ nodeContent =
2304
+ node.kind === 'global'
2305
+ ? [node.declare ? 'declare ' : '', path.call(print, 'id'), ' ', path.call(print, 'body')]
2306
+ : [
2307
+ node.declare ? 'declare ' : '',
2308
+ node.kind,
2309
+ ' ',
2310
+ path.call(print, 'id'),
2311
+ ' ',
2312
+ path.call(print, 'body'),
2313
+ ];
2313
2314
  break;
2314
2315
  }
2315
2316