JoshuaKGoldberg / JoshuaKGoldberg/create-typescript-app

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

Open
#2,198 0 comments 0 reactions 0 assignees View on GitHub
area: tooling status: accepting prs
Dominant language
TypeScript
Stars
1.4k
Forks
89
Avg merge
1m
Merged PRs (30d)
3

Description

### Tooling Report Checklist

- [x] I have tried restarting my IDE and the issue persists.
- [x] I have pulled the latest `main` branch of the repository.
- [x] I have [searched for related issues](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aissue) 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](https://vitest.dev/guide/snapshot.html) 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:

```plaintext
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? 🤔

🎁

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.