Skip to content

Commit 7eaa356

Browse files
committed
upgrade deps
1 parent b7dbf2f commit 7eaa356

6 files changed

Lines changed: 1747 additions & 674 deletions

File tree

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nodegui/packer",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"files": [
55
"dist",
66
"template",
@@ -19,19 +19,19 @@
1919
"author": "atulanand94@gmail.com",
2020
"license": "MIT",
2121
"devDependencies": {
22-
"@nodegui/nodegui": "^0.15.0-alpha-4",
23-
"@types/fs-extra": "^8.0.0",
24-
"@types/node": "^13.9.0",
22+
"@nodegui/nodegui": "^0.39.1",
23+
"@types/fs-extra": "^9.0.13",
24+
"@types/node": "^16.10.2",
2525
"@types/plist": "^3.0.2",
26-
"typescript": "^3.5.3"
26+
"typescript": "^4.4.3"
2727
},
2828
"peerDependencies": {
2929
"@nodegui/nodegui": ">=0.15.0"
3030
},
3131
"dependencies": {
32-
"@nodegui/artifact-installer": "^1.0.0",
32+
"@nodegui/artifact-installer": "^1.1.0",
3333
"commander": "^4.0.1",
34-
"fs-extra": "^8.1.0",
35-
"plist": "^3.0.1"
34+
"fs-extra": "^10.0.0",
35+
"plist": "^3.0.4"
3636
}
3737
}

