fit-file-parser 6.1.1 → 6.1.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.1.2 - 2026-09-22
4
+
5
+ ### Changed
6
+
7
+ - Keep the manufacturer, Garmin product, sport, sub-sport, and course-point
8
+ lookup maps in one authoritative internal module shared by the full decoder
9
+ profile and the lightweight `fit-file-parser/profile` entry point.
10
+ - Prevent lookup-only consumers from loading the full decoder profile and its
11
+ message definitions.
12
+ - Enforce the lookup entry point's dependency graph and a 25 KB minified bundle
13
+ ceiling in the profile checks run by CI.
14
+
15
+ ### Compatibility
16
+
17
+ - Profile mappings, parsed output, and the public TypeScript API are unchanged.
18
+
3
19
  ## 6.1.1 - 2026-09-21
4
20
 
5
21
  ### Added
package/PROFILE.md CHANGED
@@ -1,11 +1,18 @@
1
1
  # FIT Profile Maintenance
2
2
 
3
- The parser uses one static interoperability table in `src/profile.ts` for
4
- normal installs, builds, tests, and releases. It contains message and field
5
- identifiers, names, wire types, array behavior, scales, offsets, units, enum
6
- labels, and product identifiers. `npm run profile:check` pins full-table
7
- fingerprints and the resulting message, field, type, enum-value, and product
8
- counts so accidental drift fails CI.
3
+ The parser uses one static interoperability profile for normal installs,
4
+ builds, tests, and releases. Message definitions and general enum tables live
5
+ in `src/profile.ts`; the manufacturer, Garmin product, sport, sub-sport, and
6
+ course-point tables live in `src/profile-lookup-data.ts`. The full profile
7
+ composes those exact objects, so lookup-only consumers and the decoder share
8
+ one authoritative value for every mapping. `npm run profile:check` pins
9
+ full-table fingerprints and the resulting message, field, type, enum-value,
10
+ and product counts so accidental drift fails CI.
11
+
12
+ `npm run profile:budget` also bundles the lookup entry point in isolation. It
13
+ fails if anything beyond the lookup helpers and their authoritative data enters
14
+ that graph, or if the minified bundle exceeds 25,000 bytes. Review any budget
15
+ change together with the corresponding profile growth.
9
16
 
10
17
  ## Unknown and newer fields
11
18
 
@@ -28,8 +35,9 @@ table cannot decode.
28
35
 
29
36
  Every mapping change requires focused regression coverage. Do not guess
30
37
  adjacent identifiers or add a mapping solely to make `unmapped_messages`
31
- disappear. Update `src/profile.ts`, the relevant tests, and the public types,
32
- then verify the complete compatibility contract:
38
+ disappear. Update the owning table in `src/profile.ts` or
39
+ `src/profile-lookup-data.ts`, the relevant tests, and the public types, then
40
+ verify the complete compatibility contract:
33
41
 
34
42
  ```sh
35
43
  npm run codegen
package/README.md CHANGED
@@ -240,8 +240,9 @@ unchanged.
240
240
  ## Profile-backed output
241
241
 
242
242
  Recognized message names, field names, enum values, wire types, scales,
243
- offsets, arrays, and units come from the community-maintained table in
244
- `src/profile.ts`. Its maintenance and verification contract is documented in
243
+ offsets, arrays, and units come from the community-maintained profile in
244
+ `src/profile.ts` and `src/profile-lookup-data.ts`. Its maintenance and
245
+ verification contract is documented in
245
246
  [`PROFILE.md`](./PROFILE.md).
246
247
 
247
248
  Public names use `snake_case` while preserving established alphanumeric tokens
@@ -443,9 +444,10 @@ a reference package, compares their complete default outputs, and reports only
443
444
  aggregate counts. Files rejected by both strict parsers are retried in force
444
445
  mode.
445
446
 
446
- Edit `src/profile.ts` only through reviewed profile changes with focused
447
- regression coverage and a documented source. Do not edit `src/fit_types.ts`
448
- manually; run `npm run codegen` after changing the maintained profile.
447
+ Edit `src/profile.ts` and `src/profile-lookup-data.ts` only through reviewed
448
+ profile changes with focused regression coverage and a documented source. Do
449
+ not edit `src/fit_types.ts` manually; run `npm run codegen` after changing the
450
+ maintained profile.
449
451
 
450
452
  Repository-specific automation guidance is tracked in
451
453
  [`.agent/README.md`](./.agent/README.md). More examples are available in the
@@ -0,0 +1,12 @@
1
+ export type FitProfileValueMap = Record<number, string | number>;
2
+ /**
3
+ * Lookup-oriented slices of the maintained FIT profile.
4
+ *
5
+ * The full decoder composes these exact objects into PROFILE_TYPES, keeping
6
+ * this module authoritative without loading message definitions in lookup-only consumers.
7
+ */
8
+ export declare const FIT_PROFILE_COURSE_POINTS: FitProfileValueMap;
9
+ export declare const FIT_PROFILE_GARMIN_PRODUCTS: FitProfileValueMap;
10
+ export declare const FIT_PROFILE_MANUFACTURERS: FitProfileValueMap;
11
+ export declare const FIT_PROFILE_SPORTS: FitProfileValueMap;
12
+ export declare const FIT_PROFILE_SUB_SPORTS: FitProfileValueMap;