Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move util into shared library #183

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Mar 3, 2025

Mostly moving and import updates.
Renamed a couple of functions.
Added some more AI generated test cases for utils.


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 March 3, 2025 11:57
@github-actions github-actions bot added the p2 label Mar 3, 2025
* released and `__dirname` will refer to a different location in the `.ts` form
* as it will in the final executing form.
*/
export function rootDir(): string;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This stays in the cli package

@@ -1,4 +1,4 @@
import * as fs from 'fs-extra';
import * as fs from 'fs/promises';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fs-extra wasn't needed at all here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ai generated tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ai generated tests

@@ -63,3 +62,14 @@ describe('splitBySize', () => {
}
});
});

describe('applyDefaults', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was previously in a separate file for some reason

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ai generated tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved from util.ts and renamed function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combined with an other test file for objects

@mrgrain mrgrain force-pushed the mrgrain/refactor/move-util branch from a03d4fa to ae36265 Compare March 3, 2025 12:04
@mrgrain mrgrain force-pushed the mrgrain/refactor/move-util branch from ae36265 to 60d3f7d Compare March 3, 2025 12:28
@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 92.30769% with 6 lines in your changes missing coverage. Please review.

Project coverage is 84.69%. Comparing base (12299ff) to head (2e4eeb6).

Files with missing lines Patch % Lines
packages/aws-cdk/lib/cli/root-dir.ts 80.64% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #183      +/-   ##
==========================================
- Coverage   84.84%   84.69%   -0.15%     
==========================================
  Files         205      207       +2     
  Lines       35648    35647       -1     
  Branches     4617     4594      -23     
==========================================
- Hits        30245    30191      -54     
- Misses       5245     5307      +62     
+ Partials      158      149       -9     
Flag Coverage Δ
suite.unit 84.69% <92.30%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Mar 3, 2025
Merged via the queue into main with commit a48d3db Mar 3, 2025
20 checks passed
@aws-cdk-automation aws-cdk-automation deleted the mrgrain/refactor/move-util branch March 3, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants