@garmin/fitsdk 21.205.0 → 21.208.0

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.
package/README.md CHANGED
@@ -81,6 +81,7 @@ const { messages, errors } = decoder.read({
81
81
  decodeMemoGlobs: false,
82
82
  skipHeader: false,
83
83
  dataOnly: false,
84
+ legacyArrayMode: false, // Deprecated
84
85
  });
85
86
  ````
86
87
  #### mesgListener = (messageNumber, message) => {}
@@ -193,6 +194,16 @@ When true, the decoder will read past the 14-byte header and ignore its contents
193
194
  #### dataOnly: true | false
194
195
  When true, the decoder will read the file as if the 14-byte header was not written. The decoder then assumes the file begins with a message definition and assumes file data size from the size of the file's stream.
195
196
 
197
+ #### legacyArrayMode: true | false *(Deprecated)*
198
+ legacyArrayMode is deprecated and will be removed by EOY 2026.
199
+
200
+ When false *(default)*, the decoder will adhere to the profile for array fields.
201
+
202
+ Array fields will always be returned as arrays, even when there is only one element
203
+ Non-array fields will always return a single value, even when there are multiple values
204
+ Setting legacyArrayMode option to true will revert to pre-v21.205 behavior
205
+
206
+
196
207
  ## Creating Streams
197
208
  Stream objects contain the binary FIT data to be decoded. Stream objects can be created from byte-arrays, ArrayBuffers, and Node.js Buffers. Internally the Stream class uses an ArrayBuffer to manage the byte stream.
198
209
  #### From a Byte Array
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@garmin/fitsdk",
3
- "version": "21.205.0",
3
+ "version": "21.208.0",
4
4
  "description": "FIT JavaScript SDK",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
package/src/bit-stream.js CHANGED
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
package/src/decoder.js CHANGED
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -433,7 +433,6 @@ class Decoder {
433
433
  fieldDefinition.size,
434
434
  {
435
435
  littleEndian: messageDefinition["endianness"],
436
- convertInvalidToNull: !field?.hasComponents ?? false,
437
436
  isArray: field?.array ?? fieldDefinition.size > fieldDefinition.baseTypeSize,
438
437
  },
439
438
  );
package/src/encoder.js CHANGED
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
package/src/fit.js CHANGED
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
package/src/index.d.ts CHANGED
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
package/src/index.js CHANGED
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
package/src/profile.js CHANGED
@@ -5,15 +5,15 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
13
13
  const Profile = {
14
14
  version: {
15
15
  major: 21,
16
- minor: 205,
16
+ minor: 208,
17
17
  patch: 0,
18
18
  type: "Release"
19
19
  },
@@ -18907,7 +18907,7 @@ const Profile = {
18907
18907
  0: {
18908
18908
  num: 0,
18909
18909
  name: "weight",
18910
- type: "weight",
18910
+ type: "uint16",
18911
18911
  baseType: "uint16",
18912
18912
  array: false,
18913
18913
  scale: 100,
package/src/stream.js CHANGED
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
 
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12
  import Profile from "./profile.js";
package/src/utils.js CHANGED
@@ -5,8 +5,8 @@
5
5
  // Transfer (FIT) Protocol License.
6
6
  /////////////////////////////////////////////////////////////////////////////////////////////
7
7
  // ****WARNING**** This file is auto-generated! Do NOT edit this file.
8
- // Profile Version = 21.205.0Release
9
- // Tag = production/release/21.205.0-0-gb3c261eb
8
+ // Profile Version = 21.208.0Release
9
+ // Tag = production/release/21.208.0-0-g5209d509
10
10
  /////////////////////////////////////////////////////////////////////////////////////////////
11
11
 
12
12