Skip to content

fix: Replace shortid package with nanoid package#2025

Merged
AkshatJawne merged 11 commits intodeephaven:mainfrom
AkshatJawne:1922-replace-shortid-with-nanoid
May 23, 2024
Merged

fix: Replace shortid package with nanoid package#2025
AkshatJawne merged 11 commits intodeephaven:mainfrom
AkshatJawne:1922-replace-shortid-with-nanoid

Conversation

@AkshatJawne
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Looking into errors here

@mattrunyon
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@AkshatJawne
Copy link
Copy Markdown
Contributor Author

Sounds good, thanks @bmingles

Comment thread packages/golden-layout/karma.conf.cjs Outdated
Comment thread packages/golden-layout/package.json
@AkshatJawne AkshatJawne requested a review from mattrunyon May 21, 2024 20:44
Comment thread packages/golden-layout/package.json Outdated
@AkshatJawne AkshatJawne requested a review from mattrunyon May 22, 2024 13:55
Copy link
Copy Markdown
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
Copy Markdown
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
@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