nitro-nightly 3.0.1-20251218-122708-0dfa69c0 → 3.0.1-20251218-140714-077b79bf
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/_build/rolldown.mjs +0 -1
- package/dist/_build/rollup.mjs +0 -1
- package/dist/_build/vite.plugin.mjs +2 -2
- package/dist/_nitro.mjs +1 -1
- package/dist/_presets.mjs +0 -1
- package/dist/node_modules/hookable/package.json +13 -13
- package/dist/presets/cloudflare/runtime/_module-handler.mjs +5 -5
- package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +2 -2
- package/dist/runtime/internal/app.mjs +1 -1
- package/package.json +2 -2
package/dist/_build/rolldown.mjs
CHANGED
package/dist/_build/rollup.mjs
CHANGED
|
@@ -83,7 +83,6 @@ const getRollupConfig = (nitro) => {
|
|
|
83
83
|
extensions: base.extensions,
|
|
84
84
|
preferBuiltins: !!nitro.options.node,
|
|
85
85
|
rootDir: nitro.options.rootDir,
|
|
86
|
-
mainFields: ["main"],
|
|
87
86
|
exportConditions: nitro.options.exportConditions
|
|
88
87
|
}),
|
|
89
88
|
commonjs({ ...nitro.options.commonJS }),
|
|
@@ -320,7 +320,7 @@ function createNitroEnvironment(ctx) {
|
|
|
320
320
|
...ctx.rollupConfig.base.noExternal
|
|
321
321
|
] : true,
|
|
322
322
|
conditions: ctx.nitro.options.exportConditions,
|
|
323
|
-
externalConditions: ctx.nitro.options.exportConditions?.filter((c) => !/browser|wasm/.test(c))
|
|
323
|
+
externalConditions: ctx.nitro.options.exportConditions?.filter((c) => !/browser|wasm|module/.test(c))
|
|
324
324
|
},
|
|
325
325
|
define: { "process.env.NODE_ENV": JSON.stringify(ctx.nitro.options.dev ? "development" : "production") },
|
|
326
326
|
dev: { createEnvironment: (envName, envConfig) => createFetchableDevEnvironment(envName, envConfig, getEnvRunner(ctx), resolve(runtimeDir, "internal/vite/dev-entry.mjs")) }
|
|
@@ -338,7 +338,7 @@ function createServiceEnvironment(ctx, name, serviceConfig) {
|
|
|
338
338
|
},
|
|
339
339
|
resolve: {
|
|
340
340
|
conditions: ctx.nitro.options.exportConditions,
|
|
341
|
-
externalConditions: ctx.nitro.options.exportConditions?.filter((c) => !/browser|wasm/.test(c))
|
|
341
|
+
externalConditions: ctx.nitro.options.exportConditions?.filter((c) => !/browser|wasm|module/.test(c))
|
|
342
342
|
},
|
|
343
343
|
dev: { createEnvironment: (envName, envConfig) => createFetchableDevEnvironment(envName, envConfig, getEnvRunner(ctx), tryResolve(serviceConfig.entry)) }
|
|
344
344
|
};
|
package/dist/_nitro.mjs
CHANGED
|
@@ -174,7 +174,7 @@ function _resolveExportConditions(conditions, opts) {
|
|
|
174
174
|
if (opts.node) resolvedConditions.push("node");
|
|
175
175
|
else resolvedConditions.push("wintercg", "worker", "web", "browser", "workerd", "edge-light", "netlify", "edge-routine", "deno");
|
|
176
176
|
if (opts.wasm) resolvedConditions.push("wasm", "unwasm");
|
|
177
|
-
resolvedConditions.push("import", "default");
|
|
177
|
+
resolvedConditions.push("import", "default", "module");
|
|
178
178
|
if ("Bun" in globalThis) resolvedConditions.push("bun");
|
|
179
179
|
else if ("Deno" in globalThis) resolvedConditions.push("deno");
|
|
180
180
|
return resolvedConditions.filter((c, i) => resolvedConditions.indexOf(c) === i);
|
package/dist/_presets.mjs
CHANGED
|
@@ -1364,7 +1364,6 @@ var preset_default$6 = [renderCom];
|
|
|
1364
1364
|
const standard = defineNitroPreset({
|
|
1365
1365
|
entry: "./standard/runtime/server",
|
|
1366
1366
|
serveStatic: false,
|
|
1367
|
-
exportConditions: ["import", "default"],
|
|
1368
1367
|
output: { publicDir: "{{ output.dir }}/public/{{ baseURL }}" },
|
|
1369
1368
|
commands: { preview: "npx srvx --prod ./" },
|
|
1370
1369
|
alias: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hookable",
|
|
3
|
-
"version": "6.0.0
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Awaitable hook system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hook",
|
|
@@ -28,25 +28,25 @@
|
|
|
28
28
|
"lint": "eslint --cache . && prettier -c src test",
|
|
29
29
|
"lint:fix": "eslint --cache . --fix && prettier -c src test -w",
|
|
30
30
|
"prepublish": "pnpm build",
|
|
31
|
-
"release": "pnpm test && pnpm build && changelogen --release --
|
|
31
|
+
"release": "pnpm test && pnpm build && changelogen --release --publish --push",
|
|
32
32
|
"test": "pnpm lint && vitest run --coverage",
|
|
33
33
|
"test:types": "tsc --noEmit"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/node": "^
|
|
37
|
-
"@vitest/coverage-v8": "^4.0.
|
|
36
|
+
"@types/node": "^25.0.3",
|
|
37
|
+
"@vitest/coverage-v8": "^4.0.16",
|
|
38
38
|
"changelogen": "^0.6.2",
|
|
39
|
-
"esbuild": "^0.
|
|
40
|
-
"eslint": "^9.
|
|
39
|
+
"esbuild": "^0.27.2",
|
|
40
|
+
"eslint": "^9.39.2",
|
|
41
41
|
"eslint-config-unjs": "^0.5.0",
|
|
42
|
-
"expect-type": "^1.
|
|
43
|
-
"hookable-prev": "npm:hookable@^5.
|
|
42
|
+
"expect-type": "^1.3.0",
|
|
43
|
+
"hookable-prev": "npm:hookable@^5.5.3",
|
|
44
44
|
"mitata": "^1.0.34",
|
|
45
|
-
"obuild": "^0.
|
|
46
|
-
"prettier": "^3.
|
|
45
|
+
"obuild": "^0.4.9",
|
|
46
|
+
"prettier": "^3.7.4",
|
|
47
47
|
"typescript": "^5.9.3",
|
|
48
|
-
"vite": "^7.
|
|
49
|
-
"vitest": "^4.0.
|
|
48
|
+
"vite": "^7.3.0",
|
|
49
|
+
"vitest": "^4.0.16"
|
|
50
50
|
},
|
|
51
|
-
"packageManager": "pnpm@10.
|
|
51
|
+
"packageManager": "pnpm@10.26.0"
|
|
52
52
|
}
|
|
@@ -23,7 +23,7 @@ export function createHandler(hooks) {
|
|
|
23
23
|
controller,
|
|
24
24
|
env,
|
|
25
25
|
context
|
|
26
|
-
}));
|
|
26
|
+
}) || Promise.resolve());
|
|
27
27
|
if (import.meta._tasks) {
|
|
28
28
|
context.waitUntil(runCronTasks(controller.cron, {
|
|
29
29
|
context: { cloudflare: {
|
|
@@ -41,7 +41,7 @@ export function createHandler(hooks) {
|
|
|
41
41
|
event: message,
|
|
42
42
|
env,
|
|
43
43
|
context
|
|
44
|
-
}));
|
|
44
|
+
}) || Promise.resolve());
|
|
45
45
|
},
|
|
46
46
|
queue(batch, env, context) {
|
|
47
47
|
globalThis.__env__ = env;
|
|
@@ -50,7 +50,7 @@ export function createHandler(hooks) {
|
|
|
50
50
|
event: batch,
|
|
51
51
|
env,
|
|
52
52
|
context
|
|
53
|
-
}));
|
|
53
|
+
}) || Promise.resolve());
|
|
54
54
|
},
|
|
55
55
|
tail(traces, env, context) {
|
|
56
56
|
globalThis.__env__ = env;
|
|
@@ -58,7 +58,7 @@ export function createHandler(hooks) {
|
|
|
58
58
|
traces,
|
|
59
59
|
env,
|
|
60
60
|
context
|
|
61
|
-
}));
|
|
61
|
+
}) || Promise.resolve());
|
|
62
62
|
},
|
|
63
63
|
trace(traces, env, context) {
|
|
64
64
|
globalThis.__env__ = env;
|
|
@@ -66,7 +66,7 @@ export function createHandler(hooks) {
|
|
|
66
66
|
traces,
|
|
67
67
|
env,
|
|
68
68
|
context
|
|
69
|
-
}));
|
|
69
|
+
}) || Promise.resolve());
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
}
|
|
@@ -42,7 +42,7 @@ export class $DurableObject extends DurableObject {
|
|
|
42
42
|
state.waitUntil(nitroHooks.callHook("cloudflare:durable:init", this, {
|
|
43
43
|
state,
|
|
44
44
|
env
|
|
45
|
-
}));
|
|
45
|
+
}) || Promise.resolve());
|
|
46
46
|
if (hasWebSocket) {
|
|
47
47
|
ws.handleDurableInit(this, state, env);
|
|
48
48
|
}
|
|
@@ -56,7 +56,7 @@ export class $DurableObject extends DurableObject {
|
|
|
56
56
|
return fetchHandler(request, this.env, this.ctx, url, nitroApp, { durable: this });
|
|
57
57
|
}
|
|
58
58
|
alarm() {
|
|
59
|
-
this.ctx.waitUntil(nitroHooks.callHook("cloudflare:durable:alarm", this));
|
|
59
|
+
this.ctx.waitUntil(nitroHooks.callHook("cloudflare:durable:alarm", this) || Promise.resolve());
|
|
60
60
|
}
|
|
61
61
|
async webSocketMessage(client, message) {
|
|
62
62
|
if (hasWebSocket) {
|
|
@@ -67,7 +67,7 @@ function createNitroApp() {
|
|
|
67
67
|
context: errorCtx
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
if (hasHooks && typeof errorCtx.event.req.waitUntil === "function") {
|
|
70
|
+
if (hasHooks && promise && typeof errorCtx.event.req.waitUntil === "function") {
|
|
71
71
|
errorCtx.event.req.waitUntil(promise);
|
|
72
72
|
}
|
|
73
73
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-nightly",
|
|
3
|
-
"version": "3.0.1-20251218-
|
|
3
|
+
"version": "3.0.1-20251218-140714-077b79bf",
|
|
4
4
|
"description": "Build and Deploy Universal JavaScript Servers",
|
|
5
5
|
"homepage": "https://nitro.build",
|
|
6
6
|
"repository": "nitrojs/nitro",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"fs-extra": "^11.3.2",
|
|
123
123
|
"get-port-please": "^3.2.0",
|
|
124
124
|
"gzip-size": "^7.0.0",
|
|
125
|
-
"hookable": "6.0.0
|
|
125
|
+
"hookable": "^6.0.0",
|
|
126
126
|
"httpxy": "^0.1.7",
|
|
127
127
|
"klona": "^2.0.6",
|
|
128
128
|
"knitwork": "^1.3.0",
|