Skip to content

Commit

Permalink
chore: fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Oct 24, 2022
1 parent 4d7ae84 commit c26f8ea
Show file tree
Hide file tree
Showing 6 changed files with 2,457 additions and 2,184 deletions.
4 changes: 2 additions & 2 deletions node/bundler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { join, resolve } from 'path'
import process from 'process'
import { pathToFileURL } from 'url'

import del from 'del'
import { deleteAsync } from 'del'
import tmp from 'tmp-promise'
import { test, expect } from 'vitest'

Expand Down Expand Up @@ -324,5 +324,5 @@ test('Ignores any user-defined `deno.json` files', async () => {
}),
).not.toThrow()

await del([tmpDir.path, denoConfigPath, importMapFile.path], { force: true })
await deleteAsync([tmpDir.path, denoConfigPath, importMapFile.path], { force: true })
})
6 changes: 3 additions & 3 deletions node/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { promises as fs } from 'fs'
import { join, resolve } from 'path'
import { pathToFileURL } from 'url'

import del from 'del'
import { deleteAsync } from 'del'
import { stub } from 'sinon'
import tmp from 'tmp-promise'
import { test, expect } from 'vitest'
Expand Down Expand Up @@ -77,7 +77,7 @@ test('`getFunctionConfig` extracts configuration properties from function file',
name: 'func5',
source: `
export default async () => new Response("Hello from function two")
export const config = () => {
throw new Error('uh-oh')
}
Expand Down Expand Up @@ -141,7 +141,7 @@ test('`getFunctionConfig` extracts configuration properties from function file',
}
}

await del(tmpDir, { force: true })
await deleteAsync(tmpDir, { force: true })
})

test('Ignores function paths from the in-source `config` function if the feature flag is off', async () => {
Expand Down
4 changes: 2 additions & 2 deletions node/formats/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { join } from 'path'
import { env } from 'process'
import { pathToFileURL } from 'url'

import del from 'del'
import { deleteAsync } from 'del'

import { DenoBridge } from '../bridge.js'
import type { Bundle } from '../bundle.js'
Expand Down Expand Up @@ -76,7 +76,7 @@ const generateStage2 = async ({
functions,
type = 'production',
}: GenerateStage2Options) => {
await del(distDirectory, { force: true })
await deleteAsync(distDirectory, { force: true })
await fs.mkdir(distDirectory, { recursive: true })

const entryPoint =
Expand Down
4 changes: 2 additions & 2 deletions node/stage_2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { join } from 'path'
import process from 'process'
import { pathToFileURL } from 'url'

import del from 'del'
import { deleteAsync } from 'del'
import { execa } from 'execa'
import tmp from 'tmp-promise'
import { test, expect } from 'vitest'
Expand Down Expand Up @@ -61,6 +61,6 @@ test('`getLocalEntryPoint` returns a valid stage 2 file for local development',
expect(metadata.functions[func.name].url).toBe(pathToFileURL(func.path).toString())
}

await del(tmpDir, { force: true })
await deleteAsync(tmpDir, { force: true })
delete process.env.NETLIFY_EDGE_BOOTSTRAP
})

0 comments on commit c26f8ea

Please sign in to comment.