Skip to content

Commit

Permalink
CVE-2023-0842, upgrade deps of the xml2js^0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNorthMemory committed Apr 12, 2023
1 parent 692e4b3 commit d3a23bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wechatpay-axios-plugin",
"version": "0.8.6",
"version": "0.8.7",
"description": "微信支付APIv2及v3 NodeJS SDK,支持CLI模式请求OpenAPI,支持v3证书下载,v2付款码支付、企业付款、退款,企业微信-企业支付-企业红包/向员工付款,v2&v3 Native支付、扫码支付、H5支付、JSAPI/小程序支付、合单支付...",
"main": "index.js",
"typings": "index.d.ts",
Expand Down Expand Up @@ -52,15 +52,15 @@
"license": "MIT",
"dependencies": {
"axios": "^0.21.2",
"xml2js": "^0.4.23"
"xml2js": "^0.5.0"
},
"peerDependencies": {
"yargs": "^17.1.1"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/eslint-parser": "^7.14.7",
"@types/node": "^16.7.10",
"@types/node": ">= 16.7.10",
"eslint": "^7.29.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.23.4",
Expand Down
4 changes: 3 additions & 1 deletion tests/lib/transformer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ describe('lib/transformer', () => {

it('method `toObject` should returns `{mch_id: \'10000100\'}` while a `<xml><mch_id>10000100</mch_id></xml>` string passed in', () => {
/* eslint-disable-next-line camelcase */
should(Transformer.toObject('<xml><mch_id>10000100</mch_id></xml>')).be.eql({ mch_id: '10000100' });
should(Transformer.toObject('<xml><mch_id>10000100</mch_id></xml>')).be.eql(Object.assign(Object.create(null), { mch_id: '10000100' }));
/* eslint-disable-next-line camelcase */
should(JSON.stringify(Transformer.toObject('<xml><mch_id>10000100</mch_id></xml>'))).be.eql(JSON.stringify({ mch_id: '10000100' }));
});

it('method `toObject` should returns `null` while a `Buffer.from([])` passed in', () => {
Expand Down

0 comments on commit d3a23bc

Please sign in to comment.