Skip to content

Commit 2e02fa5

Browse files
committed
Merge branch 'main' into streamline-e2e-report
2 parents da9e7b7 + 98ebf2c commit 2e02fa5

File tree

21 files changed

+1085
-1149
lines changed

21 files changed

+1085
-1149
lines changed

CONTRIBUTING.md

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ For a simple next.js app
3838
```
3939
/___netlify-server-handler
4040
├── .netlify
41-
│ ├── tags-manifest.json
4241
│ └── dist // the compiled runtime code
4342
│ └── run
4443
│ ├── handlers

package-lock.json

+59-59
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@
5050
"devDependencies": {
5151
"@fastly/http-compute-js": "1.1.4",
5252
"@netlify/blobs": "^7.3.0",
53-
"@netlify/build": "^29.48.1",
54-
"@netlify/edge-bundler": "^12.0.1",
53+
"@netlify/build": "^29.49.1",
54+
"@netlify/edge-bundler": "^12.1.1",
5555
"@netlify/edge-functions": "^2.8.1",
5656
"@netlify/eslint-config-node": "^7.0.1",
5757
"@netlify/functions": "^2.8.0",
5858
"@netlify/serverless-functions-api": "^1.18.4",
59-
"@netlify/zip-it-and-ship-it": "^9.37.0",
59+
"@netlify/zip-it-and-ship-it": "^9.37.1",
6060
"@opentelemetry/api": "^1.8.0",
6161
"@opentelemetry/exporter-trace-otlp-http": "^0.51.0",
6262
"@opentelemetry/resources": "^1.24.0",

src/build/content/server.ts

-41
Original file line numberDiff line numberDiff line change
@@ -311,47 +311,6 @@ export const copyNextDependencies = async (ctx: PluginContext): Promise<void> =>
311311
})
312312
}
313313

314-
export const writeTagsManifest = async (ctx: PluginContext): Promise<void> => {
315-
const manifest = await ctx.getPrerenderManifest()
316-
317-
const routes = Object.entries(manifest.routes).map(async ([route, definition]) => {
318-
let tags
319-
320-
// app router
321-
if (definition.dataRoute?.endsWith('.rsc')) {
322-
const path = join(ctx.publishDir, `server/app/${route === '/' ? '/index' : route}.meta`)
323-
try {
324-
const file = await readFile(path, 'utf-8')
325-
const meta = JSON.parse(file)
326-
tags = meta.headers['x-next-cache-tags']
327-
} catch {
328-
// Parallel route default layout has no prerendered page, so don't warn about it
329-
if (!definition.dataRoute?.endsWith('/default.rsc')) {
330-
console.log(`Unable to read cache tags for: ${path}`)
331-
}
332-
}
333-
}
334-
335-
// pages router
336-
if (definition.dataRoute?.endsWith('.json')) {
337-
tags = `_N_T_${route}`
338-
}
339-
340-
// route handler
341-
if (definition.dataRoute === null) {
342-
tags = definition.initialHeaders?.['x-next-cache-tags']
343-
}
344-
345-
return [route, tags]
346-
})
347-
348-
await writeFile(
349-
join(ctx.serverHandlerDir, '.netlify/tags-manifest.json'),
350-
JSON.stringify(Object.fromEntries(await Promise.all(routes))),
351-
'utf-8',
352-
)
353-
}
354-
355314
/**
356315
* Generates a copy of the middleware manifest without any middleware in it. We
357316
* do this because we'll run middleware in an edge function, and we don't want

src/build/functions/server.ts

-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
copyNextDependencies,
1111
copyNextServerCode,
1212
verifyHandlerDirStructure,
13-
writeTagsManifest,
1413
} from '../content/server.js'
1514
import { PluginContext, SERVER_HANDLER_NAME } from '../plugin-context.js'
1615

@@ -138,7 +137,6 @@ export const createServerHandler = async (ctx: PluginContext) => {
138137

139138
await copyNextServerCode(ctx)
140139
await copyNextDependencies(ctx)
141-
await writeTagsManifest(ctx)
142140
await copyHandlerDependencies(ctx)
143141
await writeHandlerManifest(ctx)
144142
await writePackageMetadata(ctx)

src/run/config.ts

-6
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,3 @@ export const setRunConfig = (config: NextConfigComplete) => {
3838
// set config
3939
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(config)
4040
}
41-
42-
export type TagsManifest = Record<string, string>
43-
44-
export const getTagsManifest = async (): Promise<TagsManifest> => {
45-
return JSON.parse(await readFile(resolve(PLUGIN_DIR, '.netlify/tags-manifest.json'), 'utf-8'))
46-
}

0 commit comments

Comments
 (0)