@wessberg/rollup-plugin-ts
Advanced tools
Comparing version 1.2.33 to 1.2.34
@@ -0,1 +1,7 @@ | ||
## [1.2.34](https://github.com/wessberg/rollup-plugin-ts/compare/v1.2.33...v1.2.34) (2020-07-29) | ||
### Bug Fixes | ||
- **hook:** fix declarationPaths type signature ([b8d6e7e](https://github.com/wessberg/rollup-plugin-ts/commit/b8d6e7e90c542003f1fdd89df544a0c4167a5e4b)) | ||
## [1.2.33](https://github.com/wessberg/rollup-plugin-ts/compare/v1.2.32...v1.2.33) (2020-07-29) | ||
@@ -2,0 +8,0 @@ |
@@ -26,5 +26,7 @@ import * as TS from "typescript"; | ||
} | ||
interface DeclarationStats { | ||
// A Record from chunk file names to their external type dependencies | ||
externalTypes: Record<string, ExternalType[]>; | ||
// A Record from chunk file names to their stats | ||
type DeclarationStats = Record<string, DeclarationChunkStats>; | ||
interface DeclarationChunkStats { | ||
// An array of the external type dependencies for a declaration chunk | ||
externalTypes: ExternalType[]; | ||
} | ||
@@ -31,0 +33,0 @@ interface ExternalType { |
@@ -26,5 +26,7 @@ import * as TS from "typescript"; | ||
} | ||
interface DeclarationStats { | ||
// A Record from chunk file names to their external type dependencies | ||
externalTypes: Record<string, ExternalType[]>; | ||
// A Record from chunk file names to their stats | ||
type DeclarationStats = Record<string, DeclarationChunkStats>; | ||
interface DeclarationChunkStats { | ||
// An array of the external type dependencies for a declaration chunk | ||
externalTypes: ExternalType[]; | ||
} | ||
@@ -31,0 +33,0 @@ interface ExternalType { |
{ | ||
"name": "@wessberg/rollup-plugin-ts", | ||
"version": "1.2.33", | ||
"version": "1.2.34", | ||
"description": "A Typescript Rollup plugin that bundles declarations and respects Browserslists", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -86,3 +86,3 @@ <!-- SHADOW_SECTION_LOGO_START --> | ||
- [The `declarationStats` hook](#the-declarationstats-hook) | ||
- [The `externalTypes` property](#the-externaltypes-property) | ||
- [The `externalTypes` property for `DeclarationChunkStats`](#the-externaltypes-property-for-declarationchunkstats) | ||
- [Full list of plugin options](#full-list-of-plugin-options) | ||
@@ -472,8 +472,11 @@ - [`transpiler`](#transpiler) | ||
The hook calls the given callback with a stats object as the first argument. | ||
The stats object has the following interface: | ||
The stats object has the following type information: | ||
```typescript | ||
interface DeclarationStats { | ||
// A Record from chunk file names to their external type dependencies | ||
externalTypes: Record<string, ExternalType[]>; | ||
// A Record from chunk file names to their stats | ||
type DeclarationStats = Record<string, DeclarationChunkStats>; | ||
interface DeclarationChunkStats { | ||
// An array of the external type dependencies for a declaration chunk | ||
externalTypes: ExternalType[]; | ||
} | ||
@@ -489,5 +492,5 @@ | ||
##### The `externalTypes` property | ||
##### The `externalTypes` property for `DeclarationChunkStats` | ||
The `externalTypes` property of the stats object can be useful, for example, if you want to get a hook into which external type dependencies that remain | ||
The `externalTypes` property of declaration chunk stats objects can be useful, for example, if you want to get a hook into which external type dependencies that remain | ||
after bundling and tree-shaking and that you should declare as `dependencies` of your library. | ||
@@ -500,3 +503,3 @@ | ||
hook: { | ||
declarationStats: declarationStats => console.log(declarationStats.externalTypes) | ||
declarationStats: declarationStats => console.log(declarationStats) | ||
} | ||
@@ -510,9 +513,13 @@ }); | ||
{ | ||
"index.d.ts": [ | ||
{ library: "typescript", version: "3.9.2" }, | ||
{ library: "@types/node", version: "14.0.26" } | ||
], | ||
"some-other-chunk.d.ts": [ | ||
{ library: "some-other-external-library", version: "1.2.3" } | ||
] | ||
"index.d.ts": { | ||
externalTypes: [ | ||
{ library: "typescript", version: "3.9.2" }, | ||
{ library: "@types/node", version: "14.0.26" } | ||
] | ||
}, | ||
"some-other-chunk.d.ts": { | ||
externalTypes: [ | ||
{ library: "some-other-external-library", version: "1.2.3" } | ||
] | ||
} | ||
} | ||
@@ -519,0 +526,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2642244
15742
765