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 0.0.7 to 0.0.8

2

dist/index.d.ts

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

compile(relativeTsPath?: string): Promise<any>;
buildCachedScripts(relativeTsPath: string, cachedFile: string): Promise<Buffer[]>;
buildCachedScripts(relativeTsPath: string, cachedDir: string, jsFileName: string): Promise<Buffer[]>;
wasModified(tsFilePath: string, jsFilePath: string): Promise<boolean>;
}
export declare const tsImport: Compiler;

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

// Cache is incorrect, rebuild.
return [4 /*yield*/, this.buildCachedScripts(relativeTsPath, cachedFile)];
return [4 /*yield*/, this.buildCachedScripts(relativeTsPath, cachedDir, jsFileName)];
case 2:

@@ -110,3 +110,3 @@ // Cache is incorrect, rebuild.

// Build cache.
return [4 /*yield*/, this.buildCachedScripts(relativeTsPath, cachedFile)];
return [4 /*yield*/, this.buildCachedScripts(relativeTsPath, cachedDir, jsFileName)];
case 4:

@@ -120,8 +120,8 @@ // Build cache.

};
Compiler.prototype.buildCachedScripts = function (relativeTsPath, cachedFile) {
var flags = this.options.flags;
this.options.logger.info("Compiling " + relativeTsPath + " to " + cachedFile + "...");
Compiler.prototype.buildCachedScripts = function (relativeTsPath, cachedDir, jsFileName) {
var _a = this.options, flags = _a.flags, cacheDir = _a.cacheDir;
this.options.logger.info("Compiling " + relativeTsPath + " to " + cacheDir + "...");
return Promise.all([
// Compile new scripts.ts to .js.
childProcess.execSync("tsc " + relativeTsPath + " --outFile " + cachedFile + " " + flags.join(' '), {
childProcess.execSync("tsc " + relativeTsPath + " --rootDir " + process.cwd() + " --outDir " + cacheDir + " " + flags.join(' '), {
stdio: 'inherit'

@@ -128,0 +128,0 @@ }),

{
"name": "ts-import",
"version": "0.0.7",
"version": "0.0.8",
"license": "GPL-3.0",

@@ -5,0 +5,0 @@ "author": "Artur Kurowski <radarsu@gmail.com>",

@@ -60,3 +60,3 @@ import * as childProcess from 'child_process';

// Cache is incorrect, rebuild.
await this.buildCachedScripts(relativeTsPath, cachedFile);
await this.buildCachedScripts(relativeTsPath, cachedDir, jsFileName);
return import(cachedFile);

@@ -73,14 +73,14 @@ }

// Build cache.
await this.buildCachedScripts(relativeTsPath, cachedFile);
await this.buildCachedScripts(relativeTsPath, cachedDir, jsFileName);
return import(cachedFile);
}
buildCachedScripts(relativeTsPath: string, cachedFile: string) {
const { flags } = this.options;
buildCachedScripts(relativeTsPath: string, cachedDir: string, jsFileName: string) {
const { flags, cacheDir } = this.options;
this.options.logger.info(`Compiling ${relativeTsPath} to ${cachedFile}...`);
this.options.logger.info(`Compiling ${relativeTsPath} to ${cacheDir}...`);
return Promise.all([
// Compile new scripts.ts to .js.
childProcess.execSync(`tsc ${relativeTsPath} --outFile ${cachedFile} ${flags.join(' ')}`, {
childProcess.execSync(`tsc ${relativeTsPath} --rootDir ${process.cwd()} --outDir ${cacheDir} ${flags.join(' ')}`, {
stdio: 'inherit',

@@ -87,0 +87,0 @@ }),

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