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

fastify generate <dir> --esm --lang=ts doesn't generate esm enabled ts project #577

Closed
2 tasks done
ghost opened this issue Dec 26, 2022 · 6 comments
Closed
2 tasks done
Labels
bug Confirmed bug good first issue Good for newcomers

Comments

@ghost
Copy link

ghost commented Dec 26, 2022

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.0.0

Plugin version

No response

Node.js version

18.12

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

13.1

Description

fastify generate doesn't seem to work well when multiple options are provided. fastify generate . --esm & fastify generate . --lang=ts both seem to work well. But, combining options fastify generate . --esm --lang=ts doesn't seem to create esm support in the generated ts project.

Steps to Reproduce

mkdir foo && cd foo && fastify generate . --esm --lang=ts

Expected Behavior

The expected behavior is to generate an esm enabled typescript project

@mcollina
Copy link
Member

I don't think we have template for esm and ts at the same time.

Would you like to contribute one?

@mcollina mcollina added bug Confirmed bug good first issue Good for newcomers labels Dec 28, 2022
@ghost
Copy link
Author

ghost commented Jan 2, 2023

Thanks @mcollina for following up so promptly. Unfortunately, I don't have time to contribute this at the moment. I hope someone else can take this.

@S-Abhishek
Copy link
Contributor

Hey, just a heads up. I am having a look at this, will create a PR soon.

@mcollina
Copy link
Member

Thanks!

@ghost
Copy link
Author

ghost commented Jan 22, 2023

Thanks @S-Abhishek

S-Abhishek added a commit to S-Abhishek/fastify-cli that referenced this issue Jan 26, 2023
This commit will be amended with better implementation soon.
S-Abhishek added a commit to S-Abhishek/fastify-cli that referenced this issue Jan 29, 2023
This commit will be amended with better implementation soon.
S-Abhishek added a commit to S-Abhishek/fastify-cli that referenced this issue Mar 12, 2023
This commit will be amended with better implementation soon.
S-Abhishek added a commit to S-Abhishek/fastify-cli that referenced this issue Mar 18, 2023
--esm --lang=ts support, and fixes code coverage of app-esm using c8
S-Abhishek added a commit to S-Abhishek/fastify-cli that referenced this issue Mar 25, 2023
--esm --lang=ts support, and fixes code coverage of app-esm using c8
mcollina pushed a commit that referenced this issue May 3, 2023
* feat: add support for typescript and esm generation (#577)

--esm --lang=ts support, and fixes code coverage of app-esm using c8

* Replaced istanbul esm hook with c8
@mcollina
Copy link
Member

mcollina commented May 3, 2023

Done in #585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants