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 importing types on Node 16 module resolution #424

Merged

Conversation

JavaScriptBach
Copy link
Contributor

Fixes #332

I upgraded my TypeScript moduleResolution to Node 16, and TypeScript stopped being able to find the types. This change should fix it.

@srenatus
Copy link
Contributor

Thanks a lot! Could you squash and sign-off, please, so we can get this merged? Details here

Signed-off-by: Phillip Huang <[email protected]>
Signed-off-by: Phillip Huang <[email protected]>
Comment on lines +45 to +46
mv $outdir/types/opa.d.ts $outdir/types/opa.d.mts
cp $outdir/types/opa.d.mts $outdir/types/opa.d.cts
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately separate declaration files are required. Otherwise, typescript will assume the types are either ESM or CJS depending on the value of the type field of the nearest package.json.

@adam-athian
Copy link

Any updates on getting this merged?

@dxh9845
Copy link

dxh9845 commented Nov 8, 2024

Hello @srenatus - is there anything I can do to help get this out?

@srenatus
Copy link
Contributor

srenatus commented Nov 8, 2024

@JavaScriptBach Are you around? To get this merged, it'll need your sign-off.

@srenatus
Copy link
Contributor

srenatus commented Nov 8, 2024

Oh wait, this has sign-offs on each commit. Nevermind. I'll take care of rebasing and pushing a new release.

@srenatus srenatus merged commit c8e41f3 into open-policy-agent:main Nov 8, 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.

It appears that opa.d.ts is missing
4 participants