Skip to content

Conversation

@mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Nov 13, 2025

Issue # (if applicable)

When running yarn package inside aws-cdk-lib, a pre package command is executed to minify all source files.
This command unintentionally minifies checked-in files that should not be minified, as demonstrated by the diff that is present afterwards.

image

Reason for this change

Fix the above bug.

Description of changes

Adjusted the find command to exclude files we don't want to minify.

Describe any new or updated permissions being added

n/a

Description of how you validated changes

Now no unintentionally minified files are showing up in the diff.

I have compared the outputs of the previous and updated find commands:

< ./aws-appsync/test/integ-assets/appsync-js-pipeline.js
< ./aws-appsync/test/integ-assets/appsync-js-resolver.js
< ./aws-appsync/test/integ-assets/js-resolver-assertion/index.js
< ./aws-appsync/test/verify/eventapi-lambda-direct/handler.js
< ./aws-appsync/test/verify/eventapi-lambda-ds/handler.js
< ./aws-appsync/test/verify/iam-query/iam-query.js
< ./aws-appsync/test/verify/lambda-tutorial/lambda-tutorial.js
418d410
< ./aws-cloudfront/test/function-code.js
1110d1101
< ./aws-iam/test/custom-resource/index.js
1938,1940d1928
< ./aws-synthetics/test/canaries/canary.js
< ./aws-synthetics/test/canaries/playwright/canary.js
< ./aws-synthetics/test/canaries/puppeteer/canary.js
2137d2124
< ./core/test/custom-resource-provider/mock-provider/index.js
2500d2486
< ./jest.config.js

As we can see, only the files we wanted to exclude are not present in the list anymore.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team November 13, 2025 10:41
@github-actions github-actions bot added the p2 label Nov 13, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 13, 2025
@mrgrain mrgrain force-pushed the mrgrain/chore/ignore-files-for-minification branch from e2b297f to 0524cbf Compare November 13, 2025 11:09
@mrgrain mrgrain marked this pull request as ready for review November 13, 2025 11:10
@mrgrain mrgrain changed the title chore: exclude test and config files form minification chore: exclude test and config files from minification Nov 13, 2025
@mergify
Copy link
Contributor

mergify bot commented Nov 13, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Nov 13, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 2eee0a9 into main Nov 13, 2025
18 of 19 checks passed
@mergify mergify bot deleted the mrgrain/chore/ignore-files-for-minification branch November 13, 2025 12:26
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants