Permalink
Browse files

fix(*): Post-process .d.ts files to make them compatible with TS 1.8

Closes #3070
  • Loading branch information...
1 parent af12208 commit c8162ee4be5db61f9bee7ed6838e4fafe78e2c0d @christopherthielen christopherthielen committed Dec 9, 2016
Showing with 21 additions and 7 deletions.
  1. +6 −4 package.json
  2. +2 −2 webpack.config.js
  3. +13 −1 yarn.lock
View
@@ -4,7 +4,8 @@
"version": "1.0.0-beta.4",
"scripts": {
"clean": "shx rm -rf lib lib-esm _doc release",
- "build": "tsc && tsc -m es6 --outDir lib-esm",
+ "build": "tsc && tsc -m es6 --outDir lib-esm && npm run fixdts",
+ "fixdts": "dts-downlevel 'lib/**/*.d.ts' 'lib-esm/**/*.d.ts'",
"package": "npm run clean && npm run build && webpack --hide-modules",
"test": "npm run test:integrate",
"test:ng12": "karma start --ngversion 1.2.28",
@@ -53,9 +54,9 @@
"node": ">=4.0.0"
},
"license": "MIT",
- "main": "lib/ng1.js",
- "jsnext:main": "lib-esm/ng1.js",
- "typings": "lib/ng1.d.ts",
+ "main": "lib/index.js",
+ "jsnext:main": "lib-esm/index.js",
+ "typings": "lib/index.d.ts",
"dependencies": {
"ui-router-core": "=1.0.1"
},
@@ -73,6 +74,7 @@
"clone": "^1.0.2",
"conventional-changelog": "^1.1.0",
"conventional-changelog-cli": "^1.1.1",
+ "dts-downlevel": "^0.1.0",
"glob": "^7.0.5",
"jasmine-core": "^2.4.1",
"karma": "^1.2.0",
View
@@ -12,8 +12,8 @@ module.exports = {
entry: {
"angular-ui-router": "./src/index.ts",
"angular-ui-router.min": "./src/index.ts",
- "stateEvents": "./src/ng1/legacy/stateEvents.ts",
- "stateEvents.min": "./src/ng1/legacy/stateEvents.ts",
+ "stateEvents": "./src/legacy/stateEvents.ts",
+ "stateEvents.min": "./src/legacy/stateEvents.ts",
},
output: {
View
@@ -1074,6 +1074,12 @@ dot-prop@^3.0.0:
dependencies:
is-obj "^1.0.0"
+dts-downlevel:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/dts-downlevel/-/dts-downlevel-0.1.0.tgz#15cddc2cf44a34ad426d1975341499a762d077ef"
+ dependencies:
+ replace-in-file "^2.0.3"
+
duplexer2@0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db"
@@ -1581,7 +1587,7 @@ glob@^5.0.15, glob@5.x:
once "^1.3.0"
path-is-absolute "^1.0.0"
-glob@^7.0.0, glob@^7.0.3, glob@^7.0.5:
+glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
dependencies:
@@ -3131,6 +3137,12 @@ replace-ext@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"
+replace-in-file@^2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/replace-in-file/-/replace-in-file-2.0.3.tgz#2ab0179c2978e42aadcff5378f279a70f00d2096"
+ dependencies:
+ glob "^7.1.1"
+
request-progress@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08"

0 comments on commit c8162ee

Please sign in to comment.