@absolutejs/absolute 0.20.0-beta.121 → 0.20.0-beta.123

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/changelog.json +57 -0
  3. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  4. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  5. package/dist/angular/index.js +14 -2
  6. package/dist/angular/index.js.map +5 -4
  7. package/dist/angular/server.js +14 -2
  8. package/dist/angular/server.js.map +5 -4
  9. package/dist/build.js +120 -43
  10. package/dist/build.js.map +7 -6
  11. package/dist/cli/config/server.js +9 -1
  12. package/dist/cli/{dev-pdefc9ac.js → dev-s7kct3xq.js} +6 -1
  13. package/dist/cli/index-hty8111z.js +410 -0
  14. package/dist/cli/index.js +6 -2
  15. package/dist/cli/patchedBun-zjtrn2s4.js +38 -0
  16. package/dist/client/chunks/index-dk743xs6.js +146 -0
  17. package/dist/client/chunks/index-dk743xs6.js.map +10 -0
  18. package/dist/client/chunks/index-jrcwp722.js +12 -0
  19. package/dist/client/chunks/index-jrcwp722.js.map +10 -0
  20. package/dist/client/chunks/{islands-xj2n8nwf.js → islands-50dg63j9.js} +6 -3
  21. package/dist/client/chunks/{islands-xj2n8nwf.js.map → islands-50dg63j9.js.map} +3 -3
  22. package/dist/client/chunks/{react-pdg4325x.js → react-yq4ss9y4.js} +4 -3
  23. package/dist/client/chunks/{react-pdg4325x.js.map → react-yq4ss9y4.js.map} +2 -2
  24. package/dist/client/index.js +5 -4
  25. package/dist/client/index.js.map +2 -2
  26. package/dist/dev/client/handlers/react.ts +31 -39
  27. package/dist/dev/client/hmrClient.ts +3 -0
  28. package/dist/dev/serverBootstrap.js +11 -0
  29. package/dist/index.js +122 -45
  30. package/dist/index.js.map +7 -6
  31. package/dist/islands/index.js +14 -2
  32. package/dist/islands/index.js.map +5 -4
  33. package/dist/mobile/remoteMacAgentEntry.js +1 -1
  34. package/dist/react/index.js +14 -2
  35. package/dist/react/index.js.map +5 -4
  36. package/dist/react/server.js +14 -2
  37. package/dist/react/server.js.map +5 -4
  38. package/dist/src/cli/patchedBun.d.ts +84 -0
  39. package/dist/src/client/browserTranslation.d.ts +3 -0
  40. package/dist/src/client/browserTranslationAttributes.d.ts +2 -0
  41. package/dist/src/dev/hotRejectionGuard.d.ts +1 -0
  42. package/dist/src/dev/moduleServer.d.ts +10 -3
  43. package/dist/src/mobile/emulatorDoctor.d.ts +1 -1
  44. package/dist/src/vue/components/Image.d.ts +1 -1
  45. package/dist/svelte/index.js +14 -2
  46. package/dist/svelte/index.js.map +5 -4
  47. package/dist/svelte/server.js +14 -2
  48. package/dist/svelte/server.js.map +5 -4
  49. package/dist/types/globals.d.ts +10 -0
  50. package/dist/vue/browser.js +75 -8
  51. package/dist/vue/browser.js.map +5 -4
  52. package/dist/vue/index.js +77 -9
  53. package/dist/vue/index.js.map +6 -5
  54. package/dist/vue/server.js +14 -2
  55. package/dist/vue/server.js.map +5 -4
  56. package/package.json +1 -1
  57. package/dist/client/chunks/index-5py90ctf.js +0 -87
  58. package/dist/client/chunks/index-5py90ctf.js.map +0 -10
  59. package/dist/cli/{mobile-00bqw12c.js → mobile-6kdsrhxy.js} +3 -3
package/CHANGELOG.md CHANGED
@@ -6,6 +6,35 @@ This file is generated by `absolute-changelog` from the entries in
6
6
  `changelog/`. Edit an entry, not this file — and add new ones under
7
7
  `changelog/unreleased/`.
8
8
 
9
+ ## 0.20.0-beta.123 — 2026-09-28
10
+
11
+ ### Added
12
+
13
+ - **React Fast Refresh keeps component state: `absolute dev` can run on AbsoluteJS's patched Bun**
14
+ Stock Bun ignores `reactFastRefresh` on `Bun.Transpiler` (oven-sh/bun#32919), so React edits in `absolute dev` remounted the page and lost component state. AbsoluteJS now publishes Bun 1.4.0 with just that fix for every platform Bun ships (github.com/absolutejs/patched-bun). In React projects on stock Bun, `absolute dev` offers it once (Install now / Ask me later / Don't ask again); it installs to ~/.absolutejs/bun, is checked against a pinned SHA-256, and only the dev server uses it, so your `bun` is unchanged. `absolute bun-patch [status|install|remove|reset]` manages it; `ABSOLUTE_PATCHED_BUN=0` opts out.
15
+
16
+ ### Fixed
17
+
18
+ - **`absolute dev` keeps rebuilding after a syntax error in a React component or an unhandled rejection**
19
+ Under `bun --hot`, Bun counts unhandled rejections that no listener claims and never resets the count; while it is non-zero Bun parks the process in a loop that still serves requests and delivers file-watch events but never runs timers. The server entry imports React pages, so saving a React component with a syntax error made Bun's hot reload reject, and from then on the HMR debounce never fired: every edit was detected and queued, including the one that fixed the error, and nothing rebuilt until the dev server restarted. An unhandled rejection in app code did the same. The dev server now claims unhandled rejections and prints them as before, so its timers keep running.
20
+ - **The patched Bun is now a release build, not a canary build**
21
+ `absolute bun-patch install` and the `absolute dev` offer now install `bun-v1.4.0-absolute.2`. The first release was built as a Bun canary build (Bun's build default): it reported `1.4.0-canary.1`, enabled Bun's experimental "bake" server features and made `bun upgrade` track canary. absolute.2 is built with `--canary=off`, as Bun's own releases are; the React Fast Refresh fix is unchanged. Run `absolute bun-patch install` to replace an absolute.1 install.
22
+ - **Removed a React HMR CSS branch that only matched the example app**
23
+ The React HMR client had a CSS-only branch that looked up the example app's `ReactExampleCSS` manifest key, so it could never work in another app; the server never sends a CSS-only React update, so it was also unreachable. Removed. Stylesheet edits on React pages go through the general stylesheet swap, now covered by a browser test (the rule applies, component state and the document are kept).
24
+ - **React edits that add a component, touch a hook or utility, or create a folder now update the page in place**
25
+ The React fast path told the browser to re-import a single module: the first non-page file in the batch. A new component added to the page re-imported only the new file, so the page never rendered it; a folder created alongside a file became the target and its URL failed to load; and an edited hook or utility whose importer had not been fetched through the module server re-imported just itself, which updates nothing on screen. Every edited file now gets a target (hooks and utilities resolve to the nearest importing component, falling back to the dependents the dependency graph found), directories and deleted paths are skipped, and the client imports them all before refreshing. On stock Bun the remount fallback rendered the changed child in place of the whole page; it now re-imports the page module for the page on screen and ignores edits that do not reach it.
26
+ - **React Fast Refresh is used when Bun supports it, instead of always falling back to a remount**
27
+ The dev server decides between React Fast Refresh and the stock-Bun remount fallback by transpiling a probe component. The probe was named `__AbsoluteRefreshProbe`; React Fast Refresh registers only capitalized components, so it reported "unsupported" even on a Bun with the reactFastRefresh fix, and React edits always remounted with a warning. It now uses a capitalized name.
28
+ - **A syntax error in a React component shows the error overlay instead of reloading the page**
29
+ A React edit that failed to compile was still broadcast as an update. The browser imported a module that answered 500 and fell back to a full reload, which showed the last good page and no error. The dev server now checks the edited modules compile first and sends the error overlay (file, line and source line) instead; the save that fixes it applies as a normal in-place update. The module server handler and its transform errors also moved to globalThis: after a `bun --hot` reload failed part-way, later imports of the module server got a fresh instance that was never configured, so pre-transforming the changed module silently did nothing.
30
+
31
+ ## 0.20.0-beta.122 — 2026-09-27
32
+
33
+ ### Fixed
34
+
35
+ - **Preserve browser-translated attributes and inserted text-only font wrappers through hydration** (`captureSsrTextBaselines`, `prepareBrowserTranslationHydration`, `preserveBrowserTranslation`)
36
+ Snapshot alt, title, placeholder and aria-label alongside SSR text. Temporarily restore those attributes and newly inserted text-only font trees while the framework hydrates, then reapply translations on the hydrated nodes. Preserve authored and interactive markup, URLs, field values and genuine client changes. Fixes translated landing-page warnings and text reverting to English without suppressing ordinary hydration mismatches.
37
+
9
38
  ## 0.20.0-beta.121 — 2026-09-27
10
39
 
11
40
  ### Added
package/changelog.json CHANGED
@@ -2,6 +2,63 @@
2
2
  "contract": 1,
3
3
  "name": "@absolutejs/absolute",
4
4
  "releases": [
5
+ {
6
+ "changes": [
7
+ {
8
+ "detail": "Under `bun --hot`, Bun counts unhandled rejections that no listener claims and never resets the count; while it is non-zero Bun parks the process in a loop that still serves requests and delivers file-watch events but never runs timers. The server entry imports React pages, so saving a React component with a syntax error made Bun's hot reload reject, and from then on the HMR debounce never fired: every edit was detected and queued, including the one that fixed the error, and nothing rebuilt until the dev server restarted. An unhandled rejection in app code did the same. The dev server now claims unhandled rejections and prints them as before, so its timers keep running.",
9
+ "kind": "fixed",
10
+ "summary": "`absolute dev` keeps rebuilding after a syntax error in a React component or an unhandled rejection"
11
+ },
12
+ {
13
+ "detail": "`absolute bun-patch install` and the `absolute dev` offer now install `bun-v1.4.0-absolute.2`. The first release was built as a Bun canary build (Bun's build default): it reported `1.4.0-canary.1`, enabled Bun's experimental \"bake\" server features and made `bun upgrade` track canary. absolute.2 is built with `--canary=off`, as Bun's own releases are; the React Fast Refresh fix is unchanged. Run `absolute bun-patch install` to replace an absolute.1 install.",
14
+ "kind": "fixed",
15
+ "summary": "The patched Bun is now a release build, not a canary build"
16
+ },
17
+ {
18
+ "detail": "Stock Bun ignores `reactFastRefresh` on `Bun.Transpiler` (oven-sh/bun#32919), so React edits in `absolute dev` remounted the page and lost component state. AbsoluteJS now publishes Bun 1.4.0 with just that fix for every platform Bun ships (github.com/absolutejs/patched-bun). In React projects on stock Bun, `absolute dev` offers it once (Install now / Ask me later / Don't ask again); it installs to ~/.absolutejs/bun, is checked against a pinned SHA-256, and only the dev server uses it, so your `bun` is unchanged. `absolute bun-patch [status|install|remove|reset]` manages it; `ABSOLUTE_PATCHED_BUN=0` opts out.",
19
+ "kind": "added",
20
+ "summary": "React Fast Refresh keeps component state: `absolute dev` can run on AbsoluteJS's patched Bun"
21
+ },
22
+ {
23
+ "detail": "The React HMR client had a CSS-only branch that looked up the example app's `ReactExampleCSS` manifest key, so it could never work in another app; the server never sends a CSS-only React update, so it was also unreachable. Removed. Stylesheet edits on React pages go through the general stylesheet swap, now covered by a browser test (the rule applies, component state and the document are kept).",
24
+ "kind": "fixed",
25
+ "summary": "Removed a React HMR CSS branch that only matched the example app"
26
+ },
27
+ {
28
+ "detail": "The React fast path told the browser to re-import a single module: the first non-page file in the batch. A new component added to the page re-imported only the new file, so the page never rendered it; a folder created alongside a file became the target and its URL failed to load; and an edited hook or utility whose importer had not been fetched through the module server re-imported just itself, which updates nothing on screen. Every edited file now gets a target (hooks and utilities resolve to the nearest importing component, falling back to the dependents the dependency graph found), directories and deleted paths are skipped, and the client imports them all before refreshing. On stock Bun the remount fallback rendered the changed child in place of the whole page; it now re-imports the page module for the page on screen and ignores edits that do not reach it.",
29
+ "kind": "fixed",
30
+ "summary": "React edits that add a component, touch a hook or utility, or create a folder now update the page in place"
31
+ },
32
+ {
33
+ "detail": "The dev server decides between React Fast Refresh and the stock-Bun remount fallback by transpiling a probe component. The probe was named `__AbsoluteRefreshProbe`; React Fast Refresh registers only capitalized components, so it reported \"unsupported\" even on a Bun with the reactFastRefresh fix, and React edits always remounted with a warning. It now uses a capitalized name.",
34
+ "kind": "fixed",
35
+ "summary": "React Fast Refresh is used when Bun supports it, instead of always falling back to a remount"
36
+ },
37
+ {
38
+ "detail": "A React edit that failed to compile was still broadcast as an update. The browser imported a module that answered 500 and fell back to a full reload, which showed the last good page and no error. The dev server now checks the edited modules compile first and sends the error overlay (file, line and source line) instead; the save that fixes it applies as a normal in-place update. The module server handler and its transform errors also moved to globalThis: after a `bun --hot` reload failed part-way, later imports of the module server got a fresh instance that was never configured, so pre-transforming the changed module silently did nothing.",
39
+ "kind": "fixed",
40
+ "summary": "A syntax error in a React component shows the error overlay instead of reloading the page"
41
+ }
42
+ ],
43
+ "date": "2026-09-28",
44
+ "version": "0.20.0-beta.123"
45
+ },
46
+ {
47
+ "changes": [
48
+ {
49
+ "detail": "Snapshot alt, title, placeholder and aria-label alongside SSR text. Temporarily restore those attributes and newly inserted text-only font trees while the framework hydrates, then reapply translations on the hydrated nodes. Preserve authored and interactive markup, URLs, field values and genuine client changes. Fixes translated landing-page warnings and text reverting to English without suppressing ordinary hydration mismatches.",
50
+ "kind": "fixed",
51
+ "summary": "Preserve browser-translated attributes and inserted text-only font wrappers through hydration",
52
+ "symbols": [
53
+ "captureSsrTextBaselines",
54
+ "prepareBrowserTranslationHydration",
55
+ "preserveBrowserTranslation"
56
+ ]
57
+ }
58
+ ],
59
+ "date": "2026-09-27",
60
+ "version": "0.20.0-beta.122"
61
+ },
5
62
  {
6
63
  "changes": [
7
64
  {
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-yuN6Qt/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-TZvQHy/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-yuN6Qt/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-TZvQHy/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
48
48
  getWarningController()?.maybeWarn(primitiveName);
49
49
  };
50
50
 
51
- // .angular-partial-tmp-yuN6Qt/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-TZvQHy/src/core/streamingSlotRegistry.ts
52
52
  var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
53
53
  var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
54
54
  var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
@@ -1107,6 +1107,17 @@ var requireCurrentIslandRegistry = () => {
1107
1107
  globalThis.__absoluteIslandRegistry = registry;
1108
1108
  };
1109
1109
 
1110
+ // src/client/browserTranslationAttributes.ts
1111
+ var TRANSLATABLE_ATTRIBUTES;
1112
+ var init_browserTranslationAttributes = __esm(() => {
1113
+ TRANSLATABLE_ATTRIBUTES = [
1114
+ "alt",
1115
+ "title",
1116
+ "placeholder",
1117
+ "aria-label"
1118
+ ];
1119
+ });
1120
+
1110
1121
  // src/core/browserTranslation.ts
1111
1122
  var BASELINE_MARKER = "__ABSOLUTE_SSR_TEXT_BASELINES__", BROWSER_TRANSLATION_BASELINE_SCRIPT, browserTranslationBaselineTag = () => `<script>${BROWSER_TRANSLATION_BASELINE_SCRIPT}</script>`, injectBrowserTranslationBaseline = (html) => {
1112
1123
  if (html.includes(BASELINE_MARKER))
@@ -1118,7 +1129,8 @@ var BASELINE_MARKER = "__ABSOLUTE_SSR_TEXT_BASELINES__", BROWSER_TRANSLATION_BAS
1118
1129
  return `${html.slice(0, closingBodyIndex)}${script}${html.slice(closingBodyIndex)}`;
1119
1130
  };
1120
1131
  var init_browserTranslation = __esm(() => {
1121
- BROWSER_TRANSLATION_BASELINE_SCRIPT = "window.__ABSOLUTE_SSR_TEXT_BASELINES__=new WeakMap();" + "{const r=document.body,b=window.__ABSOLUTE_SSR_TEXT_BASELINES__;" + 'if(r)for(const e of [r,...r.querySelectorAll("*")]){' + "const t=new Map();for(const [i,n]of[...e.childNodes].entries())" + 'if(n.nodeType===3)t.set(i,n.nodeValue??"");if(t.size)b.set(e,t);}}';
1132
+ init_browserTranslationAttributes();
1133
+ BROWSER_TRANSLATION_BASELINE_SCRIPT = "window.__ABSOLUTE_SSR_TEXT_BASELINES__=new WeakMap();" + "window.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__=new WeakMap();" + "{const r=document.body,b=window.__ABSOLUTE_SSR_TEXT_BASELINES__," + "a=window.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__;" + 'if(r)for(const e of [r,...r.querySelectorAll("*")]){' + "const t=new Map();for(const [i,n]of[...e.childNodes].entries())" + 'if(n.nodeType===3)t.set(i,n.nodeValue??"");if(t.size)b.set(e,t);' + `const v=new Map();for(const k of ${JSON.stringify(TRANSLATABLE_ATTRIBUTES)}){` + "const s=e.getAttribute(k);if(s!==null)v.set(k,s);}if(v.size)a.set(e,v);}}";
1122
1134
  });
1123
1135
 
1124
1136
  // src/angular/requestProviders.ts
@@ -16752,5 +16764,5 @@ export {
16752
16764
  withPendingTask
16753
16765
  };
16754
16766
 
16755
- //# debugId=DE5F95BFF37D0BF264756E2164756E21
16767
+ //# debugId=E4722B59E349FBC764756E2164756E21
16756
16768
  //# sourceMappingURL=index.js.map