Compare commits

...

22 Commits

Author SHA1 Message Date
dda03bad45 2.1.57 2022-03-18 14:31:48 +01:00
a0b9f8d8f3 fix(core): update 2022-03-18 14:31:48 +01:00
da823e51d5 2.1.56 2022-03-15 20:06:48 +01:00
b68aa06941 fix(core): update 2022-03-15 20:06:48 +01:00
f5ee2c2c70 2.1.55 2022-03-15 10:21:15 +01:00
0c018e6448 fix(core): update 2022-03-15 10:21:15 +01:00
565c66e4e6 2.1.54 2022-03-15 10:18:09 +01:00
72ad77446c fix(core): update 2022-03-15 10:18:08 +01:00
59ce28395f 2.1.53 2022-03-15 10:04:59 +01:00
cddd7ffd25 fix(core): update 2022-03-15 10:04:59 +01:00
48ef556e6b 2.1.52 2022-03-15 09:59:31 +01:00
0645beb199 fix(core): update 2022-03-15 09:59:30 +01:00
97f52d1016 2.1.51 2022-03-15 09:45:49 +01:00
8d725e2e11 fix(core): update 2022-03-15 09:45:49 +01:00
42b83b888e 2.1.50 2022-03-14 21:46:42 +01:00
832664b667 fix(core): update 2022-03-14 21:46:41 +01:00
4925809030 2.1.49 2022-03-14 16:04:07 +01:00
622a080b3c fix(core): update 2022-03-14 16:04:07 +01:00
18747dbc83 2.1.48 2022-03-12 23:15:28 +01:00
210a7a07f7 fix(core): update 2022-03-12 23:15:28 +01:00
211d42c36b 2.1.47 2022-03-12 21:09:33 +01:00
cfbe4bbcb9 fix(core): update 2022-03-12 21:09:33 +01:00
8 changed files with 272 additions and 631 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env node
process.env.CLI_CALL = 'true';
import * as tsrun from '@gitzone/tsrun';
tsrun.runPath('./cli.ts.child.js');
tsrun.runPath('./cli.child.js');

826
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "@gitzone/tsbuild",
"version": "2.1.46",
"version": "2.1.57",
"private": false,
"description": "TypeScript nightly to easily make use of latest features",
"main": "dist_ts/index.js",
@ -12,7 +12,7 @@
"scripts": {
"test": "tsrun test/test.ts",
"testCustom": "node cli.ts.js custom ts_web",
"build": "node cli.ts.js --web"
"build": "node cli.ts.js --web --allowimplicitany"
},
"repository": {
"type": "git",
@ -30,18 +30,17 @@
"dependencies": {
"@pushrocks/early": "^3.0.6",
"@pushrocks/smartcli": "^3.0.14",
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartfile": "^9.0.6",
"@pushrocks/smartlog": "^2.0.44",
"@pushrocks/smartpath": "^4.0.3",
"@pushrocks/smartpath": "^5.0.4",
"@pushrocks/smartpromise": "^3.1.7",
"typescript": "4.7.0-dev.20220311"
"typescript": "4.7.0"
},
"devDependencies": {
"@gitzone/tsrun": "^1.2.26",
"@pushrocks/tapbundle": "^4.0.8",
"@types/node": "^17.0.21",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
"@gitzone/tsrun": "^1.2.31",
"@pushrocks/tapbundle": "^5.0.2",
"@types/node": "^17.0.21"
},
"files": [
"ts/**/*",

View File

@ -16,17 +16,12 @@ export const compilerOptionsDefault: CompilerOptions = {
module: plugins.typescript.ModuleKind.ES2020,
target: plugins.typescript.ScriptTarget.ES2020,
moduleResolution: plugins.typescript.ModuleResolutionKind.Node12,
lib: [],
noImplicitAny: false,
lib: ['lib.dom.d.ts'],
noImplicitAny: true,
esModuleInterop: true,
importsNotUsedAsValues: plugins.typescript.ImportsNotUsedAsValues.Preserve
};
export const compilerOptionsWebDefault: CompilerOptions = {
...compilerOptionsDefault,
lib: [...compilerOptionsDefault.lib, 'lib.dom.d.ts']
};
/**
* merges compilerOptions with the default compiler options
*/
@ -34,34 +29,41 @@ export const mergeCompilerOptions = (
customTsOptions: CompilerOptions,
argvArg?: any
): CompilerOptions => {
const defaultOptionsToMerge = (() => {
if (argvArg && argvArg.web) {
return compilerOptionsWebDefault;
} else {
return compilerOptionsDefault;
}
})();
// create merged options
const mergedOptions: CompilerOptions = {
...defaultOptionsToMerge,
...compilerOptionsDefault,
...customTsOptions,
...argvArg && argvArg.skiplibcheck ? {
skipLibCheck: true
} : {},
...argvArg && argvArg.allowimplicitany ? {
noImplicitAny: false
} : {},
...argvArg && argvArg.commonjs ? {
module: plugins.typescript.ModuleKind.CommonJS,
moduleResolution: plugins.typescript.ModuleResolutionKind.NodeJs,
} : {},
};
console.log(mergedOptions)
return mergedOptions;
};
/**
* the internal main compiler function that compiles the files
*/
export const compiler = (
export const compiler = async (
fileNames: string[],
options: plugins.typescript.CompilerOptions,
argvArg?: any
): Promise<any[]> => {
if (options.skipLibCheck) {
console.log('? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?')
console.log('You are skipping libcheck... Is that really wanted?');
console.log('? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?')
await plugins.smartdelay.delayFor(5000);
}
console.log(`Compiling ${fileNames.length} files...`);
const done = plugins.smartpromise.defer<any[]>();
const program = plugins.typescript.createProgram(fileNames, options);

View File

@ -38,7 +38,7 @@ export const runCli = async () => {
},
{},
process.cwd(),
{ web: true }
{ web: true, ...argvArg },
);
});

View File

@ -1,7 +1,8 @@
import * as smartcli from '@pushrocks/smartcli';
import * as smartdelay from '@pushrocks/smartdelay';
import * as smartfile from '@pushrocks/smartfile';
import * as smartpath from '@pushrocks/smartpath';
import * as smartpromise from '@pushrocks/smartpromise';
import typescript from 'typescript';
export { smartcli, smartfile, smartpath, smartpromise, typescript };
export { smartcli, smartdelay, smartfile, smartpath, smartpromise, typescript };

View File

@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}