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

fix: Replace shortid package with nanoid package #2025

Merged

Conversation

AkshatJawne
Copy link
Contributor

Resolves #1922

Changes Implemented:

  • Replaced shortid with nanoid, given that shortid is deprecated (Reran all tests to ensure that functionality upholds)

Info on Nanoid: https://github.com/ai/nanoid/blob/main/README.md

@AkshatJawne AkshatJawne requested review from bmingles and mofojed May 17, 2024 14:53
@AkshatJawne AkshatJawne self-assigned this May 17, 2024
@AkshatJawne
Copy link
Contributor Author

Looking into errors here

@mattrunyon
Copy link
Collaborator

Remove esmify from golden-layout dev deps and add babelify as a dev dependency.

In karma.conf.cjs remove the plugins line and add this. For some reason esmify isn't transforming node_modules even though it says it does (it might not understand the package.json of nanoid).

transform: [
  ['babelify', { presets: ['@babel/preset-env'], global: true }],
],

This seems to fix the issue by using babel to transpile the ESM before the bundling for the test.

@bmingles
Copy link
Contributor

LGTM. Will wait for @mattrunyon to approve since he suggested the babelify change, and I'm less familiar here

@AkshatJawne
Copy link
Contributor Author

Sounds good, thanks @bmingles

@AkshatJawne AkshatJawne requested a review from mattrunyon May 21, 2024 20:44
@AkshatJawne AkshatJawne requested a review from mattrunyon May 22, 2024 13:55
Copy link
Collaborator

@mattrunyon mattrunyon left a comment

Choose a reason for hiding this comment

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

There's a @types/shortid in the root package.json still. Remove it and run npm install again so it's removed from package-lock too.

@AkshatJawne
Copy link
Contributor Author

Weird, I remember removing it? Although, I was having some issues when I was switching branches with the differences with my package.json so I clean installed a couple of times on different branches , something may have gotten messed up. Will fix this shortly and repush @mattrunyon

@AkshatJawne AkshatJawne requested a review from mattrunyon May 23, 2024 19:30
@AkshatJawne AkshatJawne merged commit 30d9d3c into deephaven:main May 23, 2024
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace deprecated shortid package with nanoid
3 participants