-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add "types" to package export #7
Conversation
🦋 Changeset detectedLatest commit: 11fe076 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
|
@ivan-kleshnin This seems out of scope from this PR. Aside, I went down a rabbit hole looking into your suggestion and this is what I found:
For more information, check out this lengthly discussion: microsoft/TypeScript#18442 |
@kkirby thanks for the response! It's a very complex topic and I'm far from being an expert there. I can only add the following points:
{
"extends": "@tsconfig/node18/tsconfig.json",
"compilerOptions": {
"lib": ["esnext", "dom"],
"baseUrl": ".",
"module": "esnext",
"target": "esnext",
"moduleResolution": "node",
"esModuleInterop": true
},
"ts-node": {
"esm": true,
"experimentalSpecifierResolution": "node"
}
} Imports look like: import conf from "common/config" // not common/config.js
import {makeLogger} from "common/logger" // not common/logger/index.js As for |
Hey, @ivan-kleshnin I want to take a closer look at this problem. Would you mind opening an issue? Let's move the discussion there so we can unblock this PR. edit: I have released a beta version. I would appreciate some feedback to ensure we're on the right track https://www.npmjs.com/package/zod-validation-error/v/0.2.2-beta.1 |
Sure, I'll open a dedicated issue soon. Thank you! |
Hey, I opened a new PR that will, unfortunately, make this one obsolete. I apologize for this but thank you for bringing these issues to my attention. We've decided to drop |
Per https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing