Comparing version 0.0.30 to 0.0.32-1
@@ -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" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1
5
18535
5
12
323
- Removedts-options-defaults@0.0.30(transitive)