Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .changeset/importable-api.md

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @labd/intl-extractor

## 2.5.0

### Minor Changes

- 3ad1490: Expose the extractor as a library, not just a CLI.

- Declare an `exports` map, so `@labdigital/intl-extractor` can be imported. `dist/index.js` was already built and shipped; nothing referenced it.
- Add `buildLabels({ input, source, fallback, onFile })`, which returns the label tree without touching the output file. `processFiles` becomes the read-merge-write wrapper around it.
- Add a `fallback` option for labels with no value in the source. It receives the full key path and defaults to the label name, so existing behaviour is unchanged.

Two fixes while in there: `processFiles` did not `await` its write, and its "no existing source file" branch was unreachable because the read threw first.

## 2.4.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@labdigital/intl-extractor",
"version": "2.4.0",
"version": "2.5.0",
"license": "MIT",
"author": "Lab Digital",
"type": "module",
Expand Down
Loading