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

New cli command npx typia patch for hacking defaultJSDocParsingMode value #883

Merged
merged 4 commits into from
Nov 26, 2023

Conversation

samchon
Copy link
Owner

@samchon samchon commented Nov 26, 2023

Since TypeScript v5.3 update, tsc no more parses JSDocComments. Therefore, Therefore, typia also cannot utilize those JSDocComment related features too, especially "Comment Tags" and "JSON schema generator".

However, in relation to this, the upgrade of ts-patch continues to be delayed, and I still don't know how long the delay would be continue. Furthermore, there're some nestia users urging to resolve the peerDependencies of typia that blocking the TypeScript v5.3 update. Therefore, before the ts-patch being prepared, I've decoded to provide typia's own solution for a while. It is the new CLI command, npx typia patch (npx typia setup command also performs the same behavior).

Also, if the defaultJSDocParsingMode value not being patched, typia will generate an warning message of TypeScript compiler API. For reference, as it is an warning message, it does not interrupt the TypeScript compilation like the compilation error case. If there're some typia users never using "Comment Tags" or "JSON schema generator" at all, they don't need to run the CLI command. This is not mandatory command, but just optional command.

Of course, when ts-patch being updated, this CLI command would be disabled immediately, if the installed ts-patch version is the latest one.

Related issues:

If `ts-patch` update be delayed for a long time, `typia` will hack the `jsDocParsingMode` by itself.

Of course, this is beta plan that would be discarded if `ts-patch` supports TypeScript v5.3 in near time.
@samchon samchon added the enhancement New feature or request label Nov 26, 2023
@samchon samchon self-assigned this Nov 26, 2023
Copy link
Owner Author

@samchon samchon left a comment

Choose a reason for hiding this comment

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

No problem on the testing programs.

@samchon samchon merged commit d27f19c into v5.3 Nov 26, 2023
3 checks passed
@samchon
Copy link
Owner Author

samchon commented Nov 26, 2023

Also, need to update nestia project, too.

@samchon samchon deleted the features/wizard branch November 26, 2023 14:28
samchon added a commit to samchon/nestia that referenced this pull request Nov 26, 2023
Since TypeScript v5.3 update, `tsc` no more parses `JSDocComment`s. Therefore, Therefore, `typia` and `@nestia/core` also cannot utilize those `JSDocComment` related features too, especially "Comment Tags" and "JSON schema generator".

However, in relation to this, the upgrade of `ts-patch` continues to be delayed, and I still don't know how long the delay would be continue. Furthermore, there're some `typia`/`nestia` users urging to resolve the `peerDependencies` of `typia`/`nestia` that blocking the TypeScript v5.3 update. Therefore, before the `ts-patch` being prepared, I've decoded to provide `typia`'s own solution for a while. It is the new CLI command `npx typia patch`, and `nestia` also adapts it (`npx nestia setup` command performs it).

Also, if the `defaultJSDocParsingMode` value not being patched, `typia` will generate an warning message of TypeScript compiler API. For reference, as it is an warning message, it does not interrupt the TypeScript compilation like the compilation error case. If there're some `typia`/`nestia` users never using "Comment Tags" or "JSON schema generator" at all, they don't need to run the CLI command. This is not mandatory command, but just optional command.

Of course, when `ts-patch` being updated, this CLI command would be disabled immediately, if the installed `ts-patch` version is the latest one.

Related issues:
  - samchon/typia#883
  - microsoft/TypeScript#55739
  - nonara/ts-patch#134
samchon added a commit to samchon/payments that referenced this pull request Nov 28, 2023
samchon added a commit that referenced this pull request Dec 6, 2023
Since TypeScript v5.3 update, `tsc` no more parses `JSDocComment`s. Therefore, `typia` also cannot utilize those `JSDocComment` related features too, especially "Comment Tags" and "JSON schema generator".

To reflect such TypeScript v5.3 update, `typia` has newly added a  temporary CLI command `npx typia patch` that is hacking the TypeScript module to turning on the `JSDocComment` parsing.

  - #883

In today, `ts-patch` has started supporting the TypeScript v5.3 update by reading `package.json` of transformer libraries. Therefore, the temporary CLI command no more required. Following the `ts-patch` guide, this PR has configured the `package.json` file for `ts-patch`, and `JSDocComment` parsing would be turned on by the `ts-patch`.

For reference, the temporary CLI command `npx typia patch` would be kept for a while, due to there can be some users using previous version of `ts-patch`. It would be deprecated after the next major update.
samchon added a commit to samchon/nestia that referenced this pull request Dec 6, 2023
Since TypeScript v5.3 update, `tsc` no more parses `JSDocComment`s. Therefore, `typia` also cannot utilize those `JSDocComment` related features too, especially "Comment Tags" and "JSON schema generator".

To reflect such TypeScript v5.3 update, `typia` has newly added a  temporary CLI command `npx typia patch` that is hacking the TypeScript module to turning on the `JSDocComment` parsing. Also, `nestia` has adopted the CLI when running the `npx nestia setup` command.

  - samchon/typia#883
  - #696

In today, `ts-patch` has started supporting the TypeScript v5.3 update by reading `package.json` of transformer libraries. Therefore, the temporary CLI command no more required. Following the `ts-patch` guide, this PR has configured the `package.json` file for `ts-patch`, and `JSDocComment` parsing would be turned on by the `ts-patch`.

For reference, the temporary CLI command `npx typia patch` would be kept for a while, due to there can be some users using previous version of `ts-patch`. It would be deprecated after the next major update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant