Skip to content

Commit

Permalink
Add downlevel-dts for TS3.5 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
lychyi committed Feb 13, 2020
1 parent c972fcb commit d28bce5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
"danger": "^9.2.1",
"del": "^5.1.0",
"detect-port": "^1.3.0",
"downlevel-dts": "^0.4.0",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.9.1",
"eslint": "^6.5.1",
Expand Down
3 changes: 2 additions & 1 deletion scripts/compile-tsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const shell = require('shelljs');

function getCommand(watch) {
const tsc = path.join(__dirname, '..', 'node_modules', '.bin', 'tsc');
const downlevelDts = path.join(__dirname, '..', 'node_modules', '.bin', 'downlevel-dts');

const args = ['--outDir ./dist', '--listEmittedFiles true'];

Expand All @@ -27,7 +28,7 @@ function getCommand(watch) {
args.push('-w');
}

return `${tsc} ${args.join(' ')}`;
return `${tsc} ${args.join(' ')} && ${downlevelDts} dist ts3.5/dist`;
}

function handleExit(code, stderr, errorCallback) {
Expand Down
13 changes: 13 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11984,6 +11984,14 @@ dotenv@^5.0.0:
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef"
integrity sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow==

downlevel-dts@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/downlevel-dts/-/downlevel-dts-0.4.0.tgz#43f9f649c8b137373d76b4ee396d5a0227c10ddb"
integrity sha512-nh5vM3n2pRhPwZqh0iWo5gpItPAYEGEWw9yd0YpI+lO60B7A3A6iJlxDbt7kKVNbqBXKsptL+jwE/Yg5Go66WQ==
dependencies:
shelljs "^0.8.3"
typescript "^3.8.0-dev.20200111"

driver-dom@^2.0.0:
version "2.0.6"
resolved "https://registry.yarnpkg.com/driver-dom/-/driver-dom-2.0.6.tgz#7485b51842acb18fbf10bb9c7a9d756e36375472"
Expand Down Expand Up @@ -32732,6 +32740,11 @@ typescript@^3.4.0:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==

typescript@^3.8.0-dev.20200111:
version "3.8.0-dev.20200211"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.0-dev.20200211.tgz#8723bc40da40e737b01977ba543af69d7a545d94"
integrity sha512-1LnADJbATvC2XSPcn7NwrhidLA03jXUx1x1ZfPNaceC8SCe5KtZwihzMe7PPmP5Sy2JiXD0pYp/X4MVogV57qQ==

ua-parser-js@^0.7.18, ua-parser-js@^0.7.19:
version "0.7.21"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.21.tgz#853cf9ce93f642f67174273cc34565ae6f308777"
Expand Down

0 comments on commit d28bce5

Please sign in to comment.