@library-pals/isbn 1.4.3 → 1.5.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@library-pals/isbn",
3
- "version": "1.4.3",
3
+ "version": "1.5.0",
4
4
  "description": "Find books by ISBN",
5
5
  "exports": {
6
6
  ".": {
@@ -10,7 +10,6 @@
10
10
  },
11
11
  "types": "./types/index.d.ts",
12
12
  "type": "module",
13
- "main": "src/index.js",
14
13
  "engines": {
15
14
  "node": ">=20.0.0"
16
15
  },
@@ -37,19 +36,19 @@
37
36
  "author": "Katy DeCorah <@katydecorah>",
38
37
  "license": "AGPL-3.0-or-later",
39
38
  "devDependencies": {
40
- "@eslint/js": "^9.17.0",
41
- "eslint": "^9.17.0",
42
- "eslint-plugin-jest": "^28.10.0",
43
- "eslint-plugin-jsdoc": "^50.6.1",
44
- "eslint-plugin-unicorn": "^56.0.1",
45
- "globals": "^15.14.0",
39
+ "@eslint/js": "^9.26.0",
40
+ "eslint": "^9.26.0",
41
+ "eslint-plugin-jest": "^28.11.0",
42
+ "eslint-plugin-jsdoc": "^50.6.11",
43
+ "eslint-plugin-unicorn": "^59.0.0",
44
+ "globals": "^16.0.0",
46
45
  "jest": "^29.7.0",
47
- "prettier": "^3.4.2",
46
+ "prettier": "^3.5.3",
48
47
  "prettier-2": "npm:prettier@^2",
49
- "typescript": "^5.7.2"
48
+ "typescript": "^5.8.3"
50
49
  },
51
50
  "dependencies": {
52
- "axios": "^1.7.9"
51
+ "axios": "^1.9.0"
53
52
  },
54
53
  "bugs": {
55
54
  "url": "https://github.com/library-pals/isbn/issues"
package/src/index.js CHANGED
@@ -19,6 +19,7 @@ import {
19
19
  * @property {string | undefined} [thumbnail] - The thumbnail image link of the book.
20
20
  * @property {string} [link] - The link of the book.
21
21
  * @property {string} bookProvider - The provider of the book information.
22
+ * @property {string} [duration] - The duration of the audiobook.
22
23
  */
23
24
 
24
25
  /**
@@ -13,7 +13,7 @@ import { resolveLibroFm } from "./providers/librofm.js";
13
13
  * @property {number} timeout - The timeout value in milliseconds.
14
14
  */
15
15
  export const defaultOptions = {
16
- timeout: 5000,
16
+ timeout: 15_000,
17
17
  };
18
18
 
19
19
  export const GOOGLE_BOOKS_API_BASE = "https://www.googleapis.com";
@@ -60,6 +60,7 @@ export async function standardize(data, isbn, url) {
60
60
  language: book.inLanguage,
61
61
  isbn,
62
62
  bookProvider: "Libro.fm",
63
+ duration: book.duration,
63
64
  };
64
65
 
65
66
  return standardBook;
package/types/index.d.ts CHANGED
@@ -13,6 +13,7 @@
13
13
  * @property {string | undefined} [thumbnail] - The thumbnail image link of the book.
14
14
  * @property {string} [link] - The link of the book.
15
15
  * @property {string} bookProvider - The provider of the book information.
16
+ * @property {string} [duration] - The duration of the audiobook.
16
17
  */
17
18
  /**
18
19
  * @typedef {import('./provider-resolvers.js').Providers} Providers
@@ -98,6 +99,10 @@ export type Book = {
98
99
  * - The provider of the book information.
99
100
  */
100
101
  bookProvider: string;
102
+ /**
103
+ * - The duration of the audiobook.
104
+ */
105
+ duration?: string;
101
106
  };
102
107
  export type Providers = import("./provider-resolvers.js").Providers;
103
108
  export type AxiosRequestConfig = import("axios").AxiosRequestConfig;
@@ -25,8 +25,12 @@ export namespace PROVIDER_NAMES {
25
25
  */
26
26
  export const DEFAULT_PROVIDERS: Providers;
27
27
  export const PROVIDER_RESOLVERS: {
28
- [x: string]: typeof resolveGoogle;
28
+ [PROVIDER_NAMES.GOOGLE]: typeof resolveGoogle;
29
+ [PROVIDER_NAMES.OPENLIBRARY]: typeof resolveOpenLibrary;
30
+ [PROVIDER_NAMES.LIBROFM]: typeof resolveLibroFm;
29
31
  };
30
32
  export type Providers = string[];
31
33
  export type AxiosRequestConfig = import("axios").AxiosRequestConfig;
32
34
  import { resolveGoogle } from "./providers/google.js";
35
+ import { resolveOpenLibrary } from "./providers/open-library.js";
36
+ import { resolveLibroFm } from "./providers/librofm.js";