pathao-merchant-sdk 2.3.0 → 2.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 (3) hide show
  1. package/CHANGELOG.md +9 -16
  2. package/README.md +14 -6
  3. package/package.json +13 -14
package/CHANGELOG.md CHANGED
@@ -5,29 +5,22 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [2.3.0](https://github.com/Sifat07/pathao-merchant-sdk/compare/pathao-merchant-sdk-v2.2.0...pathao-merchant-sdk-v2.3.0) (2026-04-16)
8
+ ## [2.3.1](https://github.com/Sifat07/pathao-merchant-sdk/compare/pathao-merchant-sdk-v2.3.0...pathao-merchant-sdk-v2.3.1) (2026-09-17)
9
9
 
10
10
 
11
- ### Features
11
+ ### Bug Fixes
12
12
 
13
- * add comprehensive CI/CD pipeline and automatic release management ([2448245](https://github.com/Sifat07/pathao-merchant-sdk/commit/244824566dd20171fe28365d0b312d3c7f07f51e))
14
- * add comprehensive CI/CD pipeline and automatic release management ([2448245](https://github.com/Sifat07/pathao-merchant-sdk/commit/244824566dd20171fe28365d0b312d3c7f07f51e))
15
- * add webhook support and comprehensive security hardening (v2.1.0) ([fd24917](https://github.com/Sifat07/pathao-merchant-sdk/commit/fd24917a2d6bdd21dada4eb434750c010d660c45))
16
- * enhance Pathao API SDK with environment variable support and improved error handling ([b4fa591](https://github.com/Sifat07/pathao-merchant-sdk/commit/b4fa59117c9f19d5da1396f2b6fa507d6610d7b5))
17
- * update error handling ([fa4dce5](https://github.com/Sifat07/pathao-merchant-sdk/commit/fa4dce5a13a414a0ecec312a149a7162655ee360))
13
+ * **deps:** bump axios to 1.20.0, resolve prod vulnerabilities ([0c31804](https://github.com/Sifat07/pathao-merchant-sdk/commit/0c318043831cf0a74a041b4aa6aa8a827a48f737))
18
14
 
15
+ ## [2.3.0](https://github.com/Sifat07/pathao-merchant-sdk/compare/pathao-merchant-sdk-v2.2.0...pathao-merchant-sdk-v2.3.0) (2026-04-16)
19
16
 
20
17
  ### Bug Fixes
21
18
 
22
- * auto release ([eaabb14](https://github.com/Sifat07/pathao-merchant-sdk/commit/eaabb148a919b418288b0dd9b68c50616e941502))
23
- * correct version base to 2.2.0 and use PAT for release-please ([eaabb14](https://github.com/Sifat07/pathao-merchant-sdk/commit/eaabb148a919b418288b0dd9b68c50616e941502))
24
- * defer validation ([2c08435](https://github.com/Sifat07/pathao-merchant-sdk/commit/2c0843549a012f81d89f74344a97393ab81638c3))
25
- * fix and update using latest developers docs ([f2205a2](https://github.com/Sifat07/pathao-merchant-sdk/commit/f2205a23ae9b5c38e38ecf94cb48bf300f46c6a0))
26
- * fix webhook integration ([498d0f2](https://github.com/Sifat07/pathao-merchant-sdk/commit/498d0f25ee7e0f88484131f8b18ec8ce20faa04b))
27
- * separate publishing from CI and fix permission issues ([2448245](https://github.com/Sifat07/pathao-merchant-sdk/commit/244824566dd20171fe28365d0b312d3c7f07f51e))
28
- * update CI/CD workflows to use pnpm instead of npm ([2448245](https://github.com/Sifat07/pathao-merchant-sdk/commit/244824566dd20171fe28365d0b312d3c7f07f51e))
29
- * update pnpm version to 9 in CI workflows ([2448245](https://github.com/Sifat07/pathao-merchant-sdk/commit/244824566dd20171fe28365d0b312d3c7f07f51e))
30
- * upgrade pnpm to v10 in CI to fix audit endpoint 410 error ([eaabb14](https://github.com/Sifat07/pathao-merchant-sdk/commit/eaabb148a919b418288b0dd9b68c50616e941502))
19
+ * Replace broken `pnpm audit` with OSV Scanner scoped to production dependencies
20
+ * Fix release-please to read from manifest — prevents wrong-version PRs
21
+ * Fix `manual-release.yml`: broken scripts, wrong step ordering, pnpm v9
22
+ * Add `permissions` blocks to all CI workflows
23
+ * Pin pnpm to v9 consistently across all workflows
31
24
 
32
25
  ## [Unreleased]
33
26
 
package/README.md CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/pathao-merchant-sdk.svg)](https://www.npmjs.com/package/pathao-merchant-sdk)
4
4
  [![npm downloads](https://img.shields.io/npm/dm/pathao-merchant-sdk.svg)](https://www.npmjs.com/package/pathao-merchant-sdk)
5
+ [![bundle size](https://img.shields.io/bundlephobia/minzip/pathao-merchant-sdk.svg)](https://bundlephobia.com/package/pathao-merchant-sdk)
6
+ [![GitHub stars](https://img.shields.io/github/stars/sifat07/pathao-merchant-sdk.svg)](https://github.com/sifat07/pathao-merchant-sdk/stargazers)
5
7
  [![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
6
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
- [![Build Status](https://img.shields.io/github/actions/workflow/status/sifat07/pathao-merchant-sdk/ci.yml?branch=main)](https://github.com/sifat07/pathao-merchant-sdk/actions)
9
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/sifat07/pathao-merchant-sdk/ci-cd.yml?branch=main)](https://github.com/sifat07/pathao-merchant-sdk/actions)
8
10
 
9
11
  An **unofficial** TypeScript SDK for the [Pathao Courier Merchant API](https://merchant.pathao.com/developer). Provides a type-safe interface for order management, store management, price calculation, location lookup, and webhook handling.
10
12
 
@@ -102,10 +104,10 @@ Obtain your `client_id`, `client_secret`, username, and password from the **API
102
104
 
103
105
  ### Environment Variables
104
106
 
105
- Copy `env.example` to `.env`:
107
+ Copy `.env.example` to `.env`:
106
108
 
107
109
  ```bash
108
- cp env.example .env
110
+ cp .env.example .env
109
111
  ```
110
112
 
111
113
  ```env
@@ -443,7 +445,7 @@ handler.on("error", (err) => {
443
445
 
444
446
  app.post(
445
447
  "/webhooks/pathao",
446
- express.json(),
448
+ express.raw({ type: "application/json" }),
447
449
  handler.expressMiddleware(),
448
450
  (req, res) => {
449
451
  // expressMiddleware() sets the required secret header automatically.
@@ -488,7 +490,7 @@ import {
488
490
  PathaoWebhookError,
489
491
  } from "pathao-merchant-sdk/webhooks";
490
492
 
491
- app.post("/webhooks/pathao", express.json(), (req, res) => {
493
+ app.post("/webhooks/pathao", express.raw({ type: "application/json" }), (req, res) => {
492
494
  res.setHeader(
493
495
  "X-Pathao-Merchant-Webhook-Integration-Secret",
494
496
  process.env.PATHAO_WEBHOOK_SECRET!,
@@ -602,7 +604,13 @@ Open an issue on [GitHub](https://github.com/sifat07/pathao-merchant-sdk/issues)
602
604
 
603
605
  ## Changelog
604
606
 
605
- ### 2.2.0 — 2026-04-15
607
+ ### 2.3.0 — 2026-04-16
608
+
609
+ - Replaced broken `pnpm audit` with OSV Scanner (scoped to production dependencies)
610
+ - Fixed release-please to read from manifest — prevents wrong version PRs
611
+ - Fixed CI/CD: pinned pnpm to v9, added `permissions` blocks, fixed `manual-release.yml` broken scripts and step ordering
612
+
613
+ ### 2.2.0 — 2026-04-16
606
614
 
607
615
  - Added 3 missing webhook event types from official dashboard docs: `order.return-id-created`, `order.return-in-transit`, `order.returned-to-merchant` with full `ReturnOrderWebhookPayload` type
608
616
  - Fixed tsconfig: added `node` and `jest` to `types` so `Buffer`/`EventEmitter` resolve correctly
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pathao-merchant-sdk",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Unofficial TypeScript SDK for the Pathao Merchant API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -25,17 +25,6 @@
25
25
  "CHANGELOG.md",
26
26
  "CONTRIBUTING.md"
27
27
  ],
28
- "scripts": {
29
- "build": "tsup",
30
- "dev": "tsup --watch",
31
- "test": "jest",
32
- "test:watch": "jest --watch",
33
- "lint": "eslint src/**/*.ts",
34
- "lint:fix": "eslint src/**/*.ts --fix",
35
- "type-check": "tsc --noEmit",
36
- "prepublishOnly": "pnpm run build && pnpm run test",
37
- "audit:security": "osv-scanner --lockfile=pnpm-lock.yaml"
38
- },
39
28
  "keywords": [
40
29
  "pathao",
41
30
  "merchant",
@@ -63,7 +52,7 @@
63
52
  "node": ">=18.0.0"
64
53
  },
65
54
  "dependencies": {
66
- "axios": "^1.15.0"
55
+ "axios": "^1.20.0"
67
56
  },
68
57
  "devDependencies": {
69
58
  "@types/jest": "^29.5.0",
@@ -79,5 +68,15 @@
79
68
  },
80
69
  "peerDependencies": {
81
70
  "typescript": ">=4.9.0"
71
+ },
72
+ "scripts": {
73
+ "build": "tsup",
74
+ "dev": "tsup --watch",
75
+ "test": "jest",
76
+ "test:watch": "jest --watch",
77
+ "lint": "eslint src/**/*.ts",
78
+ "lint:fix": "eslint src/**/*.ts --fix",
79
+ "type-check": "tsc --noEmit",
80
+ "audit:security": "osv-scanner --lockfile=pnpm-lock.yaml"
82
81
  }
83
- }
82
+ }