diff --git a/package.json b/package.json index e61f81a9..57e7cd03 100644 --- a/package.json +++ b/package.json @@ -34,20 +34,20 @@ "@types/indent-string": "^3.0.0", "@types/lodash": "^4.14.109", "@types/mocha": "^5.2.0", - "@types/node": "^10.1.2", + "@types/node": "^10.3.0", "@types/semver": "^5.5.0", "@types/strip-ansi": "^3.0.0", "@types/supports-color": "^5.3.0", "chai": "^4.1.2", "concurrently": "^3.5.1", "eslint": "^4.19.1", - "eslint-config-oclif": "^1.5.0", - "fancy-test": "^1.0.8", + "eslint-config-oclif": "^1.5.1", + "fancy-test": "^1.0.9", "husky": "^0.14.3", "mocha": "^5.2.0", - "ts-node": "^6.0.3", + "ts-node": "^6.0.5", "tslint": "^5.10.0", - "typescript": "^2.8.3" + "typescript": "^2.9.1" }, "engines": { "node": ">=8.0.0" diff --git a/src/deps.ts b/src/deps.ts index 232f23ae..41a9a888 100644 --- a/src/deps.ts +++ b/src/deps.ts @@ -1,27 +1,16 @@ -import screen = require('@oclif/screen') -import ansiStyles = require('ansi-styles') -import stripAnsi = require('strip-ansi') - -import open = require('./open') -import prompt = require('./prompt') -import styledHeader = require('./styled/header') -import styledJSON = require('./styled/json') -import styledObject = require('./styled/object') -import table = require('./styled/table') - export const deps = { - get stripAnsi(): typeof stripAnsi { return fetch('strip-ansi') }, - get ansiStyles(): typeof ansiStyles { return fetch('ansi-styles') }, + get stripAnsi(): typeof import ('strip-ansi') { return fetch('strip-ansi') }, + get ansiStyles(): typeof import ('ansi-styles') { return fetch('ansi-styles') }, get ansiEscapes(): any { return fetch('ansi-escapes') }, get passwordPrompt(): any { return fetch('password-prompt') }, - get screen(): typeof screen { return fetch('@oclif/screen') }, + get screen(): typeof import ('@oclif/screen') { return fetch('@oclif/screen') }, - get open(): typeof open.default { return fetch('./open').default }, - get prompt(): typeof prompt.default { return fetch('./prompt').default }, - get styledObject(): typeof styledObject.default { return fetch('./styled/object').default }, - get styledHeader(): typeof styledHeader.default { return fetch('./styled/header').default }, - get styledJSON(): typeof styledJSON.default { return fetch('./styled/json').default }, - get table(): typeof table.default { return fetch('./styled/table').default }, + get open(): typeof import ('./open').default { return fetch('./open').default }, + get prompt(): typeof import ('./prompt').default { return fetch('./prompt').default }, + get styledObject(): typeof import ('./styled/object').default { return fetch('./styled/object').default }, + get styledHeader(): typeof import ('./styled/header').default { return fetch('./styled/header').default }, + get styledJSON(): typeof import ('./styled/json').default { return fetch('./styled/json').default }, + get table(): typeof import ('./styled/table').default { return fetch('./styled/table').default }, } const cache: any = {} diff --git a/tsconfig.json b/tsconfig.json index c6454f7a..44e6136c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,8 @@ "importHelpers": true, "module": "commonjs", "outDir": "./lib", - "pretty": true, + "esModuleInterop": true, + "resolveJsonModule": true, "rootDirs": [ "./src" ], diff --git a/yarn.lock b/yarn.lock index 06d31417..7e783c21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -70,9 +70,9 @@ version "9.4.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.5.tgz#d2a90c634208173d1b1a0a6ba9f1df3de62edcf5" -"@types/node@^10.1.2": - version "10.1.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.1.2.tgz#1b928a0baa408fc8ae3ac012cc81375addc147c6" +"@types/node@^10.3.0": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.3.0.tgz#078516315a84d56216b5d4fed8f75d59d3b16cac" "@types/semver@^5.5.0": version "5.5.0" @@ -445,9 +445,9 @@ eslint-ast-utils@^1.0.0: lodash.get "^4.4.2" lodash.zip "^4.2.0" -eslint-config-oclif@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/eslint-config-oclif/-/eslint-config-oclif-1.5.0.tgz#9c41a7d94493e06c1692554b3da329a96064cec9" +eslint-config-oclif@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/eslint-config-oclif/-/eslint-config-oclif-1.5.1.tgz#e8c5f31b8bb7383a666a506c3f6e91dbc861ecc5" dependencies: eslint-config-xo-space "^0.18.0" eslint-plugin-mocha "^5.0.0" @@ -594,9 +594,9 @@ extract-stack@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-1.0.0.tgz#b97acaf9441eea2332529624b732fc5a1c8165fa" -fancy-test@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-1.0.8.tgz#d66a5ffab73a0792bf3c8404812c5a774f0e3180" +fancy-test@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-1.0.9.tgz#2d75d49abd3855802953c0f6dcf26dddb8762b09" dependencies: lodash "^4.17.10" stdout-stderr "^0.1.9" @@ -1302,9 +1302,9 @@ tree-kill@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.0.tgz#5846786237b4239014f05db156b643212d4c6f36" -ts-node@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-6.0.3.tgz#28bf74bcad134fad17f7469dad04638ece03f0f4" +ts-node@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-6.0.5.tgz#977c1c931da7a2b09ae2930101f0104a5c2271e9" dependencies: arrify "^1.0.0" chalk "^2.3.0" @@ -1391,9 +1391,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^2.8.3: - version "2.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.3.tgz#5d817f9b6f31bb871835f4edf0089f21abe6c170" +typescript@^2.9.1: + version "2.9.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.1.tgz#fdb19d2c67a15d11995fd15640e373e09ab09961" universalify@^0.1.0: version "0.1.1"