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(dependency) Dependency updates #360

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

work933k
Copy link
Contributor

@work933k work933k commented Nov 4, 2024

Description

Be aware! That i based this PR on my other PR (#359).

I updated package dependencies which were "easy" to update and needed little code refactoring.
I migrated from Husky v4 to v9 which needed some script tweaks.
Also updated rimraf which needed some refactoring.

I chose not to upgrade ESLint in this PR as this introduced quite some code issues.
I also chose not to upgrade some dependency which resulted in ESM/CommonJS issues.

Motivation and Context

We activly make use of this package and would be kept up-to-date.

How Has This Been Tested?

Yes. Tested with the unit-tests.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (adding or updating documentation)
  • Dependency update

Checklist:

  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • My changes are in sync with the code style of this project.
  • There aren't any other open Pull Requests for the same issue/update.
  • These changes should be applied to a maintenance branch.
  • I have added the Apache 2.0 license header to any new files created.

What is the Impact to Developers Using Jest-Image-Snapshot?

I don't expect that this would introduce issues for developers/users of this package.

@work933k work933k marked this pull request as ready for review November 4, 2024 16:32
@work933k work933k requested a review from a team as a code owner November 4, 2024 16:33
@code-forger
Copy link
Member

@work933k Thanks for the contribution. Some other work has been merged between your other PR and this one. The conflicts in the workflows and package.json are trivial, but i can't resolve them manually in the package-lock.json.

Please merge main into your branch and resolve the conflicts

@@ -271,10 +271,10 @@ function diffImageToSnapshot(options) {
result = { added: true };
} else {
const receivedSnapshotPath = path.join(receivedDir, `${snapshotIdentifier}${receivedPostfix}.png`);
rimraf.sync(receivedSnapshotPath);
rimrafSync(receivedSnapshotPath, { glob: true });
Copy link

@benmccann benmccann Jan 7, 2025

Choose a reason for hiding this comment

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

glob: true is not necessary. also, you can remove rimraf entirely and remove the files with rmSync(path, { recursive: true, force: true }); from Node.js. rimraf has 27 dependencies, so it'd be nice to use a slimmer solution

this is being done in #358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants