@smithy/core 3.23.5 → 3.23.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -929,24 +929,18 @@ class CborShapeDeserializer extends protocols.SerdeContext {
929
929
  if (ns.isListSchema()) {
930
930
  const newArray = [];
931
931
  const memberSchema = ns.getValueSchema();
932
- const sparse = !!ns.getMergedTraits().sparse;
933
932
  for (const item of value) {
934
933
  const itemValue = this.readValue(memberSchema, item);
935
- if (itemValue != null || sparse) {
936
- newArray.push(itemValue);
937
- }
934
+ newArray.push(itemValue);
938
935
  }
939
936
  return newArray;
940
937
  }
941
938
  const newObject = {};
942
939
  if (ns.isMapSchema()) {
943
- const sparse = !!ns.getMergedTraits().sparse;
944
940
  const targetSchema = ns.getValueSchema();
945
941
  for (const key of Object.keys(value)) {
946
942
  const itemValue = this.readValue(targetSchema, value[key]);
947
- if (itemValue != null || sparse) {
948
- newObject[key] = itemValue;
949
- }
943
+ newObject[key] = itemValue;
950
944
  }
951
945
  }
952
946
  else if (ns.isStructSchema()) {
@@ -154,24 +154,18 @@ export class CborShapeDeserializer extends SerdeContext {
154
154
  if (ns.isListSchema()) {
155
155
  const newArray = [];
156
156
  const memberSchema = ns.getValueSchema();
157
- const sparse = !!ns.getMergedTraits().sparse;
158
157
  for (const item of value) {
159
158
  const itemValue = this.readValue(memberSchema, item);
160
- if (itemValue != null || sparse) {
161
- newArray.push(itemValue);
162
- }
159
+ newArray.push(itemValue);
163
160
  }
164
161
  return newArray;
165
162
  }
166
163
  const newObject = {};
167
164
  if (ns.isMapSchema()) {
168
- const sparse = !!ns.getMergedTraits().sparse;
169
165
  const targetSchema = ns.getValueSchema();
170
166
  for (const key of Object.keys(value)) {
171
167
  const itemValue = this.readValue(targetSchema, value[key]);
172
- if (itemValue != null || sparse) {
173
- newObject[key] = itemValue;
174
- }
168
+ newObject[key] = itemValue;
175
169
  }
176
170
  }
177
171
  else if (ns.isStructSchema()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.23.5",
3
+ "version": "3.23.7",
4
4
  "scripts": {
5
5
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline core",
@@ -79,13 +79,13 @@
79
79
  "license": "Apache-2.0",
80
80
  "sideEffects": false,
81
81
  "dependencies": {
82
- "@smithy/middleware-serde": "^4.2.10",
83
- "@smithy/protocol-http": "^5.3.9",
84
- "@smithy/types": "^4.12.1",
82
+ "@smithy/middleware-serde": "^4.2.11",
83
+ "@smithy/protocol-http": "^5.3.10",
84
+ "@smithy/types": "^4.13.0",
85
85
  "@smithy/util-base64": "^4.3.1",
86
86
  "@smithy/util-body-length-browser": "^4.2.1",
87
- "@smithy/util-middleware": "^4.2.9",
88
- "@smithy/util-stream": "^4.5.14",
87
+ "@smithy/util-middleware": "^4.2.10",
88
+ "@smithy/util-stream": "^4.5.16",
89
89
  "@smithy/util-utf8": "^4.2.1",
90
90
  "@smithy/uuid": "^1.1.1",
91
91
  "tslib": "^2.6.2"
@@ -120,7 +120,7 @@
120
120
  "directory": "packages/core"
121
121
  },
122
122
  "devDependencies": {
123
- "@smithy/eventstream-serde-node": "^4.2.9",
123
+ "@smithy/eventstream-serde-node": "^4.2.10",
124
124
  "@types/node": "^18.11.9",
125
125
  "concurrently": "7.0.0",
126
126
  "downlevel-dts": "0.10.1",