diff --git a/src/config.ts b/src/config.ts deleted file mode 100644 index 1ddb953..0000000 --- a/src/config.ts +++ /dev/null @@ -1,46 +0,0 @@ -import yn from 'yn'; -import { Config, Env } from '@vercel/build-utils'; - -export function configBool( - config: Config, - configName: string, - env: Env, - envName: string -): boolean | undefined { - const configVal = config[configName]; - if (typeof configVal === 'boolean') { - return configVal; - } - - if (typeof configVal === 'string' || typeof configVal === 'number') { - const d = yn(configVal); - if (typeof d === 'boolean') { - return d; - } - } - - const envVal = env[envName]; - if (typeof envVal === 'string') { - const d = yn(envVal); - if (typeof d === 'boolean') { - return d; - } - } -} - -export function configString( - config: Config, - configName: string, - env: Env, - envName: string -): string | undefined { - const configVal = config[configName]; - if (typeof configVal === 'string') { - return configVal; - } - - const envVal = env[envName]; - if (typeof envVal === 'string') { - return envVal; - } -} diff --git a/src/start-dev-server.ts b/src/start-dev-server.ts index b96f80e..b6b1322 100644 --- a/src/start-dev-server.ts +++ b/src/start-dev-server.ts @@ -31,26 +31,8 @@ function isReadable(v: any): v is Readable { export const startDevServer: StartDevServer = async ({ entrypoint, workPath, - config, meta = {}, }) => { - // @deprecated - const unstable = - configBool( - config, - 'denoUnstable', - meta.buildEnv || {}, - 'DENO_UNSTABLE' - ) || false; - - // @deprecated - const denoTsConfig = configString( - config, - 'tsconfig', - meta.buildEnv || {}, - 'DENO_TSCONFIG' - ); - const portFile = join( TMP, `vercel-deno-port-${Math.random().toString(32).substring(2)}` @@ -68,12 +50,6 @@ export const startDevServer: StartDevServer = async ({ const args = shebang.parse(await readFile(absEntrypoint, 'utf8')); - // @deprecated - if (unstable) { - console.log('DENO_UNSTABLE env var is deprecated'); - args['--unstable'] = true; - } - // Flags that accept file paths are relative to the entrypoint in // the source file, but `deno run` is executed at the root directory // of the project, so the arguments need to be relativized to the root @@ -89,12 +65,6 @@ export const startDevServer: StartDevServer = async ({ } } - // @deprecated - if (denoTsConfig && !args['--config']) { - console.log('DENO_TSCONFIG env var is deprecated'); - args['--config'] = denoTsConfig; - } - const argv = [ 'run', '--allow-all',