@gjsify/rolldown-plugin-gjsify 0.64.16 → 0.64.17-next.292
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/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/plugins/worker-url.d.ts +10 -1
- package/lib/plugins/worker-url.js +14 -1
- package/package.json +13 -12
package/lib/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export type { GiSystemProbe } from './plugins/gi-runtime-paths.js';
|
|
|
13
13
|
export type { ProcessStubPluginOptions } from './plugins/process-stub.js';
|
|
14
14
|
export { findImplicitGlobalAssignments, rewriteImplicitGlobalAssignments, implicitGlobalAssignPlugin, IMPLICIT_GLOBAL_ASSIGN_PLUGIN, } from './plugins/implicit-global-assign.js';
|
|
15
15
|
export type { ImplicitGlobalAssignment } from './plugins/implicit-global-assign.js';
|
|
16
|
-
export { workerUrlPlugin, findWorkerUrls, rewriteWorkerUrls, WorkerEntries, WORKER_URL_PLUGIN, } from './plugins/worker-url.js';
|
|
16
|
+
export { workerUrlPlugin, findWorkerUrls, rewriteWorkerUrls, WorkerEntries, bundleSuffix, WORKER_URL_PLUGIN, } from './plugins/worker-url.js';
|
|
17
17
|
export type { WorkerUrlSite } from './plugins/worker-url.js';
|
|
18
18
|
export { gschemaPlugin, parseGschema, GSCHEMA_PLUGIN, GSCHEMA_REGISTER } from './plugins/gschema.js';
|
|
19
19
|
export type { GschemaOut, GschemaKey, GschemaPluginOptions } from './plugins/gschema.js';
|
package/lib/index.js
CHANGED
|
@@ -9,7 +9,7 @@ export { giRuntimePathsStub } from './plugins/gi-runtime-paths.js';
|
|
|
9
9
|
export { giOptionalPlugin, giOptionalShimSource, giOptionalNodeShimSource, giOptionalMarkerSource, parseOptionalGiSpecifier, GI_OPTIONAL_FLAG, GI_OPTIONAL_MARKER, } from './plugins/gi-optional.js';
|
|
10
10
|
export { bindConsoleLocally, consoleAssignPlugin, freeConsoleAssignmentInsertion, CONSOLE_LOCAL_BINDING, } from './plugins/console-assign.js';
|
|
11
11
|
export { findImplicitGlobalAssignments, rewriteImplicitGlobalAssignments, implicitGlobalAssignPlugin, IMPLICIT_GLOBAL_ASSIGN_PLUGIN, } from './plugins/implicit-global-assign.js';
|
|
12
|
-
export { workerUrlPlugin, findWorkerUrls, rewriteWorkerUrls, WorkerEntries, WORKER_URL_PLUGIN, } from './plugins/worker-url.js';
|
|
12
|
+
export { workerUrlPlugin, findWorkerUrls, rewriteWorkerUrls, WorkerEntries, bundleSuffix, WORKER_URL_PLUGIN, } from './plugins/worker-url.js';
|
|
13
13
|
export { gschemaPlugin, parseGschema, GSCHEMA_PLUGIN, GSCHEMA_REGISTER } from './plugins/gschema.js';
|
|
14
14
|
export { gresourcePlugin, compileGresource, prepareGresourceXml, gresourceModuleSource, GRESOURCE_PLUGIN, } from './plugins/gresource.js';
|
|
15
15
|
export { cssAsStringPlugin } from './plugins/css-as-string.js';
|
|
@@ -21,7 +21,10 @@ export declare function findWorkerUrls(code: string, id: string): WorkerUrlSite[
|
|
|
21
21
|
export declare class WorkerEntries {
|
|
22
22
|
#private;
|
|
23
23
|
readonly extension: string;
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* @param extension the main bundle's whole suffix (`.js`, `.mjs`, `.gjs.mjs`, see {@link bundleSuffix}),
|
|
26
|
+
* mirrored so a worker loads like its parent and a per-target build into one dir keeps its own file.
|
|
27
|
+
*/
|
|
25
28
|
constructor(extension?: string);
|
|
26
29
|
/** The file name (no directory) the worker built from `source` gets beside the bundle. */
|
|
27
30
|
register(source: string): string;
|
|
@@ -31,6 +34,12 @@ export declare class WorkerEntries {
|
|
|
31
34
|
fileName: string;
|
|
32
35
|
}[];
|
|
33
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Everything after the first dot of the main outfile's name: `app.gjs.mjs` → `.gjs.mjs`. An app
|
|
39
|
+
* that builds per target into one dir (`app.gjs.mjs`, `app.node.mjs`) would otherwise get one
|
|
40
|
+
* `w.worker.mjs` from both builds, the second overwriting the first.
|
|
41
|
+
*/
|
|
42
|
+
export declare function bundleSuffix(outfile: string): string;
|
|
34
43
|
/** `code` with each resolvable worker URL pointed at its emitted file, or null when nothing changed. */
|
|
35
44
|
export declare function rewriteWorkerUrls(code: string, id: string, resolveSource: (specifier: string) => Promise<string | null>, entries: WorkerEntries): Promise<string | null>;
|
|
36
45
|
/**
|
|
@@ -123,7 +123,10 @@ export class WorkerEntries {
|
|
|
123
123
|
#names = new Map();
|
|
124
124
|
#taken = new Set();
|
|
125
125
|
#built = new Set();
|
|
126
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* @param extension the main bundle's whole suffix (`.js`, `.mjs`, `.gjs.mjs`, see {@link bundleSuffix}),
|
|
128
|
+
* mirrored so a worker loads like its parent and a per-target build into one dir keeps its own file.
|
|
129
|
+
*/
|
|
127
130
|
constructor(extension = '.js') {
|
|
128
131
|
this.extension = extension;
|
|
129
132
|
}
|
|
@@ -153,6 +156,16 @@ export class WorkerEntries {
|
|
|
153
156
|
return pending;
|
|
154
157
|
}
|
|
155
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Everything after the first dot of the main outfile's name: `app.gjs.mjs` → `.gjs.mjs`. An app
|
|
161
|
+
* that builds per target into one dir (`app.gjs.mjs`, `app.node.mjs`) would otherwise get one
|
|
162
|
+
* `w.worker.mjs` from both builds, the second overwriting the first.
|
|
163
|
+
*/
|
|
164
|
+
export function bundleSuffix(outfile) {
|
|
165
|
+
const name = basename(outfile).replace(/^\.+/, '');
|
|
166
|
+
const dot = name.indexOf('.');
|
|
167
|
+
return dot === -1 ? '.js' : name.slice(dot);
|
|
168
|
+
}
|
|
156
169
|
/** FNV-1a over the path, base 36 — stable across builds and engines, no crypto dependency. */
|
|
157
170
|
function pathHash(path) {
|
|
158
171
|
let hash = 0x811c9dc5;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/rolldown-plugin-gjsify",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.17-next.292",
|
|
4
4
|
"description": "Rolldown / Rollup / Vite plugin orchestrator for GJS, Node, and Browser targets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
],
|
|
68
68
|
"license": "MIT",
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@gjsify/console": "
|
|
71
|
-
"@gjsify/resolve-npm": "
|
|
72
|
-
"@gjsify/rolldown-plugin-deepkit": "
|
|
73
|
-
"@gjsify/rolldown-plugin-pnp": "
|
|
74
|
-
"@gjsify/utils": "
|
|
75
|
-
"@gjsify/vite-plugin-blueprint": "
|
|
76
|
-
"@gjsify/vite-plugin-gettext": "
|
|
70
|
+
"@gjsify/console": "0.64.17-next.292",
|
|
71
|
+
"@gjsify/resolve-npm": "0.64.17-next.292",
|
|
72
|
+
"@gjsify/rolldown-plugin-deepkit": "0.64.17-next.292",
|
|
73
|
+
"@gjsify/rolldown-plugin-pnp": "0.64.17-next.292",
|
|
74
|
+
"@gjsify/utils": "0.64.17-next.292",
|
|
75
|
+
"@gjsify/vite-plugin-blueprint": "0.64.17-next.292",
|
|
76
|
+
"@gjsify/vite-plugin-gettext": "0.64.17-next.292",
|
|
77
77
|
"@rollup/pluginutils": "^5.4.0",
|
|
78
78
|
"acorn": "^8.17.0",
|
|
79
79
|
"acorn-typescript": "^1.4.13",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"sass": "^1.101.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@gjsify/lightningcss-native": "
|
|
86
|
+
"@gjsify/lightningcss-native": "0.64.17-next.292",
|
|
87
87
|
"rolldown": "^1.1.4"
|
|
88
88
|
},
|
|
89
89
|
"peerDependenciesMeta": {
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@gjsify/cli": "
|
|
99
|
-
"@gjsify/unit": "
|
|
98
|
+
"@gjsify/cli": "0.64.17-next.292",
|
|
99
|
+
"@gjsify/unit": "0.64.17-next.292",
|
|
100
100
|
"@types/node": "^25.9.2",
|
|
101
101
|
"rolldown": "^1.1.4",
|
|
102
102
|
"typescript": "^6.0.3"
|
|
@@ -108,5 +108,6 @@
|
|
|
108
108
|
"darwin": "supported",
|
|
109
109
|
"win32": "supported"
|
|
110
110
|
}
|
|
111
|
-
}
|
|
111
|
+
},
|
|
112
|
+
"gitHead": "1cd14727f5a53991fbdee0f38eedea4dd8fdecdd"
|
|
112
113
|
}
|