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.1.1 to 6.1.2

6

config-schema.d.ts

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

// Generated by dts-bundle-generator v6.1.0
// Generated by dts-bundle-generator v6.1.2

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

includeJSDocTags?: string[];
/**
* Only include nodes in source files that either match these paths, or are a descendant of one of these paths.
*/
includePaths?: string[];
}

@@ -71,0 +75,0 @@

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

})
.option('include-paths', {
type: 'array',
description: 'Only include nodes in source files that either match these paths, or are a descendant of one of these paths.',
coerce: toStringsArray,
})
.option('config', {

@@ -204,2 +209,3 @@ type: 'string',

includeJSDocTags: args['include-jsdoc-tags'],
includePaths: args['include-paths'],
},

@@ -206,0 +212,0 @@ failOnClass: args['fail-on-class'],

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

// Generated by dts-bundle-generator v6.1.0
// Generated by dts-bundle-generator v6.1.2

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

includeJSDocTags?: string[];
/**
* Only include nodes in source files that either match these paths, or are a descendant of one of these paths.
*/
includePaths?: string[];
}

@@ -71,0 +75,0 @@

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

includeJSDocTags: [check_schema_match_1.schemaPrimitiveValues.string],
includePaths: [check_schema_match_1.schemaPrimitiveValues.string],
},

@@ -65,0 +66,0 @@ },

@@ -13,2 +13,5 @@ "use strict";

exports.generateOutput = void 0;
var fs = require("fs");
var path = require("path");
var process = require("process");
var ts = require("typescript");

@@ -40,3 +43,26 @@ var typescript_1 = require("./helpers/typescript");

}
var statements = params.statements.map(function (statement) { return getStatementText(statement, params); });
var statements = params.statements
.filter(function (statement) {
if (!options.includePaths) {
return true;
}
var relPath = path.relative(process.cwd(), statement.getSourceFile().fileName);
for (var _i = 0, _a = options.includePaths; _i < _a.length; _i++) {
var includePath = _a[_i];
var stat = fs.statSync(includePath);
if (stat.isDirectory() &&
relPath.startsWith(path.normalize(includePath + path.sep))) {
return true;
}
if (stat.isFile() && (relPath === includePath ||
// If includePath is a TypeScript file then also look for a
// type declaration file of the same name, since that's
// probably what it has been included as.
relPath === includePath.replace(/\.ts$/, '.d.ts'))) {
return true;
}
}
return false;
})
.map(function (statement) { return getStatementText(statement, params); });
if (options.sortNodes) {

@@ -43,0 +69,0 @@ statements.sort(compareStatementText);

4

package.json
{
"name": "@quip/dts-bundle-generator",
"version": "6.1.1",
"description": "DTS Bundle Generator",
"version": "6.1.2",
"description": "DTS Bundle Generator (Quip)",
"main": "dist/bundle-generator.js",

@@ -6,0 +6,0 @@ "typings": "dist/bundle-generator.d.ts",

<!-- markdownlint-disable MD033 -->
## Quip instructions
We keep the master branch in sync with the original timocov project
(with the exception of the commit that modified this README)
then use branches named after each released version alongside tags.
Here are instructions for how to checkout, modify, and publish the code:
```sh
# If you haven't added the original project as a remote already.
> git remote add timocov https://github.com/timocov/dts-bundle-generator
# If you haven't logged into npm already.
> npm login
username: ospreyquip
password: p4ssw0rd # get the real password from LastPass :-)
email: ospreyquip@gmail.com
# 1. Fetch the newest version.
> git fetch -a
# 2. Fast-forward our master.
> git checkout master
> git rebase timocov/master
> git push -f
# 3. Create a new branch based on the most recent quip branch.
# If the minor version on master has incremented then use that
# as the new version (A), otherwise bump the patch version (B).
> git tag | grep quip- | tail -n1
quip-v6.1.0
> git tag | grep -v quip- | tail -n1
# A:
v6.2.0
> git checkout --track origin/quip-v6.1.0 -b quip-v6.2.0
# B:
v6.1.0
> git checkout --track origin/quip-v6.1.0 -b quip-v6.1.1
# 4. Rebase onto master to get the most recent version of the code.
# There will probably be some package.json conflicts, but we're
# about to resolve that.
> git rebase master
# 5. Set the version of the package to correspond to the version
# that you used in step 4.
> vim package.json
# 6. Make your changes, commit, then tag with our new version.
> git commit -am "Made changes XYZ"
> git tag quip-v6.2.0
> git push --tags
# 7. When you're ready to release, test your code, then publish.
> npm test
> npm run prepare-release
> npm publish
# 8. The prepare-release step above will have modified package.json,
# so restore it back again.
> git checkout HEAD package.json
```
<div align="center">

@@ -31,9 +94,9 @@ <a href="https://github.com/timocov/dts-bundle-generator">

// entry.ts
import { A } from './a';
import { B } from './b';
import { A } from "./a";
import { B } from "./b";
declare function makeA(): A;
export function makeB(): B {
makeA();
return new B();
makeA();
return new B();
}

@@ -45,4 +108,3 @@ ```

```ts
declare class B {
}
declare class B {}
export declare function makeB(): B;

@@ -55,11 +117,11 @@ ```

```bash
npm install --save-dev dts-bundle-generator
```
```bash
npm install --save-dev dts-bundle-generator
```
or
or
```bash
npm install -g dts-bundle-generator
```
```bash
npm install -g dts-bundle-generator
```

@@ -151,12 +213,10 @@ 1. Enable `declaration` compiler option in `tsconfig.json`

declare module "a" {
export class A {
}
export class A {}
}
declare module "b" {
export class B {
}
export class B {}
}
declare module "entry" {
import { B } from "b";
export function makeB(): B;
import { B } from "b";
export function makeB(): B;
}

@@ -176,3 +236,2 @@ ```

[ci-link]: https://github.com/timocov/dts-bundle-generator/actions?query=branch%3Amaster
[npm-version-img]: https://badge.fury.io/js/dts-bundle-generator.svg

@@ -179,0 +238,0 @@ [npm-downloads-img]: https://img.shields.io/npm/dm/dts-bundle-generator.svg

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