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 +16 -0
- package/PROFILE.md +16 -8
- package/README.md +7 -5
- package/dist/cjs/profile-lookup-data.d.ts +12 -0
- package/dist/cjs/profile-lookup-data.js +990 -0
- package/dist/cjs/profile-lookup.js +8 -13
- package/dist/cjs/profile.js +6 -981
- package/dist/profile-lookup-data.d.ts +12 -0
- package/dist/profile-lookup-data.js +987 -0
- package/dist/profile-lookup.js +1 -6
- package/dist/profile.js +6 -981
- package/package.json +5 -3
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
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
32
|
-
|
|
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
|
|
244
|
-
`src/profile.ts`. Its maintenance and
|
|
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
|
|
447
|
-
regression coverage and a documented source. Do
|
|
448
|
-
manually; run `npm run codegen` after changing the
|
|
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;
|