From e64fe8bcf929fda6cfedc2c067f431b59e8e78a9 Mon Sep 17 00:00:00 2001 From: "Weng, Chia-Ling" <75072960+ChiaLingWeng@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:26:07 +0000 Subject: [PATCH 1/9] fix: layer with shared encoding ignore repeater --- src/normalize/core.ts | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/src/normalize/core.ts b/src/normalize/core.ts index 545e24ff8a..70e9fc5a94 100644 --- a/src/normalize/core.ts +++ b/src/normalize/core.ts @@ -68,7 +68,6 @@ export class CoreNormalizer extends SpecMapper n).join('_')} : {}), ...(encoding ? {encoding} : {}) }; - if (parentEncoding || parentProjection) { return this.mapUnitWithParentEncodingOrProjection(specWithReplacedEncoding, params); } @@ -177,7 +176,7 @@ export class CoreNormalizer extends SpecMapper, normParams: NormalizerParams): NormalizedFacetSpec { From 7cbd21866ea3e49581495a3e8218715b99b0fc32 Mon Sep 17 00:00:00 2001 From: "Weng, Chia-Ling" <75072960+ChiaLingWeng@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:47:07 +0000 Subject: [PATCH 2/9] avoid undefined array error --- src/normalize/core.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/normalize/core.ts b/src/normalize/core.ts index 70e9fc5a94..1e11667f09 100644 --- a/src/normalize/core.ts +++ b/src/normalize/core.ts @@ -211,6 +211,12 @@ export class CoreNormalizer extends SpecMapper, @@ -224,7 +230,7 @@ export class CoreNormalizer extends SpecMapper Date: Thu, 1 Feb 2024 16:50:47 +0000 Subject: [PATCH 3/9] style: auto-formatting [CI] --- src/normalize/core.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/normalize/core.ts b/src/normalize/core.ts index 1e11667f09..6b2022ccb5 100644 --- a/src/normalize/core.ts +++ b/src/normalize/core.ts @@ -176,7 +176,7 @@ export class CoreNormalizer extends SpecMapper Date: Fri, 2 Feb 2024 01:24:32 +0000 Subject: [PATCH 4/9] simplify condition statement --- src/normalize/core.ts | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/src/normalize/core.ts b/src/normalize/core.ts index 6b2022ccb5..e0ce64586c 100644 --- a/src/normalize/core.ts +++ b/src/normalize/core.ts @@ -176,7 +176,7 @@ export class CoreNormalizer extends SpecMapper, normParams: NormalizerParams): NormalizedFacetSpec { From 6a02b0875223ecb47b2d8f5225d13ae751a910e9 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Fri, 2 Feb 2024 01:26:51 +0000 Subject: [PATCH 5/9] style: auto-formatting [CI] --- src/normalize/core.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/normalize/core.ts b/src/normalize/core.ts index e0ce64586c..8cb1d7fcf0 100644 --- a/src/normalize/core.ts +++ b/src/normalize/core.ts @@ -176,7 +176,7 @@ export class CoreNormalizer extends SpecMapper Date: Fri, 2 Feb 2024 03:52:10 +0000 Subject: [PATCH 6/9] move empty check outside class --- src/normalize/core.ts | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/normalize/core.ts b/src/normalize/core.ts index 8cb1d7fcf0..b1d3d96258 100644 --- a/src/normalize/core.ts +++ b/src/normalize/core.ts @@ -176,7 +176,7 @@ export class CoreNormalizer extends SpecMapper, @@ -236,15 +230,15 @@ export class CoreNormalizer extends SpecMapper(opt: { } return projection ?? parentProjection; } + +function emptyFlag(obj: any) { + if (obj == null) { + return true; + } + return Object.keys(obj).length === 0; +} From 1421933f3b95035b48482292db8030ec73209165 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Fri, 2 Feb 2024 03:54:27 +0000 Subject: [PATCH 7/9] style: auto-formatting [CI] --- src/normalize/core.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/normalize/core.ts b/src/normalize/core.ts index b1d3d96258..7c1c254d97 100644 --- a/src/normalize/core.ts +++ b/src/normalize/core.ts @@ -176,7 +176,7 @@ export class CoreNormalizer extends SpecMapper Date: Fri, 2 Feb 2024 05:03:10 +0000 Subject: [PATCH 8/9] use defined isEmpty func instead --- src/normalize/core.ts | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/normalize/core.ts b/src/normalize/core.ts index 7c1c254d97..a415c4ee2d 100644 --- a/src/normalize/core.ts +++ b/src/normalize/core.ts @@ -176,7 +176,7 @@ export class CoreNormalizer extends SpecMapper(opt: { } return projection ?? parentProjection; } - -function emptyFlag(obj: any) { - if (obj == null) { - return true; - } - return Object.keys(obj).length === 0; -} From 4f30bf26b0ec949e01e75a4b94093c0ff32a6ef5 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Fri, 2 Feb 2024 05:05:33 +0000 Subject: [PATCH 9/9] style: auto-formatting [CI] --- src/normalize/core.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/normalize/core.ts b/src/normalize/core.ts index a415c4ee2d..c26c2d4592 100644 --- a/src/normalize/core.ts +++ b/src/normalize/core.ts @@ -176,7 +176,7 @@ export class CoreNormalizer extends SpecMapper