From 8a5827a0ba208d27b3ee432841473875efbb001b Mon Sep 17 00:00:00 2001 From: LoneRifle Date: Tue, 8 Aug 2023 16:41:54 +0800 Subject: [PATCH 1/3] fix: coerce output to number if numeric --- src/client/components/Checker.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/components/Checker.tsx b/src/client/components/Checker.tsx index 2f4dd4b4e..d5df56c2c 100644 --- a/src/client/components/Checker.tsx +++ b/src/client/components/Checker.tsx @@ -85,7 +85,8 @@ export const Checker: FC = ({ config }) => { } ) } else if (isNumeric(output)) { - value = mathjs.format(output, { notation: 'fixed' }) + // coerce `output`, since it could be a string + value = mathjs.format(Number(output), { notation: 'fixed' }) } else { value = output.toString() } From e5669204e4bd71166566d46cf7e2ecd6b49483a0 Mon Sep 17 00:00:00 2001 From: LoneRifle Date: Tue, 8 Aug 2023 16:57:24 +0800 Subject: [PATCH 2/3] chore: remove lockfile-lint for spurious CI errors --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3c293939..23196c91c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,6 @@ jobs: ${{ runner.OS }}-node- ${{ runner.OS }}- - run: npm ci - - run: npx lockfile-lint --type npm --path package-lock.json --validate-https --allowed-hosts npm - run: npm run lint compile: name: Compile From d7a71642afebb50f23d6413d4b9f73036d1be68c Mon Sep 17 00:00:00 2001 From: LoneRifle Date: Tue, 8 Aug 2023 16:57:31 +0800 Subject: [PATCH 3/3] 1.14.8 --- CHANGELOG.md | 9 ++++++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdc021a0d..931dcd0a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v1.14.8](https://github.com/opengovsg/checkfirst/compare/v1.14.7...v1.14.8) + +- fix: coerce output to number if numeric [`8a5827a`](https://github.com/opengovsg/checkfirst/commit/8a5827a0ba208d27b3ee432841473875efbb001b) +- chore: remove lockfile-lint for spurious CI errors [`e566920`](https://github.com/opengovsg/checkfirst/commit/e5669204e4bd71166566d46cf7e2ecd6b49483a0) + #### [v1.14.7](https://github.com/opengovsg/checkfirst/compare/v1.14.6...v1.14.7) +> 6 June 2023 + - build(ci): use ubuntu-latest [`#1395`](https://github.com/opengovsg/checkfirst/pull/1395) - Release 2022-12-06 [`#1350`](https://github.com/opengovsg/checkfirst/pull/1350) - [production] 1.14.5 [`#1342`](https://github.com/opengovsg/checkfirst/pull/1342) @@ -266,12 +273,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - feat(sort-last-update): order checkers by last updated [`#389`](https://github.com/opengovsg/checkfirst/pull/389) - feat(hover-state-desc): add hover state descriptions to icon buttons [`#370`](https://github.com/opengovsg/checkfirst/pull/370) - [develop] Release 1.2.1 [`#379`](https://github.com/opengovsg/checkfirst/pull/379) +- fix: instantiate sequelize within lambda handler [`#385`](https://github.com/opengovsg/checkfirst/pull/385) #### [v1.2.1](https://github.com/opengovsg/checkfirst/compare/v1.2.0...v1.2.1) > 14 April 2021 -- fix: instantiate sequelize within lambda handler [`#385`](https://github.com/opengovsg/checkfirst/pull/385) - fix: change bg to white for login and otp inputs [`#377`](https://github.com/opengovsg/checkfirst/pull/377) - fix: sort references based on order in question and logic tab [`#368`](https://github.com/opengovsg/checkfirst/pull/368) - fix: make the AND/OR button in the IF/ELSE component obvious [`#362`](https://github.com/opengovsg/checkfirst/pull/362) diff --git a/package-lock.json b/package-lock.json index 989c114cf..b8b2e2256 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@opengovsg/checkfirst", - "version": "1.14.7", + "version": "1.14.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@opengovsg/checkfirst", - "version": "1.14.7", + "version": "1.14.8", "license": "MIT", "dependencies": { "@chakra-ui/react": "^1.6.10", diff --git a/package.json b/package.json index 853854351..285b922b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opengovsg/checkfirst", - "version": "1.14.7", + "version": "1.14.8", "description": "Calculators and eligibility checkers for Singapore Government policies", "main": "build/server/index.js", "homepage": "https://checkfirst.gov.sg",