Skip to content

Commit cd864f4

Browse files
authored
Remove deprecated APIs (#5707)
* Remove deprecated Astro globals * Remove deprecated hook param * Fix test * Add changeset * Add TODO
1 parent 7f7b56c commit cd864f4

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

packages/integrations/netlify/src/integration-edge-functions.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,11 @@ export function netlifyEdgeFunctions({ dist }: NetlifyEdgeFunctionsOptions = {})
111111
let _config: AstroConfig;
112112
let entryFile: string;
113113
let _buildConfig: BuildConfig;
114-
let needsBuildConfig = false;
115114
let _vite: any;
116115
return {
117116
name: '@astrojs/netlify/edge-functions',
118117
hooks: {
119118
'astro:config:setup': ({ config, updateConfig }) => {
120-
needsBuildConfig = !config.build.client;
121119
// Add a plugin that shims the global environment.
122120
const injectPlugin: VitePlugin = {
123121
name: '@astrojs/netlify/plugin-inject',
@@ -156,15 +154,6 @@ export function netlifyEdgeFunctions({ dist }: NetlifyEdgeFunctionsOptions = {})
156154
);
157155
}
158156
},
159-
'astro:build:start': ({ buildConfig }) => {
160-
if (needsBuildConfig) {
161-
buildConfig.client = _config.outDir;
162-
buildConfig.server = new URL('./.netlify/edge-functions/', _config.root);
163-
buildConfig.serverEntry = 'entry.js';
164-
_buildConfig = buildConfig;
165-
entryFile = buildConfig.serverEntry.replace(/\.m?js/, '');
166-
}
167-
},
168157
'astro:build:setup': ({ vite, target }) => {
169158
if (target === 'server') {
170159
_vite = vite;

packages/integrations/netlify/src/integration-functions.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ function netlifyFunctions({
2222
}: NetlifyFunctionsOptions = {}): AstroIntegration {
2323
let _config: AstroConfig;
2424
let entryFile: string;
25-
let needsBuildConfig = false;
2625
return {
2726
name: '@astrojs/netlify',
2827
hooks: {
2928
'astro:config:setup': ({ config, updateConfig }) => {
30-
needsBuildConfig = !config.build.client;
3129
const outDir = dist ?? new URL('./dist/', config.root);
3230
updateConfig({
3331
outDir,
@@ -49,13 +47,6 @@ function netlifyFunctions({
4947
);
5048
}
5149
},
52-
'astro:build:start': ({ buildConfig }) => {
53-
if (needsBuildConfig) {
54-
buildConfig.client = _config.outDir;
55-
buildConfig.server = new URL('./.netlify/functions-internal/', _config.root);
56-
entryFile = buildConfig.serverEntry.replace(/\.m?js/, '');
57-
}
58-
},
5950
'astro:build:done': async ({ routes, dir }) => {
6051
await createRedirects(routes, dir, entryFile, false);
6152
},

0 commit comments

Comments
 (0)