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

ts-import

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-import - npm Package Compare versions

Comparing version 3.0.0-beta.0 to 3.0.0-beta.1

dist/modules/cross-platform/get-js-after-cache-path.d.ts

4

dist/main.d.ts

@@ -6,4 +6,6 @@ import * as tsc from 'typescript';

}
export declare let defaultLoadOptions: LoadOptions;
export declare let defaultLoadOptions: {
transpileOptions: {};
};
export declare const load: (tsRelativePath: string, options?: Partial<LoadOptions> | undefined) => Promise<any>;
export declare const loadSync: (tsRelativePath: string, options?: Partial<LoadOptions> | undefined) => any;

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

const compiler = require("./modules/compiler");
const crossPlatform = require("./modules/cross-platform");
const path = require("path");

@@ -10,3 +11,2 @@ const utils = require("./utils");

exports.defaultLoadOptions = {
cacheDir: path.resolve(__dirname, `../cache`),
transpileOptions: {},

@@ -17,4 +17,6 @@ };

const cwd = process.cwd();
const cacheDir = path.resolve(__dirname, `..`, `cache`);
const tsPath = path.resolve(cwd, tsRelativePath);
const jsPath = path.join(config.cacheDir, tsPath).replace(/\.[^/.]+$/u, `.js`);
let jsAfterCachePath = crossPlatform.getJsAfterCachePath(tsPath);
const jsPath = path.join(cacheDir, jsAfterCachePath).replace(/\.[^/.]+$/u, `.js`);
const [tsFileExists, jsFileExists] = await Promise.all([

@@ -41,4 +43,6 @@ utils.checkIfFileExists(tsPath),

const cwd = process.cwd();
const cacheDir = path.resolve(__dirname, `..`, `cache`);
const tsPath = path.resolve(cwd, tsRelativePath);
const jsPath = path.join(config.cacheDir, tsPath).replace(/\.[^/.]+$/u, `.js`);
let jsAfterCachePath = crossPlatform.getJsAfterCachePath(tsPath);
const jsPath = path.join(cacheDir, jsAfterCachePath).replace(/\.[^/.]+$/u, `.js`);
const tsFileExists = utils.checkIfFileExistsSync(tsPath);

@@ -45,0 +49,0 @@ let jsFileExists;

@@ -0,0 +0,0 @@ import * as tsc from 'typescript';

@@ -0,0 +0,0 @@ "use strict";

export * from './compile';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ /// <reference types="node" />

@@ -0,0 +0,0 @@ "use strict";

export * from './check-if-file-exists';
export * from './is-file-newer';

@@ -0,0 +0,0 @@ "use strict";

import * as fs from 'fs';
export declare const isFileNewer: (file1: fs.Stats, file2: fs.Stats) => boolean;

@@ -0,0 +0,0 @@ "use strict";

{
"name": "ts-import",
"version": "3.0.0-beta.0",
"version": "3.0.0-beta.1",
"description": "Import (compile and cache on the fly) TypeScript files dynamically with ease.",

@@ -5,0 +5,0 @@ "license": "MIT",

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