diff --git a/package-lock.json b/package-lock.json index d657f21..a6fc556 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2529,9 +2529,9 @@ "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" }, "prettier": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz", - "integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.1.tgz", + "integrity": "sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg==", "dev": true }, "process-nextick-args": { @@ -2623,9 +2623,9 @@ } }, "resolve-dependencies": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/resolve-dependencies/-/resolve-dependencies-2.2.2.tgz", - "integrity": "sha512-lZARvM5mDaVOBUNam2fbaHYydBBPMlMt6jjlQYvD8D2N//SOlq6iqqFrCWsYkBGYtXgix4EAiTFuZLpt5lXQtA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/resolve-dependencies/-/resolve-dependencies-2.2.3.tgz", + "integrity": "sha512-EIZcqEE3q+fWNapzpQ2iiCPal+J7TsLfLnoeGq4h5L4GYjnf4xKzVHN7VBjLGgOJwUs/Z+a6nqA80AhwP7IPlQ==", "requires": { "@calebboyd/semaphore": "^1.3.1", "acorn": "^6.0.4", @@ -3029,9 +3029,9 @@ } }, "tapable": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", - "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" }, "tar-stream": { "version": "1.6.1", @@ -3114,16 +3114,24 @@ } }, "ts-node": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.1.0.tgz", - "integrity": "sha512-34jpuOrxDuf+O6iW1JpgTRDFynUZ1iEqtYruBqh35gICNjN8x+LpVcPAcwzLPi9VU6mdA3ym+x233nZmZp445A==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.2.0.tgz", + "integrity": "sha512-m8XQwUurkbYqXrKqr3WHCW310utRNvV5OnRVeISeea7LoCWVcdfeB/Ntl8JYWFh+WRoUAdBgESrzKochQt7sMw==", "dev": true, "requires": { "arg": "^4.1.0", - "diff": "^3.1.0", + "diff": "^4.0.1", "make-error": "^1.1.1", "source-map-support": "^0.5.6", "yn": "^3.0.0" + }, + "dependencies": { + "diff": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", + "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "dev": true + } } }, "tslib": { diff --git a/package.json b/package.json index 871881a..644cb11 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "nexe", "description": "Create a single executable out of your Node.js application", "license": "MIT", - "version": "3.2.0", + "version": "3.2.1", "contributors": [ "Craig Condon (http://crcn.io)", "Jared Allard ", @@ -46,7 +46,7 @@ "multistream": "^2.1.1", "ora": "^3.4.0", "pify": "^4.0.1", - "resolve-dependencies": "^2.2.2", + "resolve-dependencies": "^2.2.3", "rimraf": "^2.6.3" }, "devDependencies": { @@ -66,8 +66,8 @@ "chai": "^4.2.0", "execa": "^1.0.0", "mocha": "^6.1.4", - "prettier": "^1.17.0", - "ts-node": "^8.1.0", + "prettier": "^1.17.1", + "ts-node": "^8.2.0", "tslint": "^5.16.0", "tslint-config-prettier": "^1.18.0", "tslint-plugin-prettier": "^2.0.1", diff --git a/src/fs/patch.ts b/src/fs/patch.ts index 565b2ce..8c4b3c6 100644 --- a/src/fs/patch.ts +++ b/src/fs/patch.ts @@ -35,6 +35,13 @@ function shimFs(binary: NexeBinary, fs: any = require('fs')) { log = (text: string) => process.stderr.write('[nexe] - ' + text + '\n') } + const winPath = (key: string) => { + if (isWin && key.substr(1, 2) === ':\\') { + key = key[0].toUpperCase() + key.substr(1) + } + return key + } + const getKey = function getKey(filepath: string | Buffer | null): string { if (Buffer.isBuffer(filepath)) { filepath = filepath.toString() @@ -44,10 +51,7 @@ function shimFs(binary: NexeBinary, fs: any = require('fs')) { } let key = path.resolve(baseDir, filepath) - if (isWin && key.substr(1, 2) === ':\\') { - key = key[0].toUpperCase() + key.substr(1) - } - return key + return winPath(key) } const statTime = function() { @@ -102,7 +106,7 @@ function shimFs(binary: NexeBinary, fs: any = require('fs')) { const entry = manifest[filepath] const absolutePath = getKey(filepath) const longPath = makeLong(absolutePath) - const normalizedPath = path.normalize(filepath) + const normalizedPath = winPath(path.normalize(filepath)) if (!manifest[absolutePath]) { manifest[absolutePath] = entry