Skip to content

Commit

Permalink
(types): add @types/sade, fix transpileOnly default (#476)
Browse files Browse the repository at this point in the history
- transpileOnly default being the wrong type was found as a result of
  the better typing
  - can only be string | number, not boolean
  • Loading branch information
agilgur5 authored Feb 4, 2020
1 parent 424fc25 commit b3632fe
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"@types/react": "^16.9.11",
"@types/rollup-plugin-json": "^3.0.2",
"@types/rollup-plugin-sourcemaps": "^0.4.2",
"@types/sade": "^1.6.0",
"@types/semver": "^7.1.0",
"doctoc": "^1.4.0",
"husky": "^3.0.9",
Expand Down
2 changes: 1 addition & 1 deletion src/createRollupConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export async function createRollupConfig(
target: 'esnext',
},
},
check: opts.transpileOnly === false,
check: !opts.transpileOnly,
}),
babelPluginTsdx({
exclude: 'node_modules/**',
Expand Down
1 change: 0 additions & 1 deletion src/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ declare module 'asyncro';
declare module 'enquirer';
declare module 'jpjs';
declare module 'ora';
declare module 'sade';
declare module 'tiny-glob/sync';
declare module 'ansi-escapes';
declare module 'eslint-config-react-app';
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ prog
.example('watch --onSuccess "echo Successful build!"')
.option('--onFailure', 'Run a command on a failed build')
.example('watch --onFailure "The build failed!"')
.option('--transpileOnly', 'Skip type checking', false)
.option('--transpileOnly', 'Skip type checking')
.example('build --transpileOnly')
.option('--extractErrors', 'Extract invariant errors to ./errors/codes.json.')
.example('build --extractErrors')
Expand Down Expand Up @@ -399,7 +399,7 @@ prog
.example('build --format cjs,esm')
.option('--tsconfig', 'Specify custom tsconfig path')
.example('build --tsconfig ./tsconfig.foo.json')
.option('--transpileOnly', 'Skip type checking', false)
.option('--transpileOnly', 'Skip type checking')
.example('build --transpileOnly')
.option(
'--extractErrors',
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,11 @@
dependencies:
"@types/node" "*"

"@types/mri@*":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@types/mri/-/mri-1.1.0.tgz#66555e4d797713789ea0fefdae0898d8170bf5af"
integrity sha512-fMl88ZoZXOB7VKazJ6wUMpZc9QIn+jcigSFRf2K/rrw4DcXn+/uGxlWX8DDlcE7JkwgIZ7BDH+JgxZPlc/Ap3g==

"@types/ms@^0.7.30":
version "0.7.31"
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
Expand Down Expand Up @@ -1186,6 +1191,13 @@
"@types/node" "*"
rollup "^0.63.4"

"@types/sade@^1.6.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@types/sade/-/sade-1.6.0.tgz#eef2efa892b035b42693b00c554fc9713c6fefb2"
integrity sha512-Db3m69LUsLG4jqrJrf+X/IwwtvdxeazrDodWSNEcAGe60dxQJPXil9uNl2tJj6IRjjadNv2eDYV1XHM0utCSLQ==
dependencies:
"@types/mri" "*"

"@types/semver@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.1.0.tgz#c8c630d4c18cd326beff77404887596f96408408"
Expand Down

0 comments on commit b3632fe

Please sign in to comment.