All versions since 0.1.3
0.1.3
Patch Changes
ba9e8e8Thanks @uunw! - Point every packagehomepageat the new docs sitehttps://thai-qr-payment.js.org. Ship sourcemaps with every published bundle and keep original function + class names through minification — published code is now traceable to source and no longer trips supply-chain scanners that flag aggressive mangling.
0.1.4
Patch Changes
655b343Thanks @uunw! - Sanitize numeric SVG attributes (width,height,viewBox,transform) at the renderer boundary.renderQrSvg()now coercesoptions.size,options.quietZone, andmatrix.sizethrough a finite-non-negative-integer guard before interpolation. Closes 7 CodeQLjs/html-constructed-from-inputalerts; also hardens the JS-callable surface against NaN/Infinity/non-numeric input.
1.0.0
Minor Changes
-
7ae8f9dThanks @uunw! - Close the feature parity gap with reference Thai QR libraries. New surface:parsePayload(payload, { strict })— opt-in strict CRC mode throws on a missing or mismatched checksum tag. Default stays backwards-compatible.- Truncated-CRC auto-fix — non-strict parses now recover payloads whose CRC was clipped to 1–3 hex chars (some Thai banking apps emit these). The parsed result exposes a
crc: { value, valid, truncated }bookkeeping field so callers can warn on the source app’s bug. - Raw tag accessors on
ParsedPayload—getTag(id)andgetTagValue(id, subId?)let callers read unknown / future TLV tags without re-parsing. The fullrawTagslist is also exposed. - TrueMoney Wallet QR —
ThaiQrPaymentBuilder.trueMoney(mobileNo, { amount, message })plus parser support for the matching wire format. UTF-16BE personal-message tag 81 round-trips throughencodePersonalMessage/decodePersonalMessage. - Slip Verify Mini-QR —
buildSlipVerify/parseSlipVerifyfor the slip-verify envelope (root tag 00, country 51, CRC tag 91 — different from a payment QR). Used by bank Open APIs to look up transactions after slip OCR. - TrueMoney Slip Verify —
buildTrueMoneySlipVerify/parseTrueMoneySlipVerify, including the lowercase-CRC quirk that TrueMoney emits. - BOT 1D Barcode —
buildBotBarcode/parseBotBarcodefor the\r-delimited counter-payment barcode scanned at bank tellers and 7-Eleven counters. Not EMVCo TLV — a separate wire format entirely.
Bundle impact: payload package 3.09 KB → 4.65 KB brotli (still inside the 5 KB budget). The
payloadFor-only entrypoint grew 2.98 → 4.48 KB because class methods aren’t tree-shaken; budget bumped 4 → 5 KB to match. -
5a5a62eThanks @uunw! - Close the second feature parity gap (vspromptpay-js). Four new wire-format surfaces:.bankAccount(bankCode, accountNo)— PromptPay credit transfer to a bank account (sub-tag 04 under tag 29). Adds'bankAccount'toPromptPayRecipientType. Parser exposes optionalbankCode+accountNoon the parsed merchant..ota(otaCode)— One-Time Authorization PromptPay credit transfer (sub-tag 05, fixed 10 chars). Builder swaps the merchant AID fromA000000677010111toA000000677010114so scanners route the payload through the single-use flow. Parser surfaces the OTA code onParsedPromptPay.ota..vatTqrc({ sellerTaxBranchId, vatRate?, vatAmount })— VAT TQRC (top-level tag 80). Turns a regular PromptPay payment QR into a Bank-of-Thailand-Tax-Qualified-QR-Code source for e-tax-receipt integrations. Parser exposesvatTqrconParsedPayload..billPayment({ ..., crossBorder: true })— cross-border bill payment (ASEAN PayNow / DuitNow / QRIS interop). Same tag-30 envelope, different AID (A000000677012006). Parser flagsParsedBillPayment.crossBorder: boolean. The 18-charpurposeOfTransactiontriple (currencyCode + localAmount + countryCode) round-trips opaquely.
Bundle impact:
@thai-qr-payment/payload4.65 → 5.37 KB brotli; sub-path entry 4.61 → 5.33 KB;payloadFor-only entry 4.48 → 5.20 KB. All three budgets bumped 5 → 6 KB to absorb the new class methods (which don’t tree-shake).
1.1.0 Latest
Minor Changes
-
948c126Thanks @uunw! - Acronym rename across the public surface. Every PascalCase identifier whose leading or trailing token was a 2–4 letter acronym (Qr,Crc,Tlv,Svg,Vat,Tqrc,Bot) now renders the acronym in all-caps to match the BoT / EMVCo / ISO spec convention and the JS native style for acronym types (URL,JSON,XMLHttpRequest).Before After ThaiQrPaymentBuilderThaiQRPaymentBuilderParsedCrcParsedCRCTlvFieldTLVFieldQrMatrixQRMatrixQrSvgOptionsQRSvgOptionsVatTqrcInputVATTQRCInputParsedVatTqrcParsedVATTQRCBotBarcodeInputBOTBarcodeInputParsedBotBarcodeParsedBOTBarcodeThaiQrPayment(React)ThaiQRPaymentThaiQrPaymentMatrix(React)ThaiQRPaymentMatrixrenderThaiQrPaymentrenderThaiQRPaymentrenderThaiQrPaymentMatrixrenderThaiQRPaymentMatrixrenderQrSvgrenderQRSvgbuildBotBarcodebuildBOTBarcodeparseBotBarcodeparseBOTBarcodeMethods on the builder (
.vatTqrc(),.bankAccount(),.ota(), …) keep camelCase per TypeScript’s standard library convention. Constants (TAG_VAT_TQRC,GUID_PROMPTPAY, …) were already SCREAMING_SNAKE. To migrate, run a single regex pass on your codebase using the table above. No behaviour or wire-format changes.