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: fix broken path to datatypes causing typescript compilation to fail #275

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

jackvial
Copy link
Contributor

@jackvial jackvial commented Sep 21, 2024

Bug Example

Trying to build my project with "nodejs-polars": "^0.15.0" as a dependency gives the following error

node_modules/nodejs-polars/bin/series/index.d.ts:9:66 - error TS2307: Cannot find module '@polars/datatypes/datatype' or its corresponding type declarations.

9 import type { DTypeToJs, DtypeToJsName, JsToDtype, JsType } from "@polars/datatypes/datatype";
                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On inspecting the source TS files I see TS is complaining that the path doesn't exist.

Screenshot 2024-09-21 at 11 06 33 AM

This bug will not show up in development on this repo because the @polars alias is correctly defined in tsconfig.json but the distributed source code doesn't know anything about this path alias.

Testing

  • updated the path
  • successfully build my project
  • test loading a CSV file
  • On branch of the source code I ran yarn build:ts and yarn test and both succeeded

Screenshot 2024-09-21 at 11 07 41 AM

Screenshot 2024-09-21 at 11 08 18 AM

@jackvial jackvial changed the title fix: fix broken path to datatypes. was using path alias instead of relative path fix: fix broken path to datatypes causing typescript compilation to fail Sep 21, 2024
@Bidek56
Copy link
Collaborator

Bidek56 commented Sep 21, 2024

@scarf005 Does this makes sense to you? thx

@universalmind303 universalmind303 merged commit ac4c358 into pola-rs:main Sep 23, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants