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

[chore] Clean yarn resolutions #1448

Merged
merged 2 commits into from
Sep 16, 2024
Merged

Conversation

Drarig29
Copy link
Contributor

@Drarig29 Drarig29 commented Sep 12, 2024

What and why?

Yarn resolutions are for package consumers, so they should not be mentioning devDependencies.

  • @types/retry is not used in the repo (we do not import from retry), so I removed it altogether
  • aws-sdk-client-mock and aws-sdk-client-mock-jest are for unit tests
    • I removed them from resolutions, and update the unit tests so they work with the latest versions of those 2 packages
  • kind-of is not in the repo anymore

The only remaining one - ini - is an actual dependency.

How?

Remove packages from resolutions.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)

@@ -118,7 +113,7 @@
"@babel/preset-env": "7.4.5",
"@babel/preset-typescript": "7.3.3",
"@microsoft/eslint-formatter-sarif": "^3.0.0",
"@types/async-retry": "1.4.2",
"@types/async-retry": "1.4.8",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without this, we have build issues like:

src/helpers/__tests__/retry.test.ts:78:11 - error TS2345: Argument of type '{ maxTimeout: number; minTimeout: number; onRetry: jest.Mock<any, any, any>; retries: number; }' is not assignable to parameter of type 'Options'.
  Object literal may only specify known properties, and 'maxTimeout' does not exist in type 'Options'.

78           maxTimeout: 20,
             ~~~~~~~~~~

src/helpers/__tests__/retry.test.ts:93:7 - error TS2345: Argument of type '{ maxTimeout: number; minTimeout: number; onRetry: jest.Mock<any, any, any>; retries: number; }' is not assignable to parameter of type 'Options'.
  Object literal may only specify known properties, and 'maxTimeout' does not exist in type 'Options'.

93       maxTimeout: 50,
         ~~~~~~~~~~

src/helpers/upload.ts:76:7 - error TS2345: Argument of type '{ onRetry: (error: Error, attempts: number) => void; retries: number; }' is not assignable to parameter of type 'Options'.
  Object literal may only specify known properties, and 'retries' does not exist in type 'Options'.

76       retries: opts.retries,
         ~~~~~~~

@Drarig29 Drarig29 added the dependencies Pull requests that update a dependency file label Sep 12, 2024
@Drarig29 Drarig29 marked this pull request as ready for review September 12, 2024 18:21
@Drarig29 Drarig29 requested review from a team as code owners September 12, 2024 18:21
@etnbrd etnbrd merged commit 63fdf6e into master Sep 16, 2024
18 of 19 checks passed
@etnbrd etnbrd deleted the corentin.girard/clean-yarn-resolutions branch September 16, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants