@hyperscript-tools/i18n 6.1.0 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,80 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [6.2.0] - 2026-10-18
11
+
12
+ The `@lokascript/semantic/core` path weighs about a third less, and its lexicons now register with
13
+ it. MCP `get_diagnostics` gives the engine's verdict for English, and a multi-line BehaviorSpec with
14
+ a line it cannot read is refused instead of compiled without it.
15
+
16
+ ### Fixed
17
+
18
+ - **`@hyperfixi/mcp-server`: `get_diagnostics` gives the engine's verdict for English, where it
19
+ stopped** (#1575). Measured on 672 inputs (the agent bench and the docs patterns, in en/ja/es/ar), it
20
+ flagged 6 of the 27 English inputs the engine rejects, none with a position; gave 9 false errors
21
+ on English the engine reads (8 of them a possessive `'s` read as an open quote); and warned 467
22
+ `possible-typo`s, 391 on ja/es/ar words checked against an English command list. Now: 27 of 27,
23
+ each at the token where the engine stopped; 0 false errors (semantic's doubts about English the
24
+ engine reads are warnings); and a "did you mean" only for the word the engine stopped on
25
+ (`toggel`, not `and`), never off English. Style advice (`wait` over `setTimeout`, `then` between
26
+ commands) stays.
27
+
28
+ - **`@lokascript/semantic`: `lexicons/<code>` registers its vocabulary with `./core`.** Each
29
+ lexicon file bundled a private copy of the lexicon registry, so a page that imported
30
+ `@lokascript/semantic/core`, `languages/ja` and `lexicons/ja` registered the Japanese words in a
31
+ Map `render` never read, and value words stayed English (`私の valueに` for `私の 値 に`). The root
32
+ entry and the browser bundles were not affected. `test/core-subpaths.test.ts` holds it on the
33
+ built files (#1577).
34
+
35
+ - **`@hyperfixi/mcp-server`: a multi-line BehaviorSpec with a line it cannot read is refused,
36
+ not compiled without it** (lokascript-domains #54). On `@lokascript/domains` 5.0.1,
37
+ `compile_behaviorspec` answered `ok: true` for `test "Login"` / `given page /login` /
38
+ `when I click #submit` / `then #result is visible` with only the `goto`: the two lines it
39
+ could not read were gone. mcp-server is on domains 5.0.2, whose `compileBehaviorSpec` throws a
40
+ `BehaviorSpecError`; the multi-line handler answers `ok: false` with `errors` (one per line)
41
+ and the rest under `partial`, never `code`. `validate_behaviorspec` reports what compile would
42
+ refuse (a `given page /login when …` URL that takes the rest of its line), and
43
+ `translate_behaviorspec` refuses such a spec whole (`translated` and `playwright` are `null`)
44
+ instead of translating what remained (#1576).
45
+
46
+ - **`@lokascript/compilation-service`: `/health` reports the package's version**, not the `1.4.0`
47
+ literal it reported through 6.1.0 (`src/version.ts`, rewritten by `set-version.cjs`; #1576).
48
+
49
+ ### Changed
50
+
51
+ - **`@lokascript/semantic`: the `./core` + `./languages/<code>` path weighs about a third less.**
52
+ Measured with esbuild (minified, gzip -9) on learn's ten languages with their lexicons:
53
+ 275 KB → 180 KB; `./core` alone 155 KB → 120 KB; core with one language and its lexicon
54
+ 168 KB → 133 KB. Two packaging changes: `KNOWN_PROFILES` is marked pure, so a bundle that does
55
+ not use it drops the profiles of languages it never imports (35 KB); and the language and
56
+ lexicon modules share their common code in chunks instead of a copy each (60 KB over ten).
57
+ Through the packed tarball, the bundled path renders exactly what the root entry does (1,476 of
58
+ 1,476 pairs: 164 docs patterns × 9 languages, there and back), and the root entry is unchanged
59
+ (3,772 of 3,772 pairs against 6.1.0). `@hyperfixi/vite-plugin`'s debug size table is
60
+ re-measured (one language ~130–135 KB, `all` ~222 KB) (#1577).
61
+
62
+ - **`@lokascript/language-server` on `vscode-languageserver` 10** (protocol 3.18; replaces
63
+ Dependabot #1278), and the LokaScript VS Code extension on `vscode-languageclient` 10 (#1279),
64
+ which needs VS Code 1.91 (`engines.vscode` was `^1.85.0`). 10.x adds an exports map without
65
+ `./node.js`, so the server imports `vscode-languageserver/node`; a diagnostic's `message` may be
66
+ `MarkupContent` in 3.18, so the code actions read its text either way. Over stdio the server
67
+ answers as 6.1.0 does: the same capabilities, the engine's parse error at the same position,
68
+ hover and completion (#1579).
69
+
70
+ ### Added
71
+
72
+ - **`@lokascript/semantic/core` exports `getAllTranslations` and `getAllTranslationsWithStatus`**,
73
+ over the languages a page registered. lokascript-learn's playground imported the root entry, and
74
+ with it all 24 languages, for this one function (#1577).
75
+
76
+ ### Deprecated
77
+
78
+ - **`@hyperfixi/mcp-server`: `parse_multilingual`, removed in 7.0.** It returns only the top node
79
+ (every handler as `on` and its event) and reported success on 21 of the 27 English inputs the
80
+ engine rejects; `validate_and_compile` returns the whole IR and the engine's verdict. Its
81
+ description starts "Deprecated", and each result carries a second text block naming the
82
+ replacement (#1575).
83
+
10
84
  ## [6.1.0] - 2026-10-18
11
85
 
12
86
  One validator and one translator: MCP `validate_and_compile` accepts the English the engine reads
@@ -1999,7 +2073,8 @@ _Synchronized version release. See git history for details._
1999
2073
  - npm access token stored in GitHub Secrets
2000
2074
  - 2FA recommended for npm organization
2001
2075
 
2002
- [Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v6.1.0...HEAD
2076
+ [Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v6.2.0...HEAD
2077
+ [6.2.0]: https://github.com/codetalcott/hyperfixi/compare/v6.1.0...v6.2.0
2003
2078
  [6.1.0]: https://github.com/codetalcott/hyperfixi/compare/v6.0.0...v6.1.0
2004
2079
  [6.0.0]: https://github.com/codetalcott/hyperfixi/compare/v5.1.0...v6.0.0
2005
2080
  [5.1.0]: https://github.com/codetalcott/hyperfixi/compare/v5.0.0...v5.1.0
@@ -1,5 +1,5 @@
1
- import { L as LangCode } from './html-kd-_vQoo.js';
2
- export { T as TranslateHtmlOptions, t as translateHtml, a as translateHtmlToManyLangs } from './html-kd-_vQoo.js';
1
+ import { L as LangCode } from './html-BlS5La9s.js';
2
+ export { T as TranslateHtmlOptions, t as translateHtml, a as translateHtmlToManyLangs } from './html-BlS5La9s.js';
3
3
  import './validate.js';
4
4
 
5
5
  /**
@@ -63,4 +63,5 @@ interface EleventyConfig {
63
63
  }
64
64
  declare function hyperscriptI18nPlugin(eleventyConfig: EleventyConfig, options?: EleventyPluginOptions): Promise<void>;
65
65
 
66
- export { type EleventyPluginOptions, LangCode, hyperscriptI18nPlugin as default };
66
+ export { LangCode, hyperscriptI18nPlugin as default };
67
+ export type { EleventyPluginOptions };
@@ -78,4 +78,5 @@ declare function checkHtmlInput(html: string, validate: CanonicalValidate, to?:
78
78
  declare function translateHtml(html: string, to: LangCode, options?: TranslateHtmlOptions): string;
79
79
  declare function translateHtmlToManyLangs(html: string, langs: ReadonlyArray<LangCode>, options?: TranslateHtmlOptions): Map<LangCode, string>;
80
80
 
81
- export { type LangCode as L, type OnInvalid as O, type RefusalReport as R, type TranslateHtmlOptions as T, translateHtmlToManyLangs as a, type OnRefused as b, checkHtmlInput as c, extractHyperscriptAttributes as e, formatRefusalReport as f, translateHtml as t };
81
+ export { translateHtmlToManyLangs as a, checkHtmlInput as c, extractHyperscriptAttributes as e, formatRefusalReport as f, translateHtml as t };
82
+ export type { LangCode as L, OnInvalid as O, RefusalReport as R, TranslateHtmlOptions as T, OnRefused as b };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { L as LangCode, O as OnInvalid, b as OnRefused, R as RefusalReport, T as TranslateHtmlOptions, c as checkHtmlInput, e as extractHyperscriptAttributes, f as formatRefusalReport, t as translateHtml, a as translateHtmlToManyLangs } from './html-kd-_vQoo.js';
1
+ export { L as LangCode, O as OnInvalid, b as OnRefused, R as RefusalReport, T as TranslateHtmlOptions, c as checkHtmlInput, e as extractHyperscriptAttributes, f as formatRefusalReport, t as translateHtml, a as translateHtmlToManyLangs } from './html-BlS5La9s.js';
2
2
  export { CanonicalValidate, ParseCheckReport, formatParseCheckReport, loadValidator, validateHyperscript } from './validate.js';
3
3
 
4
4
  /**
@@ -41,4 +41,5 @@ declare function warnInvalidOnce(r: ParseCheckReport): boolean;
41
41
  /** @internal test hook — clears the per-process warn-dedupe set. */
42
42
  declare function __resetParseCheckWarnings(): void;
43
43
 
44
- export { type CanonicalValidate, type ParseCheckReport, __resetParseCheckWarnings, formatParseCheckReport, loadValidator, validateHyperscript, warnInvalidOnce };
44
+ export { __resetParseCheckWarnings, formatParseCheckReport, loadValidator, validateHyperscript, warnInvalidOnce };
45
+ export type { CanonicalValidate, ParseCheckReport };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperscript-tools/i18n",
3
- "version": "6.1.0",
3
+ "version": "6.2.0",
4
4
  "description": "Build-time translation for hyperscript code samples — generate per-language HTML from a canonical English source",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -48,12 +48,12 @@
48
48
  "author": "HyperFixi Contributors",
49
49
  "license": "MIT",
50
50
  "dependencies": {
51
- "@lokascript/semantic": "^6.1.0",
51
+ "@lokascript/semantic": "^6.2.0",
52
52
  "hyperscript.org": "^0.9.93"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/node": "^26.6.3",
56
- "tsup": "^8.0.0",
56
+ "tsup": "^9.0.0",
57
57
  "typescript": "^5.0.0"
58
58
  },
59
59
  "files": [