@jetta/axle-load-calculator 0.3.4 → 0.3.5
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 +2 -0
- package/package.json +18 -2
- package/CHANGELOG.md +0 -71
- package/tsconfig.eslint.json +0 -15
- package/tsconfig.json +0 -19
package/README.md
CHANGED
|
@@ -74,6 +74,7 @@ Also exported from `@jetta/axle-load-calculator` for `instanceof` checks when us
|
|
|
74
74
|
|
|
75
75
|
- [zod](https://github.com/colinhacks/zod) — request validation at the public boundary
|
|
76
76
|
- [`@jetta/number-compare`](https://www.npmjs.com/package/@jetta/number-compare) — float-safe interval tests in cargo collision
|
|
77
|
+
- [publint](https://publint.dev/) (dev) — npm package manifest validation
|
|
77
78
|
|
|
78
79
|
## Scripts
|
|
79
80
|
|
|
@@ -81,6 +82,7 @@ Also exported from `@jetta/axle-load-calculator` for `instanceof` checks when us
|
|
|
81
82
|
|---------|-------------|
|
|
82
83
|
| `npm test` | Mocha tests (physics + Java integration fixtures) |
|
|
83
84
|
| `npm run lint` | ESLint (`src`, `test/src`) |
|
|
85
|
+
| `npm run lint:package` | Validate npm publish manifest with publint (run after `build`) |
|
|
84
86
|
| `npm run build` | `tsc` → `build/` |
|
|
85
87
|
|
|
86
88
|
## Layout
|
package/package.json
CHANGED
|
@@ -1,20 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetta/axle-load-calculator",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Merged weight_by_axis physics and orchestration library",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./build/index.d.ts",
|
|
12
|
+
"default": "./build/index.js"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"build"
|
|
18
|
+
],
|
|
8
19
|
"private": false,
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
9
23
|
"scripts": {
|
|
10
24
|
"prebuild": "rm -rf build/* && npm ci",
|
|
11
25
|
"test": "tsx ./node_modules/mocha/bin/mocha \"test/**/*.ts\"",
|
|
12
26
|
"build": "tsc",
|
|
13
27
|
"lint": "eslint src test/src --ext .ts",
|
|
14
28
|
"lint:fix": "eslint src test/src --fix",
|
|
29
|
+
"lint:package": "publint --strict --pack npm",
|
|
15
30
|
"audit": "npm audit --omit=dev",
|
|
16
31
|
"preversion": "git fetch --prune --tags",
|
|
17
|
-
"version": "npm run build",
|
|
32
|
+
"version": "npm run build && npm run lint:package",
|
|
18
33
|
"postversion": "git push origin HEAD --follow-tags",
|
|
19
34
|
"publish:alpha": "npm version --tag-version-prefix=alpha-v",
|
|
20
35
|
"publish:stable": "npm version",
|
|
@@ -33,6 +48,7 @@
|
|
|
33
48
|
"@typescript-eslint/parser": "^8.59.4",
|
|
34
49
|
"chai": "^6.2.2",
|
|
35
50
|
"mocha": "^11.7.6",
|
|
51
|
+
"publint": "^0.3.24",
|
|
36
52
|
"tsx": "^4.22.3",
|
|
37
53
|
"typescript": "^6.0.3"
|
|
38
54
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to `@jetta/axle-load-calculator` are documented in this file.
|
|
4
|
-
|
|
5
|
-
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
|
-
|
|
7
|
-
## [Unreleased]
|
|
8
|
-
|
|
9
|
-
### Added
|
|
10
|
-
|
|
11
|
-
- Cargo collision check after axle loads are written (`CollisionChecker`), using `lt` from `@jetta/number-compare` (default epsilon `1e-9`).
|
|
12
|
-
- Public `ItemOverlapError` thrown by `calculate_weight_on_axles_physics` when two allocated items share volume.
|
|
13
|
-
|
|
14
|
-
### Fixed
|
|
15
|
-
|
|
16
|
-
- Face-touching boxes (IEEE ULP on edges such as `4.075 + 0.815` vs `4.89`) are no longer treated as overlap, so callers can keep axle kg instead of skipping the gate.
|
|
17
|
-
|
|
18
|
-
## [0.3.2] - 2026-07-23
|
|
19
|
-
|
|
20
|
-
### Fixed
|
|
21
|
-
|
|
22
|
-
- Same-grouper container loads are merged for mass-center so results match MS.
|
|
23
|
-
|
|
24
|
-
## [0.3.0] - 2026-06-02
|
|
25
|
-
|
|
26
|
-
### Changed
|
|
27
|
-
|
|
28
|
-
- Public API accepts objects only, returns objects, and throws domain errors instead of mixed string/object I/O.
|
|
29
|
-
|
|
30
|
-
### Removed
|
|
31
|
-
|
|
32
|
-
- Collision test artifacts and unused overlap error after `CollisionChecker` removal.
|
|
33
|
-
|
|
34
|
-
### Added
|
|
35
|
-
|
|
36
|
-
- npm coverage script with 80% line, function, branch, and statement thresholds.
|
|
37
|
-
|
|
38
|
-
## [0.2.1] - 2026-06-02
|
|
39
|
-
|
|
40
|
-
### Removed
|
|
41
|
-
|
|
42
|
-
- `CollisionChecker` and its call from the weight-by-axis task.
|
|
43
|
-
|
|
44
|
-
## [0.2.0] - 2026-06-02
|
|
45
|
-
|
|
46
|
-
### Added
|
|
47
|
-
|
|
48
|
-
- First published library surface: `calculate_weight_on_axles_physics`, domain exceptions, Zod request validation, and in-process physics plus orchestration.
|
|
49
|
-
|
|
50
|
-
### Changed
|
|
51
|
-
|
|
52
|
-
- Package entry points use lowercase `index`.
|
|
53
|
-
- Weight calculation accepted both JSON strings and objects (superseded in 0.3.0).
|
|
54
|
-
|
|
55
|
-
## [0.1.3] - 2026-06-02
|
|
56
|
-
|
|
57
|
-
### Changed
|
|
58
|
-
|
|
59
|
-
- Package is public (`private: false`) for npm publish.
|
|
60
|
-
|
|
61
|
-
## [0.1.2] - 2026-06-02
|
|
62
|
-
|
|
63
|
-
### Added
|
|
64
|
-
|
|
65
|
-
- Bitbucket Pipelines for CI/CD.
|
|
66
|
-
|
|
67
|
-
## [0.1.0] - 2026-06-02
|
|
68
|
-
|
|
69
|
-
### Added
|
|
70
|
-
|
|
71
|
-
- Project scaffolding, transport and vehicle models, deflection and tare, axle-weight services, weight-by-axis orchestration, and golden deflection fixtures.
|
package/tsconfig.eslint.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "NodeNext",
|
|
5
|
-
"moduleResolution": "NodeNext",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"rootDir": ".",
|
|
10
|
-
"noEmit": true,
|
|
11
|
-
"types": ["node"]
|
|
12
|
-
},
|
|
13
|
-
"include": ["src/**/*", "test/src/**/*"],
|
|
14
|
-
"exclude": ["node_modules", "build"]
|
|
15
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "NodeNext",
|
|
5
|
-
"moduleResolution": "NodeNext",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"outDir": "build",
|
|
10
|
-
"rootDir": "src",
|
|
11
|
-
"declaration": true,
|
|
12
|
-
"declarationMap": true,
|
|
13
|
-
"noUnusedLocals": true,
|
|
14
|
-
"noUnusedParameters": true,
|
|
15
|
-
"types": ["node"]
|
|
16
|
-
},
|
|
17
|
-
"include": ["src/**/*"],
|
|
18
|
-
"exclude": ["node_modules", "build", "test"]
|
|
19
|
-
}
|