From 46601eaf39de3ed5a1f404c448866891d8e76a94 Mon Sep 17 00:00:00 2001 From: KirianCaumes Date: Mon, 19 Apr 2021 21:13:55 +0200 Subject: [PATCH] Trying fix --- README.MD | 3 ++- lib/interface/IItem.ts | 3 ++- lib/marketplace.ts | 3 ++- package-lock.json | 2 +- package.json | 4 ++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.MD b/README.MD index 1f419a3..1b395c7 100644 --- a/README.MD +++ b/README.MD @@ -169,7 +169,8 @@ interface IItem { price: { base: string | null | undefined, shipping: string | null | undefined, - from: string | null | undefined + from: string | null | undefined, + isoFrom: string | null | undefined, }, community: { have: number | null | undefined, diff --git a/lib/interface/IItem.ts b/lib/interface/IItem.ts index 210f75f..7057aaa 100644 --- a/lib/interface/IItem.ts +++ b/lib/interface/IItem.ts @@ -28,7 +28,8 @@ export default interface IItem { price: { base: string | null | undefined, shipping: string | null | undefined, - from: string | null | undefined + from: string | null | undefined, + isoFrom: string | null | undefined, }, community: { have: number | null | undefined, diff --git a/lib/marketplace.ts b/lib/marketplace.ts index f69be8b..d1926b2 100644 --- a/lib/marketplace.ts +++ b/lib/marketplace.ts @@ -280,7 +280,8 @@ export default class Marketplace implements IInput { price: { base: this._convertDevise(el.querySelector('.price')?.textContent?.replace(/\s+/g, " ")?.replace(/,/, '.')!), shipping: isNaN(parseFloat(shipping)) ? null : shipping, - from: (EFromIso as any)[country] ?? country ?? "" + from: country, + isoFrom: (EFromIso as any)[country] ?? country ?? "" }, community: { have: isNaN(have) ? null : have, diff --git a/package-lock.json b/package-lock.json index f81eaf1..e4a4238 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "discogs-marketplace-api-nodejs", - "version": "1.2.3", + "version": "1.2.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b7d7e70..29ee24f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discogs-marketplace-api-nodejs", - "version": "1.2.3", + "version": "1.2.5", "description": "Another (better ?) NodeJs library to fetch data from Discog's marketplace", "keywords": [ "discogs", @@ -19,7 +19,7 @@ "start": "nodemon -r tsconfig-paths/register ./lib/index.ts", "build": "ttsc", "test": "jest", - "prepublish": "npm run build" + "prepare": "npm run build" }, "main": "dist/index.js", "types": "dist/index.d.ts",