Socket
Socket
Sign inDemoInstall

ts-lib-utils

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.14.5 to 2.14.7

13

dist/tsconfig.js

@@ -114,7 +114,6 @@ "use strict";

async function getRootNames(config, dirname) {
var _a, _b;
const include = config.include;
const exclude = config.exclude || ['node_modules/**'];
if (config.files) {
return config.files.map(f => path.resolve(dirname, f));
}
const files = (_b = (_a = config.files) === null || _a === void 0 ? void 0 : _a.map(f => path.resolve(dirname, f))) !== null && _b !== void 0 ? _b : [];
if (include && Array.isArray(include) && include.length > 0) {

@@ -135,6 +134,10 @@ const rules = [];

}
return globAsync(rules.length === 1 ? rules[0] : `{${rules.join(',')}}`, exclude, dirname);
const includeFiles = await globAsync(rules.length === 1 ? rules[0] : `{${rules.join(',')}}`, exclude, dirname);
return [...files, ...includeFiles];
}
const rootNames = await globAsync(`**/*.{ts,tsx}`, exclude, dirname);
return rootNames.map((r) => path.resolve(process.cwd(), dirname, r));
return [
...files,
...rootNames.map((r) => path.resolve(process.cwd(), dirname, r)),
];
}

@@ -141,0 +144,0 @@ function statAsync(file) {

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

import { __assign, __awaiter, __generator, __values } from "tslib";
import { __assign, __awaiter, __generator, __read, __spread, __values } from "tslib";
import ts from 'typescript';

@@ -136,20 +136,19 @@ import * as fs from 'fs';

function getRootNames(config, dirname) {
var _a, _b;
return __awaiter(this, void 0, void 0, function () {
var include, exclude, rules, include_1, include_1_1, file, currentPath, stats, e_1_1, rootNames;
var e_1, _a;
return __generator(this, function (_b) {
switch (_b.label) {
var include, exclude, files, rules, include_1, include_1_1, file, currentPath, stats, e_1_1, includeFiles, rootNames;
var e_1, _c;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
include = config.include;
exclude = config.exclude || ['node_modules/**'];
if (config.files) {
return [2 /*return*/, config.files.map(function (f) { return path.resolve(dirname, f); })];
}
if (!(include && Array.isArray(include) && include.length > 0)) return [3 /*break*/, 9];
files = (_b = (_a = config.files) === null || _a === void 0 ? void 0 : _a.map(function (f) { return path.resolve(dirname, f); })) !== null && _b !== void 0 ? _b : [];
if (!(include && Array.isArray(include) && include.length > 0)) return [3 /*break*/, 10];
rules = [];
_b.label = 1;
_d.label = 1;
case 1:
_b.trys.push([1, 6, 7, 8]);
_d.trys.push([1, 6, 7, 8]);
include_1 = __values(include), include_1_1 = include_1.next();
_b.label = 2;
_d.label = 2;
case 2:

@@ -161,3 +160,3 @@ if (!!include_1_1.done) return [3 /*break*/, 5];

case 3:
stats = _b.sent();
stats = _d.sent();
if (stats === undefined) {

@@ -172,3 +171,3 @@ rules.push(currentPath);

}
_b.label = 4;
_d.label = 4;
case 4:

@@ -179,3 +178,3 @@ include_1_1 = include_1.next();

case 6:
e_1_1 = _b.sent();
e_1_1 = _d.sent();
e_1 = { error: e_1_1 };

@@ -185,11 +184,14 @@ return [3 /*break*/, 8];

try {
if (include_1_1 && !include_1_1.done && (_a = include_1.return)) _a.call(include_1);
if (include_1_1 && !include_1_1.done && (_c = include_1.return)) _c.call(include_1);
}
finally { if (e_1) throw e_1.error; }
return [7 /*endfinally*/];
case 8: return [2 /*return*/, globAsync(rules.length === 1 ? rules[0] : "{" + rules.join(',') + "}", exclude, dirname)];
case 9: return [4 /*yield*/, globAsync("**/*.{ts,tsx}", exclude, dirname)];
case 10:
rootNames = _b.sent();
return [2 /*return*/, rootNames.map(function (r) { return path.resolve(process.cwd(), dirname, r); })];
case 8: return [4 /*yield*/, globAsync(rules.length === 1 ? rules[0] : "{" + rules.join(',') + "}", exclude, dirname)];
case 9:
includeFiles = _d.sent();
return [2 /*return*/, __spread(files, includeFiles)];
case 10: return [4 /*yield*/, globAsync("**/*.{ts,tsx}", exclude, dirname)];
case 11:
rootNames = _d.sent();
return [2 /*return*/, __spread(files, rootNames.map(function (r) { return path.resolve(process.cwd(), dirname, r); }))];
}

@@ -196,0 +198,0 @@ });

{
"name": "ts-lib-utils",
"version": "2.14.5",
"version": "2.14.7",
"description": "Utils to develop library using typescript",

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc