Socket
Socket
Sign inDemoInstall

@ts-morph/bootstrap

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ts-morph/bootstrap - npm Package Compare versions

Comparing version 0.12.0 to 0.12.1

14

dist-deno/ts-morph-bootstrap.js

@@ -57,4 +57,7 @@ import { DocumentRegistry, ts, StringUtils, FileUtils, Memoize, TransactionalFileSystem, TsConfigResolver, errors, InMemoryFileSystemHost, RealFileSystemHost, CompilerOptionsContainer, createHosts, runtime, createModuleResolutionHost } from '@ts-morph/common';

let sourceFile = this.sourceFilesByFilePath.get(filePath);
if (sourceFile == null && await this.fileSystemWrapper.fileExists(filePath)) {
sourceFile = this.createSourceFileFromText(filePath, await this.fileSystemWrapper.readFile(filePath, this.compilerOptions.getEncoding()), options);
if (sourceFile == null) {
const fileText = await this.fileSystemWrapper.readFileIfExists(filePath, this.compilerOptions.getEncoding());
if (fileText != null) {
sourceFile = this.createSourceFileFromText(filePath, fileText, options);
}
}

@@ -65,4 +68,7 @@ return sourceFile;

let sourceFile = this.sourceFilesByFilePath.get(filePath);
if (sourceFile == null && this.fileSystemWrapper.fileExistsSync(filePath)) {
sourceFile = this.createSourceFileFromText(filePath, this.fileSystemWrapper.readFileSync(filePath, this.compilerOptions.getEncoding()), options);
if (sourceFile == null) {
const fileText = this.fileSystemWrapper.readFileIfExistsSync(filePath, this.compilerOptions.getEncoding());
if (fileText != null) {
sourceFile = this.createSourceFileFromText(filePath, fileText, options);
}
}

@@ -69,0 +75,0 @@ return sourceFile;

@@ -60,4 +60,7 @@ 'use strict';

let sourceFile = this.sourceFilesByFilePath.get(filePath);
if (sourceFile == null && await this.fileSystemWrapper.fileExists(filePath)) {
sourceFile = this.createSourceFileFromText(filePath, await this.fileSystemWrapper.readFile(filePath, this.compilerOptions.getEncoding()), options);
if (sourceFile == null) {
const fileText = await this.fileSystemWrapper.readFileIfExists(filePath, this.compilerOptions.getEncoding());
if (fileText != null) {
sourceFile = this.createSourceFileFromText(filePath, fileText, options);
}
}

@@ -68,4 +71,7 @@ return sourceFile;

let sourceFile = this.sourceFilesByFilePath.get(filePath);
if (sourceFile == null && this.fileSystemWrapper.fileExistsSync(filePath)) {
sourceFile = this.createSourceFileFromText(filePath, this.fileSystemWrapper.readFileSync(filePath, this.compilerOptions.getEncoding()), options);
if (sourceFile == null) {
const fileText = this.fileSystemWrapper.readFileIfExistsSync(filePath, this.compilerOptions.getEncoding());
if (fileText != null) {
sourceFile = this.createSourceFileFromText(filePath, fileText, options);
}
}

@@ -72,0 +78,0 @@ return sourceFile;

@@ -56,5 +56,9 @@ import { RuntimeDirEntry, ts } from "@ts-morph/common";

copySync(srcPath: string, destPath: string): void;
/** Asynchronously checks if a file exists. */
/** Asynchronously checks if a file exists.
* @remarks Implementers should throw an `errors.FileNotFoundError` when it does not exist.
*/
fileExists(filePath: string): Promise<boolean>;
/** Synchronously checks if a file exists. */
/** Synchronously checks if a file exists.
* @remarks Implementers should throw an `errors.FileNotFoundError` when it does not exist.
*/
fileExistsSync(filePath: string): boolean;

@@ -61,0 +65,0 @@ /** Asynchronously checks if a directory exists. */

{
"name": "@ts-morph/bootstrap",
"version": "0.12.0",
"version": "0.12.1",
"description": "API for getting quickly set up with the TypeScript Compiler API.",

@@ -23,3 +23,3 @@ "keywords": ["typescript", "compiler", "bootstrap"],

"dependencies": {
"@ts-morph/common": "~0.12.0"
"@ts-morph/common": "~0.12.1"
},

@@ -26,0 +26,0 @@ "devDependencies": {

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