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

Consider switching to dequal #20646

Closed
jelly opened this issue Jun 23, 2024 · 3 comments · Fixed by #20659
Closed

Consider switching to dequal #20646

jelly opened this issue Jun 23, 2024 · 3 comments · Fixed by #20659

Comments

@jelly
Copy link
Member

jelly commented Jun 23, 2024

This doesn't help us a lot but dequal is a 14 kB library versus deep-equal which is 90 kB, however has 16 dependencies while dequal has zero. So in the end it might help if other deps drop those dependencies as well.

https://www.npmjs.com/package/dequal

@martinpitt
Copy link
Member

Oh, nice idea! We even already have dequal in our tree, although only a dev dep:

dequal@2.0.3 dev
node_modules/dequal
  dequal@"^2.0.3" from axobject-query@3.2.1
  node_modules/axobject-query
    axobject-query@"^3.2.1" from eslint-plugin-jsx-a11y@6.8.0
    node_modules/eslint-plugin-jsx-a11y
      dev eslint-plugin-jsx-a11y@"6.8.0" from the root project
  dequal@"^2.0.3" from aria-query@5.3.0
  node_modules/aria-query
    aria-query@"^5.3.0" from eslint-plugin-jsx-a11y@6.8.0
    node_modules/eslint-plugin-jsx-a11y
      dev eslint-plugin-jsx-a11y@"6.8.0" from the root project

We also already have https://www.npmjs.com/package/fast-deep-equal as devDependency, also via eslint. But I agree that dequal/lite seems enough for our purposes. https://unpkg.com/dequal@2.0.3/lite/index.mjs really looks quite nice 😁

@jelly do you want to give this a shot?

@jelly
Copy link
Member Author

jelly commented Jun 24, 2024

dequal/lite seems interesting, note that deep-equal is a bundled dependency and sadly axobject-query will soon no longer pull dequal after this PR A11yance/axobject-query#354

I'm happy to take a look at this during the pilot shift.

@jelly
Copy link
Member Author

jelly commented Jun 25, 2024

Testing it here #20659

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

Successfully merging a pull request may close this issue.

2 participants