@tsrx/prettier-plugin 0.3.32 → 0.3.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsrx/prettier-plugin",
3
- "version": "0.3.32",
3
+ "version": "0.3.33",
4
4
  "description": "Ripple plugin for Prettier",
5
5
  "type": "module",
6
6
  "module": "src/index.js",
@@ -26,11 +26,11 @@
26
26
  "devDependencies": {
27
27
  "@types/node": "^24.3.0",
28
28
  "prettier": "^3.8.3",
29
- "ripple": "0.3.32"
29
+ "ripple": "0.3.33"
30
30
  },
31
31
  "dependencies": {
32
- "@tsrx/core": "0.0.12",
33
- "@tsrx/ripple": "0.0.14"
32
+ "@tsrx/core": "0.0.13",
33
+ "@tsrx/ripple": "0.0.15"
34
34
  },
35
35
  "files": [
36
36
  "src/"
package/src/index.js CHANGED
@@ -5734,7 +5734,7 @@ function printJSXElement(node, path, options, print) {
5734
5734
  'attributes',
5735
5735
  i,
5736
5736
  );
5737
- } else if (attr.type === 'JSXSpreadAttribute') {
5737
+ } else if (attr.type === 'JSXSpreadAttribute' || attr.type === 'SpreadAttribute') {
5738
5738
  return ['{...', path.call(print, 'openingElement', 'attributes', i, 'argument'), '}'];
5739
5739
  }
5740
5740
  return '';
package/src/index.test.js CHANGED
@@ -741,6 +741,17 @@ import { Something, type Props, track } from 'ripple';`;
741
741
  expect(result).toBeWithNewline(expected);
742
742
  });
743
743
 
744
+ it('should preserve JSX spread attributes inside explicit tsx blocks', async () => {
745
+ const input = `const props = {};
746
+ const foo = <tsx><Bar {...props} /></tsx>;`;
747
+
748
+ const expected = `const props = {};
749
+ const foo = <tsx><Bar {...props} /></tsx>;`;
750
+
751
+ const result = await format(input, { singleQuote: true });
752
+ expect(result).toBeWithNewline(expected);
753
+ });
754
+
744
755
  it('should handle type annotations in object params', async () => {
745
756
  const input = `interface Props {
746
757
  a: number;