From 3c1d5e07e1e588b86ed2b194d9aa838f064eca81 Mon Sep 17 00:00:00 2001 From: Alexandre Philibeaux Date: Sun, 13 Feb 2022 13:20:49 +0100 Subject: [PATCH 1/2] test(use-i18n): update test --- .github/workflows/ci.yml | 3 +-- .../__tests__/__snapshots__/formatDate.ts.snap | 18 +++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7b428ea0..78ed7403f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - # 17.2 seems to have a bug with Intl.DateTimeFormat - node: [ '14', '16', '17.1' ] + node: [ '14', '16', '17' ] steps: - uses: actions/checkout@v2.3.5 - name: Use Node.js diff --git a/packages/use-i18n/src/__tests__/__snapshots__/formatDate.ts.snap b/packages/use-i18n/src/__tests__/__snapshots__/formatDate.ts.snap index 506ac38db..f349b5188 100644 --- a/packages/use-i18n/src/__tests__/__snapshots__/formatDate.ts.snap +++ b/packages/use-i18n/src/__tests__/__snapshots__/formatDate.ts.snap @@ -18,17 +18,17 @@ exports[`formatDate should work with custom format and locale en 2`] = `"Thursda exports[`formatDate should work with custom format and locale en 3`] = `"Thursday, F 13, 20 AD, 03:28:00 PM Coordinated Universal Time"`; -exports[`formatDate should work with custom format and locale es 1`] = `"jueves, 13 F 20 d. C. 16:28:00 (tiempo universal coordinado)"`; +exports[`formatDate should work with custom format and locale es 1`] = `"jueves, 13 F 20 d. C., 16:28:00 (tiempo universal coordinado)"`; -exports[`formatDate should work with custom format and locale es 2`] = `"jueves, 13 F 20 d. C. 15:28:00 (tiempo universal coordinado)"`; +exports[`formatDate should work with custom format and locale es 2`] = `"jueves, 13 F 20 d. C., 15:28:00 (tiempo universal coordinado)"`; -exports[`formatDate should work with custom format and locale es 3`] = `"jueves, 13 F 20 d. C. 15:28:00 (tiempo universal coordinado)"`; +exports[`formatDate should work with custom format and locale es 3`] = `"jueves, 13 F 20 d. C., 15:28:00 (tiempo universal coordinado)"`; -exports[`formatDate should work with custom format and locale fr 1`] = `"jeudi 13 F 20 ap. J.-C., 16:28:00 Temps universel coordonné"`; +exports[`formatDate should work with custom format and locale fr 1`] = `"jeudi 13 F 20 ap. J.-C., 16:28:00 temps universel coordonné"`; -exports[`formatDate should work with custom format and locale fr 2`] = `"jeudi 13 F 20 ap. J.-C., 15:28:00 Temps universel coordonné"`; +exports[`formatDate should work with custom format and locale fr 2`] = `"jeudi 13 F 20 ap. J.-C., 15:28:00 temps universel coordonné"`; -exports[`formatDate should work with custom format and locale fr 3`] = `"jeudi 13 F 20 ap. J.-C., 15:28:00 Temps universel coordonné"`; +exports[`formatDate should work with custom format and locale fr 3`] = `"jeudi 13 F 20 ap. J.-C., 15:28:00 temps universel coordonné"`; exports[`formatDate should work with custom format and locale ro 1`] = `"joi, 13 F 20 d.Hr., 16:28:00 Timpul universal coordonat"`; @@ -40,7 +40,7 @@ exports[`formatDate should work with format "hour", for date = "2020-02-13T15:28 exports[`formatDate should work with format "hour", for date = "2020-02-13T15:28:00.000Z" and locale "en" 1`] = `"February 13, 2020, 3:28 PM"`; -exports[`formatDate should work with format "hour", for date = "2020-02-13T15:28:00.000Z" and locale "es" 1`] = `"13 de febrero de 2020 15:28"`; +exports[`formatDate should work with format "hour", for date = "2020-02-13T15:28:00.000Z" and locale "es" 1`] = `"13 de febrero de 2020, 15:28"`; exports[`formatDate should work with format "hour", for date = "2020-02-13T15:28:00.000Z" and locale "fr" 1`] = `"13 février 2020, 15:28"`; @@ -50,7 +50,7 @@ exports[`formatDate should work with format "hour", for date = "1581607680000" a exports[`formatDate should work with format "hour", for date = "1581607680000" and locale "en" 1`] = `"February 13, 2020, 3:28 PM"`; -exports[`formatDate should work with format "hour", for date = "1581607680000" and locale "es" 1`] = `"13 de febrero de 2020 15:28"`; +exports[`formatDate should work with format "hour", for date = "1581607680000" and locale "es" 1`] = `"13 de febrero de 2020, 15:28"`; exports[`formatDate should work with format "hour", for date = "1581607680000" and locale "fr" 1`] = `"13 février 2020, 15:28"`; @@ -60,7 +60,7 @@ exports[`formatDate should work with format "hour", for date = "new Date(2020, 1 exports[`formatDate should work with format "hour", for date = "new Date(2020, 1, 13, 16, 28)" and locale "en" 1`] = `"February 13, 2020, 4:28 PM"`; -exports[`formatDate should work with format "hour", for date = "new Date(2020, 1, 13, 16, 28)" and locale "es" 1`] = `"13 de febrero de 2020 16:28"`; +exports[`formatDate should work with format "hour", for date = "new Date(2020, 1, 13, 16, 28)" and locale "es" 1`] = `"13 de febrero de 2020, 16:28"`; exports[`formatDate should work with format "hour", for date = "new Date(2020, 1, 13, 16, 28)" and locale "fr" 1`] = `"13 février 2020, 16:28"`; From 82ab56d08c76ca25338b17d369fcc9a0f1514a73 Mon Sep 17 00:00:00 2001 From: Emmanuel Chambon Date: Tue, 15 Feb 2022 10:24:54 +0100 Subject: [PATCH 2/2] fix: check latest lts --- .github/workflows/ci.yml | 4 ++++ .github/workflows/pull_request_title.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78ed7403f..1f17fbf54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: uses: actions/setup-node@v2.4.1 with: node-version: 17 + check-latest: true cache: 'yarn' - run: yarn - run: yarn run build @@ -23,6 +24,7 @@ jobs: uses: actions/setup-node@v2.4.1 with: node-version: 17 + check-latest: true cache: 'yarn' - run: yarn - run: yarn run build @@ -38,6 +40,7 @@ jobs: uses: actions/setup-node@v2.4.1 with: node-version: ${{ matrix.node }} + check-latest: true cache: 'yarn' - run: yarn - run: yarn run build @@ -64,6 +67,7 @@ jobs: uses: actions/setup-node@v2.4.1 with: node-version: 17 + check-latest: true - run: yarn --immutable --inline-builds - run: yarn run build - run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc diff --git a/.github/workflows/pull_request_title.yml b/.github/workflows/pull_request_title.yml index 38a3f79d9..5e2630238 100644 --- a/.github/workflows/pull_request_title.yml +++ b/.github/workflows/pull_request_title.yml @@ -13,6 +13,7 @@ jobs: uses: actions/setup-node@v2.4.1 with: node-version: 17 + check-latest: true cache: 'yarn' - run: yarn - run: echo '${{ github.event.pull_request.title }}' | yarn run commitlint