New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@file-services/typescript

Package Overview
Dependencies
Maintainers
4
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@file-services/typescript - npm Package Compare versions

Comparing version 5.4.0 to 5.4.3

1

dist/create-host.d.ts

@@ -8,2 +8,3 @@ import ts from 'typescript';

export interface IBaseHost extends ts.ParseConfigHost, ts.FormatDiagnosticsHost, ts.ModuleResolutionHost {
useCaseSensitiveFileNames: boolean;
getCurrentDirectory: IFileSystemSync['cwd'];

@@ -10,0 +11,0 @@ directoryExists: IFileSystemSync['directoryExistsSync'];

26

dist/create-host.js

@@ -26,17 +26,10 @@ "use strict";

const directories = [];
const { stackTraceLimit } = Error;
try {
Error.stackTraceLimit = 0;
const dirEntries = readdirSync(path);
for (const entryName of dirEntries) {
const entryStats = statSync(join(path, entryName));
if (!entryStats) {
continue;
for (const entry of readdirSync(path, { withFileTypes: true })) {
if (entry.isFile()) {
files.push(entry.name);
}
if (entryStats.isFile()) {
files.push(entryName);
else if (entry.isDirectory()) {
directories.push(entry.name);
}
else if (entryStats.isDirectory()) {
directories.push(entryName);
}
}

@@ -47,8 +40,5 @@ }

}
finally {
Error.stackTraceLimit = stackTraceLimit;
}
return { files, directories };
}
function realpath(path) {
function realpathSyncSafe(path) {
const { stackTraceLimit } = Error;

@@ -68,3 +58,3 @@ try {

readDirectory(rootDir, extensions, excludes, includes, depth) {
return typescript_1.default.matchFiles(rootDir, extensions, excludes, includes, caseSensitive, rootDir, depth, getFileSystemEntries, realpath, directoryExistsSync);
return typescript_1.default.matchFiles(rootDir, extensions, excludes, includes, caseSensitive, rootDir, depth, getFileSystemEntries, realpathSyncSafe, directoryExistsSync);
},

@@ -106,3 +96,3 @@ getDirectories(path) {

getNewLine: defaultGetNewLine,
realpath,
realpath: realpathSyncSafe,
dirname,

@@ -109,0 +99,0 @@ normalize,

{
"name": "@file-services/typescript",
"description": "Helpers for creation of TypeScript hosts",
"version": "5.4.0",
"version": "5.4.3",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "peerDependencies": {

@@ -13,2 +13,3 @@ import ts from 'typescript';

export interface IBaseHost extends ts.ParseConfigHost, ts.FormatDiagnosticsHost, ts.ModuleResolutionHost {
useCaseSensitiveFileNames: boolean;
getCurrentDirectory: IFileSystemSync['cwd'];

@@ -55,27 +56,17 @@ directoryExists: IFileSystemSync['directoryExistsSync'];

const { stackTraceLimit } = Error;
try {
Error.stackTraceLimit = 0;
const dirEntries = readdirSync(path);
for (const entryName of dirEntries) {
const entryStats = statSync(join(path, entryName));
if (!entryStats) {
continue;
for (const entry of readdirSync(path, { withFileTypes: true })) {
if (entry.isFile()) {
files.push(entry.name);
} else if (entry.isDirectory()) {
directories.push(entry.name);
}
if (entryStats.isFile()) {
files.push(entryName);
} else if (entryStats.isDirectory()) {
directories.push(entryName);
}
}
} catch {
/* */
} finally {
Error.stackTraceLimit = stackTraceLimit;
}
return { files, directories };
}
function realpath(path: string): string {
function realpathSyncSafe(path: string): string {
const { stackTraceLimit } = Error;

@@ -103,3 +94,3 @@ try {

getFileSystemEntries,
realpath,
realpathSyncSafe,
directoryExistsSync

@@ -139,3 +130,3 @@ );

getNewLine: defaultGetNewLine,
realpath,
realpath: realpathSyncSafe,
dirname,

@@ -142,0 +133,0 @@ normalize,

Sorry, the diff of this file is not supported yet

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