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

Stop detour methods of protocol buffer #753

Merged
merged 66 commits into from
Aug 10, 2023
Merged

Stop detour methods of protocol buffer #753

merged 66 commits into from
Aug 10, 2023

Conversation

samchon
Copy link
Owner

@samchon samchon commented Aug 10, 2023

As we know, expression power of protocol buffer message schema is extremely lower than TypeScript types. Until yesterday, I provided detour methods to protocol buffer message schema to support every TypeScript types in typia.protobuf.message<T>() function.

However, since today, I've changed my mind. If typia supports such detour method, there would not be any problem only in typia related ecosystem. However, it would occur the galapagos effect with other languages or other frameworks, This is the reason why I cancel the detour method providing.

Therefore, from now on, try to put protocol buffer unspported type into the typia.protobuf.message<T>() function, it would throw a compilation error with protocol buffer does not support message.

samchon and others added 30 commits July 15, 2023 02:07
When alias type has comment tags, previous `typia` could not catch it when generating JSON schema. Therefore, I fixed it and published the new patch `4.1.7`.

```typescript
/**
 * @Minimum 3
 * @maximum 7
 * @Format uuid
 */
type MyAlias = number | string;
```
Exact swagger generation for alias types.
Changed incorrectly typed term `nubmer` to correct term `number`.
Updates the requirements on [ts-patch](https://github.com/nonara/ts-patch) to permit the latest version.
- [Release notes](https://github.com/nonara/ts-patch/releases)
- [Changelog](https://github.com/nonara/ts-patch/blob/master/CHANGELOG.md)
- [Commits](nonara/ts-patch@v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: ts-patch
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
…-tw-3.0.2

Update ts-patch requirement from ^3.0.1 to ^3.0.2
doc-fix: Update comment-tags.mdx
When any typed property comes with optional parameter `?`, `typia.stringify()` could not resolve it exactly.

So, fixed that bug. Now, upgrade to `v4.1.8`.
Fix #719 - `stringify()` when any typed property
TypeScript v5.2 supports a new function `getJSDocCommentsAndTags()` that listing up every JsDoc comments and tags at once.

Therefore, evolved `typia` to use `Symbol.getDocumentationComment()` in legavy TypeScript version, and adapted the `getJSDocCommentsAndTags()` function in the latest version.
Exact comment tracing on interface type.
Complement #726 - much more exact comments analyzing
New JSDoc API of TypeScript 5.1 is so difficult than expected.  Maybe there will be a few more patches after that.
Complement #726 - `JSDocParameterTag` case.
samchon and others added 21 commits August 3, 2023 22:32
Adapt #736 - optimize JSON serializer of `string` type
Global variable `length` exists in DOM, and did a mistake to use the global variable `length` instead of using `String.length` property.
Fix #736 - bug of undefined `length` problem.
Fix #737 - remove cursing from random any type
  - Changed setup wizard
  - Introduce not to support `yarn berry`
  - Use `npm run postinstall` command instead

Unfortunately, `ts-patch` does not support `yarn berry`. Therefore, it is not possible to use transform mode of `typia` in the `yarn berry`. Therefore, to inform it and recommend not to use `yarn berry` in `typia`, I've changed setup wizard program.

Also, `yarn` berry` does not support the `npm run prepare` command. I think this nonsensible story because the `npm run prepare` command is a standard feature of NPM, but this is the reality, so I can't help it. By the way, if `ts-patch` starts supporting `yarn berry`, configuring `npm run prepare` command by setup wizard can be a big problem. So, I've changed setup wizard to use `npm run postinstall` command instead of the previous `npm run prepare` command.
Fix #744 - change setup wizard to deprecate `yarn berry`.
A tiny change does not affect on main setup logic.

So, this commit would be published with next patch.
… value.

When `typia.stringify<T>()` be used for an object type which has template typed key containing a number type, and exponential log being used in the template key type, `typia` could not write the property because regex pattern for numeric value of ` typia` had not supported the exponential log value.

This is an extremely rare case, but fixed for extensionality.

```typescript
export interface ISomething {
    [key: `value_${number}`]: boolean | string | number;
}

const something: ISomething = {
    "5.175933557310941e-7": -0.170261004873707,
};
typia.stringify(something);
```
Enhance #744 - silent setup and enhanced documentation.
Fix number pattern of `stringify` to support exponential log value
@samchon samchon added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 10, 2023
@samchon samchon self-assigned this Aug 10, 2023
@samchon samchon changed the title Do not provide detour method for protocol buffer message schema Stop detour methods on protocol buffer Aug 10, 2023
@samchon samchon changed the title Stop detour methods on protocol buffer Stop detour methods of protocol buffer Aug 10, 2023
@samchon samchon merged commit 573cea2 into v5.0 Aug 10, 2023
2 checks passed
@samchon samchon deleted the features/message branch August 10, 2023 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants