Skip to content

Commit

Permalink
chore: bump prettier from 3.3.1 to 3.3.3 (#2940)
Browse files Browse the repository at this point in the history
* 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](prettier/prettier@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] <[email protected]>

* Add parentheses for nullish coalescements as per the new rules in Prettier 3.3.3

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: steveluscher <[email protected]>
  • Loading branch information
dependabot[bot] and steveluscher authored Jul 15, 2024
1 parent f9f8865 commit 41881b2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions packages/codecs-core/src/add-codec-size-prefix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export function addEncoderSizePrefix<TFrom>(encoder: Encoder<TFrom>, 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({
Expand Down Expand Up @@ -93,8 +93,8 @@ export function addDecoderSizePrefix<TTo>(decoder: Decoder<TTo>, 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 });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/codecs-data-structures/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 41881b2

Please sign in to comment.