Socket
Socket
Sign inDemoInstall

@ssen/collect-dependencies

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ssen/collect-dependencies - npm Package Compare versions

Comparing version 1.0.0-alpha.1 to 1.0.0-alpha.3

6

collectDependencies.d.ts

@@ -23,4 +23,8 @@ import { PackageJson } from 'type-fest';

selfNames?: Set<string>;
fixImportPath?: (args: {
importPath: string;
filePath: string;
}) => string;
}
export declare function collectDependencies({ rootDir, internalPackages, externalPackages, extensions, excludes, includes, compilerOptions, selfNames, }: CollectDependenciesParams): Promise<PackageJson.Dependency>;
export declare function collectDependencies({ rootDir, internalPackages, externalPackages, extensions, excludes, includes, compilerOptions, selfNames, fixImportPath, }: CollectDependenciesParams): Promise<PackageJson.Dependency>;
export {};

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

};
function collectDependencies({ rootDir, internalPackages, externalPackages, extensions = exports.collectTypeScript.extensions, excludes = exports.collectTypeScript.excludes, includes = exports.collectTypeScript.includes, compilerOptions = {}, selfNames = new Set(), }) {
function collectDependencies({ rootDir, internalPackages, externalPackages, extensions = exports.collectTypeScript.extensions, excludes = exports.collectTypeScript.excludes, includes = exports.collectTypeScript.includes, compilerOptions = {}, selfNames = new Set(), fixImportPath, }) {
return __awaiter(this, void 0, void 0, function* () {

@@ -63,3 +63,9 @@ compilerOptions = Object.assign(Object.assign({ allowJs: extensions.some((ext) => /^.js/.test(ext)) }, compilerOptions), { rootDir });

node.moduleSpecifier.text) {
importPaths.add(node.moduleSpecifier.text);
const importPath = node.moduleSpecifier.text;
importPaths.add(typeof fixImportPath === 'function'
? fixImportPath({
importPath,
filePath: file,
})
: importPath);
}

@@ -70,3 +76,9 @@ // import('?')

typescript_1.default.isStringLiteralLike(node.arguments[0])) {
importPaths.add(node.arguments[0].text);
const importPath = node.arguments[0].text;
importPaths.add(typeof fixImportPath === 'function'
? fixImportPath({
importPath,
filePath: file,
})
: importPath);
}

@@ -80,3 +92,9 @@ // require.resolve('?')

typescript_1.default.isStringLiteralLike(node.arguments[0])) {
importPaths.add(node.arguments[0].text);
const importPath = node.arguments[0].text;
importPaths.add(typeof fixImportPath === 'function'
? fixImportPath({
importPath,
filePath: file,
})
: importPath);
}

@@ -88,3 +106,9 @@ // require('?')

typescript_1.default.isStringLiteralLike(node.arguments[0])) {
importPaths.add(node.arguments[0].text);
const importPath = node.arguments[0].text;
importPaths.add(typeof fixImportPath === 'function'
? fixImportPath({
importPath,
filePath: file,
})
: importPath);
}

@@ -91,0 +115,0 @@ typescript_1.default.forEachChild(node, search);

2

package.json

@@ -14,3 +14,3 @@ {

"name": "@ssen/collect-dependencies",
"version": "1.0.0-alpha.1",
"version": "1.0.0-alpha.3",
"dependencies": {

@@ -17,0 +17,0 @@ "type-fest": "^0.15.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