Compare commits

...

2 Commits

Author SHA1 Message Date
calebboyd e62d728624 fix: uppercase windows path letters after normalize
closes #618
2019-05-28 18:04:16 -05:00
Jason Cooke a0c8d31f03 docs: fix typo (#625) 2019-05-23 18:17:55 -05:00
4 changed files with 35 additions and 23 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ compile({
- Path to a user provided icon to be used (Windows only). Requires `--build` to be set. - Path to a user provided icon to be used (Windows only). Requires `--build` to be set.
- #### `rc: object` - #### `rc: object`
- Settings for patching the [node.rc](https://github.com/nodejs/node/blob/master/src/res/node.rc) configuration file (Windows only). - Settings for patching the [node.rc](https://github.com/nodejs/node/blob/master/src/res/node.rc) configuration file (Windows only).
- Example (keys may vary depending ont the version. Reference the file linked above): - Example (keys may vary depending on the version. Reference the file linked above):
```javascript ```javascript
{ {
CompanyName: "ACME Corp", CompanyName: "ACME Corp",
+21 -13
View File
@@ -2529,9 +2529,9 @@
"integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc="
}, },
"prettier": { "prettier": {
"version": "1.17.0", "version": "1.17.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.1.tgz",
"integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==", "integrity": "sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg==",
"dev": true "dev": true
}, },
"process-nextick-args": { "process-nextick-args": {
@@ -2623,9 +2623,9 @@
} }
}, },
"resolve-dependencies": { "resolve-dependencies": {
"version": "2.2.2", "version": "2.2.3",
"resolved": "https://registry.npmjs.org/resolve-dependencies/-/resolve-dependencies-2.2.2.tgz", "resolved": "https://registry.npmjs.org/resolve-dependencies/-/resolve-dependencies-2.2.3.tgz",
"integrity": "sha512-lZARvM5mDaVOBUNam2fbaHYydBBPMlMt6jjlQYvD8D2N//SOlq6iqqFrCWsYkBGYtXgix4EAiTFuZLpt5lXQtA==", "integrity": "sha512-EIZcqEE3q+fWNapzpQ2iiCPal+J7TsLfLnoeGq4h5L4GYjnf4xKzVHN7VBjLGgOJwUs/Z+a6nqA80AhwP7IPlQ==",
"requires": { "requires": {
"@calebboyd/semaphore": "^1.3.1", "@calebboyd/semaphore": "^1.3.1",
"acorn": "^6.0.4", "acorn": "^6.0.4",
@@ -3029,9 +3029,9 @@
} }
}, },
"tapable": { "tapable": {
"version": "1.1.1", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz",
"integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==" "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA=="
}, },
"tar-stream": { "tar-stream": {
"version": "1.6.1", "version": "1.6.1",
@@ -3114,16 +3114,24 @@
} }
}, },
"ts-node": { "ts-node": {
"version": "8.1.0", "version": "8.2.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.1.0.tgz", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.2.0.tgz",
"integrity": "sha512-34jpuOrxDuf+O6iW1JpgTRDFynUZ1iEqtYruBqh35gICNjN8x+LpVcPAcwzLPi9VU6mdA3ym+x233nZmZp445A==", "integrity": "sha512-m8XQwUurkbYqXrKqr3WHCW310utRNvV5OnRVeISeea7LoCWVcdfeB/Ntl8JYWFh+WRoUAdBgESrzKochQt7sMw==",
"dev": true, "dev": true,
"requires": { "requires": {
"arg": "^4.1.0", "arg": "^4.1.0",
"diff": "^3.1.0", "diff": "^4.0.1",
"make-error": "^1.1.1", "make-error": "^1.1.1",
"source-map-support": "^0.5.6", "source-map-support": "^0.5.6",
"yn": "^3.0.0" "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": { "tslib": {
+4 -4
View File
@@ -2,7 +2,7 @@
"name": "nexe", "name": "nexe",
"description": "Create a single executable out of your Node.js application", "description": "Create a single executable out of your Node.js application",
"license": "MIT", "license": "MIT",
"version": "3.2.0", "version": "3.2.1",
"contributors": [ "contributors": [
"Craig Condon <craig.j.condon@gmail.com> (http://crcn.io)", "Craig Condon <craig.j.condon@gmail.com> (http://crcn.io)",
"Jared Allard <jaredallard@outlook.com>", "Jared Allard <jaredallard@outlook.com>",
@@ -46,7 +46,7 @@
"multistream": "^2.1.1", "multistream": "^2.1.1",
"ora": "^3.4.0", "ora": "^3.4.0",
"pify": "^4.0.1", "pify": "^4.0.1",
"resolve-dependencies": "^2.2.2", "resolve-dependencies": "^2.2.3",
"rimraf": "^2.6.3" "rimraf": "^2.6.3"
}, },
"devDependencies": { "devDependencies": {
@@ -66,8 +66,8 @@
"chai": "^4.2.0", "chai": "^4.2.0",
"execa": "^1.0.0", "execa": "^1.0.0",
"mocha": "^6.1.4", "mocha": "^6.1.4",
"prettier": "^1.17.0", "prettier": "^1.17.1",
"ts-node": "^8.1.0", "ts-node": "^8.2.0",
"tslint": "^5.16.0", "tslint": "^5.16.0",
"tslint-config-prettier": "^1.18.0", "tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1", "tslint-plugin-prettier": "^2.0.1",
+9 -5
View File
@@ -35,6 +35,13 @@ function shimFs(binary: NexeBinary, fs: any = require('fs')) {
log = (text: string) => process.stderr.write('[nexe] - ' + text + '\n') 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 { const getKey = function getKey(filepath: string | Buffer | null): string {
if (Buffer.isBuffer(filepath)) { if (Buffer.isBuffer(filepath)) {
filepath = filepath.toString() filepath = filepath.toString()
@@ -44,10 +51,7 @@ function shimFs(binary: NexeBinary, fs: any = require('fs')) {
} }
let key = path.resolve(baseDir, filepath) let key = path.resolve(baseDir, filepath)
if (isWin && key.substr(1, 2) === ':\\') { return winPath(key)
key = key[0].toUpperCase() + key.substr(1)
}
return key
} }
const statTime = function() { const statTime = function() {
@@ -102,7 +106,7 @@ function shimFs(binary: NexeBinary, fs: any = require('fs')) {
const entry = manifest[filepath] const entry = manifest[filepath]
const absolutePath = getKey(filepath) const absolutePath = getKey(filepath)
const longPath = makeLong(absolutePath) const longPath = makeLong(absolutePath)
const normalizedPath = path.normalize(filepath) const normalizedPath = winPath(path.normalize(filepath))
if (!manifest[absolutePath]) { if (!manifest[absolutePath]) {
manifest[absolutePath] = entry manifest[absolutePath] = entry