trackswap 0.0.25 → 0.0.27

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/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "trackswap",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "description": "A powerful and flexible GPX parser and encoder library for Node.js and TypeScript. TrackSwap provides comprehensive support for GPX 1.1 format with advanced features like plugin system, middleware support, and optimized performance.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
+ "types": "./dist/index.d.ts",
10
11
  "import": "./dist/index.js",
11
- "require": "./dist/index.cjs",
12
- "types": "./dist/index.d.ts"
12
+ "require": "./dist/index.cjs"
13
13
  }
14
14
  },
15
15
  "files": [
@@ -26,11 +26,12 @@
26
26
  "dev": "ts-node src/index.ts",
27
27
  "clean": "rm -rf dist",
28
28
  "build": "npm run clean && npm run build:types && npm run build:esm && npm run build:cjs && npm run build:optimize",
29
- "build:types": "tsc --emitDeclarationOnly",
29
+ "build:types": "tsc -p tsconfig.types.json",
30
30
  "build:esm": "NODE_ENV=production node build.config.js",
31
31
  "build:cjs": "NODE_ENV=production FORMAT=cjs node build.config.js",
32
32
  "build:dev": "npm run clean && npm run build:types && NODE_ENV=development node build.config.js",
33
33
  "build:optimize": "node scripts/optimize-dist.js",
34
+ "verify:types": "node -e \"const fs=require('fs'); const files=['dist/index.d.ts','dist/TrackSwap.d.ts','dist/types.d.ts']; const missing=files.filter((f)=>!fs.existsSync(f)); if(missing.length){console.error('Missing type artifacts:', missing.join(', ')); process.exit(1);} console.log('Type artifacts verified');\"",
34
35
  "build:js": "esbuild src/index.ts --bundle --platform=node --target=node14 --format=esm --outfile=dist/index.js --minify --sourcemap",
35
36
  "build:tsc": "tsc && npm run minify",
36
37
  "minify": "terser dist/**/*.js --compress --mangle --output dist/index.min.js --source-map",
@@ -38,7 +39,7 @@
38
39
  "start": "node dist/index.js",
39
40
  "test:gpx": "cd example/gpx && rm -f output* *.json *_encoded.xml && node test.js",
40
41
  "test:fit": "cd example/FIT && rm -rf output && node test.js",
41
- "prepublishOnly": "npm run build"
42
+ "prepublishOnly": "npm run build && npm run verify:types"
42
43
  },
43
44
  "keywords": [
44
45
  "gpx",
@@ -70,13 +71,14 @@
70
71
  },
71
72
  "devDependencies": {
72
73
  "@types/node": "^22.15.24",
74
+ "@types/tz-lookup": "^6.1.2",
73
75
  "esbuild": "^0.19.12",
74
76
  "terser": "^5.27.0",
75
77
  "ts-node": "^10.9.2",
76
78
  "typescript": "^5.8.3"
77
79
  },
78
80
  "dependencies": {
79
- "@garmin/fitsdk": "^21.171.0",
81
+ "@garmin/fitsdk": "^21.195.0",
80
82
  "dayjs": "^1.11.13",
81
83
  "geolib": "^3.3.4",
82
84
  "htmlparser2": "^10.0.0"