Compare commits

...

2 commits

Author SHA1 Message Date
08130a4350 Upgrade typescript-eslint dependencies
When running linting for the first time in a while on my desktop
machine (I didn't have the git hooks set up, oops!), I got some
warnings about my version of Typescript being too recent for my version
of `typescript-eslint`. Upgraded to latest! Linting still works.
2024-05-06 15:08:37 -07:00
a749b331f1 Fix multi-word search in outfit editor
Oops, prior to this commit, searching for "white peach" would return
nothing, whereas now it correctly returns the "Dyeworks White: Just
Peachy Filter", like if you search in the Infinite Closet!

This solution is a bit hacky, wrote some more in the comments about how
to maybe do this better!
2024-05-06 15:08:37 -07:00
3 changed files with 93 additions and 88 deletions

View file

@ -43,8 +43,13 @@ export function useSearchResults(
function buildSearchFilters(query, { speciesId, colorId, altStyleId }) {
const filters = [];
if (query.value) {
filters.push({ key: "name", value: query.value });
// TODO: We're missing quote support, like `background "Dyeworks White"`.
// It might be good to, rather than parse this out here and send it as
// filters, include a text-based part of the query as well, and have
// the server merge them? That'd support text-based `is:nc` etc too.
const words = query.value.split(/\s+/);
for (const word of words) {
filters.push({ key: "name", value: word });
}
if (query.filterToItemKind === "NC") {

View file

@ -29,8 +29,8 @@
"tweenjs": "^1.0.2"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"eslint": "^8.52.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.2",

168
yarn.lock
View file

@ -1292,7 +1292,7 @@ __metadata:
languageName: node
linkType: hard
"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1":
"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.6.1":
version: 4.10.0
resolution: "@eslint-community/regexpp@npm:4.10.0"
checksum: 10c0/c5f60ef1f1ea7649fa7af0e80a5a79f64b55a8a8fa5086de4727eb4c86c652aedee407a9c143b8995d2c0b2d75c1222bec9ba5d73dbfc1f314550554f0979ef4
@ -1589,7 +1589,7 @@ __metadata:
languageName: node
linkType: hard
"@types/json-schema@npm:^7.0.12":
"@types/json-schema@npm:^7.0.15":
version: 7.0.15
resolution: "@types/json-schema@npm:7.0.15"
checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db
@ -1644,7 +1644,7 @@ __metadata:
languageName: node
linkType: hard
"@types/semver@npm:^7.5.0":
"@types/semver@npm:^7.5.8":
version: 7.5.8
resolution: "@types/semver@npm:7.5.8"
checksum: 10c0/8663ff927234d1c5fcc04b33062cb2b9fcfbe0f5f351ed26c4d1e1581657deebd506b41ff7fdf89e787e3d33ce05854bc01686379b89e9c49b564c4cfa988efa
@ -1658,126 +1658,126 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/eslint-plugin@npm:^6.9.1":
version: 6.21.0
resolution: "@typescript-eslint/eslint-plugin@npm:6.21.0"
"@typescript-eslint/eslint-plugin@npm:^7.8.0":
version: 7.8.0
resolution: "@typescript-eslint/eslint-plugin@npm:7.8.0"
dependencies:
"@eslint-community/regexpp": "npm:^4.5.1"
"@typescript-eslint/scope-manager": "npm:6.21.0"
"@typescript-eslint/type-utils": "npm:6.21.0"
"@typescript-eslint/utils": "npm:6.21.0"
"@typescript-eslint/visitor-keys": "npm:6.21.0"
"@eslint-community/regexpp": "npm:^4.10.0"
"@typescript-eslint/scope-manager": "npm:7.8.0"
"@typescript-eslint/type-utils": "npm:7.8.0"
"@typescript-eslint/utils": "npm:7.8.0"
"@typescript-eslint/visitor-keys": "npm:7.8.0"
debug: "npm:^4.3.4"
graphemer: "npm:^1.4.0"
ignore: "npm:^5.2.4"
ignore: "npm:^5.3.1"
natural-compare: "npm:^1.4.0"
semver: "npm:^7.5.4"
ts-api-utils: "npm:^1.0.1"
semver: "npm:^7.6.0"
ts-api-utils: "npm:^1.3.0"
peerDependencies:
"@typescript-eslint/parser": ^6.0.0 || ^6.0.0-alpha
eslint: ^7.0.0 || ^8.0.0
"@typescript-eslint/parser": ^7.0.0
eslint: ^8.56.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/f911a79ee64d642f814a3b6cdb0d324b5f45d9ef955c5033e78903f626b7239b4aa773e464a38c3e667519066169d983538f2bf8e5d00228af587c9d438fb344
checksum: 10c0/37ca22620d1834ff0baa28fa4b8fd92039a3903cb95748353de32d56bae2a81ce50d1bbaed27487eebc884e0a0f9387fcb0f1647593e4e6df5111ef674afa9f0
languageName: node
linkType: hard
"@typescript-eslint/parser@npm:^6.9.1":
version: 6.21.0
resolution: "@typescript-eslint/parser@npm:6.21.0"
"@typescript-eslint/parser@npm:^7.8.0":
version: 7.8.0
resolution: "@typescript-eslint/parser@npm:7.8.0"
dependencies:
"@typescript-eslint/scope-manager": "npm:6.21.0"
"@typescript-eslint/types": "npm:6.21.0"
"@typescript-eslint/typescript-estree": "npm:6.21.0"
"@typescript-eslint/visitor-keys": "npm:6.21.0"
"@typescript-eslint/scope-manager": "npm:7.8.0"
"@typescript-eslint/types": "npm:7.8.0"
"@typescript-eslint/typescript-estree": "npm:7.8.0"
"@typescript-eslint/visitor-keys": "npm:7.8.0"
debug: "npm:^4.3.4"
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
eslint: ^8.56.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/a8f99820679decd0d115c0af61903fb1de3b1b5bec412dc72b67670bf636de77ab07f2a68ee65d6da7976039bbf636907f9d5ca546db3f0b98a31ffbc225bc7d
checksum: 10c0/0dd994c1b31b810c25e1b755b8d352debb7bf21a31f9a91acaec34acf4e471320bcceaa67cf64c110c0b8f5fac10a037dbabac6ec423e17adf037e59a7bce9c1
languageName: node
linkType: hard
"@typescript-eslint/scope-manager@npm:6.21.0":
version: 6.21.0
resolution: "@typescript-eslint/scope-manager@npm:6.21.0"
"@typescript-eslint/scope-manager@npm:7.8.0":
version: 7.8.0
resolution: "@typescript-eslint/scope-manager@npm:7.8.0"
dependencies:
"@typescript-eslint/types": "npm:6.21.0"
"@typescript-eslint/visitor-keys": "npm:6.21.0"
checksum: 10c0/eaf868938d811cbbea33e97e44ba7050d2b6892202cea6a9622c486b85ab1cf801979edf78036179a8ba4ac26f1dfdf7fcc83a68c1ff66be0b3a8e9a9989b526
"@typescript-eslint/types": "npm:7.8.0"
"@typescript-eslint/visitor-keys": "npm:7.8.0"
checksum: 10c0/c253b98e96d4bf0375f473ca2c4d081726f1fd926cdfa65ee14c9ee99cca8eddb763b2d238ac365daa7246bef21b0af38180d04e56e9df7443c0e6f8474d097c
languageName: node
linkType: hard
"@typescript-eslint/type-utils@npm:6.21.0":
version: 6.21.0
resolution: "@typescript-eslint/type-utils@npm:6.21.0"
"@typescript-eslint/type-utils@npm:7.8.0":
version: 7.8.0
resolution: "@typescript-eslint/type-utils@npm:7.8.0"
dependencies:
"@typescript-eslint/typescript-estree": "npm:6.21.0"
"@typescript-eslint/utils": "npm:6.21.0"
"@typescript-eslint/typescript-estree": "npm:7.8.0"
"@typescript-eslint/utils": "npm:7.8.0"
debug: "npm:^4.3.4"
ts-api-utils: "npm:^1.0.1"
ts-api-utils: "npm:^1.3.0"
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
eslint: ^8.56.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/7409c97d1c4a4386b488962739c4f1b5b04dc60cf51f8cd88e6b12541f84d84c6b8b67e491a147a2c95f9ec486539bf4519fb9d418411aef6537b9c156468117
checksum: 10c0/00f6315626b64f7dbc1f7fba6f365321bb8d34141ed77545b2a07970e59a81dbdf768c1e024225ea00953750d74409ddd8a16782fc4a39261e507c04192dacab
languageName: node
linkType: hard
"@typescript-eslint/types@npm:6.21.0":
version: 6.21.0
resolution: "@typescript-eslint/types@npm:6.21.0"
checksum: 10c0/020631d3223bbcff8a0da3efbdf058220a8f48a3de221563996ad1dcc30d6c08dadc3f7608cc08830d21c0d565efd2db19b557b9528921c78aabb605eef2d74d
"@typescript-eslint/types@npm:7.8.0":
version: 7.8.0
resolution: "@typescript-eslint/types@npm:7.8.0"
checksum: 10c0/b2fdbfc21957bfa46f7d8809b607ad8c8b67c51821d899064d09392edc12f28b2318a044f0cd5d523d782e84e8f0558778877944964cf38e139f88790cf9d466
languageName: node
linkType: hard
"@typescript-eslint/typescript-estree@npm:6.21.0":
version: 6.21.0
resolution: "@typescript-eslint/typescript-estree@npm:6.21.0"
"@typescript-eslint/typescript-estree@npm:7.8.0":
version: 7.8.0
resolution: "@typescript-eslint/typescript-estree@npm:7.8.0"
dependencies:
"@typescript-eslint/types": "npm:6.21.0"
"@typescript-eslint/visitor-keys": "npm:6.21.0"
"@typescript-eslint/types": "npm:7.8.0"
"@typescript-eslint/visitor-keys": "npm:7.8.0"
debug: "npm:^4.3.4"
globby: "npm:^11.1.0"
is-glob: "npm:^4.0.3"
minimatch: "npm:9.0.3"
semver: "npm:^7.5.4"
ts-api-utils: "npm:^1.0.1"
minimatch: "npm:^9.0.4"
semver: "npm:^7.6.0"
ts-api-utils: "npm:^1.3.0"
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/af1438c60f080045ebb330155a8c9bb90db345d5069cdd5d01b67de502abb7449d6c75500519df829f913a6b3f490ade3e8215279b6bdc63d0fb0ae61034df5f
checksum: 10c0/1690b62679685073dcb0f62499f0b52b445b37ae6e12d02aa4acbafe3fb023cf999b01f714b6282e88f84fd934fe3e2eefb21a64455d19c348d22bbc68ca8e47
languageName: node
linkType: hard
"@typescript-eslint/utils@npm:6.21.0":
version: 6.21.0
resolution: "@typescript-eslint/utils@npm:6.21.0"
"@typescript-eslint/utils@npm:7.8.0":
version: 7.8.0
resolution: "@typescript-eslint/utils@npm:7.8.0"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.4.0"
"@types/json-schema": "npm:^7.0.12"
"@types/semver": "npm:^7.5.0"
"@typescript-eslint/scope-manager": "npm:6.21.0"
"@typescript-eslint/types": "npm:6.21.0"
"@typescript-eslint/typescript-estree": "npm:6.21.0"
semver: "npm:^7.5.4"
"@types/json-schema": "npm:^7.0.15"
"@types/semver": "npm:^7.5.8"
"@typescript-eslint/scope-manager": "npm:7.8.0"
"@typescript-eslint/types": "npm:7.8.0"
"@typescript-eslint/typescript-estree": "npm:7.8.0"
semver: "npm:^7.6.0"
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
checksum: 10c0/ab2df3833b2582d4e5467a484d08942b4f2f7208f8e09d67de510008eb8001a9b7460f2f9ba11c12086fd3cdcac0c626761c7995c2c6b5657d5fa6b82030a32d
eslint: ^8.56.0
checksum: 10c0/31fb58388d15b082eb7bd5bce889cc11617aa1131dfc6950471541b3df64c82d1c052e2cccc230ca4ae80456d4f63a3e5dccb79899a8f3211ce36c089b7d7640
languageName: node
linkType: hard
"@typescript-eslint/visitor-keys@npm:6.21.0":
version: 6.21.0
resolution: "@typescript-eslint/visitor-keys@npm:6.21.0"
"@typescript-eslint/visitor-keys@npm:7.8.0":
version: 7.8.0
resolution: "@typescript-eslint/visitor-keys@npm:7.8.0"
dependencies:
"@typescript-eslint/types": "npm:6.21.0"
eslint-visitor-keys: "npm:^3.4.1"
checksum: 10c0/7395f69739cfa1cb83c1fb2fad30afa2a814756367302fb4facd5893eff66abc807e8d8f63eba94ed3b0fe0c1c996ac9a1680bcbf0f83717acedc3f2bb724fbf
"@typescript-eslint/types": "npm:7.8.0"
eslint-visitor-keys: "npm:^3.4.3"
checksum: 10c0/5892fb5d9c58efaf89adb225f7dbbb77f9363961f2ff420b6b130bdd102dddd7aa8a16c46a5a71c19889d27b781e966119a89270555ea2cb5653a04d8994123d
languageName: node
linkType: hard
@ -3522,7 +3522,7 @@ __metadata:
languageName: node
linkType: hard
"ignore@npm:^5.2.0, ignore@npm:^5.2.4":
"ignore@npm:^5.2.0, ignore@npm:^5.3.1":
version: 5.3.1
resolution: "ignore@npm:5.3.1"
checksum: 10c0/703f7f45ffb2a27fb2c5a8db0c32e7dee66b33a225d28e8db4e1be6474795f606686a6e3bcc50e1aa12f2042db4c9d4a7d60af3250511de74620fbed052ea4cd
@ -3560,8 +3560,8 @@ __metadata:
"@sentry/react": "npm:^5.30.0"
"@sentry/tracing": "npm:^5.30.0"
"@tanstack/react-query": "npm:^5.4.3"
"@typescript-eslint/eslint-plugin": "npm:^6.9.1"
"@typescript-eslint/parser": "npm:^6.9.1"
"@typescript-eslint/eslint-plugin": "npm:^7.8.0"
"@typescript-eslint/parser": "npm:^7.8.0"
apollo-link-persisted-queries: "npm:^0.2.2"
easeljs: "npm:^1.0.2"
esbuild: "npm:^0.19.0"
@ -4124,15 +4124,6 @@ __metadata:
languageName: node
linkType: hard
"minimatch@npm:9.0.3":
version: 9.0.3
resolution: "minimatch@npm:9.0.3"
dependencies:
brace-expansion: "npm:^2.0.1"
checksum: 10c0/85f407dcd38ac3e180f425e86553911d101455ca3ad5544d6a7cec16286657e4f8a9aa6695803025c55e31e35a91a2252b5dc8e7d527211278b8b65b4dbd5eac
languageName: node
linkType: hard
"minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2":
version: 3.1.2
resolution: "minimatch@npm:3.1.2"
@ -4142,6 +4133,15 @@ __metadata:
languageName: node
linkType: hard
"minimatch@npm:^9.0.4":
version: 9.0.4
resolution: "minimatch@npm:9.0.4"
dependencies:
brace-expansion: "npm:^2.0.1"
checksum: 10c0/2c16f21f50e64922864e560ff97c587d15fd491f65d92a677a344e970fe62aafdbeafe648965fa96d33c061b4d0eabfe0213466203dd793367e7f28658cf6414
languageName: node
linkType: hard
"ms@npm:2.0.0":
version: 2.0.0
resolution: "ms@npm:2.0.0"
@ -4936,7 +4936,7 @@ __metadata:
languageName: node
linkType: hard
"semver@npm:^7.5.4":
"semver@npm:^7.6.0":
version: 7.6.0
resolution: "semver@npm:7.6.0"
dependencies:
@ -5232,7 +5232,7 @@ __metadata:
languageName: node
linkType: hard
"ts-api-utils@npm:^1.0.1":
"ts-api-utils@npm:^1.3.0":
version: 1.3.0
resolution: "ts-api-utils@npm:1.3.0"
peerDependencies: