akanjs 3.3.0-rc.45 → 3.3.0-rc.47
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 +8 -0
- package/common/websocketContract.ts +1 -1
- package/fetch/client/requestScope.ts +4 -1
- package/package.json +2 -2
- package/server/metrics/metricMerge.ts +1 -1
- package/store/agent/StoreCatalogue.ts +1 -1
- package/store/draftStore.ts +2 -2
- package/ui/Dialog/Modal.tsx +2 -2
- package/ui/Model/editSeed.ts +1 -1
- package/vendor/@akanjs/native/packages/cli/src/lib/compat.ts +1 -1
- package/vendor/@akanjs/native/packages/cli/src/lib/distribution.ts +1 -1
- package/webkit/CsrRouteTable.ts +1 -1
- package/webkit/McpAppFetchBridge.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -600,6 +600,14 @@
|
|
|
600
600
|
|
|
601
601
|
Nothing to do. A workspace on an older `akanjs` without the `akanjs/client` entry builds as it did.
|
|
602
602
|
|
|
603
|
+
- 9a3e6b0: In a native app (the CSR runtime), a push that changes only the query stays on its page, and a closing `Dialog.Modal` can play a leave animation.
|
|
604
|
+
|
|
605
|
+
`router.push` or a `Link` to the page already on screen, with only a different query or hash, used to add a copy of that page to the CSR stack: a record opened over a list with `?id=`, a calendar stepped to the next week, a filter changed. Back then showed the same screen again, once per push. Such a push now rewrites the entry it is on, as `router.replace` does, so one back leaves the page. A push to another path stacks as before, and a web page served by the server is unchanged.
|
|
606
|
+
|
|
607
|
+
What changes for an app: a screen that opens something with a query push and closes it with `router.back()` now leaves the page when it closes, because the push stacked nothing; `{ shallow: true }` makes no difference. Open and close it with `router.replace`, or give it a route of its own.
|
|
608
|
+
|
|
609
|
+
`Dialog.Modal` unmounted the moment it closed. It now marks its panel and backdrop `data-leaving` and stays drawn while an animation plays on the panel, so `data-leaving:animate-…` on the modal's `className` is its leave animation. It waits 600 ms at most, the backdrop fades and takes no taps meanwhile, and a sheet dragged shut leaves from where the finger let go. A modal with no such animation unmounts at once, as before.
|
|
610
|
+
|
|
603
611
|
- bf582c1: A page stored in the HTML cache is kept as the bytes it streamed, instead of being decoded to text and encoded again before compression. Storing a 600 KB page takes about a fifth of the main-thread time it did, and the stored page and every response from it are unchanged.
|
|
604
612
|
- 8bbe7c8: Every response from `/_akan/image` carries `X-Content-Type-Options: nosniff`, `Referrer-Policy` and a sandboxing `Content-Security-Policy` (`script-src 'none'; frame-src 'none'; sandbox;`), and an image response carries `Content-Disposition: attachment` named after its source file. An SVG an app allows with `dangerouslyAllowSVG` still shows in an `<img>`, and runs no script when its URL is opened on its own.
|
|
605
613
|
|
|
@@ -70,7 +70,7 @@ const canonicalOf = (value: unknown, holding: Set<object>): unknown => {
|
|
|
70
70
|
if (Array.isArray(value)) return value.map((item) => canonicalOf(item, holding) ?? null);
|
|
71
71
|
|
|
72
72
|
const record: Record<string, unknown> = Object.create(null);
|
|
73
|
-
for (const key of Object.keys(value).sort()) {
|
|
73
|
+
for (const key of Object.keys(value).sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))) {
|
|
74
74
|
const item = canonicalOf((value as Record<string, unknown>)[key], holding);
|
|
75
75
|
if (item !== undefined) record[key] = item;
|
|
76
76
|
}
|
|
@@ -15,7 +15,10 @@ export const makeRequestQueryCacheKey = (
|
|
|
15
15
|
url,
|
|
16
16
|
headers: Object.entries(headers).sort(([a], [b]) => a.localeCompare(b)),
|
|
17
17
|
timeout: budget.timeout ?? DEFAULT_TIMEOUT_MS,
|
|
18
|
-
retry: JSON.stringify(
|
|
18
|
+
retry: JSON.stringify(
|
|
19
|
+
budget.retry,
|
|
20
|
+
Object.keys(budget.retry).sort((a, b) => (a < b ? -1 : a > b ? 1 : 0)),
|
|
21
|
+
),
|
|
19
22
|
});
|
|
20
23
|
};
|
|
21
24
|
export const deepCopy = <T>(value: T): T => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akanjs",
|
|
3
|
-
"version": "3.3.0-rc.
|
|
3
|
+
"version": "3.3.0-rc.47",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
}
|
|
549
549
|
},
|
|
550
550
|
"devDependencies": {
|
|
551
|
-
"@biomejs/biome": "2.5.
|
|
551
|
+
"@biomejs/biome": "2.5.15",
|
|
552
552
|
"@types/bun": "^1.4.4"
|
|
553
553
|
},
|
|
554
554
|
"bun": {
|
|
@@ -5,7 +5,7 @@ type HistogramFamily = Extract<AkanMetricFamily, { type: "histogram" }>;
|
|
|
5
5
|
|
|
6
6
|
const keyOf = (labels: Record<string, string>) =>
|
|
7
7
|
Object.keys(labels)
|
|
8
|
-
.sort()
|
|
8
|
+
.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
|
|
9
9
|
.map((name) => `${name}\u0000${labels[name]}`)
|
|
10
10
|
.join("\u0001");
|
|
11
11
|
|
|
@@ -46,7 +46,7 @@ export class StoreCatalogue {
|
|
|
46
46
|
const state = this.#instance.get();
|
|
47
47
|
const declared = StoreCatalogue.#declaredStateModels();
|
|
48
48
|
const entries = Object.keys(state)
|
|
49
|
-
.sort()
|
|
49
|
+
.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
|
|
50
50
|
.map((key): [string, SerializedStoreState] => {
|
|
51
51
|
const role = this.#instance.sliceStateRoles.get(key);
|
|
52
52
|
const model = role
|
package/store/draftStore.ts
CHANGED
|
@@ -60,7 +60,7 @@ export class DraftStore {
|
|
|
60
60
|
|
|
61
61
|
const entries = Object.keys(source)
|
|
62
62
|
.filter((key) => !["undefined", "function", "symbol"].includes(typeof source[key]))
|
|
63
|
-
.sort()
|
|
63
|
+
.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
|
|
64
64
|
.map((key) => `${JSON.stringify(key)}:${DraftStore.#stableStringify(source[key])}`);
|
|
65
65
|
return `{${entries.join(",")}}`;
|
|
66
66
|
}
|
|
@@ -74,7 +74,7 @@ export class DraftStore {
|
|
|
74
74
|
const source = value as Record<string, unknown>;
|
|
75
75
|
if (depth > 0 && typeof source.id === "string") return source.id;
|
|
76
76
|
const entries = Object.keys(source)
|
|
77
|
-
.sort()
|
|
77
|
+
.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
|
|
78
78
|
.map((key) => [key, DraftStore.#canonicalSeed(source[key], depth + 1)] as const)
|
|
79
79
|
.filter(([, item]) => item !== undefined);
|
|
80
80
|
return Object.fromEntries(entries);
|
package/ui/Dialog/Modal.tsx
CHANGED
package/ui/Model/editSeed.ts
CHANGED
|
@@ -21,7 +21,7 @@ export class EditSeed {
|
|
|
21
21
|
const source = value as Record<string, unknown>;
|
|
22
22
|
const entries = Object.keys(source)
|
|
23
23
|
.filter((key) => source[key] !== undefined)
|
|
24
|
-
.sort()
|
|
24
|
+
.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
|
|
25
25
|
.map((key) => `${JSON.stringify(key)}:${EditSeed.#stableStringify(source[key])}`);
|
|
26
26
|
return `{${entries.join(",")}}`;
|
|
27
27
|
}
|
|
@@ -90,7 +90,7 @@ export function nativeApi(
|
|
|
90
90
|
platform,
|
|
91
91
|
plugins,
|
|
92
92
|
acl: acl ?? null,
|
|
93
|
-
permissions: Object.keys(project.config.permissions).sort(),
|
|
93
|
+
permissions: Object.keys(project.config.permissions).sort((a, b) => (a < b ? -1 : a > b ? 1 : 0)),
|
|
94
94
|
deepLinks: [...project.config.deepLinks.schemes].sort(),
|
|
95
95
|
};
|
|
96
96
|
}
|
|
@@ -30,7 +30,7 @@ export function requestedDistribution(
|
|
|
30
30
|
): Distribution {
|
|
31
31
|
const unused = Object.keys(env)
|
|
32
32
|
.filter((name) => SIGNING_ENV.test(name) && env[name]?.trim())
|
|
33
|
-
.sort();
|
|
33
|
+
.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));
|
|
34
34
|
if (!sign && !notarize) return { notice: null, unused };
|
|
35
35
|
if (platform !== "macos" && platform !== "windows")
|
|
36
36
|
throw new CliError(`--sign and --notarize are for a macOS or Windows app, not ${platform}`);
|
package/webkit/CsrRouteTable.ts
CHANGED
|
@@ -350,7 +350,7 @@ export class CsrRouteTable {
|
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
static #keysOf(context: CsrRouteContext) {
|
|
353
|
-
return Object.keys(context).sort();
|
|
353
|
+
return Object.keys(context).sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
static #paramNamesOf(pattern: string) {
|
|
@@ -95,7 +95,7 @@ export class McpAppFetchBridge implements FetchBridge {
|
|
|
95
95
|
static #callKey(key: string, args: Record<string, unknown>) {
|
|
96
96
|
const sorted = Object.keys(args)
|
|
97
97
|
.filter((name) => args[name] !== undefined && args[name] !== null)
|
|
98
|
-
.sort()
|
|
98
|
+
.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
|
|
99
99
|
.map((name) => [name, args[name]]);
|
|
100
100
|
return `${key}:${JSON.stringify(sorted)}`;
|
|
101
101
|
}
|