Unverified Commit c51b5368 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Cleanup some flying shuttle experiment code (#74665)

This just removes some remaining code from removed flying shuttle
experiment.
parent 57b824a3
...@@ -1776,7 +1776,6 @@ export default async function getBaseWebpackConfig( ...@@ -1776,7 +1776,6 @@ export default async function getBaseWebpackConfig(
optOutBundlingPackages, optOutBundlingPackages,
traceIgnores: [], traceIgnores: [],
compilerType, compilerType,
swcLoaderConfig: swcDefaultLoader,
} }
), ),
// Moment.js is an extremely popular library that bundles large locale files // Moment.js is an extremely popular library that bundles large locale files
......
import nodePath from 'path' import nodePath from 'path'
import crypto from 'crypto'
import type { Span } from '../../../trace' import type { Span } from '../../../trace'
import { spans } from './profiling-plugin' import { spans } from './profiling-plugin'
import isError from '../../../lib/is-error' import isError from '../../../lib/is-error'
import { nodeFileTrace } from 'next/dist/compiled/@vercel/nft' import { nodeFileTrace } from 'next/dist/compiled/@vercel/nft'
import type { SWCLoaderOptions } from '../loaders/next-swc-loader'
import type { NodeFileTraceReasons } from 'next/dist/compiled/@vercel/nft' import type { NodeFileTraceReasons } from 'next/dist/compiled/@vercel/nft'
import { import {
CLIENT_REFERENCE_MANIFEST, CLIENT_REFERENCE_MANIFEST,
...@@ -126,10 +124,6 @@ export interface BuildTraceContext { ...@@ -126,10 +124,6 @@ export interface BuildTraceContext {
} }
} }
export function getHash(content: string | Buffer): string {
return crypto.createHash('sha1').update(content).digest('hex')
}
export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance { export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance {
public buildTraceContext: BuildTraceContext = {} public buildTraceContext: BuildTraceContext = {}
...@@ -142,12 +136,7 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance { ...@@ -142,12 +136,7 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance {
private entryTraces: Map<string, Map<string, { bundled: boolean }>> private entryTraces: Map<string, Map<string, { bundled: boolean }>>
private traceIgnores: string[] private traceIgnores: string[]
private esmExternals?: NextConfigComplete['experimental']['esmExternals'] private esmExternals?: NextConfigComplete['experimental']['esmExternals']
private traceHashes: Map<string, string>
private compilerType: CompilerNameValues private compilerType: CompilerNameValues
private swcLoaderConfig: {
loader: string
options: SWCLoaderOptions
}
constructor({ constructor({
rootDir, rootDir,
...@@ -159,7 +148,6 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance { ...@@ -159,7 +148,6 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance {
traceIgnores, traceIgnores,
esmExternals, esmExternals,
outputFileTracingRoot, outputFileTracingRoot,
swcLoaderConfig,
}: { }: {
rootDir: string rootDir: string
compilerType: CompilerNameValues compilerType: CompilerNameValues
...@@ -170,7 +158,6 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance { ...@@ -170,7 +158,6 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance {
traceIgnores?: string[] traceIgnores?: string[]
outputFileTracingRoot?: string outputFileTracingRoot?: string
esmExternals?: NextConfigComplete['experimental']['esmExternals'] esmExternals?: NextConfigComplete['experimental']['esmExternals']
swcLoaderConfig: TraceEntryPointsPlugin['swcLoaderConfig']
}) { }) {
this.rootDir = rootDir this.rootDir = rootDir
this.appDir = appDir this.appDir = appDir
...@@ -181,9 +168,7 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance { ...@@ -181,9 +168,7 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance {
this.traceIgnores = traceIgnores || [] this.traceIgnores = traceIgnores || []
this.tracingRoot = outputFileTracingRoot || rootDir this.tracingRoot = outputFileTracingRoot || rootDir
this.optOutBundlingPackages = optOutBundlingPackages this.optOutBundlingPackages = optOutBundlingPackages
this.traceHashes = new Map()
this.compilerType = compilerType this.compilerType = compilerType
this.swcLoaderConfig = swcLoaderConfig
} }
// Here we output all traced assets and webpack chunks to a // Here we output all traced assets and webpack chunks to a
......
...@@ -6,14 +6,6 @@ import { NextResponse } from 'next/server' ...@@ -6,14 +6,6 @@ import { NextResponse } from 'next/server'
* @returns {Promise<NextResponse | undefined>} * @returns {Promise<NextResponse | undefined>}
*/ */
export async function middleware(request) { export async function middleware(request) {
if (request.nextUrl.pathname === '/flying-shuttle') {
return NextResponse.next({
headers: {
'x-flying-shuttle': '1',
},
})
}
if (request.nextUrl.pathname === '/searchparams-normalization-bug') { if (request.nextUrl.pathname === '/searchparams-normalization-bug') {
const headers = new Headers(request.headers) const headers = new Headers(request.headers)
headers.set('test', request.nextUrl.searchParams.get('val') || '') headers.set('test', request.nextUrl.searchParams.get('val') || '')
......
...@@ -1134,19 +1134,6 @@ ...@@ -1134,19 +1134,6 @@
"flakey": [], "flakey": [],
"runtimeError": false "runtimeError": false
}, },
"test/e2e/app-dir/app/flying-shuttle.test.ts": {
"passed": [],
"failed": [],
"pending": [
"should output updated trace files should hard navigate on chunk load failure",
"should output updated trace files should have file hashes in trace files",
"should output updated trace files should only rebuild a changed app and pages route correctly",
"should output updated trace files should only rebuild just a changed app route correctly",
"should output updated trace files should only rebuild just a changed pages route correctly"
],
"flakey": [],
"runtimeError": false
},
"test/e2e/app-dir/app/index.test.ts": { "test/e2e/app-dir/app/index.test.ts": {
"passed": [ "passed": [
"app dir - basic <Link /> should allow linking from app page to pages page", "app dir - basic <Link /> should allow linking from app page to pages page",
...@@ -5139,15 +5126,6 @@ ...@@ -5139,15 +5126,6 @@
"flakey": [], "flakey": [],
"runtimeError": false "runtimeError": false
}, },
"test/e2e/instrumentation-hook/flying-shuttle/flying-shuttle.test.ts": {
"passed": [
"instrumentation-hook - flying-shuttle should only register without errors"
],
"failed": [],
"pending": [],
"flakey": [],
"runtimeError": false
},
"test/e2e/instrumentation-hook/instrumentation-hook.test.ts": { "test/e2e/instrumentation-hook/instrumentation-hook.test.ts": {
"passed": [ "passed": [
"Instrumentation Hook general should not overlap with a instrumentation page", "Instrumentation Hook general should not overlap with a instrumentation page",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment