-
Notifications
You must be signed in to change notification settings - Fork 167
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: Correct wrong instructions for typescript ejecting #589
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As written, the help text says that a user can run `eject-ts` to create a standalone `server.ts`. However, this is incorrect. Doing so simply creates a `server.js` -- all text following `eject` is ignored. For instance, one could run `eject-foo` and get no error and have a `server.js` generated, even though there is no `eject-foo` command. Instead, a user must pass in the `lang` flag: https://github.com/fastify/fastify-cli/blob/426e359f65e51a054fa89117ce729f34f88a6c37/eject.js#L25-L26 The easiest way to update this help test looks to be to use the `ts` rather than `typescript` value for `--lang`, so that it can easily fit into the existing help text format.
mcollina
approved these changes
Feb 21, 2023
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.
lgtm
renovate bot
referenced
this pull request
in specfy/specfy
Aug 13, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [fastify-cli](https://togithub.com/fastify/fastify-cli) | [`5.7.1` -> `5.8.0`](https://renovatebot.com/diffs/npm/fastify-cli/5.7.1/5.8.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/fastify-cli/5.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fastify-cli/5.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fastify-cli/5.7.1/5.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fastify-cli/5.7.1/5.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>fastify/fastify-cli (fastify-cli)</summary> ### [`v5.8.0`](https://togithub.com/fastify/fastify-cli/releases/tag/v5.8.0) [Compare Source](https://togithub.com/fastify/fastify-cli/compare/v5.7.1...v5.8.0) ##### What's Changed - fix: Correct wrong instructions for typescript ejecting by [@​anyonecancode](https://togithub.com/anyonecancode) in [https://github.com/fastify/fastify-cli/pull/589](https://togithub.com/fastify/fastify-cli/pull/589) - Improve the Typescript template. by [@​meotimdihia](https://togithub.com/meotimdihia) in [https://github.com/fastify/fastify-cli/pull/592](https://togithub.com/fastify/fastify-cli/pull/592) - chore(.gitignore): add bun lockfile by [@​Fdawgs](https://togithub.com/Fdawgs) in [https://github.com/fastify/fastify-cli/pull/594](https://togithub.com/fastify/fastify-cli/pull/594) - feat: add support for typescript and esm generation ([#​577](https://togithub.com/fastify/fastify-cli/issues/577)) by [@​S-Abhishek](https://togithub.com/S-Abhishek) in [https://github.com/fastify/fastify-cli/pull/585](https://togithub.com/fastify/fastify-cli/pull/585) - fix: use dot notation by [@​is2ei](https://togithub.com/is2ei) in [https://github.com/fastify/fastify-cli/pull/634](https://togithub.com/fastify/fastify-cli/pull/634) - Fix failing tests with cross-env by [@​bcomnes](https://togithub.com/bcomnes) in [https://github.com/fastify/fastify-cli/pull/639](https://togithub.com/fastify/fastify-cli/pull/639) - print-routes options and print-plugins by [@​bcomnes](https://togithub.com/bcomnes) in [https://github.com/fastify/fastify-cli/pull/637](https://togithub.com/fastify/fastify-cli/pull/637) - chore(deps): bump pino-pretty from 9.4.1 to 10.1.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/fastify/fastify-cli/pull/645](https://togithub.com/fastify/fastify-cli/pull/645) - chore(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.17.0 to 20.4.4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/fastify/fastify-cli/pull/646](https://togithub.com/fastify/fastify-cli/pull/646) - fix error on undefined plugin by [@​dancastillo](https://togithub.com/dancastillo) in [https://github.com/fastify/fastify-cli/pull/649](https://togithub.com/fastify/fastify-cli/pull/649) ##### New Contributors - [@​anyonecancode](https://togithub.com/anyonecancode) made their first contribution in [https://github.com/fastify/fastify-cli/pull/589](https://togithub.com/fastify/fastify-cli/pull/589) - [@​S-Abhishek](https://togithub.com/S-Abhishek) made their first contribution in [https://github.com/fastify/fastify-cli/pull/585](https://togithub.com/fastify/fastify-cli/pull/585) - [@​is2ei](https://togithub.com/is2ei) made their first contribution in [https://github.com/fastify/fastify-cli/pull/634](https://togithub.com/fastify/fastify-cli/pull/634) - [@​dancastillo](https://togithub.com/dancastillo) made their first contribution in [https://github.com/fastify/fastify-cli/pull/649](https://togithub.com/fastify/fastify-cli/pull/649) **Full Changelog**: fastify/fastify-cli@v5.7.1...v5.8.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on friday,before 9am on monday,every weekend" in timezone Europe/Paris, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/specfy/specfy). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40MC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNDAuMyIsInRhcmdldEJyYW5jaCI6ImNob3JlL3Jlbm92YXRlQmFzZUJyYW5jaCJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As written, the help text says that a user can run
eject-ts
to create a standaloneserver.ts
. However, this is incorrect. Doing so simply creates aserver.js
-- all text followingeject
is ignored. For instance, one could runeject-foo
and get no error and have aserver.js
generated, even though there is noeject-foo
command.Instead, a user must pass in the
lang
flag:fastify-cli/eject.js
Lines 25 to 26 in 426e359
The easiest way to update this help test looks to be to use the
ts
rather thantypescript
value for--lang
, so that it can easily fit into the existing help text format.Checklist
npm run test
andnpm run benchmark
and the Code of conduct