remove cross-spawn

This commit is contained in:
JeanOUINA 2021-04-29 16:21:11 +02:00
parent 0367814ebe
commit ee4e1a5ba5
No known key found for this signature in database
GPG Key ID: 7387E30D642FF8B7
7 changed files with 1625 additions and 980 deletions

View File

@ -5464,10 +5464,8 @@
"integrity": "sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg==", "integrity": "sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"chokidar": "^3.4.1",
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
"neo-async": "^2.5.0", "neo-async": "^2.5.0"
"watchpack-chokidar2": "^2.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"chokidar": "^3.4.1", "chokidar": "^3.4.1",

View File

@ -3471,7 +3471,6 @@
"minimist": "^1.2.5", "minimist": "^1.2.5",
"neo-async": "^2.6.0", "neo-async": "^2.6.0",
"source-map": "^0.6.1", "source-map": "^0.6.1",
"uglify-js": "^3.1.4",
"wordwrap": "^1.0.0" "wordwrap": "^1.0.0"
}, },
"bin": { "bin": {
@ -6731,10 +6730,8 @@
"integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==", "integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"chokidar": "^3.4.0",
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
"neo-async": "^2.5.0", "neo-async": "^2.5.0"
"watchpack-chokidar2": "^2.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"chokidar": "^3.4.0", "chokidar": "^3.4.0",

View File

@ -690,6 +690,11 @@
"safer-buffer": "^2.0.2", "safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0" "tweetnacl": "~0.14.0"
}, },
"bin": {
"sshpk-conv": "bin/sshpk-conv",
"sshpk-sign": "bin/sshpk-sign",
"sshpk-verify": "bin/sshpk-verify"
},
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
} }

View File

@ -238,9 +238,6 @@
}, },
"engines": { "engines": {
"node": ">=8" "node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/inherits": { "node_modules/inherits": {

2569
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -44,9 +44,8 @@
"@types/uuid": "^8.0.0", "@types/uuid": "^8.0.0",
"@types/yauzl": "^2.9.1", "@types/yauzl": "^2.9.1",
"asar": "^3.0.3", "asar": "^3.0.3",
"cross-spawn": "^7.0.3",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"electron": "^9.3.1", "electron": "^9.4.4",
"electron-builder": "^22.8.0", "electron-builder": "^22.8.0",
"fast-glob": "^3.2.4", "fast-glob": "^3.2.4",
"fs-extra": "^9.0.1", "fs-extra": "^9.0.1",

View File

@ -3,14 +3,12 @@ const { join } = require("path")
const PROJECT_DIRNAME=join(__dirname, "..") const PROJECT_DIRNAME=join(__dirname, "..")
const child_process = require("child_process") const child_process = require("child_process")
let env = process.env
function spawnProcess(cmd, ...args) { function spawnProcess(cmd, ...args) {
const postfix = cmd === "node" ? ".exe" : ".cmd" const postfix = cmd === "node" ? ".exe" : ".cmd"
cmd = process.platform === "win32" ? cmd + postfix : cmd cmd = process.platform === "win32" ? cmd + postfix : cmd
let result = child_process.spawnSync(cmd, args, { let result = child_process.spawnSync(cmd, args, {
cwd: PROJECT_DIRNAME, cwd: PROJECT_DIRNAME,
env: env, env: process.env,
stdio: "inherit" stdio: "inherit"
}) })
if (result.error){ if (result.error){
@ -21,18 +19,12 @@ function spawnProcess(cmd, ...args) {
} }
} }
let result;
spawnProcess("npm", "rm", "electron") spawnProcess("npm", "rm", "electron")
spawnProcess("npm", "i") spawnProcess("npm", "i")
if (process.platform === "win32"){ const arch = process.platform === "win32" ? "ia32" : "x64"
result = spawnProcess("npm", "i", "--save-dev", "--arch=ia32", "electron@9") spawnProcess("npm", "i", "--save-dev", "--arch="+arch, "electron@9")
} else {
result = spawnProcess("npm", "i", "--save-dev", "--arch=x64", "electron@9")
}
let runString = "`npm test`"
spawnProcess("node", join(PROJECT_DIRNAME, "scripts", "installSubModules.js")) spawnProcess("node", join(PROJECT_DIRNAME, "scripts", "installSubModules.js"))
console.log("Everything is installed. You should be able to do "+runString+" to compile everything and launch.") console.log("Everything is installed. You should be able to do `npm test` to compile everything and launch.")