Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@quip/dts-bundle-generator

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quip/dts-bundle-generator - npm Package Compare versions

Comparing version 6.2.0 to 6.2.1

6

config-schema.d.ts

@@ -1,2 +0,2 @@

// Generated by dts-bundle-generator v6.2.0
// Generated by dts-bundle-generator v6.2.1

@@ -47,2 +47,6 @@ export interface CompilationOptions {

/**
* Instead of declaring or preserving const enums, simply redefine them.
*/
reDefineConstEnum?: boolean;
/**
* By default all interfaces, types and const enums are marked as exported even if they aren't exported directly.

@@ -49,0 +53,0 @@ * This option allows you to disable this behavior so a node will be exported if it is exported from root source file only.

@@ -1,2 +0,2 @@

// Generated by dts-bundle-generator v6.2.0
// Generated by dts-bundle-generator v6.2.1

@@ -47,2 +47,6 @@ export interface CompilationOptions {

/**
* Instead of declaring or preserving const enums, simply redefine them.
*/
reDefineConstEnum?: boolean;
/**
* By default all interfaces, types and const enums are marked as exported even if they aren't exported directly.

@@ -49,0 +53,0 @@ * This option allows you to disable this behavior so a node will be exported if it is exported from root source file only.

@@ -58,2 +58,3 @@ "use strict";

respectPreserveConstEnum: check_schema_match_1.schemaPrimitiveValues.boolean,
reDefineConstEnum: check_schema_match_1.schemaPrimitiveValues.boolean,
exportReferencedTypes: check_schema_match_1.schemaPrimitiveValues.boolean,

@@ -60,0 +61,0 @@ reExportAllDeclarations: check_schema_match_1.schemaPrimitiveValues.boolean,

25

dist/generate-output.js

@@ -65,3 +65,3 @@ "use strict";

})
.map(function (statement) { return getStatementText(statement, params); });
.map(function (statement) { return getStatementText(statement, params, options); });
if (options.sortNodes) {

@@ -77,5 +77,8 @@ statements.sort(compareStatementText);

}
// this is used to prevent importing non-exported nodes
// see https://stackoverflow.com/questions/52583603/intentional-that-export-shuts-off-automatic-export-of-all-symbols-from-a-ty
resultOutput += "\n\nexport {};\n";
if (!options.reExportAllDeclarations) {
// this is used to prevent importing non-exported nodes
// see https://stackoverflow.com/questions/52583603/intentional-that-export-shuts-off-automatic-export-of-all-symbols-from-a-ty
// Behind `options.reExportAllDeclarations` check to reduce probable noise.
resultOutput += "\n\nexport {};\n";
}
return resultOutput;

@@ -188,3 +191,7 @@ }

}
function getStatementText(statement, helpers) {
function needStripDeclareKeyword(statement, options) {
return ts.isEnumDeclaration(statement) && !!options.reDefineConstEnum;
}
// eslint-disable-next-line complexity
function getStatementText(statement, helpers, options) {
var shouldStatementHasExportKeyword = helpers.shouldStatementHasExportKeyword(statement);

@@ -208,2 +215,10 @@ var needStripDefaultKeyword = helpers.needStripDefaultKeywordForStatement(statement);

}
if (needStripDeclareKeyword(statement, options)) {
if (nodeText.startsWith('declare ')) {
nodeText = nodeText.slice('declare '.length);
}
else if (nodeText.startsWith('export declare ')) {
nodeText = 'export ' + nodeText.slice('export declare '.length);
}
}
var result = {

@@ -210,0 +225,0 @@ text: nodeText,

{
"name": "@quip/dts-bundle-generator",
"version": "6.2.0",
"version": "6.2.1",
"description": "DTS Bundle Generator (Quip)",

@@ -5,0 +5,0 @@ "main": "dist/bundle-generator.js",

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