Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion node/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "ES5",
"target": "es2020",
"module": "commonjs",
"declaration": false,
"moduleResolution": "node"
Expand Down
10 changes: 6 additions & 4 deletions node/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export function _loc(key: string, ...param: any[]): string {
* @param name name of the variable to get
* @returns string
*/
export function _getVariable(name: string): string | undefined {
export function _getVariable(name: string, skipDebug: boolean = false): string | undefined {
let varval: string | undefined;

// get the metadata
Expand All @@ -279,7 +279,9 @@ export function _getVariable(name: string): string | undefined {
}
}

_debug(name + '=' + varval);
if (!skipDebug) {
_debug(name + '=' + varval);
}
return varval;
}

Expand Down Expand Up @@ -344,8 +346,8 @@ export function _error(
);
}

const debugMode = _getVariable('system.debug')?.toLowerCase() === 'true';
const shouldCheckDebugMode = _getVariable('DistributedTask.Tasks.Node.SkipDebugLogsWhenDebugModeOff')?.toLowerCase() === 'true';
const debugMode = _getVariable('system.debug', true)?.toLowerCase() === 'true';
const shouldCheckDebugMode = _getVariable('DistributedTask.Tasks.Node.SkipDebugLogsWhenDebugModeOff', true)?.toLowerCase() === 'true';

export function _debug(message: string): void {
if (
Expand Down
5 changes: 3 additions & 2 deletions node/make.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ target.build = function() {
cp(rp('ThirdPartyNotice.txt'), buildPath);
cp('-Rf', rp('Strings'), buildPath);
// just a bootstrap file to avoid /// in final js and .d.ts file
rm(path.join(buildPath, 'index.*'));
// Use force flag so build doesn't fail if files don't exist
rm('-f', path.join(buildPath, 'index.*'));
}

target.test = async function() {
Expand All @@ -44,7 +45,7 @@ target.test = async function() {
cp('-Rf', rp('test/fakeTasks'), testPath);
process.env['TASKLIB_INPROC_UNITS'] = '1'; // export task-lib internals for internal unit testing
set('+e'); // Don't throw an exception when tests fail
run('mocha ' + testPath);
run('npx mocha ' + testPath);
}

target.loc = function() {
Expand Down
Loading
Loading