nw 0.83.0-sdk → 0.84.0-sdk

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.
Files changed (2) hide show
  1. package/lib/install.js +9 -3
  2. package/package.json +2 -2
package/lib/install.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const { createWriteStream, existsSync } = require('node:fs');
2
- const { rename, rm } = require('node:fs/promises');
2
+ const { rename, rm, symlink } = require('node:fs/promises');
3
3
  const { get } = require('node:https');
4
4
  const { resolve } = require('node:path');
5
5
  const { arch, env, platform, exit } = require('node:process');
@@ -12,8 +12,11 @@ const semver = require('semver');
12
12
  const nodeManifest = require('../package.json');
13
13
 
14
14
  install()
15
- .then(() => {})
16
- .catch((error) => console.error(error));
15
+ .catch((error) => {
16
+ if (error.code === 'EPERM') {
17
+ console.error('Unable to create symlink since user did not run as Administrator.');
18
+ }
19
+ });
17
20
 
18
21
  async function install() {
19
22
 
@@ -219,5 +222,8 @@ async function install() {
219
222
  nwDir
220
223
  );
221
224
 
225
+ // This allows nw-builder to treat ./node_modules/nw as cacheDir and access the downloaded binary.
226
+ await symlink(nwDir, nwFile);
227
+
222
228
  return;
223
229
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nw",
3
- "version": "0.83.0-sdk",
3
+ "version": "0.84.0-sdk",
4
4
  "description": "A installer for nw.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,7 +34,7 @@
34
34
  "cli-progress": "^3.12.0",
35
35
  "compressing": "^1.10.0",
36
36
  "semver": "^7.5.4",
37
- "yargs": "^3.2.1"
37
+ "yargs": "^17.7.2"
38
38
  },
39
39
  "keywords": [
40
40
  "nw",