Unverified Commit b35c278f authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

Mark unsupported NFT options

Co-authored-by: 's avatarNiklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
parent 018e4bc2
...@@ -59,65 +59,69 @@ const native = require( ...@@ -59,65 +59,69 @@ const native = require(
path.join(__dirname, '..', 'native', `turbopack-nft.${nativePlatform()}.node`) path.join(__dirname, '..', 'native', `turbopack-nft.${nativePlatform()}.node`)
) as NativeBinding ) as NativeBinding
export interface Stats { // Unsupported option reference type:
isFile(): boolean // export interface Stats {
isDirectory(): boolean // isFile(): boolean
isBlockDevice(): boolean // isDirectory(): boolean
isCharacterDevice(): boolean // isBlockDevice(): boolean
isSymbolicLink(): boolean // isCharacterDevice(): boolean
isFIFO(): boolean // isSymbolicLink(): boolean
isSocket(): boolean // isFIFO(): boolean
dev: number // isSocket(): boolean
ino: number // dev: number
mode: number // ino: number
nlink: number // mode: number
uid: number // nlink: number
gid: number // uid: number
rdev: number // gid: number
size: number // rdev: number
blksize: number // size: number
blocks: number // blksize: number
atimeMs: number // blocks: number
mtimeMs: number // atimeMs: number
ctimeMs: number // mtimeMs: number
birthtimeMs: number // ctimeMs: number
atime: Date // birthtimeMs: number
mtime: Date // atime: Date
ctime: Date // mtime: Date
birthtime: Date // ctime: Date
} // birthtime: Date
// }
export interface NodeFileTraceOptions { export interface NodeFileTraceOptions {
base?: string base?: string
processCwd?: string processCwd?: string
exports?: string[] ignore?: (path: string) => boolean
conditions?: string[]
exportsOnly?: boolean
moduleSyncCatchall?: boolean
ignore?: string | string[] | ((path: string) => boolean)
analysis?:
| boolean
| {
emitGlobs?: boolean
computeFileReferences?: boolean
evaluatePureExpressions?: boolean
}
cache?: any
paths?: Record<string, string>
ts?: boolean
log?: boolean log?: boolean
mixedModules?: boolean
readFile?: (path: string) => Promise<Buffer | string | null> // Unsupported @vercel/nft options:
stat?: (path: string) => Promise<Stats | null> // exports?: string[]
readlink?: (path: string) => Promise<string | null> // conditions?: string[]
resolve?: ( // exportsOnly?: boolean
id: string, // moduleSyncCatchall?: boolean
parent: string, // ignore?: string | string[]
job: unknown, // analysis?:
cjsResolve: boolean // | boolean
) => Promise<string | string[]> // | {
fileIOConcurrency?: number // emitGlobs?: boolean
depth?: number // computeFileReferences?: boolean
// evaluatePureExpressions?: boolean
// }
// cache?: any
// paths?: Record<string, string>
// ts?: boolean
// mixedModules?: boolean
// readFile?: (path: string) => Promise<Buffer | string | null>
// stat?: (path: string) => Promise<Stats | null>
// readlink?: (path: string) => Promise<string | null>
// resolve?: (
// id: string,
// parent: string,
// job: unknown,
// cjsResolve: boolean
// ) => Promise<string | string[]>
// fileIOConcurrency?: number
// depth?: number
} }
export type NodeFileTraceReasonType = export type NodeFileTraceReasonType =
...@@ -183,7 +187,7 @@ export async function nodeFileTrace( ...@@ -183,7 +187,7 @@ export async function nodeFileTrace(
absoluteFiles.map((file) => path.relative(projectRoot, file)), absoluteFiles.map((file) => path.relative(projectRoot, file)),
false, false,
Boolean(opts.log), Boolean(opts.log),
opts.depth undefined
) )
const initialFiles = new Set( const initialFiles = new Set(
......
...@@ -80,10 +80,7 @@ for (const testName of passingCases) { ...@@ -80,10 +80,7 @@ for (const testName of passingCases) {
const result = await nodeFileTrace([path.join(caseDirectory, 'input.js')], { const result = await nodeFileTrace([path.join(caseDirectory, 'input.js')], {
base: fixtureRoot, base: fixtureRoot,
processCwd: caseDirectory, processCwd: caseDirectory,
ts: true,
log: false, log: false,
analysis: true,
mixedModules: true,
ignore: (file) => file.endsWith('/actual.js'), ignore: (file) => file.endsWith('/actual.js'),
}) })
......
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