node-pty 1.1.0-beta4 → 1.1.0-beta6

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.
package/README.md CHANGED
@@ -18,12 +18,12 @@ The full API for node-pty is contained within the [TypeScript declaration file](
18
18
  ## Example Usage
19
19
 
20
20
  ```js
21
- var os = require('os');
22
- var pty = require('node-pty');
21
+ import * as os from 'node:os';
22
+ import * as pty from 'node-pty';
23
23
 
24
- var shell = os.platform() === 'win32' ? 'powershell.exe' : 'bash';
24
+ const shell = os.platform() === 'win32' ? 'powershell.exe' : 'bash';
25
25
 
26
- var ptyProcess = pty.spawn(shell, [], {
26
+ const ptyProcess = pty.spawn(shell, [], {
27
27
  name: 'xterm-color',
28
28
  cols: 80,
29
29
  rows: 30,
package/binding.gyp CHANGED
@@ -1,5 +1,8 @@
1
1
  {
2
2
  'target_defaults': {
3
+ 'dependencies': [
4
+ "<!(node -p \"require('node-addon-api').targets\"):node_addon_api_except",
5
+ ],
3
6
  'conditions': [
4
7
  ['OS=="win"', {
5
8
  'msvs_configuration_attributes': {
@@ -28,9 +31,6 @@
28
31
  'targets': [
29
32
  {
30
33
  'target_name': 'conpty',
31
- 'include_dirs' : [
32
- '<!(node -e "require(\'nan\')")'
33
- ],
34
34
  'sources' : [
35
35
  'src/win/conpty.cc',
36
36
  'src/win/path_util.cc'
@@ -41,9 +41,6 @@
41
41
  },
42
42
  {
43
43
  'target_name': 'conpty_console_list',
44
- 'include_dirs' : [
45
- '<!(node -e "require(\'nan\')")'
46
- ],
47
44
  'sources' : [
48
45
  'src/win/conpty_console_list.cc'
49
46
  ],
@@ -51,7 +48,7 @@
51
48
  {
52
49
  'target_name': 'pty',
53
50
  'include_dirs' : [
54
- '<!(node -e "require(\'nan\')")',
51
+ '<!(node -p "require(\'node-addon-api\').include_dir")',
55
52
  'deps/winpty/src/include',
56
53
  ],
57
54
  # Disabled due to winpty
@@ -73,9 +70,6 @@
73
70
  'targets': [
74
71
  {
75
72
  'target_name': 'pty',
76
- 'include_dirs' : [
77
- '<!(node -e "require(\'nan\')")'
78
- ],
79
73
  'sources': [
80
74
  'src/unix/pty.cc',
81
75
  ],
@@ -91,11 +85,6 @@
91
85
  'libraries!': [
92
86
  '-lutil'
93
87
  ]
94
- }],
95
- ['OS=="mac"', {
96
- "xcode_settings": {
97
- "MACOSX_DEPLOYMENT_TARGET":"10.7"
98
- }
99
88
  }]
100
89
  ]
101
90
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Microsoft Corporation"
6
6
  },
7
- "version": "1.1.0-beta4",
7
+ "version": "1.1.0-beta6",
8
8
  "license": "MIT",
9
9
  "main": "./lib/index.js",
10
10
  "types": "./typings/node-pty.d.ts",
@@ -43,7 +43,7 @@
43
43
  "prepublishOnly": "npm run build"
44
44
  },
45
45
  "dependencies": {
46
- "nan": "^2.17.0"
46
+ "node-addon-api": "^7.1.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/mocha": "^7.0.2",
@@ -53,6 +53,7 @@
53
53
  "cross-env": "^5.1.4",
54
54
  "eslint": "^6.8.0",
55
55
  "mocha": "10",
56
+ "node-gyp": "^9.4.0",
56
57
  "ps-list": "^6.0.0",
57
58
  "typescript": "^3.8.3"
58
59
  }