@scratching-platypus/coordinate-ts 1.0.0 → 1.0.1

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.
@@ -0,0 +1,6 @@
1
+ export type Coordinate = {
2
+ latitude: number;
3
+ longitude: number;
4
+ };
5
+ export declare function equals(a: Coordinate, b: Coordinate): boolean;
6
+ export declare function approxEquals(a: Coordinate, b: Coordinate, epsilon?: number): boolean;
@@ -0,0 +1 @@
1
+ export * from "./coordinate";
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@scratching-platypus/coordinate-ts",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A geographic coordinates (latitude/longitude) type for TypeScript with utilities for strict and tolerant comparison.",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
7
8
  "exports": {
8
9
  ".": {
9
- "import": "./dist/index.mjs"
10
+ "import": "./dist/index.mjs",
11
+ "types": "./dist/index.d.ts"
10
12
  }
11
13
  },
12
14
  "author": {
@@ -32,21 +34,22 @@
32
34
  "typescript"
33
35
  ],
34
36
  "scripts": {
35
- "build": "esbuild src/index.ts --bundle --format=esm --platform=neutral --outfile=dist/index.mjs --target=es2020 --sourcemap",
36
- "release": "esbuild src/index.ts --bundle --format=esm --platform=neutral --outfile=dist/index.mjs --target=es2020 --sourcemap --minify",
37
- "dev": "esbuild src/index.ts --bundle --format=esm --platform=neutral --outfile=dist/index.mjs --target=es2020 --sourcemap --watch",
37
+ "clean": "node --rm dist",
38
+ "build:js": "esbuild src/index.ts --bundle --format=esm --platform=neutral --outfile=dist/index.mjs --target=es2020 --sourcemap",
39
+ "build:types": "tsc -p tsconfig.build.json",
40
+ "build": "npm run clean && npm run build:js && npm run build:types",
38
41
  "test": "vitest",
39
42
  "start": "node ./dist/index.mjs"
40
43
  },
41
44
  "devDependencies": {
42
45
  "@eslint/js": "^9.39.2",
43
- "@typescript-eslint/eslint-plugin": "^8.50.1",
44
- "@typescript-eslint/parser": "^8.50.1",
46
+ "@typescript-eslint/eslint-plugin": "^8.52.0",
47
+ "@typescript-eslint/parser": "^8.52.0",
45
48
  "esbuild": "^0.27.2",
46
49
  "eslint": "^9.39.2",
47
50
  "prettier": "3.7.4",
48
51
  "typescript": "^5.9.3",
49
- "typescript-eslint": "^8.50.1",
52
+ "typescript-eslint": "^8.52.0",
50
53
  "vitest": "^4.0.16"
51
54
  }
52
55
  }