-
Notifications
You must be signed in to change notification settings - Fork 107
Fix types for CJS projects using TypeScript NodeNext/Node16 #277
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
Conversation
🦋 Changeset detectedLatest commit: 18f3d2b The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -28,7 +28,7 @@ | |||
"clean": "rimraf dist && rimraf .ladle && rimraf build && rimraf *.tsbuildinfo", | |||
"serve": "node ./lib/cli/cli.js serve", | |||
"test": "cross-env IMPORT_ROOT=\"./\" vitest", | |||
"types": "tsc --project tsconfig.typesoutput.json" | |||
"types": "tsc --project tsconfig.typesoutput.json && cp ./lib/app/exports.d.ts ./lib/app/exports.d.cts" |
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.
cp
won't work across platforms (e.g. windows) - would you like me to include something like https://www.npmjs.com/package/cpy-cli so that it does, or are you ok with this as it will generally only run in CI/CD processes?
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.
yea, this doesn't need to be x-platform
Frustrating: The Stackblitz appears to still not be working. But in a real project, I can update to the latest I'm not sure why the Stackblitz isn't working... but it does seem to work in the "real world." Hmm. |
And just retested it from the At this point I think it may be a Stackblitz thing more than anything? |
@frehner tried to publish the stable version, a bit strange error: https://github.com/tajo/ladle/actions/runs/3229204374/jobs/5286226320#step:8:12 |
@tajo Ah, I think that happened because we generated the type files for publishing the normal version, and then tried to generate the type files again to publish the next version. Hmmm, thoughts? |
Ah yea, that makes sense |
Do you want me to add additional logic to try and fix this? Do you have an idea of how you would like it done? |
Help is always appreciated!
I think it still makes sense to publish |
Followup to #267 and #275
Tested both ESM and CJS projects (by modifying the
example
package) and this works.