From 2a4e0288dbb07f98c0b617dad368efa0612bc137 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 11 Oct 2024 20:44:01 +0900 Subject: [PATCH 1/5] Change release.yml --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 83363b1f9b..f4539cf222 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,4 +23,9 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH }} - name: Website Setup working-directory: website - run: npm install && npm run deploy \ No newline at end of file + run: npm install && npm run build + - name: Deploy + uses: JamesIves/github-pages-deploy-action@4.1.3 + with: + branch: gh-pages + folder: ./website/out \ No newline at end of file From cc16de63dbe2132354de4b3b3a8296fa45ba9512 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 06:07:06 +0000 Subject: [PATCH 2/5] build(deps-dev): update typedoc requirement Updates the requirements on [typedoc](https://github.com/TypeStrong/TypeDoc) to permit the latest version. Updates `typedoc` to 0.26.9 - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.26.8...v0.26.9) --- updated-dependencies: - dependency-name: typedoc dependency-type: direct:development dependency-group: ecosystem ... Signed-off-by: dependabot[bot] --- website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/package.json b/website/package.json index 0771e96269..e552f3e8c2 100644 --- a/website/package.json +++ b/website/package.json @@ -54,7 +54,7 @@ "rimraf": "^5.0.0", "ts-loader": "^9.5.1", "ts-node": "^10.9.1", - "typedoc": "^0.26.8", + "typedoc": "^0.26.9", "typedoc-github-theme": "^0.1.1", "write-file-webpack-plugin": "^4.5.1" } From 15e07ffdce2c0583674637659867b2d7edd61db2 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Wed, 16 Oct 2024 01:50:30 +0900 Subject: [PATCH 3/5] Update FUNDING.yml --- .github/FUNDING.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index ad55dc0609..94a73255e1 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ -open_collective: typia \ No newline at end of file +open_collective: typia +github: [samchon] From 56ac75c437fcf3e028c5ba3b2f2416af6f419892 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 06:12:28 +0000 Subject: [PATCH 4/5] build(deps-dev): update typedoc requirement Updates the requirements on [typedoc](https://github.com/TypeStrong/TypeDoc) to permit the latest version. Updates `typedoc` to 0.26.10 - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.26.9...v0.26.10) --- updated-dependencies: - dependency-name: typedoc dependency-type: direct:development dependency-group: ecosystem ... Signed-off-by: dependabot[bot] --- website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/package.json b/website/package.json index e552f3e8c2..dae30c608f 100644 --- a/website/package.json +++ b/website/package.json @@ -54,7 +54,7 @@ "rimraf": "^5.0.0", "ts-loader": "^9.5.1", "ts-node": "^10.9.1", - "typedoc": "^0.26.9", + "typedoc": "^0.26.10", "typedoc-github-theme": "^0.1.1", "write-file-webpack-plugin": "^4.5.1" } From 0079199364971a347b08da9f88c8c1a5b07c8598 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Tue, 22 Oct 2024 10:49:05 +0900 Subject: [PATCH 5/5] Fix JSON schema bug when template string type with tags. --- package.json | 2 +- .../internal/application_templates.ts | 4 +- .../internal/application_v30_schema.ts | 2 +- .../internal/application_v31_schema.ts | 4 +- .../internal/llm_schema_station.ts | 2 +- ...sue_1112_template_literal_with_type_tag.ts | 48 ++++++++----------- 6 files changed, 27 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index 1c8828292c..61091fcc82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typia", - "version": "6.11.2", + "version": "6.11.3", "description": "Superfast runtime validators with only one line", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/src/programmers/internal/application_templates.ts b/src/programmers/internal/application_templates.ts index 250965bfe2..06cc6728c6 100644 --- a/src/programmers/internal/application_templates.ts +++ b/src/programmers/internal/application_templates.ts @@ -33,7 +33,7 @@ export const application_templates = ( }); for (const tpl of taggedTemplates) output.push( - application_plugin( + ...(application_plugin( { type: "string", pattern: metadata_to_pattern(false)( @@ -44,7 +44,7 @@ export const application_templates = ( ), }, tpl.tags ?? [], - ) as any, + ) as Schema[]), ); return output; }; diff --git a/src/programmers/internal/application_v30_schema.ts b/src/programmers/internal/application_v30_schema.ts index 1fea2c302e..bb0fa6d10c 100644 --- a/src/programmers/internal/application_v30_schema.ts +++ b/src/programmers/internal/application_v30_schema.ts @@ -61,7 +61,7 @@ export const application_v30_schema = // ATOMIC TYPES if (meta.templates.length && AtomicPredicator.template(meta)) - application_templates(meta).map(insert); + application_templates(meta).forEach(insert); for (const constant of meta.constants) if (AtomicPredicator.constant(meta)(constant.type) === false) continue; else insert(application_v30_constant(constant)); diff --git a/src/programmers/internal/application_v31_schema.ts b/src/programmers/internal/application_v31_schema.ts index 78238fbff7..826038a502 100644 --- a/src/programmers/internal/application_v31_schema.ts +++ b/src/programmers/internal/application_v31_schema.ts @@ -56,10 +56,10 @@ export const application_v31_schema = // ATOMIC TYPES if (meta.templates.length && AtomicPredicator.template(meta)) - application_templates(meta).map(insert as any); + application_templates(meta).forEach(insert as any); for (const constant of meta.constants) if (AtomicPredicator.constant(meta)(constant.type) === false) continue; - else application_v31_constant(constant).map(insert); + else application_v31_constant(constant).forEach(insert); for (const a of meta.atomics) if (a.type === "boolean") application_boolean(a).forEach(insert as any); else if (a.type === "bigint") diff --git a/src/programmers/internal/llm_schema_station.ts b/src/programmers/internal/llm_schema_station.ts index 529f244975..984d5d286f 100644 --- a/src/programmers/internal/llm_schema_station.ts +++ b/src/programmers/internal/llm_schema_station.ts @@ -59,7 +59,7 @@ export const llm_schema_station = (props: { props.metadata.templates.length && AtomicPredicator.template(props.metadata) ) - application_templates<"3.0">(props.metadata).map(insert); + application_templates<"3.0">(props.metadata).forEach(insert); for (const constant of props.metadata.constants) if (AtomicPredicator.constant(props.metadata)(constant.type) === false) continue; diff --git a/test/src/features/issues/test_issue_1112_template_literal_with_type_tag.ts b/test/src/features/issues/test_issue_1112_template_literal_with_type_tag.ts index f8772ae469..d3476cdeb3 100644 --- a/test/src/features/issues/test_issue_1112_template_literal_with_type_tag.ts +++ b/test/src/features/issues/test_issue_1112_template_literal_with_type_tag.ts @@ -16,30 +16,24 @@ const validate = (app: IJsonApplication<"3.0"> | IJsonApplication<"3.1">) => { "^(([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\/[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|((.*)\\x2d(.*)))", }, sole: { - "0": { - type: "string", - pattern: - "([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\/[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)", - "x-typia-sole": true, - }, + type: "string", + pattern: + "([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\/[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)", + "x-typia-sole": true, }, union: { oneOf: [ - [ - { - type: "string", - pattern: - "([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\/[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)", - "x-typia-something": true, - }, - ], - [ - { - type: "string", - pattern: "((.*)\\x2d(.*))", - "x-typia-nothing": false, - }, - ], + { + type: "string", + pattern: + "([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\/[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)", + "x-typia-something": true, + }, + { + type: "string", + pattern: "((.*)\\x2d(.*))", + "x-typia-nothing": false, + }, ], }, mixed: { @@ -49,13 +43,11 @@ const validate = (app: IJsonApplication<"3.0"> | IJsonApplication<"3.1">) => { pattern: "^(([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\/[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|((.*)\\x2d(.*)))", }, - [ - { - type: "string", - pattern: "((.*)\\|\\|[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)", - "x-typia-something": true, - }, - ], + { + type: "string", + pattern: "((.*)\\|\\|[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)", + "x-typia-something": true, + }, ], }, })(properties);