+// @ts-check
+
/*
Produces production builds and stitches together d.ts files.
```
*/
-// @ts-check
import fs from 'node:fs/promises'
import { existsSync, readFileSync } from 'node:fs'
import path from 'node:path'
-import { fileURLToPath } from 'node:url'
import minimist from 'minimist'
import { gzipSync } from 'node:zlib'
import { compress } from 'brotli'
+// @ts-check
+
// Using esbuild for faster dev builds.
// We are still using Rollup for production builds because it generates
// smaller files w/ better tree-shaking.
-// @ts-check
import esbuild from 'esbuild'
import { resolve, relative, dirname } from 'node:path'
import { fileURLToPath } from 'node:url'
+// @ts-check
import fs from 'node:fs'
const packagesToCheck = [
+// @ts-check
if (!/pnpm/.test(process.env.npm_execpath || '')) {
console.warn(
`\u001b[33mThis repository requires using pnpm as the package manager ` +
+// @ts-check
import fs from 'node:fs'
import chalk from 'chalk'
import { createRequire } from 'node:module'
+// @ts-check
import chalk from 'chalk'
import { readFileSync } from 'fs'
import path from 'path'
-import { fileURLToPath } from 'url'
-const dirname = path.dirname(fileURLToPath(import.meta.url), '..')
-const msgPath = path.resolve(dirname, '../.git/COMMIT_EDITMSG')
+const msgPath = path.resolve('.git/COMMIT_EDITMSG')
const msg = readFileSync(msgPath, 'utf-8').trim()
const commitRE =