Skip to content

fix(web): provide type in the exports#4244

Merged
clason merged 1 commit intorelease-0.25from
backport-4185-to-release-0.25
Feb 28, 2025
Merged

fix(web): provide type in the exports#4244
clason merged 1 commit intorelease-0.25from
backport-4185-to-release-0.25

Conversation

@tree-sitter-ci-bot
Copy link

Description

Backport of #4185 to release-0.25.

When using TypeScript projects using other module settings than CommonJs, the types were not correctly exposed, and the compilation failed.

This adds the types path to the exports so compilation works for `module: NodeNext` and other variants.

(cherry picked from commit f95e0e3)
@savetheclocktower
Copy link
Contributor

Didn't see this when I opened #4229. But I'm curious what this PR looks like when run through arethetypeswrong. /cc @clason

@savetheclocktower
Copy link
Contributor

Answering my own question: this is an improvement over the status quo, but I'm going to keep #4229 open in hopes of improving this further.

Screenshot 2025-02-27 at 3 11 53 PM

@clason
Copy link
Contributor

clason commented Feb 28, 2025

Note that this is a backport of a PR that got merged to (and passed CI on) master. I have no idea why this fails here. If you can fix it, I'd appreciate if you opened a new PR to the release branch, cherry pick this commit, and then add a fixup.

(Or, if the fixup is small, paste here as a diff and I'll add it.)

@savetheclocktower
Copy link
Contributor

@clason It's not a failure. This backport will improve the status quo for TypeScript users. Feel free to land it whenever.

It's also technically incorrect for a couple of reasons that are addressed in #4229, so I was mainly asking out loud whether #4229 was worth closing — and the answer is no. #4229 can be reviewed at someone's leisure and landed whenever; this backport reduces the urgency.

@clason
Copy link
Contributor

clason commented Feb 28, 2025

I mean the CI failure here. I don't feel comfortable merging a PR with a failing check that I am not absolutely sure is a flake.

@WillLillis
Copy link
Member

It looks like the failure is just due to a new clippy lint from the 1.85 release. I can open a PR tonight to have it fixed on master, but that should be fine to merge.

@clason clason merged commit d73126d into release-0.25 Feb 28, 2025
13 of 14 checks passed
@clason clason deleted the backport-4185-to-release-0.25 branch February 28, 2025 18:11
@clason
Copy link
Contributor

clason commented Feb 28, 2025

We might wish to check other recent PRs for backporting then and consider another 0.25.3 release.

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