nitropack-nightly 2.12.6-20250904-221031.a64aa4c5 → 2.12.6-20250908-112948.bde8ce85

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.
@@ -1,4 +1,4 @@
1
- const version = "2.12.6-20250904-221031.a64aa4c5";
1
+ const version = "2.12.6-20250908-112948.bde8ce85";
2
2
 
3
3
  const compatibilityChanges = [
4
4
  {
@@ -7,6 +7,7 @@ import { isTest } from "std-env";
7
7
  import { createRouter as createRadixRouter, toRouteMatcher } from "radix3";
8
8
  const SUPPORTED_NODE_VERSIONS = [18, 20, 22];
9
9
  const FALLBACK_ROUTE = "/__fallback";
10
+ const ISR_SUFFIX = "-isr";
10
11
  const SAFE_FS_CHAR_RE = /[^a-zA-Z0-9_.[\]/]/g;
11
12
  function getSystemNodeVersion() {
12
13
  const systemNodeVersion = Number.parseInt(
@@ -42,7 +43,7 @@ export async function generateFunctionFiles(nitro) {
42
43
  const funcPrefix = resolve(
43
44
  nitro.options.output.serverDir,
44
45
  "..",
45
- normalizeRouteDest(key) + ".isr"
46
+ normalizeRouteDest(key) + ISR_SUFFIX
46
47
  );
47
48
  await fsp.mkdir(dirname(funcPrefix), { recursive: true });
48
49
  await fsp.symlink(
@@ -64,6 +65,10 @@ export async function generateFunctionFiles(nitro) {
64
65
  );
65
66
  const _getRouteRules = (path) => defu({}, ..._routeRulesMatcher.matchAll(path).reverse());
66
67
  for (const route of o11Routes) {
68
+ const routeRules = _getRouteRules(route.src);
69
+ if (routeRules.isr) {
70
+ continue;
71
+ }
67
72
  const funcPrefix = resolve(
68
73
  nitro.options.output.serverDir,
69
74
  "..",
@@ -75,14 +80,6 @@ export async function generateFunctionFiles(nitro) {
75
80
  funcPrefix + ".func",
76
81
  "junction"
77
82
  );
78
- const routeRules = _getRouteRules(route.src);
79
- if (routeRules.isr) {
80
- await writePrerenderConfig(
81
- funcPrefix + ".prerender-config.json",
82
- routeRules.isr,
83
- nitro.options.vercel?.config?.bypassToken
84
- );
85
- }
86
83
  }
87
84
  }
88
85
  export async function generateEdgeFunctionFiles(nitro) {
@@ -169,13 +166,15 @@ function generateBuildConfig(nitro, o11Routes) {
169
166
  }
170
167
  return {
171
168
  src,
172
- dest: nitro.options.preset === "vercel-edge" ? FALLBACK_ROUTE + "?url=$url" : withLeadingSlash(normalizeRouteDest(key) + ".isr?url=$url")
169
+ dest: nitro.options.preset === "vercel-edge" ? FALLBACK_ROUTE + "?url=$url" : withLeadingSlash(
170
+ normalizeRouteDest(key) + ISR_SUFFIX + "?url=$url"
171
+ )
173
172
  };
174
173
  }),
175
174
  ...nitro.options.routeRules["/"]?.isr ? [
176
175
  {
177
176
  src: "(?<url>/)",
178
- dest: "/index.isr?url=$url"
177
+ dest: `/index${ISR_SUFFIX}?url=$url`
179
178
  }
180
179
  ] : [],
181
180
  ...(o11Routes || []).map((route) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitropack-nightly",
3
- "version": "2.12.6-20250904-221031.a64aa4c5",
3
+ "version": "2.12.6-20250908-112948.bde8ce85",
4
4
  "description": "Build and Deploy Universal JavaScript Servers",
5
5
  "repository": "nitrojs/nitro",
6
6
  "license": "MIT",