31 changes: 18 additions & 13 deletions tools/@aws-cdk/cdk-build-tools/lib/os.ts
Expand Up @@ -15,19 +15,24 @@ interface ShellOptions {
* Is platform-aware, handles errors nicely.
*/
export async function shell(command: string[], options: ShellOptions = {}): Promise<string> {
const timer = (options.timers || new Timers()).start(command[0]);

await makeShellScriptExecutable(command[0]);

const child = child_process.spawn(command[0], command.slice(1), {
// Need this for Windows where we want .cmd and .bat to be found as well.
shell: true,
stdio: ['ignore', 'pipe', 'pipe'],
env: {
...process.env,
...options.env,
},
});
const [cmd, ...args] = command;
const timer = (options.timers || new Timers()).start(cmd);

await makeShellScriptExecutable(cmd);

// yarn exec runs the provided command with the correct environment for the workspace.
const child = child_process.spawn(
cmd,
args,
{
// Need this for Windows where we want .cmd and .bat to be found as well.
shell: true,
stdio: ['ignore', 'pipe', 'pipe'],
env: {
...process.env,
...options.env,
},
});

const makeRed = process.stderr.isTTY ? chalk.red : (x: string) => x;

Expand Down
2 changes: 1 addition & 1 deletion tools/@aws-cdk/cdk-build-tools/package.json
Expand Up @@ -66,7 +66,7 @@
"nyc": "^15.1.0",
"semver": "^7.5.1",
"ts-jest": "^29.1.0",
"typescript": "~4.9.5",
"typescript": "~5.1.3",
"yargs": "^16.2.0"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion tools/@aws-cdk/cdk-release/lib/lifecycles/bumphooks.ts
Expand Up @@ -41,7 +41,7 @@ export async function runBumpHooks(args: BumpOptions): Promise<Set<string>> {
cwd: args.repoRoot,
});
} catch (e: any) {
notify(args, '%s', e.message);
notify(args, '%s', [e.message]);
}

if (gitStatus) {
Expand Down
2 changes: 1 addition & 1 deletion tools/@aws-cdk/eslint-plugin/package.json
Expand Up @@ -19,7 +19,7 @@
"@types/jest": "^29.5.1",
"@types/estree": "*",
"jest": "^29.5.0",
"typescript": "~4.9.5"
"typescript": "~5.1.3"
},
"dependencies": {
"@typescript-eslint/parser": "^4.33.0",
Expand Down
38 changes: 19 additions & 19 deletions tools/@aws-cdk/node-bundle/package.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/@aws-cdk/pkglint/package.json
Expand Up @@ -51,7 +51,7 @@
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^24.7.0",
"jest": "^29.5.0",
"typescript": "~4.9.5"
"typescript": "~5.1.3"
},
"nozem": {
"ostools": [
Expand Down
2 changes: 1 addition & 1 deletion tools/@aws-cdk/prlint/package.json
Expand Up @@ -25,7 +25,7 @@
"@types/jest": "^29.5.1",
"jest": "^29.5.0",
"make-runnable": "^1.4.1",
"typescript": "~4.9.5"
"typescript": "~5.1.3"
},
"jest": {
"testMatch": [
Expand Down
2 changes: 1 addition & 1 deletion tools/@aws-cdk/yarn-cling/package.json
Expand Up @@ -43,7 +43,7 @@
"@types/semver": "^7.5.0",
"@types/yarnpkg__lockfile": "^1.1.5",
"jest": "^29.5.0",
"typescript": "~4.9.5"
"typescript": "~5.1.3"
},
"dependencies": {
"@yarnpkg/lockfile": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Expand Up @@ -12167,7 +12167,7 @@ typescript-json-schema@^0.56.0:
typescript "~4.9.5"
yargs "^17.1.1"

"typescript@>=3 < 6":
"typescript@>=3 < 6", typescript@~5.1.3:
version "5.1.3"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz#8d84219244a6b40b6fb2b33cc1c062f715b9e826"
integrity sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==
Expand Down