From 41881b220b162e6d0e6d971fddbbc68ca9fcca04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:33:17 -0700 Subject: [PATCH] chore: bump prettier from 3.3.1 to 3.3.3 (#2940) * chore: bump prettier from 3.3.1 to 3.3.3 Bumps [prettier](https://github.com/prettier/prettier) from 3.3.1 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.3.1...3.3.3) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Add parentheses for nullish coalescements as per the new rules in Prettier 3.3.3 --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: steveluscher --- .../codecs-core/src/add-codec-size-prefix.ts | 8 ++++---- packages/codecs-data-structures/src/utils.ts | 2 +- pnpm-lock.yaml | 20 +++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/codecs-core/src/add-codec-size-prefix.ts b/packages/codecs-core/src/add-codec-size-prefix.ts index 7f0caa0c0d7c..d685ff0955f0 100644 --- a/packages/codecs-core/src/add-codec-size-prefix.ts +++ b/packages/codecs-core/src/add-codec-size-prefix.ts @@ -51,8 +51,8 @@ export function addEncoderSizePrefix(encoder: Encoder, prefix: Num return createEncoder({ ...encoder, fixedSize: prefix.fixedSize + encoder.fixedSize, write }); } - const prefixMaxSize = isFixedSize(prefix) ? prefix.fixedSize : prefix.maxSize ?? null; - const encoderMaxSize = isFixedSize(encoder) ? encoder.fixedSize : encoder.maxSize ?? null; + const prefixMaxSize = isFixedSize(prefix) ? prefix.fixedSize : (prefix.maxSize ?? null); + const encoderMaxSize = isFixedSize(encoder) ? encoder.fixedSize : (encoder.maxSize ?? null); const maxSize = prefixMaxSize !== null && encoderMaxSize !== null ? prefixMaxSize + encoderMaxSize : null; return createEncoder({ @@ -93,8 +93,8 @@ export function addDecoderSizePrefix(decoder: Decoder, prefix: NumberD return createDecoder({ ...decoder, fixedSize: prefix.fixedSize + decoder.fixedSize, read }); } - const prefixMaxSize = isFixedSize(prefix) ? prefix.fixedSize : prefix.maxSize ?? null; - const decoderMaxSize = isFixedSize(decoder) ? decoder.fixedSize : decoder.maxSize ?? null; + const prefixMaxSize = isFixedSize(prefix) ? prefix.fixedSize : (prefix.maxSize ?? null); + const decoderMaxSize = isFixedSize(decoder) ? decoder.fixedSize : (decoder.maxSize ?? null); const maxSize = prefixMaxSize !== null && decoderMaxSize !== null ? prefixMaxSize + decoderMaxSize : null; return createDecoder({ ...decoder, ...(maxSize !== null ? { maxSize } : {}), read }); } diff --git a/packages/codecs-data-structures/src/utils.ts b/packages/codecs-data-structures/src/utils.ts index 07c7e05404d1..45bc6798dfed 100644 --- a/packages/codecs-data-structures/src/utils.ts +++ b/packages/codecs-data-structures/src/utils.ts @@ -28,5 +28,5 @@ export function getFixedSize(codec: { fixedSize: number } | { maxSize?: number } } export function getMaxSize(codec: { fixedSize: number } | { maxSize?: number }): number | null { - return isFixedSize(codec) ? codec.fixedSize : codec.maxSize ?? null; + return isFixedSize(codec) ? codec.fixedSize : (codec.maxSize ?? null); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 19ed9cf76948..a56a350c107a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,7 +34,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.3))(eslint@8.57.0)(typescript@5.5.3))(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(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.3))(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(jest@30.0.0-alpha.5(@types/node@18.19.21)(ts-node@10.9.2(@swc/core@1.6.5(@swc/helpers@0.5.11))(@types/node@18.19.21)(typescript@5.5.3)))(typescript@5.5.3))(eslint-plugin-react-hooks@4.6.2(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.3))(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3) '@solana/prettier-config-solana': specifier: 0.0.5 - version: 0.0.5(prettier@3.3.2) + version: 0.0.5(prettier@3.3.3) '@solana/test-config': specifier: workspace:* version: link:packages/test-config @@ -94,7 +94,7 @@ importers: version: 2.2.0(eslint@8.57.0)(jest@30.0.0-alpha.5(@types/node@18.19.21)(ts-node@10.9.2(@swc/core@1.6.5(@swc/helpers@0.5.11))(@types/node@18.19.21)(typescript@5.5.3))) jest-runner-prettier: specifier: ^1.0.0 - version: 1.0.0(patch_hash=wxyu3ekhzy6qhvwrai2xltdhn4)(bufferutil@4.0.8)(jest@30.0.0-alpha.5(@types/node@18.19.21)(ts-node@10.9.2(@swc/core@1.6.5(@swc/helpers@0.5.11))(@types/node@18.19.21)(typescript@5.5.3)))(prettier@3.3.2)(utf-8-validate@5.0.10) + version: 1.0.0(patch_hash=wxyu3ekhzy6qhvwrai2xltdhn4)(bufferutil@4.0.8)(jest@30.0.0-alpha.5(@types/node@18.19.21)(ts-node@10.9.2(@swc/core@1.6.5(@swc/helpers@0.5.11))(@types/node@18.19.21)(typescript@5.5.3)))(prettier@3.3.3)(utf-8-validate@5.0.10) jest-watch-master: specifier: ^1.0.0 version: 1.0.0(jest-validate@30.0.0-alpha.5)(jest@30.0.0-alpha.5(@types/node@18.19.21)(ts-node@10.9.2(@swc/core@1.6.5(@swc/helpers@0.5.11))(@types/node@18.19.21)(typescript@5.5.3))) @@ -106,7 +106,7 @@ importers: version: 2.2.2(jest@30.0.0-alpha.5(@types/node@18.19.21)(ts-node@10.9.2(@swc/core@1.6.5(@swc/helpers@0.5.11))(@types/node@18.19.21)(typescript@5.5.3))) prettier: specifier: ^3.3 - version: 3.3.2 + version: 3.3.3 ts-node: specifier: ^10.9.2 version: 10.9.2(@swc/core@1.6.5(@swc/helpers@0.5.11))(@types/node@18.19.21)(typescript@5.5.3) @@ -7390,8 +7390,8 @@ packages: 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 @@ -12363,9 +12363,9 @@ snapshots: eslint-plugin-typescript-sort-keys: 3.2.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3) typescript: 5.5.3 - '@solana/prettier-config-solana@0.0.5(prettier@3.3.2)': + '@solana/prettier-config-solana@0.0.5(prettier@3.3.3)': dependencies: - prettier: 3.3.2 + prettier: 3.3.3 '@solana/wallet-standard-features@1.2.0': dependencies: @@ -15564,7 +15564,7 @@ snapshots: - '@jest/test-result' - jest-runner - jest-runner-prettier@1.0.0(patch_hash=wxyu3ekhzy6qhvwrai2xltdhn4)(bufferutil@4.0.8)(jest@30.0.0-alpha.5(@types/node@18.19.21)(ts-node@10.9.2(@swc/core@1.6.5(@swc/helpers@0.5.11))(@types/node@18.19.21)(typescript@5.5.3)))(prettier@3.3.2)(utf-8-validate@5.0.10): + jest-runner-prettier@1.0.0(patch_hash=wxyu3ekhzy6qhvwrai2xltdhn4)(bufferutil@4.0.8)(jest@30.0.0-alpha.5(@types/node@18.19.21)(ts-node@10.9.2(@swc/core@1.6.5(@swc/helpers@0.5.11))(@types/node@18.19.21)(typescript@5.5.3)))(prettier@3.3.3)(utf-8-validate@5.0.10): dependencies: create-jest-runner: 0.8.0 emphasize: 5.0.0 @@ -15572,7 +15572,7 @@ snapshots: jest-diff: 27.5.1 jest-runner: 27.5.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) p-limit: 4.0.0 - prettier: 3.3.2 + prettier: 3.3.3 transitivePeerDependencies: - bufferutil - canvas @@ -16710,7 +16710,7 @@ snapshots: prettier@3.3.1: {} - prettier@3.3.2: {} + prettier@3.3.3: {} pretty-format@27.5.1: dependencies: