Skip to content

Commit

Permalink
fix for node 6
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed May 10, 2020
1 parent f82c7f5 commit 2869699
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
17 changes: 12 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@
"istanbul": "^0.4.0",
"mocha": "^6.2.2",
"ntypescript": "^1.201507091536.1",
"pify": "^5.0.0",
"proxyquire": "^2.0.0",
"react": "^16.0.0",
"rimraf": "^3.0.0",
"semver": "^7.1.3",
"tslint": "^6.1.0",
"tslint-config-standard": "^9.0.0",
"typescript": "^3.7.2",
"typescript-json-schema": "^0.42.0"
"typescript-json-schema": "^0.42.0",
"util.promisify": "^1.0.1"
},
"peerDependencies": {
"typescript": ">=2.7"
Expand Down
2 changes: 1 addition & 1 deletion src/externs.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module 'pify' {
declare module 'util.promisify' {
const _export: typeof import('util').promisify
export = _export
}
6 changes: 3 additions & 3 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import semver = require('semver')
import ts = require('typescript')
import proxyquire = require('proxyquire')
import { register, create, VERSION } from './index'
import { mkdtempSync, readdirSync, copyFileSync, rmdirSync, unlinkSync, existsSync } from 'fs'
import * as promisify from 'pify'
import { mkdtempSync, readdirSync, copyFileSync, rmdirSync, unlinkSync, existsSync, readFileSync, writeFileSync } from 'fs'
import * as promisify from 'util.promisify'

const execP = promisify(exec)

Expand All @@ -25,7 +25,7 @@ before(async function () {
const tempDir = mkdtempSync(join(TEST_DIR, 'tmp'))
await execP(`npm pack --ignore-scripts "${ROOT_DIR}"`, { cwd: tempDir })
const tarballPath = join(tempDir, readdirSync(tempDir)[0])
copyFileSync(tarballPath, TARBALL_PATH)
writeFileSync(TARBALL_PATH, readFileSync(tarballPath))
unlinkSync(tarballPath)
rmdirSync(tempDir)
await execP(`npm install`, { cwd: TEST_DIR })
Expand Down

0 comments on commit 2869699

Please sign in to comment.