chore: use consistent ts-check comments in scripts

This commit is contained in:
Evan You 2023-02-03 18:24:03 +08:00
parent 7694ab9f67
commit a871fd0cc0
6 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,5 @@
// @ts-check
/*
Produces production builds and stitches together d.ts files.
@ -14,11 +16,9 @@ nr build core --formats cjs
```
*/
// @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'

View File

@ -1,8 +1,9 @@
// @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'

View File

@ -1,3 +1,4 @@
// @ts-check
import fs from 'node:fs'
const packagesToCheck = [

View File

@ -1,3 +1,4 @@
// @ts-check
if (!/pnpm/.test(process.env.npm_execpath || '')) {
console.warn(
`\u001b[33mThis repository requires using pnpm as the package manager ` +

View File

@ -1,3 +1,4 @@
// @ts-check
import fs from 'node:fs'
import chalk from 'chalk'
import { createRequire } from 'node:module'

View File

@ -1,10 +1,9 @@
// @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 =