next 15.5.1-canary.16 → 15.5.1-canary.17
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.
- package/dist/bin/next +1 -1
- package/dist/build/index.js +2 -2
- package/dist/build/swc/index.js +1 -1
- package/dist/build/webpack-config.js +2 -2
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/compiled/next-server/pages-api.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-api.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-api.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-api.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/server.runtime.prod.js +1 -1
- package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
- package/dist/esm/build/index.js +2 -2
- package/dist/esm/build/swc/index.js +1 -1
- package/dist/esm/build/webpack-config.js +2 -2
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/esm/server/lib/app-info-log.js +1 -1
- package/dist/esm/server/lib/start-server.js +1 -1
- package/dist/esm/server/next-server.js +0 -6
- package/dist/esm/server/next-server.js.map +1 -1
- package/dist/esm/server/typescript/rules/config.js +8 -0
- package/dist/esm/server/typescript/rules/config.js.map +1 -1
- package/dist/esm/shared/lib/canary-only.js +1 -1
- package/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/server/lib/app-info-log.js +1 -1
- package/dist/server/lib/start-server.js +1 -1
- package/dist/server/next-server.js +0 -6
- package/dist/server/next-server.js.map +1 -1
- package/dist/server/typescript/rules/config.js +8 -0
- package/dist/server/typescript/rules/config.js.map +1 -1
- package/dist/shared/lib/canary-only.js +1 -1
- package/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/telemetry/events/session-stopped.js +2 -2
- package/dist/telemetry/events/version.js +2 -2
- package/package.json +15 -15
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/server/typescript/rules/config.ts"],"sourcesContent":["// This module provides intellisense for page and layout's exported configs.\n\nimport {\n getSource,\n isPositionInsideNode,\n getTs,\n removeStringQuotes,\n} from '../utils'\nimport {\n NEXT_TS_ERRORS,\n ALLOWED_EXPORTS,\n LEGACY_CONFIG_EXPORT,\n} from '../constant'\nimport type tsModule from 'typescript/lib/tsserverlibrary'\n\nconst API_DOCS: Record<\n string,\n {\n description: string\n options?: Record<string, string>\n link?: string\n type?: string\n isValid?: (value: string) => boolean\n getHint?: (value: any) => string | undefined\n insertText?: string\n }\n> = {\n dynamic: {\n description:\n 'The `dynamic` option provides a few ways to opt in or out of dynamic behavior.',\n options: {\n '\"auto\"':\n \"Heuristic to cache as much as possible but doesn't prevent any component to opt-in to dynamic behavior.\",\n '\"force-dynamic\"':\n 'This disables all caching of fetches and always revalidates. (This is equivalent to `getServerSideProps`.)',\n '\"error\"':\n 'This errors if any dynamic Hooks or fetches are used. (This is equivalent to `getStaticProps`.)',\n '\"force-static\"':\n 'This forces caching of all fetches and returns empty values from `cookies`, `headers` and `useSearchParams`.',\n },\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic',\n },\n fetchCache: {\n description:\n \"The `fetchCache` option controls how Next.js statically caches fetches. By default it statically caches fetches reachable before any dynamic Hooks are used, and it doesn't cache fetches that are discovered after that.\",\n options: {\n '\"force-no-store\"':\n \"This lets you intentionally opt-out of all caching of data. This option forces all fetches to be refetched every request even if the `cache: 'force-cache'` option is passed to `fetch()`.\",\n '\"only-no-store\"':\n \"This lets you enforce that all data opts out of caching. This option makes `fetch()` reject with an error if `cache: 'force-cache'` is provided. It also changes the default to `no-store`.\",\n '\"default-no-store\"':\n \"Allows any explicit `cache` option to be passed to `fetch()` but if `'default'`, or no option, is provided then it defaults to `'no-store'`. This means that even fetches before a dynamic Hook are considered dynamic.\",\n '\"auto\"':\n \"This is the default option. It caches any fetches with the default `cache` option provided, that happened before a dynamic Hook is used and don't cache any such fetches if they're issued after a dynamic Hook.\",\n '\"default-cache\"':\n \"Allows any explicit `cache` option to be passed to `fetch()` but if `'default'`, or no option, is provided then it defaults to `'force-cache'`. This means that even fetches before a dynamic Hook are considered dynamic.\",\n '\"only-cache\"':\n \"This lets you enforce that all data opts into caching. This option makes `fetch()` reject with an error if `cache: 'force-cache'` is provided. It also changes the default to `force-cache`. This error can be discovered early during static builds - or dynamically during Edge rendering.\",\n '\"force-cache\"':\n \"This lets you intentionally opt-in to all caching of data. This option forces all fetches to be cache even if the `cache: 'no-store'` option is passed to `fetch()`.\",\n },\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#fetchcache',\n },\n preferredRegion: {\n description:\n 'Specify the perferred region that this layout or page should be deployed to. If the region option is not specified, it inherits the option from the nearest parent layout. The root defaults to `\"auto\"`.\\n\\nYou can also specify a region, such as \"iad1\", or an array of regions, such as `[\"iad1\", \"sfo1\"]`.',\n options: {\n '\"auto\"':\n 'Next.js will first deploy to the `\"home\"` region. Then if it doesn\\'t detect any waterfall requests after a few requests, it can upgrade that route, to be deployed globally. If it detects any waterfall requests after that, it can eventually downgrade back to `\"home`\".',\n '\"global\"': 'Prefer deploying globally.',\n '\"home\"': 'Prefer deploying to the Home region.',\n },\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#preferredregion',\n isValid: (value: string) => {\n try {\n const parsed = JSON.parse(value)\n return (\n typeof parsed === 'string' ||\n (Array.isArray(parsed) && !parsed.some((v) => typeof v !== 'string'))\n )\n } catch (err) {\n return false\n }\n },\n getHint: (value: any) => {\n if (value === 'auto') return `Automatically chosen by Next.js.`\n if (value === 'global') return `Prefer deploying globally.`\n if (value === 'home') return `Prefer deploying to the Home region.`\n if (Array.isArray(value)) return `Deploy to regions: ${value.join(', ')}.`\n if (typeof value === 'string') return `Deploy to region: ${value}.`\n },\n },\n revalidate: {\n description:\n \"The `revalidate` option sets the default revalidation time for that layout or page. Note that it doesn't override the value specify by each `fetch()`.\",\n type: 'mixed',\n options: {\n false:\n 'This is the default and changes the fetch cache to indefinitely cache anything that uses force-cache or is fetched before a dynamic Hook/fetch.',\n 0: 'Specifying `0` implies that this layout or page should never be static.',\n 30: 'Set the revalidation time to `30` seconds. The value can be `0` or any positive number.',\n },\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#revalidate',\n isValid: (value: string) => {\n return value === 'false' || Number(value.replace(/_/g, '')) >= 0\n },\n getHint: (value: any) => {\n return `Set the default revalidation time to \\`${value}\\` seconds.`\n },\n },\n dynamicParams: {\n description:\n '`dynamicParams` replaces the `fallback` option of `getStaticPaths`. It controls whether we allow `dynamicParams` beyond the generated static params from `generateStaticParams`.',\n options: {\n true: 'Allow rendering dynamic params that are not generated by `generateStaticParams`.',\n false:\n 'Disallow rendering dynamic params that are not generated by `generateStaticParams`.',\n },\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamicparams',\n isValid: (value: string) => {\n return value === 'true' || value === 'false'\n },\n },\n runtime: {\n description:\n 'The `runtime` option controls the preferred runtime to render this route.',\n options: {\n '\"nodejs\"': 'Prefer the Node.js runtime.',\n '\"edge\"': 'Prefer the Edge runtime.',\n '\"experimental-edge\"': `@deprecated\\n\\nThis option is no longer experimental. Use \\`edge\\` instead.`,\n },\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#runtime',\n },\n metadata: {\n description: 'Next.js Metadata configurations',\n link: 'https://nextjs.org/docs/app/building-your-application/optimizing/metadata',\n insertText: 'metadata: Metadata = {};',\n },\n generateMetadata: {\n description: 'Next.js generateMetadata configurations',\n link: 'https://nextjs.org/docs/app/api-reference/functions/generate-metadata',\n insertText: 'generateMetadata = (): Metadata => { return {} };',\n },\n maxDuration: {\n description:\n '`maxDuration` allows you to set max default execution time for your function. If it is not specified, the default value is dependent on your deployment platform and plan.',\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#maxduration',\n },\n experimental_ppr: {\n description: `Enables experimental Partial Prerendering (PPR) for this page / layout, when PPR is set to \"incremental\" mode.`,\n link: 'https://nextjs.org/docs/app/api-reference/next-config-js/ppr',\n options: {\n true: 'Enable PPR for this route',\n false: 'Disable PPR for this route',\n },\n isValid: (value: string) => {\n return value === 'true' || value === 'false'\n },\n },\n}\n\nfunction visitEntryConfig(\n fileName: string,\n position: number,\n callback: (entryEonfig: string, value: tsModule.VariableDeclaration) => void\n) {\n const source = getSource(fileName)\n if (source) {\n const ts = getTs()\n ts.forEachChild(source, function visit(node) {\n // Covered by this node\n if (isPositionInsideNode(position, node)) {\n // Export variable\n if (\n ts.isVariableStatement(node) &&\n node.modifiers?.some((m) => m.kind === ts.SyntaxKind.ExportKeyword)\n ) {\n if (ts.isVariableDeclarationList(node.declarationList)) {\n for (const declaration of node.declarationList.declarations) {\n if (isPositionInsideNode(position, declaration)) {\n // `export const ... = ...`\n const text = declaration.name.getText()\n callback(text, declaration)\n }\n }\n }\n }\n }\n })\n }\n}\n\nfunction createAutoCompletionOptionName(sort: number, name: string) {\n const ts = getTs()\n\n return {\n name,\n insertText: API_DOCS[name].insertText,\n sortText: '!' + sort,\n kind: ts.ScriptElementKind.constElement,\n kindModifiers: ts.ScriptElementKindModifier.exportedModifier,\n labelDetails: {\n description: `Next.js ${name} option`,\n },\n data: {\n exportName: name,\n moduleSpecifier: 'next/typescript/entry_option_name',\n },\n } as tsModule.CompletionEntry\n}\n\nfunction createAutoCompletionOptionValue(\n sort: number,\n name: string,\n apiName: string\n) {\n const ts = getTs()\n const isString = name.startsWith('\"')\n return {\n name,\n insertText: removeStringQuotes(name),\n sortText: '' + sort,\n kind: isString ? ts.ScriptElementKind.string : ts.ScriptElementKind.unknown,\n kindModifiers: ts.ScriptElementKindModifier.none,\n labelDetails: {\n description: `Next.js ${apiName} option`,\n },\n data: {\n exportName: apiName,\n moduleSpecifier: 'next/typescript/entry_option_value',\n },\n } as tsModule.CompletionEntry\n}\n\nfunction getAPIDescription(api: string): string {\n return (\n API_DOCS[api].description +\n '\\n\\n' +\n Object.entries(API_DOCS[api].options || {})\n .map(([key, value]) => `- \\`${key}\\`: ${value}`)\n .join('\\n')\n )\n}\n\nconst config = {\n // Auto completion for entry exported configs.\n addCompletionsAtPosition(\n fileName: string,\n position: number,\n prior: tsModule.WithMetadata<tsModule.CompletionInfo>\n ) {\n visitEntryConfig(fileName, position, (entryConfig, declaration) => {\n if (!API_DOCS[entryConfig]) {\n if (isPositionInsideNode(position, declaration.name)) {\n prior.entries.push(\n ...Object.keys(API_DOCS).map((name, index) => {\n return createAutoCompletionOptionName(index, name)\n })\n )\n }\n return\n }\n\n prior.entries.push(\n ...Object.keys(API_DOCS[entryConfig].options || {}).map(\n (name, index) => {\n return createAutoCompletionOptionValue(index, name, entryConfig)\n }\n )\n )\n })\n },\n\n // Show docs when hovering on the exported configs.\n getQuickInfoAtPosition(fileName: string, position: number) {\n const ts = getTs()\n\n let overridden: tsModule.QuickInfo | undefined\n visitEntryConfig(fileName, position, (entryConfig, declaration) => {\n if (!API_DOCS[entryConfig]) return\n\n const name = declaration.name\n const value = declaration.initializer\n\n const docsLink = {\n kind: 'text',\n text:\n `\\n\\nRead more about the \"${entryConfig}\" option: ` +\n API_DOCS[entryConfig].link,\n }\n\n if (value && isPositionInsideNode(position, value)) {\n // Hovers the value of the config\n const isString = ts.isStringLiteral(value)\n const text = removeStringQuotes(value.getText())\n const key = isString ? `\"${text}\"` : text\n\n const isValid = API_DOCS[entryConfig].isValid\n ? API_DOCS[entryConfig].isValid?.(key)\n : !!API_DOCS[entryConfig].options?.[key]\n\n if (isValid) {\n overridden = {\n kind: ts.ScriptElementKind.enumElement,\n kindModifiers: ts.ScriptElementKindModifier.none,\n textSpan: {\n start: value.getStart(),\n length: value.getWidth(),\n },\n displayParts: [],\n documentation: [\n {\n kind: 'text',\n text:\n API_DOCS[entryConfig].options?.[key] ||\n API_DOCS[entryConfig].getHint?.(key) ||\n '',\n },\n docsLink,\n ],\n }\n } else {\n // Wrong value, display the docs link\n overridden = {\n kind: ts.ScriptElementKind.enumElement,\n kindModifiers: ts.ScriptElementKindModifier.none,\n textSpan: {\n start: value.getStart(),\n length: value.getWidth(),\n },\n displayParts: [],\n documentation: [docsLink],\n }\n }\n } else {\n // Hovers the name of the config\n overridden = {\n kind: ts.ScriptElementKind.enumElement,\n kindModifiers: ts.ScriptElementKindModifier.none,\n textSpan: {\n start: name.getStart(),\n length: name.getWidth(),\n },\n displayParts: [],\n documentation: [\n {\n kind: 'text',\n text: getAPIDescription(entryConfig),\n },\n docsLink,\n ],\n }\n }\n })\n return overridden\n },\n\n // Show details on the side when auto completing.\n getCompletionEntryDetails(\n entryName: string,\n data: tsModule.CompletionEntryData,\n fileName: string\n ): tsModule.CompletionEntryDetails | undefined {\n const ts = getTs()\n if (\n data &&\n data.moduleSpecifier &&\n data.moduleSpecifier.startsWith('next/typescript')\n ) {\n let content = ''\n if (data.moduleSpecifier === 'next/typescript/entry_option_name') {\n content = getAPIDescription(entryName)\n } else {\n const options = API_DOCS[data.exportName].options\n if (!options) return\n content = options[entryName]\n }\n\n if (entryName === 'metadata' || entryName === 'generateMetadata') {\n const sourceFile = getSource(fileName)\n let start = 0\n let foundMetadataImport = false\n\n if (sourceFile) {\n const visitor: tsModule.Visitor = (node) => {\n // Check for top directive\n if (\n ts.isExpressionStatement(node) &&\n ts.isStringLiteral(node.expression) &&\n node.expression.getStart() === 0\n ) {\n const text = node.expression.text\n if (text.startsWith('use ')) {\n start = node.end + 1\n return node // Continue traversal\n }\n }\n\n // Check for Metadata import\n if (\n ts.isImportDeclaration(node) &&\n (node.moduleSpecifier.getText() === '\"next\"' ||\n node.moduleSpecifier.getText() === \"'next'\")\n ) {\n const namedImports = node.importClause?.namedBindings\n if (namedImports && ts.isNamedImports(namedImports)) {\n foundMetadataImport = namedImports.elements.some((element) => {\n const name = element.name.getText()\n const propertyName = element.propertyName?.getText()\n return name === 'Metadata' || propertyName === 'Metadata'\n })\n if (foundMetadataImport) {\n return // Stop traversal\n }\n }\n }\n\n return node\n }\n\n for (const statement of sourceFile.statements) {\n if (foundMetadataImport) break\n ts.visitNode(statement, visitor)\n }\n }\n\n return {\n name: entryName,\n kind: ts.ScriptElementKind.enumElement,\n kindModifiers: ts.ScriptElementKindModifier.none,\n displayParts: [],\n codeActions: foundMetadataImport\n ? undefined\n : [\n {\n description: `Import type 'Metadata' from module 'next'`,\n changes: [\n {\n fileName,\n textChanges: [\n {\n span: { start, length: 0 },\n newText: `import type { Metadata } from 'next';\\n`,\n },\n ],\n },\n ],\n },\n ],\n documentation: [\n {\n kind: 'text',\n text: content,\n },\n ],\n }\n }\n\n return {\n name: entryName,\n kind: ts.ScriptElementKind.enumElement,\n kindModifiers: ts.ScriptElementKindModifier.none,\n displayParts: [],\n documentation: [\n {\n kind: 'text',\n text: content,\n },\n ],\n }\n }\n },\n\n // Show errors for invalid export fields.\n getSemanticDiagnosticsForExportVariableStatement(\n source: tsModule.SourceFile,\n node: tsModule.VariableStatement\n ) {\n const ts = getTs()\n\n const diagnostics: tsModule.Diagnostic[] = []\n\n // Check if it has correct option exports\n if (ts.isVariableDeclarationList(node.declarationList)) {\n for (const declaration of node.declarationList.declarations) {\n const name = declaration.name\n if (ts.isIdentifier(name)) {\n if (!ALLOWED_EXPORTS.includes(name.text) && !API_DOCS[name.text]) {\n diagnostics.push({\n file: source,\n category: ts.DiagnosticCategory.Error,\n code: NEXT_TS_ERRORS.INVALID_ENTRY_EXPORT,\n messageText: `\"${name.text}\" is not a valid Next.js entry export value.`,\n start: name.getStart(),\n length: name.getWidth(),\n })\n } else if (API_DOCS[name.text]) {\n // Check if the value is valid\n const value = declaration.initializer\n const options = API_DOCS[name.text].options\n\n if (value && options) {\n let displayedValue = ''\n let errorMessage = ''\n let isInvalid = false\n\n if (\n ts.isStringLiteral(value) ||\n ts.isNoSubstitutionTemplateLiteral(value)\n ) {\n const val = '\"' + removeStringQuotes(value.getText()) + '\"'\n const allowedValues = Object.keys(options).filter((v) =>\n /^['\"]/.test(v)\n )\n\n if (\n !allowedValues.includes(val) &&\n !API_DOCS[name.text].isValid?.(val)\n ) {\n isInvalid = true\n displayedValue = val\n }\n } else if (\n ts.isNumericLiteral(value) ||\n (ts.isPrefixUnaryExpression(value) &&\n ts.isMinusToken((value as any).operator) &&\n (ts.isNumericLiteral((value as any).operand.kind) ||\n (ts.isIdentifier((value as any).operand.kind) &&\n (value as any).operand.kind.getText() === 'Infinity'))) ||\n (ts.isIdentifier(value) && value.getText() === 'Infinity')\n ) {\n const v = value.getText()\n if (!API_DOCS[name.text].isValid?.(v)) {\n isInvalid = true\n displayedValue = v\n }\n } else if (\n value.kind === ts.SyntaxKind.TrueKeyword ||\n value.kind === ts.SyntaxKind.FalseKeyword\n ) {\n const v = value.getText()\n if (!API_DOCS[name.text].isValid?.(v)) {\n isInvalid = true\n displayedValue = v\n }\n } else if (ts.isArrayLiteralExpression(value)) {\n const v = value.getText()\n if (\n !API_DOCS[name.text].isValid?.(\n JSON.stringify(value.elements.map((e) => e.getText()))\n )\n ) {\n isInvalid = true\n displayedValue = v\n }\n } else if (\n // Other literals\n ts.isBigIntLiteral(value) ||\n ts.isObjectLiteralExpression(value) ||\n ts.isRegularExpressionLiteral(value) ||\n ts.isPrefixUnaryExpression(value)\n ) {\n isInvalid = true\n displayedValue = value.getText()\n } else {\n // Not a literal, error because it's not statically analyzable\n isInvalid = true\n displayedValue = value.getText()\n errorMessage = `\"${displayedValue}\" is not a valid value for the \"${name.text}\" option. The configuration must be statically analyzable.`\n }\n\n if (isInvalid) {\n diagnostics.push({\n file: source,\n category: ts.DiagnosticCategory.Error,\n code: NEXT_TS_ERRORS.INVALID_OPTION_VALUE,\n messageText:\n errorMessage ||\n `\"${displayedValue}\" is not a valid value for the \"${name.text}\" option.`,\n start: value.getStart(),\n length: value.getWidth(),\n })\n }\n }\n } else if (name.text === LEGACY_CONFIG_EXPORT) {\n // export const config = { ... }\n // Error if using `amp: ...`\n const value = declaration.initializer\n if (value && ts.isObjectLiteralExpression(value)) {\n for (const prop of value.properties) {\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isIdentifier(prop.name) &&\n prop.name.text === 'amp'\n ) {\n diagnostics.push({\n file: source,\n category: ts.DiagnosticCategory.Error,\n code: NEXT_TS_ERRORS.INVALID_CONFIG_OPTION,\n messageText: `AMP is not supported in the app directory. If you need to use AMP it will continue to be supported in the pages directory.`,\n start: prop.getStart(),\n length: prop.getWidth(),\n })\n }\n }\n }\n }\n }\n }\n }\n\n return diagnostics\n },\n}\n\nexport default config\n"],"names":["API_DOCS","dynamic","description","options","link","fetchCache","preferredRegion","isValid","value","parsed","JSON","parse","Array","isArray","some","v","err","getHint","join","revalidate","type","false","Number","replace","dynamicParams","true","runtime","metadata","insertText","generateMetadata","maxDuration","experimental_ppr","visitEntryConfig","fileName","position","callback","source","getSource","ts","getTs","forEachChild","visit","node","isPositionInsideNode","isVariableStatement","modifiers","m","kind","SyntaxKind","ExportKeyword","isVariableDeclarationList","declarationList","declaration","declarations","text","name","getText","createAutoCompletionOptionName","sort","sortText","ScriptElementKind","constElement","kindModifiers","ScriptElementKindModifier","exportedModifier","labelDetails","data","exportName","moduleSpecifier","createAutoCompletionOptionValue","apiName","isString","startsWith","removeStringQuotes","string","unknown","none","getAPIDescription","api","Object","entries","map","key","config","addCompletionsAtPosition","prior","entryConfig","push","keys","index","getQuickInfoAtPosition","overridden","initializer","docsLink","isStringLiteral","enumElement","textSpan","start","getStart","length","getWidth","displayParts","documentation","getCompletionEntryDetails","entryName","content","sourceFile","foundMetadataImport","visitor","isExpressionStatement","expression","end","isImportDeclaration","namedImports","importClause","namedBindings","isNamedImports","elements","element","propertyName","statement","statements","visitNode","codeActions","undefined","changes","textChanges","span","newText","getSemanticDiagnosticsForExportVariableStatement","diagnostics","isIdentifier","ALLOWED_EXPORTS","includes","file","category","DiagnosticCategory","Error","code","NEXT_TS_ERRORS","INVALID_ENTRY_EXPORT","messageText","displayedValue","errorMessage","isInvalid","isNoSubstitutionTemplateLiteral","val","allowedValues","filter","test","isNumericLiteral","isPrefixUnaryExpression","isMinusToken","operator","operand","TrueKeyword","FalseKeyword","isArrayLiteralExpression","stringify","e","isBigIntLiteral","isObjectLiteralExpression","isRegularExpressionLiteral","INVALID_OPTION_VALUE","LEGACY_CONFIG_EXPORT","prop","properties","isPropertyAssignment","INVALID_CONFIG_OPTION"],"mappings":"AAAA,4EAA4E;;;;;+BAumB5E;;;eAAA;;;uBAhmBO;0BAKA;AAGP,MAAMA,WAWF;IACFC,SAAS;QACPC,aACE;QACFC,SAAS;YACP,UACE;YACF,mBACE;YACF,WACE;YACF,kBACE;QACJ;QACAC,MAAM;IACR;IACAC,YAAY;QACVH,aACE;QACFC,SAAS;YACP,oBACE;YACF,mBACE;YACF,sBACE;YACF,UACE;YACF,mBACE;YACF,gBACE;YACF,iBACE;QACJ;QACAC,MAAM;IACR;IACAE,iBAAiB;QACfJ,aACE;QACFC,SAAS;YACP,UACE;YACF,YAAY;YACZ,UAAU;QACZ;QACAC,MAAM;QACNG,SAAS,CAACC;YACR,IAAI;gBACF,MAAMC,SAASC,KAAKC,KAAK,CAACH;gBAC1B,OACE,OAAOC,WAAW,YACjBG,MAAMC,OAAO,CAACJ,WAAW,CAACA,OAAOK,IAAI,CAAC,CAACC,IAAM,OAAOA,MAAM;YAE/D,EAAE,OAAOC,KAAK;gBACZ,OAAO;YACT;QACF;QACAC,SAAS,CAACT;YACR,IAAIA,UAAU,QAAQ,OAAO,CAAC,gCAAgC,CAAC;YAC/D,IAAIA,UAAU,UAAU,OAAO,CAAC,0BAA0B,CAAC;YAC3D,IAAIA,UAAU,QAAQ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AiBtI,MAAMgD,OAAO;gCAC9BuF,eAAe,CAAC,CAAC,EAAED,eAAe,gCAAgC,EAAEvF,KAAKD,IAAI,CAAC,0DAA0D,CAAC;4BAC3I;4BAEA,IAAI0F,WAAW;gCACbd,YAAY3C,IAAI,CAAC;oCACf+C,MAAMlG;oCACNmG,UAAUjG,GAAGkG,kBAAkB,CAACC,KAAK;oCACrCC,MAAMC,wBAAc,CAACwB,oBAAoB;oCACzCtB,aACEE,gBACA,CAAC,CAAC,EAAED,eAAe,gCAAgC,EAAEvF,KAAKD,IAAI,CAAC,SAAS,CAAC;oCAC3E2C,OAAOzF,MAAM0F,QAAQ;oCACrBC,QAAQ3F,MAAM4F,QAAQ;gCACxB;4BACF;wBACF;oBACF,OAAO,IAAI7C,KAAKD,IAAI,KAAK8G,8BAAoB,EAAE;wBAC7C,gCAAgC;wBAChC,4BAA4B;wBAC5B,MAAM5J,QAAQ4C,YAAYwC,WAAW;wBACrC,IAAIpF,SAAS8B,GAAG2H,yBAAyB,CAACzJ,QAAQ;4BAChD,KAAK,MAAM6J,QAAQ7J,MAAM8J,UAAU,CAAE;gCACnC,IACEhI,GAAGiI,oBAAoB,CAACF,SACxB/H,GAAG6F,YAAY,CAACkC,KAAK9G,IAAI,KACzB8G,KAAK9G,IAAI,CAACD,IAAI,KAAK,OACnB;oCACA4E,YAAY3C,IAAI,CAAC;wCACf+C,MAAMlG;wCACNmG,UAAUjG,GAAGkG,kBAAkB,CAACC,KAAK;wCACrCC,MAAMC,wBAAc,CAAC6B,qBAAqB;wCAC1C3B,aAAa,CAAC,0HAA0H,CAAC;wCACzI5C,OAAOoE,KAAKnE,QAAQ;wCACpBC,QAAQkE,KAAKjE,QAAQ;oCACvB;gCACF;4BACF;wBACF;oBACF;gBACF;YACF;QACF;QAEA,OAAO8B;IACT;AACF;MAEA,WAAe/C","ignoreList":[0]}
|
1
|
+
{"version":3,"sources":["../../../../src/server/typescript/rules/config.ts"],"sourcesContent":["// This module provides intellisense for page and layout's exported configs.\n\nimport {\n getSource,\n isPositionInsideNode,\n getTs,\n removeStringQuotes,\n} from '../utils'\nimport {\n NEXT_TS_ERRORS,\n ALLOWED_EXPORTS,\n LEGACY_CONFIG_EXPORT,\n} from '../constant'\nimport type tsModule from 'typescript/lib/tsserverlibrary'\nimport type { AppSegmentConfig } from '../../../build/segment-config/app/app-segment-config'\n\nconst API_DOCS: Record<\n string,\n {\n description: string\n options?: Record<string, string>\n link?: string\n type?: string\n isValid?: (value: string) => boolean\n getHint?: (value: any) => string | undefined\n insertText?: string\n }\n> = {\n dynamic: {\n description:\n 'The `dynamic` option provides a few ways to opt in or out of dynamic behavior.',\n options: {\n '\"auto\"':\n \"Heuristic to cache as much as possible but doesn't prevent any component to opt-in to dynamic behavior.\",\n '\"force-dynamic\"':\n 'This disables all caching of fetches and always revalidates. (This is equivalent to `getServerSideProps`.)',\n '\"error\"':\n 'This errors if any dynamic Hooks or fetches are used. (This is equivalent to `getStaticProps`.)',\n '\"force-static\"':\n 'This forces caching of all fetches and returns empty values from `cookies`, `headers` and `useSearchParams`.',\n } satisfies DocsOptionsObject<FullAppSegmentConfig['dynamic']>,\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic',\n },\n fetchCache: {\n description:\n \"The `fetchCache` option controls how Next.js statically caches fetches. By default it statically caches fetches reachable before any dynamic Hooks are used, and it doesn't cache fetches that are discovered after that.\",\n options: {\n '\"force-no-store\"':\n \"This lets you intentionally opt-out of all caching of data. This option forces all fetches to be refetched every request even if the `cache: 'force-cache'` option is passed to `fetch()`.\",\n '\"only-no-store\"':\n \"This lets you enforce that all data opts out of caching. This option makes `fetch()` reject with an error if `cache: 'force-cache'` is provided. It also changes the default to `no-store`.\",\n '\"default-no-store\"':\n \"Allows any explicit `cache` option to be passed to `fetch()` but if `'default'`, or no option, is provided then it defaults to `'no-store'`. This means that even fetches before a dynamic Hook are considered dynamic.\",\n '\"auto\"':\n \"This is the default option. It caches any fetches with the default `cache` option provided, that happened before a dynamic Hook is used and don't cache any such fetches if they're issued after a dynamic Hook.\",\n '\"default-cache\"':\n \"Allows any explicit `cache` option to be passed to `fetch()` but if `'default'`, or no option, is provided then it defaults to `'force-cache'`. This means that even fetches before a dynamic Hook are considered dynamic.\",\n '\"only-cache\"':\n \"This lets you enforce that all data opts into caching. This option makes `fetch()` reject with an error if `cache: 'force-cache'` is provided. It also changes the default to `force-cache`. This error can be discovered early during static builds - or dynamically during Edge rendering.\",\n '\"force-cache\"':\n \"This lets you intentionally opt-in to all caching of data. This option forces all fetches to be cache even if the `cache: 'no-store'` option is passed to `fetch()`.\",\n } satisfies DocsOptionsObject<FullAppSegmentConfig['fetchCache']>,\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#fetchcache',\n },\n preferredRegion: {\n description:\n 'Specify the perferred region that this layout or page should be deployed to. If the region option is not specified, it inherits the option from the nearest parent layout. The root defaults to `\"auto\"`.\\n\\nYou can also specify a region, such as \"iad1\", or an array of regions, such as `[\"iad1\", \"sfo1\"]`.',\n options: {\n '\"auto\"':\n 'Next.js will first deploy to the `\"home\"` region. Then if it doesn\\'t detect any waterfall requests after a few requests, it can upgrade that route, to be deployed globally. If it detects any waterfall requests after that, it can eventually downgrade back to `\"home`\".',\n '\"global\"': 'Prefer deploying globally.',\n '\"home\"': 'Prefer deploying to the Home region.',\n },\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#preferredregion',\n isValid: (value: string) => {\n try {\n const parsed = JSON.parse(value)\n return (\n typeof parsed === 'string' ||\n (Array.isArray(parsed) && !parsed.some((v) => typeof v !== 'string'))\n )\n } catch (err) {\n return false\n }\n },\n getHint: (value: any) => {\n if (value === 'auto') return `Automatically chosen by Next.js.`\n if (value === 'global') return `Prefer deploying globally.`\n if (value === 'home') return `Prefer deploying to the Home region.`\n if (Array.isArray(value)) return `Deploy to regions: ${value.join(', ')}.`\n if (typeof value === 'string') return `Deploy to region: ${value}.`\n },\n },\n revalidate: {\n description:\n \"The `revalidate` option sets the default revalidation time for that layout or page. Note that it doesn't override the value specify by each `fetch()`.\",\n type: 'mixed',\n options: {\n false:\n 'This is the default and changes the fetch cache to indefinitely cache anything that uses force-cache or is fetched before a dynamic Hook/fetch.',\n 0: 'Specifying `0` implies that this layout or page should never be static.',\n 30: 'Set the revalidation time to `30` seconds. The value can be `0` or any positive number.',\n },\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#revalidate',\n isValid: (value: string) => {\n return value === 'false' || Number(value.replace(/_/g, '')) >= 0\n },\n getHint: (value: any) => {\n return `Set the default revalidation time to \\`${value}\\` seconds.`\n },\n },\n dynamicParams: {\n description:\n '`dynamicParams` replaces the `fallback` option of `getStaticPaths`. It controls whether we allow `dynamicParams` beyond the generated static params from `generateStaticParams`.',\n options: {\n true: 'Allow rendering dynamic params that are not generated by `generateStaticParams`.',\n false:\n 'Disallow rendering dynamic params that are not generated by `generateStaticParams`.',\n } satisfies DocsOptionsObject<FullAppSegmentConfig['dynamicParams']>,\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamicparams',\n isValid: (value: string) => {\n return value === 'true' || value === 'false'\n },\n },\n runtime: {\n description:\n 'The `runtime` option controls the preferred runtime to render this route.',\n options: {\n '\"nodejs\"': 'Prefer the Node.js runtime.',\n '\"edge\"': 'Prefer the Edge runtime.',\n '\"experimental-edge\"': `@deprecated\\n\\nThis option is no longer experimental. Use \\`edge\\` instead.`,\n } satisfies DocsOptionsObject<\n FullAppSegmentConfig['runtime'] | 'experimental-edge'\n >,\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#runtime',\n },\n metadata: {\n description: 'Next.js Metadata configurations',\n link: 'https://nextjs.org/docs/app/building-your-application/optimizing/metadata',\n insertText: 'metadata: Metadata = {};',\n },\n generateMetadata: {\n description: 'Next.js generateMetadata configurations',\n link: 'https://nextjs.org/docs/app/api-reference/functions/generate-metadata',\n insertText: 'generateMetadata = (): Metadata => { return {} };',\n },\n maxDuration: {\n description:\n '`maxDuration` allows you to set max default execution time for your function. If it is not specified, the default value is dependent on your deployment platform and plan.',\n link: 'https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#maxduration',\n },\n experimental_ppr: {\n description: `Enables experimental Partial Prerendering (PPR) for this page / layout, when PPR is set to \"incremental\" mode.`,\n link: 'https://nextjs.org/docs/app/api-reference/next-config-js/ppr',\n options: {\n true: 'Enable PPR for this route',\n false: 'Disable PPR for this route',\n } satisfies DocsOptionsObject<FullAppSegmentConfig['experimental_ppr']>,\n isValid: (value: string) => {\n return value === 'true' || value === 'false'\n },\n },\n unstable_prefetch: {\n description: `Specifies the default prefetching behavior for this segment. This configuration is currently under development and will change.`,\n link: '(docs coming soon)',\n options: {\n '\"unstable_static\"':\n 'Only static and cached parts of the page will be prefetched. (default)',\n '\"unstable_runtime\"':\n 'Parts of the page that use route params, search params, or cookies will also be prefetched.',\n } satisfies DocsOptionsObject<FullAppSegmentConfig['unstable_prefetch']>,\n },\n}\n\ntype FullAppSegmentConfig = Required<AppSegmentConfig>\n\n/**\n * Maps a type for a config value to a docs object that lists all its values.\n * This ensures that all the valid options are listed.\n * Note that values that aren't primitives are skipped.\n *\n * ```\n * DocsOptionsObject<0 | false | \"yes\"> = { 0: string, false: string, '\"yes\"': string }\n * ```\n */\ntype DocsOptionsObject<T> = {\n [Value in T as AsObjectKey<Value>]: string\n}\n\ntype AsObjectKey<Value> = Value extends string\n ? `\"${Value}\"`\n : Value extends number | boolean | null | undefined\n ? `${Value}`\n : never\n\nfunction visitEntryConfig(\n fileName: string,\n position: number,\n callback: (entryEonfig: string, value: tsModule.VariableDeclaration) => void\n) {\n const source = getSource(fileName)\n if (source) {\n const ts = getTs()\n ts.forEachChild(source, function visit(node) {\n // Covered by this node\n if (isPositionInsideNode(position, node)) {\n // Export variable\n if (\n ts.isVariableStatement(node) &&\n node.modifiers?.some((m) => m.kind === ts.SyntaxKind.ExportKeyword)\n ) {\n if (ts.isVariableDeclarationList(node.declarationList)) {\n for (const declaration of node.declarationList.declarations) {\n if (isPositionInsideNode(position, declaration)) {\n // `export const ... = ...`\n const text = declaration.name.getText()\n callback(text, declaration)\n }\n }\n }\n }\n }\n })\n }\n}\n\nfunction createAutoCompletionOptionName(sort: number, name: string) {\n const ts = getTs()\n\n return {\n name,\n insertText: API_DOCS[name].insertText,\n sortText: '!' + sort,\n kind: ts.ScriptElementKind.constElement,\n kindModifiers: ts.ScriptElementKindModifier.exportedModifier,\n labelDetails: {\n description: `Next.js ${name} option`,\n },\n data: {\n exportName: name,\n moduleSpecifier: 'next/typescript/entry_option_name',\n },\n } as tsModule.CompletionEntry\n}\n\nfunction createAutoCompletionOptionValue(\n sort: number,\n name: string,\n apiName: string\n) {\n const ts = getTs()\n const isString = name.startsWith('\"')\n return {\n name,\n insertText: removeStringQuotes(name),\n sortText: '' + sort,\n kind: isString ? ts.ScriptElementKind.string : ts.ScriptElementKind.unknown,\n kindModifiers: ts.ScriptElementKindModifier.none,\n labelDetails: {\n description: `Next.js ${apiName} option`,\n },\n data: {\n exportName: apiName,\n moduleSpecifier: 'next/typescript/entry_option_value',\n },\n } as tsModule.CompletionEntry\n}\n\nfunction getAPIDescription(api: string): string {\n return (\n API_DOCS[api].description +\n '\\n\\n' +\n Object.entries(API_DOCS[api].options || {})\n .map(([key, value]) => `- \\`${key}\\`: ${value}`)\n .join('\\n')\n )\n}\n\nconst config = {\n // Auto completion for entry exported configs.\n addCompletionsAtPosition(\n fileName: string,\n position: number,\n prior: tsModule.WithMetadata<tsModule.CompletionInfo>\n ) {\n visitEntryConfig(fileName, position, (entryConfig, declaration) => {\n if (!API_DOCS[entryConfig]) {\n if (isPositionInsideNode(position, declaration.name)) {\n prior.entries.push(\n ...Object.keys(API_DOCS).map((name, index) => {\n return createAutoCompletionOptionName(index, name)\n })\n )\n }\n return\n }\n\n prior.entries.push(\n ...Object.keys(API_DOCS[entryConfig].options || {}).map(\n (name, index) => {\n return createAutoCompletionOptionValue(index, name, entryConfig)\n }\n )\n )\n })\n },\n\n // Show docs when hovering on the exported configs.\n getQuickInfoAtPosition(fileName: string, position: number) {\n const ts = getTs()\n\n let overridden: tsModule.QuickInfo | undefined\n visitEntryConfig(fileName, position, (entryConfig, declaration) => {\n if (!API_DOCS[entryConfig]) return\n\n const name = declaration.name\n const value = declaration.initializer\n\n const docsLink = {\n kind: 'text',\n text:\n `\\n\\nRead more about the \"${entryConfig}\" option: ` +\n API_DOCS[entryConfig].link,\n }\n\n if (value && isPositionInsideNode(position, value)) {\n // Hovers the value of the config\n const isString = ts.isStringLiteral(value)\n const text = removeStringQuotes(value.getText())\n const key = isString ? `\"${text}\"` : text\n\n const isValid = API_DOCS[entryConfig].isValid\n ? API_DOCS[entryConfig].isValid?.(key)\n : !!API_DOCS[entryConfig].options?.[key]\n\n if (isValid) {\n overridden = {\n kind: ts.ScriptElementKind.enumElement,\n kindModifiers: ts.ScriptElementKindModifier.none,\n textSpan: {\n start: value.getStart(),\n length: value.getWidth(),\n },\n displayParts: [],\n documentation: [\n {\n kind: 'text',\n text:\n API_DOCS[entryConfig].options?.[key] ||\n API_DOCS[entryConfig].getHint?.(key) ||\n '',\n },\n docsLink,\n ],\n }\n } else {\n // Wrong value, display the docs link\n overridden = {\n kind: ts.ScriptElementKind.enumElement,\n kindModifiers: ts.ScriptElementKindModifier.none,\n textSpan: {\n start: value.getStart(),\n length: value.getWidth(),\n },\n displayParts: [],\n documentation: [docsLink],\n }\n }\n } else {\n // Hovers the name of the config\n overridden = {\n kind: ts.ScriptElementKind.enumElement,\n kindModifiers: ts.ScriptElementKindModifier.none,\n textSpan: {\n start: name.getStart(),\n length: name.getWidth(),\n },\n displayParts: [],\n documentation: [\n {\n kind: 'text',\n text: getAPIDescription(entryConfig),\n },\n docsLink,\n ],\n }\n }\n })\n return overridden\n },\n\n // Show details on the side when auto completing.\n getCompletionEntryDetails(\n entryName: string,\n data: tsModule.CompletionEntryData,\n fileName: string\n ): tsModule.CompletionEntryDetails | undefined {\n const ts = getTs()\n if (\n data &&\n data.moduleSpecifier &&\n data.moduleSpecifier.startsWith('next/typescript')\n ) {\n let content = ''\n if (data.moduleSpecifier === 'next/typescript/entry_option_name') {\n content = getAPIDescription(entryName)\n } else {\n const options = API_DOCS[data.exportName].options\n if (!options) return\n content = options[entryName]\n }\n\n if (entryName === 'metadata' || entryName === 'generateMetadata') {\n const sourceFile = getSource(fileName)\n let start = 0\n let foundMetadataImport = false\n\n if (sourceFile) {\n const visitor: tsModule.Visitor = (node) => {\n // Check for top directive\n if (\n ts.isExpressionStatement(node) &&\n ts.isStringLiteral(node.expression) &&\n node.expression.getStart() === 0\n ) {\n const text = node.expression.text\n if (text.startsWith('use ')) {\n start = node.end + 1\n return node // Continue traversal\n }\n }\n\n // Check for Metadata import\n if (\n ts.isImportDeclaration(node) &&\n (node.moduleSpecifier.getText() === '\"next\"' ||\n node.moduleSpecifier.getText() === \"'next'\")\n ) {\n const namedImports = node.importClause?.namedBindings\n if (namedImports && ts.isNamedImports(namedImports)) {\n foundMetadataImport = namedImports.elements.some((element) => {\n const name = element.name.getText()\n const propertyName = element.propertyName?.getText()\n return name === 'Metadata' || propertyName === 'Metadata'\n })\n if (foundMetadataImport) {\n return // Stop traversal\n }\n }\n }\n\n return node\n }\n\n for (const statement of sourceFile.statements) {\n if (foundMetadataImport) break\n ts.visitNode(statement, visitor)\n }\n }\n\n return {\n name: entryName,\n kind: ts.ScriptElementKind.enumElement,\n kindModifiers: ts.ScriptElementKindModifier.none,\n displayParts: [],\n codeActions: foundMetadataImport\n ? undefined\n : [\n {\n description: `Import type 'Metadata' from module 'next'`,\n changes: [\n {\n fileName,\n textChanges: [\n {\n span: { start, length: 0 },\n newText: `import type { Metadata } from 'next';\\n`,\n },\n ],\n },\n ],\n },\n ],\n documentation: [\n {\n kind: 'text',\n text: content,\n },\n ],\n }\n }\n\n return {\n name: entryName,\n kind: ts.ScriptElementKind.enumElement,\n kindModifiers: ts.ScriptElementKindModifier.none,\n displayParts: [],\n documentation: [\n {\n kind: 'text',\n text: content,\n },\n ],\n }\n }\n },\n\n // Show errors for invalid export fields.\n getSemanticDiagnosticsForExportVariableStatement(\n source: tsModule.SourceFile,\n node: tsModule.VariableStatement\n ) {\n const ts = getTs()\n\n const diagnostics: tsModule.Diagnostic[] = []\n\n // Check if it has correct option exports\n if (ts.isVariableDeclarationList(node.declarationList)) {\n for (const declaration of node.declarationList.declarations) {\n const name = declaration.name\n if (ts.isIdentifier(name)) {\n if (!ALLOWED_EXPORTS.includes(name.text) && !API_DOCS[name.text]) {\n diagnostics.push({\n file: source,\n category: ts.DiagnosticCategory.Error,\n code: NEXT_TS_ERRORS.INVALID_ENTRY_EXPORT,\n messageText: `\"${name.text}\" is not a valid Next.js entry export value.`,\n start: name.getStart(),\n length: name.getWidth(),\n })\n } else if (API_DOCS[name.text]) {\n // Check if the value is valid\n const value = declaration.initializer\n const options = API_DOCS[name.text].options\n\n if (value && options) {\n let displayedValue = ''\n let errorMessage = ''\n let isInvalid = false\n\n if (\n ts.isStringLiteral(value) ||\n ts.isNoSubstitutionTemplateLiteral(value)\n ) {\n const val = '\"' + removeStringQuotes(value.getText()) + '\"'\n const allowedValues = Object.keys(options).filter((v) =>\n /^['\"]/.test(v)\n )\n\n if (\n !allowedValues.includes(val) &&\n !API_DOCS[name.text].isValid?.(val)\n ) {\n isInvalid = true\n displayedValue = val\n }\n } else if (\n ts.isNumericLiteral(value) ||\n (ts.isPrefixUnaryExpression(value) &&\n ts.isMinusToken((value as any).operator) &&\n (ts.isNumericLiteral((value as any).operand.kind) ||\n (ts.isIdentifier((value as any).operand.kind) &&\n (value as any).operand.kind.getText() === 'Infinity'))) ||\n (ts.isIdentifier(value) && value.getText() === 'Infinity')\n ) {\n const v = value.getText()\n if (!API_DOCS[name.text].isValid?.(v)) {\n isInvalid = true\n displayedValue = v\n }\n } else if (\n value.kind === ts.SyntaxKind.TrueKeyword ||\n value.kind === ts.SyntaxKind.FalseKeyword\n ) {\n const v = value.getText()\n if (!API_DOCS[name.text].isValid?.(v)) {\n isInvalid = true\n displayedValue = v\n }\n } else if (ts.isArrayLiteralExpression(value)) {\n const v = value.getText()\n if (\n !API_DOCS[name.text].isValid?.(\n JSON.stringify(value.elements.map((e) => e.getText()))\n )\n ) {\n isInvalid = true\n displayedValue = v\n }\n } else if (\n // Other literals\n ts.isBigIntLiteral(value) ||\n ts.isObjectLiteralExpression(value) ||\n ts.isRegularExpressionLiteral(value) ||\n ts.isPrefixUnaryExpression(value)\n ) {\n isInvalid = true\n displayedValue = value.getText()\n } else {\n // Not a literal, error because it's not statically analyzable\n isInvalid = true\n displayedValue = value.getText()\n errorMessage = `\"${displayedValue}\" is not a valid value for the \"${name.text}\" option. The configuration must be statically analyzable.`\n }\n\n if (isInvalid) {\n diagnostics.push({\n file: source,\n category: ts.DiagnosticCategory.Error,\n code: NEXT_TS_ERRORS.INVALID_OPTION_VALUE,\n messageText:\n errorMessage ||\n `\"${displayedValue}\" is not a valid value for the \"${name.text}\" option.`,\n start: value.getStart(),\n length: value.getWidth(),\n })\n }\n }\n } else if (name.text === LEGACY_CONFIG_EXPORT) {\n // export const config = { ... }\n // Error if using `amp: ...`\n const value = declaration.initializer\n if (value && ts.isObjectLiteralExpression(value)) {\n for (const prop of value.properties) {\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isIdentifier(prop.name) &&\n prop.name.text === 'amp'\n ) {\n diagnostics.push({\n file: source,\n category: ts.DiagnosticCategory.Error,\n code: NEXT_TS_ERRORS.INVALID_CONFIG_OPTION,\n messageText: `AMP is not supported in the app directory. If you need to use AMP it will continue to be supported in the pages directory.`,\n start: prop.getStart(),\n length: prop.getWidth(),\n })\n }\n }\n }\n }\n }\n }\n }\n\n return diagnostics\n },\n}\n\nexport default config\n"],"names":["API_DOCS","dynamic","description","options","link","fetchCache","preferredRegion","isValid","value","parsed","JSON","parse","Array","isArray","some","v","err","getHint","join","revalidate","type","false","Number","replace","dynamicParams","true","runtime","metadata","insertText","generateMetadata","maxDuration","experimental_ppr","unstable_prefetch","visitEntryConfig","fileName","position","callback","source","getSource","ts","getTs","forEachChild","visit","node","isPositionInsideNode","isVariableStatement","modifiers","m","kind","SyntaxKind","ExportKeyword","isVariableDeclarationList","declarationList","declaration","declarations","text","name","getText","createAutoCompletionOptionName","sort","sortText","ScriptElementKind","constElement","kindModifiers","ScriptElementKindModifier","exportedModifier","labelDetails","data","exportName","moduleSpecifier","createAutoCompletionOptionValue","apiName","isString","startsWith","removeStringQuotes","string","unknown","none","getAPIDescription","api","Object","entries","map","key","config","addCompletionsAtPosition","prior","entryConfig","push","keys","index","getQuickInfoAtPosition","overridden","initializer","docsLink","isStringLiteral","enumElement","textSpan","start","getStart","length","getWidth","displayParts","documentation","getCompletionEntryDetails","entryName","content","sourceFile","foundMetadataImport","visitor","isExpressionStatement","expression","end","isImportDeclaration","namedImports","importClause","namedBindings","isNamedImports","elements","element","propertyName","statement","statements","visitNode","codeActions","undefined","changes","textChanges","span","newText","getSemanticDiagnosticsForExportVariableStatement","diagnostics","isIdentifier","ALLOWED_EXPORTS","includes","file","category","DiagnosticCategory","Error","code","NEXT_TS_ERRORS","INVALID_ENTRY_EXPORT","messageText","displayedValue","errorMessage","isInvalid","isNoSubstitutionTemplateLiteral","val","allowedValues","filter","test","isNumericLiteral","isPrefixUnaryExpression","isMinusToken","operator","operand","TrueKeyword","FalseKeyword","isArrayLiteralExpression","stringify","e","isBigIntLiteral","isObjectLiteralExpression","isRegularExpressionLiteral","INVALID_OPTION_VALUE","LEGACY_CONFIG_EXPORT","prop","properties","isPropertyAssignment","INVALID_CONFIG_OPTION"],"mappings":"AAAA,4EAA4E;;;;;+BAyoB5E;;;eAAA;;;uBAloBO;0BAKA;AAIP,MAAMA,WAWF;IACFC,SAAS;QACPC,aACE;QACFC,SAAS;YACP,UACE;YACF,mBACE;YACF,WACE;YACF,kBACE;QACJ;QACAC,MAAM;IACR;IACAC,YAAY;QACVH,aACE;QACFC,SAAS;YACP,oBACE;YACF,mBACE;YACF,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,IAAIrF,SAAS+B,GAAG2H,yBAAyB,CAAC1J,QAAQ;4BAChD,KAAK,MAAM8J,QAAQ9J,MAAM+J,UAAU,CAAE;gCACnC,IACEhI,GAAGiI,oBAAoB,CAACF,SACxB/H,GAAG6F,YAAY,CAACkC,KAAK9G,IAAI,KACzB8G,KAAK9G,IAAI,CAACD,IAAI,KAAK,OACnB;oCACA4E,YAAY3C,IAAI,CAAC;wCACf+C,MAAMlG;wCACNmG,UAAUjG,GAAGkG,kBAAkB,CAACC,KAAK;wCACrCC,MAAMC,wBAAc,CAAC6B,qBAAqB;wCAC1C3B,aAAa,CAAC,0HAA0H,CAAC;wCACzI5C,OAAOoE,KAAKnE,QAAQ;wCACpBC,QAAQkE,KAAKjE,QAAQ;oCACvB;gCACF;4BACF;wBACF;oBACF;gBACF;YACF;QACF;QAEA,OAAO8B;IACT;AACF;MAEA,WAAe/C","ignoreList":[0]}
|
@@ -22,7 +22,7 @@ _export(exports, {
|
|
22
22
|
});
|
23
23
|
function isStableBuild() {
|
24
24
|
var _process_env___NEXT_VERSION;
|
25
|
-
return !((_process_env___NEXT_VERSION = "15.5.1-canary.
|
25
|
+
return !((_process_env___NEXT_VERSION = "15.5.1-canary.17") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
|
26
26
|
}
|
27
27
|
class CanaryOnlyError extends Error {
|
28
28
|
constructor(arg){
|
@@ -11,11 +11,11 @@ Object.defineProperty(exports, "eventCliSessionStopped", {
|
|
11
11
|
const EVENT_VERSION = 'NEXT_CLI_SESSION_STOPPED';
|
12
12
|
function eventCliSessionStopped(event) {
|
13
13
|
// This should be an invariant, if it fails our build tooling is broken.
|
14
|
-
if (typeof "15.5.1-canary.
|
14
|
+
if (typeof "15.5.1-canary.17" !== 'string') {
|
15
15
|
return [];
|
16
16
|
}
|
17
17
|
const payload = {
|
18
|
-
nextVersion: "15.5.1-canary.
|
18
|
+
nextVersion: "15.5.1-canary.17",
|
19
19
|
nodeVersion: process.version,
|
20
20
|
cliCommand: event.cliCommand,
|
21
21
|
durationMilliseconds: event.durationMilliseconds,
|
@@ -36,12 +36,12 @@ function hasBabelConfig(dir) {
|
|
36
36
|
function eventCliSession(dir, nextConfig, event) {
|
37
37
|
var _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_experimental_reactCompiler, _nextConfig_experimental_reactCompiler1;
|
38
38
|
// This should be an invariant, if it fails our build tooling is broken.
|
39
|
-
if (typeof "15.5.1-canary.
|
39
|
+
if (typeof "15.5.1-canary.17" !== 'string') {
|
40
40
|
return [];
|
41
41
|
}
|
42
42
|
const { images, i18n } = nextConfig || {};
|
43
43
|
const payload = {
|
44
|
-
nextVersion: "15.5.1-canary.
|
44
|
+
nextVersion: "15.5.1-canary.17",
|
45
45
|
nodeVersion: process.version,
|
46
46
|
cliCommand: event.cliCommand,
|
47
47
|
isSrcDir: event.isSrcDir,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "next",
|
3
|
-
"version": "15.5.1-canary.
|
3
|
+
"version": "15.5.1-canary.17",
|
4
4
|
"description": "The React Framework",
|
5
5
|
"main": "./dist/server/next.js",
|
6
6
|
"license": "MIT",
|
@@ -102,7 +102,7 @@
|
|
102
102
|
]
|
103
103
|
},
|
104
104
|
"dependencies": {
|
105
|
-
"@next/env": "15.5.1-canary.
|
105
|
+
"@next/env": "15.5.1-canary.17",
|
106
106
|
"@swc/helpers": "0.5.15",
|
107
107
|
"caniuse-lite": "^1.0.30001579",
|
108
108
|
"postcss": "8.4.31",
|
@@ -132,14 +132,14 @@
|
|
132
132
|
},
|
133
133
|
"optionalDependencies": {
|
134
134
|
"sharp": "^0.34.3",
|
135
|
-
"@next/swc-darwin-arm64": "15.5.1-canary.
|
136
|
-
"@next/swc-darwin-x64": "15.5.1-canary.
|
137
|
-
"@next/swc-linux-arm64-gnu": "15.5.1-canary.
|
138
|
-
"@next/swc-linux-arm64-musl": "15.5.1-canary.
|
139
|
-
"@next/swc-linux-x64-gnu": "15.5.1-canary.
|
140
|
-
"@next/swc-linux-x64-musl": "15.5.1-canary.
|
141
|
-
"@next/swc-win32-arm64-msvc": "15.5.1-canary.
|
142
|
-
"@next/swc-win32-x64-msvc": "15.5.1-canary.
|
135
|
+
"@next/swc-darwin-arm64": "15.5.1-canary.17",
|
136
|
+
"@next/swc-darwin-x64": "15.5.1-canary.17",
|
137
|
+
"@next/swc-linux-arm64-gnu": "15.5.1-canary.17",
|
138
|
+
"@next/swc-linux-arm64-musl": "15.5.1-canary.17",
|
139
|
+
"@next/swc-linux-x64-gnu": "15.5.1-canary.17",
|
140
|
+
"@next/swc-linux-x64-musl": "15.5.1-canary.17",
|
141
|
+
"@next/swc-win32-arm64-msvc": "15.5.1-canary.17",
|
142
|
+
"@next/swc-win32-x64-msvc": "15.5.1-canary.17"
|
143
143
|
},
|
144
144
|
"devDependencies": {
|
145
145
|
"@ampproject/toolbox-optimizer": "2.8.3",
|
@@ -174,11 +174,11 @@
|
|
174
174
|
"@jest/types": "29.5.0",
|
175
175
|
"@mswjs/interceptors": "0.23.0",
|
176
176
|
"@napi-rs/triples": "1.2.0",
|
177
|
-
"@next/font": "15.5.1-canary.
|
178
|
-
"@next/polyfill-module": "15.5.1-canary.
|
179
|
-
"@next/polyfill-nomodule": "15.5.1-canary.
|
180
|
-
"@next/react-refresh-utils": "15.5.1-canary.
|
181
|
-
"@next/swc": "15.5.1-canary.
|
177
|
+
"@next/font": "15.5.1-canary.17",
|
178
|
+
"@next/polyfill-module": "15.5.1-canary.17",
|
179
|
+
"@next/polyfill-nomodule": "15.5.1-canary.17",
|
180
|
+
"@next/react-refresh-utils": "15.5.1-canary.17",
|
181
|
+
"@next/swc": "15.5.1-canary.17",
|
182
182
|
"@opentelemetry/api": "1.6.0",
|
183
183
|
"@playwright/test": "1.51.1",
|
184
184
|
"@rspack/core": "1.5.0",
|