@markless/bundler 0.8.0 → 0.9.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/dist/{execution-log-BL-7a77M.d.ts → execution-log-6xkAwVG_.d.ts} +2 -2
- package/dist/preload.d.ts +2 -2
- package/dist/preload.js +1 -1
- package/dist/{rolldown-BMQrr9-Y.js → rolldown-Bh_TCkt_.js} +318 -569
- package/dist/rolldown.d.ts +3 -3
- package/dist/rolldown.js +2 -2
- package/dist/{roster-resume-CpphsFl_.js → roster-resume-DXptD6DG.js} +2 -1
- package/dist/{route-pack-groups-BLS6xeVV.js → route-pack-groups-0vHmSVdv.js} +563 -5
- package/dist/{types-iOUoceJ-.d.ts → types-5srcMsXU.d.ts} +10 -0
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +10 -4
- package/package.json +5 -5
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { ArtifactChildMaterialization, ModuleGraphInterfaceArtifact, SemanticGraphArtifact, SemanticGraphInput } from "@markless/compiler";
|
|
2
|
+
import { Plugin } from "rolldown";
|
|
3
|
+
//#region src/build/native-packing.d.ts
|
|
4
|
+
/** The pack each module was planned into, and the routes a shared pack serves. */
|
|
5
|
+
type PackOwnership = {
|
|
6
|
+
readonly packOf: (moduleId: string) => string | undefined;
|
|
7
|
+
readonly packRoutes: (pack: string) => ReadonlyArray<string> | undefined;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
2
10
|
//#region src/types.d.ts
|
|
3
11
|
type MarklessEnvironment = 'client' | 'server' | 'lib';
|
|
4
12
|
type MarklessClientOutput = 'full' | 'symbols-only';
|
|
@@ -189,6 +197,8 @@ type MarklessRolldownPluginApi = {
|
|
|
189
197
|
declareServerOnlyProps: (resolve: (moduleId: string) => SemanticGraphInput['serverOnlyProps']) => void;
|
|
190
198
|
/** A host plugin names, per root-relative module id, the modules it renders as pages. */
|
|
191
199
|
declareRouteModules: (isRoute: (moduleId: string) => boolean) => void;
|
|
200
|
+
/** The packing pass names the pack each module went into, so the import map can list only chunks several pages load. */
|
|
201
|
+
declarePackOwnership: (packs: PackOwnership) => void;
|
|
192
202
|
invalidateGeneratedModules: (parent: string, environment?: MarklessEnvironment, nextSource?: string) => string[] | Promise<string[]>;
|
|
193
203
|
runtimeDemandMaps: () => Iterable<RuntimeDemandMapManifest | undefined>;
|
|
194
204
|
runtimeDemandSources: () => Iterable<{
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as MarklessEnvironment, g as PreloadGraphEntriesAdder, h as PreloadGraphEntries, i as MarklessBuildMetadata, l as MarklessManifest, m as PreloadGraphContext, n as GlobalInjections, t as BundleGraphAdder, u as MarklessRolldownOptions } from "./types-
|
|
1
|
+
import { c as MarklessEnvironment, g as PreloadGraphEntriesAdder, h as PreloadGraphEntries, i as MarklessBuildMetadata, l as MarklessManifest, m as PreloadGraphContext, n as GlobalInjections, t as BundleGraphAdder, u as MarklessRolldownOptions } from "./types-5srcMsXU.js";
|
|
2
2
|
import { Plugin } from "vite";
|
|
3
3
|
//#region src/vite/index.d.ts
|
|
4
4
|
export interface MarklessViteOptions extends MarklessRolldownOptions {
|
package/dist/vite.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as MARKLESS_DEV_RELOADS_ATTRIBUTE, d as renderMarklessDevErrorDocument, i as MARKLESS_DEV_PAGE_EDIT_EVENT, n as MARKLESS_DEV_ERROR_CLIENT_ID, o as MARKLESS_DEV_RELOADS_EVENT, r as MARKLESS_DEV_ERROR_EVENT, t as MARKLESS_DEV_ERROR_CLEAR_EVENT, u as normalizeMarklessDevError } from "./dev-error-BEduK_R3.js";
|
|
2
|
-
import {
|
|
2
|
+
import { C as isCompilerStatefulModuleId, Mt as INLINE_DEFER_LOADER_SOURCE, Nt as createInlineDeferTriggerSource, P as pathname, Pt as inlineDeferSource, Rt as executionLogActivationInjection, ct as RESUME_ENTRY_SPECIFIER, lt as STORAGE_FREE_RESUME_ENTRY_SPECIFIER, ot as outputDefaults, t as MARKLESS_DEFERRED_PACK, z as sharedReachedRenderDataRequest } from "./route-pack-groups-0vHmSVdv.js";
|
|
3
3
|
import { n as includeOptimizedDeps, t as excludeSourceShippedDeps } from "./optimized-deps-BfzxSm6C.js";
|
|
4
|
-
import { A as
|
|
4
|
+
import { A as moduleIdFor, D as prefetchChunkParses, O as preflightTsrxModuleDiagnostics, _ as createPreloadGraphAdder, a as collapseInitFacadeImports, d as nativePackingEnabled, f as nativePackingPlugins, h as withUndemandedReExportDoors, l as marklessRuntimeSpecifierId, m as undemandedRuntimeModules, o as unwrapAsyncImportWrappers, p as isReExportDoor, t as createMarklessRolldownPlugin, u as DEPRECATED_NATIVE_PACKING_WARNING, v as entryReachableModuleIds, y as runtimeModuleIdFromOrigin } from "./rolldown-Bh_TCkt_.js";
|
|
5
5
|
import { n as marklessRosterPositions, r as marklessRosterRenderContext, t as marklessRosterPositionSeeds } from "./shared-seed-slot-ihIVCD2S.js";
|
|
6
6
|
import { joinURL, parsePath, withQuery } from "ufo";
|
|
7
7
|
import { ASYNC_PROTOCOL_VERSION, PROTOCOL_CONTAINER_HOST_NODE_ID, STORAGE_SLOT_SYMBOL_KEY, escapeScriptJson, serializeRuntimeAsyncSnapshots, serializeRuntimeStateCells, storageAttributeName, storageCookieName, storageSlotEntryKeyFromGraphNodeId } from "@markless/serializer";
|
|
@@ -553,7 +553,7 @@ async function assemblePrerenderPageParts(component, output, options) {
|
|
|
553
553
|
}
|
|
554
554
|
async function renderSsrOutput(component, props, renderContext) {
|
|
555
555
|
assertPageRenderable(component);
|
|
556
|
-
globalThis.__marklessRosterResume ??= () => import("./roster-resume-
|
|
556
|
+
globalThis.__marklessRosterResume ??= () => import("./roster-resume-DXptD6DG.js");
|
|
557
557
|
const context = marklessSsrRosterPositionContext(renderContext);
|
|
558
558
|
if (typeof component === "function") return marklessSsrRosterCounted(context, await marklessSsrDeferredCounted(context, await component(props, context)));
|
|
559
559
|
if (component && typeof component.renderSsr === "function") return marklessSsrRosterCounted(context, await marklessSsrDeferredCounted(context, await component.renderSsr(props, context)));
|
|
@@ -2209,6 +2209,9 @@ function markless(options = {}) {
|
|
|
2209
2209
|
options: rolldownOptions,
|
|
2210
2210
|
prerenderRecordsBySource
|
|
2211
2211
|
});
|
|
2212
|
+
const packingPlugins = nativePackingEnabled(options) ? nativePackingPlugins(() => resolvedRoot, () => basePlugin.api.runtimeDemandMaps(), () => basePlugin.api.runtimeDemandSources()) : void 0;
|
|
2213
|
+
const packOwnership = packingPlugins?.[0]?.api;
|
|
2214
|
+
if (packOwnership) basePlugin.api.declarePackOwnership(packOwnership);
|
|
2212
2215
|
const hmr = createViteHmr(hmrOptions);
|
|
2213
2216
|
const marklessPlugin = {
|
|
2214
2217
|
...basePlugin,
|
|
@@ -2335,6 +2338,9 @@ function markless(options = {}) {
|
|
|
2335
2338
|
}
|
|
2336
2339
|
}
|
|
2337
2340
|
},
|
|
2341
|
+
configureVitest({ defineCacheKeyGenerator }) {
|
|
2342
|
+
defineCacheKeyGenerator(({ id }) => isCompilerStatefulModuleId(id) ? false : void 0);
|
|
2343
|
+
},
|
|
2338
2344
|
configureServer(server) {
|
|
2339
2345
|
server.config.logger?.info(`markless diagnostics available - window.__MARKLESS_DEBUG__ records containers, lifecycles, and event routing; ${DEBUGGING_PLAYBOOK_HINT}.`);
|
|
2340
2346
|
rolldownOptions.devServer = {
|
|
@@ -2425,7 +2431,7 @@ function markless(options = {}) {
|
|
|
2425
2431
|
}
|
|
2426
2432
|
}
|
|
2427
2433
|
},
|
|
2428
|
-
...
|
|
2434
|
+
...packingPlugins ? packingPlugins.map((plugin) => ({
|
|
2429
2435
|
...plugin,
|
|
2430
2436
|
apply: "build",
|
|
2431
2437
|
enforce: "post",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markless/bundler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Markless build plugins for Rolldown and Vite.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"@thi.ng/dgraph": "^2.1.213",
|
|
40
40
|
"pathe": "^2.0.3",
|
|
41
41
|
"ufo": "^1.6.4",
|
|
42
|
-
"@markless/compiler": "0.
|
|
43
|
-
"@markless/
|
|
44
|
-
"@markless/
|
|
42
|
+
"@markless/compiler": "0.9.0",
|
|
43
|
+
"@markless/serializer": "0.9.0",
|
|
44
|
+
"@markless/web": "0.9.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@markless/analyzer": "0.
|
|
47
|
+
"@markless/analyzer": "0.9.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"rolldown": "1.2.14",
|