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: generate stub types of with explicit extension import if pkg type is module #371

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

yshrsmz
Copy link
Contributor

@yshrsmz yshrsmz commented Feb 10, 2024

πŸ”— Linked issue

resolve #370

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Updated DTS stub generation logic to check its module format so that it can work with ESM package.

I wanted to write test cases for this change, but there seems to be no stub-mode related tests and no idea how to write it πŸ€”

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@yshrsmz yshrsmz force-pushed the esm-dts branch 2 times, most recently from 0609982 to f2f94ed Compare February 10, 2024 03:32
@yshrsmz
Copy link
Contributor Author

yshrsmz commented Feb 24, 2024

@pi0 Hi, sorry to bother you, but could you take a look at this PR?
I really need this fix for my project.

MaximusHaximus added a commit to LIT-Protocol/lit-scheduled-tasks that referenced this pull request Mar 26, 2024
…p to `start`

- Make dev and start build instead of stubbing :( Ref: unjs/unbuild#371
- Add link to `lit-task-auto-top-up` task def package
- Scaffolding for auto top-up task
MaximusHaximus added a commit to LIT-Protocol/lit-scheduled-tasks that referenced this pull request Mar 26, 2024
MaximusHaximus added a commit to LIT-Protocol/lit-scheduled-tasks that referenced this pull request Mar 27, 2024
…p to `start`

- Make dev and start build instead of stubbing :( Ref: unjs/unbuild#371
- Add link to `lit-task-auto-top-up` task def package
- Scaffolding for auto top-up task
MaximusHaximus added a commit to LIT-Protocol/lit-scheduled-tasks that referenced this pull request Mar 27, 2024
MaximusHaximus added a commit to LIT-Protocol/lit-scheduled-tasks that referenced this pull request Mar 27, 2024
…p to `start`

- Make dev and start build instead of stubbing :( Ref: unjs/unbuild#371
- Add link to `lit-task-auto-top-up` task def package
- Scaffolding for auto top-up task
MaximusHaximus added a commit to LIT-Protocol/lit-scheduled-tasks that referenced this pull request Mar 27, 2024
MaximusHaximus added a commit to LIT-Protocol/lit-scheduled-tasks that referenced this pull request Mar 27, 2024
…p to `start`

- Make dev and start build instead of stubbing :( Ref: unjs/unbuild#371
- Add link to `lit-task-auto-top-up` task def package
- Scaffolding for auto top-up task
MaximusHaximus added a commit to LIT-Protocol/lit-scheduled-tasks that referenced this pull request Mar 27, 2024
MaximusHaximus added a commit to LIT-Protocol/lit-scheduled-tasks that referenced this pull request Mar 27, 2024
…to `start`

- Make dev and start build instead of stubbing :( Ref: unjs/unbuild#371
- Add link to `lit-task-auto-top-up` task def package
- Scaffolding for auto top-up task
MaximusHaximus added a commit to LIT-Protocol/lit-scheduled-tasks that referenced this pull request Mar 27, 2024
@pi0 pi0 changed the title [stub] d.ts should import files with '.js' extension in ESM package fix: generate stub types of with explicit extension import if pkg type is module Jun 4, 2024
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks!

@pi0 pi0 merged commit e1e0935 into unjs:main Jun 4, 2024
2 checks passed
pi0 added a commit to xiaoxiangmoe/unbuild that referenced this pull request Jun 4, 2024
@pi0 pi0 mentioned this pull request Jun 4, 2024
8 tasks
@yshrsmz yshrsmz deleted the esm-dts branch June 4, 2024 22:52
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.

stubbed d.ts file should import file with extension in ESM package
2 participants