Skip to content
Open
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
5 changes: 0 additions & 5 deletions .changeset/fuzzy-states-rescue.md

This file was deleted.

28 changes: 0 additions & 28 deletions .changeset/strong-chefs-raise.md

This file was deleted.

31 changes: 31 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# @wuchale/astro

## 0.5.0

### Minor Changes

- [15d677e](https://github.com/wuchalejs/wuchale/commit/15d677e8286dba588a2123389375673e3ea83675): ⚠️ BREAKING: Replace single details object with an array of scope objects and separate filename for heuristic

The heuristic function now gets called with two arguments: the extracted `Text` object, and the filename as a `string` argument. The `Text` object now has:

- `.body: string[]` instead of `Message.msgStr`
- `.path: Scope[]` instead of `Message.details` - this is an array of different small `Scope` objects that better conveys nesting information.
- The rest of the properties are the same as `Message`

Therefore if you implement a custom heuristic function you should for example:

```diff
-heuristic: (msg) => {
+heuristic: (text, file) => {
- if (msg.details.element || msg.details.file.endsWith('.foo')) {
+ if (text.path.some(s => s.type === 'element') || file.endsWith('.foo')) {
return false
}
}
```

The scope array is now used to ignore whole sub-trees of ignored elements even if they contain non-ignored elements.

### Patch Changes

- Updated dependencies [cd53445, 15d677e]:
- wuchale@0.26.0

## 0.4.4

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wuchale/astro",
"version": "0.4.4",
"version": "0.5.0",
"description": "Wuchale i18n adapter for Astro files",
"scripts": {
"dev": "tsc --watch",
Expand Down Expand Up @@ -51,7 +51,7 @@
"@astrojs/compiler": "^4",
"@sveltejs/acorn-typescript": "^1.0.11",
"acorn": "^8.17.0",
"wuchale": "^0.25.6"
"wuchale": "^0.26.0"
},
"devDependencies": {
"@types/node": "~24.13.3",
Expand Down
7 changes: 7 additions & 0 deletions packages/json/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @wuchale/json

## 0.2.2

### Patch Changes

- Updated dependencies [cd53445, 15d677e]:
- wuchale@0.26.0

## 0.2.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/json/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wuchale/json",
"version": "0.2.1",
"version": "0.2.2",
"description": "Protobuf-like i18n from plain code: JSON storage driver",
"scripts": {
"dev": "tsc --watch",
Expand Down Expand Up @@ -33,7 +33,7 @@
"author": "K1DV5",
"license": "MIT",
"dependencies": {
"wuchale": "^0.25.0"
"wuchale": "^0.26.0"
},
"devDependencies": {
"typescript": "^6.0.3",
Expand Down
31 changes: 31 additions & 0 deletions packages/jsx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# @wuchale/jsx

## 0.13.0

### Minor Changes

- [15d677e](https://github.com/wuchalejs/wuchale/commit/15d677e8286dba588a2123389375673e3ea83675): ⚠️ BREAKING: Replace single details object with an array of scope objects and separate filename for heuristic

The heuristic function now gets called with two arguments: the extracted `Text` object, and the filename as a `string` argument. The `Text` object now has:

- `.body: string[]` instead of `Message.msgStr`
- `.path: Scope[]` instead of `Message.details` - this is an array of different small `Scope` objects that better conveys nesting information.
- The rest of the properties are the same as `Message`

Therefore if you implement a custom heuristic function you should for example:

```diff
-heuristic: (msg) => {
+heuristic: (text, file) => {
- if (msg.details.element || msg.details.file.endsWith('.foo')) {
+ if (text.path.some(s => s.type === 'element') || file.endsWith('.foo')) {
return false
}
}
```

The scope array is now used to ignore whole sub-trees of ignored elements even if they contain non-ignored elements.

### Patch Changes

- Updated dependencies [cd53445, 15d677e]:
- wuchale@0.26.0

## 0.12.5

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/jsx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wuchale/jsx",
"version": "0.12.5",
"version": "0.13.0",
"description": "Protobuf-like i18n from plain code: JSX adapter",
"scripts": {
"dev": "tsc --watch",
Expand Down Expand Up @@ -72,7 +72,7 @@
"dependencies": {
"@sveltejs/acorn-typescript": "^1.0.11",
"acorn": "^8.17.0",
"wuchale": "^0.25.6"
"wuchale": "^0.26.0"
},
"devDependencies": {
"@types/estree-jsx": "^1.0.5",
Expand Down
31 changes: 31 additions & 0 deletions packages/svelte/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# @wuchale/svelte

## 0.21.0

### Minor Changes

- [15d677e](https://github.com/wuchalejs/wuchale/commit/15d677e8286dba588a2123389375673e3ea83675): ⚠️ BREAKING: Replace single details object with an array of scope objects and separate filename for heuristic

The heuristic function now gets called with two arguments: the extracted `Text` object, and the filename as a `string` argument. The `Text` object now has:

- `.body: string[]` instead of `Message.msgStr`
- `.path: Scope[]` instead of `Message.details` - this is an array of different small `Scope` objects that better conveys nesting information.
- The rest of the properties are the same as `Message`

Therefore if you implement a custom heuristic function you should for example:

```diff
-heuristic: (msg) => {
+heuristic: (text, file) => {
- if (msg.details.element || msg.details.file.endsWith('.foo')) {
+ if (text.path.some(s => s.type === 'element') || file.endsWith('.foo')) {
return false
}
}
```

The scope array is now used to ignore whole sub-trees of ignored elements even if they contain non-ignored elements.

### Patch Changes

- Updated dependencies [cd53445, 15d677e]:
- wuchale@0.26.0

## 0.20.5

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wuchale/svelte",
"version": "0.20.5",
"version": "0.21.0",
"description": "Protobuf-like i18n from plain code: Svelte adapter",
"scripts": {
"dev": "tsc --watch",
Expand Down Expand Up @@ -57,7 +57,7 @@
"svelte": "^5"
},
"dependencies": {
"wuchale": "^0.25.6"
"wuchale": "^0.26.0"
},
"devDependencies": {
"@types/node": "~24.13.3",
Expand Down
27 changes: 27 additions & 0 deletions packages/wuchale/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# wuchale

## 0.26.0

### Minor Changes

- [cd53445](https://github.com/wuchalejs/wuchale/commit/cd53445e64344206fdd8aff1c50e72eab5d8d9b2): More reliable HMR implementation that doesn't get confused with secondary instances (like the CLI)
- [15d677e](https://github.com/wuchalejs/wuchale/commit/15d677e8286dba588a2123389375673e3ea83675): ⚠️ BREAKING: Replace single details object with an array of scope objects and separate filename for heuristic

The heuristic function now gets called with two arguments: the extracted `Text` object, and the filename as a `string` argument. The `Text` object now has:

- `.body: string[]` instead of `Message.msgStr`
- `.path: Scope[]` instead of `Message.details` - this is an array of different small `Scope` objects that better conveys nesting information.
- The rest of the properties are the same as `Message`

Therefore if you implement a custom heuristic function you should for example:

```diff
-heuristic: (msg) => {
+heuristic: (text, file) => {
- if (msg.details.element || msg.details.file.endsWith('.foo')) {
+ if (text.path.some(s => s.type === 'element') || file.endsWith('.foo')) {
return false
}
}
```

The scope array is now used to ignore whole sub-trees of ignored elements even if they contain non-ignored elements.

## 0.25.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/wuchale/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wuchale",
"version": "0.25.6",
"version": "0.26.0",
"description": "Protobuf-like i18n from plain code",
"scripts": {
"dev": "tsc --watch",
Expand Down