From 3c3bf1f26d578818c7ce7b8941d56d4eda69a75b Mon Sep 17 00:00:00 2001 From: minnakt <47064971+minnakt@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:33:15 -0500 Subject: [PATCH 01/15] DEVPROD-5097: Prevent deploy_to_prod task from failing silently (#2274) --- scripts/deploy/deploy.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/deploy/deploy.sh b/scripts/deploy/deploy.sh index b0b5e8507c..b923c815db 100644 --- a/scripts/deploy/deploy.sh +++ b/scripts/deploy/deploy.sh @@ -1,8 +1,12 @@ -#!/bin/sh +#!/bin/bash -# This script runs the aws cli command to deploy the app to s3 +# This script runs the AWS CLI command to deploy the app to S3. -# Try this step and throw an error if it fails echo "Deploying to S3" -aws s3 sync build/ s3://"${BUCKET}"/ --acl public-read --follow-symlinks --delete --exclude .env-cmdrc.json -echo "Deployed to S3" + +if ! aws s3 sync build/ s3://"${BUCKET}"/ --acl public-read --follow-symlinks --delete --exclude .env-cmdrc.json; then + echo "Deployment to S3 failed" + exit 1 +else + echo "Successfully deployed to S3" +fi From 51becdbf60a91f125384b0aea2ccb0a35b7f502f Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Mon, 26 Feb 2024 17:00:14 -0500 Subject: [PATCH 02/15] DEVPROD-3326: Reset edit host modal state (#2275) --- src/pages/spawn/spawnHost/EditSpawnHostButton.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/spawn/spawnHost/EditSpawnHostButton.tsx b/src/pages/spawn/spawnHost/EditSpawnHostButton.tsx index 86b26ff6e9..c73ff0d285 100644 --- a/src/pages/spawn/spawnHost/EditSpawnHostButton.tsx +++ b/src/pages/spawn/spawnHost/EditSpawnHostButton.tsx @@ -52,6 +52,7 @@ export const EditSpawnHostButton: React.FC = ({ setOpenModal(false)} visible={openModal} host={host} From 9784a5e92c01aba25734350f3e4a04ecd107ce42 Mon Sep 17 00:00:00 2001 From: Mohamed Khelif Date: Tue, 27 Feb 2024 09:56:37 -0500 Subject: [PATCH 03/15] DEVPROD-946 Update BuildVariantSelector to trim search terms (#2266) --- .../taskHistory/BuildVariantSelector.tsx | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/pages/taskHistory/BuildVariantSelector.tsx b/src/pages/taskHistory/BuildVariantSelector.tsx index 4828492fc7..6ec41d4b0f 100644 --- a/src/pages/taskHistory/BuildVariantSelector.tsx +++ b/src/pages/taskHistory/BuildVariantSelector.tsx @@ -1,3 +1,4 @@ +import { useCallback, useState } from "react"; import { useQuery } from "@apollo/client"; import styled from "@emotion/styled"; import { Combobox, ComboboxOption } from "@leafygreen-ui/combobox"; @@ -24,7 +25,7 @@ const BuildVariantSelector: React.FC = ({ HistoryQueryParams.VisibleColumns, [], ); - + const [filteredOptions, setFilteredOptions] = useState([]); const { data, loading } = useQuery< BuildVariantsForTaskNameQuery, BuildVariantsForTaskNameQueryVariables @@ -35,6 +36,10 @@ const BuildVariantSelector: React.FC = ({ }, }); + /** + * `onChange` is a callback function that is called when the user selects a build variant + * @param selectedBuildVariants - an array of build variants that the user has selected + */ const onChange = (selectedBuildVariants: string[]) => { sendEvent({ name: "Filter by build variant", @@ -42,9 +47,28 @@ const BuildVariantSelector: React.FC = ({ setVisibleColumns(selectedBuildVariants); }; - const { buildVariantsForTaskName } = data || {}; + /** + * `onFilter` is a callback function that is called when the user types in the search bar + */ + const onFilter = useCallback( + (value: string) => { + setFilteredOptions( + (buildVariantsForTaskName || []) + .filter(({ buildVariant, displayName }) => { + const trimmedValue = value.toLowerCase().trim(); + return ( + buildVariant.toLowerCase().includes(trimmedValue) || + displayName.toLowerCase().includes(trimmedValue) + ); + }) + .map((option) => option.buildVariant) || [], + ); + }, + [buildVariantsForTaskName], + ); + return ( = ({ onChange={onChange} disabled={loading} overflow="scroll-x" + onFilter={onFilter} + filteredOptions={filteredOptions} > {buildVariantsForTaskName?.map((option) => ( Date: Tue, 27 Feb 2024 10:20:21 -0500 Subject: [PATCH 04/15] CHORE(NPM) - bump jest and @types/jest (#2277) --- package.json | 4 +- yarn.lock | 679 ++++++++++++++++++++++++++------------------------- 2 files changed, 342 insertions(+), 341 deletions(-) diff --git a/package.json b/package.json index dfd9165269..704e166cf6 100644 --- a/package.json +++ b/package.json @@ -149,7 +149,7 @@ "@testing-library/jest-dom": "6.1.3", "@testing-library/react": "14.0.0", "@testing-library/user-event": "14.5.1", - "@types/jest": "29.4.0", + "@types/jest": "29.5.12", "@types/jest-specific-snapshot": "0.5.9", "@types/js-cookie": "^3.0.4", "@types/lodash.debounce": "4.0.7", @@ -188,7 +188,7 @@ "http-proxy": "^1.18.1", "husky": "8.0.1", "identity-obj-proxy": "3.0.0", - "jest": "29.5.0", + "jest": "29.7.0", "jest-canvas-mock": "^2.5.2", "jest-environment-jsdom": "29.7.0", "jest-junit": "15.0.0", diff --git a/yarn.lock b/yarn.lock index 3e4b7840e0..e92bf7da9e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -200,6 +200,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.9.tgz#b028820718000f267870822fec434820e9b1e4d1" + integrity sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.23.9" + "@babel/parser" "^7.23.9" + "@babel/template" "^7.23.9" + "@babel/traverse" "^7.23.9" + "@babel/types" "^7.23.9" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/generator@^7.12.11", "@babel/generator@^7.14.0", "@babel/generator@^7.18.13", "@babel/generator@^7.22.10", "@babel/generator@^7.7.2": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.10.tgz#c92254361f398e160645ac58831069707382b722" @@ -558,6 +579,15 @@ "@babel/traverse" "^7.23.6" "@babel/types" "^7.23.6" +"@babel/helpers@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.9.tgz#c3e20bbe7f7a7e10cb9b178384b4affdf5995c7d" + integrity sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ== + dependencies: + "@babel/template" "^7.23.9" + "@babel/traverse" "^7.23.9" + "@babel/types" "^7.23.9" + "@babel/highlight@^7.22.13": version "7.22.13" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.13.tgz#9cda839e5d3be9ca9e8c26b6dd69e7548f0cbf16" @@ -601,6 +631,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.6.tgz#ba1c9e512bda72a47e285ae42aff9d2a635a9e3b" integrity sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ== +"@babel/parser@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.9.tgz#7b903b6149b0f8fa7ad564af646c4c38a77fc44b" + integrity sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.15.tgz#02dc8a03f613ed5fdc29fb2f728397c78146c962" @@ -1770,6 +1805,15 @@ "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" +"@babel/template@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.23.9.tgz#f881d0487cba2828d3259dcb9ef5005a9731011a" + integrity sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/parser" "^7.23.9" + "@babel/types" "^7.23.9" + "@babel/traverse@^7.12.12", "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.22.10", "@babel/traverse@^7.22.11", "@babel/traverse@^7.22.8": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" @@ -1802,6 +1846,22 @@ debug "^4.3.1" globals "^11.1.0" +"@babel/traverse@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.9.tgz#2f9d6aead6b564669394c5ce0f9302bb65b9d950" + integrity sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.9" + "@babel/types" "^7.23.9" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.18.13", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.5", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.10.tgz#4a9e76446048f2c66982d1a989dd12b8a2d2dc03" @@ -1847,6 +1907,15 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" +"@babel/types@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.9.tgz#1dd7b59a9a2b5c87f8b41e52770b5ecbf492e002" + integrity sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q== + dependencies: + "@babel/helper-string-parser" "^7.23.4" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + "@base2/pretty-print-object@1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.1.tgz#371ba8be66d556812dc7fb169ebc3c08378f69d4" @@ -2889,7 +2958,7 @@ js-yaml "^3.13.1" resolve-from "^5.0.0" -"@istanbuljs/schema@^0.1.2": +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== @@ -2906,41 +2975,53 @@ jest-util "^29.6.2" slash "^3.0.0" -"@jest/core@^29.5.0", "@jest/core@^29.6.2": - version "29.6.2" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.6.2.tgz#6f2d1dbe8aa0265fcd4fb8082ae1952f148209c8" - integrity sha512-Oj+5B+sDMiMWLhPFF+4/DvHOf+U10rgvCLGPHP8Xlsy/7QxS51aU/eBngudHlJXnaWD5EohAgJ4js+T6pa+zOg== +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== dependencies: - "@jest/console" "^29.6.2" - "@jest/reporters" "^29.6.2" - "@jest/test-result" "^29.6.2" - "@jest/transform" "^29.6.2" - "@jest/types" "^29.6.1" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + +"@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== + dependencies: + "@jest/console" "^29.7.0" + "@jest/reporters" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^29.5.0" - jest-config "^29.6.2" - jest-haste-map "^29.6.2" - jest-message-util "^29.6.2" - jest-regex-util "^29.4.3" - jest-resolve "^29.6.2" - jest-resolve-dependencies "^29.6.2" - jest-runner "^29.6.2" - jest-runtime "^29.6.2" - jest-snapshot "^29.6.2" - jest-util "^29.6.2" - jest-validate "^29.6.2" - jest-watcher "^29.6.2" + jest-changed-files "^29.7.0" + jest-config "^29.7.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-resolve-dependencies "^29.7.0" + jest-runner "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + jest-watcher "^29.7.0" micromatch "^4.0.4" - pretty-format "^29.6.2" + pretty-format "^29.7.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^29.6.2", "@jest/environment@^29.7.0": +"@jest/environment@^29.7.0": version "29.7.0" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== @@ -2950,13 +3031,6 @@ "@types/node" "*" jest-mock "^29.7.0" -"@jest/expect-utils@^29.6.2": - version "29.6.2" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.6.2.tgz#1b97f290d0185d264dd9fdec7567a14a38a90534" - integrity sha512-6zIhM8go3RV2IG4aIZaZbxwpOzz3ZiM23oxAlkquOIole+G6TrbeXnykxWYlqF7kz2HlBjdKtca20x9atkEQYg== - dependencies: - jest-get-type "^29.4.3" - "@jest/expect-utils@^29.7.0": version "29.7.0" resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" @@ -2964,15 +3038,15 @@ dependencies: jest-get-type "^29.6.3" -"@jest/expect@^29.6.2": - version "29.6.2" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.6.2.tgz#5a2ad58bb345165d9ce0a1845bbf873c480a4b28" - integrity sha512-m6DrEJxVKjkELTVAztTLyS/7C92Y2b0VYqmDROYKLLALHn8T/04yPs70NADUYPrV3ruI+H3J0iUIuhkjp7vkfg== +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== dependencies: - expect "^29.6.2" - jest-snapshot "^29.6.2" + expect "^29.7.0" + jest-snapshot "^29.7.0" -"@jest/fake-timers@^29.6.2", "@jest/fake-timers@^29.7.0": +"@jest/fake-timers@^29.7.0": version "29.7.0" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== @@ -2984,26 +3058,26 @@ jest-mock "^29.7.0" jest-util "^29.7.0" -"@jest/globals@^29.6.2": - version "29.6.2" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.6.2.tgz#74af81b9249122cc46f1eb25793617eec69bf21a" - integrity sha512-cjuJmNDjs6aMijCmSa1g2TNG4Lby/AeU7/02VtpW+SLcZXzOLK2GpN2nLqcFjmhy3B3AoPeQVx7BnyOf681bAw== +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== dependencies: - "@jest/environment" "^29.6.2" - "@jest/expect" "^29.6.2" - "@jest/types" "^29.6.1" - jest-mock "^29.6.2" + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" -"@jest/reporters@^29.6.2": - version "29.6.2" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.6.2.tgz#524afe1d76da33d31309c2c4a2c8062d0c48780a" - integrity sha512-sWtijrvIav8LgfJZlrGCdN0nP2EWbakglJY49J1Y5QihcQLfy7ovyxxjJBRXMNltgt4uPtEcFmIMbVshEDfFWw== +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.6.2" - "@jest/test-result" "^29.6.2" - "@jest/transform" "^29.6.2" - "@jest/types" "^29.6.1" + "@jest/console" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@jridgewell/trace-mapping" "^0.3.18" "@types/node" "*" chalk "^4.0.0" @@ -3012,25 +3086,18 @@ glob "^7.1.3" graceful-fs "^4.2.9" istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" + istanbul-lib-instrument "^6.0.0" istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-message-util "^29.6.2" - jest-util "^29.6.2" - jest-worker "^29.6.2" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + jest-worker "^29.7.0" slash "^3.0.0" string-length "^4.0.1" strip-ansi "^6.0.0" v8-to-istanbul "^9.0.1" -"@jest/schemas@^29.6.0": - version "29.6.0" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.0.tgz#0f4cb2c8e3dca80c135507ba5635a4fd755b0040" - integrity sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ== - dependencies: - "@sinclair/typebox" "^0.27.8" - "@jest/schemas@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" @@ -3038,10 +3105,10 @@ dependencies: "@sinclair/typebox" "^0.27.8" -"@jest/source-map@^29.6.0": - version "29.6.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.0.tgz#bd34a05b5737cb1a99d43e1957020ac8e5b9ddb1" - integrity sha512-oA+I2SHHQGxDCZpbrsCQSoMLb3Bz547JnM+jUr9qEbuw0vQlWZfpPS7CO9J7XiwKicEz9OFn/IYoLkkiUD7bzA== +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== dependencies: "@jridgewell/trace-mapping" "^0.3.18" callsites "^3.0.0" @@ -3057,17 +3124,27 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^29.6.2": - version "29.6.2" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.6.2.tgz#585eff07a68dd75225a7eacf319780cb9f6b9bf4" - integrity sha512-GVYi6PfPwVejO7slw6IDO0qKVum5jtrJ3KoLGbgBWyr2qr4GaxFV6su+ZAjdTX75Sr1DkMFRk09r2ZVa+wtCGw== +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== dependencies: - "@jest/test-result" "^29.6.2" + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== + dependencies: + "@jest/test-result" "^29.7.0" graceful-fs "^4.2.9" - jest-haste-map "^29.6.2" + jest-haste-map "^29.7.0" slash "^3.0.0" -"@jest/transform@^29.3.1", "@jest/transform@^29.6.2", "@jest/transform@^29.7.0": +"@jest/transform@^29.3.1", "@jest/transform@^29.7.0": version "29.7.0" resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== @@ -3099,7 +3176,7 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" -"@jest/types@^29.5.0", "@jest/types@^29.6.1", "@jest/types@^29.6.3": +"@jest/types@^29.6.1", "@jest/types@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== @@ -5785,18 +5862,10 @@ dependencies: "@types/jest" "*" -"@types/jest@*": - version "29.5.11" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.11.tgz#0c13aa0da7d0929f078ab080ae5d4ced80fa2f2c" - integrity sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ== - dependencies: - expect "^29.0.0" - pretty-format "^29.0.0" - -"@types/jest@29.4.0": - version "29.4.0" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.4.0.tgz#a8444ad1704493e84dbf07bb05990b275b3b9206" - integrity sha512-VaywcGQ9tPorCX/Jkkni7RWGFfI11whqzs8dvxF41P17Z+z872thvEvlIbznjPJ02kl1HMX3LmLOonsj2n7HeQ== +"@types/jest@*", "@types/jest@29.5.12": + version "29.5.12" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.12.tgz#7f7dc6eb4cf246d2474ed78744b05d06ce025544" + integrity sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -6890,7 +6959,7 @@ babel-core@^7.0.0-bridge.0: resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== -babel-jest@29.7.0, babel-jest@^29.6.2: +babel-jest@29.7.0, babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== @@ -7815,6 +7884,19 @@ cosmiconfig@^8.1.0, cosmiconfig@^8.1.3: parse-json "^5.0.0" path-type "^4.0.0" +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-config "^29.7.0" + jest-util "^29.7.0" + prompts "^2.0.1" + create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -8179,11 +8261,6 @@ detect-port@^1.3.0: address "^1.0.1" debug "4" -diff-sequences@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.3.tgz#9314bc1fabe09267ffeca9cbafc457d8499a13f2" - integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA== - diff-sequences@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" @@ -9184,19 +9261,7 @@ exit@^0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== -expect@^29.0.0, expect@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.6.2.tgz#7b08e83eba18ddc4a2cf62b5f2d1918f5cd84521" - integrity sha512-iAErsLxJ8C+S02QbLAwgSGSezLQK+XXRDt8IuFXFpwCNw2ECmzZSmjKcCaFVp5VRMk+WAvz6h6jokzEzBFZEuA== - dependencies: - "@jest/expect-utils" "^29.6.2" - "@types/node" "*" - jest-get-type "^29.4.3" - jest-matcher-utils "^29.6.2" - jest-message-util "^29.6.2" - jest-util "^29.6.2" - -expect@^29.7.0: +expect@^29.0.0, expect@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== @@ -10818,7 +10883,7 @@ istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: +istanbul-lib-instrument@^5.0.4: version "5.2.1" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== @@ -10829,6 +10894,17 @@ istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: istanbul-lib-coverage "^3.2.0" semver "^6.3.0" +istanbul-lib-instrument@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz#91655936cf7380e4e473383081e38478b69993b1" + integrity sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw== + dependencies: + "@babel/core" "^7.23.9" + "@babel/parser" "^7.23.9" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + istanbul-lib-report@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" @@ -10893,96 +10969,86 @@ jest-canvas-mock@^2.5.2: cssfontparser "^1.2.1" moo-color "^1.0.2" -jest-changed-files@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.5.0.tgz#e88786dca8bf2aa899ec4af7644e16d9dcf9b23e" - integrity sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag== +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== dependencies: execa "^5.0.0" + jest-util "^29.7.0" p-limit "^3.1.0" -jest-circus@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.6.2.tgz#1e6ffca60151ac66cad63fce34f443f6b5bb4258" - integrity sha512-G9mN+KOYIUe2sB9kpJkO9Bk18J4dTDArNFPwoZ7WKHKel55eKIS/u2bLthxgojwlf9NLCVQfgzM/WsOVvoC6Fw== +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== dependencies: - "@jest/environment" "^29.6.2" - "@jest/expect" "^29.6.2" - "@jest/test-result" "^29.6.2" - "@jest/types" "^29.6.1" + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^1.0.0" is-generator-fn "^2.0.0" - jest-each "^29.6.2" - jest-matcher-utils "^29.6.2" - jest-message-util "^29.6.2" - jest-runtime "^29.6.2" - jest-snapshot "^29.6.2" - jest-util "^29.6.2" + jest-each "^29.7.0" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" p-limit "^3.1.0" - pretty-format "^29.6.2" + pretty-format "^29.7.0" pure-rand "^6.0.0" slash "^3.0.0" stack-utils "^2.0.3" -jest-cli@^29.5.0: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.6.2.tgz#edb381763398d1a292cd1b636a98bfa5644b8fda" - integrity sha512-TT6O247v6dCEX2UGHGyflMpxhnrL0DNqP2fRTKYm3nJJpCTfXX3GCMQPGFjXDoj0i5/Blp3jriKXFgdfmbYB6Q== +jest-cli@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== dependencies: - "@jest/core" "^29.6.2" - "@jest/test-result" "^29.6.2" - "@jest/types" "^29.6.1" + "@jest/core" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" chalk "^4.0.0" + create-jest "^29.7.0" exit "^0.1.2" - graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^29.6.2" - jest-util "^29.6.2" - jest-validate "^29.6.2" - prompts "^2.0.1" + jest-config "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" yargs "^17.3.1" -jest-config@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.6.2.tgz#c68723f06b31ca5e63030686e604727d406cd7c3" - integrity sha512-VxwFOC8gkiJbuodG9CPtMRjBUNZEHxwfQXmIudSTzFWxaci3Qub1ddTRbFNQlD/zUeaifLndh/eDccFX4wCMQw== +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== dependencies: "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.6.2" - "@jest/types" "^29.6.1" - babel-jest "^29.6.2" + "@jest/test-sequencer" "^29.7.0" + "@jest/types" "^29.6.3" + babel-jest "^29.7.0" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^29.6.2" - jest-environment-node "^29.6.2" - jest-get-type "^29.4.3" - jest-regex-util "^29.4.3" - jest-resolve "^29.6.2" - jest-runner "^29.6.2" - jest-util "^29.6.2" - jest-validate "^29.6.2" + jest-circus "^29.7.0" + jest-environment-node "^29.7.0" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-runner "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^29.6.2" + pretty-format "^29.7.0" slash "^3.0.0" strip-json-comments "^3.1.1" -jest-diff@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.6.2.tgz#c36001e5543e82a0805051d3ceac32e6825c1c46" - integrity sha512-t+ST7CB9GX5F2xKwhwCf0TAR17uNDiaPTZnVymP9lw0lssa9vG+AFyDZoeIHStU3WowFFwT+ky+er0WVl2yGhA== - dependencies: - chalk "^4.0.0" - diff-sequences "^29.4.3" - jest-get-type "^29.4.3" - pretty-format "^29.6.2" - jest-diff@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" @@ -10993,23 +11059,23 @@ jest-diff@^29.7.0: jest-get-type "^29.6.3" pretty-format "^29.7.0" -jest-docblock@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.4.3.tgz#90505aa89514a1c7dceeac1123df79e414636ea8" - integrity sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg== +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== dependencies: detect-newline "^3.0.0" -jest-each@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.6.2.tgz#c9e4b340bcbe838c73adf46b76817b15712d02ce" - integrity sha512-MsrsqA0Ia99cIpABBc3izS1ZYoYfhIy0NNWqPSE0YXbQjwchyt6B1HD2khzyPe1WiJA7hbxXy77ZoUQxn8UlSw== +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== dependencies: - "@jest/types" "^29.6.1" + "@jest/types" "^29.6.3" chalk "^4.0.0" - jest-get-type "^29.4.3" - jest-util "^29.6.2" - pretty-format "^29.6.2" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" jest-environment-jsdom@29.7.0: version "29.7.0" @@ -11025,47 +11091,23 @@ jest-environment-jsdom@29.7.0: jest-util "^29.7.0" jsdom "^20.0.0" -jest-environment-node@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.6.2.tgz#a9ea2cabff39b08eca14ccb32c8ceb924c8bb1ad" - integrity sha512-YGdFeZ3T9a+/612c5mTQIllvWkddPbYcN2v95ZH24oWMbGA4GGS2XdIF92QMhUhvrjjuQWYgUGW2zawOyH63MQ== +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== dependencies: - "@jest/environment" "^29.6.2" - "@jest/fake-timers" "^29.6.2" - "@jest/types" "^29.6.1" + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" - jest-mock "^29.6.2" - jest-util "^29.6.2" - -jest-get-type@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.4.3.tgz#1ab7a5207c995161100b5187159ca82dd48b3dd5" - integrity sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg== + jest-mock "^29.7.0" + jest-util "^29.7.0" jest-get-type@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== -jest-haste-map@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.6.2.tgz#298c25ea5255cfad8b723179d4295cf3a50a70d1" - integrity sha512-+51XleTDAAysvU8rT6AnS1ZJ+WHVNqhj1k6nTvN2PYP+HjU3kqlaKQ1Lnw3NYW3bm2r8vq82X0Z1nDDHZMzHVA== - dependencies: - "@jest/types" "^29.6.1" - "@types/graceful-fs" "^4.1.3" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^29.4.3" - jest-util "^29.6.2" - jest-worker "^29.6.2" - micromatch "^4.0.4" - walker "^1.0.8" - optionalDependencies: - fsevents "^2.3.2" - jest-haste-map@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" @@ -11095,23 +11137,13 @@ jest-junit@15.0.0: uuid "^8.3.2" xml "^1.0.1" -jest-leak-detector@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.6.2.tgz#e2b307fee78cab091c37858a98c7e1d73cdf5b38" - integrity sha512-aNqYhfp5uYEO3tdWMb2bfWv6f0b4I0LOxVRpnRLAeque2uqOVVMLh6khnTcE2qJ5wAKop0HcreM1btoysD6bPQ== - dependencies: - jest-get-type "^29.4.3" - pretty-format "^29.6.2" - -jest-matcher-utils@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.6.2.tgz#39de0be2baca7a64eacb27291f0bd834fea3a535" - integrity sha512-4LiAk3hSSobtomeIAzFTe+N8kL6z0JtF3n6I4fg29iIW7tt99R7ZcIFW34QkX+DuVrf+CUe6wuVOpm7ZKFJzZQ== +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== dependencies: - chalk "^4.0.0" - jest-diff "^29.6.2" - jest-get-type "^29.4.3" - pretty-format "^29.6.2" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" jest-matcher-utils@^29.7.0: version "29.7.0" @@ -11166,7 +11198,7 @@ jest-mock@^27.0.6: "@jest/types" "^27.5.1" "@types/node" "*" -jest-mock@^29.6.2, jest-mock@^29.7.0: +jest-mock@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== @@ -11180,7 +11212,7 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== -jest-regex-util@^29.0.0, jest-regex-util@^29.4.3: +jest-regex-util@^29.0.0: version "29.4.3" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.4.3.tgz#a42616141e0cae052cfa32c169945d00c0aa0bb8" integrity sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg== @@ -11190,85 +11222,85 @@ jest-regex-util@^29.6.3: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== -jest-resolve-dependencies@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.6.2.tgz#36435269b6672c256bcc85fb384872c134cc4cf2" - integrity sha512-LGqjDWxg2fuQQm7ypDxduLu/m4+4Lb4gczc13v51VMZbVP5tSBILqVx8qfWcsdP8f0G7aIqByIALDB0R93yL+w== +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== dependencies: - jest-regex-util "^29.4.3" - jest-snapshot "^29.6.2" + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" -jest-resolve@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.6.2.tgz#f18405fe4b50159b7b6d85e81f6a524d22afb838" - integrity sha512-G/iQUvZWI5e3SMFssc4ug4dH0aZiZpsDq9o1PtXTV1210Ztyb2+w+ZgQkB3iOiC5SmAEzJBOHWz6Hvrd+QnNPw== +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== dependencies: chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^29.6.2" + jest-haste-map "^29.7.0" jest-pnp-resolver "^1.2.2" - jest-util "^29.6.2" - jest-validate "^29.6.2" + jest-util "^29.7.0" + jest-validate "^29.7.0" resolve "^1.20.0" resolve.exports "^2.0.0" slash "^3.0.0" -jest-runner@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.6.2.tgz#89e8e32a8fef24781a7c4c49cd1cb6358ac7fc01" - integrity sha512-wXOT/a0EspYgfMiYHxwGLPCZfC0c38MivAlb2lMEAlwHINKemrttu1uSbcGbfDV31sFaPWnWJPmb2qXM8pqZ4w== +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== dependencies: - "@jest/console" "^29.6.2" - "@jest/environment" "^29.6.2" - "@jest/test-result" "^29.6.2" - "@jest/transform" "^29.6.2" - "@jest/types" "^29.6.1" + "@jest/console" "^29.7.0" + "@jest/environment" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" emittery "^0.13.1" graceful-fs "^4.2.9" - jest-docblock "^29.4.3" - jest-environment-node "^29.6.2" - jest-haste-map "^29.6.2" - jest-leak-detector "^29.6.2" - jest-message-util "^29.6.2" - jest-resolve "^29.6.2" - jest-runtime "^29.6.2" - jest-util "^29.6.2" - jest-watcher "^29.6.2" - jest-worker "^29.6.2" + jest-docblock "^29.7.0" + jest-environment-node "^29.7.0" + jest-haste-map "^29.7.0" + jest-leak-detector "^29.7.0" + jest-message-util "^29.7.0" + jest-resolve "^29.7.0" + jest-runtime "^29.7.0" + jest-util "^29.7.0" + jest-watcher "^29.7.0" + jest-worker "^29.7.0" p-limit "^3.1.0" source-map-support "0.5.13" -jest-runtime@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.6.2.tgz#692f25e387f982e89ab83270e684a9786248e545" - integrity sha512-2X9dqK768KufGJyIeLmIzToDmsN0m7Iek8QNxRSI/2+iPFYHF0jTwlO3ftn7gdKd98G/VQw9XJCk77rbTGZnJg== +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== dependencies: - "@jest/environment" "^29.6.2" - "@jest/fake-timers" "^29.6.2" - "@jest/globals" "^29.6.2" - "@jest/source-map" "^29.6.0" - "@jest/test-result" "^29.6.2" - "@jest/transform" "^29.6.2" - "@jest/types" "^29.6.1" + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/globals" "^29.7.0" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^29.6.2" - jest-message-util "^29.6.2" - jest-mock "^29.6.2" - jest-regex-util "^29.4.3" - jest-resolve "^29.6.2" - jest-snapshot "^29.6.2" - jest-util "^29.6.2" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" slash "^3.0.0" strip-bom "^4.0.0" -jest-snapshot@^29.0.0: +jest-snapshot@^29.0.0, jest-snapshot@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== @@ -11294,32 +11326,6 @@ jest-snapshot@^29.0.0: pretty-format "^29.7.0" semver "^7.5.3" -jest-snapshot@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.6.2.tgz#9b431b561a83f2bdfe041e1cab8a6becdb01af9c" - integrity sha512-1OdjqvqmRdGNvWXr/YZHuyhh5DeaLp1p/F8Tht/MrMw4Kr1Uu/j4lRG+iKl1DAqUJDWxtQBMk41Lnf/JETYBRA== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-jsx" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.6.2" - "@jest/transform" "^29.6.2" - "@jest/types" "^29.6.1" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^29.6.2" - graceful-fs "^4.2.9" - jest-diff "^29.6.2" - jest-get-type "^29.4.3" - jest-matcher-utils "^29.6.2" - jest-message-util "^29.6.2" - jest-util "^29.6.2" - natural-compare "^1.4.0" - pretty-format "^29.6.2" - semver "^7.5.3" - jest-specific-snapshot@8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/jest-specific-snapshot/-/jest-specific-snapshot-8.0.0.tgz#c80af21dcd95b6c46b73f71618f887ef3825a44c" @@ -11339,17 +11345,17 @@ jest-util@^29.6.2, jest-util@^29.7.0: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.6.2.tgz#25d972af35b2415b83b1373baf1a47bb266c1082" - integrity sha512-vGz0yMN5fUFRRbpJDPwxMpgSXW1LDKROHfBopAvDcmD6s+B/s8WJrwi+4bfH4SdInBA5C3P3BI19dBtKzx1Arg== +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== dependencies: - "@jest/types" "^29.6.1" + "@jest/types" "^29.6.3" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^29.4.3" + jest-get-type "^29.6.3" leven "^3.1.0" - pretty-format "^29.6.2" + pretty-format "^29.7.0" jest-watch-typeahead@2.2.2: version "2.2.2" @@ -11364,7 +11370,7 @@ jest-watch-typeahead@2.2.2: string-length "^5.0.1" strip-ansi "^7.0.1" -jest-watcher@^29.0.0, jest-watcher@^29.6.2: +jest-watcher@^29.0.0: version "29.6.2" resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.6.2.tgz#77c224674f0620d9f6643c4cfca186d8893ca088" integrity sha512-GZitlqkMkhkefjfN/p3SJjrDaxPflqxEAv3/ik10OirZqJGYH5rPiIsgVcfof0Tdqg3shQGdEIxDBx+B4tuLzA== @@ -11378,15 +11384,19 @@ jest-watcher@^29.0.0, jest-watcher@^29.6.2: jest-util "^29.6.2" string-length "^4.0.1" -jest-worker@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.6.2.tgz#682fbc4b6856ad0aa122a5403c6d048b83f3fb44" - integrity sha512-l3ccBOabTdkng8I/ORCkADz4eSMKejTYv1vB/Z83UiubqhC1oQ5Li6dWCyqOIvSifGjUBxuvxvlm6KGK2DtuAQ== +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== dependencies: + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" - jest-util "^29.6.2" - merge-stream "^2.0.0" - supports-color "^8.0.0" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + emittery "^0.13.1" + jest-util "^29.7.0" + string-length "^4.0.1" jest-worker@^29.7.0: version "29.7.0" @@ -11398,15 +11408,15 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.5.0.tgz#f75157622f5ce7ad53028f2f8888ab53e1f1f24e" - integrity sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ== +jest@29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" + integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== dependencies: - "@jest/core" "^29.5.0" - "@jest/types" "^29.5.0" + "@jest/core" "^29.7.0" + "@jest/types" "^29.6.3" import-local "^3.0.2" - jest-cli "^29.5.0" + jest-cli "^29.7.0" jiti@1.17.1: version "1.17.1" @@ -12942,16 +12952,7 @@ pretty-format@^27.0.2: ansi-styles "^5.0.0" react-is "^17.0.1" -pretty-format@^29.0.0, pretty-format@^29.6.2: - version "29.6.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.6.2.tgz#3d5829261a8a4d89d8b9769064b29c50ed486a47" - integrity sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg== - dependencies: - "@jest/schemas" "^29.6.0" - ansi-styles "^5.0.0" - react-is "^18.0.0" - -pretty-format@^29.7.0: +pretty-format@^29.0.0, pretty-format@^29.6.2, pretty-format@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== From e02a2b22e06924c65d1be8db0784d502e5c4a9a7 Mon Sep 17 00:00:00 2001 From: Mohamed Khelif Date: Tue, 27 Feb 2024 12:59:05 -0500 Subject: [PATCH 05/15] v3.0.213 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 704e166cf6..5392916484 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spruce", - "version": "3.0.212", + "version": "3.0.213", "private": true, "scripts": { "bootstrap-logkeeper": "./scripts/bootstrap-logkeeper.sh", From 588a9a70068591f092e8ba1193715598e653ea86 Mon Sep 17 00:00:00 2001 From: Mohamed Khelif Date: Wed, 28 Feb 2024 12:16:41 -0500 Subject: [PATCH 06/15] DEVPROD-933 Trim trailing and ending whitespace for project settings fields (#2267) --- src/components/SpruceForm/customFormats.ts | 2 ++ src/components/SpruceForm/errors.ts | 5 +++++ src/gql/generated/types.ts | 2 ++ src/pages/projectSettings/index.tsx | 2 +- .../tabs/AccessTab/getFormSchema.ts | 1 + .../tabs/GeneralTab/getFormSchema.tsx | 4 ++++ .../tabs/GithubCommitQueueTab/getFormSchema.tsx | 2 ++ .../tabs/PatchAliasesTab/getFormSchema.tsx | 3 +++ .../tabs/PeriodicBuildsTab/getFormSchema.ts | 1 + .../tabs/PluginsTab/getFormSchema.tsx | 2 ++ .../tabs/ProjectTriggersTab/getFormSchema.tsx | 2 ++ .../tabs/VariablesTab/getFormSchema.ts | 1 + src/utils/validators/index.ts | 11 +++++++++++ src/utils/validators/validators.test.ts | 15 +++++++++++++++ 14 files changed, 52 insertions(+), 1 deletion(-) diff --git a/src/components/SpruceForm/customFormats.ts b/src/components/SpruceForm/customFormats.ts index 38e92f383e..a69ba68c83 100644 --- a/src/components/SpruceForm/customFormats.ts +++ b/src/components/SpruceForm/customFormats.ts @@ -6,6 +6,7 @@ const { validateJira, validateJiraURL, validateNoSpecialCharacters, + validateNoStartingOrTrailingWhitespace, validatePercentage, validateRegexp, validateSlack, @@ -17,6 +18,7 @@ export const customFormats = (jiraHost: string) => ({ noSpecialCharacters: validateNoSpecialCharacters, // Permit empty string but disallow whitespace noSpaces: /^$|^\S+$/, + noStartingOrTrailingWhitespace: validateNoStartingOrTrailingWhitespace, validDuration: validateDuration, validEmail: validateEmail, validJiraTicket: validateJira, diff --git a/src/components/SpruceForm/errors.ts b/src/components/SpruceForm/errors.ts index 3776466e6c..081f547c8d 100644 --- a/src/components/SpruceForm/errors.ts +++ b/src/components/SpruceForm/errors.ts @@ -62,6 +62,11 @@ export const transformErrors = (errors: AjvError[]) => ...error, message: "Value should not contain spaces.", }; + case "noStartingOrTrailingWhitespace": + return { + ...error, + message: "Value should not start or end with whitespace.", + }; case "validDuration": return { ...error, diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index ab69ebc38e..1da6c84f44 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -2949,6 +2949,7 @@ export type UserSettings = { region?: Maybe; slackMemberId?: Maybe; slackUsername?: Maybe; + timeFormat?: Maybe; timezone?: Maybe; useSpruceOptions?: Maybe; }; @@ -2964,6 +2965,7 @@ export type UserSettingsInput = { region?: InputMaybe; slackMemberId?: InputMaybe; slackUsername?: InputMaybe; + timeFormat?: InputMaybe; timezone?: InputMaybe; useSpruceOptions?: InputMaybe; }; diff --git a/src/pages/projectSettings/index.tsx b/src/pages/projectSettings/index.tsx index e788ab6e73..8770f50060 100644 --- a/src/pages/projectSettings/index.tsx +++ b/src/pages/projectSettings/index.tsx @@ -60,7 +60,7 @@ const ProjectSettings: React.FC = () => { projectData?.projectSettings?.projectRef?.repoRefId || identifier; // Assign project type in order to show/hide elements that should only appear for repos, attached projects, etc. - let projectType; + let projectType: ProjectType; if (isRepo) { projectType = ProjectType.Repo; } else if (projectData?.projectSettings?.projectRef?.repoRefId) { diff --git a/src/pages/projectSettings/tabs/AccessTab/getFormSchema.ts b/src/pages/projectSettings/tabs/AccessTab/getFormSchema.ts index c2adf28009..cf31f22a8b 100644 --- a/src/pages/projectSettings/tabs/AccessTab/getFormSchema.ts +++ b/src/pages/projectSettings/tabs/AccessTab/getFormSchema.ts @@ -38,6 +38,7 @@ export const getFormSchema = ( title: "Username", default: "", minLength: 1, + format: "noStartingOrTrailingWhitespace", }, }, }, diff --git a/src/pages/projectSettings/tabs/GeneralTab/getFormSchema.tsx b/src/pages/projectSettings/tabs/GeneralTab/getFormSchema.tsx index 78f2d550d9..c2a205432f 100644 --- a/src/pages/projectSettings/tabs/GeneralTab/getFormSchema.tsx +++ b/src/pages/projectSettings/tabs/GeneralTab/getFormSchema.tsx @@ -66,6 +66,7 @@ export const getFormSchema = ( branch: { type: "string" as "string", title: "Branch Name", + format: "noStartingOrTrailingWhitespace", }, }), other: { @@ -75,6 +76,7 @@ export const getFormSchema = ( displayName: { type: "string" as "string", title: "Display Name", + format: "noStartingOrTrailingWhitespace", }, ...(projectType !== ProjectType.Repo && { identifier: { @@ -96,10 +98,12 @@ export const getFormSchema = ( remotePath: { type: "string" as "string", title: "Config File", + format: "noStartingOrTrailingWhitespace", }, spawnHostScriptPath: { type: "string" as "string", title: "Spawn Host Script Path", + format: "noStartingOrTrailingWhitespace", }, versionControlEnabled: { type: ["boolean", "null"], diff --git a/src/pages/projectSettings/tabs/GithubCommitQueueTab/getFormSchema.tsx b/src/pages/projectSettings/tabs/GithubCommitQueueTab/getFormSchema.tsx index 47a10d42ea..339383628e 100644 --- a/src/pages/projectSettings/tabs/GithubCommitQueueTab/getFormSchema.tsx +++ b/src/pages/projectSettings/tabs/GithubCommitQueueTab/getFormSchema.tsx @@ -150,6 +150,7 @@ export const getFormSchema = ( title: "Username", default: "", minLength: 1, + format: "noStartingOrTrailingWhitespace", }, }, ), @@ -168,6 +169,7 @@ export const getFormSchema = ( title: "Team", default: "", minLength: 1, + format: "noStartingOrTrailingWhitespace", }, }, ), diff --git a/src/pages/projectSettings/tabs/PatchAliasesTab/getFormSchema.tsx b/src/pages/projectSettings/tabs/PatchAliasesTab/getFormSchema.tsx index a1ccbee974..24438dc0ab 100644 --- a/src/pages/projectSettings/tabs/PatchAliasesTab/getFormSchema.tsx +++ b/src/pages/projectSettings/tabs/PatchAliasesTab/getFormSchema.tsx @@ -46,16 +46,19 @@ export const getFormSchema = ( title: "Alias", default: "", minLength: 1, + format: "noStartingOrTrailingWhitespace", }, childProjectIdentifier: { type: "string" as "string", title: "Project", default: "", minLength: 1, + format: "noStartingOrTrailingWhitespace", }, parentAsModule: { type: "string" as "string", title: "Module", + format: "noStartingOrTrailingWhitespace", }, status: { type: "string" as "string", diff --git a/src/pages/projectSettings/tabs/PeriodicBuildsTab/getFormSchema.ts b/src/pages/projectSettings/tabs/PeriodicBuildsTab/getFormSchema.ts index 63fbdf2449..59eab08636 100644 --- a/src/pages/projectSettings/tabs/PeriodicBuildsTab/getFormSchema.ts +++ b/src/pages/projectSettings/tabs/PeriodicBuildsTab/getFormSchema.ts @@ -85,6 +85,7 @@ export const getFormSchema = ( title: "Config File", minLength: 1, default: "", + format: "noStartingOrTrailingWhitespace", }, alias: { type: "string" as "string", diff --git a/src/pages/projectSettings/tabs/PluginsTab/getFormSchema.tsx b/src/pages/projectSettings/tabs/PluginsTab/getFormSchema.tsx index d1bc7c337f..61417d3d51 100644 --- a/src/pages/projectSettings/tabs/PluginsTab/getFormSchema.tsx +++ b/src/pages/projectSettings/tabs/PluginsTab/getFormSchema.tsx @@ -126,6 +126,7 @@ export const getFormSchema = ( createProject: { type: "string" as "string", title: "", + format: "noStartingOrTrailingWhitespace", }, }, }, @@ -204,6 +205,7 @@ export const getFormSchema = ( default: "", minLength: 1, maxLength: 40, + format: "noStartingOrTrailingWhitespace", }, urlTemplate: { type: "string" as "string", diff --git a/src/pages/projectSettings/tabs/ProjectTriggersTab/getFormSchema.tsx b/src/pages/projectSettings/tabs/ProjectTriggersTab/getFormSchema.tsx index 9630b53ed3..c5307287b6 100644 --- a/src/pages/projectSettings/tabs/ProjectTriggersTab/getFormSchema.tsx +++ b/src/pages/projectSettings/tabs/ProjectTriggersTab/getFormSchema.tsx @@ -28,12 +28,14 @@ export const getFormSchema = ( title: "Project", default: "", minLength: 1, + format: "noStartingOrTrailingWhitespace", }, configFile: { type: "string" as "string", title: "Config File", default: "", minLength: 1, + format: "noStartingOrTrailingWhitespace", }, level: { type: "string" as "string", diff --git a/src/pages/projectSettings/tabs/VariablesTab/getFormSchema.ts b/src/pages/projectSettings/tabs/VariablesTab/getFormSchema.ts index 58f983cf66..fb4d89a821 100644 --- a/src/pages/projectSettings/tabs/VariablesTab/getFormSchema.ts +++ b/src/pages/projectSettings/tabs/VariablesTab/getFormSchema.ts @@ -24,6 +24,7 @@ export const getFormSchema = ( title: "Variable Name", default: "", minLength: 1, + format: "noStartingOrTrailingWhitespace", }, varValue: { type: "string" as "string", diff --git a/src/utils/validators/index.ts b/src/utils/validators/index.ts index 9def5f64c9..b426234186 100644 --- a/src/utils/validators/index.ts +++ b/src/utils/validators/index.ts @@ -144,6 +144,16 @@ const validateNoSpecialCharacters = (str: string): boolean => { return noSpecialCharacters.test(str); }; +/** + * `validateNoStartingOrTrailingWhitespace` tests if a provided string contains no starting or trailing whitespace + * @param str - The string to test. + * @returns - true if the string has no starting or trailing whitespace and false otherwise + */ +const validateNoStartingOrTrailingWhitespace = (str: string): boolean => { + const noStartingOrTrailingWhitespaceRegex = /^(?! ).*(? { }); }); +describe("validateNoStartingOrTrailingWhitespace", () => { + it("returns true if string has no starting or trailing whitespace", () => { + expect(validateNoStartingOrTrailingWhitespace("")).toBe(true); + expect(validateNoStartingOrTrailingWhitespace("a")).toBe(true); + expect(validateNoStartingOrTrailingWhitespace("helloworld")).toBe(true); + expect(validateNoStartingOrTrailingWhitespace(" helloWorld123")).toBe( + false, + ); + expect(validateNoStartingOrTrailingWhitespace("helloWorld123 ")).toBe( + false, + ); + }); +}); + describe("validateObjectId", () => { it("validates object ids", () => { expect(validateObjectId("5f74d99ab2373627c047c5e5")).toBeTruthy(); From d758dee6d2dcfb1a6a74724c41d2414a7cbeac5d Mon Sep 17 00:00:00 2001 From: Mohamed Khelif Date: Wed, 28 Feb 2024 13:04:07 -0500 Subject: [PATCH 07/15] DEVPROD-4950 Update containers onboarding copy (#2279) --- src/constants/externalResources.ts | 2 ++ .../tabs/ContainersTab/ContainersTab.tsx | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/constants/externalResources.ts b/src/constants/externalResources.ts index ce84472c08..f5cc3c933d 100644 --- a/src/constants/externalResources.ts +++ b/src/constants/externalResources.ts @@ -29,6 +29,8 @@ export const ignoredFilesDocumentationUrl = `${wikiBaseUrl}/Project-Configuratio export const cliDocumentationUrl = `${wikiBaseUrl}/CLI`; +export const containersOnboardingDocumentationUrl = `${wikiBaseUrl}/Containers/Container-Tasks`; + export const windowsPasswordRulesURL = "https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc786468(v=ws.10)?redirectedfrom=MSDN"; diff --git a/src/pages/projectSettings/tabs/ContainersTab/ContainersTab.tsx b/src/pages/projectSettings/tabs/ContainersTab/ContainersTab.tsx index aa36685c2d..edf94e2e32 100644 --- a/src/pages/projectSettings/tabs/ContainersTab/ContainersTab.tsx +++ b/src/pages/projectSettings/tabs/ContainersTab/ContainersTab.tsx @@ -1,5 +1,7 @@ import { useMemo } from "react"; import Banner from "@leafygreen-ui/banner"; +import { StyledLink } from "components/styles"; +import { containersOnboardingDocumentationUrl } from "constants/externalResources"; import { ProjectSettingsTabRoutes } from "constants/routes"; import { useSpruceConfig } from "hooks"; import { BaseTab } from "../BaseTab"; @@ -26,10 +28,13 @@ export const ContainersTab: React.FC = ({ return ( <> - Running tasks on containers is currently in beta, and is only available - to a select group of initial candidates. If you have any questions about - container tasks or are interested in exploring how this feature could - benefit your project, please reach out to us in #evergreen-users + We will not be implementing any new features or enhancements to our + existing container offerings, but will continue to provide maintenance + support for them. For more information on how to get started, please + refer to our{" "} + + container onboarding guide. + Date: Wed, 28 Feb 2024 13:33:36 -0500 Subject: [PATCH 08/15] v3.0.214 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5392916484..248f56c345 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spruce", - "version": "3.0.213", + "version": "3.0.214", "private": true, "scripts": { "bootstrap-logkeeper": "./scripts/bootstrap-logkeeper.sh", From d43ca82432a6eaa1819ce38be267733d6522a13d Mon Sep 17 00:00:00 2001 From: Zackary Santana <64446617+ZackarySantana@users.noreply.github.com> Date: Thu, 29 Feb 2024 10:22:55 -0500 Subject: [PATCH 09/15] DEVPROD-4166 Add breaking commits option in previous commits dropdown (#2254) --- src/analytics/task/useTaskAnalytics.ts | 4 +- src/gql/generated/types.ts | 2 + src/gql/queries/base-version-and-task.graphql | 1 + src/gql/queries/last-mainline-commit.graphql | 1 + src/pages/task/ActionButtons.tsx | 4 +- .../RelevantCommits.test.tsx} | 122 ++++++++++++++---- .../index.tsx | 59 +++++++-- .../actionButtons/RelevantCommits/types.ts | 16 +++ .../utils.ts | 14 +- .../actionButtons/previousCommits/types.ts | 9 -- 10 files changed, 179 insertions(+), 53 deletions(-) rename src/pages/task/actionButtons/{previousCommits/PreviousCommits.test.tsx => RelevantCommits/RelevantCommits.test.tsx} (79%) rename src/pages/task/actionButtons/{previousCommits => RelevantCommits}/index.tsx (71%) create mode 100644 src/pages/task/actionButtons/RelevantCommits/types.ts rename src/pages/task/actionButtons/{previousCommits => RelevantCommits}/utils.ts (82%) delete mode 100644 src/pages/task/actionButtons/previousCommits/types.ts diff --git a/src/analytics/task/useTaskAnalytics.ts b/src/analytics/task/useTaskAnalytics.ts index 29011dd6d3..a68225c558 100644 --- a/src/analytics/task/useTaskAnalytics.ts +++ b/src/analytics/task/useTaskAnalytics.ts @@ -10,7 +10,7 @@ import { } from "gql/generated/types"; import { TASK } from "gql/queries"; import { useQueryParam } from "hooks/useQueryParam"; -import { CommitType } from "pages/task/actionButtons/previousCommits/types"; +import { CommitType } from "pages/task/actionButtons/RelevantCommits/types"; import { RequiredQueryParams, LogTypes } from "types/task"; type LogViewer = "raw" | "html" | "parsley"; @@ -70,7 +70,7 @@ type Action = | { name: "Click Last Failing Stepback Task Link" } | { name: "Click Previous Stepback Task Link" } | { name: "Click Next Stepback Task Link" } - | { name: "Submit Previous Commit Selector"; type: CommitType }; + | { name: "Submit Relevant Commit Selector"; type: CommitType }; export const useTaskAnalytics = () => { const { id } = useParams<{ id: string }>(); diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index 1da6c84f44..bc6a8b8af2 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -5409,6 +5409,7 @@ export type BaseVersionAndTaskQuery = { execution: number; id: string; projectIdentifier?: string | null; + status: string; baseTask?: { __typename?: "Task"; execution: number; @@ -6173,6 +6174,7 @@ export type LastMainlineCommitQuery = { __typename?: "Task"; execution: number; id: string; + order: number; status: string; } | null> | null; } | null> | null; diff --git a/src/gql/queries/base-version-and-task.graphql b/src/gql/queries/base-version-and-task.graphql index 3452491b5e..1371d48913 100644 --- a/src/gql/queries/base-version-and-task.graphql +++ b/src/gql/queries/base-version-and-task.graphql @@ -10,6 +10,7 @@ query BaseVersionAndTask($taskId: String!) { execution id projectIdentifier + status versionMetadata { baseVersion { id diff --git a/src/gql/queries/last-mainline-commit.graphql b/src/gql/queries/last-mainline-commit.graphql index ef6daa28ac..098e78d78f 100644 --- a/src/gql/queries/last-mainline-commit.graphql +++ b/src/gql/queries/last-mainline-commit.graphql @@ -18,6 +18,7 @@ query LastMainlineCommit( tasks { execution id + order status } } diff --git a/src/pages/task/ActionButtons.tsx b/src/pages/task/ActionButtons.tsx index 776fb9848b..48b7592925 100644 --- a/src/pages/task/ActionButtons.tsx +++ b/src/pages/task/ActionButtons.tsx @@ -38,7 +38,7 @@ import { import { useLGButtonRouterLink } from "hooks/useLGButtonRouterLink"; import { useQueryParam } from "hooks/useQueryParam"; import { TaskStatus } from "types/task"; -import { PreviousCommits } from "./actionButtons/previousCommits"; +import { RelevantCommits } from "./actionButtons/RelevantCommits"; import { TaskNotificationModal } from "./actionButtons/TaskNotificationModal"; interface Props { @@ -254,7 +254,7 @@ export const ActionButtons: React.FC = ({ {!isExecutionTask && ( <> - + } > - No previous versions available. + No relevant versions available. ) : ( } size={Size.Small}> - Previous commits + Relevant commits } > @@ -148,7 +174,7 @@ export const PreviousCommits: React.FC = ({ taskId }) => { disabled={parentLoading} onClick={() => sendEvent({ - name: "Submit Previous Commit Selector", + name: "Submit Relevant Commit Selector", type: CommitType.Base, }) } @@ -156,12 +182,25 @@ export const PreviousCommits: React.FC = ({ taskId }) => { > Go to {versionMetadata?.isPatch ? "base" : "previous"} commit + + sendEvent({ + name: "Submit Relevant Commit Selector", + type: CommitType.Breaking, + }) + } + to={linkObject[CommitType.Breaking]} + > + Go to breaking commit + sendEvent({ - name: "Submit Previous Commit Selector", + name: "Submit Relevant Commit Selector", type: CommitType.LastPassing, }) } @@ -174,7 +213,7 @@ export const PreviousCommits: React.FC = ({ taskId }) => { disabled={executedLoading} onClick={() => sendEvent({ - name: "Submit Previous Commit Selector", + name: "Submit Relevant Commit Selector", type: CommitType.LastExecuted, }) } diff --git a/src/pages/task/actionButtons/RelevantCommits/types.ts b/src/pages/task/actionButtons/RelevantCommits/types.ts new file mode 100644 index 0000000000..15e5cce2a5 --- /dev/null +++ b/src/pages/task/actionButtons/RelevantCommits/types.ts @@ -0,0 +1,16 @@ +import { + BaseVersionAndTaskQuery, + LastMainlineCommitQuery, +} from "gql/generated/types"; + +export enum CommitType { + Base = "base", + LastPassing = "lastPassing", + Breaking = "breaking", + LastExecuted = "lastExecuted", +} + +export type BaseTask = BaseVersionAndTaskQuery["task"]["baseTask"]; + +export type CommitTask = + LastMainlineCommitQuery["mainlineCommits"]["versions"][number]["version"]["buildVariants"][number]["tasks"][number]; diff --git a/src/pages/task/actionButtons/previousCommits/utils.ts b/src/pages/task/actionButtons/RelevantCommits/utils.ts similarity index 82% rename from src/pages/task/actionButtons/previousCommits/utils.ts rename to src/pages/task/actionButtons/RelevantCommits/utils.ts index fa2b2510b3..a18f0770c3 100644 --- a/src/pages/task/actionButtons/previousCommits/utils.ts +++ b/src/pages/task/actionButtons/RelevantCommits/utils.ts @@ -1,23 +1,26 @@ import { getTaskRoute } from "constants/routes"; import { LastMainlineCommitQuery } from "gql/generated/types"; import { reportError } from "utils/errorReporting"; -import { CommitTask, CommitType } from "./types"; +import { BaseTask, CommitTask, CommitType } from "./types"; // a link cannot be null, so it's common to use # as a substitute. const nullLink = "#"; export const getLinks = ({ + breakingTask, lastExecutedTask, lastPassingTask, parentTask, }: { - lastExecutedTask: CommitTask; - lastPassingTask: CommitTask; - parentTask: CommitTask; + breakingTask: BaseTask; + lastExecutedTask: BaseTask; + lastPassingTask: BaseTask; + parentTask: BaseTask; }) => { if (!parentTask) { return { [CommitType.Base]: nullLink, + [CommitType.Breaking]: nullLink, [CommitType.LastPassing]: nullLink, [CommitType.LastExecuted]: nullLink, }; @@ -25,6 +28,9 @@ export const getLinks = ({ return { [CommitType.Base]: getTaskRoute(parentTask.id), + [CommitType.Breaking]: breakingTask + ? getTaskRoute(breakingTask.id) + : nullLink, [CommitType.LastPassing]: getTaskRoute( lastPassingTask?.id || parentTask.id, ), diff --git a/src/pages/task/actionButtons/previousCommits/types.ts b/src/pages/task/actionButtons/previousCommits/types.ts deleted file mode 100644 index 2e1f5c629b..0000000000 --- a/src/pages/task/actionButtons/previousCommits/types.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { BaseVersionAndTaskQuery } from "gql/generated/types"; - -export enum CommitType { - Base = "base", - LastPassing = "lastPassing", - LastExecuted = "lastExecuted", -} - -export type CommitTask = BaseVersionAndTaskQuery["task"]["baseTask"]; From aca2e80d9825d23481a6d66e2a5bb1f7ecaf7eac Mon Sep 17 00:00:00 2001 From: Chaya Malik Date: Thu, 29 Feb 2024 10:28:11 -0500 Subject: [PATCH 10/15] v3.0.215 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 248f56c345..3abd320490 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spruce", - "version": "3.0.214", + "version": "3.0.215", "private": true, "scripts": { "bootstrap-logkeeper": "./scripts/bootstrap-logkeeper.sh", From d5c630347001be8daa6166ce7c71ea9c67b88049 Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Thu, 29 Feb 2024 11:58:53 -0500 Subject: [PATCH 11/15] DEVPROD-838: Add user time format preference (#2280) --- src/components/Header/UserDropdown.tsx | 2 +- .../SpruceForm/Widgets/LeafyGreenWidgets.tsx | 17 ++++-- .../SpruceForm.stories.storyshot | 1 + src/constants/fieldMaps.ts | 15 ++---- src/gql/generated/types.ts | 1 + src/gql/queries/user-settings.graphql | 1 + src/hooks/useDateFormat.ts | 3 +- .../preferencesTabs/ProfileTab.tsx | 52 +++++++++++++++++-- .../GithubCommitQueueTab/getFormSchema.tsx | 1 + .../tabs/ViewsAndFiltersTab/getFormSchema.ts | 1 + src/utils/string/index.ts | 16 ++++-- src/utils/string/string.test.ts | 19 +++++++ 12 files changed, 103 insertions(+), 26 deletions(-) diff --git a/src/components/Header/UserDropdown.tsx b/src/components/Header/UserDropdown.tsx index 2ead04aca1..d63301c51b 100644 --- a/src/components/Header/UserDropdown.tsx +++ b/src/components/Header/UserDropdown.tsx @@ -33,7 +33,7 @@ export const UserDropdown = () => { }, ]; if (permissions?.canEditAdminSettings) { - menuItems.splice(1, 0, { + menuItems.splice(2, 0, { "data-cy": "admin-link", text: "Admin", href: adminSettingsURL, diff --git a/src/components/SpruceForm/Widgets/LeafyGreenWidgets.tsx b/src/components/SpruceForm/Widgets/LeafyGreenWidgets.tsx index 20fbe51099..3f6be8e1f2 100644 --- a/src/components/SpruceForm/Widgets/LeafyGreenWidgets.tsx +++ b/src/components/SpruceForm/Widgets/LeafyGreenWidgets.tsx @@ -211,6 +211,7 @@ export const LeafyGreenSelect: React.FC< export const LeafyGreenRadio: React.FC = ({ disabled, + id, label, onChange, options, @@ -224,11 +225,17 @@ export const LeafyGreenRadio: React.FC = ({ } = options; return ( + {label && ( + + + + )} onChange(e.target.value)} - data-cy={dataCy} + value={value} > {enumOptions.map((o) => { const optionDisabled = enumDisabled?.includes(o.value) ?? false; @@ -275,12 +282,12 @@ export const LeafyGreenRadioBox: React.FC< return ( {showLabel !== false && ( - + {description && {description}} - + )} {!!errors && ( @@ -320,7 +327,7 @@ const StyledBanner = styled(Banner)` margin-bottom: ${size.s}; `; -const RadioBoxLabelContainer = styled.div` +const LabelContainer = styled.div` margin-bottom: ${size.xs}; `; diff --git a/src/components/SpruceForm/__snapshots__/SpruceForm.stories.storyshot b/src/components/SpruceForm/__snapshots__/SpruceForm.stories.storyshot index f7b5501ecb..dc3c20a9bf 100644 --- a/src/components/SpruceForm/__snapshots__/SpruceForm.stories.storyshot +++ b/src/components/SpruceForm/__snapshots__/SpruceForm.stories.storyshot @@ -589,6 +589,7 @@ exports[`Snapshot Tests SpruceForm.stories Example2 1`] = `
({ - value: format, - str: `${format} - ${getDateCopy("08/31/2022", { - dateFormat: format, - dateOnly: true, - })}`, -})); +export enum TimeFormat { + TwelveHour = "h:mm:ss aa", + TwentyFourHour = "H:mm:ss", +} export const notificationFields = { patchFinish: "Patch finish", diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index bc6a8b8af2..da25867e93 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -8724,6 +8724,7 @@ export type UserSettingsQuery = { region?: string | null; slackMemberId?: string | null; slackUsername?: string | null; + timeFormat?: string | null; timezone?: string | null; githubUser?: { __typename?: "GithubUser"; diff --git a/src/gql/queries/user-settings.graphql b/src/gql/queries/user-settings.graphql index 6dbaa71043..bacf7059e6 100644 --- a/src/gql/queries/user-settings.graphql +++ b/src/gql/queries/user-settings.graphql @@ -15,6 +15,7 @@ query UserSettings { region slackMemberId slackUsername + timeFormat timezone useSpruceOptions { hasUsedMainlineCommitsBefore diff --git a/src/hooks/useDateFormat.ts b/src/hooks/useDateFormat.ts index 1955c86366..4e63aa11fc 100644 --- a/src/hooks/useDateFormat.ts +++ b/src/hooks/useDateFormat.ts @@ -5,12 +5,13 @@ import { useUserTimeZone } from "./useUserTimeZone"; export const useDateFormat = () => { const timezone = useUserTimeZone(); const { userSettings } = useUserSettings(); - const { dateFormat } = userSettings || {}; + const { dateFormat, timeFormat } = userSettings || {}; return (date: string | number | Date, options: DateCopyOptions = {}) => getDateCopy(date, { tz: timezone, dateFormat, + timeFormat, ...options, }); }; diff --git a/src/pages/preferences/preferencesTabs/ProfileTab.tsx b/src/pages/preferences/preferencesTabs/ProfileTab.tsx index 26313f1164..f9eb529aa3 100644 --- a/src/pages/preferences/preferencesTabs/ProfileTab.tsx +++ b/src/pages/preferences/preferencesTabs/ProfileTab.tsx @@ -6,7 +6,11 @@ import { Skeleton } from "antd"; import { usePreferencesAnalytics } from "analytics"; import { SettingsCard } from "components/SettingsCard"; import { SpruceForm } from "components/SpruceForm"; -import { timeZones, dateFormats } from "constants/fieldMaps"; +import { + listOfDateFormatStrings, + timeZones, + TimeFormat, +} from "constants/fieldMaps"; import { useToastContext } from "context/toast"; import { UpdateUserSettingsMutation, @@ -16,15 +20,30 @@ import { import { UPDATE_USER_SETTINGS } from "gql/mutations"; import { AWS_REGIONS } from "gql/queries"; import { useUserSettings } from "hooks"; -import { omitTypename } from "utils/string"; +import { getDateCopy, omitTypename } from "utils/string"; + +const dateFormats = listOfDateFormatStrings.map((format) => ({ + value: format, + str: `${format} - ${getDateCopy("08/31/2022", { + dateFormat: format, + dateOnly: true, + })}`, +})); export const ProfileTab: React.FC = () => { const { sendEvent } = usePreferencesAnalytics(); const dispatchToast = useToastContext(); const { loading, userSettings } = useUserSettings(); - const { dateFormat, githubUser, region, timezone } = userSettings ?? {}; + const { + dateFormat, + githubUser, + region, + timeFormat: dbTimeFormat, + timezone, + } = userSettings ?? {}; const lastKnownAs = githubUser?.lastKnownAs || ""; + const timeFormat = dbTimeFormat || TimeFormat.TwelveHour; const { data: awsRegionData, loading: awsRegionLoading } = useQuery(AWS_REGIONS); @@ -49,11 +68,13 @@ export const ProfileTab: React.FC = () => { region: string; githubUser: { lastKnownAs?: string }; dateFormat: string; + timeFormat: string; }>({ timezone, region, githubUser: { lastKnownAs }, dateFormat, + timeFormat, }); useEffect(() => { @@ -62,8 +83,9 @@ export const ProfileTab: React.FC = () => { timezone, region, dateFormat, + timeFormat, }); - }, [dateFormat, githubUser, region, timezone]); + }, [dateFormat, githubUser, region, timeFormat, timezone]); const handleSubmit = () => { updateUserSettings({ @@ -111,6 +133,9 @@ export const ProfileTab: React.FC = () => { dateFormat: { "ui:placeholder": "Select a date format", }, + timeFormat: { + "ui:widget": "radio", + }, }} schema={{ properties: { @@ -150,6 +175,25 @@ export const ProfileTab: React.FC = () => { })), ], }, + timeFormat: { + type: "string", + title: "Time Format", + oneOf: [ + { + type: "string" as "string", + title: "12-hour clock", + description: "Display time with AM/PM, e.g. 12:34 PM", + enum: [TimeFormat.TwelveHour], + }, + + { + type: "string" as "string", + title: "24-hour clock", + description: "Use 24-hour notation, e.g. 13:34", + enum: [TimeFormat.TwentyFourHour], + }, + ], + }, }, }} /> diff --git a/src/pages/projectSettings/tabs/GithubCommitQueueTab/getFormSchema.tsx b/src/pages/projectSettings/tabs/GithubCommitQueueTab/getFormSchema.tsx index 339383628e..339c68ebd6 100644 --- a/src/pages/projectSettings/tabs/GithubCommitQueueTab/getFormSchema.tsx +++ b/src/pages/projectSettings/tabs/GithubCommitQueueTab/getFormSchema.tsx @@ -225,6 +225,7 @@ export const getFormSchema = ( properties: { mergeQueue: { type: "string" as "string", + title: "", oneOf: [ { type: "string" as "string", diff --git a/src/pages/projectSettings/tabs/ViewsAndFiltersTab/getFormSchema.ts b/src/pages/projectSettings/tabs/ViewsAndFiltersTab/getFormSchema.ts index 9e7ff85cb1..54d9512cca 100644 --- a/src/pages/projectSettings/tabs/ViewsAndFiltersTab/getFormSchema.ts +++ b/src/pages/projectSettings/tabs/ViewsAndFiltersTab/getFormSchema.ts @@ -73,6 +73,7 @@ export const getFormSchema = ( properties: { projectHealthView: { type: "string" as "string", + title: "", oneOf: [ { type: "string" as "string", diff --git a/src/utils/string/index.ts b/src/utils/string/index.ts index c2c7146177..8781676286 100644 --- a/src/utils/string/index.ts +++ b/src/utils/string/index.ts @@ -1,5 +1,6 @@ import { format, utcToZonedTime } from "date-fns-tz"; import get from "lodash/get"; +import { TimeFormat } from "constants/fieldMaps"; export { githubPRLinkify } from "./githubPRLinkify"; @@ -100,6 +101,7 @@ export type DateCopyOptions = { omitSeconds?: boolean; omitTimezone?: boolean; dateFormat?: string; + timeFormat?: string; }; /** @@ -111,7 +113,7 @@ export type DateCopyOptions = { * @param options.omitSeconds - if true, will not return the seconds * @param options.omitTimezone - if true, will not return the timezone * @param options.dateFormat - a date format string, such as "MMM d, yyyy" - * @returns - a string representing the date in the format of "MMM d, yyyy h:mm:ss a z" + * @returns - a string representing the date in either the user's specified format or the default, "MMM d, yyyy h:mm:ss aa z" */ export const getDateCopy = ( time: string | number | Date, @@ -121,15 +123,19 @@ export const getDateCopy = ( return ""; } const { dateOnly, omitSeconds, omitTimezone, tz } = options || {}; - let { dateFormat } = options || {}; + let { dateFormat, timeFormat } = options || {}; if (!dateFormat) { dateFormat = "MMM d, yyyy"; } + if (!timeFormat) { + timeFormat = TimeFormat.TwelveHour; + } + if (omitSeconds) { + timeFormat = timeFormat.replace(":ss", ""); + } const finalDateFormat = dateOnly ? dateFormat - : `${dateFormat}, h:mm${omitSeconds ? "" : ":ss"} aa${ - omitTimezone ? "" : " z" - }`; + : `${dateFormat}, ${timeFormat}${omitTimezone ? "" : " z"}`; if (tz) { return format(utcToZonedTime(time, tz), finalDateFormat, { timeZone: tz, diff --git a/src/utils/string/string.test.ts b/src/utils/string/string.test.ts index d3ab32b7fd..bc90a0898e 100644 --- a/src/utils/string/string.test.ts +++ b/src/utils/string/string.test.ts @@ -1,3 +1,4 @@ +import { TimeFormat } from "constants/fieldMaps"; import { msToDuration, sortFunctionDate, @@ -292,7 +293,25 @@ describe("getDateCopy", () => { getDateCopy("08/31/1996", { dateFormat: "MM/dd/yyyy", dateOnly: true }), ).toBe("08/31/1996"); }); + + it("returns dates with a custom time format when supplied with the option", () => { + expect( + getDateCopy(new Date("2020-11-16T22:17:29z"), { + omitTimezone: true, + timeFormat: TimeFormat.TwentyFourHour, + }), + ).toBe("Nov 16, 2020, 22:17:29"); + + expect( + getDateCopy(new Date("2020-11-16T22:17:29z"), { + omitSeconds: true, + omitTimezone: true, + timeFormat: TimeFormat.TwelveHour, + }), + ).toBe("Nov 16, 2020, 10:17 PM"); + }); }); + describe("applyStrictRegex", () => { it("converts string to strict regex", () => { expect(applyStrictRegex("dog")).toBe("^dog$"); From 1512372d1a658f5e80037e19e1d8a610a315b557 Mon Sep 17 00:00:00 2001 From: "annie.black" Date: Fri, 1 Mar 2024 09:57:40 -0500 Subject: [PATCH 12/15] v3.0.216 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3abd320490..9176989332 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spruce", - "version": "3.0.215", + "version": "3.0.216", "private": true, "scripts": { "bootstrap-logkeeper": "./scripts/bootstrap-logkeeper.sh", From 74a3441172ccbc518b7b2962b7bdce6be46708c2 Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Fri, 1 Mar 2024 12:25:31 -0500 Subject: [PATCH 13/15] DEVPROD-3495: Fix flaky git tag test (#2283) --- cypress/integration/projectSettings/not_defaulting_to_repo.ts | 1 + src/gql/generated/types.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/cypress/integration/projectSettings/not_defaulting_to_repo.ts b/cypress/integration/projectSettings/not_defaulting_to_repo.ts index 765bfec3df..8a2b372e85 100644 --- a/cypress/integration/projectSettings/not_defaulting_to_repo.ts +++ b/cypress/integration/projectSettings/not_defaulting_to_repo.ts @@ -119,6 +119,7 @@ describe("Project Settings when not defaulting to repo", () => { cy.dataCy("var-name-input").should("not.exist"); // Verify persistence cy.reload(); + saveButtonEnabled(false); cy.dataCy("var-name-input").should("not.exist"); }); }); diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index da25867e93..769810448e 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -2910,6 +2910,7 @@ export type User = { __typename?: "User"; displayName: Scalars["String"]["output"]; emailAddress: Scalars["String"]["output"]; + parsleyFilters: Array; patches: Patches; permissions: Permissions; subscriptions?: Maybe>; From d61ec20c5f9a7d92dd10d5754c60b595d2eb68aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 16:20:28 -0500 Subject: [PATCH 14/15] CHORE(NPM) - bump @leafygreen-ui/segmented-control from 8.2.6 to 8.2.8 (#2278) --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 9176989332..60adf2a5c1 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@leafygreen-ui/radio-box-group": "12.0.16", "@leafygreen-ui/radio-group": "10.2.4", "@leafygreen-ui/search-input": "2.0.8", - "@leafygreen-ui/segmented-control": "8.2.6", + "@leafygreen-ui/segmented-control": "8.2.8", "@leafygreen-ui/select": "11.1.1", "@leafygreen-ui/side-nav": "14.1.0", "@leafygreen-ui/skeleton-loader": "1.1.0", diff --git a/yarn.lock b/yarn.lock index e92bf7da9e..a57cf18f0f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3865,19 +3865,19 @@ lodash "^4.17.21" polished "^4.2.2" -"@leafygreen-ui/segmented-control@8.2.6": - version "8.2.6" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/segmented-control/-/segmented-control-8.2.6.tgz#9f64c2fcbfcd7c15c8192f3d0575b1dbcbe2f733" - integrity sha512-s1/K0pY2YW90Dh7sMst4xuUYQqIW1LWFQyoqpDyjVZV8RuqQbYq9BzTSNkrb3njq6JpHGOhmvT7wFrqoMljMvw== +"@leafygreen-ui/segmented-control@8.2.8": + version "8.2.8" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/segmented-control/-/segmented-control-8.2.8.tgz#1b86bff983acdd3bf31a3fa9f8ba09770919ae73" + integrity sha512-81fJMvox7HBRMgErE3YZ0IBSRY5ge99LTjtBHBLz1GiAJKwX9Wa3QboVOuHQAdj0vj/RFW7D9qE7QY1klfZJEA== dependencies: "@leafygreen-ui/box" "^3.1.8" "@leafygreen-ui/emotion" "^4.0.7" "@leafygreen-ui/hooks" "^8.0.0" "@leafygreen-ui/icon" "^11.23.0" - "@leafygreen-ui/lib" "^11.0.0" + "@leafygreen-ui/lib" "^13.0.0" "@leafygreen-ui/palette" "^4.0.7" "@leafygreen-ui/tokens" "^2.2.0" - "@leafygreen-ui/typography" "^17.0.0" + "@leafygreen-ui/typography" "^18.0.0" lodash "^4.17.21" polished "^4.2.2" From c783b5a4e41532c0dc18b8ae41fd20d61eb56d97 Mon Sep 17 00:00:00 2001 From: minnakt <47064971+minnakt@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:08:50 -0500 Subject: [PATCH 15/15] DEVPROD-787: Retry Node installation on CI (#2281) --- .evergreen.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.evergreen.yml b/.evergreen.yml index f9b89007c9..b58677eab8 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -109,7 +109,13 @@ functions: [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" cd - - nvm install --no-progress --default ${node_version} + # Retry the download for Node in case it flakes. + for i in {1..5}; do + nvm install --no-progress --default ${node_version} + [[ $? -eq 0 ]] && break + echo "Attempt $i of 5 to install Node failed" + sleep 10 + done npm install -g yarn run-make-background: