@ultimat3/core 31.14.0 → 31.15.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/package.json +2 -2
- package/src/config-islands.ts +21 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/core",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.15.0",
|
|
4
4
|
"description": "Ultimate's foundation: errors, context, env, config, clock, ids, logging, telemetry, lifecycle",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ultimate",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"test": "bun test"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@ultimat3/schema": "31.
|
|
57
|
+
"@ultimat3/schema": "31.15.0"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/src/config-islands.ts
CHANGED
|
@@ -17,9 +17,15 @@ import { describeValue } from './error-render';
|
|
|
17
17
|
* 55,585 → 42,331 B — the win route grouping now takes by default where islands co-render. Turn
|
|
18
18
|
* it on only where cross-page caching of shared code is worth it, and weigh the routes with
|
|
19
19
|
* `x verify`.
|
|
20
|
+
*
|
|
21
|
+
* `vendorSolid: true` builds Solid once, as `/islands/vendor-solid.<hash>.js`, and every island
|
|
22
|
+
* imports it instead of inlining its own copy. OFF BY DEFAULT, measured As of 2026-11-12 (Bun
|
|
23
|
+
* 1.4.4, solid-js 1.9.17): the vendor is 48,083 B (17,388 B gzip) where an island inlines a
|
|
24
|
+
* tree-shaken ~14 kB, so it pays only on a route rendering four or more Solid islands built apart.
|
|
20
25
|
*/
|
|
21
26
|
export interface IslandsConfig {
|
|
22
27
|
readonly sharedChunks: boolean;
|
|
28
|
+
readonly vendorSolid: boolean;
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
export interface IslandsSection {
|
|
@@ -27,24 +33,34 @@ export interface IslandsSection {
|
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
export interface IslandsSectionInput {
|
|
30
|
-
readonly islands?:
|
|
36
|
+
readonly islands?:
|
|
37
|
+
| {
|
|
38
|
+
readonly sharedChunks?: boolean | undefined;
|
|
39
|
+
readonly vendorSolid?: boolean | undefined;
|
|
40
|
+
}
|
|
41
|
+
| undefined;
|
|
31
42
|
}
|
|
32
43
|
|
|
33
44
|
/** The last layer that said it wins, as every scalar does. */
|
|
34
45
|
export function mergeIslands(layers: readonly IslandsSectionInput[]): IslandsSection {
|
|
35
46
|
let sharedChunks = false;
|
|
47
|
+
let vendorSolid = false;
|
|
36
48
|
for (const layer of layers) {
|
|
37
49
|
const said = layer.islands?.sharedChunks;
|
|
38
50
|
if (said !== undefined) sharedChunks = said;
|
|
51
|
+
const vendor = layer.islands?.vendorSolid;
|
|
52
|
+
if (vendor !== undefined) vendorSolid = vendor;
|
|
39
53
|
}
|
|
40
|
-
return { islands: { sharedChunks } };
|
|
54
|
+
return { islands: { sharedChunks, vendorSolid } };
|
|
41
55
|
}
|
|
42
56
|
|
|
43
57
|
/** Appends every refusal the section earns to `issues`, `config.ts`' one list. */
|
|
44
58
|
export function islandsIssues(config: IslandsSection, issues: string[]): void {
|
|
45
59
|
// `unknown`: an untyped config file reaches this validator with whatever it wrote.
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
60
|
+
for (const key of ['sharedChunks', 'vendorSolid'] as const) {
|
|
61
|
+
const said: unknown = config.islands[key];
|
|
62
|
+
if (typeof said !== 'boolean') {
|
|
63
|
+
issues.push(`islands.${key} must be true or false, not ${describeValue(said)}`);
|
|
64
|
+
}
|
|
49
65
|
}
|
|
50
66
|
}
|