Skip to content

Conversation

avallete
Copy link
Member

@avallete avallete commented Oct 6, 2025

🔍 Description

Jest inline snapshot require prettier <3.x when updating use compatible version for test snapshot update, keep the monorepo version for code formatting.

This occured when migrating to an unique prettier version when setting up monorepo, since the error only happen when updating the snapshots it went under the radar.

What changed?

  • Set back postgrest-js specific prettier < 3 and configure jest to use it for inlineSnapshot update
  • Update format in favor of a node script to keep all the codebase in sync with the monorepo prettier version.

To test:

Before:

  • Go to packages/core/postgrest-js/test change a line in one of the inline snapshot, run npm run test:update see the error
    After:
  • The snapshot update back to the expected value.

Jest inline snapshot require prettier <3.x when updating
use compatible version for test snapshot update, keep the monorepo version
for code formatting.
@avallete avallete requested review from a team as code owners October 6, 2025 15:17
@coveralls
Copy link

coveralls commented Oct 6, 2025

Coverage Status

coverage: 95.455% (+13.0%) from 82.5%
when pulling b469cc8 on chore/upgrade-jest-to-latest-for-snapshot
into 636085f on master.

@avallete avallete changed the title Chore/upgrade jest to latest for snapshot chore(postgrest): upgrade jest to latest for snapshot Oct 6, 2025
mandarini
mandarini previously approved these changes Oct 6, 2025
@avallete avallete requested a review from mandarini October 6, 2025 15:57
@avallete avallete enabled auto-merge (squash) October 6, 2025 15:57
@avallete avallete changed the title chore(postgrest): upgrade jest to latest for snapshot chore(postgrest): setup prettier for jest snapshot update Oct 6, 2025
@avallete avallete merged commit 35ce587 into master Oct 6, 2025
26 checks passed
@avallete avallete deleted the chore/upgrade-jest-to-latest-for-snapshot branch October 6, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants