]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: use consistent ts-check comments in scripts
authorEvan You <yyx990803@gmail.com>
Fri, 3 Feb 2023 10:24:03 +0000 (18:24 +0800)
committerEvan You <yyx990803@gmail.com>
Fri, 3 Feb 2023 10:24:03 +0000 (18:24 +0800)
scripts/build.js
scripts/dev.js
scripts/pre-dev-sfc.js
scripts/preinstall.js
scripts/utils.js
scripts/verifyCommit.js

index 0a014c9406b80cdff538506add8d7cf34afa7463..6951c396175c8cfd1883340a4b5e5d46d33d6060 100644 (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'
index 596bea84f80637238f180a53bed8c3e5815336cf..d3dc9311717048f02399f308ca508c2ad1436a0f 100644 (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'
index e1f30d54799d98984cd5e82e76c06da92c260fc1..b9b3a534460e46e535ccb94026dddfa238c15a60 100644 (file)
@@ -1,3 +1,4 @@
+// @ts-check
 import fs from 'node:fs'
 
 const packagesToCheck = [
index a1269cc0a7c6d256a84627ae3c9c0cc50d0ed2d5..05823d5f5d0dd83db894775d008664f739a1be9d 100644 (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 ` +
index dcd03505be057aabf9b66cb0746279e0d669023c..b58f25a133362c386936860dd16e27c9b4e3e818 100644 (file)
@@ -1,3 +1,4 @@
+// @ts-check
 import fs from 'node:fs'
 import chalk from 'chalk'
 import { createRequire } from 'node:module'
index 81512ab920eff7830b02587ad4386f75d87634d3..4c1a2828bb8ba595fe83377ad79c67e10aab78c0 100644 (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 =