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

filing-cabinet

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filing-cabinet - npm Package Compare versions

Comparing version 2.3.3 to 2.4.1

21

index.js

@@ -5,3 +5,2 @@ 'use strict';

const debug = require('debug')('cabinet');
const fs = require('fs');

@@ -185,5 +184,3 @@ /*

const defaultTsConfig = {
compilerOptions: {}
};
let compilerOptions = {};

@@ -197,3 +194,2 @@ if (!ts) {

if (!tsConfig) {
tsConfig = defaultTsConfig;
debug('no tsconfig given, defaulting');

@@ -205,3 +201,4 @@

try {
tsConfig = JSON.parse(fs.readFileSync(tsConfig, 'utf8'));
const tsParsedConfig = ts.readJsonConfigFile(tsConfig, ts.sys.readFile);
compilerOptions = ts.parseJsonSourceFileConfigFileContent(tsParsedConfig, ts.sys, path.dirname(tsConfig)).options;
debug('successfully parsed tsconfig');

@@ -212,2 +209,4 @@ } catch (e) {

}
} else {
compilerOptions = ts.convertCompilerOptionsFromJson(tsConfig.compilerOptions).options;
}

@@ -218,13 +217,11 @@

const {options} = ts.convertCompilerOptionsFromJson(tsConfig.compilerOptions);
// Preserve for backcompat. Consider removing this as a breaking change.
if (!options.module) {
options.module = ts.ModuleKind.AMD;
if (!compilerOptions.module) {
compilerOptions.module = ts.ModuleKind.AMD;
}
const host = ts.createCompilerHost({});
debug('with options: ', options);
debug('with options: ', compilerOptions);
const namedModule = ts.resolveModuleName(dependency, filename, options, host);
const namedModule = ts.resolveModuleName(dependency, filename, compilerOptions, host);
let result = '';

@@ -231,0 +228,0 @@

{
"name": "filing-cabinet",
"version": "2.3.3",
"version": "2.4.1",
"description": "Find files based on partial paths",

@@ -50,2 +50,3 @@ "main": "index.js",

"debug": "^4.1.1",
"decomment": "^0.9.2",
"enhanced-resolve": "^4.1.0",

@@ -52,0 +53,0 @@ "is-relative-path": "^1.0.2",

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