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

dts-bundle-generator

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dts-bundle-generator - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

7

bin/dts-bundle-generator.js

@@ -78,2 +78,7 @@ #!/usr/bin/env node

})
.option('disable-symlinks-following', {
type: 'boolean',
default: false,
description: '(EXPERIMENTAL) Disables resolving symlinks to original path. See https://github.com/timocov/dts-bundle-generator/issues/39 to more information',
})
.config('config', 'File path to generator config file')

@@ -84,2 +89,3 @@ .version()

.example('$0 --external-types jquery react -- entry-file.ts', '')
.wrap(Math.min(100, yargs.terminalWidth()))
.argv;

@@ -100,2 +106,3 @@ if (args.verbose) {

inlineDeclareGlobals: args['inline-declare-global'],
followSymlinks: !args['disable-symlinks-following'],
});

@@ -102,0 +109,0 @@ var outFile = args['out-file'];

2

bundle-generator.js

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

}
var program = compile_dts_1.compileDts(filePath, options.preferredConfigPath);
var program = compile_dts_1.compileDts(filePath, options.preferredConfigPath, options.followSymlinks);
var typeChecker = program.getTypeChecker();

@@ -33,0 +33,0 @@ var criteria = {

@@ -8,3 +8,4 @@ "use strict";

var check_diagnostics_errors_1 = require("./check-diagnostics-errors");
function compileDts(rootFile, preferredConfigPath) {
function compileDts(rootFile, preferredConfigPath, followSymlinks) {
if (followSymlinks === void 0) { followSymlinks = true; }
var compilerOptions = get_compiler_options_1.getCompilerOptions(rootFile, preferredConfigPath);

@@ -18,2 +19,5 @@ if (compilerOptions.outDir !== undefined) {

var host = ts.createCompilerHost(compilerOptions);
if (!followSymlinks) {
host.realpath = function (path) { return path; };
}
host.resolveModuleNames = function (moduleNames, containingFile) {

@@ -20,0 +24,0 @@ return moduleNames.map(function (moduleName) {

{
"name": "dts-bundle-generator",
"version": "1.3.0",
"version": "1.4.0",
"description": "DTS Bundle Generator",

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

@@ -60,34 +60,34 @@ [![npm version](https://badge.fury.io/js/dts-bundle-generator.svg)](https://badge.fury.io/js/dts-bundle-generator) [![Build Status](https://travis-ci.org/timocov/dts-bundle-generator.svg?branch=master)](https://travis-ci.org/timocov/dts-bundle-generator)

Options:
--help Show help [boolean]
--out-file, -o File name of generated d.ts [string]
--verbose Enable verbose logging [boolean] [default: false]
--no-check Skip validation of generated d.ts file
[boolean] [default: false]
--fail-on-class Fail if generated dts contains class declaration
[boolean] [default: false]
--external-inlines Array of the package names from node_modules to
inline typings from it.
Used types will just be inlined into output file
[array]
--external-imports Array of the package names from node_modules to
import typings from it.
Used types will be imported by "import { First,
Second } from 'library-name';".
By default all libraries will be imported (except
inlined and libraries from @types) [array]
--external-types Array of the package names from @types to import
typings from it via triple-slash reference directive.
By default all packages are allowed and will be used
according their usages [array]
--umd-module-name The name of UMD module. If specified `export as
namespace ModuleName;` will be emitted [string]
--project The path to a tsconfig.json file that will be used to
compile files [string]
--sort Sort output nodes [boolean] [default: false]
--inline-declare-global Enables inlining of `declare global` statements
contained in files which should be inlined (all local
files and packages from `--external-inlines`)
[boolean] [default: false]
--config File path to generator config file
--version Show version number [boolean]
--help Show help [boolean]
--out-file, -o File name of generated d.ts [string]
--verbose Enable verbose logging [boolean] [default: false]
--no-check Skip validation of generated d.ts file [boolean] [default: false]
--fail-on-class Fail if generated dts contains class declaration
[boolean] [default: false]
--external-inlines Array of the package names from node_modules to inline typings from
it.
Used types will just be inlined into output file [array]
--external-imports Array of the package names from node_modules to import typings from
it.
Used types will be imported by "import { First, Second } from
'library-name';".
By default all libraries will be imported (except inlined and
libraries from @types) [array]
--external-types Array of the package names from @types to import typings from it via
triple-slash reference directive.
By default all packages are allowed and will be used according their
usages [array]
--umd-module-name The name of UMD module. If specified `export as namespace
ModuleName;` will be emitted [string]
--project The path to a tsconfig.json file that will be used to compile files
[string]
--sort Sort output nodes [boolean] [default: false]
--inline-declare-global Enables inlining of `declare global` statements contained in files
which should be inlined (all local files and packages from
`--external-inlines`) [boolean] [default: false]
--disable-symlinks-following (EXPERIMENTAL) Disables resolving symlinks to original path. See
https://github.com/timocov/dts-bundle-generator/issues/39 to more
information [boolean] [default: false]
--config File path to generator config file
--version Show version number [boolean]
```

@@ -94,0 +94,0 @@

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