Socket
Socket
Sign inDemoInstall

rollup-plugin-dts

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-dts - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

4

CHANGELOG.md

@@ -0,1 +1,5 @@

### 1.4.1 202-05-08
- Add support for `export * as foo` declarations.
### 1.4.0 2020-04-11

@@ -2,0 +6,0 @@

26

dist/rollup-plugin-dts.js

@@ -197,3 +197,3 @@ 'use strict';

getNewLine: () => ts.sys.newLine,
getCanonicalFileName: ts.sys.useCaseSensitiveFileNames ? f => f : f => f.toLowerCase(),
getCanonicalFileName: ts.sys.useCaseSensitiveFileNames ? (f) => f : (f) => f.toLowerCase(),
};

@@ -230,3 +230,3 @@ const OPTIONS_OVERRIDE = {

const { fileNames, options, errors } = ts.parseJsonConfigFileContent(config, ts.sys, dirName);
dtsFiles = fileNames.filter(name => name.endsWith(dts));
dtsFiles = fileNames.filter((name) => name.endsWith(dts));
if (errors.length) {

@@ -1065,5 +1065,2 @@ console.error(ts.formatDiagnostics(errors, formatHost));

const source = node.moduleSpecifier ? convertExpression(node.moduleSpecifier) : undefined;
if (node.exportClause && ts.isNamespaceExport(node.exportClause)) {
throw new UnsupportedSyntaxError(node.exportClause);
}
if (!node.exportClause) {

@@ -1077,5 +1074,14 @@ this.pushStatement(withStartEnd({

const specifiers = [];
for (const elem of node.exportClause.elements) {
specifiers.push(this.convertExportSpecifier(elem));
if (ts.isNamespaceExport(node.exportClause)) {
specifiers.push({
// @ts-ignore: ESTree doesn‘t have this yet
type: "ExportNamespaceSpecifier",
exported: createIdentifier(node.exportClause.name),
});
}
else {
for (const elem of node.exportClause.elements) {
specifiers.push(this.convertExportSpecifier(elem));
}
}
this.pushStatement(withStartEnd({

@@ -1108,3 +1114,3 @@ type: "ExportNamedDeclaration",

if (ts.isNamedImports(node)) {
return node.elements.map(el => {
return node.elements.map((el) => {
const local = createIdentifier(el.name);

@@ -1235,3 +1241,3 @@ const imported = el.propertyName ? createIdentifier(el.propertyName) : local;

if (emitSkipped) {
const errors = diagnostics.filter(diag => diag.category === ts.DiagnosticCategory.Error);
const errors = diagnostics.filter((diag) => diag.category === ts.DiagnosticCategory.Error);
if (errors.length) {

@@ -1268,3 +1274,3 @@ console.error(ts.formatDiagnostics(errors, formatHost));

const fixer = new NamespaceFixer(source);
code = writeBlock(Array.from(typeReferences, ref => `/// <reference types="${ref}" />`));
code = writeBlock(Array.from(typeReferences, (ref) => `/// <reference types="${ref}" />`));
code += fixer.fix();

@@ -1271,0 +1277,0 @@ return { code, map: { mappings: "" } };

{
"name": "rollup-plugin-dts",
"version": "1.4.0",
"version": "1.4.1",
"description": "An experiment to generate .d.ts rollup files",

@@ -65,15 +65,15 @@ "keywords": [

"@types/jest": "^25.2.1",
"@types/node": "^13.11.0",
"@types/react": "^16.9.32",
"@types/node": "^13.13.4",
"@types/react": "^16.9.34",
"esm": "^3.2.25",
"fs-extra": "^9.0.0",
"jest": "^25.2.7",
"prettier": "^2.0.3",
"jest": "^25.5.4",
"prettier": "^2.0.5",
"react": "^16.13.1",
"rollup": "2.3.3",
"ts-jest": "^25.3.1",
"rollup": "2.7.6",
"ts-jest": "^25.4.0",
"typescript": "3.8.3"
},
"peerDependencies": {
"rollup": "^2.3.3",
"rollup": "^2.7.6",
"typescript": "^3.8.3"

@@ -80,0 +80,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc