nitropack-nightly 2.11.0-20250206-204748.ac78f21d → 2.11.0-20250207-024216.b15e015c
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/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/meta/index.mjs
CHANGED
|
@@ -35,22 +35,33 @@ const resolvePresetRuntime = (m) => join(presetRuntimeDir, `${m}.mjs`);
|
|
|
35
35
|
export const unenvCfPreset = {
|
|
36
36
|
external: nodeCompatModules.map((m) => `node:${m}`),
|
|
37
37
|
alias: {
|
|
38
|
-
//
|
|
39
|
-
...Object.fromEntries(nodeCompatModules.map((m) => [m, `node:${m}`])),
|
|
40
|
-
...Object.fromEntries(hybridNodeCompatModules.map((m) => [m, `node:${m}`])),
|
|
41
|
-
// node:<id> => runtime/<id>.mjs (hybrid)
|
|
38
|
+
// (native)
|
|
42
39
|
...Object.fromEntries(
|
|
43
|
-
|
|
44
|
-
`node:${m}
|
|
45
|
-
|
|
40
|
+
nodeCompatModules.flatMap((m) => [
|
|
41
|
+
[m, `node:${m}`],
|
|
42
|
+
[`node:${m}`, `node:${m}`]
|
|
46
43
|
])
|
|
47
44
|
),
|
|
45
|
+
// (hybrid)
|
|
46
|
+
...Object.fromEntries(
|
|
47
|
+
hybridNodeCompatModules.flatMap((m) => {
|
|
48
|
+
const resolved = resolvePresetRuntime(m);
|
|
49
|
+
return [
|
|
50
|
+
[`node:${m}`, resolved],
|
|
51
|
+
[m, resolved]
|
|
52
|
+
];
|
|
53
|
+
})
|
|
54
|
+
),
|
|
48
55
|
sys: resolvePresetRuntime("util"),
|
|
49
56
|
"node:sys": resolvePresetRuntime("util"),
|
|
50
57
|
"node-mock-http/_polyfill/events": "node:events",
|
|
51
58
|
"node-mock-http/_polyfill/buffer": "node:buffer"
|
|
52
59
|
},
|
|
53
60
|
inject: {
|
|
61
|
+
// process: "TODO",
|
|
62
|
+
// console: "TODO",
|
|
63
|
+
Buffer: ["node:buffer", "Buffer"],
|
|
64
|
+
"global.Buffer": ["node:buffer", "Buffer"],
|
|
54
65
|
"globalThis.Buffer": ["node:buffer", "Buffer"]
|
|
55
66
|
}
|
|
56
67
|
};
|
package/dist/rollup/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import { hash } from 'ohash';
|
|
|
12
12
|
import { resolve, dirname, extname, relative, normalize, isAbsolute, join } from 'pathe';
|
|
13
13
|
import { visualizer } from 'rollup-plugin-visualizer';
|
|
14
14
|
import { isWindows, isTest } from 'std-env';
|
|
15
|
-
import
|
|
15
|
+
import { defineEnv } from 'unenv';
|
|
16
16
|
import unimportPlugin from 'unimport/unplugin';
|
|
17
17
|
import { rollup } from 'unwasm/plugin';
|
|
18
18
|
import { genImport, genSafeVariableName } from 'knitwork';
|
|
@@ -1672,23 +1672,39 @@ const getRollupConfig = (nitro) => {
|
|
|
1672
1672
|
".tsx",
|
|
1673
1673
|
".jsx"
|
|
1674
1674
|
];
|
|
1675
|
-
const
|
|
1676
|
-
const
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1675
|
+
const isNodeless = nitro.options.node === false;
|
|
1676
|
+
const { env } = defineEnv({
|
|
1677
|
+
nodeCompat: isNodeless,
|
|
1678
|
+
resolve: true,
|
|
1679
|
+
presets: [
|
|
1680
|
+
isNodeless ? {
|
|
1681
|
+
// Backward compatibility (remove in v2)
|
|
1682
|
+
// https://github.com/unjs/unenv/pull/427
|
|
1683
|
+
inject: {
|
|
1684
|
+
performance: "unenv/polyfill/performance"
|
|
1685
|
+
},
|
|
1686
|
+
polyfill: [
|
|
1687
|
+
"unenv/polyfill/globalthis-global",
|
|
1688
|
+
"unenv/polyfill/process",
|
|
1689
|
+
"unenv/polyfill/performance"
|
|
1690
|
+
]
|
|
1691
|
+
} : {},
|
|
1692
|
+
nitro.options.unenv
|
|
1693
|
+
],
|
|
1694
|
+
overrides: {
|
|
1695
|
+
alias: {
|
|
1696
|
+
// General
|
|
1697
|
+
...nitro.options.dev ? {} : {
|
|
1698
|
+
debug: "unenv/npm/debug"
|
|
1699
|
+
},
|
|
1700
|
+
...isNodeless ? {} : {
|
|
1701
|
+
"node-mock-http/_polyfill/events": "node:events",
|
|
1702
|
+
"node-mock-http/_polyfill/buffer": "node:buffer"
|
|
1703
|
+
},
|
|
1704
|
+
...nitro.options.alias
|
|
1705
|
+
}
|
|
1689
1706
|
}
|
|
1690
|
-
};
|
|
1691
|
-
const env = unenv.env(nodePreset, builtinPreset, nitro.options.unenv);
|
|
1707
|
+
});
|
|
1692
1708
|
const buildServerDir = join(nitro.options.buildDir, "dist/server");
|
|
1693
1709
|
const presetsDir = resolve(runtimeDir, "../presets");
|
|
1694
1710
|
const chunkNamePrefixes = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitropack-nightly",
|
|
3
|
-
"version": "2.11.0-
|
|
3
|
+
"version": "2.11.0-20250207-024216.b15e015c",
|
|
4
4
|
"description": "Build and Deploy Universal JavaScript Servers",
|
|
5
5
|
"repository": "nitrojs/nitro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"ultrahtml": "^1.5.3",
|
|
164
164
|
"uncrypto": "^0.1.3",
|
|
165
165
|
"unctx": "^2.4.1",
|
|
166
|
-
"unenv": "2.0.0-rc.
|
|
166
|
+
"unenv": "2.0.0-rc.3",
|
|
167
167
|
"unimport": "^4.0.0",
|
|
168
168
|
"unstorage": "^1.14.4",
|
|
169
169
|
"untyped": "^1.5.2",
|