Skip to content

Commit cf11c49

Browse files
github-actions[bot]blurrah
authored andcommitted
update version
1 parent 524272a commit cf11c49

3 files changed

Lines changed: 28 additions & 26 deletions

File tree

.changeset/late-carrots-wait.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# @labd/intl-extractor
22

3+
## 1.0.0
4+
5+
### Major Changes
6+
7+
- 49b4b35: Output labels to a single json file
8+
9+
## What changed
10+
11+
Instead of creating individual `<File>.labels.json` files for each TypeScript file it will now output a single JSON file containing all the namespaces and labels.
12+
It conforms to how `next-intl` works and removes the inbetween step since we can automate with this tool.
13+
14+
Next to this the argument for passing directories has changed from `--source` to `--input` as it's confusing with `source.json` otherwise.
15+
16+
## Why
17+
18+
Individual `*.labels.json` files were helpful to colocate labels and merge them to the single required JSON file. But now that we have this extractor we can just check all usages of `useTranslations` and `getTranslations` and merge them directly.
19+
20+
Also the original implementation took file names as input instead of the used namespaces which led to unused labels and no support for multiple namespaces in one file.
21+
22+
## How to update
23+
24+
1. Make sure your output JSON file is completely up to date
25+
2. Update the extractor
26+
3. Use `--input` instead of `--source` for input files
27+
4. Run extractor
28+
5. Remove all `*.labels.json` files from your project :)
29+
330
## 0.0.2
431

532
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@labdigital/intl-extractor",
3-
"version": "0.0.2",
3+
"version": "1.0.0",
44
"license": "MIT",
55
"author": "Lab Digital",
66
"type": "module",

0 commit comments

Comments
 (0)