first-base 0.1.3 → 0.2.0
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 +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -9
- package/dist/index.js.flow +0 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ test("something", async () => {
|
|
|
21
21
|
|
|
22
22
|
### `spawn(command: string, args?: Array<string>, options?: Object) => RunContext`
|
|
23
23
|
|
|
24
|
-
`args` and `options` are the same as [child_process.spawn](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)
|
|
24
|
+
`args` and `options` are the same as [child_process.spawn](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options).
|
|
25
25
|
|
|
26
26
|
Returns a `RunContext` object; see below.
|
|
27
27
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -4,8 +4,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
|
4
4
|
|
|
5
5
|
var normalSpawn = require("child_process").spawn;
|
|
6
6
|
|
|
7
|
-
var ptySpawn = require("node-pty").spawn;
|
|
8
|
-
|
|
9
7
|
var stripAnsi = require("strip-ansi"); // Run a child process and return a "run context" object
|
|
10
8
|
// to interact with it. Function signature is the same as
|
|
11
9
|
// child_process spawn, except you can pass `pty: true` in
|
|
@@ -114,12 +112,7 @@ var spawn = function spawn(cmd, argsOrOptions, passedOptions) {
|
|
|
114
112
|
};
|
|
115
113
|
|
|
116
114
|
if (options.pty) {
|
|
117
|
-
|
|
118
|
-
stdin = child;
|
|
119
|
-
stdout = child;
|
|
120
|
-
stderr = null; // no way to tell between stdout and stderr with pty
|
|
121
|
-
|
|
122
|
-
unreffable = child.socket;
|
|
115
|
+
throw new Error("pty mode is no longer supported due to lack of support for new node.js versions in the node-pty module");
|
|
123
116
|
} else {
|
|
124
117
|
child = normalSpawn(cmd, args, options);
|
|
125
118
|
stdin = child.stdin;
|
|
@@ -158,7 +151,7 @@ var spawn = function spawn(cmd, argsOrOptions, passedOptions) {
|
|
|
158
151
|
// requires attaching handlers differently
|
|
159
152
|
stdout.onData(handleStdoutData);
|
|
160
153
|
} else {
|
|
161
|
-
stdout.on(
|
|
154
|
+
stdout.on("data", handleStdoutData);
|
|
162
155
|
}
|
|
163
156
|
|
|
164
157
|
if (stderr) {
|
package/dist/index.js.flow
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "first-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Integration testing for CLI applications",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": "https://github.com/suchipi/first-base",
|
|
7
7
|
"author": "Lily Scott <me@suchipi.com>",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"node-pty": "^0.9.0",
|
|
11
10
|
"strip-ansi": "^5.0.0"
|
|
12
11
|
},
|
|
13
12
|
"devDependencies": {
|