@allratestoday/sdk 1.3.0 → 1.3.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.
Files changed (2) hide show
  1. package/README.md +24 -0
  2. package/package.json +10 -3
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @allratestoday/sdk
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@allratestoday/sdk.svg)](https://www.npmjs.com/package/@allratestoday/sdk)
4
+ [![codecov](https://codecov.io/gh/allratestoday/exchange-rates-api/branch/main/graph/badge.svg)](https://codecov.io/gh/allratestoday/exchange-rates-api)
5
+ [![Known Vulnerabilities](https://snyk.io/test/github/allratestoday/exchange-rates-api/badge.svg)](https://snyk.io/test/github/allratestoday/exchange-rates-api)
4
6
  [![license](https://img.shields.io/npm/l/@allratestoday/sdk.svg)](https://github.com/allratestoday/exchange-rates-api/blob/main/LICENSE)
5
7
  [![TypeScript](https://badges.frapsoft.com/typescript/code/typescript.svg?v=101)](https://www.typescriptlang.org/)
6
8
  [![zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](https://www.npmjs.com/package/@allratestoday/sdk)
@@ -471,6 +473,28 @@ console.log({ labels, values });
471
473
 
472
474
  ---
473
475
 
476
+ ## Testing
477
+
478
+ Run isolated unit tests (no API calls needed):
479
+
480
+ ```bash
481
+ npm test
482
+ ```
483
+
484
+ Run tests with coverage report:
485
+
486
+ ```bash
487
+ npm run test:coverage
488
+ ```
489
+
490
+ Watch mode for development:
491
+
492
+ ```bash
493
+ npm run test:watch
494
+ ```
495
+
496
+ ---
497
+
474
498
  ## Pricing
475
499
 
476
500
  | Plan | Requests/Month | Price |
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@allratestoday/sdk",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "The most elegant way to access real-time mid-market exchange rates in Node.js and browsers. 160+ currencies, Reuters/Refinitiv data, zero dependencies.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
- "files": ["dist"],
8
+ "files": [
9
+ "dist"
10
+ ],
9
11
  "exports": {
10
12
  ".": {
11
13
  "types": "./dist/index.d.ts",
@@ -15,6 +17,9 @@
15
17
  },
16
18
  "scripts": {
17
19
  "build": "tsup src/index.ts --format cjs,esm --dts",
20
+ "test": "vitest run",
21
+ "test:watch": "vitest",
22
+ "test:coverage": "vitest run --coverage",
18
23
  "prepublishOnly": "npm run build"
19
24
  },
20
25
  "keywords": [
@@ -36,7 +41,9 @@
36
41
  "directory": "sdks/javascript"
37
42
  },
38
43
  "devDependencies": {
44
+ "@vitest/coverage-v8": "^4.1.4",
39
45
  "tsup": "^8.0.0",
40
- "typescript": "^5.0.0"
46
+ "typescript": "^5.0.0",
47
+ "vitest": "^4.1.4"
41
48
  }
42
49
  }