Skip to content

🛠 Tooling: This repo's Renovate updates fail unit tests #2198

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Tooling Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

This repo is set up with Renovate to automatically update dependencies. The PRs are being created by Renovate just fine, but many deps' versions are set as Vitest snapshots in the Block test files.

For example, #2161 attempts to update prettier-plugin-sh from 0.15.0 to 0.16.0. It unit tests fail in https://github.com/JoshuaKGoldberg/create-typescript-app/actions/runs/14361141505/job/40262699773?pr=2161 with:

 FAIL  src/blocks/blockPrettier.test.ts > blockPrettier > with addons
Error: Snapshot `blockPrettier > with addons 1` mismatched

- Expected
+ Received

@@ -52,11 +52,11 @@
              "husky": "9.1.7",
              "lint-staged": "15.5.0",
              "prettier": "3.5.3",
              "prettier-plugin-curly": "0.3.1",
              "prettier-plugin-packagejson": "2.5.10",
-             "prettier-plugin-sh": "0.15.0",
+             "prettier-plugin-sh": "0.16.0",
            },
            "lint-staged": {
              "*": "prettier --ignore-unknown --write",
            },
            "scripts": {

 ❯ src/blocks/blockPrettier.test.ts:275:20
    273|   });
    274| 
    275|   expect(creation).toMatchInlineSnapshot(`
       |                    ^

Additional Info

I'm not sure the exact best way to solve this. I'd like to keep using .toMatchInlineSnapshot() for tests because it's really convenient. Or, from another perspective, it'd be really inconvenient to have to manually write expected data in tests.

Maybe this repo should have a GitHub Action that manually fixes up package versions in snapshot files? 🤔

🎁

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: toolingManaging the repository's maintenancestatus: accepting prsPlease, send a pull request to resolve this!

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions