Commit 2eee0a9
authored
chore: exclude test and config files from minification (#36038)
### 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.
<img width="514" height="204" alt="image" src="https://github.com/user-attachments/assets/67fc4c24-2345-4859-85e4-f74475bfa512" />
### 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
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*1 parent 35f8e46 commit 2eee0a9
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments