diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a57ed5..97bcef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,20 @@ +0.0.26 + - Bug Fix CSV Multiline issue + - Correct TypeScript usage + +0.0.25 + - Modify Travis version to check up to node 12 + - Added proxy agent + - Modify test cases to use host to cross across different region + - Add example for the read stream + - Add example for the feeds upload + 0.0.24 - Add Subscription in Typescript definition - Correct Documentation - Allow user to change response type into XML format - Allow user to change content type for request - + 0.0.23 - Bug Fix for Feed Result charset @@ -21,7 +32,7 @@ - Add support for RequestReport API - Add example for GetMyFeesEstimate in Products - Add force check for the XML string - + 0.0.19 - Correct lint and increase test case timeout - Added Status Code in Error Response. @@ -51,8 +62,8 @@ 0.0.15 - Bug fixed ResponseMetadata (RequestId) in success response - - Added throttling details in non-xml response - + - Added throttling details in non-xml response + 0.0.14 - Clean code - Added typeScript example of reports @@ -86,17 +97,17 @@ 0.0.9 July 31, 2017 - Added ResponseMetadata (RequestId) in success response - + 0.0.8 July 29, 2017 - Matching keywords, Get Report List, Get Report - + 0.0.7 July 19, 2017 - Simplify JSON Object, Added Debug Module - Add Example for Get Matching Product and Get Matching Product for Multiple ASIN - + 0.0.6 July 14, 2017 - Add Orders API, Feeds API, Finances API, FulfillmentInboundShipment API, FulfillmentInventory API - + 0.0.5 July 14, 2017 - Add Products API, Added Check for Node 7 @@ -104,4 +115,4 @@ - Update request pattern 0.0.1 July 13, 2017 - - Initial release with Sellers API \ No newline at end of file + - Initial release with Sellers API diff --git a/README.md b/README.md index 3c64ffc..9f1e32e 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ var amazonMws = require('amazon-mws')('AWS_ACCESS_KEY_ID','AWS_SECRET_ACCESS_KEY ## Configuration Using TypeScript ```typescript -import * as MwsApi from 'amazon-mws'; +import MwsApi from 'amazon-mws'; const amazonMws = new MwsApi(); amazonMws.setApiKey(accessKey, accessSecret); diff --git a/examples/typeScript/reports/getReport.ts b/examples/typeScript/reports/getReport.ts index 50dff09..9ebd153 100644 --- a/examples/typeScript/reports/getReport.ts +++ b/examples/typeScript/reports/getReport.ts @@ -1,7 +1,7 @@ const accessKey = process.env.AWS_ACCESS_KEY_ID || 'YOUR_KEY'; const accessSecret = process.env.AWS_SECRET_ACCESS_KEY || 'YOUR_SECRET'; -import * as MwsApi from 'amazon-mws'; +import MwsApi from 'amazon-mws'; const amazonMws = new MwsApi(); amazonMws.setApiKey(accessKey, accessSecret); diff --git a/examples/typeScript/reports/getReportList.ts b/examples/typeScript/reports/getReportList.ts index de27643..2f23487 100644 --- a/examples/typeScript/reports/getReportList.ts +++ b/examples/typeScript/reports/getReportList.ts @@ -1,7 +1,7 @@ const accessKey = process.env.AWS_ACCESS_KEY_ID || 'YOUR_KEY'; const accessSecret = process.env.AWS_SECRET_ACCESS_KEY || 'YOUR_SECRET'; -import * as MwsApi from 'amazon-mws'; +import MwsApi from 'amazon-mws'; const amazonMws = new MwsApi(); amazonMws.setApiKey(accessKey, accessSecret); diff --git a/lib/AmazonMwsResource.js b/lib/AmazonMwsResource.js index 72d0f52..703531f 100644 --- a/lib/AmazonMwsResource.js +++ b/lib/AmazonMwsResource.js @@ -169,9 +169,8 @@ AmazonMwsResource.prototype = { trim: true }; - if (responseString.includes('\n\n')) { - responseString = responseString.split('\n\n')[1]; - } + // Remove all instances of double newlines + responseString = responseString.replace(/\n\n/g, ''); csv.fromString(responseString, options) .on('data', function (value) { diff --git a/package.json b/package.json index 8bf5c52..b4ced1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amazon-mws", - "version": "0.0.25", + "version": "0.0.26", "description": "Amazon MWS API wrapper", "keywords": [ "Amazon MWS",