Skip to content

Commit f62e4dd

Browse files
author
Andreas Richter
committed
fix(bundling): enclosing paths with quotes
1 parent 364ce86 commit f62e4dd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/aws-cdk-lib/aws-lambda-nodejs/lib/bundling.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ export class Bundling implements cdk.BundlingOptions {
255255
...defines.map(([key, value]) => `--define:${key}=${JSON.stringify(value)}`),
256256
...this.props.logLevel ? [`--log-level=${this.props.logLevel}`] : [],
257257
...this.props.keepNames ? ['--keep-names'] : [],
258-
...this.relativeTsconfigPath ? [`--tsconfig=${pathJoin(options.inputDir, this.relativeTsconfigPath)}`] : [],
259-
...this.props.metafile ? [`--metafile=${pathJoin(options.outputDir, 'index.meta.json')}`] : [],
258+
...this.relativeTsconfigPath ? [`--tsconfig="${pathJoin(options.inputDir, this.relativeTsconfigPath)}"`] : [],
259+
...this.props.metafile ? [`--metafile="${pathJoin(options.outputDir, 'index.meta.json')}"`] : [],
260260
...this.props.banner ? [`--banner:js=${JSON.stringify(this.props.banner)}`] : [],
261261
...this.props.footer ? [`--footer:js=${JSON.stringify(this.props.footer)}`] : [],
262262
...this.props.mainFields ? [`--main-fields=${this.props.mainFields.join(',')}`] : [],

packages/aws-cdk-lib/aws-lambda-nodejs/test/bundling.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ test('esbuild bundling with esbuild options', () => {
262262
'--target=es2020 --platform=node --format=esm --outfile="/asset-output/index.mjs"',
263263
`--minify --sourcemap --sources-content=false --external:${STANDARD_EXTERNAL} --loader:.png=dataurl`,
264264
defineInstructions,
265-
'--log-level=silent --keep-names --tsconfig=/asset-input/lib/custom-tsconfig.ts',
266-
'--metafile=/asset-output/index.meta.json --banner:js="/* comments */" --footer:js="/* comments */"',
265+
'--log-level=silent --keep-names --tsconfig="/asset-input/lib/custom-tsconfig.ts"',
266+
'--metafile="/asset-output/index.meta.json" --banner:js="/* comments */" --footer:js="/* comments */"',
267267
'--main-fields=module,main --inject:"./my-shim.js" --inject:"./path with space/second-shim.js"',
268268
'--log-limit="0" --resolve-extensions=".ts,.js" --splitting --keep-names --out-extension:".js=.mjs"',
269269
].join(' '),
@@ -777,7 +777,7 @@ test('esbuild bundling with projectRoot', () => {
777777
bundling: expect.objectContaining({
778778
command: [
779779
'bash', '-c',
780-
`esbuild --bundle "/asset-input/lib/index.ts" --target=${STANDARD_TARGET} --platform=node --outfile="/asset-output/index.js" --external:${STANDARD_EXTERNAL} --tsconfig=/asset-input/lib/custom-tsconfig.ts`,
780+
`esbuild --bundle "/asset-input/lib/index.ts" --target=${STANDARD_TARGET} --platform=node --outfile="/asset-output/index.js" --external:${STANDARD_EXTERNAL} --tsconfig="/asset-input/lib/custom-tsconfig.ts"`,
781781
],
782782
}),
783783
});

0 commit comments

Comments
 (0)