From 8b9533bfd460bc4e6839dc04596b910ac7c6625f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:48:28 +0000 Subject: [PATCH 1/2] Bump @types/diff from 5.2.1 to 6.0.0 Bumps [@types/diff](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/diff) from 5.2.1 to 6.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/diff) --- updated-dependencies: - dependency-name: "@types/diff" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index b898c4f60..a1f481a65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -86,7 +86,7 @@ "@testing-library/react": "^16.0.1", "@trivago/prettier-plugin-sort-imports": "^4.2.1", "@types/color-convert": "^2.0.4", - "@types/diff": "^5.2.1", + "@types/diff": "^6.0.0", "@types/grecaptcha": "^3.0.6", "@types/jest": "^29.5.14", "@types/lodash": "^4.17.13", @@ -17093,9 +17093,9 @@ } }, "node_modules/@types/diff": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.2.1.tgz", - "integrity": "sha512-uxpcuwWJGhe2AR1g8hD9F5OYGCqjqWnBUQFD8gMZsDbv8oPHzxJF6iMO6n8Tk0AdzlxoaaoQhOYlIg/PukVU8g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@types/diff/-/diff-6.0.0.tgz", + "integrity": "sha512-dhVCYGv3ZSbzmQaBSagrv1WJ6rXCdkyTcDyoNu1MD8JohI7pR7k8wdZEm+mvdxRKXyHVwckFzWU1vJc+Z29MlA==", "dev": true }, "node_modules/@types/estree": { diff --git a/package.json b/package.json index 6f6348100..1b6f6a588 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "@testing-library/react": "^16.0.1", "@trivago/prettier-plugin-sort-imports": "^4.2.1", "@types/color-convert": "^2.0.4", - "@types/diff": "^5.2.1", + "@types/diff": "^6.0.0", "@types/grecaptcha": "^3.0.6", "@types/jest": "^29.5.14", "@types/lodash": "^4.17.13", From 11e24566fc9ae16efe659cb5a1d7695f9f72bc29 Mon Sep 17 00:00:00 2001 From: dakota002 Date: Thu, 21 Nov 2024 11:50:10 -0500 Subject: [PATCH 2/2] Fixes errors from new package version, updates sandbox seed --- .../circulars.moderation.$circularId.$requestor.tsx | 13 ++++--------- sandbox-seed.json | 3 ++- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/app/routes/circulars.moderation.$circularId.$requestor.tsx b/app/routes/circulars.moderation.$circularId.$requestor.tsx index f5bdf846c..e726d2b0a 100644 --- a/app/routes/circulars.moderation.$circularId.$requestor.tsx +++ b/app/routes/circulars.moderation.$circularId.$requestor.tsx @@ -127,11 +127,6 @@ export default function () { ) } -const methodMap = { - words: diffWords, - lines: diffLines, -} - function DiffedContent({ oldString, newString, @@ -141,10 +136,10 @@ function DiffedContent({ newString: string method?: 'words' | 'lines' }) { - const diff = methodMap[method && newString ? method : 'lines']( - oldString ?? '', - newString ?? '' - ) + const diff = + method == 'words' + ? diffWords(oldString, newString) + : diffLines(oldString, newString) return (
diff --git a/sandbox-seed.json b/sandbox-seed.json index 35534487e..d750b9b04 100644 --- a/sandbox-seed.json +++ b/sandbox-seed.json @@ -5153,7 +5153,8 @@ "body": "This is an example of a request with a missing createdOn field", "requestor": "Example User at Example ", "requestorEmail": "example@example.com", - "subject": "Optical Observations for GRB 971227" + "subject": "Optical Observations for GRB 971227", + "submitter": "Example User at Example " } ] }