Skip to content

Commit 84ed72b

Browse files
committed
update --file-change-hook
1 parent 4de3d90 commit 84ed72b

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@
9797
"publishConfig": {
9898
"registry": "https://registry.npmjs.org"
9999
}
100-
}
100+
}

src/index.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export const runDev = (
4040
// The child_process
4141
let child:
4242
| (ChildProcess & {
43-
stopping?: boolean
44-
respawn?: boolean
45-
})
43+
stopping?: boolean
44+
respawn?: boolean
45+
})
4646
| undefined
4747

4848
const wrapper = resolveMain(__dirname + '/wrap.js')
@@ -92,12 +92,12 @@ export const runDev = (
9292

9393
log.info(
9494
'ts-node-dev ver. ' +
95-
version +
96-
' (using ts-node ver. ' +
97-
tsNodeVersion +
98-
', typescript ver. ' +
99-
tsVersion +
100-
')'
95+
version +
96+
' (using ts-node ver. ' +
97+
tsNodeVersion +
98+
', typescript ver. ' +
99+
tsVersion +
100+
')'
101101
)
102102

103103
/**
@@ -250,7 +250,8 @@ export const runDev = (
250250
const result = vm.runInNewContext(code, {
251251
require: require("esm")(module),
252252
module,
253-
console
253+
console,
254+
process
254255
});
255256
if (!result) {
256257
notify('FileChangeHook', 'Hook exit code: 0.')

0 commit comments

Comments
 (0)