diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 430fdcc..512af5f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,10 +8,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 - - name: Use Node.js v13 + - name: Use Node.js v14.2 uses: actions/setup-node@v1 with: - node-version: 13.x + node-version: 14.2 - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" diff --git a/.nvmrc b/.nvmrc index b1bd38b..6b5bab0 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -13 +14.2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3a11bc7..657bccb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,3 +32,7 @@ If you feel another member of the community violated our CoC or you are experien - Continously transpile and typecheck the code: `yarn start` - Continously run the tests: `yarn test` - Run the linter: `yarn lint` + +## Troubleshooting + +Make sure that you use Node v13.11 _exactly_, otherwise, the unit tests will probably fail. Node's localisation data for the `Intl.NumberFormat` API tends to change between minor versions. diff --git a/src/__snapshots__/index.spec.ts.snap b/src/__snapshots__/index.spec.ts.snap index bbee635..f2280b5 100644 --- a/src/__snapshots__/index.spec.ts.snap +++ b/src/__snapshots__/index.spec.ts.snap @@ -34,7 +34,7 @@ exports[`Format currency should format a currency for 'GR' 1`] = `"€123,456.79 exports[`Format currency should format a currency for 'HR' 1`] = `"123.456,79 HRK"`; -exports[`Format currency should format a currency for 'HU' 1`] = `"123456,79 Ft"`; +exports[`Format currency should format a currency for 'HU' 1`] = `"123 456,79 Ft"`; exports[`Format currency should format a currency for 'IE' 1`] = `"€123,456.79"`; @@ -110,7 +110,7 @@ exports[`Format number should format a number for 'GR' 1`] = `"123,456.789"`; exports[`Format number should format a number for 'HR' 1`] = `"123.456,789"`; -exports[`Format number should format a number for 'HU' 1`] = `"123456,789"`; +exports[`Format number should format a number for 'HU' 1`] = `"123 456,789"`; exports[`Format number should format a number for 'IE' 1`] = `"123,456.789"`; @@ -681,7 +681,15 @@ exports[`Format to parts currency should format a currency for 'HU' 1`] = ` Array [ Object { "type": "integer", - "value": "123456", + "value": "123", + }, + Object { + "type": "group", + "value": " ", + }, + Object { + "type": "integer", + "value": "456", }, Object { "type": "decimal", @@ -1767,7 +1775,15 @@ exports[`Format to parts number should format a number for 'HU' 1`] = ` Array [ Object { "type": "integer", - "value": "123456", + "value": "123", + }, + Object { + "type": "group", + "value": " ", + }, + Object { + "type": "integer", + "value": "456", }, Object { "type": "decimal",