From d5e0a34bbb2db14ff0f7d3a545efd121b842f18e Mon Sep 17 00:00:00 2001 From: gitname Date: Tue, 7 Feb 2023 17:07:58 -0800 Subject: [PATCH 1/2] Update Node version requirements to exclude v17+ --- web_full_stack/js/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_full_stack/js/README.md b/web_full_stack/js/README.md index 49cf119..48be678 100644 --- a/web_full_stack/js/README.md +++ b/web_full_stack/js/README.md @@ -3,7 +3,7 @@ JavaScript Code Extension The JS Code Extension is a React application created using [create-react-app](https://github.com/facebook/create-react-app). Tests are written using [enzyme](https://github.com/airbnb/enzyme) and [react-router](https://github.com/ReactTraining/react-router) manages routing. # Setup -You'll need [yarn](https://yarnpkg.com/en/) installed and a recent version (>= 10) of [Node](https://nodejs.org/en/) to use this project. If you're using homebrew you can brew install both of those or if you want to manage multiple versions of node on your machine, we suggest using a tool like [nodenv](https://github.com/nodenv/nodenv). +You'll need [yarn](https://yarnpkg.com/en/) installed and a version of [Node](https://nodejs.org/en/) between v10 and v16, inclusive, to use this project. If you're using homebrew you can brew install both of those or if you want to manage multiple versions of node on your machine, we suggest using a tool like [nodenv](https://github.com/nodenv/nodenv). * `yarn install` to install dependencies. From d2d27bcc52ac61ecb1d07f63f47bf3c897a4dcd4 Mon Sep 17 00:00:00 2001 From: gitname Date: Tue, 7 Feb 2023 17:58:35 -0800 Subject: [PATCH 2/2] Interpret query as literal string instead of as regular expression --- web_full_stack/js/src/CategoriesPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_full_stack/js/src/CategoriesPage.js b/web_full_stack/js/src/CategoriesPage.js index f189116..ecee797 100644 --- a/web_full_stack/js/src/CategoriesPage.js +++ b/web_full_stack/js/src/CategoriesPage.js @@ -17,7 +17,7 @@ function filteredCategories(categories, query) { if (!query) { return categories }; return categories.filter((category) => { - return category.full_name.match(new RegExp(query, 'i')); + return category.full_name.toLowerCase().includes(query.toLowerCase()); }); }