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.30 to 0.0.32-1

readme/description.md

3

dist/index.d.ts

@@ -1,2 +0,1 @@

/// <reference types="node" />
export interface ICompilerOptions {

@@ -22,5 +21,5 @@ logger?: Partial<Console>;

compile(tsPath?: string): Promise<any>;
buildCachedScripts(absoluteTsPath: string): Promise<Buffer[]>;
buildCachedScripts(absoluteTsPath: string): Promise<unknown>;
wasModified(tsFilePath: string, jsFilePath: string): Promise<boolean>;
}
export declare const tsImport: Compiler;

@@ -124,8 +124,20 @@ "use strict";

logger.info("Compiling " + absoluteTsPath);
return Promise.all([
// Compile new scripts.ts to .js.
childProcess.execSync("tsc " + absoluteTsPath + " --rootDir / --outDir " + cacheDir + " " + flags.join(' '), {
stdio: 'inherit'
}),
]);
// Compile new scripts.ts to .js.
return new Promise(function (resolve, reject) {
childProcess.exec("tsc " + absoluteTsPath + " --rootDir / --outDir " + cacheDir + " " + flags.join(' '), function (err, stdout, stderr) {
if (err) {
reject(err);
return;
}
if (stdout.trim()) {
console.log(stdout);
}
if (stderr.trim()) {
console.error(stderr);
reject(stderr);
return;
}
resolve();
});
});
};

@@ -132,0 +144,0 @@ Compiler.prototype.wasModified = function (tsFilePath, jsFilePath) {

{
"name": "ts-import",
"version": "0.0.30",
"license": "GPL-3.0",
"author": "Artur Kurowski <radarsu@gmail.com>",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"preinstall": "npx only-allow pnpm",
"asdf": "echo 'ASDF'"
},
"dependencies": {
"ts-options-defaults": "0.0.30"
},
"devDependencies": {
"@radrat/cli": "0.0.30",
"typescript": "^3.9.5"
}
"name": "ts-import",
"version": "0.0.32-1",
"description": "Import (compile and cache on the fly) TypeScript files dynamically with ease.",
"keywords": [
"compile",
"dynamic",
"import",
"require",
"typescript"
],
"author": "Artur Kurowski <radarsu@gmail.com>",
"homepage": "https://github.com/radarsu/ts-import#readme",
"license": "GPL-3.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"preinstall": "npx only-allow pnpm"
},
"dependencies": {
"ts-options-defaults": "workspace:*"
},
"devDependencies": {
"@radrat-node/execute": "workspace:*",
"@radrat-scripts/package": "workspace:*",
"@radrat/cli": "workspace:*",
"@types/node": "^14.0.27",
"typescript": "^3.9.7"
}
}

@@ -0,6 +1,6 @@

import { packageScripts } from '@radrat-scripts/package';
import { IRadratCli } from '@radrat/cli';
import { packageScripts } from '../../tools/rr/package';
export const scope = `ts-import`;
const scripts = async (cli: IRadratCli) => {
const scope = `ts-import`;
await packageScripts(cli, scope);

@@ -7,0 +7,0 @@ };

@@ -1,17 +0,12 @@

import { execute } from '../../../tools/packages/execute';
import { execute } from '@radrat-node/execute';
export const bootstrap = async () => {
let release = process.argv[2];
if (release) {
release = release.replace(/-/g, '');
}
await execute(`ts-node ./scripts/build.ts`);
await execute(`git init`);
await execute(`git remote add origin https://github.com/radarsu/ts-options-defaults`);
await execute(`git add .`);
await execute(`git commit -m 'chore: update'`);
await execute(`git push origin master`);
await execute(`rm -rf .git`);
await execute(`npm version ${release || 'prerelease'}`);
await execute(`rr ts-import build`);
// await execute(`git init`);
// await execute(`git remote add origin https://github.com/radarsu/ts-options-defaults`);
// await execute(`git add .`);
// await execute(`git commit -m 'chore: update'`);
// await execute(`git push origin master`);
// await execute(`rm -rf .git`);
await execute(`npm version prerelease`);
await execute(`npm publish --access=public`);

@@ -18,0 +13,0 @@ };

@@ -88,8 +88,23 @@ import * as childProcess from 'child_process';

return Promise.all([
// Compile new scripts.ts to .js.
childProcess.execSync(`tsc ${absoluteTsPath} --rootDir / --outDir ${cacheDir} ${flags.join(' ')}`, {
stdio: 'inherit',
}),
]);
// Compile new scripts.ts to .js.
return new Promise((resolve, reject) => {
childProcess.exec(`tsc ${absoluteTsPath} --rootDir / --outDir ${cacheDir} ${flags.join(' ')}`, (err, stdout, stderr) => {
if (err) {
reject(err);
return;
}
if (stdout.trim()) {
console.log(stdout);
}
if (stderr.trim()) {
console.error(stderr);
reject(stderr);
return;
}
resolve();
});
});
}

@@ -96,0 +111,0 @@

{
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"downlevelIteration": true,
"module": "commonjs",
"outDir": "./dist",
"resolveJsonModule": true,
"rootDir": "./src"
},
"exclude": ["node_modules", "dist", "scripts", "scripts.ts"]
"extends": "../../tsconfig.json"
}
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