Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into ab/support-node-10-…
…and-up
- Loading branch information
Showing
15 changed files
with
274 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Written in JS to support Windows | ||
// Would otherwise be written as inline bash in package.json script | ||
|
||
const { exec } = require('child_process') | ||
const { mkdtempSync, writeFileSync, readFileSync, unlinkSync, rmdirSync, readdirSync } = require('fs') | ||
const { join } = require('path') | ||
|
||
const testDir = join(__dirname, '../tests') | ||
const tarballPath = join(testDir, 'ts-node-packed.tgz') | ||
const tempDir = mkdtempSync(join(testDir, 'tmp')) | ||
exec(`npm pack "${join(__dirname, '..')}"`, { cwd: tempDir }, (err, stdout) => { | ||
if (err) { | ||
console.error(err) | ||
process.exit(1) | ||
} | ||
const tempTarballPath = join(tempDir, readdirSync(tempDir)[0]) | ||
writeFileSync(tarballPath, readFileSync(tempTarballPath)) | ||
unlinkSync(tempTarballPath) | ||
rmdirSync(tempDir) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare module 'util.promisify' { | ||
const _export: typeof import('util').promisify | ||
export = _export | ||
} |
Oops, something went wrong.