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

Remove @types/lodash.sortBy from project #1937

Merged
merged 1 commit into from May 1, 2023

Conversation

wasimTQ
Copy link
Contributor

@wasimTQ wasimTQ commented Apr 30, 2023

Fixes

Fixes #1930 by @sarayourfriend

Description

This PR removes @types/lodash.sortBy.

Testing Instructions

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (if applicable).

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@wasimTQ wasimTQ requested a review from a team as a code owner April 30, 2023 18:49
@openverse-bot openverse-bot added this to Needs review in Openverse PRs Apr 30, 2023
@openverse-bot openverse-bot added 🟩 priority: low Low priority and doesn't need to be rushed 🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🧱 stack: frontend Related to the Nuxt frontend 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work labels Apr 30, 2023
@sarayourfriend
Copy link
Contributor

Thanks for the contribution, @wasimTQ, and welcome to Openverse! To complete this PR, you'll need to update pnpm-lock.yaml as well. To do so, run pnpm install locally in this branch and commit the changes to pnpm-lock.yaml.

@obulat obulat removed the 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work label May 1, 2023
@wasimTQ
Copy link
Contributor Author

wasimTQ commented May 1, 2023

Thanks for the contribution, @wasimTQ, and welcome to Openverse! To complete this PR, you'll need to update pnpm-lock.yaml as well. To do so, run pnpm install locally in this branch and commit the changes to pnpm-lock.yaml.

Got it. I was wondering why it's failing. I forgot to add the lock file. My bad!!

@wasimTQ wasimTQ force-pushed the remove_lodash_sortby branch 2 times, most recently from 82ddeab to 2654091 Compare May 1, 2023 08:48
@wasimTQ
Copy link
Contributor Author

wasimTQ commented May 1, 2023

@obulat @sarayourfriend When I ran the precommit locally, it worked. I don't know why it's failing on PR.

Should I remove the type and use it as default export as it mentioned?

Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

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

The lock file should not contain so many changes. The pnpm version mismatch might have caused this, but I'm not entirely sure.

Copy link
Contributor

@obulat obulat May 1, 2023

Choose a reason for hiding this comment

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

The lock file appears to have changes for a lot of unrelated packages, which causes failures in the linting.
When I removed @types/lodash.sortby locally, and ran just node-install, I only saw 4 changes in pnpm-lock.yamlfile. Could you check the version ofpnpmyou are using? It should match the version inpackage.json`'s engines property to generate the correct lock file.

Here's the diff I see in the lock file:

diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e80070fab..8b2b351ea 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -55,7 +55,6 @@ importers:
       '@testing-library/vue': ^5.8.2
       '@types/express-useragent': ^1.0.2
       '@types/jest': ^26.0.22
-      '@types/lodash.sortby': ^4.7.7
       '@types/module-alias': ^2.0.1
       '@types/node': ^17.0.32
       '@types/throttle-debounce': ^5.0.0
@@ -197,7 +196,6 @@ importers:
       '@testing-library/vue': 5.8.2_rhqkolmkwunxzlyyxxsuwaiuri
       '@types/express-useragent': 1.0.2
       '@types/jest': 26.0.24
-      '@types/lodash.sortby': 4.7.7
       '@types/module-alias': 2.0.1
       '@types/node': 17.0.32
       '@types/throttle-debounce': 5.0.0
@@ -6390,12 +6388,6 @@ packages:
     resolution: {integrity: sha512-1YXyYH83h6We1djyoUEqTlVyQtCfJAFXELSKW2ZRtjHD4hQ82CC4lvrv5D0l0FLcKBaiPbXyi3MpMsI9ZRgKsw==}
     dev: true
 
-  /@types/lodash.sortby/4.7.7:
-    resolution: {integrity: sha512-J/4IS+jQopGBrrRetBXDCX0KnSeXJZ0rOTmGAxR9MWGV24YdHxX8IRi9LCGAU9GKWlBov9KRSfQpuup9PReqrw==}
-    dependencies:
-      '@types/lodash': 4.14.182
-    dev: true
-
   /@types/lodash/4.14.182:
     resolution: {integrity: sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==}
     dev: true
@@ -11413,7 +11405,7 @@ packages:
     resolution: {integrity: sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==}
     engines: {node: '>= 4.0'}
     os: [darwin]
-    deprecated: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
+    deprecated: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
     requiresBuild: true
     dependencies:
       bindings: 1.5.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But it passes on local. Let me try after correcting the version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you confirm it once the pipeline finish?

@obulat
Copy link
Contributor

obulat commented May 1, 2023

All the checks are 🟢 now! Thank you for your contribution, @wasimTQ 🎉

Openverse PRs automation moved this from Needs review to Reviewer approved May 1, 2023
@sarayourfriend sarayourfriend merged commit b470b30 into WordPress:main May 1, 2023
36 checks passed
Openverse PRs automation moved this from Reviewer approved to Merged! May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
Openverse PRs
  
Merged!
Development

Successfully merging this pull request may close these issues.

Remove unused @types/lodash.sortby package
4 participants