Skip to content

Commit

Permalink
upgrade rollup-plugin-dts, remove hack
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Jul 21, 2020
1 parent 5a0d509 commit 604b17e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -103,7 +103,7 @@
"postcss-loader": "^3.0.0",
"postcss-nesting": "^7.0.1",
"rollup": "^2.21.0",
"rollup-plugin-dts": "^1.4.8",
"rollup-plugin-dts": "^1.4.9",
"rollup-plugin-postcss": "^3.1.3",
"rollup-plugin-sourcemaps": "^0.6.2",
"semver": "^7.3.2",
Expand Down
8 changes: 0 additions & 8 deletions rollup.packages.js
Expand Up @@ -161,14 +161,6 @@ function fixDtsCodeOut() {
*/
code = code.replace(/VNode<any>/g, 'VNode')

/*
rollup-plugin-dts sometimes does not correctly reduce nested type declarations, leaving something like this:
import("../toolbar-struct").ToolbarInput
relevant tickets:
https://github.com/Swatinem/rollup-plugin-dts/issues/106 - "Imported type within imported generic is not reduced"
*/
code = code.replace(/import\(([^)]*)\)\./g, '')

if (/\b(p?react)\b/.test(code)) {
throw new Error('BAD reference to preact/react in DTS')
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -17187,10 +17187,10 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^3.0.0"
inherits "^2.0.1"

rollup-plugin-dts@^1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/rollup-plugin-dts/-/rollup-plugin-dts-1.4.8.tgz#3b0eadc285aede11c3f5ced72b56b5f7735df95c"
integrity sha512-2qHB4B3oaTyi1mDmqDzsRGKlev32v3EhMUAmc45Cn9eB22R7FsYDiigvT9XdM/oQzfd0qv5MkeZju8DP0nauiA==
rollup-plugin-dts@^1.4.9:
version "1.4.9"
resolved "https://registry.yarnpkg.com/rollup-plugin-dts/-/rollup-plugin-dts-1.4.9.tgz#936e4cc1139d81c5c0ce64dc1e9fe025bb3eccaf"
integrity sha512-ikEIpVKDhgNFouGQemmVeXojpxEhgSUCPrfEbiDMWg3YmDWYoNifmbmt5AiBqf3KHnv/6Se5+KSgDE11oVlZYg==
optionalDependencies:
"@babel/code-frame" "^7.10.4"

Expand Down

0 comments on commit 604b17e

Please sign in to comment.