Skip to content

Commit

Permalink
fix imports, disable esModuleInterop
Browse files Browse the repository at this point in the history
  • Loading branch information
bingtimren committed May 27, 2021
1 parent 68c4deb commit 067b3ab
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "child-process-toolbox",
"version": "2.1.7",
"version": "2.1.8",
"description": "Helper functions to spawn and manage child processes, especially for writing shell utilities with Javascript / Typescript",
"main": "build/main/index.js",
"types": "build/main/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/echo.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tslint:disable:no-expression-statement
import test from 'ava';
import child_process from 'child_process';
import * as child_process from 'child_process';
import { echoChildProcessOutput } from './echo';

test('echo child process (expect two lines of output)', async t => {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/echo.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import child_process from 'child_process';
import readline from 'readline';
import * as child_process from 'child_process';
import * as readline from 'readline';
import { Readable, Writable } from 'stream';

function echoReadable(
Expand Down
2 changes: 1 addition & 1 deletion src/lib/promise-exit.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tslint:disable:no-expression-statement
import test from 'ava';
import child_process from 'child_process';
import * as child_process from 'child_process';
import { promiseExit } from './promise-exit';

test('check normal exit', async t => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/promise-exit.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import child_process from 'child_process';
import * as child_process from 'child_process';

/**
* returns a Promise that resolves on the child process's exit event (
Expand Down
2 changes: 1 addition & 1 deletion src/lib/promise-killed.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tslint:disable:no-expression-statement
import test from 'ava';
import child_process from 'child_process';
import * as child_process from 'child_process';
import { promiseKilled } from './promise-killed';
test('promise killed', async t => {
await t.notThrowsAsync(async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/promise-output.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tslint:disable:no-expression-statement
import test from 'ava';
import child_process from 'child_process';
import * as child_process from 'child_process';
import { promiseOutputPattern } from './promise-output';

test('check output pattern (string)', async t => {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/promise-output.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import child_process from 'child_process';
import readline from 'readline';
import * as child_process from 'child_process';
import * as readline from 'readline';
import { Readable } from 'stream';

function resolveOnPattern(
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"module": "commonjs",
"declaration": true,
"inlineSourceMap": true,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"esModuleInterop": false /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,

"strict": true /* Enable all strict type-checking options. */,

Expand Down

0 comments on commit 067b3ab

Please sign in to comment.