Просмотр исходного кода

Bump prettier from 3.2.5 to 3.3.3 (#123)

* Bump prettier from 3.2.5 to 3.3.3

Bumps [prettier](https://github.com/prettier/prettier) from 3.2.5 to 3.3.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix styling

* Add changeset

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Loris Leiva <loris.leiva@gmail.com>
dependabot[bot] 1 год назад
Родитель
Сommit
59ceb1d780

+ 8 - 0
.changeset/twelve-parrots-kiss.md

@@ -0,0 +1,8 @@
+---
+'@kinobi-so/nodes-from-anchor': patch
+'@kinobi-so/renderers-js-umi': patch
+'@kinobi-so/visitors-core': patch
+'@kinobi-so/renderers-js': patch
+---
+
+Update prettier

+ 1 - 1
package.json

@@ -26,7 +26,7 @@
         "eslint-plugin-sort-keys-fix": "^1.1.2",
         "eslint-plugin-typescript-sort-keys": "^3.2.0",
         "happy-dom": "^14.12.3",
-        "prettier": "^3.2.5",
+        "prettier": "^3.3.3",
         "rimraf": "6.0.1",
         "tsup": "^8.2.4",
         "turbo": "^1.13.0",

+ 1 - 1
packages/nodes-from-anchor/src/v00/InstructionAccountNode.ts

@@ -16,7 +16,7 @@ export function instructionAccountNodeFromAnchorV00(idl: IdlV00Account): Instruc
     return instructionAccountNode({
         docs: idl.docs ?? desc ?? [],
         isOptional,
-        isSigner: idl.isOptionalSigner ? 'either' : idl.isSigner ?? false,
+        isSigner: idl.isOptionalSigner ? 'either' : (idl.isSigner ?? false),
         isWritable: idl.isMut ?? false,
         name: idl.name ?? '',
     });

+ 1 - 1
packages/renderers-js-umi/package.json

@@ -50,7 +50,7 @@
         "@kinobi-so/visitors-core": "workspace:*",
         "@solana/codecs-strings": "rc",
         "nunjucks": "^3.2.4",
-        "prettier": "^3.2.5"
+        "prettier": "^3.3.3"
     },
     "devDependencies": {
         "@types/nunjucks": "^3.2.6"

+ 1 - 1
packages/renderers-js/package.json

@@ -50,7 +50,7 @@
         "@kinobi-so/visitors-core": "workspace:*",
         "@solana/codecs-strings": "rc",
         "nunjucks": "^3.2.4",
-        "prettier": "^3.3.0"
+        "prettier": "^3.3.3"
     },
     "devDependencies": {
         "@types/nunjucks": "^3.2.6"

+ 1 - 1
packages/renderers-js/src/fragments/instructionInputType.ts

@@ -185,7 +185,7 @@ function getRemainingAccountsFragment(instructionNode: InstructionNode): Fragmen
         if (argumentExists) return [];
 
         const isSigner = remainingAccountsNode.isSigner ?? false;
-        const optionalSign = remainingAccountsNode.isOptional ?? false ? '?' : '';
+        const optionalSign = (remainingAccountsNode.isOptional ?? false) ? '?' : '';
         const signerFragment = fragment(`TransactionSigner`).addImports('solanaSigners', ['type TransactionSigner']);
         const addressFragment = fragment(`Address`).addImports('solanaAddresses', ['type Address']);
         return (() => {

+ 9 - 9
packages/visitors-core/src/identityVisitor.ts

@@ -122,7 +122,7 @@ export function identityVisitor<TNodeKind extends NodeKind = NodeKind>(
             const data = visit(this)(node.data);
             if (data === null) return null;
             assertIsNode(data, 'structTypeNode');
-            const pda = node.pda ? visit(this)(node.pda) ?? undefined : undefined;
+            const pda = node.pda ? (visit(this)(node.pda) ?? undefined) : undefined;
             if (pda) assertIsNode(pda, 'pdaLinkNode');
             return accountNode({ ...node, data, pda });
         };
@@ -165,7 +165,7 @@ export function identityVisitor<TNodeKind extends NodeKind = NodeKind>(
 
     if (castedNodeKeys.includes('instructionAccountNode')) {
         visitor.visitInstructionAccount = function visitInstructionAccount(node) {
-            const defaultValue = node.defaultValue ? visit(this)(node.defaultValue) ?? undefined : undefined;
+            const defaultValue = node.defaultValue ? (visit(this)(node.defaultValue) ?? undefined) : undefined;
             if (defaultValue) assertIsNode(defaultValue, INSTRUCTION_INPUT_VALUE_NODES);
             return instructionAccountNode({ ...node, defaultValue });
         };
@@ -176,7 +176,7 @@ export function identityVisitor<TNodeKind extends NodeKind = NodeKind>(
             const type = visit(this)(node.type);
             if (type === null) return null;
             assertIsNode(type, TYPE_NODES);
-            const defaultValue = node.defaultValue ? visit(this)(node.defaultValue) ?? undefined : undefined;
+            const defaultValue = node.defaultValue ? (visit(this)(node.defaultValue) ?? undefined) : undefined;
             if (defaultValue) assertIsNode(defaultValue, INSTRUCTION_INPUT_VALUE_NODES);
             return instructionArgumentNode({ ...node, defaultValue, type });
         };
@@ -290,7 +290,7 @@ export function identityVisitor<TNodeKind extends NodeKind = NodeKind>(
             const item = visit(this)(node.item);
             if (item === null) return null;
             assertIsNode(item, TYPE_NODES);
-            const zeroValue = node.zeroValue ? visit(this)(node.zeroValue) ?? undefined : undefined;
+            const zeroValue = node.zeroValue ? (visit(this)(node.zeroValue) ?? undefined) : undefined;
             if (zeroValue) assertIsNode(zeroValue, 'constantValueNode');
             return zeroableOptionTypeNode(item, zeroValue);
         };
@@ -338,7 +338,7 @@ export function identityVisitor<TNodeKind extends NodeKind = NodeKind>(
             const type = visit(this)(node.type);
             if (type === null) return null;
             assertIsNode(type, TYPE_NODES);
-            const defaultValue = node.defaultValue ? visit(this)(node.defaultValue) ?? undefined : undefined;
+            const defaultValue = node.defaultValue ? (visit(this)(node.defaultValue) ?? undefined) : undefined;
             if (defaultValue) assertIsNode(defaultValue, VALUE_NODES);
             return structFieldTypeNode({ ...node, defaultValue, type });
         };
@@ -410,7 +410,7 @@ export function identityVisitor<TNodeKind extends NodeKind = NodeKind>(
             const enumLink = visit(this)(node.enum);
             if (enumLink === null) return null;
             assertIsNode(enumLink, ['definedTypeLinkNode']);
-            const value = node.value ? visit(this)(node.value) ?? undefined : undefined;
+            const value = node.value ? (visit(this)(node.value) ?? undefined) : undefined;
             if (value) assertIsNode(value, ['structValueNode', 'tupleValueNode']);
             return enumValueNode(enumLink, node.variant, value);
         };
@@ -512,11 +512,11 @@ export function identityVisitor<TNodeKind extends NodeKind = NodeKind>(
             const condition = visit(this)(node.condition);
             if (condition === null) return null;
             assertIsNode(condition, ['resolverValueNode', 'accountValueNode', 'argumentValueNode']);
-            const value = node.value ? visit(this)(node.value) ?? undefined : undefined;
+            const value = node.value ? (visit(this)(node.value) ?? undefined) : undefined;
             if (value) assertIsNode(value, VALUE_NODES);
-            const ifTrue = node.ifTrue ? visit(this)(node.ifTrue) ?? undefined : undefined;
+            const ifTrue = node.ifTrue ? (visit(this)(node.ifTrue) ?? undefined) : undefined;
             if (ifTrue) assertIsNode(ifTrue, INSTRUCTION_INPUT_VALUE_NODES);
-            const ifFalse = node.ifFalse ? visit(this)(node.ifFalse) ?? undefined : undefined;
+            const ifFalse = node.ifFalse ? (visit(this)(node.ifFalse) ?? undefined) : undefined;
             if (ifFalse) assertIsNode(ifFalse, INSTRUCTION_INPUT_VALUE_NODES);
             if (!ifTrue && !ifFalse) return null;
             return conditionalValueNode({ condition, ifFalse, ifTrue, value });

+ 12 - 19
pnpm-lock.yaml

@@ -22,7 +22,7 @@ importers:
         version: 3.0.3(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint-plugin-react-hooks@4.6.0(eslint@8.57.0))(eslint-plugin-simple-import-sort@10.0.0(eslint@8.57.0))(eslint-plugin-sort-keys-fix@1.1.2)(eslint-plugin-typescript-sort-keys@3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)
       '@solana/prettier-config-solana':
         specifier: 0.0.5
-        version: 0.0.5(prettier@3.2.5)
+        version: 0.0.5(prettier@3.3.3)
       '@types/node':
         specifier: ^20
         version: 20.16.1
@@ -54,8 +54,8 @@ importers:
         specifier: ^14.12.3
         version: 14.12.3
       prettier:
-        specifier: ^3.2.5
-        version: 3.2.5
+        specifier: ^3.3.3
+        version: 3.3.3
       rimraf:
         specifier: 6.0.1
         version: 6.0.1
@@ -182,8 +182,8 @@ importers:
         specifier: ^3.2.4
         version: 3.2.4(chokidar@3.6.0)
       prettier:
-        specifier: ^3.3.0
-        version: 3.3.2
+        specifier: ^3.3.3
+        version: 3.3.3
     devDependencies:
       '@types/nunjucks':
         specifier: ^3.2.6
@@ -213,8 +213,8 @@ importers:
         specifier: ^3.2.4
         version: 3.2.4(chokidar@3.6.0)
       prettier:
-        specifier: ^3.2.5
-        version: 3.2.5
+        specifier: ^3.3.3
+        version: 3.3.3
     devDependencies:
       '@types/nunjucks':
         specifier: ^3.2.6
@@ -1988,13 +1988,8 @@ packages:
     engines: {node: '>=10.13.0'}
     hasBin: true
 
-  prettier@3.2.5:
-    resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==}
-    engines: {node: '>=14'}
-    hasBin: true
-
-  prettier@3.3.2:
-    resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==}
+  prettier@3.3.3:
+    resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==}
     engines: {node: '>=14'}
     hasBin: true
 
@@ -2942,9 +2937,9 @@ snapshots:
       eslint-plugin-typescript-sort-keys: 3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)
       typescript: 5.5.4
 
-  '@solana/prettier-config-solana@0.0.5(prettier@3.2.5)':
+  '@solana/prettier-config-solana@0.0.5(prettier@3.3.3)':
     dependencies:
-      prettier: 3.2.5
+      prettier: 3.3.3
 
   '@types/estree@1.0.5': {}
 
@@ -4125,9 +4120,7 @@ snapshots:
 
   prettier@2.8.8: {}
 
-  prettier@3.2.5: {}
-
-  prettier@3.3.2: {}
+  prettier@3.3.3: {}
 
   pseudomap@1.0.2: {}