Skip to content

Commit

Permalink
chore: make build script node 18 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Dec 13, 2024
1 parent 1c532a7 commit 340ec41
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 56 deletions.
101 changes: 49 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions scripts/referenceEventTypings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import {copyFile, readdir, readFile, writeFile} from 'node:fs/promises'
import {join as joinPath} from 'node:path'
import {dirname, join as joinPath} from 'node:path'
import {fileURLToPath} from 'node:url'

const rootDir = joinPath(dirname(fileURLToPath(import.meta.url)), '..')
const distDir = joinPath(rootDir, 'dist')
const srcDir = joinPath(rootDir, 'src')

const referenceDirective = `/// <reference path="events.d.ts" />`

Expand All @@ -16,9 +21,6 @@ const referenceDirective = `/// <reference path="events.d.ts" />`
* directly, so we have to do this as a post-build step.
*/
async function referenceEventTypings() {
const distDir = joinPath(import.meta.dirname, '..', 'dist')
const srcDir = joinPath(import.meta.dirname, '..', 'src')

const entries = await readdir(distDir)

const typeEntries = entries.filter(
Expand Down

0 comments on commit 340ec41

Please sign in to comment.