@arianrhodsandlot/vite-plus-config 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "vp pack",
|
|
31
|
-
"postinstall": "node scripts/postinstall.
|
|
31
|
+
"postinstall": "node scripts/postinstall.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@arianrhodsandlot/oxc-config": "^1.2.3",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"vite-plus": "0.1.20"
|
|
41
41
|
},
|
|
42
42
|
"packageManager": "pnpm@11.0.8",
|
|
43
|
-
"version": "1.2.
|
|
43
|
+
"version": "1.2.2"
|
|
44
44
|
}
|
|
@@ -7,7 +7,7 @@ const execAsync = promisify(exec)
|
|
|
7
7
|
|
|
8
8
|
const cwd = process.env.INIT_CWD || process.cwd()
|
|
9
9
|
|
|
10
|
-
async function shouldSkip()
|
|
10
|
+
async function shouldSkip() {
|
|
11
11
|
const envOptOut = process.env.SKIP_VITE_PLUS_CONFIG_HOOK
|
|
12
12
|
if (envOptOut === '1' || envOptOut === 'true') {
|
|
13
13
|
return true
|
|
@@ -45,7 +45,7 @@ async function shouldSkip(): Promise<boolean> {
|
|
|
45
45
|
return false
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
async function pathExists(path
|
|
48
|
+
async function pathExists(path) {
|
|
49
49
|
try {
|
|
50
50
|
await access(path, constants.F_OK)
|
|
51
51
|
return true
|
|
@@ -59,14 +59,14 @@ async function main() {
|
|
|
59
59
|
return
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
let hooksDir
|
|
62
|
+
let hooksDir
|
|
63
63
|
|
|
64
64
|
try {
|
|
65
65
|
const { stdout } = await execAsync('git rev-parse --git-path hooks', {
|
|
66
66
|
cwd,
|
|
67
67
|
encoding: 'utf8',
|
|
68
68
|
})
|
|
69
|
-
hooksDir = stdout.trim()
|
|
69
|
+
hooksDir = resolve(cwd, stdout.trim())
|
|
70
70
|
} catch {}
|
|
71
71
|
|
|
72
72
|
if (!hooksDir) {
|