From ae08c638c099f46fe9d55eb57d2f01726f0c3d6c Mon Sep 17 00:00:00 2001 From: Emma Hamilton Date: Wed, 8 May 2024 13:16:11 +1000 Subject: [PATCH] Change decimal library --- packages/keystatic/package.json | 2 +- .../src/form/fields/number/validateNumber.tsx | 2 +- pnpm-lock.yaml | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/keystatic/package.json b/packages/keystatic/package.json index b5a12a11f..d4b2dd489 100644 --- a/packages/keystatic/package.json +++ b/packages/keystatic/package.json @@ -144,7 +144,7 @@ "@urql/exchange-graphcache": "^6.3.3", "@urql/exchange-persisted": "^4.1.0", "cookie": "^0.5.0", - "decimal.js": "^10.4.3", + "decimal.js-light": "^2.5.1", "emery": "^1.4.1", "escape-string-regexp": "^4.0.0", "fast-deep-equal": "^3.1.3", diff --git a/packages/keystatic/src/form/fields/number/validateNumber.tsx b/packages/keystatic/src/form/fields/number/validateNumber.tsx index b951f7909..09afd036b 100644 --- a/packages/keystatic/src/form/fields/number/validateNumber.tsx +++ b/packages/keystatic/src/form/fields/number/validateNumber.tsx @@ -1,4 +1,4 @@ -import Decimal from 'decimal.js'; +import Decimal from 'decimal.js-light'; export function validateNumber( validation: diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ef502cdeb..e2451d17e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1207,9 +1207,9 @@ importers: cookie: specifier: ^0.5.0 version: 0.5.0 - decimal.js: - specifier: ^10.4.3 - version: 10.4.3 + decimal.js-light: + specifier: ^2.5.1 + version: 2.5.1 emery: specifier: ^1.4.1 version: 1.4.2 @@ -13928,6 +13928,10 @@ packages: engines: {node: '>=0.10.0'} dev: false + /decimal.js-light@2.5.1: + resolution: {integrity: sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==} + dev: false + /decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} dev: false