From 78e3b13aee4dfe814870bd2a08ea94e0d7920c67 Mon Sep 17 00:00:00 2001 From: nmanu1 <88398086+nmanu1@users.noreply.github.com> Date: Thu, 13 Jan 2022 11:15:01 -0500 Subject: [PATCH 01/22] Update headless version (#100) Update version of answers-headless and make new beta version of headless-react. --- THIRD-PARTY-NOTICES | 2 +- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 943ab5f..d7d9077 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.0.0 + - @yext/answers-headless@1.1.0-beta.0 This package contains the following license and notice below: diff --git a/package-lock.json b/package-lock.json index a8e6b9e..331302e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@yext/answers-headless-react", - "version": "1.0.1", + "version": "1.1.0-beta.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.0.1", + "version": "1.1.0-beta.0", "dependencies": { - "@yext/answers-headless": "^1.0.0" + "@yext/answers-headless": "^1.1.0-beta.0" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3496,9 +3496,9 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.0.0.tgz", - "integrity": "sha512-zm77HQ/29eq7Wz7oQcuoozKLtyJrCCcQGGNZp8QhFv6AkX3YLue9qjD2b1hRJltEQCCDOAk4wYrx/VkNC7KQ4Q==", + "version": "1.1.0-beta.0", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.0.tgz", + "integrity": "sha512-SoT6iUZPaGFimGORuzirwpOXX/ItJhTUpD7kfX80P2j3KfCyKFOvC/HCZ+ZKPsutExADHj25V3iyoVd/OcuF6A==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", "@yext/answers-core": "^1.5.0", @@ -13958,9 +13958,9 @@ } }, "@yext/answers-headless": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.0.0.tgz", - "integrity": "sha512-zm77HQ/29eq7Wz7oQcuoozKLtyJrCCcQGGNZp8QhFv6AkX3YLue9qjD2b1hRJltEQCCDOAk4wYrx/VkNC7KQ4Q==", + "version": "1.1.0-beta.0", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.0.tgz", + "integrity": "sha512-SoT6iUZPaGFimGORuzirwpOXX/ItJhTUpD7kfX80P2j3KfCyKFOvC/HCZ+ZKPsutExADHj25V3iyoVd/OcuF6A==", "requires": { "@reduxjs/toolkit": "^1.7.0", "@yext/answers-core": "^1.5.0", diff --git a/package.json b/package.json index c360f73..bd7e122 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.0.1", + "version": "1.1.0-beta.0", "types": "./lib/index.d.ts", "main": "./lib/index.js", "module": "./lib/index.js", @@ -15,7 +15,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.0.0" + "@yext/answers-headless": "^1.1.0-beta.0" }, "devDependencies": { "@babel/preset-env": "^7.16.5", From 5f066b71a31e2f21be8f293dd488b94ed37ce057 Mon Sep 17 00:00:00 2001 From: nmanu1 <88398086+nmanu1@users.noreply.github.com> Date: Tue, 18 Jan 2022 15:56:28 -0500 Subject: [PATCH 02/22] Update headless version (#101) --- THIRD-PARTY-NOTICES | 4 ++-- package-lock.json | 34 +++++++++++++++++----------------- package.json | 4 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index d7d9077..7536ab8 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -62,7 +62,7 @@ SOFTWARE. The following NPM package may be included in this product: - - @yext/answers-core@1.5.0 + - @yext/answers-core@1.6.0-beta.0 This package contains the following license and notice below: @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.0 + - @yext/answers-headless@1.1.0-beta.1 This package contains the following license and notice below: diff --git a/package-lock.json b/package-lock.json index 331302e..9e527b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.0", + "version": "1.1.0-beta.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.0", + "version": "1.1.0-beta.1", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.0" + "@yext/answers-headless": "^1.1.0-beta.1" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3484,9 +3484,9 @@ } }, "node_modules/@yext/answers-core": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.5.0.tgz", - "integrity": "sha512-Z5xj7dwE6U0ItUV859va5x3FQ9p3tdLIyt2QfkYnFIAhsrTn9zCo95wUWBypO8ERpOW7buNTlavVZovW1pmqJQ==", + "version": "1.6.0-beta.0", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.0.tgz", + "integrity": "sha512-nT3pkdFRfTlxQwke1X/XZxF4RqRKG2Mb1Pc3abZ3W9wrCtNw1qYXs0TYOA0zki1EiEaX94GzUiFI00gcxgxWNQ==", "dependencies": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.4" @@ -3496,12 +3496,12 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.0", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.0.tgz", - "integrity": "sha512-SoT6iUZPaGFimGORuzirwpOXX/ItJhTUpD7kfX80P2j3KfCyKFOvC/HCZ+ZKPsutExADHj25V3iyoVd/OcuF6A==", + "version": "1.1.0-beta.1", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.1.tgz", + "integrity": "sha512-y7UZi/wKQ9ymQNDAyFGKhmfJJsAkZQx6owleCsqBt/KnNnbvzTFsa/aPQuLJUzmThFwmvQxQEesDqMKU1Hdc6Q==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.5.0", + "@yext/answers-core": "^1.6.0-beta.0", "js-levenshtein": "^1.1.6", "redux-thunk": "^2.4.1" } @@ -13949,21 +13949,21 @@ "dev": true }, "@yext/answers-core": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.5.0.tgz", - "integrity": "sha512-Z5xj7dwE6U0ItUV859va5x3FQ9p3tdLIyt2QfkYnFIAhsrTn9zCo95wUWBypO8ERpOW7buNTlavVZovW1pmqJQ==", + "version": "1.6.0-beta.0", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.0.tgz", + "integrity": "sha512-nT3pkdFRfTlxQwke1X/XZxF4RqRKG2Mb1Pc3abZ3W9wrCtNw1qYXs0TYOA0zki1EiEaX94GzUiFI00gcxgxWNQ==", "requires": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.4" } }, "@yext/answers-headless": { - "version": "1.1.0-beta.0", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.0.tgz", - "integrity": "sha512-SoT6iUZPaGFimGORuzirwpOXX/ItJhTUpD7kfX80P2j3KfCyKFOvC/HCZ+ZKPsutExADHj25V3iyoVd/OcuF6A==", + "version": "1.1.0-beta.1", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.1.tgz", + "integrity": "sha512-y7UZi/wKQ9ymQNDAyFGKhmfJJsAkZQx6owleCsqBt/KnNnbvzTFsa/aPQuLJUzmThFwmvQxQEesDqMKU1Hdc6Q==", "requires": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.5.0", + "@yext/answers-core": "^1.6.0-beta.0", "js-levenshtein": "^1.1.6", "redux-thunk": "^2.4.1" } diff --git a/package.json b/package.json index bd7e122..cf7a18d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.0", + "version": "1.1.0-beta.1", "types": "./lib/index.d.ts", "main": "./lib/index.js", "module": "./lib/index.js", @@ -15,7 +15,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.0" + "@yext/answers-headless": "^1.1.0-beta.1" }, "devDependencies": { "@babel/preset-env": "^7.16.5", From 39095fac8e51b972059f94c4b1c67c8de9513579 Mon Sep 17 00:00:00 2001 From: nmanu1 <88398086+nmanu1@users.noreply.github.com> Date: Tue, 1 Feb 2022 11:42:14 -0500 Subject: [PATCH 03/22] Update headless version (#102) --- THIRD-PARTY-NOTICES | 69 ++++++++++++++++++++++++-- package-lock.json | 116 ++++++++++++++++++++++++++++++++------------ package.json | 4 +- 3 files changed, 152 insertions(+), 37 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 7536ab8..696927b 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -62,7 +62,7 @@ SOFTWARE. The following NPM package may be included in this product: - - @yext/answers-core@1.6.0-beta.0 + - @yext/answers-core@1.6.0-beta.1 This package contains the following license and notice below: @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.1 + - @yext/answers-headless@1.1.0-beta.2 This package contains the following license and notice below: @@ -169,7 +169,7 @@ THE SOFTWARE. The following NPM package may be included in this product: - - cross-fetch@3.1.4 + - cross-fetch@3.1.5 This package contains the following license and notice below: @@ -319,7 +319,7 @@ THE SOFTWARE. The following NPM package may be included in this product: - - node-fetch@2.6.1 + - node-fetch@2.6.7 This package contains the following license and notice below: @@ -527,4 +527,65 @@ SOFTWARE. ----------- +The following NPM package may be included in this product: + + - tr46@0.0.3 + +This package contains the following license and notice below: + +(MIT) + +----------- + +The following NPM package may be included in this product: + + - webidl-conversions@3.0.1 + +This package contains the following license and notice below: + +# The BSD 2-Clause License + +Copyright (c) 2014, Domenic Denicola +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +----------- + +The following NPM package may be included in this product: + + - whatwg-url@5.0.0 + +This package contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2015–2016 Sebastian Mayr + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----------- + This file was generated with generate-license-file! https://www.npmjs.com/package/generate-license-file diff --git a/package-lock.json b/package-lock.json index 9e527b0..fddd252 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.1", + "version": "1.1.0-beta.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.1", + "version": "1.1.0-beta.2", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.1" + "@yext/answers-headless": "^1.1.0-beta.2" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3484,9 +3484,9 @@ } }, "node_modules/@yext/answers-core": { - "version": "1.6.0-beta.0", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.0.tgz", - "integrity": "sha512-nT3pkdFRfTlxQwke1X/XZxF4RqRKG2Mb1Pc3abZ3W9wrCtNw1qYXs0TYOA0zki1EiEaX94GzUiFI00gcxgxWNQ==", + "version": "1.6.0-beta.1", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.1.tgz", + "integrity": "sha512-5zp8bkE5j0nNBlzJIsxPbDxCAjObixg6V2bTiINgzceOzJFfBBDZ+lTFonEJr0OEC2F37JrmyRDVt1CppiYvjg==", "dependencies": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.4" @@ -3496,12 +3496,12 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.1", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.1.tgz", - "integrity": "sha512-y7UZi/wKQ9ymQNDAyFGKhmfJJsAkZQx6owleCsqBt/KnNnbvzTFsa/aPQuLJUzmThFwmvQxQEesDqMKU1Hdc6Q==", + "version": "1.1.0-beta.2", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.2.tgz", + "integrity": "sha512-KfUp2SZJo7zCa3CfxGf9zJpLrl+XOP5FXsUcX9GpZW+yYlepOvhEobtQWhQ005VTIbcdSYeaG7AU1xKD4EW8aA==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.0", + "@yext/answers-core": "^1.6.0-beta.1", "js-levenshtein": "^1.1.6", "redux-thunk": "^2.4.1" } @@ -4506,11 +4506,11 @@ } }, "node_modules/cross-fetch": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz", - "integrity": "sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", "dependencies": { - "node-fetch": "2.6.1" + "node-fetch": "2.6.7" } }, "node_modules/cross-spawn": { @@ -9269,11 +9269,41 @@ "dev": true }, "node_modules/node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, "engines": { "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, "node_modules/node-int64": { @@ -13949,21 +13979,21 @@ "dev": true }, "@yext/answers-core": { - "version": "1.6.0-beta.0", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.0.tgz", - "integrity": "sha512-nT3pkdFRfTlxQwke1X/XZxF4RqRKG2Mb1Pc3abZ3W9wrCtNw1qYXs0TYOA0zki1EiEaX94GzUiFI00gcxgxWNQ==", + "version": "1.6.0-beta.1", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.1.tgz", + "integrity": "sha512-5zp8bkE5j0nNBlzJIsxPbDxCAjObixg6V2bTiINgzceOzJFfBBDZ+lTFonEJr0OEC2F37JrmyRDVt1CppiYvjg==", "requires": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.4" } }, "@yext/answers-headless": { - "version": "1.1.0-beta.1", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.1.tgz", - "integrity": "sha512-y7UZi/wKQ9ymQNDAyFGKhmfJJsAkZQx6owleCsqBt/KnNnbvzTFsa/aPQuLJUzmThFwmvQxQEesDqMKU1Hdc6Q==", + "version": "1.1.0-beta.2", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.2.tgz", + "integrity": "sha512-KfUp2SZJo7zCa3CfxGf9zJpLrl+XOP5FXsUcX9GpZW+yYlepOvhEobtQWhQ005VTIbcdSYeaG7AU1xKD4EW8aA==", "requires": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.0", + "@yext/answers-core": "^1.6.0-beta.1", "js-levenshtein": "^1.1.6", "redux-thunk": "^2.4.1" } @@ -14729,11 +14759,11 @@ } }, "cross-fetch": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz", - "integrity": "sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", "requires": { - "node-fetch": "2.6.1" + "node-fetch": "2.6.7" } }, "cross-spawn": { @@ -18296,9 +18326,33 @@ "dev": true }, "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + }, + "dependencies": { + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + } + } }, "node-int64": { "version": "0.4.0", diff --git a/package.json b/package.json index cf7a18d..aff090e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.1", + "version": "1.1.0-beta.2", "types": "./lib/index.d.ts", "main": "./lib/index.js", "module": "./lib/index.js", @@ -15,7 +15,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.1" + "@yext/answers-headless": "^1.1.0-beta.2" }, "devDependencies": { "@babel/preset-env": "^7.16.5", From 9f6631b46c10043a5a08dd9cf6675bf524893f8e Mon Sep 17 00:00:00 2001 From: Oliver Shi Date: Wed, 2 Feb 2022 14:36:02 -0500 Subject: [PATCH 04/22] track src in npm package (#103) Necessary for source maps to work with create-react-app 5 related: https://github.com/yext/answers-headless/pull/79 J=SLAP-1798 TEST=manual answers-headless-react works with create-react-app 5 --- THIRD-PARTY-NOTICES | 4 ++-- package-lock.json | 34 +++++++++++++++++----------------- package.json | 7 ++++--- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 696927b..58f787f 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -62,7 +62,7 @@ SOFTWARE. The following NPM package may be included in this product: - - @yext/answers-core@1.6.0-beta.1 + - @yext/answers-core@1.6.0-beta.2 This package contains the following license and notice below: @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.2 + - @yext/answers-headless@1.1.0-beta.3 This package contains the following license and notice below: diff --git a/package-lock.json b/package-lock.json index fddd252..2398794 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.2", + "version": "1.1.0-beta.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.2", + "version": "1.1.0-beta.3", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.2" + "@yext/answers-headless": "^1.1.0-beta.3" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3484,9 +3484,9 @@ } }, "node_modules/@yext/answers-core": { - "version": "1.6.0-beta.1", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.1.tgz", - "integrity": "sha512-5zp8bkE5j0nNBlzJIsxPbDxCAjObixg6V2bTiINgzceOzJFfBBDZ+lTFonEJr0OEC2F37JrmyRDVt1CppiYvjg==", + "version": "1.6.0-beta.2", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.2.tgz", + "integrity": "sha512-UTeHgn1Anw+I50Fzl04R/H3yI9EYzpyHUHLKpkzzRg7INfR6ZtEUdfDrbRq+TezFHOEQe7tcYsMSj4DCxWj1ww==", "dependencies": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.4" @@ -3496,12 +3496,12 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.2", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.2.tgz", - "integrity": "sha512-KfUp2SZJo7zCa3CfxGf9zJpLrl+XOP5FXsUcX9GpZW+yYlepOvhEobtQWhQ005VTIbcdSYeaG7AU1xKD4EW8aA==", + "version": "1.1.0-beta.3", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.3.tgz", + "integrity": "sha512-MAIadJDVUg3GAwPfR/ogweKPW9ZycHP/5wqG2SlO9XiI9Do2xdvQ1RzOZIgkUh+kHAOa1C4Bvx8mCMEbcrkAlA==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.1", + "@yext/answers-core": "^1.6.0-beta.2", "js-levenshtein": "^1.1.6", "redux-thunk": "^2.4.1" } @@ -13979,21 +13979,21 @@ "dev": true }, "@yext/answers-core": { - "version": "1.6.0-beta.1", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.1.tgz", - "integrity": "sha512-5zp8bkE5j0nNBlzJIsxPbDxCAjObixg6V2bTiINgzceOzJFfBBDZ+lTFonEJr0OEC2F37JrmyRDVt1CppiYvjg==", + "version": "1.6.0-beta.2", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.2.tgz", + "integrity": "sha512-UTeHgn1Anw+I50Fzl04R/H3yI9EYzpyHUHLKpkzzRg7INfR6ZtEUdfDrbRq+TezFHOEQe7tcYsMSj4DCxWj1ww==", "requires": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.4" } }, "@yext/answers-headless": { - "version": "1.1.0-beta.2", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.2.tgz", - "integrity": "sha512-KfUp2SZJo7zCa3CfxGf9zJpLrl+XOP5FXsUcX9GpZW+yYlepOvhEobtQWhQ005VTIbcdSYeaG7AU1xKD4EW8aA==", + "version": "1.1.0-beta.3", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.3.tgz", + "integrity": "sha512-MAIadJDVUg3GAwPfR/ogweKPW9ZycHP/5wqG2SlO9XiI9Do2xdvQ1RzOZIgkUh+kHAOa1C4Bvx8mCMEbcrkAlA==", "requires": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.1", + "@yext/answers-core": "^1.6.0-beta.2", "js-levenshtein": "^1.1.6", "redux-thunk": "^2.4.1" } diff --git a/package.json b/package.json index aff090e..d1f76c1 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.2", + "version": "1.1.0-beta.3", "types": "./lib/index.d.ts", "main": "./lib/index.js", "module": "./lib/index.js", "files": [ - "lib" + "lib", + "src" ], "scripts": { "build": "tsc", @@ -15,7 +16,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.2" + "@yext/answers-headless": "^1.1.0-beta.3" }, "devDependencies": { "@babel/preset-env": "^7.16.5", From 553bd3baaa9a11d135134be9f26bd685435ca544 Mon Sep 17 00:00:00 2001 From: nmanu1 <88398086+nmanu1@users.noreply.github.com> Date: Thu, 24 Feb 2022 15:52:42 -0500 Subject: [PATCH 05/22] Update headless version (#104) --- THIRD-PARTY-NOTICES | 2 +- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 58f787f..f712425 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.3 + - @yext/answers-headless@1.1.0-beta.4 This package contains the following license and notice below: diff --git a/package-lock.json b/package-lock.json index 2398794..50998ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.3", + "version": "1.1.0-beta.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.3", + "version": "1.1.0-beta.4", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.3" + "@yext/answers-headless": "^1.1.0-beta.4" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3496,9 +3496,9 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.3", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.3.tgz", - "integrity": "sha512-MAIadJDVUg3GAwPfR/ogweKPW9ZycHP/5wqG2SlO9XiI9Do2xdvQ1RzOZIgkUh+kHAOa1C4Bvx8mCMEbcrkAlA==", + "version": "1.1.0-beta.4", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.4.tgz", + "integrity": "sha512-51hRDK+ECVDrZqVhmVflaG48TMjZDylI8igcvTKsOSVC8wtDmmqbNW6opjoQlr3cAZBQ3Oukp/ALBPe23nmeVQ==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", "@yext/answers-core": "^1.6.0-beta.2", @@ -13988,9 +13988,9 @@ } }, "@yext/answers-headless": { - "version": "1.1.0-beta.3", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.3.tgz", - "integrity": "sha512-MAIadJDVUg3GAwPfR/ogweKPW9ZycHP/5wqG2SlO9XiI9Do2xdvQ1RzOZIgkUh+kHAOa1C4Bvx8mCMEbcrkAlA==", + "version": "1.1.0-beta.4", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.4.tgz", + "integrity": "sha512-51hRDK+ECVDrZqVhmVflaG48TMjZDylI8igcvTKsOSVC8wtDmmqbNW6opjoQlr3cAZBQ3Oukp/ALBPe23nmeVQ==", "requires": { "@reduxjs/toolkit": "^1.7.0", "@yext/answers-core": "^1.6.0-beta.2", diff --git a/package.json b/package.json index d1f76c1..45492e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.3", + "version": "1.1.0-beta.4", "types": "./lib/index.d.ts", "main": "./lib/index.js", "module": "./lib/index.js", @@ -16,7 +16,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.3" + "@yext/answers-headless": "^1.1.0-beta.4" }, "devDependencies": { "@babel/preset-env": "^7.16.5", From f24f079530dcf5b9af3464ab36fded14594e8313 Mon Sep 17 00:00:00 2001 From: Yen Truong <36055303+yen-tt@users.noreply.github.com> Date: Mon, 28 Feb 2022 14:24:20 -0500 Subject: [PATCH 06/22] bump beta version (#105) bump version to include changes in[ headless pr](https://github.com/yext/answers-headless/pull/82) J=SLAP-1906 TEST=none --- THIRD-PARTY-NOTICES | 2 +- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index f712425..8da661e 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.4 + - @yext/answers-headless@1.1.0-beta.5 This package contains the following license and notice below: diff --git a/package-lock.json b/package-lock.json index 50998ec..84066ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.4", + "version": "1.1.0-beta.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.4", + "version": "1.1.0-beta.5", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.4" + "@yext/answers-headless": "^1.1.0-beta.5" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3496,9 +3496,9 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.4", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.4.tgz", - "integrity": "sha512-51hRDK+ECVDrZqVhmVflaG48TMjZDylI8igcvTKsOSVC8wtDmmqbNW6opjoQlr3cAZBQ3Oukp/ALBPe23nmeVQ==", + "version": "1.1.0-beta.5", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.5.tgz", + "integrity": "sha512-8VFwz7dheleFHr7mkczfRjWkiJZcFFLrLfUZFMqbgIMpzzLASac7M91zC1ACiLYgLQwJ4J2kVwURqbEW3RE56g==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", "@yext/answers-core": "^1.6.0-beta.2", @@ -13988,9 +13988,9 @@ } }, "@yext/answers-headless": { - "version": "1.1.0-beta.4", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.4.tgz", - "integrity": "sha512-51hRDK+ECVDrZqVhmVflaG48TMjZDylI8igcvTKsOSVC8wtDmmqbNW6opjoQlr3cAZBQ3Oukp/ALBPe23nmeVQ==", + "version": "1.1.0-beta.5", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.5.tgz", + "integrity": "sha512-8VFwz7dheleFHr7mkczfRjWkiJZcFFLrLfUZFMqbgIMpzzLASac7M91zC1ACiLYgLQwJ4J2kVwURqbEW3RE56g==", "requires": { "@reduxjs/toolkit": "^1.7.0", "@yext/answers-core": "^1.6.0-beta.2", diff --git a/package.json b/package.json index 45492e1..f0aac2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.4", + "version": "1.1.0-beta.5", "types": "./lib/index.d.ts", "main": "./lib/index.js", "module": "./lib/index.js", @@ -16,7 +16,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.4" + "@yext/answers-headless": "^1.1.0-beta.5" }, "devDependencies": { "@babel/preset-env": "^7.16.5", From 922187ae140be0f5918b367502e833bfebb924e7 Mon Sep 17 00:00:00 2001 From: Yen Truong <36055303+yen-tt@users.noreply.github.com> Date: Tue, 1 Mar 2022 17:30:52 -0500 Subject: [PATCH 07/22] bump to v1.1.0-beta.6 (#106) for changes in [this headless pr](https://github.com/yext/answers-headless/pull/83) J=SLAP-1906 TEST=none --- THIRD-PARTY-NOTICES | 2 +- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 8da661e..0f7a9e2 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.5 + - @yext/answers-headless@1.1.0-beta.6 This package contains the following license and notice below: diff --git a/package-lock.json b/package-lock.json index 84066ff..f772e42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.5", + "version": "1.1.0-beta.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.5", + "version": "1.1.0-beta.6", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.5" + "@yext/answers-headless": "^1.1.0-beta.6" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3496,9 +3496,9 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.5", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.5.tgz", - "integrity": "sha512-8VFwz7dheleFHr7mkczfRjWkiJZcFFLrLfUZFMqbgIMpzzLASac7M91zC1ACiLYgLQwJ4J2kVwURqbEW3RE56g==", + "version": "1.1.0-beta.6", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.6.tgz", + "integrity": "sha512-OgVTLPTPtDmxlxDiM+sn8c9LlaiyFMC07DJqJXNV8polUiYG7KCz7SS+mMZtn4DCZMp7JyaF0h5Tt32qaIQLvg==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", "@yext/answers-core": "^1.6.0-beta.2", @@ -13988,9 +13988,9 @@ } }, "@yext/answers-headless": { - "version": "1.1.0-beta.5", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.5.tgz", - "integrity": "sha512-8VFwz7dheleFHr7mkczfRjWkiJZcFFLrLfUZFMqbgIMpzzLASac7M91zC1ACiLYgLQwJ4J2kVwURqbEW3RE56g==", + "version": "1.1.0-beta.6", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.6.tgz", + "integrity": "sha512-OgVTLPTPtDmxlxDiM+sn8c9LlaiyFMC07DJqJXNV8polUiYG7KCz7SS+mMZtn4DCZMp7JyaF0h5Tt32qaIQLvg==", "requires": { "@reduxjs/toolkit": "^1.7.0", "@yext/answers-core": "^1.6.0-beta.2", diff --git a/package.json b/package.json index f0aac2d..412b485 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.5", + "version": "1.1.0-beta.6", "types": "./lib/index.d.ts", "main": "./lib/index.js", "module": "./lib/index.js", @@ -16,7 +16,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.5" + "@yext/answers-headless": "^1.1.0-beta.6" }, "devDependencies": { "@babel/preset-env": "^7.16.5", From 251218485e251199a8e1840e665f2120d557b978 Mon Sep 17 00:00:00 2001 From: Tom Meyer Date: Thu, 3 Mar 2022 08:53:23 -0500 Subject: [PATCH 08/22] Update Headless dependency and bump version. (#107) --- THIRD-PARTY-NOTICES | 4 ++-- package-lock.json | 34 +++++++++++++++++----------------- package.json | 4 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 0f7a9e2..d8963ab 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -62,7 +62,7 @@ SOFTWARE. The following NPM package may be included in this product: - - @yext/answers-core@1.6.0-beta.2 + - @yext/answers-core@1.6.0-beta.3 This package contains the following license and notice below: @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.6 + - @yext/answers-headless@1.1.0-beta.7 This package contains the following license and notice below: diff --git a/package-lock.json b/package-lock.json index f772e42..5b85871 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.6", + "version": "1.1.0-beta.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.6", + "version": "1.1.0-beta.7", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.6" + "@yext/answers-headless": "^1.1.0-beta.7" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3484,9 +3484,9 @@ } }, "node_modules/@yext/answers-core": { - "version": "1.6.0-beta.2", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.2.tgz", - "integrity": "sha512-UTeHgn1Anw+I50Fzl04R/H3yI9EYzpyHUHLKpkzzRg7INfR6ZtEUdfDrbRq+TezFHOEQe7tcYsMSj4DCxWj1ww==", + "version": "1.6.0-beta.3", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.3.tgz", + "integrity": "sha512-pMLcVVlsYYH3FkY2DmuHkdUHq0fCRp4XgT+5/1sI1l958xnGvEEejJs+G9vyryrQ9zTj+f7RSnXBhd2e1wfmfw==", "dependencies": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.4" @@ -3496,12 +3496,12 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.6", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.6.tgz", - "integrity": "sha512-OgVTLPTPtDmxlxDiM+sn8c9LlaiyFMC07DJqJXNV8polUiYG7KCz7SS+mMZtn4DCZMp7JyaF0h5Tt32qaIQLvg==", + "version": "1.1.0-beta.7", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.7.tgz", + "integrity": "sha512-oix72SHiBKfFGv0xb/ChNF1h8sOfduLxpSa3OwuN/sN8wU0KwtbwG9xql7CHXVG8eXSVXw6LOfkIGz5F3NQ65Q==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.2", + "@yext/answers-core": "^1.6.0-beta.3", "js-levenshtein": "^1.1.6", "redux-thunk": "^2.4.1" } @@ -13979,21 +13979,21 @@ "dev": true }, "@yext/answers-core": { - "version": "1.6.0-beta.2", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.2.tgz", - "integrity": "sha512-UTeHgn1Anw+I50Fzl04R/H3yI9EYzpyHUHLKpkzzRg7INfR6ZtEUdfDrbRq+TezFHOEQe7tcYsMSj4DCxWj1ww==", + "version": "1.6.0-beta.3", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.3.tgz", + "integrity": "sha512-pMLcVVlsYYH3FkY2DmuHkdUHq0fCRp4XgT+5/1sI1l958xnGvEEejJs+G9vyryrQ9zTj+f7RSnXBhd2e1wfmfw==", "requires": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.4" } }, "@yext/answers-headless": { - "version": "1.1.0-beta.6", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.6.tgz", - "integrity": "sha512-OgVTLPTPtDmxlxDiM+sn8c9LlaiyFMC07DJqJXNV8polUiYG7KCz7SS+mMZtn4DCZMp7JyaF0h5Tt32qaIQLvg==", + "version": "1.1.0-beta.7", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.7.tgz", + "integrity": "sha512-oix72SHiBKfFGv0xb/ChNF1h8sOfduLxpSa3OwuN/sN8wU0KwtbwG9xql7CHXVG8eXSVXw6LOfkIGz5F3NQ65Q==", "requires": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.2", + "@yext/answers-core": "^1.6.0-beta.3", "js-levenshtein": "^1.1.6", "redux-thunk": "^2.4.1" } diff --git a/package.json b/package.json index 412b485..387dacf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.6", + "version": "1.1.0-beta.7", "types": "./lib/index.d.ts", "main": "./lib/index.js", "module": "./lib/index.js", @@ -16,7 +16,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.6" + "@yext/answers-headless": "^1.1.0-beta.7" }, "devDependencies": { "@babel/preset-env": "^7.16.5", From ce09711b8ca3c35847b4e46a7a6ee4ca1278c5e1 Mon Sep 17 00:00:00 2001 From: Yen Truong <36055303+yen-tt@users.noreply.github.com> Date: Mon, 7 Mar 2022 09:11:57 -0500 Subject: [PATCH 09/22] beta version 1.1.0-beta.8 (#108) bump beta version to include rejected promise handling in headless new version J=SLAP-1907 TEST=none --- THIRD-PARTY-NOTICES | 2 +- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index d8963ab..8017c97 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.7 + - @yext/answers-headless@1.1.0-beta.8 This package contains the following license and notice below: diff --git a/package-lock.json b/package-lock.json index 5b85871..d5a4c3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.7", + "version": "1.1.0-beta.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.7", + "version": "1.1.0-beta.8", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.7" + "@yext/answers-headless": "^1.1.0-beta.8" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3496,9 +3496,9 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.7", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.7.tgz", - "integrity": "sha512-oix72SHiBKfFGv0xb/ChNF1h8sOfduLxpSa3OwuN/sN8wU0KwtbwG9xql7CHXVG8eXSVXw6LOfkIGz5F3NQ65Q==", + "version": "1.1.0-beta.8", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.8.tgz", + "integrity": "sha512-/q0impdy46pAY3KwNE5Pwhns9ANEeMiFGVZzOssc3Lh7B8Di4wEwLn/a4TiTbjx4qa93iEPCZ8LSgRnjP4snAQ==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", "@yext/answers-core": "^1.6.0-beta.3", @@ -13988,9 +13988,9 @@ } }, "@yext/answers-headless": { - "version": "1.1.0-beta.7", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.7.tgz", - "integrity": "sha512-oix72SHiBKfFGv0xb/ChNF1h8sOfduLxpSa3OwuN/sN8wU0KwtbwG9xql7CHXVG8eXSVXw6LOfkIGz5F3NQ65Q==", + "version": "1.1.0-beta.8", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.8.tgz", + "integrity": "sha512-/q0impdy46pAY3KwNE5Pwhns9ANEeMiFGVZzOssc3Lh7B8Di4wEwLn/a4TiTbjx4qa93iEPCZ8LSgRnjP4snAQ==", "requires": { "@reduxjs/toolkit": "^1.7.0", "@yext/answers-core": "^1.6.0-beta.3", diff --git a/package.json b/package.json index 387dacf..c435b33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.7", + "version": "1.1.0-beta.8", "types": "./lib/index.d.ts", "main": "./lib/index.js", "module": "./lib/index.js", @@ -16,7 +16,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.7" + "@yext/answers-headless": "^1.1.0-beta.8" }, "devDependencies": { "@babel/preset-env": "^7.16.5", From 75b1f034c22bf1953ca31875033ff4590e0f05ea Mon Sep 17 00:00:00 2001 From: nmanu1 <88398086+nmanu1@users.noreply.github.com> Date: Fri, 18 Mar 2022 16:09:48 -0400 Subject: [PATCH 10/22] Pass Client-SDK agent to Headless (#110) Passes the `ANSWERS_HEADLESS_REACT` agent as part of the Client-SDK header to Headless through `provideAnswersHeadless`. J=SLAP-1951 TEST=manual Hook up locally to the starter app and see that requests send the Headless React, Headless, and Core agents as part of the Client-SDK header. Requests to the universal search endpoint made for entity previews only send the Headless and Core agents because the hook uses `provideAnswersHeadless` directly to get an instance of Headless instead of going through the `AnswersHeadlessProvider` component from Headless React. --- THIRD-PARTY-NOTICES | 4 ++-- package-lock.json | 38 ++++++++++++++++----------------- package.json | 12 +++++------ src/AnswersHeadlessProvider.tsx | 11 +++++++++- src/subscribeToStateUpdates.tsx | 2 +- src/useAnswersState.tsx | 2 +- tests/useAnswersState.test.tsx | 3 +-- tsconfig.json | 3 ++- 8 files changed, 42 insertions(+), 33 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 8017c97..67c123f 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -62,7 +62,7 @@ SOFTWARE. The following NPM package may be included in this product: - - @yext/answers-core@1.6.0-beta.3 + - @yext/answers-core@1.6.0-beta.5 This package contains the following license and notice below: @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.8 + - @yext/answers-headless@1.1.0-beta.10 This package contains the following license and notice below: diff --git a/package-lock.json b/package-lock.json index d5a4c3b..1d42647 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.8", + "version": "1.1.0-beta.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.8", + "version": "1.1.0-beta.9", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.8" + "@yext/answers-headless": "^1.1.0-beta.10" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3484,24 +3484,24 @@ } }, "node_modules/@yext/answers-core": { - "version": "1.6.0-beta.3", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.3.tgz", - "integrity": "sha512-pMLcVVlsYYH3FkY2DmuHkdUHq0fCRp4XgT+5/1sI1l958xnGvEEejJs+G9vyryrQ9zTj+f7RSnXBhd2e1wfmfw==", + "version": "1.6.0-beta.5", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.5.tgz", + "integrity": "sha512-HUPnVyBBcK9YBsCemSN6ExqvHwLtKZQHyQe1DsRSZfAL9BjhatfpucGbLcHJ+RtIBBFtqEtTuov86k+gkCX2LA==", "dependencies": { "@babel/runtime-corejs3": "^7.12.5", - "cross-fetch": "^3.1.4" + "cross-fetch": "^3.1.5" }, "engines": { "node": ">=12" } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.8", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.8.tgz", - "integrity": "sha512-/q0impdy46pAY3KwNE5Pwhns9ANEeMiFGVZzOssc3Lh7B8Di4wEwLn/a4TiTbjx4qa93iEPCZ8LSgRnjP4snAQ==", + "version": "1.1.0-beta.10", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.10.tgz", + "integrity": "sha512-uW0VI962VKk6JjSCmymr+Lxx/sIL1Fiz54VmgcJnNWmNYNQEKngqY8BThx7vw9gp227U1mmZlbyc40f+7064xw==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.3", + "@yext/answers-core": "^1.6.0-beta.5", "js-levenshtein": "^1.1.6", "redux-thunk": "^2.4.1" } @@ -13979,21 +13979,21 @@ "dev": true }, "@yext/answers-core": { - "version": "1.6.0-beta.3", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.3.tgz", - "integrity": "sha512-pMLcVVlsYYH3FkY2DmuHkdUHq0fCRp4XgT+5/1sI1l958xnGvEEejJs+G9vyryrQ9zTj+f7RSnXBhd2e1wfmfw==", + "version": "1.6.0-beta.5", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.5.tgz", + "integrity": "sha512-HUPnVyBBcK9YBsCemSN6ExqvHwLtKZQHyQe1DsRSZfAL9BjhatfpucGbLcHJ+RtIBBFtqEtTuov86k+gkCX2LA==", "requires": { "@babel/runtime-corejs3": "^7.12.5", - "cross-fetch": "^3.1.4" + "cross-fetch": "^3.1.5" } }, "@yext/answers-headless": { - "version": "1.1.0-beta.8", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.8.tgz", - "integrity": "sha512-/q0impdy46pAY3KwNE5Pwhns9ANEeMiFGVZzOssc3Lh7B8Di4wEwLn/a4TiTbjx4qa93iEPCZ8LSgRnjP4snAQ==", + "version": "1.1.0-beta.10", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.10.tgz", + "integrity": "sha512-uW0VI962VKk6JjSCmymr+Lxx/sIL1Fiz54VmgcJnNWmNYNQEKngqY8BThx7vw9gp227U1mmZlbyc40f+7064xw==", "requires": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.3", + "@yext/answers-core": "^1.6.0-beta.5", "js-levenshtein": "^1.1.6", "redux-thunk": "^2.4.1" } diff --git a/package.json b/package.json index c435b33..135fdf5 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,22 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.8", - "types": "./lib/index.d.ts", - "main": "./lib/index.js", - "module": "./lib/index.js", + "version": "1.1.0-beta.9", + "types": "./lib/src/index.d.ts", + "main": "./lib/src/index.js", + "module": "./lib/src/index.js", "files": [ "lib", "src" ], "scripts": { - "build": "tsc", + "build": "rm -rf lib/** && tsc", "prepublishOnly": "npm run build", "watch": "tsc --watch", "test": "eslint . && jest", "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.8" + "@yext/answers-headless": "^1.1.0-beta.10" }, "devDependencies": { "@babel/preset-env": "^7.16.5", diff --git a/src/AnswersHeadlessProvider.tsx b/src/AnswersHeadlessProvider.tsx index ad1f5e6..4b45832 100644 --- a/src/AnswersHeadlessProvider.tsx +++ b/src/AnswersHeadlessProvider.tsx @@ -2,6 +2,9 @@ import { ReactChild, ReactChildren } from 'react'; import { provideAnswersHeadless, AnswersHeadless, HeadlessConfig } from '@yext/answers-headless'; import { AnswersHeadlessContext } from './AnswersHeadlessContext'; import acquireSessionId from './utils/acquireSessionId'; +import packageJson from '../package.json'; + +const { version } = packageJson; type Props = HeadlessConfig & { children?: ReactChildren | ReactChild | (ReactChildren | ReactChild)[], @@ -11,7 +14,13 @@ type Props = HeadlessConfig & { export function AnswersHeadlessProvider(props: Props): JSX.Element { const { children, verticalKey, sessionTrackingEnabled=true, ...answersConfig } = props; - const answers: AnswersHeadless = provideAnswersHeadless(answersConfig); + const additionalHttpHeaders = { + 'Client-SDK': { + ANSWERS_HEADLESS_REACT: version + } + }; + const answers: AnswersHeadless = provideAnswersHeadless(answersConfig, additionalHttpHeaders); + verticalKey && answers.setVertical(verticalKey); answers.setSessionTrackingEnabled(sessionTrackingEnabled); if (sessionTrackingEnabled) { diff --git a/src/subscribeToStateUpdates.tsx b/src/subscribeToStateUpdates.tsx index b968a46..18a7933 100644 --- a/src/subscribeToStateUpdates.tsx +++ b/src/subscribeToStateUpdates.tsx @@ -4,7 +4,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { ComponentType, useReducer, useEffect, useContext } from 'react'; -import { State } from '@yext/answers-headless/lib/esm/models/state'; +import { State } from '@yext/answers-headless'; import { AnswersHeadlessContext } from './AnswersHeadlessContext'; import isShallowEqual from './utils/isShallowEqual'; diff --git a/src/useAnswersState.tsx b/src/useAnswersState.tsx index 81bfa20..af759da 100644 --- a/src/useAnswersState.tsx +++ b/src/useAnswersState.tsx @@ -1,5 +1,5 @@ import { useContext, useLayoutEffect, useRef, useState } from 'react'; -import { State } from '@yext/answers-headless/lib/esm/models/state'; +import { State } from '@yext/answers-headless'; import { AnswersHeadlessContext } from './AnswersHeadlessContext'; export type StateSelector = (s: State) => T; diff --git a/tests/useAnswersState.test.tsx b/tests/useAnswersState.test.tsx index 1b2d953..4f5d178 100644 --- a/tests/useAnswersState.test.tsx +++ b/tests/useAnswersState.test.tsx @@ -1,7 +1,6 @@ import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { provideAnswersHeadless, Result } from '@yext/answers-headless'; -import { State } from '@yext/answers-headless/lib/esm/models/state'; +import { provideAnswersHeadless, Result, State } from '@yext/answers-headless'; import React, { useCallback, useReducer } from 'react'; import { AnswersHeadlessContext, useAnswersActions, useAnswersState } from '../src'; diff --git a/tsconfig.json b/tsconfig.json index caa4ba6..b93c1a9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,8 @@ "declaration": true, "declarationMap": true, "sourceMap": true, - "jsx": "react-jsx" + "jsx": "react-jsx", + "resolveJsonModule": true }, "include": [ "src" From f2160de19c9d4b56c10bdb74231975754a78691e Mon Sep 17 00:00:00 2001 From: Oliver Shi Date: Thu, 24 Mar 2022 12:01:44 -0400 Subject: [PATCH 11/22] add codeowners (#112) adds yext/slapshot as a codeowner --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..9712a9a --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @yext/slapshot \ No newline at end of file From 2de7665aa45f75b4d600d4773a153cb459c8cc18 Mon Sep 17 00:00:00 2001 From: Connor Anderson Date: Thu, 24 Mar 2022 14:18:49 -0400 Subject: [PATCH 12/22] Bump answers-headless to 1.1.0-beta.11 --- package-lock.json | 40 ++++++++++++++++++++-------------------- package.json | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1d42647..2bba590 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.9", + "version": "1.1.0-beta.10", "lockfileVersion": 2, "requires": true, "packages": { @@ -8,7 +8,7 @@ "name": "@yext/answers-headless-react", "version": "1.1.0-beta.9", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.10" + "@yext/answers-headless": "^1.1.0-beta.11" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3484,9 +3484,9 @@ } }, "node_modules/@yext/answers-core": { - "version": "1.6.0-beta.5", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.5.tgz", - "integrity": "sha512-HUPnVyBBcK9YBsCemSN6ExqvHwLtKZQHyQe1DsRSZfAL9BjhatfpucGbLcHJ+RtIBBFtqEtTuov86k+gkCX2LA==", + "version": "1.6.0-beta.6", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.6.tgz", + "integrity": "sha512-J52ocSXJn51bbWGeBSQhdxKP7pJGJoV4qxWoWRBKGLz/sYgfYCIBiIg0bRuTlUtESxA5ErO/+/iEz8oblE50dg==", "dependencies": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.5" @@ -3496,13 +3496,14 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.10", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.10.tgz", - "integrity": "sha512-uW0VI962VKk6JjSCmymr+Lxx/sIL1Fiz54VmgcJnNWmNYNQEKngqY8BThx7vw9gp227U1mmZlbyc40f+7064xw==", + "version": "1.1.0-beta.11", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.11.tgz", + "integrity": "sha512-guhlmRxma/qyPCDhNgYTULPazVWlRzNNKaEyCkKVgheRIIhaCqd2217VMliBe5Hqh4YYe1E6ojifV+eww6CZCQ==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.5", + "@yext/answers-core": "^1.6.0-beta.6", "js-levenshtein": "^1.1.6", + "lodash": "^4.17.21", "redux-thunk": "^2.4.1" } }, @@ -8833,8 +8834,7 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.debounce": { "version": "4.0.8", @@ -13979,22 +13979,23 @@ "dev": true }, "@yext/answers-core": { - "version": "1.6.0-beta.5", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.5.tgz", - "integrity": "sha512-HUPnVyBBcK9YBsCemSN6ExqvHwLtKZQHyQe1DsRSZfAL9BjhatfpucGbLcHJ+RtIBBFtqEtTuov86k+gkCX2LA==", + "version": "1.6.0-beta.6", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.6.tgz", + "integrity": "sha512-J52ocSXJn51bbWGeBSQhdxKP7pJGJoV4qxWoWRBKGLz/sYgfYCIBiIg0bRuTlUtESxA5ErO/+/iEz8oblE50dg==", "requires": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.5" } }, "@yext/answers-headless": { - "version": "1.1.0-beta.10", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.10.tgz", - "integrity": "sha512-uW0VI962VKk6JjSCmymr+Lxx/sIL1Fiz54VmgcJnNWmNYNQEKngqY8BThx7vw9gp227U1mmZlbyc40f+7064xw==", + "version": "1.1.0-beta.11", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.11.tgz", + "integrity": "sha512-guhlmRxma/qyPCDhNgYTULPazVWlRzNNKaEyCkKVgheRIIhaCqd2217VMliBe5Hqh4YYe1E6ojifV+eww6CZCQ==", "requires": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.5", + "@yext/answers-core": "^1.6.0-beta.6", "js-levenshtein": "^1.1.6", + "lodash": "^4.17.21", "redux-thunk": "^2.4.1" } }, @@ -17986,8 +17987,7 @@ "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.debounce": { "version": "4.0.8", diff --git a/package.json b/package.json index 135fdf5..4c3a301 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.9", + "version": "1.1.0-beta.10", "types": "./lib/src/index.d.ts", "main": "./lib/src/index.js", "module": "./lib/src/index.js", @@ -16,7 +16,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.10" + "@yext/answers-headless": "^1.1.0-beta.11" }, "devDependencies": { "@babel/preset-env": "^7.16.5", From ae812ead3fabb1b315607d35e5ead6c88ea985d5 Mon Sep 17 00:00:00 2001 From: Connor Anderson Date: Thu, 24 Mar 2022 14:20:02 -0400 Subject: [PATCH 13/22] Update THIRD-PARTY-NOTICES --- THIRD-PARTY-NOTICES | 60 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 67c123f..4a4424b 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -62,7 +62,7 @@ SOFTWARE. The following NPM package may be included in this product: - - @yext/answers-core@1.6.0-beta.5 + - @yext/answers-core@1.6.0-beta.6 This package contains the following license and notice below: @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.10 + - @yext/answers-headless@1.1.0-beta.11 This package contains the following license and notice below: @@ -287,6 +287,62 @@ THE SOFTWARE. ----------- +The following NPM package may be included in this product: + + - lodash@4.17.21 + +This package contains the following license and notice below: + +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + +----------- + The following NPM package may be included in this product: - loose-envify@1.4.0 From c2e2adf36ebaf29efa2332a92e9472c8cd157b10 Mon Sep 17 00:00:00 2001 From: Oliver Shi Date: Thu, 24 Mar 2022 17:05:21 -0400 Subject: [PATCH 14/22] use shared eslint and fix eslint issues (#111) use the new slapshot shared eslint fixes issues, including non autofixable ones the non autofixble ones were - conditionally callint jest.expect - wrapping react-testing-library calls inside an act() unnecessarily - tsdoc params expect a hyphen J=SLAP-2003 TEST=build --- .eslintrc.js | 37 +- package-lock.json | 883 +++++++++++++++++----- package.json | 8 +- src/utils/isShallowEqual.ts | 2 - tests/setup/responses/universal-query.tsx | 260 +++---- tests/setup/responses/vertical-query.ts | 402 +++++----- tests/setup/server.ts | 4 +- tests/useAnswersActions.test.tsx | 10 +- tests/useAnswersState.test.tsx | 39 +- 9 files changed, 1064 insertions(+), 581 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0cfb305..027968a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,38 +1,5 @@ module.exports = { extends: [ - 'react-app', - 'plugin:@typescript-eslint/recommended', - 'plugin:react-perf/recommended', - 'plugin:@yext/export-star/recommended' - ], - plugins: ['react-perf'], - ignorePatterns: ['lib', 'tests/setup/responses'], - rules: { - indent: ['error', 2, { SwitchCase: 1 }], - 'no-trailing-spaces': ['error'], - 'no-multi-spaces': ['error'], - quotes: ['error', 'single'], - 'space-before-function-paren': ['error', { - named: 'never', - anonymous: 'never' - }], - 'object-curly-spacing': ['error', 'always'], - 'quote-props': ['error', 'as-needed'], - 'max-len': ['error', { - code: 110, - ignorePattern: '^import\\s.+\\sfrom\\s.+;$' - }], - '@typescript-eslint/semi': ['error'], - '@typescript-eslint/type-annotation-spacing': ['error'], - '@typescript-eslint/member-delimiter-style': ['error', { - multiline: { - delimiter: 'comma', - requireLast: false - }, - singleline: { - delimiter: 'comma', - requireLast: false - }, - }] - } + '@yext/slapshot/typescript-react' + ] }; diff --git a/package-lock.json b/package-lock.json index 2bba590..ef2a55f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,10 +21,11 @@ "@types/jest": "^27.0.3", "@types/react": "^17.0.37", "@types/uuid": "^8.3.3", - "@typescript-eslint/eslint-plugin": "^5.7.0", - "@typescript-eslint/parser": "^5.7.0", + "@typescript-eslint/eslint-plugin": "^5.16.0", + "@typescript-eslint/parser": "^5.16.0", + "@yext/eslint-config-slapshot": "^0.2.0", "@yext/eslint-plugin-export-star": "^1.0.0", - "eslint": "^8.4.1", + "eslint": "^8.11.0", "eslint-config-react-app": "^7.0.0", "eslint-plugin-flowtype": "^8.0.3", "eslint-plugin-import": "^2.25.3", @@ -32,6 +33,7 @@ "eslint-plugin-react": "^7.27.1", "eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-react-perf": "^3.3.1", + "eslint-plugin-tsdoc": "^0.2.14", "generate-license-file": "^1.3.0", "jest": "^27.4.5", "msw": "^0.36.3", @@ -1898,16 +1900,16 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", + "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.2.0", + "espree": "^9.3.1", "globals": "^13.9.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.0.4", @@ -1924,9 +1926,9 @@ "dev": true }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1938,15 +1940,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2712,6 +2705,37 @@ "node": ">=8" } }, + "node_modules/@microsoft/tsdoc": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz", + "integrity": "sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg==", + "dev": true + }, + "node_modules/@microsoft/tsdoc-config": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz", + "integrity": "sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA==", + "dev": true, + "dependencies": { + "@microsoft/tsdoc": "0.13.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + } + }, + "node_modules/@microsoft/tsdoc-config/node_modules/resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "dependencies": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/@mswjs/cookies": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/@mswjs/cookies/-/cookies-0.1.6.tgz", @@ -3279,13 +3303,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.7.0.tgz", - "integrity": "sha512-8RTGBpNn5a9M628wBPrCbJ+v3YTEOE2qeZb7TDkGKTDXSj36KGRg92SpFFaR/0S3rSXQxM0Og/kV9EyadsYSBg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz", + "integrity": "sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "5.7.0", - "@typescript-eslint/scope-manager": "5.7.0", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/type-utils": "5.16.0", + "@typescript-eslint/utils": "5.16.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -3310,6 +3335,62 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", + "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", + "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", + "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.16.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -3350,14 +3431,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.7.0.tgz", - "integrity": "sha512-m/gWCCcS4jXw6vkrPQ1BjZ1vomP01PArgzvauBqzsoZ3urLbsRChexB8/YV8z9HwE3qlJM35FxfKZ1nfP/4x8g==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.16.0.tgz", + "integrity": "sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.7.0", - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/typescript-estree": "5.7.0", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", "debug": "^4.3.2" }, "engines": { @@ -3376,6 +3457,104 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", + "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", + "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", + "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", + "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.16.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", @@ -3393,6 +3572,32 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz", + "integrity": "sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "5.16.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/types": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", @@ -3448,6 +3653,128 @@ "node": ">=10" } }, + "node_modules/@typescript-eslint/utils": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.16.0.tgz", + "integrity": "sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", + "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", + "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", + "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", + "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.16.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", @@ -3507,13 +3834,30 @@ "redux-thunk": "^2.4.1" } }, + "node_modules/@yext/eslint-config-slapshot": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@yext/eslint-config-slapshot/-/eslint-config-slapshot-0.2.0.tgz", + "integrity": "sha512-6j2N/XXnl6inGg/VVEFXC1Kf4QdVNHHTxWG7F7R0xcK8pB2NMOyk23MLiVHNyin2R3xHzj29h7MmWBATsRCIWg==", + "dev": true, + "dependencies": { + "eslint-config-react-app": "^7.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.15.0", + "@yext/eslint-plugin-export-star": "^1.0.2", + "eslint": ">= 7", + "eslint-plugin-react-hooks": "^4.3.0", + "eslint-plugin-react-perf": "^3.3.1", + "eslint-plugin-tsdoc": "^0.2.14" + } + }, "node_modules/@yext/eslint-plugin-export-star": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@yext/eslint-plugin-export-star/-/eslint-plugin-export-star-1.0.0.tgz", - "integrity": "sha512-jRZuW73DIMX/nkCGsGmS4vu9WDctYsmdwpI4FSm58Yr6cfjS7lU0hRHLs4LH29NF6BTp62Dj/a/Tw4SLvVrlcg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@yext/eslint-plugin-export-star/-/eslint-plugin-export-star-1.0.2.tgz", + "integrity": "sha512-f7sKv/+6WY1Fydcp5+ns0m+pz9iXFmcV9PVvykJWxlk90/Qs8CpqlPUBgPt/lZC9mQ2TWvenuDg4qVu/i4fXYw==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "^5.4.0", + "@typescript-eslint/experimental-utils": "^5.7.0", "@typescript-eslint/typescript-estree": "^5.4.0", "eslint-import-resolver-typescript": "^2.5.0", "eslint-module-utils": "^2.7.1" @@ -3532,9 +3876,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", - "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -4973,24 +5317,23 @@ } }, "node_modules/eslint": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.4.1.tgz", - "integrity": "sha512-TxU/p7LB1KxQ6+7aztTnO7K0i+h0tDi81YRY9VzB6Id71kNz+fFYnf5HD5UOQmxkzcoa0TlVZf9dpMtUv0GpWg==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz", + "integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.0.5", + "@eslint/eslintrc": "^1.2.1", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", + "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.1.0", - "espree": "^9.2.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -4998,7 +5341,7 @@ "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", @@ -5009,9 +5352,7 @@ "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", "regexpp": "^3.2.0", - "semver": "^7.2.1", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", @@ -5357,6 +5698,16 @@ "eslint": "^7.5.0 || ^8.0.0" } }, + "node_modules/eslint-plugin-tsdoc": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.14.tgz", + "integrity": "sha512-fJ3fnZRsdIoBZgzkQjv8vAj6NeeOoFkTfgosj6mKsFjX70QV256sA/wq+y/R2+OL4L8E79VVaVWrPeZnKNe8Ng==", + "dev": true, + "dependencies": { + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "0.15.2" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -5474,9 +5825,9 @@ } }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -5487,9 +5838,9 @@ } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -5531,15 +5882,6 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/eslint/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -5552,21 +5894,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/eslint/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -5601,23 +5928,23 @@ } }, "node_modules/espree": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", - "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, "dependencies": { - "acorn": "^8.6.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" + "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6251,9 +6578,9 @@ ] }, "node_modules/ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, "engines": { "node": ">= 4" @@ -8596,6 +8923,12 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", + "dev": true + }, "node_modules/js-levenshtein": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", @@ -9847,15 +10180,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -12759,16 +13083,16 @@ "dev": true }, "@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", + "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.2.0", + "espree": "^9.3.1", "globals": "^13.9.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.0.4", @@ -12782,20 +13106,14 @@ "dev": true }, "globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "requires": { "type-fest": "^0.20.2" } }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -13372,6 +13690,36 @@ } } }, + "@microsoft/tsdoc": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz", + "integrity": "sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg==", + "dev": true + }, + "@microsoft/tsdoc-config": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz", + "integrity": "sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA==", + "dev": true, + "requires": { + "@microsoft/tsdoc": "0.13.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + }, + "dependencies": { + "resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "requires": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } + } + } + }, "@mswjs/cookies": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/@mswjs/cookies/-/cookies-0.1.6.tgz", @@ -13860,13 +14208,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.7.0.tgz", - "integrity": "sha512-8RTGBpNn5a9M628wBPrCbJ+v3YTEOE2qeZb7TDkGKTDXSj36KGRg92SpFFaR/0S3rSXQxM0Og/kV9EyadsYSBg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz", + "integrity": "sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "5.7.0", - "@typescript-eslint/scope-manager": "5.7.0", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/type-utils": "5.16.0", + "@typescript-eslint/utils": "5.16.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -13875,6 +14224,38 @@ "tsutils": "^3.21.0" }, "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", + "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0" + } + }, + "@typescript-eslint/types": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", + "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", + "dev": true + }, + "@typescript-eslint/visitor-keys": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", + "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.16.0", + "eslint-visitor-keys": "^3.0.0" + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -13901,15 +14282,73 @@ } }, "@typescript-eslint/parser": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.7.0.tgz", - "integrity": "sha512-m/gWCCcS4jXw6vkrPQ1BjZ1vomP01PArgzvauBqzsoZ3urLbsRChexB8/YV8z9HwE3qlJM35FxfKZ1nfP/4x8g==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.16.0.tgz", + "integrity": "sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.7.0", - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/typescript-estree": "5.7.0", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", "debug": "^4.3.2" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", + "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0" + } + }, + "@typescript-eslint/types": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", + "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", + "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", + "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.16.0", + "eslint-visitor-keys": "^3.0.0" + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "@typescript-eslint/scope-manager": { @@ -13922,6 +14361,17 @@ "@typescript-eslint/visitor-keys": "5.7.0" } }, + "@typescript-eslint/type-utils": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz", + "integrity": "sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==", + "dev": true, + "requires": { + "@typescript-eslint/utils": "5.16.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" + } + }, "@typescript-eslint/types": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", @@ -13954,6 +14404,78 @@ } } }, + "@typescript-eslint/utils": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.16.0.tgz", + "integrity": "sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", + "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0" + } + }, + "@typescript-eslint/types": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", + "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", + "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", + "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.16.0", + "eslint-visitor-keys": "^3.0.0" + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, "@typescript-eslint/visitor-keys": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", @@ -13999,13 +14521,22 @@ "redux-thunk": "^2.4.1" } }, + "@yext/eslint-config-slapshot": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@yext/eslint-config-slapshot/-/eslint-config-slapshot-0.2.0.tgz", + "integrity": "sha512-6j2N/XXnl6inGg/VVEFXC1Kf4QdVNHHTxWG7F7R0xcK8pB2NMOyk23MLiVHNyin2R3xHzj29h7MmWBATsRCIWg==", + "dev": true, + "requires": { + "eslint-config-react-app": "^7.0.0" + } + }, "@yext/eslint-plugin-export-star": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@yext/eslint-plugin-export-star/-/eslint-plugin-export-star-1.0.0.tgz", - "integrity": "sha512-jRZuW73DIMX/nkCGsGmS4vu9WDctYsmdwpI4FSm58Yr6cfjS7lU0hRHLs4LH29NF6BTp62Dj/a/Tw4SLvVrlcg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@yext/eslint-plugin-export-star/-/eslint-plugin-export-star-1.0.2.tgz", + "integrity": "sha512-f7sKv/+6WY1Fydcp5+ns0m+pz9iXFmcV9PVvykJWxlk90/Qs8CpqlPUBgPt/lZC9mQ2TWvenuDg4qVu/i4fXYw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "^5.4.0", + "@typescript-eslint/experimental-utils": "^5.7.0", "@typescript-eslint/typescript-estree": "^5.4.0", "eslint-import-resolver-typescript": "^2.5.0", "eslint-module-utils": "^2.7.1" @@ -14024,9 +14555,9 @@ "dev": true }, "acorn": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", - "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true }, "acorn-globals": { @@ -15130,24 +15661,23 @@ } }, "eslint": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.4.1.tgz", - "integrity": "sha512-TxU/p7LB1KxQ6+7aztTnO7K0i+h0tDi81YRY9VzB6Id71kNz+fFYnf5HD5UOQmxkzcoa0TlVZf9dpMtUv0GpWg==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz", + "integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.0.5", + "@eslint/eslintrc": "^1.2.1", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", + "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.1.0", - "espree": "^9.2.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -15155,7 +15685,7 @@ "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", @@ -15166,9 +15696,7 @@ "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", "regexpp": "^3.2.0", - "semver": "^7.2.1", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", @@ -15222,9 +15750,9 @@ "dev": true }, "eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -15232,9 +15760,9 @@ } }, "eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "glob-parent": { @@ -15261,12 +15789,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -15276,15 +15798,6 @@ "argparse": "^2.0.1" } }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -15551,6 +16064,16 @@ "@typescript-eslint/experimental-utils": "^5.5.0" } }, + "eslint-plugin-tsdoc": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.14.tgz", + "integrity": "sha512-fJ3fnZRsdIoBZgzkQjv8vAj6NeeOoFkTfgosj6mKsFjX70QV256sA/wq+y/R2+OL4L8E79VVaVWrPeZnKNe8Ng==", + "dev": true, + "requires": { + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "0.15.2" + } + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -15591,20 +16114,20 @@ "dev": true }, "espree": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", - "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, "requires": { - "acorn": "^8.6.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" + "eslint-visitor-keys": "^3.3.0" }, "dependencies": { "eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true } } @@ -16067,9 +16590,9 @@ "dev": true }, "ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "immer": { @@ -17797,6 +18320,12 @@ } } }, + "jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", + "dev": true + }, "js-levenshtein": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", @@ -18763,12 +19292,6 @@ } } }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, "prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", diff --git a/package.json b/package.json index 4c3a301..2bd19e8 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,11 @@ "@types/jest": "^27.0.3", "@types/react": "^17.0.37", "@types/uuid": "^8.3.3", - "@typescript-eslint/eslint-plugin": "^5.7.0", - "@typescript-eslint/parser": "^5.7.0", + "@typescript-eslint/eslint-plugin": "^5.16.0", + "@typescript-eslint/parser": "^5.16.0", + "@yext/eslint-config-slapshot": "^0.2.0", "@yext/eslint-plugin-export-star": "^1.0.0", - "eslint": "^8.4.1", + "eslint": "^8.11.0", "eslint-config-react-app": "^7.0.0", "eslint-plugin-flowtype": "^8.0.3", "eslint-plugin-import": "^2.25.3", @@ -40,6 +41,7 @@ "eslint-plugin-react": "^7.27.1", "eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-react-perf": "^3.3.1", + "eslint-plugin-tsdoc": "^0.2.14", "generate-license-file": "^1.3.0", "jest": "^27.4.5", "msw": "^0.36.3", diff --git a/src/utils/isShallowEqual.ts b/src/utils/isShallowEqual.ts index 4a30b95..6857906 100644 --- a/src/utils/isShallowEqual.ts +++ b/src/utils/isShallowEqual.ts @@ -1,6 +1,4 @@ /** - * @param originalObj - * @param newObj * @returns whether the two objects have values with equal references */ export default function isShallowEqual( diff --git a/tests/setup/responses/universal-query.tsx b/tests/setup/responses/universal-query.tsx index ca2b266..4f3d2c6 100644 --- a/tests/setup/responses/universal-query.tsx +++ b/tests/setup/responses/universal-query.tsx @@ -9,68 +9,68 @@ export const universalQueryResponseWithFilters = { businessId: 3350634, modules: [ { - verticalConfigId: "KM", + verticalConfigId: 'KM', resultsCount: 821, - encodedState: "", + encodedState: '', results: [ { data: { - id: "2917513710699998040", - type: "location", - website: "https://locations.yext.com/us/va/mclean/7900-westpark-drive.html", + id: '2917513710699998040', + type: 'location', + website: 'https://locations.yext.com/us/va/mclean/7900-westpark-drive.html', address: { - line1: "7900 Westpark Drive", - line2: "Suite T200", - city: "McLean", - region: "VA", - postalCode: "22102", - countryCode: "US" + line1: '7900 Westpark Drive', + line2: 'Suite T200', + city: 'McLean', + region: 'VA', + postalCode: '22102', + countryCode: 'US' }, addressHidden: false, - description: "Yext is the global digital knowledge management leader.", + description: 'Yext is the global digital knowledge management leader.', hours: { monday: { openIntervals: [ { - start: "01:00", - end: "14:00" + start: '01:00', + end: '14:00' } ] } }, - name: "Office Space", + name: 'Office Space', cityCoordinate: { latitude: 38.936519622802734, longitude: -77.18428039550781 }, c_names: [ - "my name is Steve", - "your name is Rose" + 'my name is Steve', + 'your name is Rose' ], displayCoordinate: { latitude: 38.9246498, longitude: -77.2169181 }, - facebookPageUrl: "https://www.facebook.com/Yext-Cafe-2073644659328705/", + facebookPageUrl: 'https://www.facebook.com/Yext-Cafe-2073644659328705/', geocodedCoordinate: { latitude: 38.9246498, longitude: -77.2169181 }, - isoRegionCode: "VA", - localPhone: "+16467624579", - mainPhone: "+18884442988", + isoRegionCode: 'VA', + localPhone: '+16467624579', + mainPhone: '+18884442988', routableCoordinate: { latitude: 38.9243984, longitude: -77.2178386 }, services: [ - "Dogs", - "Cats", - "Sleep" + 'Dogs', + 'Cats', + 'Sleep' ], - timezone: "America/New_York", + timezone: 'America/New_York', websiteUrl: { - url: "https://locations.yext.com/us/va/mclean/7900-westpark-drive.html", + url: 'https://locations.yext.com/us/va/mclean/7900-westpark-drive.html', preferDisplayUrl: false }, yextDisplayCoordinate: { @@ -82,10 +82,10 @@ export const universalQueryResponseWithFilters = { longitude: -77.2178386 }, categoryIds: [ - "668" + '668' ], - timeZoneUtcOffset: "-04:00", - uid: "18714998" + timeZoneUtcOffset: '-04:00', + uid: '18714998' }, highlightedFields: {}, distance: 29718, @@ -94,44 +94,44 @@ export const universalQueryResponseWithFilters = { ], queryDurationMillis: 120, facets: [], - source: "KNOWLEDGE_MANAGER" + source: 'KNOWLEDGE_MANAGER' }, { - verticalConfigId: "financial_professionals", + verticalConfigId: 'financial_professionals', resultsCount: 1, - encodedState: "", + encodedState: '', results: [ { data: { - id: "3723515499403010611", - type: "financialProfessional", + id: '3723515499403010611', + type: 'financialProfessional', address: { - line1: "1101 Wilson Boulevard", - city: "Arlington", - region: "VA", - postalCode: "22209", - countryCode: "US" + line1: '1101 Wilson Boulevard', + city: 'Arlington', + region: 'VA', + postalCode: '22209', + countryCode: 'US' }, addressHidden: false, - name: "Connor Anderson", + name: 'Connor Anderson', cityCoordinate: { latitude: 38.881579, longitude: -77.103339 }, c_primaryCTA: { - label: "Call", - linkType: "Phone", - link: "+18888888888" + label: 'Call', + linkType: 'Phone', + link: '+18888888888' }, featuredMessage: { - description: "Ask Connor a financial question!" + description: 'Ask Connor a financial question!' }, geocodedCoordinate: { latitude: 38.895467, longitude: -77.069889 }, - isoRegionCode: "VA", - timezone: "America/New_York", + isoRegionCode: 'VA', + timezone: 'America/New_York', yextDisplayCoordinate: { latitude: 38.895467, longitude: -77.069889 @@ -140,8 +140,8 @@ export const universalQueryResponseWithFilters = { latitude: 38.895032, longitude: -77.070102 }, - timeZoneUtcOffset: "-04:00", - uid: "24359942" + timeZoneUtcOffset: '-04:00', + uid: '24359942' }, highlightedFields: {}, distance: 42793, @@ -150,20 +150,20 @@ export const universalQueryResponseWithFilters = { ], appliedQueryFilters: [ { - displayKey: "Location", - displayValue: "Virginia", + displayKey: 'Location', + displayValue: 'Virginia', filter: { - "builtin.location": { - $eq: "P-region.7919684583758790" + 'builtin.location': { + $eq: 'P-region.7919684583758790' } }, - type: "PLACE", + type: 'PLACE', details: { latitude: 37.677592044, longitude: -78.6190526172645, - placeName: "Virginia, United States", + placeName: 'Virginia, United States', featureTypes: [ - "region" + 'region' ], boundingBox: { minLatitude: 36.540855, @@ -176,41 +176,41 @@ export const universalQueryResponseWithFilters = { ], queryDurationMillis: 129, facets: [], - source: "KNOWLEDGE_MANAGER" + source: 'KNOWLEDGE_MANAGER' }, { - verticalConfigId: "healthcare_professionals", + verticalConfigId: 'healthcare_professionals', resultsCount: 1, - encodedState: "", + encodedState: '', results: [ { data: { - id: "555601076612488113", - type: "healthcareProfessional", - landingPageUrl: "https://www.youtube.com/channel/UCiPW7OlzTfQjR_vLlkYPZCg", + id: '555601076612488113', + type: 'healthcareProfessional', + landingPageUrl: 'https://www.youtube.com/channel/UCiPW7OlzTfQjR_vLlkYPZCg', address: { - line1: "1101 Wilson Boulevard", - city: "Arlington", - region: "VA", - postalCode: "22209", - countryCode: "US" + line1: '1101 Wilson Boulevard', + city: 'Arlington', + region: 'VA', + postalCode: '22209', + countryCode: 'US' }, addressHidden: false, - description: "An Interventional Radiologist and a Youtuber", - name: "Bob Cellini", + description: 'An Interventional Radiologist and a Youtuber', + name: 'Bob Cellini', cityCoordinate: { latitude: 38.881579, longitude: -77.103339 }, - firstName: "Bob", + firstName: 'Bob', geocodedCoordinate: { latitude: 38.895467, longitude: -77.069889 }, - isoRegionCode: "VA", - lastName: "Cellini", - localPhone: "+17034567890", - timezone: "America/New_York", + isoRegionCode: 'VA', + lastName: 'Cellini', + localPhone: '+17034567890', + timezone: 'America/New_York', yextDisplayCoordinate: { latitude: 38.895467, longitude: -77.069889 @@ -220,11 +220,11 @@ export const universalQueryResponseWithFilters = { longitude: -77.070102 }, categoryIds: [ - "1545906", - "1120591" + '1545906', + '1120591' ], - timeZoneUtcOffset: "-04:00", - uid: "24360867" + timeZoneUtcOffset: '-04:00', + uid: '24360867' }, highlightedFields: {}, distance: 42793, @@ -233,20 +233,20 @@ export const universalQueryResponseWithFilters = { ], appliedQueryFilters: [ { - displayKey: "Location", - displayValue: "Virginia", + displayKey: 'Location', + displayValue: 'Virginia', filter: { - "builtin.location": { - $eq: "P-region.7919684583758790" + 'builtin.location': { + $eq: 'P-region.7919684583758790' } }, - type: "PLACE", + type: 'PLACE', details: { latitude: 37.677592044, longitude: -78.6190526172645, - placeName: "Virginia, United States", + placeName: 'Virginia, United States', featureTypes: [ - "region" + 'region' ], boundingBox: { minLatitude: 36.540855, @@ -259,17 +259,17 @@ export const universalQueryResponseWithFilters = { ], queryDurationMillis: 111, facets: [], - source: "KNOWLEDGE_MANAGER" + source: 'KNOWLEDGE_MANAGER' } ], failedVerticals: [], - queryId: "29e0c558-6dba-44e8-bde5-7b706919fc7e", + queryId: '29e0c558-6dba-44e8-bde5-7b706919fc7e', searchIntents: [], locationBias: { latitude: 39.0437, longitude: -77.4875, - locationDisplayName: "Ashburn, Virginia, United States", - accuracy: "IP" + locationDisplayName: 'Ashburn, Virginia, United States', + accuracy: 'IP' } } }; @@ -283,53 +283,53 @@ export const universalQueryResponse = { businessId: 3350634, modules: [ { - verticalConfigId: "people", + verticalConfigId: 'people', resultsCount: 6, - encodedState: "", + encodedState: '', results: [ { data: { - id: "Employee-2143", - type: "ce_person", + id: 'Employee-2143', + type: 'ce_person', address: { - line1: "7900 Westpark Drive", - city: "Mclean", - region: "VA", - postalCode: "22102", - countryCode: "US" + line1: '7900 Westpark Drive', + city: 'Mclean', + region: 'VA', + postalCode: '22102', + countryCode: 'US' }, - description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", - name: "Tom Meyer", + description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + name: 'Tom Meyer', cityCoordinate: { latitude: 38.936519622802734, longitude: -77.18428039550781 }, c_allstateLadyCTA: { - label: "Learn More", - linkType: "URL", - link: "http://yext.com" + label: 'Learn More', + linkType: 'URL', + link: 'http://yext.com' }, - c_employeeCity: "Tysons Corner", - c_employeeCountry: "United States", - c_employeeDepartment: "Technology", - c_employeeRegion: "Virginia", - c_employeeTitle: "Software Engineer", - c_myRichTextField: "++Underlined stuff++ \n**Bold stuff**\n\n1. One\n2. Two\n3. *Three*", - c_popularity: "1.0", - c_startDate: "2017-09-05", + c_employeeCity: 'Tysons Corner', + c_employeeCountry: 'United States', + c_employeeDepartment: 'Technology', + c_employeeRegion: 'Virginia', + c_employeeTitle: 'Software Engineer', + c_myRichTextField: '++Underlined stuff++ \n**Bold stuff**\n\n1. One\n2. Two\n3. *Three*', + c_popularity: '1.0', + c_startDate: '2017-09-05', displayCoordinate: { latitude: 38.924648, longitude: -77.216859 }, emails: [ - "tmeyer@yext.com" + 'tmeyer@yext.com' ], - firstName: "Tom", + firstName: 'Tom', geocodedCoordinate: { latitude: 38.924654, longitude: -77.216891 }, - lastName: "Meyer", + lastName: 'Meyer', routableCoordinate: { latitude: 38.9242966, longitude: -77.2177549 @@ -342,11 +342,11 @@ export const universalQueryResponse = { latitude: 38.9242966, longitude: -77.2177549 }, - uid: "18716864" + uid: '18716864' }, highlightedFields: { name: { - value: "Tom Meyer", + value: 'Tom Meyer', matchedSubstrings: [ { offset: 0, @@ -361,40 +361,40 @@ export const universalQueryResponse = { appliedQueryFilters: [], queryDurationMillis: 145, facets: [], - source: "KNOWLEDGE_MANAGER" + source: 'KNOWLEDGE_MANAGER' }, { - verticalConfigId: "links", + verticalConfigId: 'links', resultsCount: 89, - encodedState: "tom", + encodedState: 'tom', results: [ { - htmlTitle: "Men\\u0026#39;s Skechers Cats Oxford | Shoes.com", - link: "https://www.shoes.com/mens-skechers-tom-cats-oxford/P-3296.html", - displayLink: "www.shoes.com", - htmlSnippet: "Go on the prowl in the Skechers Cats Oxford." + htmlTitle: 'Men\\u0026#39;s Skechers Cats Oxford | Shoes.com', + link: 'https://www.shoes.com/mens-skechers-tom-cats-oxford/P-3296.html', + displayLink: 'www.shoes.com', + htmlSnippet: 'Go on the prowl in the Skechers Cats Oxford.' }, { - htmlTitle: "\\u003cb\\u003eToms\\u003c/b\\u003e | Shoes.com", - link: "https://www.shoes.com/brands/toms/", - displayLink: "www.shoes.com", - htmlSnippet: "Shop at Shoes.com Enjoy free US shipping on all orders." + htmlTitle: '\\u003cb\\u003eToms\\u003c/b\\u003e | Shoes.com', + link: 'https://www.shoes.com/brands/toms/', + displayLink: 'www.shoes.com', + htmlSnippet: 'Shop at Shoes.com Enjoy free US shipping on all orders.' } ], appliedQueryFilters: [], queryDurationMillis: 327, facets: [], - source: "GOOGLE_CSE" + source: 'GOOGLE_CSE' } ], failedVerticals: [], - queryId: "42513949-b30b-4343-8642-d8e30aed3d82", + queryId: '42513949-b30b-4343-8642-d8e30aed3d82', searchIntents: [], locationBias: { latitude: 39.0437, longitude: -77.4875, - locationDisplayName: "Ashburn, Virginia, United States", - accuracy: "IP" + locationDisplayName: 'Ashburn, Virginia, United States', + accuracy: 'IP' } } }; diff --git a/tests/setup/responses/vertical-query.ts b/tests/setup/responses/vertical-query.ts index d6a55ca..5d07da2 100644 --- a/tests/setup/responses/vertical-query.ts +++ b/tests/setup/responses/vertical-query.ts @@ -2,87 +2,87 @@ import { v4 as uuid } from 'uuid'; export const verticalQueryResponseWithNlpFilters = { meta: { - uuid: "017cb8d9-2f76-1f19-5bb9-a2f931650de2", + uuid: '017cb8d9-2f76-1f19-5bb9-a2f931650de2', errors: [] }, response: { businessId: 3350634, - queryId: "9da068df-fd31-4f75-90b3-e0be900fe9f2", + queryId: '9da068df-fd31-4f75-90b3-e0be900fe9f2', resultsCount: 4, results: [ { data: { - id: "Employee-2116", - type: "ce_person", - website: "http://www.test.com", + id: 'Employee-2116', + type: 'ce_person', + website: 'http://www.test.com', address: { - line1: "7900 Westpark Drive", - city: "Mclean", - region: "VA", - postalCode: "22102", - countryCode: "US" + line1: '7900 Westpark Drive', + city: 'Mclean', + region: 'VA', + postalCode: '22102', + countryCode: 'US' }, associations: [ - "Runners Association" + 'Runners Association' ], - description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Mollis nunc sed id semper risus. Commodo elit at imperdiet dui accumsan sit amet nulla facilisi. Scelerisque viverra mauris in aliquam. A erat nam at lectus. Egestas purus viverra accumsan in nisl nisi scelerisque. Habitant morbi tristique senectus et netus. Congue nisi vitae suscipit tellus mauris a diam maecenas sed.", - name: "Amani Farooque", + description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Mollis nunc sed id semper risus. Commodo elit at imperdiet dui accumsan sit amet nulla facilisi. Scelerisque viverra mauris in aliquam. A erat nam at lectus. Egestas purus viverra accumsan in nisl nisi scelerisque. Habitant morbi tristique senectus et netus. Congue nisi vitae suscipit tellus mauris a diam maecenas sed.', + name: 'Amani Farooque', cityCoordinate: { latitude: 38.936519622802734, longitude: -77.18428039550781 }, c_allstateLadyCTA: { - label: "Learn More", - linkType: "URL", - link: "http://yext.com" - }, - c_employeeCity: "Tysons Corner", - c_employeeCountry: "United States", - c_employeeDepartment: "Consulting", - c_employeeRegion: "Virginia", - c_employeeTitle: "Associate Technical Project Manager", + label: 'Learn More', + linkType: 'URL', + link: 'http://yext.com' + }, + c_employeeCity: 'Tysons Corner', + c_employeeCountry: 'United States', + c_employeeDepartment: 'Consulting', + c_employeeRegion: 'Virginia', + c_employeeTitle: 'Associate Technical Project Manager', c_oliverCta: { - url: "https://www.yext.com/s/2287528/entity/edit2?entityIds=13411251", - icon: "yext", - label: "test cta" + url: 'https://www.yext.com/s/2287528/entity/edit2?entityIds=13411251', + icon: 'yext', + label: 'test cta' }, - c_startDate: "2017-09-18", + c_startDate: '2017-09-18', displayCoordinate: { latitude: 38.924648, longitude: -77.216859 }, emails: [ - "afarooque@yext.com", - "af@yext.com", - "aplomb@yext.com" + 'afarooque@yext.com', + 'af@yext.com', + 'aplomb@yext.com' ], - firstName: "Amani", + firstName: 'Amani', geocodedCoordinate: { latitude: 38.924654, longitude: -77.216891 }, headshot: { - url: "http://a.mktgcdn.com/p/bmc3W88h2mMRXk-wHQ7dB0Em4rR_dfia6OVrAK3LjYU/192x191.png", + url: 'http://a.mktgcdn.com/p/bmc3W88h2mMRXk-wHQ7dB0Em4rR_dfia6OVrAK3LjYU/192x191.png', width: 192, height: 191, - sourceUrl: "http://a.mktgcdn.com/p/bmc3W88h2mMRXk-wHQ7dB0Em4rR_dfia6OVrAK3LjYU/192x191.png" + sourceUrl: 'http://a.mktgcdn.com/p/bmc3W88h2mMRXk-wHQ7dB0Em4rR_dfia6OVrAK3LjYU/192x191.png' }, languages: [ - "German" + 'German' ], - lastName: "Farooque", - mainPhone: "+18003332222", + lastName: 'Farooque', + mainPhone: '+18003332222', routableCoordinate: { latitude: 38.9242966, longitude: -77.2177549 }, specialities: [ - "Documentation", - "Coding" + 'Documentation', + 'Coding' ], websiteUrl: { - url: "http://www.test.com", - displayUrl: "http://www.testdisplay.com", + url: 'http://www.test.com', + displayUrl: 'http://www.testdisplay.com', preferDisplayUrl: true }, yextDisplayCoordinate: { @@ -93,7 +93,7 @@ export const verticalQueryResponseWithNlpFilters = { latitude: 38.9242966, longitude: -77.2177549 }, - uid: "18716057" + uid: '18716057' }, highlightedFields: {}, distance: 29722, @@ -101,53 +101,53 @@ export const verticalQueryResponseWithNlpFilters = { }, { data: { - id: "Employee-2143", - type: "ce_person", + id: 'Employee-2143', + type: 'ce_person', address: { - line1: "7900 Westpark Drive", - city: "Mclean", - region: "VA", - postalCode: "22102", - countryCode: "US" - }, - description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Tristique senectus et netus et malesuada fames ac turpis. Porttitor eget dolor morbi non arcu risus quis. Tempor orci dapibus ultrices in iaculis. Viverra tellus in hac habitasse platea dictumst vestibulum rhoncus est. Eleifend donec pretium vulputate sapien nec. Ornare suspendisse sed nisi lacus sed viverra tellus in hac. Morbi tristique senectus et netus et malesuada. Vel pharetra vel turpis nunc eget lorem dolor sed viverra. Sapien nec sagittis aliquam malesuada.\n\nAt lectus urna duis convallis convallis tellus. Luctus venenatis lectus magna fringilla urna porttitor rhoncus. Blandit volutpat maecenas volutpat blandit aliquam etiam erat velit. Amet dictum sit amet justo donec enim diam vulputate ut. Ultrices in iaculis nunc sed augue lacus viverra. Feugiat sed lectus vestibulum mattis ullamcorper velit. Euismod quis viverra nibh cras pulvinar mattis nunc sed blandit. In hac habitasse platea dictumst quisque. In aliquam sem fringilla ut morbi tincidunt augue interdum velit. At erat pellentesque adipiscing commodo elit at.\n\nNunc aliquet bibendum enim facilisis gravida neque. Libero id faucibus nisl tincidunt eget nullam. Ullamcorper dignissim cras tincidunt lobortis. Condimentum id venenatis a condimentum. Sit amet dictum sit amet justo. Ac placerat vestibulum lectus mauris ultrices eros in. Cras sed felis eget velit aliquet sagittis id consectetur purus. Auctor urna nunc id cursus. Arcu non odio euismod lacinia at. Neque convallis a cras semper auctor neque vitae. Adipiscing elit pellentesque habitant morbi tristique. Commodo sed egestas egestas fringilla phasellus faucibus scelerisque eleifend. Scelerisque eu ultrices vitae auctor eu augue ut lectus. In vitae turpis massa sed elementum. Nibh sit amet commodo nulla facilisi nullam vehicula ipsum a. Vitae suscipit tellus mauris a diam maecenas sed enim. Volutpat blandit aliquam etiam erat velit scelerisque.", - name: "Tom Meyer", + line1: '7900 Westpark Drive', + city: 'Mclean', + region: 'VA', + postalCode: '22102', + countryCode: 'US' + }, + description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Tristique senectus et netus et malesuada fames ac turpis. Porttitor eget dolor morbi non arcu risus quis. Tempor orci dapibus ultrices in iaculis. Viverra tellus in hac habitasse platea dictumst vestibulum rhoncus est. Eleifend donec pretium vulputate sapien nec. Ornare suspendisse sed nisi lacus sed viverra tellus in hac. Morbi tristique senectus et netus et malesuada. Vel pharetra vel turpis nunc eget lorem dolor sed viverra. Sapien nec sagittis aliquam malesuada.\n\nAt lectus urna duis convallis convallis tellus. Luctus venenatis lectus magna fringilla urna porttitor rhoncus. Blandit volutpat maecenas volutpat blandit aliquam etiam erat velit. Amet dictum sit amet justo donec enim diam vulputate ut. Ultrices in iaculis nunc sed augue lacus viverra. Feugiat sed lectus vestibulum mattis ullamcorper velit. Euismod quis viverra nibh cras pulvinar mattis nunc sed blandit. In hac habitasse platea dictumst quisque. In aliquam sem fringilla ut morbi tincidunt augue interdum velit. At erat pellentesque adipiscing commodo elit at.\n\nNunc aliquet bibendum enim facilisis gravida neque. Libero id faucibus nisl tincidunt eget nullam. Ullamcorper dignissim cras tincidunt lobortis. Condimentum id venenatis a condimentum. Sit amet dictum sit amet justo. Ac placerat vestibulum lectus mauris ultrices eros in. Cras sed felis eget velit aliquet sagittis id consectetur purus. Auctor urna nunc id cursus. Arcu non odio euismod lacinia at. Neque convallis a cras semper auctor neque vitae. Adipiscing elit pellentesque habitant morbi tristique. Commodo sed egestas egestas fringilla phasellus faucibus scelerisque eleifend. Scelerisque eu ultrices vitae auctor eu augue ut lectus. In vitae turpis massa sed elementum. Nibh sit amet commodo nulla facilisi nullam vehicula ipsum a. Vitae suscipit tellus mauris a diam maecenas sed enim. Volutpat blandit aliquam etiam erat velit scelerisque.', + name: 'Tom Meyer', cityCoordinate: { latitude: 38.936519622802734, longitude: -77.18428039550781 }, c_allstateLadyCTA: { - label: "Learn More", - linkType: "URL", - link: "http://yext.com" - }, - c_employeeCity: "Tysons Corner", - c_employeeCountry: "United States", - c_employeeDepartment: "Technology", - c_employeeRegion: "Virginia", - c_employeeTitle: "Software Engineer", - c_myRichTextField: "++Underlined stuff++ \n**Bold stuff**\n\n1. One\n2. Two\n3. *Three*", - c_popularity: "1.0", - c_startDate: "2017-09-05", + label: 'Learn More', + linkType: 'URL', + link: 'http://yext.com' + }, + c_employeeCity: 'Tysons Corner', + c_employeeCountry: 'United States', + c_employeeDepartment: 'Technology', + c_employeeRegion: 'Virginia', + c_employeeTitle: 'Software Engineer', + c_myRichTextField: '++Underlined stuff++ \n**Bold stuff**\n\n1. One\n2. Two\n3. *Three*', + c_popularity: '1.0', + c_startDate: '2017-09-05', displayCoordinate: { latitude: 38.924648, longitude: -77.216859 }, emails: [ - "tmeyer@yext.com" + 'tmeyer@yext.com' ], - firstName: "Tom", + firstName: 'Tom', geocodedCoordinate: { latitude: 38.924654, longitude: -77.216891 }, headshot: { - url: "https://a.mktgcdn.com/p/cb9jR0A19ADuKc7ExlWmHaDchPW_61IR5TZ5G7NApjY/139x140.jpg", + url: 'https://a.mktgcdn.com/p/cb9jR0A19ADuKc7ExlWmHaDchPW_61IR5TZ5G7NApjY/139x140.jpg', width: 139, height: 140, - sourceUrl: "https://a.mktgcdn.com/p/cb9jR0A19ADuKc7ExlWmHaDchPW_61IR5TZ5G7NApjY/139x140.jpg" + sourceUrl: 'https://a.mktgcdn.com/p/cb9jR0A19ADuKc7ExlWmHaDchPW_61IR5TZ5G7NApjY/139x140.jpg' }, - lastName: "Meyer", + lastName: 'Meyer', routableCoordinate: { latitude: 38.9242966, longitude: -77.2177549 @@ -160,7 +160,7 @@ export const verticalQueryResponseWithNlpFilters = { latitude: 38.9242966, longitude: -77.2177549 }, - uid: "18716864" + uid: '18716864' }, highlightedFields: {}, distance: 29722, @@ -168,136 +168,136 @@ export const verticalQueryResponseWithNlpFilters = { }, { data: { - id: "4880570941877725281", - type: "ce_person", + id: '4880570941877725281', + type: 'ce_person', outdoorPoolCount: 5, time: { - start: "2020-04-08T13:00", - end: "2020-04-15T14:00" + start: '2020-04-08T13:00', + end: '2020-04-15T14:00' }, address: { - line1: "7900 Westpark Drive", - city: "Mclean", - region: "VA", - postalCode: "22102", - countryCode: "US" - }, - description: "hai hai kazuma-desu the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team", - name: "Oliver Shi", + line1: '7900 Westpark Drive', + city: 'Mclean', + region: 'VA', + postalCode: '22102', + countryCode: 'US' + }, + description: 'hai hai kazuma-desu the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team the cowboys are the best team', + name: 'Oliver Shi', cityCoordinate: { latitude: 38.936519622802734, longitude: -77.18428039550781 }, c_allstateLadyCTA: { - label: "Learn More", - linkType: "URL", - link: "http://yext.com" + label: 'Learn More', + linkType: 'URL', + link: 'http://yext.com' }, - c_myRichTextField: "++Underlined++ \n**Bolded**\n\n1. **One**\n2. *Two*\n3. Three\n\n\\\\u003cdiv\\\\u003eDang\\\\u003c/div\\\\u003e", + c_myRichTextField: '++Underlined++ \n**Bolded**\n\n1. **One**\n2. *Two*\n3. Three\n\n\\\\u003cdiv\\\\u003eDang\\\\u003c/div\\\\u003e', c_nestedBoy: { waifus: { anime: { - a: "waifu", - b: "koko" + a: 'waifu', + b: 'koko' }, games: { - c: "waifu", - d: "hi" + c: 'waifu', + d: 'hi' }, life: { - e: "kaga", - f: "baba" + e: 'kaga', + f: 'baba' } }, husbandos: { a: { - a: "yaga", - b: "haha" + a: 'yaga', + b: 'haha' }, b: { - c: "lala", - d: "kaka" + c: 'lala', + d: 'kaka' }, c: { - e: "kaga", - f: "lala" + e: 'kaga', + f: 'lala' } } }, c_nestedTextLists: [ { textlist: [ - "weeb", - "lord", - "poggers" + 'weeb', + 'lord', + 'poggers' ], struct: { nested_list1: [ - "weeber", - "weeb" + 'weeber', + 'weeb' ], nested_list2: [ - "weeb", - "weweb weeb weeb", - "haha ohaiyo", - "weeber" + 'weeb', + 'weweb weeb weeb', + 'haha ohaiyo', + 'weeber' ] } } ], c_oliverCta: { - url: "https://google.com", - icon: "yext", - label: "please update" + url: 'https://google.com', + icon: 'yext', + label: 'please update' }, c_secondCTA: true, - c_startDate: "2019-08-05", - c_string1: "stringy", - c_terminationDate: "2020-01-01", + c_startDate: '2019-08-05', + c_string1: 'stringy', + c_terminationDate: '2020-01-01', displayCoordinate: { latitude: 38.924648, longitude: -77.216859 }, - firstName: "Oliver", - gender: "Male", + firstName: 'Oliver', + gender: 'Male', geocodedCoordinate: { latitude: 38.924654, longitude: -77.216891 }, headshot: { - url: "https://a.mktgcdn.com/p/3Obc6RedOylBSTOj_DOT8BHMwp6_-ltsE0lCrZS6PGc/1200x1200.jpg", + url: 'https://a.mktgcdn.com/p/3Obc6RedOylBSTOj_DOT8BHMwp6_-ltsE0lCrZS6PGc/1200x1200.jpg', width: 1200, height: 1200, - sourceUrl: "https://a.mktgcdn.com/p/3Obc6RedOylBSTOj_DOT8BHMwp6_-ltsE0lCrZS6PGc/1200x1200.jpg", + sourceUrl: 'https://a.mktgcdn.com/p/3Obc6RedOylBSTOj_DOT8BHMwp6_-ltsE0lCrZS6PGc/1200x1200.jpg', thumbnails: [ { - url: "https://a.mktgcdn.com/p/3Obc6RedOylBSTOj_DOT8BHMwp6_-ltsE0lCrZS6PGc/619x619.jpg", + url: 'https://a.mktgcdn.com/p/3Obc6RedOylBSTOj_DOT8BHMwp6_-ltsE0lCrZS6PGc/619x619.jpg', width: 619, height: 619 }, { - url: "https://a.mktgcdn.com/p/3Obc6RedOylBSTOj_DOT8BHMwp6_-ltsE0lCrZS6PGc/450x450.jpg", + url: 'https://a.mktgcdn.com/p/3Obc6RedOylBSTOj_DOT8BHMwp6_-ltsE0lCrZS6PGc/450x450.jpg', width: 450, height: 450 }, { - url: "https://a.mktgcdn.com/p/3Obc6RedOylBSTOj_DOT8BHMwp6_-ltsE0lCrZS6PGc/196x196.jpg", + url: 'https://a.mktgcdn.com/p/3Obc6RedOylBSTOj_DOT8BHMwp6_-ltsE0lCrZS6PGc/196x196.jpg', width: 196, height: 196 } ] }, keywords: [ - "otaku", - "aKeyword", - "highlight me!" + 'otaku', + 'aKeyword', + 'highlight me!' ], languages: [ - "english", - "englangdo", - "chinese" + 'english', + 'englangdo', + 'chinese' ], - lastName: "Shi", + lastName: 'Shi', routableCoordinate: { latitude: 38.9242966, longitude: -77.2177549 @@ -310,7 +310,7 @@ export const verticalQueryResponseWithNlpFilters = { latitude: 38.9242966, longitude: -77.2177549 }, - uid: "18717130" + uid: '18717130' }, highlightedFields: {}, distance: 29722, @@ -318,56 +318,56 @@ export const verticalQueryResponseWithNlpFilters = { }, { data: { - id: "Employee-718", - type: "ce_person", + id: 'Employee-718', + type: 'ce_person', address: { - line1: "1481 N Dupont Hwy", - city: "Dover", - region: "DE", - postalCode: "19901", - countryCode: "US" + line1: '1481 N Dupont Hwy', + city: 'Dover', + region: 'DE', + postalCode: '19901', + countryCode: 'US' }, - name: "Mike Peralta", + name: 'Mike Peralta', cityCoordinate: { latitude: 39.161544, longitude: -75.513578 }, c_allstateLadyCTA: { - label: "Learn More", - linkType: "URL", - link: "http://yext.com" - }, - c_employeeCountry: "United States", - c_employeeDepartment: "Business Applications", - c_employeeRegion: "New York", - c_employeeTitle: "Program Manager, Business Insights", - c_startDate: "2013-07-30", + label: 'Learn More', + linkType: 'URL', + link: 'http://yext.com' + }, + c_employeeCountry: 'United States', + c_employeeDepartment: 'Business Applications', + c_employeeRegion: 'New York', + c_employeeTitle: 'Program Manager, Business Insights', + c_startDate: '2013-07-30', displayCoordinate: { latitude: 39.1940793, longitude: -75.5465376 }, emails: [ - "mperalta@yext.com" + 'mperalta@yext.com' ], - firstName: "Mike", + firstName: 'Mike', geocodedCoordinate: { latitude: 39.1940793, longitude: -75.5465376 }, headshot: { - url: "http://a.mktgcdn.com/p/8a6ix28DnWPS4CrO0GTRs3WFjvlBdLAkTs8UqgXZdQI/400x400.jpg", + url: 'http://a.mktgcdn.com/p/8a6ix28DnWPS4CrO0GTRs3WFjvlBdLAkTs8UqgXZdQI/400x400.jpg', width: 400, height: 400, - sourceUrl: "http://a.mktgcdn.com/p/8a6ix28DnWPS4CrO0GTRs3WFjvlBdLAkTs8UqgXZdQI/400x400.jpg", + sourceUrl: 'http://a.mktgcdn.com/p/8a6ix28DnWPS4CrO0GTRs3WFjvlBdLAkTs8UqgXZdQI/400x400.jpg', thumbnails: [ { - url: "http://a.mktgcdn.com/p/8a6ix28DnWPS4CrO0GTRs3WFjvlBdLAkTs8UqgXZdQI/196x196.jpg", + url: 'http://a.mktgcdn.com/p/8a6ix28DnWPS4CrO0GTRs3WFjvlBdLAkTs8UqgXZdQI/196x196.jpg', width: 196, height: 196 } ] }, - lastName: "Peralta", + lastName: 'Peralta', routableCoordinate: { latitude: 39.1938245, longitude: -75.54686 @@ -380,7 +380,7 @@ export const verticalQueryResponseWithNlpFilters = { latitude: 39.1938245, longitude: -75.54686 }, - uid: "18717550" + uid: '18717550' }, highlightedFields: {}, distance: 173038, @@ -389,20 +389,20 @@ export const verticalQueryResponseWithNlpFilters = { ], appliedQueryFilters: [ { - displayKey: "Location", - displayValue: "Virginia", + displayKey: 'Location', + displayValue: 'Virginia', filter: { - "builtin.location": { - $eq: "P-region.7919684583758790" + 'builtin.location': { + $eq: 'P-region.7919684583758790' } }, - type: "PLACE", + type: 'PLACE', details: { latitude: 37.677592044, longitude: -78.6190526172645, - placeName: "Virginia, United States", + placeName: 'Virginia, United States', featureTypes: [ - "region" + 'region' ], boundingBox: { minLatitude: 36.540855, @@ -415,164 +415,164 @@ export const verticalQueryResponseWithNlpFilters = { ], facets: [ { - fieldId: "c_puppyPreference", - displayName: "Puppy Preference", + fieldId: 'c_puppyPreference', + displayName: 'Puppy Preference', options: [] }, { - fieldId: "brands", - displayName: "Brands", + fieldId: 'brands', + displayName: 'Brands', options: [] }, { - fieldId: "c_employeeDepartment", - displayName: "Employee Department", + fieldId: 'c_employeeDepartment', + displayName: 'Employee Department', options: [ { - displayName: "Business Applications", + displayName: 'Business Applications', count: 1, selected: false, filter: { c_employeeDepartment: { - $eq: "Business Applications" + $eq: 'Business Applications' } } }, { - displayName: "Consulting", + displayName: 'Consulting', count: 1, selected: false, filter: { c_employeeDepartment: { - $eq: "Consulting" + $eq: 'Consulting' } } }, { - displayName: "Technology", + displayName: 'Technology', count: 1, selected: false, filter: { c_employeeDepartment: { - $eq: "Technology" + $eq: 'Technology' } } } ] }, { - fieldId: "c_popularity", - displayName: "Popularity", + fieldId: 'c_popularity', + displayName: 'Popularity', options: [] }, { - fieldId: "c_terminationDate", - displayName: "Termination Date", + fieldId: 'c_terminationDate', + displayName: 'Termination Date', options: [] }, { - fieldId: "c_cellPhone", - displayName: "Cell Phone", + fieldId: 'c_cellPhone', + displayName: 'Cell Phone', options: [] }, { - fieldId: "c_startDate", - displayName: "Start Date", + fieldId: 'c_startDate', + displayName: 'Start Date', options: [] }, { - fieldId: "languages", - displayName: "Languages", + fieldId: 'languages', + displayName: 'Languages', options: [ { - displayName: "chinese", + displayName: 'chinese', count: 1, selected: false, filter: { languages: { - $eq: "chinese" + $eq: 'chinese' } } }, { - displayName: "englangdo", + displayName: 'englangdo', count: 1, selected: false, filter: { languages: { - $eq: "englangdo" + $eq: 'englangdo' } } }, { - displayName: "english", + displayName: 'english', count: 1, selected: false, filter: { languages: { - $eq: "english" + $eq: 'english' } } }, { - displayName: "German", + displayName: 'German', count: 1, selected: false, filter: { languages: { - $eq: "German" + $eq: 'German' } } } ] }, { - fieldId: "services", - displayName: "Services", + fieldId: 'services', + displayName: 'Services', options: [] }, { - fieldId: "specialities", - displayName: "Specialties", + fieldId: 'specialities', + displayName: 'Specialties', options: [ { - displayName: "Coding", + displayName: 'Coding', count: 1, selected: false, filter: { specialities: { - $eq: "Coding" + $eq: 'Coding' } } }, { - displayName: "Documentation", + displayName: 'Documentation', count: 1, selected: false, filter: { specialities: { - $eq: "Documentation" + $eq: 'Documentation' } } } ] }, { - fieldId: "products", - displayName: "Products", + fieldId: 'products', + displayName: 'Products', options: [] } ], - source: "KNOWLEDGE_MANAGER", + source: 'KNOWLEDGE_MANAGER', searchIntents: [], locationBias: { latitude: 39.0437, longitude: -77.4875, - locationDisplayName: "Ashburn, Virginia, United States", - accuracy: "IP" + locationDisplayName: 'Ashburn, Virginia, United States', + accuracy: 'IP' } } -} +}; export const verticalQueryResponse = { meta: { diff --git a/tests/setup/server.ts b/tests/setup/server.ts index 72969c2..29a06c0 100644 --- a/tests/setup/server.ts +++ b/tests/setup/server.ts @@ -7,7 +7,7 @@ import { universalQueryResponse, universalQueryResponseWithFilters } from './res const handlers = [ rest.get(/answers\/vertical\/query/, (req, res, ctx) => { const input = req.url.searchParams.get('input'); - switch(input) { + switch (input) { case 'resultsWithNlpFilter': return res( ctx.json(verticalQueryResponseWithNlpFilters), @@ -20,7 +20,7 @@ const handlers = [ }), rest.get(/answers\/query/, (req, res, ctx) => { const input = req.url.searchParams.get('input'); - switch(input) { + switch (input) { case 'resultsWithFilter': return res( ctx.json(universalQueryResponseWithFilters), diff --git a/tests/useAnswersActions.test.tsx b/tests/useAnswersActions.test.tsx index 3ec31d8..87b0ee3 100644 --- a/tests/useAnswersActions.test.tsx +++ b/tests/useAnswersActions.test.tsx @@ -8,11 +8,9 @@ it('invoke useAnswersActions outside of AnswersHeadlessProvider', () => { return
Test
; } jest.spyOn(global.console, 'error').mockImplementation(); - try { - render(); - } catch(e) { - expect(e).toEqual(new Error('Attempted to call useAnswersActions() outside of AnswersHeadlessProvider.' - + ' Please ensure that \'useAnswersActions()\' is called within an AnswersHeadlessProvider component.')); - } + const expectedError = new Error( + 'Attempted to call useAnswersActions() outside of AnswersHeadlessProvider.' + + ' Please ensure that \'useAnswersActions()\' is called within an AnswersHeadlessProvider component.'); + expect(() => render()).toThrow(expectedError); jest.clearAllMocks(); }); \ No newline at end of file diff --git a/tests/useAnswersState.test.tsx b/tests/useAnswersState.test.tsx index 4f5d178..c3705ae 100644 --- a/tests/useAnswersState.test.tsx +++ b/tests/useAnswersState.test.tsx @@ -10,12 +10,10 @@ it('invoke useAnswersState outside of AnswersHeadlessProvider', () => { return
{query}
; } jest.spyOn(global.console, 'error').mockImplementation(); - try { - render(); - } catch(e) { - expect(e).toEqual(new Error('Attempted to call useAnswersState() outside of AnswersHeadlessProvider.' - + ' Please ensure that \'useAnswersState()\' is called within an AnswersHeadlessProvider component.')); - } + const expectedError = new Error( + 'Attempted to call useAnswersState() outside of AnswersHeadlessProvider.' + + ' Please ensure that \'useAnswersState()\' is called within an AnswersHeadlessProvider component.'); + expect(() => render()).toThrow(expectedError); jest.clearAllMocks(); }); @@ -70,19 +68,17 @@ it('does not perform extra renders/listener registrations for nested components' expect(parentStateUpdates).toHaveLength(1); expect(childStateUpdates).toHaveLength(0); - await act(async () => { - userEvent.click(screen.getByText('Search')); - await pendingVerticalQuery; - }); + userEvent.click(screen.getByText('Search')); + await pendingVerticalQuery; + // Check that only a single addListener call is made for the conditionally rendered Child expect(addListenerSpy).toHaveBeenCalledTimes(2); expect(parentStateUpdates).toHaveLength(2); expect(childStateUpdates).toHaveLength(1); - await act(async () => { - userEvent.click(screen.getByText('Search')); - await pendingVerticalQuery; - }); + userEvent.click(screen.getByText('Search')); + await pendingVerticalQuery; + // Check that additional addListener calls are not made expect(addListenerSpy).toHaveBeenCalledTimes(2); expect(parentStateUpdates).toHaveLength(3); @@ -142,7 +138,7 @@ describe('uses the most recent selector',() => { expect(screen.getByTestId('selected-state')).toHaveTextContent('initial selector'); selector = () => 'new selector'; - act(() => userEvent.click(screen.getByText('rerender'))); + userEvent.click(screen.getByText('rerender')); expect(screen.getByTestId('selected-state')).toHaveTextContent('new selector'); }); @@ -176,13 +172,12 @@ describe('uses the most recent selector',() => { ); expect(stateUpdates).toEqual(['initial value']); - act(() => { - let numNewSelectorCalls = 0; - selector = () => { - return ++numNewSelectorCalls; - }; - userEvent.click(screen.getByText('rerender')); - }); + let numNewSelectorCalls = 0; + selector = () => { + return ++numNewSelectorCalls; + }; + userEvent.click(screen.getByText('rerender')); + expect(stateUpdates).toEqual(['initial value', 1]); act(() => { From 4032123208ba706f5cbc460ceb0c259f1c59f815 Mon Sep 17 00:00:00 2001 From: nmanu1 <88398086+nmanu1@users.noreply.github.com> Date: Mon, 11 Apr 2022 11:02:36 -0400 Subject: [PATCH 15/22] Update Headless version (#113) --- THIRD-PARTY-NOTICES | 4 ++-- package-lock.json | 34 +++++++++++++++++----------------- package.json | 4 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 4a4424b..623388c 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -62,7 +62,7 @@ SOFTWARE. The following NPM package may be included in this product: - - @yext/answers-core@1.6.0-beta.6 + - @yext/answers-core@1.6.0-beta.7 This package contains the following license and notice below: @@ -100,7 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.11 + - @yext/answers-headless@1.1.0-beta.12 This package contains the following license and notice below: diff --git a/package-lock.json b/package-lock.json index ef2a55f..b579ad1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.10", + "version": "1.1.0-beta.11", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.9", + "version": "1.1.0-beta.11", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.11" + "@yext/answers-headless": "^1.1.0-beta.12" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -3811,9 +3811,9 @@ } }, "node_modules/@yext/answers-core": { - "version": "1.6.0-beta.6", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.6.tgz", - "integrity": "sha512-J52ocSXJn51bbWGeBSQhdxKP7pJGJoV4qxWoWRBKGLz/sYgfYCIBiIg0bRuTlUtESxA5ErO/+/iEz8oblE50dg==", + "version": "1.6.0-beta.7", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.7.tgz", + "integrity": "sha512-xUr+VdhG/LZil/juWTdS19nNcYf8N4xvllAhJg6+Gapdq5KbIbAsaYrUeTs1lb5EJqY9y52ctdN1ld7UWJjTsQ==", "dependencies": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.5" @@ -3823,12 +3823,12 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.11", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.11.tgz", - "integrity": "sha512-guhlmRxma/qyPCDhNgYTULPazVWlRzNNKaEyCkKVgheRIIhaCqd2217VMliBe5Hqh4YYe1E6ojifV+eww6CZCQ==", + "version": "1.1.0-beta.12", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.12.tgz", + "integrity": "sha512-LsnuXLdVfVf6QqKQ8BWatHMhgqgfwSRvvn9ZvLbKZdG+nihhLoYgMm+UuSaH5ZOE+BJ50dYLfKqullRyywtUTA==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.6", + "@yext/answers-core": "^1.6.0-beta.7", "js-levenshtein": "^1.1.6", "lodash": "^4.17.21", "redux-thunk": "^2.4.1" @@ -14501,21 +14501,21 @@ "dev": true }, "@yext/answers-core": { - "version": "1.6.0-beta.6", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.6.tgz", - "integrity": "sha512-J52ocSXJn51bbWGeBSQhdxKP7pJGJoV4qxWoWRBKGLz/sYgfYCIBiIg0bRuTlUtESxA5ErO/+/iEz8oblE50dg==", + "version": "1.6.0-beta.7", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.7.tgz", + "integrity": "sha512-xUr+VdhG/LZil/juWTdS19nNcYf8N4xvllAhJg6+Gapdq5KbIbAsaYrUeTs1lb5EJqY9y52ctdN1ld7UWJjTsQ==", "requires": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.5" } }, "@yext/answers-headless": { - "version": "1.1.0-beta.11", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.11.tgz", - "integrity": "sha512-guhlmRxma/qyPCDhNgYTULPazVWlRzNNKaEyCkKVgheRIIhaCqd2217VMliBe5Hqh4YYe1E6ojifV+eww6CZCQ==", + "version": "1.1.0-beta.12", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.12.tgz", + "integrity": "sha512-LsnuXLdVfVf6QqKQ8BWatHMhgqgfwSRvvn9ZvLbKZdG+nihhLoYgMm+UuSaH5ZOE+BJ50dYLfKqullRyywtUTA==", "requires": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.6", + "@yext/answers-core": "^1.6.0-beta.7", "js-levenshtein": "^1.1.6", "lodash": "^4.17.21", "redux-thunk": "^2.4.1" diff --git a/package.json b/package.json index 2bd19e8..b222e83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.10", + "version": "1.1.0-beta.11", "types": "./lib/src/index.d.ts", "main": "./lib/src/index.js", "module": "./lib/src/index.js", @@ -16,7 +16,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.11" + "@yext/answers-headless": "^1.1.0-beta.12" }, "devDependencies": { "@babel/preset-env": "^7.16.5", From c51aea7cbec18bd9ee931ed7dcc30ce349426060 Mon Sep 17 00:00:00 2001 From: nmanu1 <88398086+nmanu1@users.noreply.github.com> Date: Fri, 22 Apr 2022 11:26:46 -0400 Subject: [PATCH 16/22] Use reusable workflows (#114) Update the github workflows to use the callable workflows in the `slapshot-reusable-workflows` repo. J=SLAP-2005 TEST=auto - See that all three workflows run on this PR as expected. - Test on another branch (`dev/test-reusable-workflows`) and see that third party notices are updated when needed. --- .github/workflows/coverage.yml | 19 ++++--------------- .github/workflows/run-tests.yml | 18 ++---------------- .../workflows/third_party_notices_check.yml | 18 ++---------------- 3 files changed, 8 insertions(+), 47 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 1bfa30c..2c0064f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -9,18 +9,7 @@ on: pull_request: jobs: - Coveralls: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v2 - with: - node-version: 16.x - - run: npm ci - - run: npx jest --coverage - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + call_code_coverage: + uses: yext/slapshot-reusable-workflows/.github/workflows/coverage.yml@v1 + secrets: + caller_github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2d8dc36..2112cb5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -6,19 +6,5 @@ name: Run Tests on: [push, pull_request] jobs: - tests: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x, 14.x, 16.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build - - run: npm test \ No newline at end of file + call_run_tests: + uses: yext/slapshot-reusable-workflows/.github/workflows/run_tests.yml@v1 diff --git a/.github/workflows/third_party_notices_check.yml b/.github/workflows/third_party_notices_check.yml index 2f532a1..395fdf2 100644 --- a/.github/workflows/third_party_notices_check.yml +++ b/.github/workflows/third_party_notices_check.yml @@ -3,19 +3,5 @@ name: Check Third Party Notices File on: pull_request jobs: - license-check: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-node@v2 - with: - node-version: 16.x - - uses: actions/checkout@v2 - - run: npm ci - - run: npm run generate-notices - - name: Update THIRD-PARTY-NOTICES - uses: EndBug/add-and-commit@v7 - with: - message: "Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check" - add: 'THIRD-PARTY-NOTICES' - push: true - default_author: github_actions + call_notices_check: + uses: yext/slapshot-reusable-workflows/.github/workflows/third_party_notices_check.yml@v1 From 25d21c2af8ad98f7ea1bd813198eccd754bf95da Mon Sep 17 00:00:00 2001 From: cea2aj <42848445+cea2aj@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:42:00 -0400 Subject: [PATCH 17/22] SSR Support (#115) Add SSR support by adding "type": "module" and useIsomorphicLayoutEffect By setting "type": "module", node treats the javascript files within the package as ES modules. Since some of the config files are CJS, we need to indicate that by updating the file extension from '.js' to '.cjs' or else node 16+ will throw an error J=none TEST=manual Connect this to the [ SSR Support ](https://github.com/yext/answers-react-components/pull/125) branch in the component library and smoke test with the Yext Sites starter --- .eslintrc.js => .eslintrc.cjs | 0 THIRD-PARTY-NOTICES | 30 ++++++++++++++++++++++ babel.config.js => babel.config.cjs | 0 package-lock.json | 40 +++++++++++++++++++---------- package.json | 6 +++-- src/useAnswersState.tsx | 3 ++- src/utils/acquireSessionId.ts | 6 ++++- 7 files changed, 67 insertions(+), 18 deletions(-) rename .eslintrc.js => .eslintrc.cjs (100%) rename babel.config.js => babel.config.cjs (100%) diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 100% rename from .eslintrc.js rename to .eslintrc.cjs diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 623388c..865a153 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -593,6 +593,36 @@ This package contains the following license and notice below: ----------- +The following NPM package may be included in this product: + + - use-isomorphic-layout-effect@1.1.2 + +This package contains the following license and notice below: + +MIT License + +Copyright (c) Mateusz Burzyński + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + The following NPM package may be included in this product: - webidl-conversions@3.0.1 diff --git a/babel.config.js b/babel.config.cjs similarity index 100% rename from babel.config.js rename to babel.config.cjs diff --git a/package-lock.json b/package-lock.json index b579ad1..c8f8ec0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,15 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.11", + "version": "1.1.0-beta.12", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.11", + "version": "1.1.0-beta.12", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.12" + "@yext/answers-headless": "^1.1.0-beta.12", + "use-isomorphic-layout-effect": "^1.1.2" }, "devDependencies": { "@babel/preset-env": "^7.16.5", @@ -8940,8 +8941,7 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "devOptional": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "3.14.1", @@ -9203,7 +9203,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "devOptional": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -9722,7 +9721,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -10249,7 +10247,6 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "devOptional": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -11474,6 +11471,19 @@ "punycode": "^2.1.0" } }, + "node_modules/use-isomorphic-layout-effect": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz", + "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -18334,8 +18344,7 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "devOptional": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { "version": "3.14.1", @@ -18549,7 +18558,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "devOptional": true, "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } @@ -18955,8 +18963,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "devOptional": true + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-inspect": { "version": "1.11.1", @@ -19343,7 +19350,6 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "devOptional": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -20286,6 +20292,12 @@ "punycode": "^2.1.0" } }, + "use-isomorphic-layout-effect": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz", + "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==", + "requires": {} + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/package.json b/package.json index b222e83..90c7b5b 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.11", + "version": "1.1.0-beta.12", "types": "./lib/src/index.d.ts", "main": "./lib/src/index.js", "module": "./lib/src/index.js", + "type": "module", "files": [ "lib", "src" @@ -16,7 +17,8 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.12" + "@yext/answers-headless": "^1.1.0-beta.12", + "use-isomorphic-layout-effect": "^1.1.2" }, "devDependencies": { "@babel/preset-env": "^7.16.5", diff --git a/src/useAnswersState.tsx b/src/useAnswersState.tsx index af759da..2095ebe 100644 --- a/src/useAnswersState.tsx +++ b/src/useAnswersState.tsx @@ -1,6 +1,7 @@ -import { useContext, useLayoutEffect, useRef, useState } from 'react'; +import { useContext, useRef, useState } from 'react'; import { State } from '@yext/answers-headless'; import { AnswersHeadlessContext } from './AnswersHeadlessContext'; +import useLayoutEffect from 'use-isomorphic-layout-effect'; export type StateSelector = (s: State) => T; diff --git a/src/utils/acquireSessionId.ts b/src/utils/acquireSessionId.ts index 9d53018..c2e6359 100644 --- a/src/utils/acquireSessionId.ts +++ b/src/utils/acquireSessionId.ts @@ -1,9 +1,13 @@ import { v4 as uuidv4 } from 'uuid'; /** * Retrieves session id from local storage, or generates a new uuid to use as session id. - * The new id is then stored in local storage. + * The new id is then stored in local storage. Returns null if the sessionStorage API is + * unavailable. (e.g. The function is running on the server for SSR). */ export default function acquireSessionId(): string | null { + if (typeof(window) === 'undefined') { + return null; + } try { let sessionId = window.sessionStorage.getItem('sessionId'); if (!sessionId) { From 568559a84d444271b8304e4dd238c1149aeb5384 Mon Sep 17 00:00:00 2001 From: Oliver Shi Date: Wed, 4 May 2022 16:15:29 -0400 Subject: [PATCH 18/22] add commonjs support, remove type: module (#118) This PR adds commonjs support by separating the tsconfig into esm and commonjs versions, updating our api extractor config, and using conditional exports to provide the right entry point. At one point, this PR added commonjs support by instead building the library with module: commonjs, and adding a thin esm wrapper to also support es6 syntax. This was in order to prevent the dual package hazard documented in https://nodejs.org/api/packages.html#dual-commonjses-module-packages and https://github.com/GeoffreyBooth/dual-package-hazard/blob/master/index.mjs However, from personal testing vite was not able to tree shake our esm-wrapper. Furthermore, the dual package hazard is primarily a concern when different plugin-like libraries are written around some central library, for example if people were to write extensions of answers-headless-react, and these extensions were written in a mix of only esm and only cjs. Then, users who tried to use both plugins would find themselves with the dual package hazard. This scenario is very unlikely because we can expect the vast majority of new code to be written in esm. As a general trend ESM is the new standard for JS libraries, and is also promoted by typescript. J=SLAP-2074 TEST=manual test that the dev command works - I can hook up a local answers-headless-react to a local project, and changes in answers-headless-react will automatically be reflected in my project test that answers-headless-react works with yext sites SSR in both prod and dev mode this was tested using npm pack --- package.json | 25 +++++++++++++------ ...universal-query.tsx => universal-query.ts} | 0 tsconfig.json => tsconfig.base.json | 2 -- tsconfig.cjs.json | 7 ++++++ tsconfig.esm.json | 7 ++++++ 5 files changed, 31 insertions(+), 10 deletions(-) rename tests/setup/responses/{universal-query.tsx => universal-query.ts} (100%) rename tsconfig.json => tsconfig.base.json (91%) create mode 100644 tsconfig.cjs.json create mode 100644 tsconfig.esm.json diff --git a/package.json b/package.json index 90c7b5b..3e33771 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,22 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.12", - "types": "./lib/src/index.d.ts", - "main": "./lib/src/index.js", - "module": "./lib/src/index.js", - "type": "module", + "version": "1.1.0-beta.13", + "main": "./lib/esm/src/index.js", + "types": "./lib/esm/src/index.d.ts", + "exports": { + "import": "./lib/esm/src/index.js", + "require": "./lib/commonjs/src/index.js" + }, "files": [ "lib", "src" ], "scripts": { - "build": "rm -rf lib/** && tsc", + "build": "rm -rf lib/** && npm run build:esm && npm run build:cjs", + "build:esm": "tsc -p tsconfig.esm.json", + "build:cjs": "tsc -p tsconfig.cjs.json", "prepublishOnly": "npm run build", - "watch": "tsc --watch", + "dev": "tsc --watch -p tsconfig.esm.json", "test": "eslint . && jest", "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, @@ -79,7 +83,12 @@ "testEnvironment": "jsdom", "testMatch": [ "/tests/**/*.(test).ts(x)?" - ] + ], + "globals": { + "ts-jest": { + "tsconfig": "tsconfig.esm.json" + } + } }, "repository": { "type": "git", diff --git a/tests/setup/responses/universal-query.tsx b/tests/setup/responses/universal-query.ts similarity index 100% rename from tests/setup/responses/universal-query.tsx rename to tests/setup/responses/universal-query.ts diff --git a/tsconfig.json b/tsconfig.base.json similarity index 91% rename from tsconfig.json rename to tsconfig.base.json index b93c1a9..53cc339 100644 --- a/tsconfig.json +++ b/tsconfig.base.json @@ -5,10 +5,8 @@ "@yext/answers-headless-react": ["src"] }, "target": "es2015", - "outDir": "lib", "esModuleInterop": true, "strict": true, - "module": "esnext", "skipLibCheck": true, "noImplicitAny": false, "moduleResolution": "node", diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json new file mode 100644 index 0000000..923fcae --- /dev/null +++ b/tsconfig.cjs.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "lib/commonjs" + } +} \ No newline at end of file diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 100644 index 0000000..8c3c701 --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "module": "esnext", + "outDir": "lib/esm", + } +} \ No newline at end of file From dcd0f41346375dfacb07137a5b1b190577d6b875 Mon Sep 17 00:00:00 2001 From: Yen Truong <36055303+yen-tt@users.noreply.github.com> Date: Fri, 6 May 2022 08:38:38 -0400 Subject: [PATCH 19/22] use repo scoped token in third_party_notices action (#119) use repo scoped token for workflows with EndBug/add-and-commit github action so the automated commit from that action will trigger a rerun of the github actions in the pr. J=SLAP-2044 TEST=manual add new dependency to repo. See that third_party_notices_check made an automated commit and reran other github actions. --- .github/workflows/third_party_notices_check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/third_party_notices_check.yml b/.github/workflows/third_party_notices_check.yml index 395fdf2..5282237 100644 --- a/.github/workflows/third_party_notices_check.yml +++ b/.github/workflows/third_party_notices_check.yml @@ -5,3 +5,5 @@ on: pull_request jobs: call_notices_check: uses: yext/slapshot-reusable-workflows/.github/workflows/third_party_notices_check.yml@v1 + secrets: + REPO_SCOPED_TOKEN: ${{ secrets.BOT_REPO_SCOPED_TOKEN }} \ No newline at end of file From d06a090f3cf75921597443ceb1eb628591faaf03 Mon Sep 17 00:00:00 2001 From: Tom Meyer Date: Wed, 11 May 2022 08:41:47 -0400 Subject: [PATCH 20/22] Update version to v1.1.0. --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c8f8ec0..400ba82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.12", + "version": "1.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.12", + "version": "1.1.0", "dependencies": { "@yext/answers-headless": "^1.1.0-beta.12", "use-isomorphic-layout-effect": "^1.1.2" diff --git a/package.json b/package.json index 3e33771..9e473b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-headless-react", - "version": "1.1.0-beta.13", + "version": "1.1.0", "main": "./lib/esm/src/index.js", "types": "./lib/esm/src/index.d.ts", "exports": { From 57243dcd09835c20cefde1e82d9ff67adfd108d0 Mon Sep 17 00:00:00 2001 From: Tom Meyer Date: Wed, 11 May 2022 08:43:17 -0400 Subject: [PATCH 21/22] Bump Headless to v1.1.0. --- package-lock.json | 30 +++++++++++++++--------------- package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 400ba82..f649fe3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "@yext/answers-headless-react", "version": "1.1.0", "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.12", + "@yext/answers-headless": "^1.1.0", "use-isomorphic-layout-effect": "^1.1.2" }, "devDependencies": { @@ -3812,9 +3812,9 @@ } }, "node_modules/@yext/answers-core": { - "version": "1.6.0-beta.7", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.7.tgz", - "integrity": "sha512-xUr+VdhG/LZil/juWTdS19nNcYf8N4xvllAhJg6+Gapdq5KbIbAsaYrUeTs1lb5EJqY9y52ctdN1ld7UWJjTsQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0.tgz", + "integrity": "sha512-FrR8X/llH6IPbfkhMgJ2yOV8GxZun67ncg8LewxEs2l7Q4bvlJmIO3LywGSnZOI+/E2+p+Z8zu11IVVOU8X79w==", "dependencies": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.5" @@ -3824,12 +3824,12 @@ } }, "node_modules/@yext/answers-headless": { - "version": "1.1.0-beta.12", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.12.tgz", - "integrity": "sha512-LsnuXLdVfVf6QqKQ8BWatHMhgqgfwSRvvn9ZvLbKZdG+nihhLoYgMm+UuSaH5ZOE+BJ50dYLfKqullRyywtUTA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0.tgz", + "integrity": "sha512-LLwf9ANcVDIvUmKqjLU2WWEC7fOS1y9EshWw1YGR1BeFkMuVRSpR7/UYQEreyfc5CqlT9MHewt7VF+CjqlXFjA==", "dependencies": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.7", + "@yext/answers-core": "^1.6.0", "js-levenshtein": "^1.1.6", "lodash": "^4.17.21", "redux-thunk": "^2.4.1" @@ -14511,21 +14511,21 @@ "dev": true }, "@yext/answers-core": { - "version": "1.6.0-beta.7", - "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0-beta.7.tgz", - "integrity": "sha512-xUr+VdhG/LZil/juWTdS19nNcYf8N4xvllAhJg6+Gapdq5KbIbAsaYrUeTs1lb5EJqY9y52ctdN1ld7UWJjTsQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@yext/answers-core/-/answers-core-1.6.0.tgz", + "integrity": "sha512-FrR8X/llH6IPbfkhMgJ2yOV8GxZun67ncg8LewxEs2l7Q4bvlJmIO3LywGSnZOI+/E2+p+Z8zu11IVVOU8X79w==", "requires": { "@babel/runtime-corejs3": "^7.12.5", "cross-fetch": "^3.1.5" } }, "@yext/answers-headless": { - "version": "1.1.0-beta.12", - "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0-beta.12.tgz", - "integrity": "sha512-LsnuXLdVfVf6QqKQ8BWatHMhgqgfwSRvvn9ZvLbKZdG+nihhLoYgMm+UuSaH5ZOE+BJ50dYLfKqullRyywtUTA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yext/answers-headless/-/answers-headless-1.1.0.tgz", + "integrity": "sha512-LLwf9ANcVDIvUmKqjLU2WWEC7fOS1y9EshWw1YGR1BeFkMuVRSpR7/UYQEreyfc5CqlT9MHewt7VF+CjqlXFjA==", "requires": { "@reduxjs/toolkit": "^1.7.0", - "@yext/answers-core": "^1.6.0-beta.7", + "@yext/answers-core": "^1.6.0", "js-levenshtein": "^1.1.6", "lodash": "^4.17.21", "redux-thunk": "^2.4.1" diff --git a/package.json b/package.json index 9e473b2..9a6cee6 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "generate-notices": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite" }, "dependencies": { - "@yext/answers-headless": "^1.1.0-beta.12", + "@yext/answers-headless": "^1.1.0", "use-isomorphic-layout-effect": "^1.1.2" }, "devDependencies": { From c2a80c27b0a5361cdb342e39d1ced1d024589770 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 11 May 2022 12:45:01 +0000 Subject: [PATCH 22/22] Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check --- THIRD-PARTY-NOTICES | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 865a153..20ca860 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -62,13 +62,19 @@ SOFTWARE. The following NPM package may be included in this product: - - @yext/answers-core@1.6.0-beta.7 + - @yext/answers-core@1.6.0 This package contains the following license and notice below: +The Answers Core files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements +and certain functionality requires paid subscriptions to Yext products. + +Contains information from the language-subtag-registry JSON Database (https://github.com/mattcg/language-subtag-registry/tree/master/data/json) +which is made available under the ODC Attribution License (https://github.com/mattcg/language-subtag-registry/blob/master/LICENSE.md). + BSD 3-Clause License -Copyright (c) 2021, Yext +Copyright (c) 2022, Yext All rights reserved. Redistribution and use in source and binary forms, with or without @@ -100,13 +106,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/answers-headless@1.1.0-beta.12 + - @yext/answers-headless@1.1.0 This package contains the following license and notice below: The Answers Headless files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements and certain functionality requires paid subscriptions to Yext products. +Contains information from the language-subtag-registry JSON Database (https://github.com/mattcg/language-subtag-registry/tree/master/data/json) +which is made available under the ODC Attribution License (https://github.com/mattcg/language-subtag-registry/blob/master/LICENSE.md). + BSD 3-Clause License Copyright (c) 2021, Yext