Skip to content

Commit

Permalink
bump to v0.8.6
Browse files Browse the repository at this point in the history
fix cannot replacement more than one `uri_template` variables issue
  • Loading branch information
TheNorthMemory committed Aug 25, 2022
1 parent eb3aeeb commit e6a2cc1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 变更历史

## v0.8.6 (2022-08-25)
- 修复多个 `uri_template` 占位符变量,无法正确替换问题;
## v0.8.5 (2022-03-09)
- 优化`README`,增加v2版付款到零钱示例不验签使用方法;
- 解决`CLI`下初始化参数`mchid`必须是字符串类型的遗留问题;
Expand Down
2 changes: 1 addition & 1 deletion lib/decorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class Decorator {
* @returns {PromiseLike} - The `AxiosPromise`
*/
request(pathname, method, data, config) {
const url = pathname.replace(/\{(.+)\}/g, (tmpl, named) => (Object.prototype.hasOwnProperty.call(config, named) ? config[named] : tmpl));
const url = pathname.replace(/\{([^}]+)\}/g, (tmpl, named) => (Object.prototype.hasOwnProperty.call(config, named) ? config[named] : tmpl));

debuglog('prepared url: %s, method: %s, data: %o, config: %o', url, method, data, config);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wechatpay-axios-plugin",
"version": "0.8.5",
"version": "0.8.6",
"description": "微信支付APIv2及v3 NodeJS SDK,支持CLI模式请求OpenAPI,支持v3证书下载,v2付款码支付、企业付款、退款,企业微信-企业支付-企业红包/向员工付款,v2&v3 Native支付、扫码支付、H5支付、JSAPI/小程序支付、合单支付...",
"main": "index.js",
"typings": "index.d.ts",
Expand Down

0 comments on commit e6a2cc1

Please sign in to comment.