mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 21:07:48 +00:00
[next] rename middleware manifest env (#11549)
Rename `environment` property to `env` from middleware manifest added in #11390. Align with https://github.com/vercel/next.js/pull/64521 The `environments` property wasn't working properly before due to unfinished next.js changes, it should work now after testing with next build from https://github.com/vercel/next.js/pull/64521. We change it to a better naming word `env`.
This commit is contained in:
5
.changeset/odd-dogs-brush.md
Normal file
5
.changeset/odd-dogs-brush.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@vercel/next": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
[next] rename middleware manifest env
|
||||||
@@ -2784,7 +2784,7 @@ interface EdgeFunctionInfoV2 extends BaseEdgeFunctionInfo {
|
|||||||
|
|
||||||
interface EdgeFunctionInfoV3 extends BaseEdgeFunctionInfo {
|
interface EdgeFunctionInfoV3 extends BaseEdgeFunctionInfo {
|
||||||
matchers: EdgeFunctionMatcher[];
|
matchers: EdgeFunctionMatcher[];
|
||||||
environments: Record<string, string>;
|
env: Record<string, string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface EdgeFunctionMatcher {
|
interface EdgeFunctionMatcher {
|
||||||
@@ -3019,7 +3019,7 @@ export async function getMiddlewareBundle({
|
|||||||
slug: 'nextjs',
|
slug: 'nextjs',
|
||||||
version: nextVersion,
|
version: nextVersion,
|
||||||
},
|
},
|
||||||
environment: edgeFunction.environments,
|
environment: edgeFunction.env,
|
||||||
});
|
});
|
||||||
})(),
|
})(),
|
||||||
routeMatchers: getRouteMatchers(edgeFunction, routesManifest),
|
routeMatchers: getRouteMatchers(edgeFunction, routesManifest),
|
||||||
@@ -3199,7 +3199,7 @@ export function upgradeMiddlewareManifestV1(
|
|||||||
return {
|
return {
|
||||||
...rest,
|
...rest,
|
||||||
matchers: [{ regexp }],
|
matchers: [{ regexp }],
|
||||||
environments: {},
|
env: {},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3227,7 +3227,7 @@ export function upgradeMiddlewareManifestV2(
|
|||||||
const { ...rest } = v2Info;
|
const { ...rest } = v2Info;
|
||||||
return {
|
return {
|
||||||
...rest,
|
...rest,
|
||||||
environments: {},
|
env: {},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user