Compare commits

...

10 Commits

Author SHA1 Message Date
5174d9ccc6 1.2.20 2022-03-11 17:56:09 +01:00
e89c3eda66 fix(core): update 2022-03-11 17:56:08 +01:00
6d4c9f390a 1.2.19 2022-03-11 17:26:50 +01:00
3fc3421857 fix(core): update 2022-03-11 17:26:50 +01:00
e1803dabfa 1.2.18 2021-10-06 13:06:25 +02:00
282d8b2b93 fix(core): update 2021-10-06 13:06:24 +02:00
76dd9707fe 1.2.17 2021-06-24 10:58:47 +02:00
269e54c717 fix(core): update 2021-06-24 10:58:46 +02:00
dd33a359c3 1.2.16 2021-06-23 15:57:58 +02:00
0caaac2a67 fix(core): update 2021-06-23 15:57:57 +02:00
4 changed files with 665 additions and 343 deletions

962
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
{
"name": "@gitzone/tsrun",
"version": "1.2.15",
"version": "1.2.20",
"description": "run typescript programs efficiently",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"author": "Lossless GmbH",
"license": "MIT",
"bin": {
@ -15,15 +16,16 @@
"build": "(tsbuild)"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.24",
"@types/node": "^15.12.4",
"@gitzone/tsbuild": "2.1.29",
"@types/node": "^17.0.21",
"node-fetch": "^3.2.2",
"tslint": "^6.1.2",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@pushrocks/smartfile": "^8.0.10",
"ts-node": "^10.0.0",
"typescript": "^4.3.4"
"@pushrocks/smartfile": "^9.0.6",
"ts-node": "^10.7.0",
"typescript": "^4.6.2"
},
"private": false,
"files": [

View File

@ -1,2 +1,10 @@
const textToPost: string = 'Test runs!';
console.log(textToPost);
const run = async () => {
// lets test esm
console.warn('remember to enable esm checks once TypeScript 4.5 is released.')
// const nodeFetch = await import('node-fetch');
}
run();

View File

@ -4,28 +4,19 @@ import { CompilerOptions } from 'typescript';
const defaultTsNodeOptions: tsNode.CreateOptions = {
compilerOptions: {
lib: ['es2017'],
target: <any>'es2017', // Script Target should be a string -> 2 is for ES2015
lib: ['dom'],
target: <any>'es2020', // Script Target should be a string -> 2 is for ES2015
experimentalDecorators: true,
esModuleInterop: true,
strictNullChecks: false,
moduleResolution: <any>'node12',
module: <any>'es2020',
importsNotUsedAsValues: <any>'preserve',
} as CompilerOptions,
skipIgnore: true,
esm: true,
};
if (process.argv.includes('--web')) {
const previousCompilerOptions = defaultTsNodeOptions.compilerOptions as CompilerOptions;
defaultTsNodeOptions.compilerOptions = {
...previousCompilerOptions,
lib: ['es2016', 'es2017', 'dom'],
target: <any>'es2017', // Script Target should be a string -> 2 is for ES2015
};
}
if (process.argv.includes('--nocache')) {
// currently caching is not used
}
tsNode.register(defaultTsNodeOptions);
export const runCli = async () => {
@ -35,6 +26,7 @@ export const runCli = async () => {
const pathToTsFile = process.argv[2];
const pathToLoad = path.join(process.cwd(), pathToTsFile);
process.argv.pop();
process.argv.splice(2, 1);
// console.log(process.argv);
import(pathToLoad);
};