]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
refactor: use 'node:' protocols for Node.js built-in module imports
authorHaoqun Jiang <haoqunjiang@gmail.com>
Mon, 18 Jul 2022 07:31:40 +0000 (15:31 +0800)
committerHaoqun Jiang <haoqunjiang@gmail.com>
Mon, 18 Jul 2022 07:31:40 +0000 (15:31 +0800)
index.ts
template/base/vite.config.js
template/config/jsx/vite.config.js
utils/directoryTraverse.ts
utils/renderEslint.ts
utils/renderTemplate.ts

index 5c1ffc4012030aad6804eeffe46530aca2fce9dd..a843b143af1416f484133ae641edd60e06d08dd7 100755 (executable)
--- a/index.ts
+++ b/index.ts
@@ -1,7 +1,7 @@
 #!/usr/bin/env node
 
-import * as fs from 'fs'
-import * as path from 'path'
+import * as fs from 'node:fs'
+import * as path from 'node:path'
 
 import minimist from 'minimist'
 import prompts from 'prompts'
index 116273fb2ebd4799396f5a094ea75751c14f53c4..de5cb31c632332a5867502004ce2ade73d9df29f 100644 (file)
@@ -1,4 +1,4 @@
-import { fileURLToPath, URL } from 'url'
+import { fileURLToPath, URL } from 'node:url'
 
 import { defineConfig } from 'vite'
 import vue from '@vitejs/plugin-vue'
index db4edfd92d6a565bc3a3271f2e605431dd3f9715..2fb21e9174c237c04c96a608d2fc88b0e826a409 100644 (file)
@@ -1,4 +1,4 @@
-import { fileURLToPath, URL } from 'url'
+import { fileURLToPath, URL } from 'node:url'
 
 import { defineConfig } from 'vite'
 import vue from '@vitejs/plugin-vue'
index 84f805f8d960d77c5be99866805c0e0422fa8a36..d48d9f460dd4c2b2d02097a6b125204f16392497 100644 (file)
@@ -1,5 +1,5 @@
-import * as fs from 'fs'
-import * as path from 'path'
+import * as fs from 'node:fs'
+import * as path from 'node:path'
 
 export function preOrderDirectoryTraverse(dir, dirCallback, fileCallback) {
   for (const filename of fs.readdirSync(dir)) {
index a4502045c536efb37eb817dd161a20af240932c2..dc4c7a5e9f0a413fccf2a65a833b6a65db995323 100644 (file)
@@ -1,5 +1,5 @@
-import * as fs from 'fs'
-import * as path from 'path'
+import * as fs from 'node:fs'
+import * as path from 'node:path'
 
 import type { Linter } from 'eslint'
 
index 971471434f351d030fd938dbfcd70c7d69a059f6..23535ff9a63fc6192b02c25cf4f8bfd072b11685 100644 (file)
@@ -1,5 +1,5 @@
-import * as fs from 'fs'
-import * as path from 'path'
+import * as fs from 'node:fs'
+import * as path from 'node:path'
 
 import deepMerge from './deepMerge'
 import sortDependencies from './sortDependencies'