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

GH-39289: [JS] Add types to exports #39475

Merged
merged 2 commits into from
Jan 5, 2024
Merged

Conversation

domoritz
Copy link
Member

@domoritz domoritz commented Jan 5, 2024

@domoritz domoritz requested a review from trxcllnt as a code owner January 5, 2024 16:16
Copy link

github-actions bot commented Jan 5, 2024

⚠️ GitHub issue #39289 has been automatically assigned in GitHub to PR creator.

js/gulp/package-task.js Outdated Show resolved Hide resolved
@andrew0
Copy link

andrew0 commented Jan 5, 2024

I ran yarn build && npx @arethetypeswrong/cli --pack targets/apache-arrow, and it gives these errors:

image

after changing the types to come first:

image

The masquerading as CJS error will make it so in ESM mode, TypeScript will let you do import arrow from 'apache-arrow', which would be a runtime error since there's no default export, so it really should be import * as arrow from 'apache-arrow'.

@andrew0
Copy link

andrew0 commented Jan 5, 2024

I believe that this should fix the types for all the import scenarios: andrew0@207881a

image

@domoritz
Copy link
Member Author

domoritz commented Jan 5, 2024

Thanks! I made the updates.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Jan 5, 2024
@domoritz domoritz merged commit 17b946c into apache:main Jan 5, 2024
11 checks passed
@domoritz domoritz deleted the dom/39289 branch January 5, 2024 22:40
Copy link

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 17b946c.

There were 2 benchmark results with an error:

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them.

@ixxie
Copy link

ixxie commented Jan 16, 2024

@domoritz thanks for merging this! What does the release timeline look like for this?

@domoritz
Copy link
Member Author

This will be in arrow 15 shortly

clayburn pushed a commit to clayburn/arrow that referenced this pull request Jan 23, 2024
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
zanmato1984 pushed a commit to zanmato1984/arrow that referenced this pull request Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[JS] TypeScript types don't work with Node ESM
4 participants