@gjsify/rolldown-plugin-gjsify 0.39.0 → 0.41.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/lib/app/nativescript.js +12 -9
- package/package.json +7 -7
package/lib/app/nativescript.js
CHANGED
|
@@ -21,13 +21,11 @@
|
|
|
21
21
|
// slot routing would only change 4 of its 122 entries and all four are
|
|
22
22
|
// regressions — `fs`/`fs/promises` (+ their `node:` forms) deliberately point
|
|
23
23
|
// at `@gjsify/native-fs-bridge`, which declares `nativescript: "native"` in the
|
|
24
|
-
// "this package IS the native implementation" sense and therefore
|
|
25
|
-
// `globals.mjs` it does not ship
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
// before this table is composed.
|
|
29
|
-
// '@gjsify/native-fs-bridge'` already hits the derived map (plain key hit) and
|
|
30
|
-
// is emptied TODAY — same root cause, listed in the same TODO.
|
|
24
|
+
// "this package IS the native implementation" sense and therefore promises a
|
|
25
|
+
// `globals.mjs` it does not ship. The slot vocabulary's `native` means "the
|
|
26
|
+
// RUNTIME provides this, use its value", so the bridge packages are
|
|
27
|
+
// mis-declared; that is tracked in status/open-todos.md and must be settled
|
|
28
|
+
// before this table is composed.
|
|
31
29
|
//
|
|
32
30
|
// Derived `@gjsify/<X>` entries are merged into the map below, so an import by
|
|
33
31
|
// PACKAGE NAME still routes per its declared slot in a single hop.
|
|
@@ -41,9 +39,14 @@ import { globToEntryPoints } from '../utils/entry-points.js';
|
|
|
41
39
|
import { gjsImportsEmptyPlugin } from '../plugins/gjs-imports-empty.js';
|
|
42
40
|
import { platformResolvePlugin, detectNativescriptPlatform, nativescriptPlatformDefines, } from '../plugins/platform-resolve.js';
|
|
43
41
|
import { unresolvedWorkspaceImportPlugin } from '../plugins/unresolved-workspace-import.js';
|
|
42
|
+
// Never bundled: an app works only with the ONE core instance the runtime boots, and what
|
|
43
|
+
// this target emits is an ENTRY the NS bundler resolves it for. An optional peer absent from
|
|
44
|
+
// the workspace install, it was not resolvable either — every UI-widget bridge failed to build.
|
|
45
|
+
const NATIVESCRIPT_CORE = /^@nativescript\/core(?:\/|$)/;
|
|
44
46
|
export const setupForNativescript = async (input) => {
|
|
45
47
|
const userExternal = input.userExternal ?? [];
|
|
46
|
-
const external = [...userExternal];
|
|
48
|
+
const external = [...userExternal, NATIVESCRIPT_CORE];
|
|
49
|
+
const isExternal = (id) => external.some((entry) => (typeof entry === 'string' ? entry === id : entry.test(id)));
|
|
47
50
|
const exclude = input.pluginOptions.exclude ?? [];
|
|
48
51
|
const entryPoints = await globToEntryPoints(input.input, exclude);
|
|
49
52
|
// Target platform — discovered from the env NS' CLI sets when it spawns a
|
|
@@ -141,7 +144,7 @@ export const setupForNativescript = async (input) => {
|
|
|
141
144
|
unresolvedWorkspaceImportPlugin({
|
|
142
145
|
target: 'nativescript',
|
|
143
146
|
aliases: aliasEntries,
|
|
144
|
-
isExternal
|
|
147
|
+
isExternal,
|
|
145
148
|
}),
|
|
146
149
|
];
|
|
147
150
|
return { options, plugins };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/rolldown-plugin-gjsify",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Rolldown / Rollup / Vite plugin orchestrator for GJS, Node, and Browser targets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
],
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@gjsify/console": "^0.
|
|
59
|
-
"@gjsify/resolve-npm": "^0.
|
|
60
|
-
"@gjsify/rolldown-plugin-deepkit": "^0.
|
|
61
|
-
"@gjsify/rolldown-plugin-pnp": "^0.
|
|
62
|
-
"@gjsify/vite-plugin-blueprint": "^0.
|
|
58
|
+
"@gjsify/console": "^0.41.0",
|
|
59
|
+
"@gjsify/resolve-npm": "^0.41.0",
|
|
60
|
+
"@gjsify/rolldown-plugin-deepkit": "^0.41.0",
|
|
61
|
+
"@gjsify/rolldown-plugin-pnp": "^0.41.0",
|
|
62
|
+
"@gjsify/vite-plugin-blueprint": "^0.41.0",
|
|
63
63
|
"@rollup/pluginutils": "^5.4.0",
|
|
64
64
|
"acorn": "^8.17.0",
|
|
65
65
|
"acorn-walk": "^8.3.5",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"sass": "^1.101.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@gjsify/lightningcss-native": "^0.
|
|
71
|
+
"@gjsify/lightningcss-native": "^0.41.0",
|
|
72
72
|
"rolldown": "^1.1.4"
|
|
73
73
|
},
|
|
74
74
|
"peerDependenciesMeta": {
|