feat!: remove deprecated format as string and formatOptions#2419
feat!: remove deprecated format as string and formatOptions#2419andrii-bodnar merged 10 commits intonextfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
size-limit report 📦
|
# Conflicts: # packages/conf/src/__snapshots__/index.test.ts.snap
| const prevFormat = options.convertFrom | ||
| if (prevFormat && config.format === prevFormat) { | ||
| hasErrors = true | ||
| console.error("Trying to migrate message catalog to the same format") | ||
| console.error( | ||
| `Set ${pico.bold("new")} format in LinguiJS configuration\n` + | ||
| ` and ${pico.bold("previous")} format using --convert-from option.`, | ||
| ) | ||
| console.log() | ||
| console.log(`Example: Convert from lingui format to minimal`) | ||
| console.log(pico.yellow(helpRun(`extract --convert-from lingui`))) | ||
| process.exit(1) | ||
| } |
There was a problem hiding this comment.
this is a leftover of functionionality which didn't work starting aproximately from lingui@v3
| exports[`Catalog POT Flow Should get translations from template if locale file not presented 1`] = ` | ||
| { | ||
| messages: { | ||
| 2ZeN02: Test String, | ||
| mY42CM: Hello World, | ||
| }, | ||
| missing: [ | ||
| { | ||
| id: mY42CM, | ||
| source: Hello World, | ||
| }, | ||
| { | ||
| id: 2ZeN02, | ||
| source: Test String, | ||
| }, | ||
| ], | ||
| } | ||
| `; |
There was a problem hiding this comment.
All these deleted snapshot are duplicates and leftovers from jest - > vitest migration. For some reason vitest haven't detected them as obsolete earlier and started failing only here.
I don't have an answer why that happened, but i re-checked few times that this snapshots are obsolete and correct snaphots are in place.
Vitest uses -> separator between describe title and test case, so in vitest those snapshots called as:
Catalog -> POT Flow -> Should get translations from template if locale file not presented 1
So these snapshots were created by jest.
| export const exampleConfig = { | ||
| ...defaultConfig, | ||
| format: multipleValidOptions({}, "po"), | ||
| format: multipleValidOptions({}, {}), |
There was a problem hiding this comment.
this weird code here tricks jest-validate to not complain when the custom formatter passed. More info in this discussion https://discord.com/channels/974702239358783608/974704133661655060/1465991105417052242
Description
remove deprecated:
in favour of:
This was deprecated in v4, and planned for delete in v5, but it still here.
Types of changes
Fixes # (issue)
Checklist