From 68261725cfb9bf67750e6bb2910313fac1a24e94 Mon Sep 17 00:00:00 2001
From: Haroen Viaene
Date: Tue, 18 Jan 2022 10:54:08 +0100
Subject: [PATCH 01/48] feat(dependencies): allow Angular 13 (#886)
There seem to be no required changes for Angular 13 to build, as you can see in https://github.com/Haroenv/angular-instantsearch-angular-13
I did not update the build dependencies to Angular 13, as it required some more changes that we can do later, the current version is usable as-is in angular 5 (possibly only from 8) - 14
fixes #885
---
package.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/package.json b/package.json
index 42efd6371..ff858243a 100644
--- a/package.json
+++ b/package.json
@@ -151,9 +151,9 @@
"zone.js": "0.11.4"
},
"peerDependencies": {
- "@angular/common": ">=5.0.0 <13.0.0",
- "@angular/core": ">=5.0.0 <13.0.0",
- "@angular/platform-browser": ">=5.0.0 <13.0.0",
- "@angular/platform-browser-dynamic": ">=5.0.0 <13.0.0"
+ "@angular/common": ">=5.0.0 <14.0.0",
+ "@angular/core": ">=5.0.0 <14.0.0",
+ "@angular/platform-browser": ">=5.0.0 <14.0.0",
+ "@angular/platform-browser-dynamic": ">=5.0.0 <14.0.0"
}
}
From 512c0602ffa8b01804a9204b0ed9e37d5f179fd3 Mon Sep 17 00:00:00 2001
From: InstantSearch <66688561+instantsearch-bot@users.noreply.github.com>
Date: Tue, 18 Jan 2022 11:05:46 +0100
Subject: [PATCH 02/48] chore: release v4.1.0 (#887)
Co-authored-by: Haroen Viaene
---
CHANGELOG.md | 9 +++++++++
package.json | 2 +-
src/version.ts | 2 +-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c0320b2b6..5decaefa4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+# [4.1.0](https://github.com/algolia/angular-instantsearch/compare/4.0.1...4.1.0) (2022-01-18)
+
+
+### Features
+
+* **dependencies:** allow Angular 13 ([#886](https://github.com/algolia/angular-instantsearch/issues/886)) ([6826172](https://github.com/algolia/angular-instantsearch/commit/68261725cfb9bf67750e6bb2910313fac1a24e94)), closes [#885](https://github.com/algolia/angular-instantsearch/issues/885)
+
+
+
## [4.0.1](https://github.com/algolia/angular-instantsearch/compare/4.0.0...4.0.1) (2021-10-20)
diff --git a/package.json b/package.json
index ff858243a..216d3a8ad 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-instantsearch",
- "version": "4.0.1",
+ "version": "4.1.0",
"description": "Lightning-fast search for Angular apps, by Algolia.",
"license": "MIT",
"keywords": [
diff --git a/src/version.ts b/src/version.ts
index 6bddb949d..610604428 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '4.0.1';
+export const VERSION = '4.1.0';
From 9e0952c9674699408b5d138d241099b2a5bb307f Mon Sep 17 00:00:00 2001
From: Haroen Viaene
Date: Wed, 26 Jan 2022 13:35:11 +0100
Subject: [PATCH 03/48] chore(examples): update instantsearch (#890)
---
examples/e-commerce/package.json | 2 +-
examples/e-commerce/yarn.lock | 67 +++++++++------
examples/media/package.json | 2 +-
examples/media/yarn.lock | 87 +++++++------------
examples/server-side-rendering/package.json | 2 +-
examples/server-side-rendering/yarn.lock | 94 +++++++--------------
6 files changed, 103 insertions(+), 151 deletions(-)
diff --git a/examples/e-commerce/package.json b/examples/e-commerce/package.json
index 2451c6dcd..b235c7e93 100644
--- a/examples/e-commerce/package.json
+++ b/examples/e-commerce/package.json
@@ -19,7 +19,7 @@
"algoliasearch": "4.10.3",
"angular-instantsearch": "file:../../dist",
"core-js": "2.4.1",
- "instantsearch.js": "4.25.0-experimental-typescript.0",
+ "instantsearch.js": "4.37.3",
"nouislider": "10.1.0",
"rxjs": "6.6.7",
"tslib": "^2.0.0",
diff --git a/examples/e-commerce/yarn.lock b/examples/e-commerce/yarn.lock
index e11aaf918..6a620c2ef 100644
--- a/examples/e-commerce/yarn.lock
+++ b/examples/e-commerce/yarn.lock
@@ -66,6 +66,11 @@
"@algolia/requester-common" "4.10.3"
"@algolia/transporter" "4.10.3"
+"@algolia/events@^4.0.1":
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/@algolia/events/-/events-4.0.1.tgz#fd39e7477e7bc703d7f893b556f676c032af3950"
+ integrity sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==
+
"@algolia/logger-common@4.10.3":
version "4.10.3"
resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.10.3.tgz#6773d2e38581bf9ac57e2dda02f0c4f1bc72ce94"
@@ -1415,6 +1420,11 @@
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
+"@types/qs@^6.5.3":
+ version "6.9.7"
+ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb"
+ integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==
+
"@types/source-list-map@*":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9"
@@ -1700,12 +1710,12 @@ ajv@^8.0.0:
require-from-string "^2.0.2"
uri-js "^4.2.2"
-algoliasearch-helper@^3.5.4:
- version "3.5.4"
- resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.5.4.tgz#21b20ab8a258daa9dde9aef2daa5e8994cd66077"
- integrity sha512-t+FLhXYnPZiwjYe5ExyN962HQY8mi3KwRju3Lyf6OBgtRdx30d6mqvtClXf5NeBihH45Xzj6t4Y5YyvAI432XA==
+algoliasearch-helper@^3.7.0:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.7.0.tgz#c0a0493df84d850360f664ad7a9d4fc78a94fd78"
+ integrity sha512-XJ3QfERBLfeVCyTVx80gon7r3/rgm/CE8Ha1H7cbablRe/X7SfYQ14g/eO+MhjVKIQp+gy9oC6G5ilmLwS1k6w==
dependencies:
- events "^1.1.1"
+ "@algolia/events" "^4.0.1"
algoliasearch@4.10.3:
version "4.10.3"
@@ -1733,10 +1743,10 @@ alphanum-sort@^1.0.2:
integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=
"angular-instantsearch@file:../../dist":
- version "4.0.0-alpha.0"
+ version "4.1.0"
dependencies:
instantsearch.css "^7.3.1"
- instantsearch.js "4.25.0-experimental-typescript.0"
+ instantsearch.js "^4.37.3"
nouislider "^10.0.0"
querystring-es3 "^0.2.1"
tslib "^2.1.0"
@@ -3314,11 +3324,6 @@ eventemitter3@^4.0.0:
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384"
integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==
-events@^1.1.0, events@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
- integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=
-
events@^3.2.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
@@ -4153,19 +4158,21 @@ instantsearch.css@^7.3.1:
resolved "https://registry.yarnpkg.com/instantsearch.css/-/instantsearch.css-7.3.1.tgz#7ab74a8f355091ae040947a9cf5438f379026622"
integrity sha512-/kaMDna5D+Q9mImNBHEhb9HgHATDOFKYii7N1Iwvrj+lmD9gBJLqVhUw67gftq2O0QI330pFza+CRscIwB1wQQ==
-instantsearch.js@4.25.0-experimental-typescript.0:
- version "4.25.0-experimental-typescript.0"
- resolved "https://registry.yarnpkg.com/instantsearch.js/-/instantsearch.js-4.25.0-experimental-typescript.0.tgz#26ecd819a4fc2b8f15ebd02a6850331510b691f4"
- integrity sha512-pi0LOaRQE80sq3JMA7MVEWcsbxFKLIqjsVaDEv6mF9z22VeV1yswFn1t7su30SnYjMzdWOtdS0kkJGZSyRGnCA==
+instantsearch.js@4.37.3, instantsearch.js@^4.37.3:
+ version "4.37.3"
+ resolved "https://registry.yarnpkg.com/instantsearch.js/-/instantsearch.js-4.37.3.tgz#8677be049f179aa7bffa190c060b6b4bdaeeeab3"
+ integrity sha512-osRvwHvESOMNGQMsqIC+DEmqr9FSpNerZCy48iEj5/UhBkejwyv9Y7G0w6+eI+ypuQdgMTF8rtkWQWrdwxkevA==
dependencies:
+ "@algolia/events" "^4.0.1"
"@types/google.maps" "^3.45.3"
"@types/hogan.js" "^3.0.0"
- algoliasearch-helper "^3.5.4"
+ "@types/qs" "^6.5.3"
+ algoliasearch-helper "^3.7.0"
classnames "^2.2.5"
- events "^1.1.0"
hogan.js "^3.0.2"
- preact "^10.0.0"
- qs "^6.5.1"
+ preact "^10.6.0"
+ qs "^6.5.1 < 6.10"
+ search-insights "^2.1.0"
internal-ip@^4.3.0:
version "4.3.0"
@@ -6407,10 +6414,10 @@ postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.32, postcss@^7.0.
source-map "^0.6.1"
supports-color "^6.1.0"
-preact@^10.0.0:
- version "10.4.7"
- resolved "https://registry.yarnpkg.com/preact/-/preact-10.4.7.tgz#5a530d34b4ba45f38234be8b1b3fe910098a165f"
- integrity sha512-DtnnPbOm7oxW7Sxf5Co+KSIOxo7bGm0vLfJN/wGey7G2sAGKnGP5+bFyE2YIgutMISQl6xFVTsOd6l/Au88VVw==
+preact@^10.6.0:
+ version "10.6.4"
+ resolved "https://registry.yarnpkg.com/preact/-/preact-10.6.4.tgz#ad12c409ff1b4316158486e0a7b8d43636f7ced8"
+ integrity sha512-WyosM7pxGcndU8hY0OQlLd54tOU+qmG45QXj2dAYrL11HoyU/EzOSTlpJsirbBr1QW7lICxSsVJJmcmUglovHQ==
pretty-bytes@^5.3.0:
version "5.6.0"
@@ -6476,7 +6483,12 @@ qs@6.7.0:
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
-qs@^6.5.1, qs@~6.5.2:
+"qs@^6.5.1 < 6.10":
+ version "6.9.7"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.7.tgz#4610846871485e1e048f44ae3b94033f0e675afe"
+ integrity sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==
+
+qs@~6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
@@ -6951,6 +6963,11 @@ schema-utils@^3.0.0:
ajv "^6.12.5"
ajv-keywords "^3.5.2"
+search-insights@^2.1.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/search-insights/-/search-insights-2.2.1.tgz#9c93344fbae5fbf2f88c1a81b46b4b5d888c11f7"
+ integrity sha512-JDfVGZbKqTtiKVZjAVbkNw9C9f0ib80yx6Ea17M3z4RvPmuD0GYWXuFwA9++dpbreBEMH4TC3lQ29Zq7O4b5oA==
+
select-hose@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"
diff --git a/examples/media/package.json b/examples/media/package.json
index 5454952f8..bfb5e1e6c 100644
--- a/examples/media/package.json
+++ b/examples/media/package.json
@@ -19,7 +19,7 @@
"algoliasearch": "4.10.3",
"angular-instantsearch": "file:../../dist",
"core-js": "2.4.1",
- "instantsearch.js": "4.25.0-experimental-typescript.0",
+ "instantsearch.js": "4.37.3",
"nouislider": "10.1.0",
"rxjs": "6.6.7",
"tslib": "^2.0.0",
diff --git a/examples/media/yarn.lock b/examples/media/yarn.lock
index b823ef46f..6b294764f 100644
--- a/examples/media/yarn.lock
+++ b/examples/media/yarn.lock
@@ -66,6 +66,11 @@
"@algolia/requester-common" "4.10.3"
"@algolia/transporter" "4.10.3"
+"@algolia/events@^4.0.1":
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/@algolia/events/-/events-4.0.1.tgz#fd39e7477e7bc703d7f893b556f676c032af3950"
+ integrity sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==
+
"@algolia/logger-common@4.10.3":
version "4.10.3"
resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.10.3.tgz#6773d2e38581bf9ac57e2dda02f0c4f1bc72ce94"
@@ -1647,12 +1652,12 @@ ajv@^6.10.2, ajv@^6.12.4:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
-algoliasearch-helper@^3.5.4, algoliasearch-helper@^3.5.5:
- version "3.5.5"
- resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.5.5.tgz#05263869d3c8a7292278d7e49630f52520f204d7"
- integrity sha512-JDH14gMpSj8UzEaKwVkrqKOeAOyK0dDWsFlKvWhk0Xl5yw9FyafYf1xZPb4uSXaPBAFQtUouFlR1Zt68BCY0/w==
+algoliasearch-helper@^3.7.0:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.7.0.tgz#c0a0493df84d850360f664ad7a9d4fc78a94fd78"
+ integrity sha512-XJ3QfERBLfeVCyTVx80gon7r3/rgm/CE8Ha1H7cbablRe/X7SfYQ14g/eO+MhjVKIQp+gy9oC6G5ilmLwS1k6w==
dependencies:
- events "^1.1.1"
+ "@algolia/events" "^4.0.1"
algoliasearch@4.10.3:
version "4.10.3"
@@ -1680,10 +1685,10 @@ alphanum-sort@^1.0.0:
integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=
"angular-instantsearch@file:../../dist":
- version "4.0.0-alpha.2"
+ version "4.1.0"
dependencies:
instantsearch.css "^7.3.1"
- instantsearch.js "4.26.0-experimental-typescript.0"
+ instantsearch.js "^4.37.3"
nouislider "^10.0.0"
querystring-es3 "^0.2.1"
tslib "^2.1.0"
@@ -3651,11 +3656,6 @@ eventemitter3@^4.0.0:
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384"
integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==
-events@^1.1.0, events@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
- integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=
-
events@^3.0.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
@@ -4655,34 +4655,21 @@ instantsearch.css@^7.3.1:
resolved "https://registry.yarnpkg.com/instantsearch.css/-/instantsearch.css-7.4.5.tgz#2a521aa634329bf1680f79adf87c79d67669ec8d"
integrity sha512-iIGBYjCokU93DDB8kbeztKtlu4qVEyTg1xvS6iSO1YvqRwkIZgf0tmsl/GytsLdZhuw8j4wEaeYsCzNbeJ/zEQ==
-instantsearch.js@4.25.0-experimental-typescript.0:
- version "4.25.0-experimental-typescript.0"
- resolved "https://registry.yarnpkg.com/instantsearch.js/-/instantsearch.js-4.25.0-experimental-typescript.0.tgz#26ecd819a4fc2b8f15ebd02a6850331510b691f4"
- integrity sha512-pi0LOaRQE80sq3JMA7MVEWcsbxFKLIqjsVaDEv6mF9z22VeV1yswFn1t7su30SnYjMzdWOtdS0kkJGZSyRGnCA==
- dependencies:
- "@types/google.maps" "^3.45.3"
- "@types/hogan.js" "^3.0.0"
- algoliasearch-helper "^3.5.4"
- classnames "^2.2.5"
- events "^1.1.0"
- hogan.js "^3.0.2"
- preact "^10.0.0"
- qs "^6.5.1"
-
-instantsearch.js@4.26.0-experimental-typescript.0:
- version "4.26.0-experimental-typescript.0"
- resolved "https://registry.yarnpkg.com/instantsearch.js/-/instantsearch.js-4.26.0-experimental-typescript.0.tgz#ad130ffc26e52bbc53c8c49e3aac5597799a0fcc"
- integrity sha512-ZiUZT5PgSpvLGQwBukIQbVn48a932o5WMZ5dvveBUURukKXxRMBKrsFZaXJ30aMugfgkQD93kK3KHT0siYP3PQ==
+instantsearch.js@4.37.3, instantsearch.js@^4.37.3:
+ version "4.37.3"
+ resolved "https://registry.yarnpkg.com/instantsearch.js/-/instantsearch.js-4.37.3.tgz#8677be049f179aa7bffa190c060b6b4bdaeeeab3"
+ integrity sha512-osRvwHvESOMNGQMsqIC+DEmqr9FSpNerZCy48iEj5/UhBkejwyv9Y7G0w6+eI+ypuQdgMTF8rtkWQWrdwxkevA==
dependencies:
+ "@algolia/events" "^4.0.1"
"@types/google.maps" "^3.45.3"
"@types/hogan.js" "^3.0.0"
"@types/qs" "^6.5.3"
- algoliasearch-helper "^3.5.5"
+ algoliasearch-helper "^3.7.0"
classnames "^2.2.5"
- events "^1.1.0"
hogan.js "^3.0.2"
- preact "^10.0.0"
+ preact "^10.6.0"
qs "^6.5.1 < 6.10"
+ search-insights "^2.1.0"
internal-ip@^4.3.0:
version "4.3.0"
@@ -6169,11 +6156,6 @@ object-inspect@^1.10.3:
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369"
integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==
-object-inspect@^1.9.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1"
- integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==
-
object-keys@^1.0.11, object-keys@^1.0.12:
version "1.0.12"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2"
@@ -6994,10 +6976,10 @@ postcss@^7.0.14, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.
source-map "^0.6.1"
supports-color "^6.1.0"
-preact@^10.0.0:
- version "10.4.7"
- resolved "https://registry.yarnpkg.com/preact/-/preact-10.4.7.tgz#5a530d34b4ba45f38234be8b1b3fe910098a165f"
- integrity sha512-DtnnPbOm7oxW7Sxf5Co+KSIOxo7bGm0vLfJN/wGey7G2sAGKnGP5+bFyE2YIgutMISQl6xFVTsOd6l/Au88VVw==
+preact@^10.6.0:
+ version "10.6.4"
+ resolved "https://registry.yarnpkg.com/preact/-/preact-10.6.4.tgz#ad12c409ff1b4316158486e0a7b8d43636f7ced8"
+ integrity sha512-WyosM7pxGcndU8hY0OQlLd54tOU+qmG45QXj2dAYrL11HoyU/EzOSTlpJsirbBr1QW7lICxSsVJJmcmUglovHQ==
prepend-http@^1.0.0:
version "1.0.4"
@@ -7114,13 +7096,6 @@ qs@6.7.0:
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
-qs@^6.5.1:
- version "6.10.1"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a"
- integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==
- dependencies:
- side-channel "^1.0.4"
-
"qs@^6.5.1 < 6.10":
version "6.9.6"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee"
@@ -7686,6 +7661,11 @@ schema-utils@^2.6.5, schema-utils@^2.6.6, schema-utils@^2.7.0:
ajv "^6.12.4"
ajv-keywords "^3.5.2"
+search-insights@^2.1.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/search-insights/-/search-insights-2.2.1.tgz#9c93344fbae5fbf2f88c1a81b46b4b5d888c11f7"
+ integrity sha512-JDfVGZbKqTtiKVZjAVbkNw9C9f0ib80yx6Ea17M3z4RvPmuD0GYWXuFwA9++dpbreBEMH4TC3lQ29Zq7O4b5oA==
+
select-hose@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"
@@ -7858,15 +7838,6 @@ shebang-regex@^1.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
-side-channel@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
- integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==
- dependencies:
- call-bind "^1.0.0"
- get-intrinsic "^1.0.2"
- object-inspect "^1.9.0"
-
signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
diff --git a/examples/server-side-rendering/package.json b/examples/server-side-rendering/package.json
index 237b30f43..9232ffaec 100644
--- a/examples/server-side-rendering/package.json
+++ b/examples/server-side-rendering/package.json
@@ -27,7 +27,7 @@
"algoliasearch": "4.10.3",
"angular-instantsearch": "file:../../dist/",
"express": "^4.15.2",
- "instantsearch.js": "4.25.0-experimental-typescript.0",
+ "instantsearch.js": "4.37.3",
"rxjs": "~6.6.0",
"tslib": "^2.1.0",
"zone.js": "~0.11.4"
diff --git a/examples/server-side-rendering/yarn.lock b/examples/server-side-rendering/yarn.lock
index 3324dcea9..a48b04191 100644
--- a/examples/server-side-rendering/yarn.lock
+++ b/examples/server-side-rendering/yarn.lock
@@ -66,6 +66,11 @@
"@algolia/requester-common" "4.10.3"
"@algolia/transporter" "4.10.3"
+"@algolia/events@^4.0.1":
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/@algolia/events/-/events-4.0.1.tgz#fd39e7477e7bc703d7f893b556f676c032af3950"
+ integrity sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==
+
"@algolia/logger-common@4.10.3":
version "4.10.3"
resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.10.3.tgz#6773d2e38581bf9ac57e2dda02f0c4f1bc72ce94"
@@ -1871,19 +1876,12 @@ ajv@^8.0.0:
require-from-string "^2.0.2"
uri-js "^4.2.2"
-algoliasearch-helper@^3.5.4:
- version "3.5.4"
- resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.5.4.tgz#21b20ab8a258daa9dde9aef2daa5e8994cd66077"
- integrity sha512-t+FLhXYnPZiwjYe5ExyN962HQY8mi3KwRju3Lyf6OBgtRdx30d6mqvtClXf5NeBihH45Xzj6t4Y5YyvAI432XA==
- dependencies:
- events "^1.1.1"
-
-algoliasearch-helper@^3.5.5:
- version "3.5.5"
- resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.5.5.tgz#05263869d3c8a7292278d7e49630f52520f204d7"
- integrity sha512-JDH14gMpSj8UzEaKwVkrqKOeAOyK0dDWsFlKvWhk0Xl5yw9FyafYf1xZPb4uSXaPBAFQtUouFlR1Zt68BCY0/w==
+algoliasearch-helper@^3.7.0:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.7.0.tgz#c0a0493df84d850360f664ad7a9d4fc78a94fd78"
+ integrity sha512-XJ3QfERBLfeVCyTVx80gon7r3/rgm/CE8Ha1H7cbablRe/X7SfYQ14g/eO+MhjVKIQp+gy9oC6G5ilmLwS1k6w==
dependencies:
- events "^1.1.1"
+ "@algolia/events" "^4.0.1"
algoliasearch@4.10.3:
version "4.10.3"
@@ -1911,10 +1909,10 @@ alphanum-sort@^1.0.2:
integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=
"angular-instantsearch@file:../../dist":
- version "4.0.0-alpha.2"
+ version "4.1.0"
dependencies:
instantsearch.css "^7.3.1"
- instantsearch.js "4.26.0-experimental-typescript.0"
+ instantsearch.js "^4.37.3"
nouislider "^10.0.0"
querystring-es3 "^0.2.1"
tslib "^2.1.0"
@@ -3733,11 +3731,6 @@ eventemitter3@^4.0.0:
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
-events@^1.1.0, events@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
- integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=
-
events@^3.2.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
@@ -4618,34 +4611,21 @@ instantsearch.css@^7.3.1:
resolved "https://registry.yarnpkg.com/instantsearch.css/-/instantsearch.css-7.4.5.tgz#2a521aa634329bf1680f79adf87c79d67669ec8d"
integrity sha512-iIGBYjCokU93DDB8kbeztKtlu4qVEyTg1xvS6iSO1YvqRwkIZgf0tmsl/GytsLdZhuw8j4wEaeYsCzNbeJ/zEQ==
-instantsearch.js@4.25.0-experimental-typescript.0:
- version "4.25.0-experimental-typescript.0"
- resolved "https://registry.yarnpkg.com/instantsearch.js/-/instantsearch.js-4.25.0-experimental-typescript.0.tgz#26ecd819a4fc2b8f15ebd02a6850331510b691f4"
- integrity sha512-pi0LOaRQE80sq3JMA7MVEWcsbxFKLIqjsVaDEv6mF9z22VeV1yswFn1t7su30SnYjMzdWOtdS0kkJGZSyRGnCA==
- dependencies:
- "@types/google.maps" "^3.45.3"
- "@types/hogan.js" "^3.0.0"
- algoliasearch-helper "^3.5.4"
- classnames "^2.2.5"
- events "^1.1.0"
- hogan.js "^3.0.2"
- preact "^10.0.0"
- qs "^6.5.1"
-
-instantsearch.js@4.26.0-experimental-typescript.0:
- version "4.26.0-experimental-typescript.0"
- resolved "https://registry.yarnpkg.com/instantsearch.js/-/instantsearch.js-4.26.0-experimental-typescript.0.tgz#ad130ffc26e52bbc53c8c49e3aac5597799a0fcc"
- integrity sha512-ZiUZT5PgSpvLGQwBukIQbVn48a932o5WMZ5dvveBUURukKXxRMBKrsFZaXJ30aMugfgkQD93kK3KHT0siYP3PQ==
+instantsearch.js@4.37.3, instantsearch.js@^4.37.3:
+ version "4.37.3"
+ resolved "https://registry.yarnpkg.com/instantsearch.js/-/instantsearch.js-4.37.3.tgz#8677be049f179aa7bffa190c060b6b4bdaeeeab3"
+ integrity sha512-osRvwHvESOMNGQMsqIC+DEmqr9FSpNerZCy48iEj5/UhBkejwyv9Y7G0w6+eI+ypuQdgMTF8rtkWQWrdwxkevA==
dependencies:
+ "@algolia/events" "^4.0.1"
"@types/google.maps" "^3.45.3"
"@types/hogan.js" "^3.0.0"
"@types/qs" "^6.5.3"
- algoliasearch-helper "^3.5.5"
+ algoliasearch-helper "^3.7.0"
classnames "^2.2.5"
- events "^1.1.0"
hogan.js "^3.0.2"
- preact "^10.0.0"
+ preact "^10.6.0"
qs "^6.5.1 < 6.10"
+ search-insights "^2.1.0"
internal-ip@^4.3.0:
version "4.3.0"
@@ -6024,11 +6004,6 @@ object-copy@^0.1.0:
define-property "^0.2.5"
kind-of "^3.0.3"
-object-inspect@^1.9.0:
- version "1.10.3"
- resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369"
- integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==
-
object-is@^1.0.1:
version "1.1.5"
resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac"
@@ -7031,10 +7006,10 @@ postcss@^8.2.10, postcss@^8.2.9:
nanoid "^3.1.23"
source-map-js "^0.6.2"
-preact@^10.0.0:
- version "10.5.13"
- resolved "https://registry.yarnpkg.com/preact/-/preact-10.5.13.tgz#85f6c9197ecd736ce8e3bec044d08fd1330fa019"
- integrity sha512-q/vlKIGNwzTLu+jCcvywgGrt+H/1P/oIRSD6mV4ln3hmlC+Aa34C7yfPI4+5bzW8pONyVXYS7SvXosy2dKKtWQ==
+preact@^10.6.0:
+ version "10.6.4"
+ resolved "https://registry.yarnpkg.com/preact/-/preact-10.6.4.tgz#ad12c409ff1b4316158486e0a7b8d43636f7ced8"
+ integrity sha512-WyosM7pxGcndU8hY0OQlLd54tOU+qmG45QXj2dAYrL11HoyU/EzOSTlpJsirbBr1QW7lICxSsVJJmcmUglovHQ==
prelude-ls@~1.1.2:
version "1.1.2"
@@ -7115,13 +7090,6 @@ qs@6.7.0:
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
-qs@^6.5.1:
- version "6.10.1"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a"
- integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==
- dependencies:
- side-channel "^1.0.4"
-
"qs@^6.5.1 < 6.10":
version "6.9.6"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee"
@@ -7588,6 +7556,11 @@ schema-utils@^3.0.0:
ajv "^6.12.5"
ajv-keywords "^3.5.2"
+search-insights@^2.1.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/search-insights/-/search-insights-2.2.1.tgz#9c93344fbae5fbf2f88c1a81b46b4b5d888c11f7"
+ integrity sha512-JDfVGZbKqTtiKVZjAVbkNw9C9f0ib80yx6Ea17M3z4RvPmuD0GYWXuFwA9++dpbreBEMH4TC3lQ29Zq7O4b5oA==
+
select-hose@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"
@@ -7749,15 +7722,6 @@ shebang-regex@^1.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
-side-channel@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
- integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==
- dependencies:
- call-bind "^1.0.0"
- get-intrinsic "^1.0.2"
- object-inspect "^1.9.0"
-
signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
From 33b7be3cd68382828aaf37dfe24edfa513fd4a9d Mon Sep 17 00:00:00 2001
From: Dhaya <154633+dhayab@users.noreply.github.com>
Date: Wed, 26 Jan 2022 14:27:20 +0100
Subject: [PATCH 04/48] feat(highlight): use helper from is.js instead of
custom implementation (#888)
---
ng-package.json | 3 +-
package.json | 2 +-
.../__snapshots__/highlight.spec.ts.snap | 45 ++-----------
src/highlight/__tests__/highlight.spec.ts | 46 +++----------
src/highlight/highlight.ts | 67 ++++++-------------
.../__tests__/refinement-list.spec.ts | 32 +++++++--
tsconfig.spec.json | 2 +-
yarn.lock | 47 +++++++------
8 files changed, 93 insertions(+), 151 deletions(-)
diff --git a/ng-package.json b/ng-package.json
index 52a7c172d..b6612b085 100644
--- a/ng-package.json
+++ b/ng-package.json
@@ -9,7 +9,8 @@
"algoliasearch/lite": "algoliasearch",
"instantsearch.js/es": "instantsearch",
"instantsearch.js/es/connectors": "instantsearch.connectors",
- "instantsearch.js/es/widgets/index/index": "instantsearch.widgets.index"
+ "instantsearch.js/es/helpers": "instantsearch.helpers",
+ "instantsearch.js/es/widgets/index/index": "instantsearch.widgets.index",
"nouislider": "noUiSlider",
"querystring-es3/encode": "qs.encode"
}
diff --git a/package.json b/package.json
index 216d3a8ad..4d475d087 100644
--- a/package.json
+++ b/package.json
@@ -92,7 +92,7 @@
},
"dependencies": {
"instantsearch.css": "^7.3.1",
- "instantsearch.js": "^4.31.1",
+ "instantsearch.js": "^4.37.3",
"nouislider": "^10.0.0",
"querystring-es3": "^0.2.1"
},
diff --git a/src/highlight/__tests__/__snapshots__/highlight.spec.ts.snap b/src/highlight/__tests__/__snapshots__/highlight.spec.ts.snap
index d76f5b357..bd92c6764 100644
--- a/src/highlight/__tests__/__snapshots__/highlight.spec.ts.snap
+++ b/src/highlight/__tests__/__snapshots__/highlight.spec.ts.snap
@@ -26,11 +26,11 @@ exports[`highlight should highlight nested objects 1`] = `
-
foo
-
+
bar
@@ -47,39 +47,18 @@ exports[`highlight should highlight strings 1`] = `
-
- foo
-
- bar
-
-
-
-`;
-
-exports[`highlight should highlight values in array 1`] = `
-
-
-
-
foo
-
+
bar
`;
-exports[`highlight should use \`hit.highlighted\` if it exists 1`] = `
+exports[`highlight should highlight with a custom tagName 1`] = `
`;
-
-exports[`highlight should warn when attribute is not found 1`] = `
-
-
-
-
-
-`;
diff --git a/src/highlight/__tests__/highlight.spec.ts b/src/highlight/__tests__/highlight.spec.ts
index 7ddb5468b..5bc65907b 100644
--- a/src/highlight/__tests__/highlight.spec.ts
+++ b/src/highlight/__tests__/highlight.spec.ts
@@ -3,11 +3,11 @@ import { TestBed } from '@angular/core/testing';
import { NgAisHighlightModule } from '../highlight.module';
-const render = ({ hit, attribute, tagName = 'em' }) => {
+const render = ({ hit, attribute, tagName = 'mark' }) => {
@Component({
selector: 'test-component',
template: `
-
+
`,
})
@@ -34,7 +34,7 @@ describe('highlight', () => {
attribute: 'name',
hit: {
_highlightResult: {
- name: { value: 'foo bar' },
+ name: { value: 'foo bar' },
},
},
});
@@ -47,7 +47,7 @@ describe('highlight', () => {
hit: {
_highlightResult: {
parent: {
- name: { value: 'foo bar' },
+ name: { value: 'foo bar' },
},
},
},
@@ -55,39 +55,17 @@ describe('highlight', () => {
expect(fixture).toMatchSnapshot();
});
- it('should highlight values in array', () => {
+ it('should highlight with a custom tagName', () => {
const fixture = render({
- attribute: 'children[0].name',
- hit: {
- _highlightResult: {
- children: [
- {
- name: { value: 'foo bar' },
- },
- ],
- },
- },
- });
- expect(fixture).toMatchSnapshot();
- });
-
- it('should warn when attribute is not found', () => {
- const spy = jest.spyOn(global.console, 'warn');
- spy.mockImplementation(() => {});
-
- const fixture = render({
- attribute: 'invalid',
+ attribute: 'name',
hit: {
_highlightResult: {
- name: { value: 'foo bar' },
+ name: { value: 'foo bar' },
},
},
+ tagName: 'em',
});
- expect(spy).toHaveBeenCalled();
expect(fixture).toMatchSnapshot();
-
- spy.mockReset();
- spy.mockRestore();
});
it('should fallback to non highlighted when no match', () => {
@@ -97,12 +75,4 @@ describe('highlight', () => {
});
expect(fixture).toMatchSnapshot();
});
-
- it('should use `hit.highlighted` if it exists', () => {
- const fixture = render({
- attribute: 'highlighted',
- hit: { highlighted: 'foo bar' },
- });
- expect(fixture).toMatchSnapshot();
- });
});
diff --git a/src/highlight/highlight.ts b/src/highlight/highlight.ts
index fc1c8b7af..625dc10b7 100644
--- a/src/highlight/highlight.ts
+++ b/src/highlight/highlight.ts
@@ -1,59 +1,36 @@
-import { Component, Input } from '@angular/core';
-import { bem, getPropertyByPath } from '../utils';
+import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
+
+import { Hit } from 'instantsearch.js';
+
+import { highlight } from 'instantsearch.js/es/helpers';
+import { getPropertyByPath } from 'instantsearch.js/es/lib/utils';
@Component({
selector: 'ais-highlight',
- template: ``,
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ template: ``,
})
export class NgAisHighlight {
@Input() attribute: string;
- @Input() hit: { _highlightResult?: {}; label?: string; highlighted?: string };
- @Input() tagName: string = 'em';
-
- cx = bem('Highlight');
+ @Input() hit: Partial;
+ @Input() tagName: string = 'mark';
get content() {
- if (this.attribute === 'highlighted') {
- return this.hit.highlighted
- ? this.replaceWithTagName(this.hit.highlighted)
- : this.hit.label;
- }
-
- if (this.hit.hasOwnProperty('_highlightResult')) {
- const attributeHighlighted = getPropertyByPath(
- this.hit._highlightResult,
- this.attribute
- );
-
- // check that the attributeHighlighted is a string
- if (
- attributeHighlighted !== undefined &&
- typeof attributeHighlighted.value === 'string'
- ) {
- return this.replaceWithTagName(attributeHighlighted.value);
- }
- }
-
+ const highlightAttributeResult = getPropertyByPath(
+ this.hit._highlightResult,
+ this.attribute
+ );
const fallback = getPropertyByPath(this.hit, this.attribute);
- if (!fallback) {
- console.warn(
- `Could not find attribute [${
- this.attribute
- }] into hit object, will display an empty string.`
- );
- return '';
+ // @MAJOR drop this custom fallback once it is implemented directly in instantsearch.js v5
+ if (!highlightAttributeResult && fallback) {
+ return fallback;
}
- return fallback;
- }
-
- replaceWithTagName(value: string) {
- return value
- .replace(
- new RegExp('', 'g'),
- `<${this.tagName} class="${this.cx('highlighted')}">`
- )
- .replace(new RegExp('', 'g'), `${this.tagName}>`);
+ return highlight({
+ attribute: this.attribute,
+ highlightedTagName: this.tagName,
+ hit: this.hit,
+ });
}
}
diff --git a/src/refinement-list/__tests__/refinement-list.spec.ts b/src/refinement-list/__tests__/refinement-list.spec.ts
index cf4085046..1f2d2cdae 100644
--- a/src/refinement-list/__tests__/refinement-list.spec.ts
+++ b/src/refinement-list/__tests__/refinement-list.spec.ts
@@ -10,10 +10,34 @@ const defaultState = {
createURL: jest.fn(),
isShowingMore: false,
items: [
- { label: 'foo', count: 100, value: 'foo', isRefined: false },
- { label: 'bar', count: 100, value: 'bar', isRefined: false },
- { label: 'foobar', count: 100, value: 'foobar', isRefined: false },
- { label: 'barfoo', count: 100, value: 'barfoo', isRefined: false },
+ {
+ label: 'foo',
+ highlighted: 'foo',
+ count: 100,
+ value: 'foo',
+ isRefined: false,
+ },
+ {
+ label: 'bar',
+ highlighted: 'bar',
+ count: 100,
+ value: 'bar',
+ isRefined: false,
+ },
+ {
+ label: 'foobar',
+ highlighted: 'foobar',
+ count: 100,
+ value: 'foobar',
+ isRefined: false,
+ },
+ {
+ label: 'barfoo',
+ highlighted: 'barfoo',
+ count: 100,
+ value: 'barfoo',
+ isRefined: false,
+ },
],
refine: jest.fn(),
toggleShowMore: jest.fn(),
diff --git a/tsconfig.spec.json b/tsconfig.spec.json
index 3b81cf422..81eaeb689 100644
--- a/tsconfig.spec.json
+++ b/tsconfig.spec.json
@@ -4,7 +4,7 @@
"allowJs": true,
"outDir": "../out-tsc/spec",
"module": "CommonJS",
- "types": ["jest"],
+ "types": ["node", "jest"],
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
},
diff --git a/yarn.lock b/yarn.lock
index 8aa761e54..5668d8449 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -66,6 +66,11 @@
"@algolia/requester-common" "4.10.3"
"@algolia/transporter" "4.10.3"
+"@algolia/events@^4.0.1":
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/@algolia/events/-/events-4.0.1.tgz#fd39e7477e7bc703d7f893b556f676c032af3950"
+ integrity sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==
+
"@algolia/logger-common@4.10.3":
version "4.10.3"
resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.10.3.tgz#6773d2e38581bf9ac57e2dda02f0c4f1bc72ce94"
@@ -1498,12 +1503,12 @@ algoliasearch-helper@3.6.2:
dependencies:
events "^1.1.1"
-algoliasearch-helper@^3.5.5:
- version "3.5.5"
- resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.5.5.tgz#05263869d3c8a7292278d7e49630f52520f204d7"
- integrity sha512-JDH14gMpSj8UzEaKwVkrqKOeAOyK0dDWsFlKvWhk0Xl5yw9FyafYf1xZPb4uSXaPBAFQtUouFlR1Zt68BCY0/w==
+algoliasearch-helper@^3.7.0:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.7.0.tgz#c0a0493df84d850360f664ad7a9d4fc78a94fd78"
+ integrity sha512-XJ3QfERBLfeVCyTVx80gon7r3/rgm/CE8Ha1H7cbablRe/X7SfYQ14g/eO+MhjVKIQp+gy9oC6G5ilmLwS1k6w==
dependencies:
- events "^1.1.1"
+ "@algolia/events" "^4.0.1"
"algoliasearch-v3@npm:algoliasearch@3.35.1":
version "3.35.1"
@@ -5506,21 +5511,21 @@ instantsearch.css@^7.3.1:
resolved "https://registry.yarnpkg.com/instantsearch.css/-/instantsearch.css-7.3.1.tgz#7ab74a8f355091ae040947a9cf5438f379026622"
integrity sha512-/kaMDna5D+Q9mImNBHEhb9HgHATDOFKYii7N1Iwvrj+lmD9gBJLqVhUw67gftq2O0QI330pFza+CRscIwB1wQQ==
-instantsearch.js@^4.31.1:
- version "4.31.1"
- resolved "https://registry.yarnpkg.com/instantsearch.js/-/instantsearch.js-4.31.1.tgz#da9c2368ee29dc94ca5d0cab37e081f5ae402d07"
- integrity sha512-3hywDIQEyC4auRnSneCiB00DpzXJr+kp72iIYirj+yq5VCBZk1hTBOe+DeWcyJ8ZB4UrzwjasFPgpeGGMeJ3VA==
+instantsearch.js@^4.37.3:
+ version "4.37.3"
+ resolved "https://registry.yarnpkg.com/instantsearch.js/-/instantsearch.js-4.37.3.tgz#8677be049f179aa7bffa190c060b6b4bdaeeeab3"
+ integrity sha512-osRvwHvESOMNGQMsqIC+DEmqr9FSpNerZCy48iEj5/UhBkejwyv9Y7G0w6+eI+ypuQdgMTF8rtkWQWrdwxkevA==
dependencies:
+ "@algolia/events" "^4.0.1"
"@types/google.maps" "^3.45.3"
"@types/hogan.js" "^3.0.0"
"@types/qs" "^6.5.3"
- algoliasearch-helper "^3.5.5"
+ algoliasearch-helper "^3.7.0"
classnames "^2.2.5"
- events "^1.1.0"
hogan.js "^3.0.2"
- preact "^10.0.0"
+ preact "^10.6.0"
qs "^6.5.1 < 6.10"
- search-insights "^2.0.5"
+ search-insights "^2.1.0"
interpret@^1.0.0:
version "1.2.0"
@@ -8626,10 +8631,10 @@ postcss@^8.2.4:
nanoid "^3.1.23"
source-map-js "^0.6.2"
-preact@^10.0.0:
- version "10.0.5"
- resolved "https://registry.yarnpkg.com/preact/-/preact-10.0.5.tgz#16f0bcd77241693e710778069e703217dd497867"
- integrity sha512-62+J+GTrv3Uhp6DefqZTel6VYcdUA1zqHO7gjQSKdOwkU2sNOp/Vl6Zf2A3hIWV5EBgjeDA8gsOn6dmB3I1Dvg==
+preact@^10.6.0:
+ version "10.6.4"
+ resolved "https://registry.yarnpkg.com/preact/-/preact-10.6.4.tgz#ad12c409ff1b4316158486e0a7b8d43636f7ced8"
+ integrity sha512-WyosM7pxGcndU8hY0OQlLd54tOU+qmG45QXj2dAYrL11HoyU/EzOSTlpJsirbBr1QW7lICxSsVJJmcmUglovHQ==
prelude-ls@~1.1.2:
version "1.1.2"
@@ -9423,10 +9428,10 @@ scss-tokenizer@^0.2.3:
js-base64 "^2.1.8"
source-map "^0.4.2"
-search-insights@^2.0.5:
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/search-insights/-/search-insights-2.0.5.tgz#42fbe4d42d9f68f58bfc7c6e4519e8961b07dd2b"
- integrity sha512-Mx3PmspHRhiW8eMFrT0coYCtoK6QqUjyNGqtlCpZcKTYflQEzYngx4obIRahc0arXBDzOR2tE/t8k8VgzfJe/g==
+search-insights@^2.1.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/search-insights/-/search-insights-2.2.1.tgz#9c93344fbae5fbf2f88c1a81b46b4b5d888c11f7"
+ integrity sha512-JDfVGZbKqTtiKVZjAVbkNw9C9f0ib80yx6Ea17M3z4RvPmuD0GYWXuFwA9++dpbreBEMH4TC3lQ29Zq7O4b5oA==
"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.5.0:
version "5.5.0"
From 6a45385580e10b57193ba42b55b6422d3c27df69 Mon Sep 17 00:00:00 2001
From: Fabien Motte
Date: Wed, 26 Jan 2022 17:19:47 +0100
Subject: [PATCH 05/48] chore: update shipjs config to work with master (#893)
---
ship.config.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ship.config.js b/ship.config.js
index 09aff2c0b..da3c04f99 100644
--- a/ship.config.js
+++ b/ship.config.js
@@ -3,7 +3,7 @@ const fs = require('fs');
const path = require('path');
module.exports = {
- mergeStrategy: { toSameBranch: ['develop'] },
+ mergeStrategy: { toSameBranch: ['master'] },
shouldPrepare: ({ releaseType, commitNumbersPerType }) => {
const { fix = 0 } = commitNumbersPerType;
if (releaseType === 'patch' && fix === 0) {
From fbe9f59b43eadf282051bf29bd979ff602a039a4 Mon Sep 17 00:00:00 2001
From: Dhaya <154633+dhayab@users.noreply.github.com>
Date: Thu, 27 Jan 2022 10:02:04 +0100
Subject: [PATCH 06/48] feat: add ``, ``
and `` components (#891)
---
.../e-commerce/src/app/app.component.html | 10 +---
examples/e-commerce/src/app/app.module.ts | 9 +--
.../src/app/snippet/snippet.component.ts | 20 -------
ng-package.json | 1 +
src/index.ts | 12 ++++
.../reverse-highlight.spec.ts.snap | 43 ++++++++++++++
.../__tests__/reverse-highlight.spec.ts | 56 +++++++++++++++++++
.../reverse-highlight.module.ts | 9 +++
src/reverse-highlight/reverse-highlight.ts | 23 ++++++++
.../reverse-snippet.spec.ts.snap | 43 ++++++++++++++
.../__tests__/reverse-snippet.spec.ts | 56 +++++++++++++++++++
src/reverse-snippet/reverse-snippet.module.ts | 9 +++
src/reverse-snippet/reverse-snippet.ts | 23 ++++++++
.../__snapshots__/snippet.spec.ts.snap | 45 +++++++++++++++
src/snippet/__tests__/snippet.spec.ts | 56 +++++++++++++++++++
src/snippet/snippet.module.ts | 9 +++
src/snippet/snippet.ts | 23 ++++++++
17 files changed, 411 insertions(+), 36 deletions(-)
delete mode 100644 examples/e-commerce/src/app/snippet/snippet.component.ts
create mode 100644 src/reverse-highlight/__tests__/__snapshots__/reverse-highlight.spec.ts.snap
create mode 100644 src/reverse-highlight/__tests__/reverse-highlight.spec.ts
create mode 100644 src/reverse-highlight/reverse-highlight.module.ts
create mode 100644 src/reverse-highlight/reverse-highlight.ts
create mode 100644 src/reverse-snippet/__tests__/__snapshots__/reverse-snippet.spec.ts.snap
create mode 100644 src/reverse-snippet/__tests__/reverse-snippet.spec.ts
create mode 100644 src/reverse-snippet/reverse-snippet.module.ts
create mode 100644 src/reverse-snippet/reverse-snippet.ts
create mode 100644 src/snippet/__tests__/__snapshots__/snippet.spec.ts.snap
create mode 100644 src/snippet/__tests__/snippet.spec.ts
create mode 100644 src/snippet/snippet.module.ts
create mode 100644 src/snippet/snippet.ts
diff --git a/examples/e-commerce/src/app/app.component.html b/examples/e-commerce/src/app/app.component.html
index 73de88398..2dbe6ba26 100644
--- a/examples/e-commerce/src/app/app.component.html
+++ b/examples/e-commerce/src/app/app.component.html
@@ -154,16 +154,10 @@ Filters
{{ item.categories && item.categories[0] }}
-
+
-
+ •