{"_id":"@prestodb/presto-js-client","_rev":"7-18e39554241bf68945764349b963392a","name":"@prestodb/presto-js-client","dist-tags":{"presto-client-0.1.0-beta.0":"0.1.0-beta.0","presto-client-0.1.0":"0.1.0","presto-client-0.1.1":"0.1.1","latest":"1.1.0"},"versions":{"0.1.0-beta.0":{"name":"@prestodb/presto-js-client","version":"0.1.0-beta.0","_id":"@prestodb/presto-js-client@0.1.0-beta.0","maintainers":[{"name":"jorgeramirezamora","email":"jerz9017@gmail.com"},{"name":"alonso-bhuma","email":"alonso@bhuma.dev"},{"name":"tdcmeehan","email":"tdcmeehan@gmail.com"}],"dist":{"shasum":"a74327dc7b3fd6685708486a866acb0c43b95656","tarball":"https://registry.npmjs.org/@prestodb/presto-js-client/-/presto-js-client-0.1.0-beta.0.tgz","fileCount":12,"integrity":"sha512-nFqGAqQinrpwiZmXyTATeQVvwFNUU62xbksT7JbeaxI4KqjRVGMoF2lyvSTBjSdCqEFbps1v+aUs1Lvl7WzCkw==","signatures":[{"sig":"MEYCIQDmkZOoSku/Rvl+zENnWicHtP4DKWSp9bkLVmoUL0Kb+AIhAI02kMITuk/yj0yEPuw59x8ImkZ6mF/EquKZQ8T9fUBq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16303},"main":"./src/index.js","type":"commonjs","gitHead":"647699f209b75b1a732c30742746585f2da0d330","typings":"./src/index.d.ts","_npmUser":{"name":"jorgeramirezamora","email":"jerz9017@gmail.com"},"_npmVersion":"9.6.7","description":"This library was generated with [Nx](https://nx.dev).","directories":{},"_nodeVersion":"18.17.1","dependencies":{"@swc/helpers":"~0.5.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/presto-js-client_0.1.0-beta.0_1696438954933_0.9133399221298661","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@prestodb/presto-js-client","version":"0.1.0","_id":"@prestodb/presto-js-client@0.1.0","maintainers":[{"name":"jorgeramirezamora","email":"jerz9017@gmail.com"},{"name":"alonso-bhuma","email":"alonso@bhuma.dev"},{"name":"tdcmeehan","email":"tdcmeehan@gmail.com"}],"dist":{"shasum":"4d74313ab81e6990bbfff2f4b4b7194fb5d5923d","tarball":"https://registry.npmjs.org/@prestodb/presto-js-client/-/presto-js-client-0.1.0.tgz","fileCount":12,"integrity":"sha512-modfa2phHuX5xmKK7qWlRWkFOZf7KPgHkxTqURvFJD6rs+LTDNJ7thgeu70Kh5fwulz2R+1EDlgswdK7RZiIVQ==","signatures":[{"sig":"MEUCIEBucB1fP9Ylj7W3PmhkcLuUE4dqUuYKuWwekovwGfxfAiEAgjJI6L8w6TXsvz0O7NoT9Roe4w9FZhocidxb9SnhTW0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16324},"main":"./src/index.js","type":"commonjs","gitHead":"80538d617d0cd67ae35a12ce139e21c06f127cc2","typings":"./src/index.d.ts","_npmUser":{"name":"jorgeramirezamora","email":"jerz9017@gmail.com"},"_npmVersion":"9.6.7","description":"This library was generated with [Nx](https://nx.dev).","directories":{},"_nodeVersion":"18.17.1","dependencies":{"@swc/helpers":"~0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/presto-js-client_0.1.0_1696440007279_0.511665417606914","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@prestodb/presto-js-client","version":"0.1.1","keywords":["database","presto","prestodb","sql"],"license":"Apache-2.0","_id":"@prestodb/presto-js-client@0.1.1","maintainers":[{"name":"jorgeramirezamora","email":"jerz9017@gmail.com"},{"name":"alonso-bhuma","email":"alonso@bhuma.dev"},{"name":"tdcmeehan","email":"tdcmeehan@gmail.com"}],"homepage":"https://github.com/prestodb/presto-js-client#readme","bugs":{"url":"https://github.com/prestodb/presto-js-client/issues"},"dist":{"shasum":"ce5280ac41e02c8f9dc03d8269561198c0d4de39","tarball":"https://registry.npmjs.org/@prestodb/presto-js-client/-/presto-js-client-0.1.1.tgz","fileCount":10,"integrity":"sha512-C/tFU/VF6yiY+oOXN0Oe0XRHD00bFZcYGzx3vIYsGYCQSVCwhxBIxdLjelSmv/d+1hvDlYWKFCYVIOpsJIhv+Q==","signatures":[{"sig":"MEUCIQC6miAzsiHUrTN7UAzc0oEJyZQ0bLzJg4ds4h9zQyYr1QIgbcdXXJeflDK1uG1/X/0rDCLKMYgL2CcNGZfYcnZqa34=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15886},"main":"./src/index.js","type":"commonjs","gitHead":"1eb6ede848fed4c9f95a40a23414377d8b4acf1e","typings":"./src/index.d.ts","_npmUser":{"name":"jorgeramirezamora","email":"jerz9017@gmail.com"},"repository":{"url":"git+https://github.com/prestodb/presto-js-client.git","type":"git","directory":"presto-client"},"_npmVersion":"9.6.7","description":"This is a Presto JavaScript client that connects to Presto via Presto's REST API to run queries.","directories":{},"_nodeVersion":"18.17.1","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/presto-js-client_0.1.1_1701189564015_0.8836918672045715","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@prestodb/presto-js-client","version":"1.0.0","keywords":["database","presto","prestodb","sql"],"license":"Apache-2.0","_id":"@prestodb/presto-js-client@1.0.0","maintainers":[{"name":"jorgeramirezamora","email":"jerz9017@gmail.com"},{"name":"alonso-bhuma","email":"alonso@bhuma.dev"},{"name":"tdcmeehan","email":"tdcmeehan@gmail.com"}],"homepage":"https://github.com/prestodb/presto-js-client#readme","bugs":{"url":"https://github.com/prestodb/presto-js-client/issues"},"dist":{"shasum":"fa458866581a6ec4e0b9be7f8ab5bae3097f8c8a","tarball":"https://registry.npmjs.org/@prestodb/presto-js-client/-/presto-js-client-1.0.0.tgz","fileCount":34,"integrity":"sha512-B8d0Wl8XMrtqotRTTM45GVk6bV7GER1Pbt4vUb2Ex5dUP1/WkqKMuD0LMWoO9zaiSS70DtBpvwu372BS1GjNgQ==","signatures":[{"sig":"MEUCIBW/Qn/S+mngr1wScK+VMQBoQ/f+/361L+gvIHwd/rNaAiEAjUmbWOfoBngtM/1oeF3E9O1qydt1STn1NUg7lbOliW8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49952},"main":"./src/index.js","type":"commonjs","gitHead":"818a5164336ed871352b54fdf1898ee16b3217e2","typings":"./src/index.d.ts","_npmUser":{"name":"jorgeramirezamora","email":"jerz9017@gmail.com"},"repository":{"url":"git+https://github.com/prestodb/presto-js-client.git","type":"git","directory":"presto-client"},"_npmVersion":"9.6.7","description":"This is a Presto JavaScript client that connects to Presto via Presto's REST API to run queries.","directories":{},"_nodeVersion":"18.17.1","dependencies":{},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/presto-js-client_1.0.0_1706119453950_0.761197376025796","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@prestodb/presto-js-client","version":"1.0.1","keywords":["database","presto","prestodb","sql"],"license":"Apache-2.0","_id":"@prestodb/presto-js-client@1.0.1","maintainers":[{"name":"alonso-bhuma","email":"Luis.Alfonso.Vega@ibm.com"},{"name":"tdcmeehan","email":"tdcmeehan@gmail.com"},{"name":"jorgeramirezamora","email":"jerz9017@gmail.com"}],"homepage":"https://github.com/prestodb/presto-js-client#readme","bugs":{"url":"https://github.com/prestodb/presto-js-client/issues"},"dist":{"shasum":"978c9c22c17677f3157df80383efb23412d4aa70","tarball":"https://registry.npmjs.org/@prestodb/presto-js-client/-/presto-js-client-1.0.1.tgz","fileCount":36,"integrity":"sha512-6NHcpSi9EQZKgfYgOUYgyTuC4PAjs+23o9ANym5wZ/Omu8m586OplRVmels0MrzPC5LdHA94FWkscuunaEvcDg==","signatures":[{"sig":"MEYCIQDibd5mIOPq4YVunAWXgba9vlQ5OGmW/AAfqs4+BDm/ZAIhAMIY9oyRzl4FW78XzxWmrzBUqMZ3JAarW2TkToAapnyB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54042},"main":"./src/index.js","type":"commonjs","gitHead":"2c0fd2630f7a0ee3d913e22b6cf22dd6a42423f5","typings":"./src/index.d.ts","_npmUser":{"name":"alonso-bhuma","email":"Luis.Alfonso.Vega@ibm.com"},"repository":{"url":"git+https://github.com/prestodb/presto-js-client.git","type":"git","directory":"presto-client"},"_npmVersion":"10.7.0","description":"This is a Presto JavaScript client that connects to Presto via Presto's REST API to run queries.","directories":{},"_nodeVersion":"20.15.1","dependencies":{},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/presto-js-client_1.0.1_1735845322850_0.5879621150814576","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@prestodb/presto-js-client","version":"1.1.0","keywords":["database","presto","prestodb","sql"],"bugs":{"url":"https://github.com/prestodb/presto-js-client/issues"},"repository":{"type":"git","url":"git+https://github.com/prestodb/presto-js-client.git","directory":"presto-client"},"license":"Apache-2.0","type":"commonjs","main":"./src/index.js","typings":"./src/index.d.ts","dependencies":{},"_id":"@prestodb/presto-js-client@1.1.0","gitHead":"bb1f32b7660f30f319ceadf7b16b6280656873fb","description":"This is a Presto JavaScript client that connects to Presto via Presto's REST API to run queries.","homepage":"https://github.com/prestodb/presto-js-client#readme","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-/ACj+BWW9aYJRQZ+zPqFMPDxqJODrh8O4b7bOSL/ITGysFkyjC5HbDCcGO5haprp5+JsGSoSHlBo/NKb0C/v9g==","shasum":"5278dc538659b569c3e6b733607a4e22f5df856b","tarball":"https://registry.npmjs.org/@prestodb/presto-js-client/-/presto-js-client-1.1.0.tgz","fileCount":36,"unpackedSize":61167,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHlXQugtDL+C4Kbad/UUQTEhaJrDYa2vieybqWPL7qDUAiBVPbUmWiEm8AXmQSM+F6EsuaTDmn8RLjvgVHnUwHqhyQ=="}]},"_npmUser":{"name":"alonsovb","email":"lavb91@gmail.com"},"directories":{},"maintainers":[{"name":"alonso-bhuma","email":"Luis.Alfonso.Vega@ibm.com"},{"name":"tdcmeehan","email":"tdcmeehan@gmail.com"},{"name":"jorgeramirezamora","email":"jerz9017@gmail.com"},{"name":"alonsovb","email":"lavb91@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/presto-js-client_1.1.0_1764352444207_0.3452711930242742"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-04T17:02:34.861Z","modified":"2025-11-28T17:54:04.671Z","0.1.0-beta.0":"2023-10-04T17:02:35.061Z","0.1.0":"2023-10-04T17:20:07.455Z","0.1.1":"2023-11-28T16:39:24.274Z","1.0.0":"2024-01-24T18:04:14.169Z","1.0.1":"2025-01-02T19:15:23.082Z","1.1.0":"2025-11-28T17:54:04.413Z"},"bugs":{"url":"https://github.com/prestodb/presto-js-client/issues"},"license":"Apache-2.0","homepage":"https://github.com/prestodb/presto-js-client#readme","keywords":["database","presto","prestodb","sql"],"repository":{"type":"git","url":"git+https://github.com/prestodb/presto-js-client.git","directory":"presto-client"},"description":"This is a Presto JavaScript client that connects to Presto via Presto's REST API to run queries.","maintainers":[{"name":"alonso-bhuma","email":"Luis.Alfonso.Vega@ibm.com"},{"name":"tdcmeehan","email":"tdcmeehan@gmail.com"},{"name":"jorgeramirezamora","email":"jerz9017@gmail.com"},{"name":"alonsovb","email":"lavb91@gmail.com"}],"readme":"# Presto JS Client\n\nThis is a Presto JavaScript client that connects to Presto via Presto's REST API to run queries.\n\n## Installation\n\n```sh\nnpm install @prestodb/presto-js-client\n```\n\n## Usage\n\nImport the PrestoClient class from `@prestodb/presto-js-client`.\n\nCreate a new instance by passing the connection parameters.\n\n### Example\n\nImport the Client class:\n\n```typescript\nimport PrestoClient from '@prestodb/presto-js-client'\n```\n\nInstantiate a client with connection parameters:\n\n```typescript\nconst client = PrestoClient({\n  catalog: 'tpcs',\n  host: 'localhost',\n  port: 8080,\n  schema: 'tiny',\n  timezone: 'America/Costa_Rica',\n  user: 'root',\n})\n```\n\n### Parameters\n\nThe Presto client can be configured with the following parameters:\n\n- `host`: The hostname or IP address of the Presto coordinator. (Default: `http://localhost`)\n- `port`: The port number of the Presto coordinator. (Default: `8080`)\n- `user`: The username to use for authentication. (Default: `undefined`)\n- `catalog`: The default catalog to use for queries. (Default: `undefined`)\n- `schema`: The default schema to use for queries. (Default: `undefined`)\n- `source`: The name of the source you want to use for reporting purposes (Default: `presto-js-client`)\n- `timezone`: The timezone to use for queries. (Default: `undefined`)\n- `authorizationToken`: The value to send as-is in the Authorization header. _Note_: The `Bearer` scheme is automatically added. (Default: `undefined`)\n- `basicAuthentication`: An object with a user and password inside, to be used for basic authentication. (Default: `undefined`)\n- `extraHeaders`: An dictionary of key-values to send as extra headers in all requests to the API. (Default: `undefined`)\n- `interval`: (DEPRECATED) The interval in milliseconds between checks for the status of a running query. (Default: `100`)\n\n## Querying\n\nThe `query` method takes a single `string` parameter, which is the SQL query to be executed. The method returns a PrestoQuery object, which contains the results of the query, including the columns, data, and query ID. If the query fails, the `query` method will throw an error.\n\nThe `string` parameter to the `query` method must be a valid SQL query. The query can be any type of SQL query, including `SELECT`, `INSERT`, `UPDATE`, and `DELETE` statements.\n\n### Return data structure (or error state)\n\nThe `query` method returns a PrestoQuery object, which contains the results of the query, including the columns, data, and query ID.\n\nIf the query succeeds, the PrestoQuery object will have the following properties:\n\n- `columns`: An array of objects that describe the columns in the results.\n- `data`: An array of arrays that contain the actual data for the results.\n- `queryId`: The ID of the query.\n\nIf the query fails, you can catch the error as a PrestoError which contains all information returned by Presto.\n\n### Example usage\n\nThe following example shows how to use the query() method to execute a SELECT statement:\n\n```typescript\nconst client = new PrestoClient({\n  catalog: 'tpcds',\n  host: 'http://localhost',\n  port: 8080,\n  schema: 'sf1',\n  user: 'root',\n})\n\nconst query = `SELECT * FROM my_table`\n\ntry {\n  const prestoQuery = await client.query(query)\n  const results = prestoQuery.data\n} catch (error) {\n  if (error instanceof PrestoError) {\n    // Handle the error.\n    console.error(error.errorCode)\n  }\n}\n```\n\n### Additional notes\n\nAdditional notes on the `query` method:\n\n- It's asynchronous and will return a promise that resolves to a PrestoQuery object. If you want the query ID returned first for long running queries, see the [Query Generator](#query-generator) section.\n- It will automatically retry the query if it fails due to a transient error.\n- It will cancel the query if the client is destroyed.\n- \\*It parses big numbers with the BigInt JavaScript primitive. If your Presto response includes a number bigger than `Number.MAX_SAFE_INTEGER`, it will be parsed into a bigint, so you may need to consider that when handling the response, or serializing it.\n\n\\* Only if the current JavaScript environment supports the reviver with context in the JSON.parse callback. Check compatibility here:\n\n- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#browser_compatibility\n\nOtherwise, bigger numbers will lose precision due to the default JavaScript JSON parsing.\n\n## Query Generator\n\nThe `queryGenerator` method provides a stepped approach to query execution, returning an async generator that yields results in two parts: first the query ID, then the complete query result. This is particularly useful when you need immediate access to the query ID for monitoring purposes while the query is still executing.\n\n### Parameters\n\n- `query`: The SQL query string to be executed.\n- `options` (optional): An object containing optional parameters:\n  - `catalog` (optional): The catalog to be used for the query.\n  - `schema` (optional): The schema to be used for the query.\n\n### Return Value\n\nReturns an `AsyncGenerator<PrestoQuery>` that yields two values:\n\n1. First yield: The query ID (string)\n2. Second yield: The complete query result (PrestoQuery object)\n\n### Example usage\n\n```typescript\nconst client = new PrestoClient({\n  catalog: 'tpcds',\n  host: 'http://localhost',\n  port: 8080,\n  schema: 'sf1',\n  user: 'root',\n})\n\nconst query = `SELECT * FROM my_large_table`\n\ntry {\n  const queryGen = client.queryGenerator(query)\n\n  // Get the query ID first\n  const { value: queryId } = await queryGen.next()\n  console.log(`Query started with ID: ${queryId}`)\n\n  // You can use the query ID for monitoring here\n\n  // Get the complete results\n  const { value: prestoQuery } = await queryGen.next()\n  console.log('Query completed:', prestoQuery.data)\n} catch (error) {\n  if (error instanceof PrestoError) {\n    console.error('Query failed:', error.errorCode)\n  }\n}\n```\n\n## Get Query metadata information\n\n### Get Query Information\n\nThe `getQueryInfo` method retrieves comprehensive information about a specific query, based on its identifier. It returns metadata including status, execution details, statistics, and more, encapsulated within a `QueryInfo` object or undefined if the query does not exist.\n\n#### Parameters\n\n- `queryId`: The unique identifier string of the query for which information is being retrieved.\n\n#### Example usage\n\n```typescript\nconst queryInfo = await prestoClient.getQueryInfo('your_query_id')\nconsole.log(queryInfo)\n```\n\n## Query catalog, schema, table and column metadata\n\n### Get Catalogs\n\nThe `getCatalogs` method retrieves all available database catalogs, returning them as an array of strings.\n\n#### Example usage\n\n```typescript\nconst catalogs = await prestoClient.getCatalogs()\nconsole.log(catalogs)\n```\n\n### Get Schemas\n\nThe `getSchemas` method retrieves all schemas within a given catalog. It accepts a catalog parameter, which is a string representing the name of the catalog.\n\nParameters\n\n- `catalog`: The name of the catalog for which to retrieve schemas.\n\n#### Example usage\n\n```typescript\nconst schemas = await prestoClient.getSchemas('tpch')\nconsole.log(schemas)\n```\n\n### Get Tables\n\nThe `getTables` method retrieves a list of tables (of type `Table`) filtered by the given catalog and, optionally, the schema. It accepts an object containing `catalog` and optional `schema` parameters.\n\nParameters\n\n- `catalog`: The catalog name.\n- `schema` (optional): The schema name.\n\n#### Example usage\n\n```typescript\nconst tables: Table[] = await prestoClient.getTables({ catalog: 'tpch', schema: 'sf100' })\nconsole.log(tables)\n```\n\n### Get Columns\n\nThe `getColumns` method retrieves a list of columns (of type `Column`) filtered for the given catalog and optional schema and table filters. It accepts an object with `catalog`, and optional `schema` and `table` parameters.\n\nParameters\n\n- `catalog`: The catalog name.\n- `schema` (optional): The schema name.\n- `table` (optional): The table name.\n\n#### Example usage\n\n```typescript\nconst columns: Column[] = await prestoClient.getColumns({\n  catalog: 'tpch',\n  schema: 'sf100',\n  table: 'orders',\n})\nconsole.log(columns)\n```\n\n## Authentication\n\nWhen creating the client instance, you optionally pass one of two authentication methods.\n\n### Basic authentication\n\nYou can send a basic authorization user and password in this way:\n\n```typescript\nconst client = new PrestoClient({\n  basicAuthentication: {\n    user: 'my-user',\n    password: 'my-password',\n  },\n  catalog: 'tpcds',\n  host: 'http://localhost',\n  port: 8080,\n  schema: 'sf1',\n  user: 'root',\n})\n```\n\n### Auth token\n\nYou can send an authorization token in the following way:\n\n```typescript\nconst client = new PrestoClient({\n  // Do not include `Bearer` here, it is automatically added by the client\n  authorizationToken: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c`,\n  catalog: 'tpcds',\n  host: 'http://localhost',\n  port: 8080,\n  schema: 'sf1',\n  user: 'root',\n})\n```\n\n## Extra headers\n\nYou can pass any extra custom headers to the Presto client to be send on all requests performed against the host:\n\n```typescript\nconst client = new PrestoClient({\n  catalog: 'tpcds',\n  extraHeaders: {\n    'X-My-Custom-Header-1': 'value',\n    'X-My-Custom-Header-2': 'value',\n  },\n  host: 'http://localhost',\n  port: 8080,\n  schema: 'sf1',\n  user: 'root',\n})\n```\n\n## Troubleshooting\n\n### Do not know how to serialize a BigInt\n\nExample error message:\n\n```\nDo not know how to serialize a BigInt\nTypeError: Do not know how to serialize a BigInt\n  at JSON.stringify (<anonymous>)\n```\n\nMake sure to write a custom replacer and handle the serialization of BigInts if your Presto query returns a number bigger than `Number.MAX_SAFE_INTEGER`.\nExample JSON.stringify replacer:\n\n```javascript\nconst results = await client.query(`SELECT 1234567890123456623`)\nreturn {\n  columns: results.columns,\n  rows: JSON.stringify(results.data, (key, value) => {\n    if (typeof value !== 'bigint') return value\n\n    return value.toString()\n  }),\n}\n```\n\n### Numbers lose precision\n\nKnown issue:\nIf working with numbers bigger than `Number.MAX_SAFE_INTEGER`, and your environment does not support the `JSON.parse` with the context in the reviver (Node.js > 21.0.0, and certain browser versions), the default JSON.parse will make the number lose precision.\nCheck compatibility here:\n\n- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#browser_compatibility\n","readmeFilename":"README.md"}