discogs-marketplace-api-nodejs 1.18.0 → 1.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.MD CHANGED
@@ -1,11 +1,11 @@
1
- # 🎧 Discogs Marketplace API NodeJS
1
+ # Discogs Marketplace API NodeJS
2
2
 
3
3
  [![NPM Version](https://img.shields.io/npm/v/discogs-marketplace-api-nodejs?logo=npm&color=CB3837)](https://www.npmjs.com/package/discogs-marketplace-api-nodejs) ![GitHub Repo stars](https://img.shields.io/github/stars/KirianCaumes/Discogs-Marketplace-API-NodeJS?style=flat&logo=github&label=Stars&color=%23181717) [![GitHub License](https://img.shields.io/github/license/KirianCaumes/Discogs-Marketplace-API-NodeJS?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI%2FPg0KPHN2ZyBmaWxsPSIjZmZmIiBhcmlhLWhpZGRlbj0idHJ1ZSIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxNiIgZGF0YS12aWV3LWNvbXBvbmVudD0idHJ1ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgPg0KICAgIDxwYXRoIGQ9Ik04Ljc1Ljc1VjJoLjk4NWMuMzA0IDAgLjYwMy4wOC44NjcuMjMxbDEuMjkuNzM2Yy4wMzguMDIyLjA4LjAzMy4xMjQuMDMzaDIuMjM0YS43NS43NSAwIDAgMSAwIDEuNWgtLjQyN2wyLjExMSA0LjY5MmEuNzUuNzUgMCAwIDEtLjE1NC44MzhsLS41My0uNTMuNTI5LjUzMS0uMDAxLjAwMi0uMDAyLjAwMi0uMDA2LjAwNi0uMDA2LjAwNS0uMDEuMDEtLjA0NS4wNGMtLjIxLjE3Ni0uNDQxLjMyNy0uNjg2LjQ1QzE0LjU1NiAxMC43OCAxMy44OCAxMSAxMyAxMWE0LjQ5OCA0LjQ5OCAwIDAgMS0yLjAyMy0uNDU0IDMuNTQ0IDMuNTQ0IDAgMCAxLS42ODYtLjQ1bC0uMDQ1LS4wNC0uMDE2LS4wMTUtLjAwNi0uMDA2LS4wMDQtLjAwNHYtLjAwMWEuNzUuNzUgMCAwIDEtLjE1NC0uODM4TDEyLjE3OCA0LjVoLS4xNjJjLS4zMDUgMC0uNjA0LS4wNzktLjg2OC0uMjMxbC0xLjI5LS43MzZhLjI0NS4yNDUgMCAwIDAtLjEyNC0uMDMzSDguNzVWMTNoMi41YS43NS43NSAwIDAgMSAwIDEuNWgtNi41YS43NS43NSAwIDAgMSAwLTEuNWgyLjVWMy41aC0uOTg0YS4yNDUuMjQ1IDAgMCAwLS4xMjQuMDMzbC0xLjI4OS43MzdjLS4yNjUuMTUtLjU2NC4yMy0uODY5LjIzaC0uMTYybDIuMTEyIDQuNjkyYS43NS43NSAwIDAgMS0uMTU0LjgzOGwtLjUzLS41My41MjkuNTMxLS4wMDEuMDAyLS4wMDIuMDAyLS4wMDYuMDA2LS4wMTYuMDE1LS4wNDUuMDRjLS4yMS4xNzYtLjQ0MS4zMjctLjY4Ni40NUM0LjU1NiAxMC43OCAzLjg4IDExIDMgMTFhNC40OTggNC40OTggMCAwIDEtMi4wMjMtLjQ1NCAzLjU0NCAzLjU0NCAwIDAgMS0uNjg2LS40NWwtLjA0NS0uMDQtLjAxNi0uMDE1LS4wMDYtLjAwNi0uMDA0LS4wMDR2LS4wMDFhLjc1Ljc1IDAgMCAxLS4xNTQtLjgzOEwyLjE3OCA0LjVIMS43NWEuNzUuNzUgMCAwIDEgMC0xLjVoMi4yMzRhLjI0OS4yNDkgMCAwIDAgLjEyNS0uMDMzbDEuMjg4LS43MzdjLjI2NS0uMTUuNTY0LS4yMy44NjktLjIzaC45ODRWLjc1YS43NS43NSAwIDAgMSAxLjUgMFptMi45NDUgOC40NzdjLjI4NS4xMzUuNzE4LjI3MyAxLjMwNS4yNzNzMS4wMi0uMTM4IDEuMzA1LS4yNzNMMTMgNi4zMjdabS0xMCAwYy4yODUuMTM1LjcxOC4yNzMgMS4zMDUuMjczczEuMDItLjEzOCAxLjMwNS0uMjczTDMgNi4zMjdaIj48L3BhdGg%2BDQo8L3N2Zz4%3D&logoColor=fff&label=License)](https://github.com/KirianCaumes/Discogs-Marketplace-API-NodeJS/blob/master/LICENSE) [![Support this project](https://img.shields.io/badge/Support%20this%20project-003087?logo=PayPal&logoColor=fff)](https://www.paypal.me/KirianCaumes)
4
4
 
5
- A modern TypeScript/Node.js client for scraping and retrieving Discogs Marketplace listings — flexible, type safe, and easy to use. 💿
6
- > 💪 No Discogs API token required — this client scrapes public Marketplace data.
5
+ A modern TypeScript/Node.js client for scraping and retrieving Discogs Marketplace listings — flexible, type safe, and easy to use.
6
+ > No Discogs API token required — this client scrapes public Marketplace data.
7
7
 
8
- ## 🚀 Installation
8
+ ## Installation
9
9
 
10
10
  ```sh
11
11
  npm install discogs-marketplace-api-nodejs
@@ -15,20 +15,9 @@ npm install discogs-marketplace-api-nodejs
15
15
  ```
16
16
 
17
17
  The searches go through the API of the Discogs shop (`https://www.discogs.com/shop/list`), from a headless browser.
18
+ For many searches, or on a server, see [Browser](#browser).
18
19
 
19
- You can also pass your own [Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright) browser context as second parameter of
20
- `search`, used as is: it keeps the clearance of Cloudflare (`cf_clearance` cookie) from one search to another. You then
21
- manage its lifecycle.
22
-
23
- ```ts
24
- import { chromium } from 'patchright'
25
-
26
- const context = await chromium.launchPersistentContext('./profile', { channel: 'chrome', headless: false, viewport: null })
27
- const result = await DiscogsMarketplace.search({ artistIds: [244819] }, context)
28
- await context.close()
29
- ```
30
-
31
- ## ⚡ Quick Start
20
+ ## Quick Start
32
21
 
33
22
  ```ts
34
23
  import { DiscogsMarketplace } from 'discogs-marketplace-api-nodejs'
@@ -43,7 +32,7 @@ const result = await DiscogsMarketplace.search({
43
32
  console.log(result.items)
44
33
  ```
45
34
 
46
- ## 📚 Usage Examples
35
+ ## Usage Examples
47
36
 
48
37
  ### 1. Get 250 latest listings by a specific artist in the Rock genre, then the next 250
49
38
 
@@ -148,7 +137,71 @@ const result = await DiscogsMarketplace.search({
148
137
  })
149
138
  ```
150
139
 
151
- ## 🧩 API Reference
140
+ ## Browser
141
+
142
+ By default, each call launches a headless Chromium and closes it. Every search then starts without the clearance of
143
+ Cloudflare (`cf_clearance` cookie), and is blocked more often, especially from a datacenter IP.
144
+
145
+ For many searches, or on a server, pass your own [Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright)
146
+ browser context as last parameter of `search` and `getWantlistReleaseIds`. It keeps the clearance from one search to
147
+ another, and you manage its lifecycle.
148
+
149
+ ```ts
150
+ import { chromium } from 'patchright'
151
+
152
+ const context = await chromium.launchPersistentContext('./profile', {
153
+ channel: 'chrome',
154
+ headless: false,
155
+ viewport: null,
156
+ args: ['--no-sandbox', '--disable-dev-shm-usage'],
157
+ })
158
+ const result = await DiscogsMarketplace.search({ artistIds: [244819] }, context)
159
+ await context.close()
160
+ ```
161
+
162
+ - **One context for the whole app**, not one per search, so that every search benefits from the clearance.
163
+ - **Real Chrome, headful** (`channel: 'chrome'`, `headless: false`): it passes Cloudflare far more often. Install it
164
+ with `npx patchright install --with-deps chrome`.
165
+ - **Persistent profile** (`'./profile'`), so the clearance survives restarts. After a crash, delete its `Singleton*`
166
+ files, or Chrome refuses to start.
167
+ - **Without GPU** (server, Docker), add `--disable-gpu --enable-unsafe-swiftshader` to `args`, so Chrome does not hang
168
+ and keeps WebGL.
169
+ - **`env`**: Chrome gets your whole environment, secrets included. Pass only what it needs (`PATH`, `HOME`, `DISPLAY`,
170
+ `XAUTHORITY`...), and its language with `LANG` rather than the `locale` option.
171
+ - **Still blocked?** The IP is the problem: go through a residential proxy (`proxy` option).
172
+
173
+ On a server, headful Chrome needs a display: run your app under Xvfb (`xvfb-run -a node index.js`). With Docker, start
174
+ Xvfb from an entrypoint that then `exec`s your app, so that it gets the stop signal:
175
+
176
+ ```dockerfile
177
+ FROM node:24-slim
178
+
179
+ RUN apt-get update \
180
+ && apt-get install -y --no-install-recommends ca-certificates curl tini xvfb \
181
+ && rm -rf /var/lib/apt/lists/*
182
+
183
+ ENV DISPLAY=:99
184
+
185
+ WORKDIR /app
186
+ COPY package*.json ./
187
+ RUN npm ci && npx patchright install --with-deps chrome
188
+ COPY . .
189
+
190
+ ENTRYPOINT ["/usr/bin/tini", "--", "sh", "/app/entrypoint.sh"]
191
+ CMD ["node", "index.js"]
192
+ ```
193
+
194
+ ```sh
195
+ # entrypoint.sh
196
+ Xvfb "$DISPLAY" -screen 0 1280x1024x24 -ac -nolisten tcp >/dev/null 2>&1 &
197
+
198
+ # Wait for the display, 6 seconds at most
199
+ for i in $(seq 30); do [ -e "/tmp/.X11-unix/X${DISPLAY#:}" ] && break; sleep 0.2; done
200
+
201
+ exec "$@"
202
+ ```
203
+
204
+ ## API Reference
152
205
 
153
206
  ### `DiscogsMarketplace.search(searchParams, browserContext?)`
154
207
 
@@ -168,7 +221,7 @@ const result = await DiscogsMarketplace.search({
168
221
  | `sleeveConditions` | `SleeveCondition[]` | Filter by sleeve conditions. | `['Mint (M)', 'Generic']` | – |
169
222
  | `from` | `From[]` | Filter by seller’s countries. | `['FR', 'DE']` | – |
170
223
  | `currencies` | `Currency[]` | Filter by currencies. | `['USD', 'EUR']` | – |
171
- | `priceRange.min`/`max` | `number` | Filter by price range. | `{ min: 10, max: 100 }` | – |
224
+ | `priceRange.min`/`max` | `number` | Filter by price range, in US dollars. | `{ min: 10, max: 100 }` | – |
172
225
  | `years.min`/`max` | `number` | Filter by year range. | `{ min: 1980, max: 1990 }` | – |
173
226
  | `sellerRatingMin` | `number (0–100)` | Minimum seller rating (unrated sellers kept). | `99` | `0` |
174
227
  | `sellerRatingCountMin` | `number` | Minimum number of seller ratings. | `50` | `0` |
@@ -177,6 +230,7 @@ const result = await DiscogsMarketplace.search({
177
230
  | `hideGenericSleeves` | `boolean` | Hide generic sleeves. | – | `false` |
178
231
  | `hideSleevelessMedia` | `boolean` | Hide sleeveless media. | – | `false` |
179
232
  | `showUnavailable` | `boolean` | Show unavailable items. | – | `true` |
233
+ | `withCommunityStats` | `boolean` | Get `community` and `release.rating` (slower). | – | `true` |
180
234
  | `sort` | `Sort` | Sort and sort order (see below). | `'price,asc'` | `'listed,desc'` |
181
235
  | `limit` | `number` | Number of results per page (at most 250). | `100` | `25` |
182
236
  | `after` | `string` | Cursor of the page, from `nextCursor`. | – | – |
@@ -244,7 +298,7 @@ interface SearchResult {
244
298
  country: {
245
299
  name: string
246
300
  /** @example 'US' */
247
- code: CountryValues
301
+ code: CountryValues | null
248
302
  }
249
303
  community: {
250
304
  have: number
@@ -257,19 +311,19 @@ interface SearchResult {
257
311
  }
258
312
  ```
259
313
 
260
- ## 🛠️ Development & Contribution
314
+ ## Development & Contribution
261
315
 
262
316
  - Clone the repo and use the included devcontainer/VSCode setup.
263
317
  - Run: `npm install`
264
318
  - Add your contribution.
265
319
  - Use `npm test` to run unit tests.
266
- - Open a pull request with your new additions! 🎉
320
+ - Open a pull request with your new additions!
267
321
 
268
- ## 👉 Known Issues
322
+ ## Known Issues
269
323
 
270
324
  - Some search parameters might not be compatible with every type of queries.
271
325
  - For other edge cases, feel free to open an [issue on GitHub](https://github.com/KirianCaumes/Discogs-Marketplace-API-NodeJS/issues).
272
326
 
273
- ## 📃 License
327
+ ## License
274
328
 
275
329
  Licensed under [MIT](https://github.com/KirianCaumes/Discogs-Marketplace-API-NodeJS/blob/master/LICENSE).
@@ -9,7 +9,7 @@ declare const Country: {
9
9
  readonly 'Former Czechoslovakia': "CZ";
10
10
  readonly 'Former USSR': "RU";
11
11
  readonly 'France (European Territory)': "FR";
12
- readonly 'French Guyana': "GY";
12
+ readonly 'French Guyana': "GF";
13
13
  readonly 'Guadeloupe (French)': "GP";
14
14
  readonly 'Guam (USA)': "GU";
15
15
  readonly 'Guinea Bissau': "GW";
@@ -34,7 +34,7 @@ declare const Country: {
34
34
  readonly 'Saint Vincent & Grenadines': "VC";
35
35
  readonly 'Slovak Republic': "SK";
36
36
  readonly 'South Korea': "KR";
37
- readonly 'Spain (Canary Islands)': "IC";
37
+ readonly 'Spain (Canary Islands)': "ES";
38
38
  readonly 'Svalbard and Jan Mayen Islands': "SJ";
39
39
  readonly Swaziland: "SZ";
40
40
  readonly Syria: "SY";
@@ -43,7 +43,7 @@ declare const Country: {
43
43
  readonly Tanzania: "TZ";
44
44
  readonly 'United Kingdom': "GB";
45
45
  readonly 'Northern Ireland': "GB";
46
- readonly 'United Kingdom (Channel Islands)': "";
46
+ readonly 'United Kingdom (Channel Islands)': "GB";
47
47
  readonly 'United States': "US";
48
48
  readonly 'USA Minor Outlying Islands': "UM";
49
49
  readonly 'Vatican City State': "VA";
@@ -51,7 +51,7 @@ declare const Country: {
51
51
  readonly Vietnam: "VN";
52
52
  readonly 'Virgin Islands (USA)': "VI";
53
53
  readonly 'Wallis and Futuna Islands': "WF";
54
- readonly Yugoslavia: "GR";
54
+ readonly Yugoslavia: "RS";
55
55
  readonly Zaire: "CD";
56
56
  readonly Afghanistan: "AF";
57
57
  readonly '\u00C5land Islands': "AX";
@@ -279,7 +279,7 @@ const CountryDiscogs = {
279
279
  'Former Czechoslovakia': 'CZ',
280
280
  'Former USSR': 'RU',
281
281
  'France (European Territory)': 'FR',
282
- 'French Guyana': 'GY',
282
+ 'French Guyana': 'GF',
283
283
  'Guadeloupe (French)': 'GP',
284
284
  'Guam (USA)': 'GU',
285
285
  'Guinea Bissau': 'GW',
@@ -296,7 +296,7 @@ const CountryDiscogs = {
296
296
  'New Caledonia (French)': 'NC',
297
297
  'Pitcairn Island': 'PN',
298
298
  'Polynesia (French)': 'PF',
299
- 'Reunion (French)': 'RE', //
299
+ 'Reunion (French)': 'RE',
300
300
  'S. Georgia & S. Sandwich Isls.': 'GS',
301
301
  'Saint Helena': 'SH',
302
302
  'Saint Kitts & Nevis Anguilla': 'KN',
@@ -304,7 +304,7 @@ const CountryDiscogs = {
304
304
  'Saint Vincent & Grenadines': 'VC',
305
305
  'Slovak Republic': 'SK',
306
306
  'South Korea': 'KR',
307
- 'Spain (Canary Islands)': 'IC', //
307
+ 'Spain (Canary Islands)': 'ES',
308
308
  'Svalbard and Jan Mayen Islands': 'SJ',
309
309
  Swaziland: 'SZ',
310
310
  Syria: 'SY',
@@ -313,7 +313,7 @@ const CountryDiscogs = {
313
313
  Tanzania: 'TZ',
314
314
  'United Kingdom': 'GB',
315
315
  'Northern Ireland': 'GB',
316
- 'United Kingdom (Channel Islands)': '',
316
+ 'United Kingdom (Channel Islands)': 'GB',
317
317
  'United States': 'US',
318
318
  'USA Minor Outlying Islands': 'UM',
319
319
  'Vatican City State': 'VA',
@@ -321,7 +321,7 @@ const CountryDiscogs = {
321
321
  Vietnam: 'VN',
322
322
  'Virgin Islands (USA)': 'VI',
323
323
  'Wallis and Futuna Islands': 'WF',
324
- Yugoslavia: 'GR',
324
+ Yugoslavia: 'RS',
325
325
  Zaire: 'CD',
326
326
  };
327
327
  const Country = {
@@ -79,7 +79,7 @@ export interface SearchParams {
79
79
  */
80
80
  currencies?: Array<Currency>;
81
81
  /**
82
- * Price range filter.
82
+ * Price range filter, in US dollars: Discogs converts the price of each listing.
83
83
  */
84
84
  priceRange?: {
85
85
  /** Minimum price */
@@ -131,6 +131,12 @@ export interface SearchParams {
131
131
  * @default true
132
132
  */
133
133
  showUnavailable?: boolean;
134
+ /**
135
+ * Get the community stats of the releases (`community` and `release.rating`), at the cost of a second request.
136
+ * If false, `community` is 0 and `release.rating` is null.
137
+ * @default true
138
+ */
139
+ withCommunityStats?: boolean;
134
140
  /**
135
141
  * Sort order for the results.
136
142
  * @default 'listed,desc'
@@ -114,7 +114,7 @@ export default interface SearchResult {
114
114
  * ISO country code
115
115
  * @example 'US'
116
116
  */
117
- code: CountryValues;
117
+ code: CountryValues | null;
118
118
  };
119
119
  /** Community stats */
120
120
  community: {
@@ -7,4 +7,4 @@ import type { BrowserContext } from 'patchright';
7
7
  * @param browserContext Patchright browser context
8
8
  * @returns Items found, total, next cursor and url of the same search on Discogs
9
9
  */
10
- export default function scrapeMarketplace({ query, artistIds, labelIds, masterIds, releaseIds, sellerIds, genres, styles, formats, formatDescriptions, mediaConditions, sleeveConditions, from, currencies, priceRange, sellerRatingMin, sellerRatingCountMin, years, isMakeAnOfferOnly, hasItemPhotos, hideGenericSleeves, hideSleevelessMedia, showUnavailable, sort, limit, after, }: SearchParams, browserContext: BrowserContext): Promise<SearchResult>;
10
+ export default function scrapeMarketplace({ query, artistIds, labelIds, masterIds, releaseIds, sellerIds, genres, styles, formats, formatDescriptions, mediaConditions, sleeveConditions, from, currencies, priceRange, sellerRatingMin, sellerRatingCountMin, years, isMakeAnOfferOnly, hasItemPhotos, hideGenericSleeves, hideSleevelessMedia, showUnavailable, withCommunityStats, sort, limit, after, }: SearchParams, browserContext: BrowserContext): Promise<SearchResult>;
@@ -75,6 +75,7 @@ async function queryGraphql(page, operationName, variables) {
75
75
  method: 'POST',
76
76
  headers: { 'Content-Type': 'application/json' },
77
77
  body: JSON.stringify(body),
78
+ signal: AbortSignal.timeout(30_000),
78
79
  });
79
80
  return {
80
81
  status: res.status,
@@ -139,7 +140,7 @@ function decodeHtmlEntities(text) {
139
140
  * @param browserContext Patchright browser context
140
141
  * @returns Items found, total, next cursor and url of the same search on Discogs
141
142
  */
142
- async function scrapeMarketplace({ query, artistIds, labelIds, masterIds, releaseIds, sellerIds, genres, styles, formats, formatDescriptions, mediaConditions, sleeveConditions, from, currencies, priceRange, sellerRatingMin, sellerRatingCountMin, years, isMakeAnOfferOnly = false, hasItemPhotos = false, hideGenericSleeves = false, hideSleevelessMedia = false, showUnavailable = true, sort = 'listed,desc', limit = 25, after, }, browserContext) {
143
+ async function scrapeMarketplace({ query, artistIds, labelIds, masterIds, releaseIds, sellerIds, genres, styles, formats, formatDescriptions, mediaConditions, sleeveConditions, from, currencies, priceRange, sellerRatingMin, sellerRatingCountMin, years, isMakeAnOfferOnly = false, hasItemPhotos = false, hideGenericSleeves = false, hideSleevelessMedia = false, showUnavailable = true, withCommunityStats = true, sort = 'listed,desc', limit = 25, after, }, browserContext) {
143
144
  const [sortField = 'listed', sortOrder = 'desc'] = sort.split(',');
144
145
  const countries = from?.flatMap(code => {
145
146
  const names = Object.keys(country_data_1.default).filter(key => code === country_data_1.default[key]);
@@ -230,10 +231,10 @@ async function scrapeMarketplace({ query, artistIds, labelIds, masterIds, releas
230
231
  after,
231
232
  })).data?.marketplaceSearch;
232
233
  const nodes = result?.edges?.map(x => x.node ?? {}) ?? [];
233
- const releaseIdsFound = [...new Set(nodes.map(x => x.release?.discogsId ?? 0).filter(x => !!x))];
234
+ // The community stats and the rating of the releases are not part of the listings
235
+ const releaseIdsFound = withCommunityStats ? [...new Set(nodes.map(x => x.release?.discogsId ?? 0).filter(x => !!x))] : [];
234
236
  const { data: details } = releaseIdsFound.length
235
- ? // The community stats and the rating of the releases are not part of the listings
236
- await queryGraphql(browserPage, 'Releases', { discogsIds: releaseIdsFound, first: 1 })
237
+ ? await queryGraphql(browserPage, 'Releases', { discogsIds: releaseIdsFound, first: 1 })
237
238
  : { data: undefined };
238
239
  const releaseDetails = new Map(details?.releases?.map(x => [x?.discogsId ?? 0, x]) ?? []);
239
240
  const items = nodes.map(node => {
@@ -298,7 +299,7 @@ async function scrapeMarketplace({ query, artistIds, labelIds, masterIds, releas
298
299
  },
299
300
  country: {
300
301
  name: node.sellerInfo?.shipsFrom ?? '',
301
- code: country_data_1.default[node.sellerInfo?.shipsFrom],
302
+ code: country_data_1.default[node.sellerInfo?.shipsFrom ?? ''] ?? null,
302
303
  },
303
304
  community: {
304
305
  have: releaseDetail?.inCollectionCount ?? 0,
package/dist/wantlist.js CHANGED
@@ -32,6 +32,7 @@ function fetchWantlist(username, token) {
32
32
  page: pageNumber.toString(),
33
33
  per_page: API_PER_PAGE.toString(),
34
34
  }).toString()}`, {
35
+ signal: AbortSignal.timeout(30_000),
35
36
  headers: {
36
37
  'User-Agent': `DiscogsMarketplaceApiNodeJS-${username}`,
37
38
  ...(token ? { Authorization: `Discogs token=${token}` } : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "discogs-marketplace-api-nodejs",
3
- "version": "1.18.0",
3
+ "version": "1.18.2",
4
4
  "description": "Another (better ?) NodeJs library to fetch data from Discogs marketplace",
5
5
  "keywords": [
6
6
  "discogs",
@@ -40,28 +40,28 @@
40
40
  }
41
41
  ],
42
42
  "dependencies": {
43
- "patchright": "^1.63.0"
43
+ "patchright": "^1.64.2"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@eslint/js": "^9.39.5",
47
- "@types/node": "^24.13.6",
48
- "@typescript-eslint/eslint-plugin": "^8.70.0",
49
- "@typescript-eslint/parser": "^8.70.0",
50
- "cspell": "^10.3.3",
47
+ "@types/node": "^26.6.6",
48
+ "@typescript-eslint/eslint-plugin": "^8.72.1",
49
+ "@typescript-eslint/parser": "^8.72.1",
50
+ "cspell": "^10.4.0",
51
51
  "eslint": "^9.39.5",
52
52
  "eslint-config-prettier": "^10.1.8",
53
53
  "eslint-import-resolver-typescript": "^4.4.5",
54
54
  "eslint-plugin-import": "^2.32.0",
55
- "eslint-plugin-jsdoc": "^64.5.4",
56
- "globals": "^17.12.0",
55
+ "eslint-plugin-jsdoc": "^65.4.2",
56
+ "globals": "^17.13.0",
57
57
  "husky": "^9.1.7",
58
- "knip": "^6.37.0",
59
- "lint-staged": "^17.5.1",
60
- "prettier": "^3.9.8",
58
+ "knip": "^6.43.0",
59
+ "lint-staged": "^17.6.0",
60
+ "prettier": "^3.9.10",
61
61
  "rimraf": "^6.1.3",
62
- "tsc-alias": "^1.9.5",
62
+ "tsc-alias": "^1.9.9",
63
63
  "tsx": "^4.23.15",
64
64
  "typescript": "^6.0.3",
65
- "typescript-eslint": "^8.70.0"
65
+ "typescript-eslint": "^8.72.1"
66
66
  }
67
67
  }