From de536ab5c1d95b2799b4508fef99d5df4d10cf4e Mon Sep 17 00:00:00 2001 From: danetsao Date: Thu, 21 Sep 2023 13:38:17 -0500 Subject: [PATCH 1/6] Update Node.js to v18 in GitHub Actions --- .github/workflows/build-npm-release.yml | 2 +- .github/workflows/build-npm.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-npm-release.yml b/.github/workflows/build-npm-release.yml index 47510d51..75d20a0a 100644 --- a/.github/workflows/build-npm-release.yml +++ b/.github/workflows/build-npm-release.yml @@ -27,7 +27,7 @@ jobs: PUBLISH_MOD_DESCRIPTOR: 'true' FOLIO_NPM_REGISTRY: 'https://repository.folio.org/repository/npm-folio/' FOLIO_MD_REGISTRY: 'https://folio-registry.dev.folio.org' - NODEJS_VERSION: '16' + NODEJS_VERSION: '18' JEST_JUNIT_OUTPUT_DIR: 'artifacts/jest-junit' JEST_COVERAGE_REPORT_DIR: 'artifacts/coverage-jest/lcov-report/' BIGTEST_JUNIT_OUTPUT_DIR: 'artifacts/runTest' diff --git a/.github/workflows/build-npm.yml b/.github/workflows/build-npm.yml index fbfd2eca..afe48470 100644 --- a/.github/workflows/build-npm.yml +++ b/.github/workflows/build-npm.yml @@ -22,7 +22,7 @@ jobs: PUBLISH_MOD_DESCRIPTOR: 'true' FOLIO_NPM_REGISTRY: 'https://repository.folio.org/repository/npm-folioci/' FOLIO_MD_REGISTRY: 'https://folio-registry.dev.folio.org' - NODEJS_VERSION: '16' + NODEJS_VERSION: '18' JEST_JUNIT_OUTPUT_DIR: 'artifacts/jest-junit' JEST_COVERAGE_REPORT_DIR: 'artifacts/coverage-jest/lcov-report/' SQ_LCOV_REPORT: 'artifacts/coverage-jest/lcov.info' From 4c98df30b5e74084de06f254671af745a4264056 Mon Sep 17 00:00:00 2001 From: danetsao Date: Thu, 21 Sep 2023 13:43:43 -0500 Subject: [PATCH 2/6] Added '?' operator to fix possible null error --- src/forms/CalendarForm/validation/validateExceptions.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/forms/CalendarForm/validation/validateExceptions.tsx b/src/forms/CalendarForm/validation/validateExceptions.tsx index 01c7ed17..fa0e0b15 100644 --- a/src/forms/CalendarForm/validation/validateExceptions.tsx +++ b/src/forms/CalendarForm/validation/validateExceptions.tsx @@ -248,11 +248,11 @@ export function validateExceptionInterOverlaps( const rowMinMaxes: { i: number; startDate: Dayjs; endDate: Dayjs }[] = rows.map((row) => ({ i: row.i, - startDate: dayjs - .min(row.rows.map(({ startDate }) => dayjs(startDate))) + startDate: dayjs?.min( + row.rows.map(({ startDate }) => dayjs(startDate))) .startOf('day'), - endDate: dayjs - .max(row.rows.map(({ endDate }) => dayjs(endDate))) + endDate: dayjs?.max( + row.rows.map(({ endDate }) => dayjs(endDate))) .endOf('day') })); From ced24b983017681329bffd52d38f3cc9fc486623 Mon Sep 17 00:00:00 2001 From: Noah Overcash Date: Thu, 21 Sep 2023 15:10:01 -0400 Subject: [PATCH 3/6] Fix null safety error --- .../CalendarForm/validation/validateExceptions.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/forms/CalendarForm/validation/validateExceptions.tsx b/src/forms/CalendarForm/validation/validateExceptions.tsx index fa0e0b15..7a1e50f1 100644 --- a/src/forms/CalendarForm/validation/validateExceptions.tsx +++ b/src/forms/CalendarForm/validation/validateExceptions.tsx @@ -248,12 +248,12 @@ export function validateExceptionInterOverlaps( const rowMinMaxes: { i: number; startDate: Dayjs; endDate: Dayjs }[] = rows.map((row) => ({ i: row.i, - startDate: dayjs?.min( - row.rows.map(({ startDate }) => dayjs(startDate))) - .startOf('day'), - endDate: dayjs?.max( - row.rows.map(({ endDate }) => dayjs(endDate))) - .endOf('day') + startDate: dayjs + .min(row.rows.map(({ startDate }) => dayjs(startDate))) + ?.startOf('day'), + endDate: dayjs + .maxrow.rows.map(({ endDate }) => dayjs(endDate))) + ?.endOf('day') })); for (let i = 0; i < rowMinMaxes.length - 1; i++) { From 03bd1914c474a0e5b7a2e00842d53b0ff343329f Mon Sep 17 00:00:00 2001 From: Noah Overcash Date: Thu, 21 Sep 2023 15:12:33 -0400 Subject: [PATCH 4/6] Fix typo --- src/forms/CalendarForm/validation/validateExceptions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/forms/CalendarForm/validation/validateExceptions.tsx b/src/forms/CalendarForm/validation/validateExceptions.tsx index 7a1e50f1..6aeec69e 100644 --- a/src/forms/CalendarForm/validation/validateExceptions.tsx +++ b/src/forms/CalendarForm/validation/validateExceptions.tsx @@ -252,7 +252,7 @@ export function validateExceptionInterOverlaps( .min(row.rows.map(({ startDate }) => dayjs(startDate))) ?.startOf('day'), endDate: dayjs - .maxrow.rows.map(({ endDate }) => dayjs(endDate))) + .max(row.rows.map(({ endDate }) => dayjs(endDate))) ?.endOf('day') })); From 5e8dd66d6bf2c2261a3642b3dc0ff7b09c219ca0 Mon Sep 17 00:00:00 2001 From: Noah Overcash Date: Thu, 21 Sep 2023 15:18:04 -0400 Subject: [PATCH 5/6] More nullish errors?? --- src/forms/CalendarForm/validation/validateExceptions.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forms/CalendarForm/validation/validateExceptions.tsx b/src/forms/CalendarForm/validation/validateExceptions.tsx index 6aeec69e..8413ecb9 100644 --- a/src/forms/CalendarForm/validation/validateExceptions.tsx +++ b/src/forms/CalendarForm/validation/validateExceptions.tsx @@ -250,10 +250,10 @@ export function validateExceptionInterOverlaps( i: row.i, startDate: dayjs .min(row.rows.map(({ startDate }) => dayjs(startDate))) - ?.startOf('day'), + ?.startOf('day') ?? dayjs(0), endDate: dayjs .max(row.rows.map(({ endDate }) => dayjs(endDate))) - ?.endOf('day') + ?.endOf('day') ?? dayjs(0) })); for (let i = 0; i < rowMinMaxes.length - 1; i++) { From ede0fcf14b02a2a0065019474c27ef98fa361a7f Mon Sep 17 00:00:00 2001 From: Zak Burke Date: Fri, 22 Sep 2023 10:27:10 -0400 Subject: [PATCH 6/6] UICAL-275 BREAKING bump react-intl to v6 (#494) Refs UICAL-275, STRIPES-868 --- CHANGELOG.md | 4 ++++ package.json | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b3c3a81..2f0f4e19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change history for ui-calendar +## 10.0.0 IN PROGRESS + +* *BREAKING* bump `react-intl` to `v6.4.4`. Refs UICAL-275 + ## [9.2.1] (https://github.com/folio-org/ui-calendar/tree/v9.2.1) (2023-03-16) * Fix placement of datepicker to prevent overflow. Refs UICAL-240 diff --git a/package.json b/package.json index c38b9211..743d46be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@folio/calendar", - "version": "9.2.1", + "version": "10.0.0", "description": "Calendar settings", "repository": "folio-org/ui-calendar", "publishConfig": { @@ -119,7 +119,7 @@ "@folio/stripes-form": "^8.0.0", "@folio/stripes-smart-components": "^8.0.0", "@folio/stripes-testing": "^4.2.0", - "@formatjs/cli": "^4.2.21", + "@formatjs/cli": "^6.1.3", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.5", "@testing-library/react-hooks": "^8.0.1", @@ -141,7 +141,7 @@ "prettier": "^2.7.0", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-intl": "^5.7.0", + "react-intl": "^6.4.4", "react-router-dom": "^5.2.0", "ts-jest": "^28.0.7", "typescript": "^4.7.4" @@ -165,7 +165,7 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "react-final-form": "^6.5.9", - "react-intl": "^5.7.0", + "react-intl": "^6.4.4", "react-query": "^3.39.2", "react-router-dom": "^5.2.0" }