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

scripts[minor]:Some symbols have empty declarations #4993

Merged
merged 2 commits into from
Apr 6, 2024

Conversation

tomoima525
Copy link
Contributor

Issue

  • Migration script (updateEntrypointsFrom0_0_xTo0_1_x from @langchain/scripts/migrations) fails with the error below
TypeError: Cannot read properties of undefined (reading 'getKind')
    at file:///Users/tomoima525/workspace/knot/noxx-hiring-cdk/node_modules/.pnpm/@langchain+scripts@0.0.10/node_modules/@langchain/scripts/dist/migrations/0_1.js:21:39
    at Array.map (<anonymous>)
    at file:///Users/tomoima525/workspace/knot/noxx-hiring-cdk/node_modules/.pnpm/@langchain+scripts@0.0.10/node_modules/@langchain/scripts/dist/migrations/0_1.js:18:74
    at Array.flatMap (<anonymous>)
    at getEntrypointsFromFile (file:///Users/tomoima525/workspace/knot/noxx-hiring-cdk/node_modules/.pnpm/@langchain+scripts@0.0.10/node_modules/@langchain/scripts/dist/migrations/0_1.js:12:48)
    at async updateEntrypointsFrom0_0_xTo0_1_x (file:///Users/tomoima525/workspace/knot/noxx-hiring-cdk/node_modules/.pnpm/@langchain+scripts@0.0.10/node_modules/@langchain/scripts/dist/migrations/0_1.js:93:61)
    at async main (file:///Users/tomoima525/workspace/knot/noxx-hiring-cdk/scripts/langchain-migration/index.mts:11:3)

Cause

Fix

  • Check if declaration exists, and filter out.

Test

Twitter

https://x.com/tomoima525

Copy link

vercel bot commented Apr 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 5, 2024 11:43pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview Apr 5, 2024 11:43pm

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. auto:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Apr 5, 2024
@jacoblee93
Copy link
Collaborator

Thanks for the PR!

@bracesproul can you review?

Copy link
Collaborator

@bracesproul bracesproul left a comment

Choose a reason for hiding this comment

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

good catch, thanks for pushing this up! lgtm

@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label Apr 5, 2024
@tomoima525
Copy link
Contributor Author

Thank you for your reviews, I fixed the formatting issue

@jacoblee93
Copy link
Collaborator

Thank you! @bracesproul want to cut a release?

@bracesproul
Copy link
Collaborator

@tomoima525 version 0.0.11 released! https://www.npmjs.com/package/@langchain/scripts/v/0.0.11

@tomoima525 tomoima525 deleted the tomo-migration-patch branch April 6, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature lgtm PRs that are ready to be merged as-is size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants