From 68fd5d0a694fb0468553e5f60868cb340091a1f3 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Sat, 31 Aug 2024 13:09:24 -0400 Subject: [PATCH] Upgrade to Choices.js 11 --- package-lock.json | 68 ++++++++++++------------------------------ package.json | 6 ++-- scripts/add-city.ts | 2 ++ scripts/base.ts | 2 ++ src/css/_dropdown.scss | 7 ----- 5 files changed, 26 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index e2723bb..4e29bd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,9 +12,8 @@ "@fortawesome/free-regular-svg-icons": "^6.5.2", "@fortawesome/free-solid-svg-icons": "^6.5.2", "@parcel/resolver-glob": "^2.10.3", - "choices.js": "^10.2.0", - "leaflet": "~1.9.3", - "ts-results": "^3.3.0" + "choices.js": "^11.0.1", + "leaflet": "~1.9.3" }, "devDependencies": { "@parcel/compressor-brotli": "^2.10.3", @@ -33,6 +32,7 @@ "playwright": "^1.34.3", "prettier": "^3.3.3", "ts-node": "^10.9.2", + "ts-results": "^3.3.0", "typescript": "^5.3.3" } }, @@ -223,22 +223,6 @@ "node": ">=4" } }, - "node_modules/@babel/runtime": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", - "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/runtime/node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" - }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -3109,13 +3093,12 @@ } }, "node_modules/choices.js": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/choices.js/-/choices.js-10.2.0.tgz", - "integrity": "sha512-8PKy6wq7BMjNwDTZwr3+Zry6G2+opJaAJDDA/j3yxvqSCnvkKe7ZIFfIyOhoc7htIWFhsfzF9tJpGUATcpUtPg==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/choices.js/-/choices.js-11.0.1.tgz", + "integrity": "sha512-yKYJvoqrJBn8PoRGfhTNqP0zBlC+DCGUbtE7zgRIYtyryWr/Z8EdW5Uw3G8Jhoo+1fNNHBP4yu0UMRqFwDQO9w==", + "license": "MIT", "dependencies": { - "deepmerge": "^4.2.2", - "fuse.js": "^6.6.2", - "redux": "^4.2.0" + "fuse.js": "^7.0.0" } }, "node_modules/chokidar": { @@ -3444,14 +3427,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/define-data-property": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.2.tgz", @@ -4270,9 +4245,10 @@ } }, "node_modules/fuse.js": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-6.6.2.tgz", - "integrity": "sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-7.0.0.tgz", + "integrity": "sha512-14F4hBIxqKvD4Zz/XjDc3y94mNZN6pRv3U13Udo0lNLCWRBUsrMv2xwcF/y/Z5sV6+FQW+/ow68cHpm4sunt8Q==", + "license": "Apache-2.0", "engines": { "node": ">=10" } @@ -5373,11 +5349,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -6036,14 +6013,6 @@ "node": ">=8.10.0" } }, - "node_modules/redux": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", - "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", - "dependencies": { - "@babel/runtime": "^7.9.2" - } - }, "node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", @@ -6598,7 +6567,8 @@ "node_modules/ts-results": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/ts-results/-/ts-results-3.3.0.tgz", - "integrity": "sha512-FWqxGX2NHp5oCyaMd96o2y2uMQmSu8Dey6kvyuFdRJ2AzfmWo3kWa4UsPlCGlfQ/qu03m09ZZtppMoY8EMHuiA==" + "integrity": "sha512-FWqxGX2NHp5oCyaMd96o2y2uMQmSu8Dey6kvyuFdRJ2AzfmWo3kWa4UsPlCGlfQ/qu03m09ZZtppMoY8EMHuiA==", + "dev": true }, "node_modules/tsconfig-paths": { "version": "3.15.0", diff --git a/package.json b/package.json index efe7c38..77d3dd5 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,8 @@ "@fortawesome/free-regular-svg-icons": "^6.5.2", "@fortawesome/free-solid-svg-icons": "^6.5.2", "@parcel/resolver-glob": "^2.10.3", - "choices.js": "^10.2.0", - "leaflet": "~1.9.3", - "ts-results": "^3.3.0" + "choices.js": "^11.0.1", + "leaflet": "~1.9.3" }, "devDependencies": { "@parcel/compressor-brotli": "^2.10.3", @@ -43,6 +42,7 @@ "playwright": "^1.34.3", "prettier": "^3.3.3", "ts-node": "^10.9.2", + "ts-results": "^3.3.0", "typescript": "^5.3.3" }, "targets": { diff --git a/scripts/add-city.ts b/scripts/add-city.ts index e472c49..683155c 100644 --- a/scripts/add-city.ts +++ b/scripts/add-city.ts @@ -1,3 +1,5 @@ +/* eslint-disable import/no-extraneous-dependencies */ + import results from "ts-results"; import fs from "fs/promises"; import { determineArgs, updateCoordinates, updateParkingLots } from "./base.ts"; diff --git a/scripts/base.ts b/scripts/base.ts index 3b1fbc2..f0ea397 100644 --- a/scripts/base.ts +++ b/scripts/base.ts @@ -1,3 +1,5 @@ +/* eslint-disable import/no-extraneous-dependencies */ + import results from "ts-results"; import fs from "fs/promises"; import { diff --git a/src/css/_dropdown.scss b/src/css/_dropdown.scss index 7588f04..44e759b 100644 --- a/src/css/_dropdown.scss +++ b/src/css/_dropdown.scss @@ -53,10 +53,3 @@ div.choices__item.choices__item--choice.choices__item--selectable { z-index: zindex.$dropdown; color: colors.$black; } - -.choices__list--dropdown .choices__item--selectable, -.choices__list[aria-expanded] .choices__item--selectable { - // Choices.js sets this to 100px to account for itemSelectText. But we disable that, - // so we want to use the normal padding it would otherwise use of 10px. - padding-right: 10px; -}