src/darwin/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export async function runMacDeployQt({
6464
`${appName}.app`,
6565
"-verbose=3",
6666
`-libpath=${qode.qtHome}`,
67-
'-dmg',
67+
"-dmg",
6868
...addonCommands(allAddons),
6969
];
7070

@@ -81,7 +81,7 @@ export async function runMacDeployQt({
8181

8282
macDeployQt.on("exit", function (code) {
8383
if (!code) {
84-
return resolve();
84+
return resolve(true);
8585
}
8686
return reject("child process exited with code " + code);
8787
});

src/linux/index.ts

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ import { qtHome } from "@nodegui/nodegui/config/qtConfig";
88
const cwd = process.cwd();
99
const deployDirectory = path.resolve(cwd, "deploy");
1010
const configFile = path.resolve(deployDirectory, "config.json");
11-
const linuxDeployQtBin = path.resolve(__dirname, "..", "..", "deps", "linuxdeployqt");
11+
const linuxDeployQtBin = path.resolve(
12+
__dirname,
13+
"..",
14+
"..",
15+
"deps",
16+
"linuxdeployqt"
17+
);
1218

1319
const copyQode = async (dest: string) => {
1420
const qodeBinaryFile = qode.qodePath;
@@ -18,16 +24,16 @@ const copyQode = async (dest: string) => {
1824

1925
const copyAppDist = async (distPath: string, resourceDir: string) => {
2026
await fs.copy(distPath, path.resolve(resourceDir, "dist"), {
21-
recursive: true
27+
recursive: true,
2228
});
2329
};
2430

2531
function getAllNodeAddons(dirPath: string) {
2632
const addonExt = "node";
2733
let dir = fs.readdirSync(dirPath);
2834
return dir
29-
.filter(elm => elm.match(new RegExp(`.*\.(${addonExt}$)`, "ig")))
30-
.map(eachElement => path.resolve(dirPath, eachElement));
35+
.filter((elm) => elm.match(new RegExp(`.*\.(${addonExt}$)`, "ig")))
36+
.map((eachElement) => path.resolve(dirPath, eachElement));
3137
}
3238

3339
const addonCommands = (addonPaths: string[]): string[] => {
@@ -37,12 +43,10 @@ const addonCommands = (addonPaths: string[]): string[] => {
3743
}, []);
3844
};
3945

40-
4146
const runLinuxDeployQt = async (appName: string, buildDir: string) => {
42-
4347
const distPath = path.resolve(buildDir, "dist");
4448
const allAddons = getAllNodeAddons(distPath);
45-
const LD_LIBRARY_PATH=`${qtHome}/lib:${process.env.LD_LIBRARY_PATH}`;
49+
const LD_LIBRARY_PATH = `${qtHome}/lib:${process.env.LD_LIBRARY_PATH}`;
4650

4751
const linuxDeployQt = spawn(
4852
linuxDeployQtBin,
@@ -52,23 +56,23 @@ const runLinuxDeployQt = async (appName: string, buildDir: string) => {
5256
"-bundle-non-qt-libs",
5357
"-appimage",
5458
`-qmake=${path.resolve(qtHome, "bin", "qmake")}`,
55-
...addonCommands(allAddons)
59+
...addonCommands(allAddons),
5660
],
57-
{ cwd: buildDir, env: {...process.env, LD_LIBRARY_PATH} }
61+
{ cwd: buildDir, env: { ...process.env, LD_LIBRARY_PATH } }
5862
);
5963

6064
return new Promise((resolve, reject) => {
61-
linuxDeployQt.stdout.on("data", function(data) {
65+
linuxDeployQt.stdout.on("data", function (data) {
6266
console.log("stdout: " + data.toString());
6367
});
6468

65-
linuxDeployQt.stderr.on("data", function(data) {
69+
linuxDeployQt.stderr.on("data", function (data) {
6670
console.log("stderr: " + data.toString());
6771
});
6872

69-
linuxDeployQt.on("exit", function(code) {
73+
linuxDeployQt.on("exit", function (code) {
7074
if (!code) {
71-
return resolve();
75+
return resolve(true);
7276
}
7377
return reject("child process exited with code " + code);
7478
});
@@ -77,7 +81,7 @@ const runLinuxDeployQt = async (appName: string, buildDir: string) => {
7781

7882
export const init = async (appName: string) => {
7983
const config = {
80-
appName: null
84+
appName: null,
8185
};
8286
const templateDirectory = path.resolve(__dirname, "../../template/linux");
8387
const userTemplate = path.resolve(deployDirectory, "linux");
@@ -108,5 +112,7 @@ export const pack = async (distPath: string) => {
108112
await copyAppDist(distPath, buildAppPackage);
109113
console.log(`running linuxdeployqt`);
110114
await runLinuxDeployQt(appName, buildAppPackage);
111-
console.log(`Build successful. Find the AppImage at ${buildAppPackage}. Look for an executable file with extension .AppImage`);
115+
console.log(
116+
`Build successful. Find the AppImage at ${buildAppPackage}. Look for an executable file with extension .AppImage`
117+
);
112118
};

src/win32/index.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ const copyQode = async (dest: string) => {
2020

2121
const copyAppDist = async (distPath: string, resourceDir: string) => {
2222
await fs.copy(distPath, path.resolve(resourceDir, "dist"), {
23-
recursive: true
23+
recursive: true,
2424
});
2525
};
2626

2727
function getAllNodeAddons(dirPath: string) {
2828
const addonExt = "node";
2929
let dir = fs.readdirSync(dirPath);
3030
return dir
31-
.filter(elm => elm.match(new RegExp(`.*\.(${addonExt}$)`, "ig")))
32-
.map(eachElement => path.resolve(dirPath, eachElement));
31+
.filter((elm) => elm.match(new RegExp(`.*\.(${addonExt}$)`, "ig")))
32+
.map((eachElement) => path.resolve(dirPath, eachElement));
3333
}
3434

3535
const runWinDeployQt = async (appName: string, buildDir: string) => {
@@ -46,25 +46,25 @@ const runWinDeployQt = async (appName: string, buildDir: string) => {
4646
"--release",
4747
"--no-translations",
4848
"--compiler-runtime",
49-
`--dir=${buildDir}`
49+
`--dir=${buildDir}`,
5050
],
5151
{
52-
cwd: buildDir
52+
cwd: buildDir,
5353
}
5454
);
5555

5656
return new Promise((resolve, reject) => {
57-
winDeployQt.stdout.on("data", function(data) {
57+
winDeployQt.stdout.on("data", function (data) {
5858
console.log("stdout: " + data.toString());
5959
});
6060

61-
winDeployQt.stderr.on("data", function(data) {
61+
winDeployQt.stderr.on("data", function (data) {
6262
console.log("stderr: " + data.toString());
6363
});
6464

65-
winDeployQt.on("exit", function(code) {
65+
winDeployQt.on("exit", function (code) {
6666
if (!code) {
67-
return resolve();
67+
return resolve(true);
6868
}
6969
return reject("child process exited with code " + code);
7070
});
@@ -73,7 +73,7 @@ const runWinDeployQt = async (appName: string, buildDir: string) => {
7373

7474
export const init = async (appName: string) => {
7575
const config = {
76-
appName: null
76+
appName: null,
7777
};
7878
const templateDirectory = path.resolve(__dirname, "../../template/win32");
7979
const userTemplate = path.resolve(deployDirectory, "win32");

0 commit comments

Comments
 (0)