Skip to content

Commit

Permalink
update typescript to resolve ci issue (#8338)
Browse files Browse the repository at this point in the history
Co-authored-by: albertxavier100 <[email protected]>
  • Loading branch information
wanlwanl and albertxavier100 authored May 28, 2024
1 parent a488537 commit 04333b3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
23 changes: 18 additions & 5 deletions tools/js-sdk-release-tools/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/js-sdk-release-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"nodemon": "^3.1.0",
"rimraf": "^3.0.2",
"ts-node": "^10.9.2",
"typescript": "^3.9.7"
"typescript": "^5.4.5"
}
}
4 changes: 2 additions & 2 deletions tools/js-sdk-release-tools/src/hlc/generateMgmt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export async function generateMgmt(options: {
logger.logGreen('------------------------------------------------------------');
try {
execSync(cmd, {stdio: 'inherit'});
} catch (e) {
} catch (e: any) {
throw new Error(`An error occurred while generating codes for readme file: "${options.readmeMd}":\nErr: ${e}\nStderr: "${e.stderr}"\nStdout: "${e.stdout}"\nErrorStack: "${e.stack}"`);
}
}
Expand Down Expand Up @@ -154,7 +154,7 @@ export async function generateMgmt(options: {
}
}
}
} catch (e) {
} catch (e: any) {
logger.logError('Error:');
logger.logError(`An error occurred while run build for readme file: "${options.readmeMd}":\nErr: ${e}\nStderr: "${e.stderr}"\nStdout: "${e.stdout}"\nErrorStack: "${e.stack}"`);
if (outputPackageInfo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export async function generateRLCInPipeline(options: {
}
match = regexToExtractAutorestConfig.exec(options.autorestConfig);
}
} catch (e) {
} catch (e: any) {
logger.logError(`Encounter error when parsing autorestConfig from PR comment: \nErr: ${e}\nStderr: "${e.stderr}"\nStdout: "${e.stdout}"\nErrorStack: "${e.stack}"`);
throw e;
}
Expand Down Expand Up @@ -178,7 +178,7 @@ export async function generateRLCInPipeline(options: {
logger.logGreen('------------------------------------------------------------');
try {
execSync(cmd, {stdio: 'inherit', cwd: path.dirname(autorestConfigFilePath)});
} catch (e) {
} catch (e: any) {
throw new Error(`An error occurred while generating codes for readme file: "${options.readmeMd}":\nErr: ${e}\nStderr: "${e.stderr}"\nStdout: "${e.stdout}"\nErrorStack: "${e.stack}"`);
}
}
Expand Down Expand Up @@ -243,7 +243,7 @@ export async function generateRLCInPipeline(options: {
}
addApiViewInfo(outputPackageInfo, packagePath, relativePackagePath);
}
} catch (e) {
} catch (e: any) {
logger.logError('Error:');
if (options.typespecProject) {
logger.logError(`An error occurred while run build for typespec project: "${options.typespecProject}":\nErr: ${e}\nStderr: "${e.stderr}"\nStdout: "${e.stdout}"\nErrorStack: "${e.stack}"`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export async function generateChangelog(packagePath) {
}
}

} catch (e) {
} catch (e: any) {
logger.logError(`Generate changelog failed: ${e.message}`);
} finally {
fs.rmSync(path.join(packagePath, 'changelog-temp'), { recursive: true, force: true });
Expand Down

0 comments on commit 04333b3

Please sign in to comment.