From 3de446ce0df43e742a37a4d2fe4b5c8639ec650f Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Thu, 2 Nov 2023 15:13:49 -0400 Subject: [PATCH 1/6] Stabilize useBlocker --- .changeset/stabilize-use-blocker.md | 5 ++ docs/hooks/use-blocker.md | 82 +++++++++++++++++++++++++++++ docs/hooks/use-prompt.md | 49 +++++++++++++++++ packages/remix-react/index.tsx | 2 +- 4 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 .changeset/stabilize-use-blocker.md create mode 100644 docs/hooks/use-blocker.md create mode 100644 docs/hooks/use-prompt.md diff --git a/.changeset/stabilize-use-blocker.md b/.changeset/stabilize-use-blocker.md new file mode 100644 index 00000000000..e13e70ba9e4 --- /dev/null +++ b/.changeset/stabilize-use-blocker.md @@ -0,0 +1,5 @@ +--- +"@remix-run/react": minor +--- + +Remove the `unstable_` prefix from the [`useBlocker`](https://reactrouter.com/en/main/hooks/use-blocker) hook as it's been in use for enough time that we are confident in the API. We do not plan to remove the prefix from `unstable_usePrompt` due to differences in how browsers handle `window.confirm` that prevent React Router from guaranteeing consistent/correct behavior. diff --git a/docs/hooks/use-blocker.md b/docs/hooks/use-blocker.md new file mode 100644 index 00000000000..c1f18bf807a --- /dev/null +++ b/docs/hooks/use-blocker.md @@ -0,0 +1,82 @@ +--- +title: useBlocker +--- + +# `useBlocker` + +The `useBlocker` hook allows you to prevent the user from navigating away from the current location, and present them with a custom UI to allow them to confirm the navigation. + + +This only works for client-side navigations within your React Router application and will not block document requests. To prevent document navigations you will need to add your own `beforeunload` event handler. + + + +Blocking a user from navigating is a bit of an anti-pattern, so please carefully consider any usage of this hook and use it sparingly. In the de-facto use case of preventing a user navigating away from a half-filled form, you might consider persisting unsaved state to `sessionStorage` and automatically re-filling it if they return instead of blocking them from navigating away. + + +```tsx +function ImportantForm() { + const [value, setValue] = React.useState(""); + + // Block navigating elsewhere when data has been entered into the input + const blocker = useBlocker( + ({ currentLocation, nextLocation }) => + value !== "" && + currentLocation.pathname !== nextLocation.pathname + ); + + return ( +
+ + + + {blocker.state === "blocked" ? ( +
+

Are you sure you want to leave?

+ + +
+ ) : null} +
+ ); +} +``` + +For a more complete example, please refer to the [example][example] in the repository. + +## Properties + +### `state` + +The current state of the blocker + +- `unblocked` - the blocker is idle and has not prevented any navigation +- `blocked` - the blocker has prevented a navigation +- `proceeding` - the blocker is proceeding through from a blocked navigation + +### `location` + +When in a `blocked` state, this represents the location to which we blocked a navigation. When in a `proceeding` state, this is the location being navigated to after a `blocker.proceed()` call. + +## Methods + +### `proceed()` + +When in a `blocked` state, you may call `blocker.proceed()` to proceed to the blocked location. + +### `reset()` + +When in a `blocked` state, you may call `blocker.reset()` to return the blocker back to an `unblocked` state and leave the user at the current location. + +[example]: https://github.com/remix-run/react-router/tree/main/examples/navigation-blocking diff --git a/docs/hooks/use-prompt.md b/docs/hooks/use-prompt.md new file mode 100644 index 00000000000..47b1a3a3f29 --- /dev/null +++ b/docs/hooks/use-prompt.md @@ -0,0 +1,49 @@ +--- +title: unstable_usePrompt +--- + +# `unstable_usePrompt` + +The `unstable_usePrompt` hook allows you to prompt the user for confirmation via [`window.confirm`][window-confirm] prior to navigating away from the current location. + + +This only works for client-side navigations within your React Router application and will not block document requests. To prevent document navigations you will need to add your own `beforeunload` event handler. + + + +Blocking a user from navigating is a bit of an anti-pattern, so please carefully consider any usage of this hook and use it sparingly. In the de-facto use case of preventing a user navigating away from a half-filled form, you might consider persisting unsaved state to `sessionStorage` and automatically re-filling it if they return instead of blocking them from navigating away. + + + +We do not plan to remove the `unstable_` prefix from this hook because the behavior is non-deterministic across browsers when the prompt is open, so React Router cannot guarantee correct behavior in all scenarios. To avoid this non-determinism, we recommend using `useBlocker` instead which also gives you control over the confirmation UX. + + +```tsx +function ImportantForm() { + const [value, setValue] = React.useState(""); + + // Block navigating elsewhere when data has been entered into the input + unstable_usePrompt({ + message: "Are you sure?", + when: ({ currentLocation, nextLocation }) => + value !== "" && + currentLocation.pathname !== nextLocation.pathname, + }); + + return ( +
+ + +
+ ); +} +``` + +[window-confirm]: https://developer.mozilla.org/en-US/docs/Web/API/Window/confirm diff --git a/packages/remix-react/index.tsx b/packages/remix-react/index.tsx index a5ac3ef8cae..10531970fe9 100644 --- a/packages/remix-react/index.tsx +++ b/packages/remix-react/index.tsx @@ -48,7 +48,7 @@ export { useRouteError, useSearchParams, useSubmit, - unstable_useBlocker, + useBlocker, unstable_usePrompt, unstable_useViewTransitionState, } from "react-router-dom"; From 1028604de997b57f2982023a3a9779a1b125df9b Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Wed, 8 Nov 2023 13:09:12 -0500 Subject: [PATCH 2/6] Point to RR experimental --- packages/remix-dev/package.json | 2 +- packages/remix-react/package.json | 4 +- packages/remix-server-runtime/package.json | 2 +- packages/remix-testing/package.json | 4 +- yarn.lock | 65 ++++++++++------------ 5 files changed, 34 insertions(+), 43 deletions(-) diff --git a/packages/remix-dev/package.json b/packages/remix-dev/package.json index e8773368213..6a8084b4904 100644 --- a/packages/remix-dev/package.json +++ b/packages/remix-dev/package.json @@ -29,7 +29,7 @@ "@mdx-js/mdx": "^2.3.0", "@npmcli/package-json": "^4.0.1", "@remix-run/node": "2.2.0", - "@remix-run/router": "1.11.0", + "@remix-run/router": "0.0.0-experimental-e192105b", "@remix-run/server-runtime": "2.2.0", "@types/mdx": "^2.0.5", "@vanilla-extract/integration": "^6.2.0", diff --git a/packages/remix-react/package.json b/packages/remix-react/package.json index cdaa1d6be7d..bee518a23ba 100644 --- a/packages/remix-react/package.json +++ b/packages/remix-react/package.json @@ -16,9 +16,9 @@ "typings": "dist/index.d.ts", "module": "dist/esm/index.js", "dependencies": { - "@remix-run/router": "1.11.0", + "@remix-run/router": "0.0.0-experimental-e192105b", "@remix-run/server-runtime": "2.2.0", - "react-router-dom": "6.18.0" + "react-router-dom": "0.0.0-experimental-e192105b" }, "devDependencies": { "@testing-library/jest-dom": "^5.17.0", diff --git a/packages/remix-server-runtime/package.json b/packages/remix-server-runtime/package.json index 637770a8884..0c5ce0abf54 100644 --- a/packages/remix-server-runtime/package.json +++ b/packages/remix-server-runtime/package.json @@ -16,7 +16,7 @@ "typings": "dist/index.d.ts", "module": "dist/esm/index.js", "dependencies": { - "@remix-run/router": "1.11.0", + "@remix-run/router": "0.0.0-experimental-e192105b", "@types/cookie": "^0.4.1", "@web3-storage/multipart-parser": "^1.0.0", "cookie": "^0.4.1", diff --git a/packages/remix-testing/package.json b/packages/remix-testing/package.json index 0cb369be94a..0a8ec0bf046 100644 --- a/packages/remix-testing/package.json +++ b/packages/remix-testing/package.json @@ -18,8 +18,8 @@ "dependencies": { "@remix-run/node": "2.2.0", "@remix-run/react": "2.2.0", - "@remix-run/router": "1.11.0", - "react-router-dom": "6.18.0" + "@remix-run/router": "0.0.0-experimental-e192105b", + "react-router-dom": "0.0.0-experimental-e192105b" }, "devDependencies": { "@types/node": "^18.17.1", diff --git a/yarn.lock b/yarn.lock index b0e6fdf0be2..e791909705b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28,7 +28,7 @@ run-waterfall "^1.1.7" uid-safe "^2.1.5" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.10", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.22.5": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.10", "@babel/code-frame@^7.22.13": version "7.22.13" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== @@ -255,12 +255,7 @@ resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== -"@babel/helper-validator-identifier@^7.19.1", "@babel/helper-validator-identifier@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" - integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== - -"@babel/helper-validator-identifier@^7.22.20": +"@babel/helper-validator-identifier@^7.19.1", "@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.22.5": version "7.22.20" resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== @@ -298,7 +293,7 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.21.8", "@babel/parser@^7.22.10", "@babel/parser@^7.22.15", "@babel/parser@^7.22.5", "@babel/parser@^7.23.0": +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.21.8", "@babel/parser@^7.22.10", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0": version "7.23.0" resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== @@ -1010,16 +1005,7 @@ dependencies: regenerator-runtime "^0.13.11" -"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.22.5", "@babel/template@^7.3.3": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec" - integrity sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw== - dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/parser" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/template@^7.22.15": +"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.22.15", "@babel/template@^7.22.5", "@babel/template@^7.3.3": version "7.22.15" resolved "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== @@ -2184,10 +2170,10 @@ "@changesets/types" "^5.0.0" dotenv "^8.1.0" -"@remix-run/router@1.11.0": - version "1.11.0" - resolved "https://registry.npmjs.org/@remix-run/router/-/router-1.11.0.tgz#e0e45ac3fff9d8a126916f166809825537e9f955" - integrity sha512-BHdhcWgeiudl91HvVa2wxqZjSHbheSgIiDvxrF1VjFzBzpTtuDPkOdOi3Iqvc08kXtFkLjhbS+ML9aM8mJS+wQ== +"@remix-run/router@0.0.0-experimental-e192105b": + version "0.0.0-experimental-e192105b" + resolved "https://registry.npmjs.org/@remix-run/router/-/router-0.0.0-experimental-e192105b.tgz#5cd3c90a6baa250df4f22b5801bfaef2ab924445" + integrity sha512-BFGsHpBSOAzj+UHwODcVVklK9NhkHkoFLXdw4sU2TZT1PN7BHk7RNT/l0ysK9OYb56rZf2jC8XpFpjYVk2rrfg== "@remix-run/web-blob@^3.1.0": version "3.1.0" @@ -3193,9 +3179,9 @@ acorn-jsx@^5.0.0, acorn-jsx@^5.3.2: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn@^8.0.0, acorn@^8.8.0, acorn@^8.8.1: - version "8.11.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.0.tgz#04306e13732231c995ac4363f331ee09db278d82" - integrity sha512-hNiSyky+cuYVALBrsjB7f9gMN9P4u09JyAiMNMLaVfsmkDJuH84M1T/0pfDX/OJfGWcobd2A7ecXYzygn8wibA== + version "8.11.2" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== agent-base@6: version "6.0.2" @@ -10157,11 +10143,16 @@ pumpify@^1.3.3: inherits "^2.0.3" pump "^2.0.0" -punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.0: +punycode@^2.1.0, punycode@^2.1.1: version "2.3.0" resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== +punycode@^2.3.0: + version "2.3.1" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + pure-rand@^6.0.0: version "6.0.2" resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz#a9c2ddcae9b68d736a8163036f088a2781c8b306" @@ -10268,20 +10259,20 @@ react-refresh@^0.14.0: resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz" integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== -react-router-dom@6.18.0: - version "6.18.0" - resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.18.0.tgz#0a50c167209d6e7bd2ed9de200a6579ea4fb1dca" - integrity sha512-Ubrue4+Ercc/BoDkFQfc6og5zRQ4A8YxSO3Knsne+eRbZ+IepAsK249XBH/XaFuOYOYr3L3r13CXTLvYt5JDjw== +react-router-dom@0.0.0-experimental-e192105b: + version "0.0.0-experimental-e192105b" + resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-0.0.0-experimental-e192105b.tgz#a773bb1c65d0015cfa7de20ab2d895f2bbeeaf00" + integrity sha512-fvaBiPiQeOEI3yt5mVtulfOWoF0ZfrvG1MmOygf1RLQI51/+nxnEss865IDsjMb9nbbhVoZsKc2P4wgXxJTyvg== dependencies: - "@remix-run/router" "1.11.0" - react-router "6.18.0" + "@remix-run/router" "0.0.0-experimental-e192105b" + react-router "0.0.0-experimental-e192105b" -react-router@6.18.0: - version "6.18.0" - resolved "https://registry.npmjs.org/react-router/-/react-router-6.18.0.tgz#32e2bedc318e095a48763b5ed7758e54034cd36a" - integrity sha512-vk2y7Dsy8wI02eRRaRmOs9g2o+aE72YCx5q9VasT1N9v+lrdB79tIqrjMfByHiY5+6aYkH2rUa5X839nwWGPDg== +react-router@0.0.0-experimental-e192105b: + version "0.0.0-experimental-e192105b" + resolved "https://registry.npmjs.org/react-router/-/react-router-0.0.0-experimental-e192105b.tgz#8eda0384989993e46417fda3980a94e250b35d95" + integrity sha512-Ch5roh8nXPYThf9GVjCNoBCEbcJdYfbOowMjS9crp9V6S41yL4HRUolvPZuVmZVB7m40mfgCAgr9E4mQPmQaHw== dependencies: - "@remix-run/router" "1.11.0" + "@remix-run/router" "0.0.0-experimental-e192105b" react@^18.2.0: version "18.2.0" From be5289911218095336991598186604e17b463446 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Wed, 8 Nov 2023 13:24:28 -0500 Subject: [PATCH 3/6] Point to RR experimental --- packages/remix-dev/package.json | 2 +- packages/remix-react/package.json | 4 +-- packages/remix-server-runtime/package.json | 2 +- packages/remix-testing/package.json | 4 +-- yarn.lock | 30 +++++++++++----------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/remix-dev/package.json b/packages/remix-dev/package.json index 6a8084b4904..f54d4eaaa94 100644 --- a/packages/remix-dev/package.json +++ b/packages/remix-dev/package.json @@ -29,7 +29,7 @@ "@mdx-js/mdx": "^2.3.0", "@npmcli/package-json": "^4.0.1", "@remix-run/node": "2.2.0", - "@remix-run/router": "0.0.0-experimental-e192105b", + "@remix-run/router": "0.0.0-experimental-7f486334", "@remix-run/server-runtime": "2.2.0", "@types/mdx": "^2.0.5", "@vanilla-extract/integration": "^6.2.0", diff --git a/packages/remix-react/package.json b/packages/remix-react/package.json index bee518a23ba..43e37810d2b 100644 --- a/packages/remix-react/package.json +++ b/packages/remix-react/package.json @@ -16,9 +16,9 @@ "typings": "dist/index.d.ts", "module": "dist/esm/index.js", "dependencies": { - "@remix-run/router": "0.0.0-experimental-e192105b", + "@remix-run/router": "0.0.0-experimental-7f486334", "@remix-run/server-runtime": "2.2.0", - "react-router-dom": "0.0.0-experimental-e192105b" + "react-router-dom": "0.0.0-experimental-7f486334" }, "devDependencies": { "@testing-library/jest-dom": "^5.17.0", diff --git a/packages/remix-server-runtime/package.json b/packages/remix-server-runtime/package.json index 0c5ce0abf54..ba8b4bedfad 100644 --- a/packages/remix-server-runtime/package.json +++ b/packages/remix-server-runtime/package.json @@ -16,7 +16,7 @@ "typings": "dist/index.d.ts", "module": "dist/esm/index.js", "dependencies": { - "@remix-run/router": "0.0.0-experimental-e192105b", + "@remix-run/router": "0.0.0-experimental-7f486334", "@types/cookie": "^0.4.1", "@web3-storage/multipart-parser": "^1.0.0", "cookie": "^0.4.1", diff --git a/packages/remix-testing/package.json b/packages/remix-testing/package.json index 0a8ec0bf046..d19436bd94a 100644 --- a/packages/remix-testing/package.json +++ b/packages/remix-testing/package.json @@ -18,8 +18,8 @@ "dependencies": { "@remix-run/node": "2.2.0", "@remix-run/react": "2.2.0", - "@remix-run/router": "0.0.0-experimental-e192105b", - "react-router-dom": "0.0.0-experimental-e192105b" + "@remix-run/router": "0.0.0-experimental-7f486334", + "react-router-dom": "0.0.0-experimental-7f486334" }, "devDependencies": { "@types/node": "^18.17.1", diff --git a/yarn.lock b/yarn.lock index e791909705b..2f174851f59 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2170,10 +2170,10 @@ "@changesets/types" "^5.0.0" dotenv "^8.1.0" -"@remix-run/router@0.0.0-experimental-e192105b": - version "0.0.0-experimental-e192105b" - resolved "https://registry.npmjs.org/@remix-run/router/-/router-0.0.0-experimental-e192105b.tgz#5cd3c90a6baa250df4f22b5801bfaef2ab924445" - integrity sha512-BFGsHpBSOAzj+UHwODcVVklK9NhkHkoFLXdw4sU2TZT1PN7BHk7RNT/l0ysK9OYb56rZf2jC8XpFpjYVk2rrfg== +"@remix-run/router@0.0.0-experimental-7f486334": + version "0.0.0-experimental-7f486334" + resolved "https://registry.npmjs.org/@remix-run/router/-/router-0.0.0-experimental-7f486334.tgz#82361fef9abc5d02cfa962330d58befd67e71b74" + integrity sha512-CqAgC/HXAOYVVnOgp54hglEeBRhEekLISSX0qhPcejfiavGNrNXcZcR5YQlEN58vldkKQsLuyGab/VkjXdKmiw== "@remix-run/web-blob@^3.1.0": version "3.1.0" @@ -10259,20 +10259,20 @@ react-refresh@^0.14.0: resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz" integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== -react-router-dom@0.0.0-experimental-e192105b: - version "0.0.0-experimental-e192105b" - resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-0.0.0-experimental-e192105b.tgz#a773bb1c65d0015cfa7de20ab2d895f2bbeeaf00" - integrity sha512-fvaBiPiQeOEI3yt5mVtulfOWoF0ZfrvG1MmOygf1RLQI51/+nxnEss865IDsjMb9nbbhVoZsKc2P4wgXxJTyvg== +react-router-dom@0.0.0-experimental-7f486334: + version "0.0.0-experimental-7f486334" + resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-0.0.0-experimental-7f486334.tgz#35714157ab8616ab634831512d268a5d8f631eef" + integrity sha512-d5K6pOWRfEv2bc1dL1wgXrhdotknvALvCwEVowZ8i0KPxoR2wXURByhuTuF+ZZDmGeX+SfKOuU+4zWgU7TRX6Q== dependencies: - "@remix-run/router" "0.0.0-experimental-e192105b" - react-router "0.0.0-experimental-e192105b" + "@remix-run/router" "0.0.0-experimental-7f486334" + react-router "0.0.0-experimental-7f486334" -react-router@0.0.0-experimental-e192105b: - version "0.0.0-experimental-e192105b" - resolved "https://registry.npmjs.org/react-router/-/react-router-0.0.0-experimental-e192105b.tgz#8eda0384989993e46417fda3980a94e250b35d95" - integrity sha512-Ch5roh8nXPYThf9GVjCNoBCEbcJdYfbOowMjS9crp9V6S41yL4HRUolvPZuVmZVB7m40mfgCAgr9E4mQPmQaHw== +react-router@0.0.0-experimental-7f486334: + version "0.0.0-experimental-7f486334" + resolved "https://registry.npmjs.org/react-router/-/react-router-0.0.0-experimental-7f486334.tgz#8619b44dd032919606195300a9c2182c4f6b9fb8" + integrity sha512-D04XF64pxxRjzF4VXqTYomFHy/zXEJ7DHMO/yEpjQDUWL9rBJPsQsZp4ioPDtIUj+YcyCh+WaqQyansHeBgiKw== dependencies: - "@remix-run/router" "0.0.0-experimental-e192105b" + "@remix-run/router" "0.0.0-experimental-7f486334" react@^18.2.0: version "18.2.0" From 44e0ad0d02e3e475550ca310f43c156732a8fca7 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 14 Nov 2023 11:20:51 -0500 Subject: [PATCH 4/6] Yarn dedup --- yarn.lock | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index c5d37357d26..2e188a2154d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10917,12 +10917,7 @@ pumpify@^1.3.3: inherits "^2.0.3" pump "^2.0.0" -punycode@^2.1.0, punycode@^2.1.1: - version "2.3.0" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - -punycode@^2.3.0: +punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.0: version "2.3.1" resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== From eac87895b308d504ceca53fd66baf9e8525cc3cb Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 14 Nov 2023 11:24:09 -0500 Subject: [PATCH 5/6] Bump router --- packages/remix-dev/package.json | 2 +- packages/remix-react/package.json | 4 +- packages/remix-server-runtime/package.json | 2 +- packages/remix-testing/package.json | 4 +- yarn.lock | 139 ++++++++++++--------- 5 files changed, 86 insertions(+), 65 deletions(-) diff --git a/packages/remix-dev/package.json b/packages/remix-dev/package.json index de837ccb273..340ef14cf7b 100644 --- a/packages/remix-dev/package.json +++ b/packages/remix-dev/package.json @@ -29,7 +29,7 @@ "@mdx-js/mdx": "^2.3.0", "@npmcli/package-json": "^4.0.1", "@remix-run/node": "2.2.0", - "@remix-run/router": "0.0.0-experimental-7f486334", + "@remix-run/router": "1.12.0-pre.0", "@remix-run/server-runtime": "2.2.0", "@types/mdx": "^2.0.5", "@vanilla-extract/integration": "^6.2.0", diff --git a/packages/remix-react/package.json b/packages/remix-react/package.json index 43e37810d2b..e74f9014341 100644 --- a/packages/remix-react/package.json +++ b/packages/remix-react/package.json @@ -16,9 +16,9 @@ "typings": "dist/index.d.ts", "module": "dist/esm/index.js", "dependencies": { - "@remix-run/router": "0.0.0-experimental-7f486334", + "@remix-run/router": "1.12.0-pre.0", "@remix-run/server-runtime": "2.2.0", - "react-router-dom": "0.0.0-experimental-7f486334" + "react-router-dom": "6.19.0-pre.0" }, "devDependencies": { "@testing-library/jest-dom": "^5.17.0", diff --git a/packages/remix-server-runtime/package.json b/packages/remix-server-runtime/package.json index 07863784992..981100608cf 100644 --- a/packages/remix-server-runtime/package.json +++ b/packages/remix-server-runtime/package.json @@ -16,7 +16,7 @@ "typings": "dist/index.d.ts", "module": "dist/esm/index.js", "dependencies": { - "@remix-run/router": "0.0.0-experimental-7f486334", + "@remix-run/router": "1.12.0-pre.0", "@types/cookie": "^0.5.3", "@web3-storage/multipart-parser": "^1.0.0", "cookie": "^0.5.0", diff --git a/packages/remix-testing/package.json b/packages/remix-testing/package.json index d19436bd94a..7dbec765e78 100644 --- a/packages/remix-testing/package.json +++ b/packages/remix-testing/package.json @@ -18,8 +18,8 @@ "dependencies": { "@remix-run/node": "2.2.0", "@remix-run/react": "2.2.0", - "@remix-run/router": "0.0.0-experimental-7f486334", - "react-router-dom": "0.0.0-experimental-7f486334" + "@remix-run/router": "1.12.0-pre.0", + "react-router-dom": "6.19.0-pre.0" }, "devDependencies": { "@types/node": "^18.17.1", diff --git a/yarn.lock b/yarn.lock index 2e188a2154d..ae5e5bd5b0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2319,10 +2319,10 @@ "@changesets/types" "^5.0.0" dotenv "^8.1.0" -"@remix-run/router@0.0.0-experimental-7f486334": - version "0.0.0-experimental-7f486334" - resolved "https://registry.npmjs.org/@remix-run/router/-/router-0.0.0-experimental-7f486334.tgz#82361fef9abc5d02cfa962330d58befd67e71b74" - integrity sha512-CqAgC/HXAOYVVnOgp54hglEeBRhEekLISSX0qhPcejfiavGNrNXcZcR5YQlEN58vldkKQsLuyGab/VkjXdKmiw== +"@remix-run/router@1.12.0-pre.0": + version "1.12.0-pre.0" + resolved "https://registry.npmjs.org/@remix-run/router/-/router-1.12.0-pre.0.tgz#a7a3ed1941016f574147a97d64d3c687bf343113" + integrity sha512-+bBn9KqD2AC0pttSGydVFOZSsT0NqQ1+rGFwMTx9dRANk6oGxrPbKTDxLLikocscGzSL5przvcK4Uxfq8yU7BQ== "@remix-run/web-blob@^3.1.0": version "3.1.0" @@ -3411,12 +3411,25 @@ accepts@^1.3.7, accepts@~1.3.5, accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" +acorn-globals@^7.0.0: + version "7.0.1" + resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" + integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q== + dependencies: + acorn "^8.1.0" + acorn-walk "^8.0.2" + acorn-jsx@^5.0.0, acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.0.0, acorn@^8.8.0, acorn@^8.8.1: +acorn-walk@^8.0.2: + version "8.3.0" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz#2097665af50fd0cf7a2dfccd2b9368964e66540f" + integrity sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA== + +acorn@^8.0.0, acorn@^8.1.0, acorn@^8.8.0, acorn@^8.8.1: version "8.11.2" resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== @@ -4839,12 +4852,22 @@ cssesc@^3.0.0: resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssstyle@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz#17ca9c87d26eac764bb8cfd00583cff21ce0277a" - integrity sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg== +cssom@^0.5.0: + version "0.5.0" + resolved "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" + integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw== + +cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +cssstyle@^2.3.0: + version "2.3.0" + resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" + integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== dependencies: - rrweb-cssom "^0.6.0" + cssom "~0.3.6" csstype@^3.0.2, csstype@^3.0.7: version "3.1.1" @@ -4946,14 +4969,14 @@ data-uri-to-buffer@^5.0.1: resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-5.0.1.tgz#db89a9e279c2ffe74f50637a59a32fb23b3e4d7c" integrity sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg== -data-urls@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz#333a454eca6f9a5b7b0f1013ff89074c3f522dd4" - integrity sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g== +data-urls@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143" + integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ== dependencies: abab "^2.0.6" whatwg-mimetype "^3.0.0" - whatwg-url "^12.0.0" + whatwg-url "^11.0.0" dataloader@^1.4.0: version "1.4.0" @@ -5004,7 +5027,7 @@ decamelize@^1.1.0, decamelize@^1.2.0: resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== -decimal.js@^10.4.3: +decimal.js@^10.4.2: version "10.4.3" resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== @@ -5578,7 +5601,7 @@ escape-string-regexp@^5.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz" integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== -escodegen@^2.1.0: +escodegen@^2.0.0, escodegen@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== @@ -8119,24 +8142,27 @@ jsbn@~0.1.0: resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdom@^20.0.0, jsdom@^22.0.0: - version "22.1.0" - resolved "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz#0fca6d1a37fbeb7f4aac93d1090d782c56b611c8" - integrity sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw== +jsdom@^20.0.0: + version "20.0.3" + resolved "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db" + integrity sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ== dependencies: abab "^2.0.6" - cssstyle "^3.0.0" - data-urls "^4.0.0" - decimal.js "^10.4.3" + acorn "^8.8.1" + acorn-globals "^7.0.0" + cssom "^0.5.0" + cssstyle "^2.3.0" + data-urls "^3.0.2" + decimal.js "^10.4.2" domexception "^4.0.0" + escodegen "^2.0.0" form-data "^4.0.0" html-encoding-sniffer "^3.0.0" http-proxy-agent "^5.0.0" https-proxy-agent "^5.0.1" is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.4" - parse5 "^7.1.2" - rrweb-cssom "^0.6.0" + nwsapi "^2.2.2" + parse5 "^7.1.1" saxes "^6.0.0" symbol-tree "^3.2.4" tough-cookie "^4.1.2" @@ -8144,8 +8170,8 @@ jsdom@^20.0.0, jsdom@^22.0.0: webidl-conversions "^7.0.0" whatwg-encoding "^2.0.0" whatwg-mimetype "^3.0.0" - whatwg-url "^12.0.1" - ws "^8.13.0" + whatwg-url "^11.0.0" + ws "^8.11.0" xml-name-validator "^4.0.0" jsesc@3.0.2: @@ -10038,7 +10064,7 @@ nth-check@^2.0.1: dependencies: boolbase "^1.0.0" -nwsapi@^2.2.4: +nwsapi@^2.2.2: version "2.2.7" resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30" integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== @@ -10388,7 +10414,7 @@ parse5-htmlparser2-tree-adapter@^7.0.0: domhandler "^5.0.2" parse5 "^7.0.0" -parse5@^7.0.0, parse5@^7.1.2: +parse5@^7.0.0, parse5@^7.1.1: version "7.1.2" resolved "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== @@ -10917,7 +10943,7 @@ pumpify@^1.3.3: inherits "^2.0.3" pump "^2.0.0" -punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.0: +punycode@^2.1.0, punycode@^2.1.1: version "2.3.1" resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== @@ -11028,20 +11054,20 @@ react-refresh@^0.14.0: resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz" integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== -react-router-dom@0.0.0-experimental-7f486334: - version "0.0.0-experimental-7f486334" - resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-0.0.0-experimental-7f486334.tgz#35714157ab8616ab634831512d268a5d8f631eef" - integrity sha512-d5K6pOWRfEv2bc1dL1wgXrhdotknvALvCwEVowZ8i0KPxoR2wXURByhuTuF+ZZDmGeX+SfKOuU+4zWgU7TRX6Q== +react-router-dom@6.19.0-pre.0: + version "6.19.0-pre.0" + resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.19.0-pre.0.tgz#99d561cf50babea4c8c65317950884bb1db76395" + integrity sha512-elYzIXUmv92//Stn0IK8EYQixv1zeuUWw/HZM9LTQ4aGdNeBTqpTEq/K66KJbmfklzgVpg29Nr515onohZA1dA== dependencies: - "@remix-run/router" "0.0.0-experimental-7f486334" - react-router "0.0.0-experimental-7f486334" + "@remix-run/router" "1.12.0-pre.0" + react-router "6.19.0-pre.0" -react-router@0.0.0-experimental-7f486334: - version "0.0.0-experimental-7f486334" - resolved "https://registry.npmjs.org/react-router/-/react-router-0.0.0-experimental-7f486334.tgz#8619b44dd032919606195300a9c2182c4f6b9fb8" - integrity sha512-D04XF64pxxRjzF4VXqTYomFHy/zXEJ7DHMO/yEpjQDUWL9rBJPsQsZp4ioPDtIUj+YcyCh+WaqQyansHeBgiKw== +react-router@6.19.0-pre.0: + version "6.19.0-pre.0" + resolved "https://registry.npmjs.org/react-router/-/react-router-6.19.0-pre.0.tgz#bebd659375430700b894e6007311bd1ff4bd84c5" + integrity sha512-qyPRUTh6jnZHu9t0UtdLdcVeKCWVmJbIZo0YgZb4ETxygqe/43WAPHsJ8TjA6/b6A+SeYhDZqeVu/U/lpBdUsA== dependencies: - "@remix-run/router" "0.0.0-experimental-7f486334" + "@remix-run/router" "1.12.0-pre.0" react@^18.2.0: version "18.2.0" @@ -11513,11 +11539,6 @@ rollup@^4.2.0: "@rollup/rollup-win32-x64-msvc" "4.4.0" fsevents "~2.3.2" -rrweb-cssom@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz#ed298055b97cbddcdeb278f904857629dec5e0e1" - integrity sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw== - run-async@^2.4.0: version "2.4.1" resolved "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz" @@ -12520,12 +12541,12 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" -tr46@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz#281a758dcc82aeb4fe38c7dfe4d11a395aac8469" - integrity sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw== +tr46@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" + integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== dependencies: - punycode "^2.3.0" + punycode "^2.1.1" tr46@~0.0.3: version "0.0.3" @@ -13228,12 +13249,12 @@ whatwg-mimetype@^3.0.0: resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== -whatwg-url@^12.0.0, whatwg-url@^12.0.1: - version "12.0.1" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz#fd7bcc71192e7c3a2a97b9a8d6b094853ed8773c" - integrity sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ== +whatwg-url@^11.0.0: + version "11.0.0" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" + integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== dependencies: - tr46 "^4.1.1" + tr46 "^3.0.0" webidl-conversions "^7.0.0" whatwg-url@^5.0.0: @@ -13378,7 +13399,7 @@ ws@^7.4.5: resolved "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz" integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== -ws@^8.13.0: +ws@^8.11.0: version "8.14.2" resolved "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f" integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g== From a59c1e74ffef262022feb019d8444a058abad5e3 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 14 Nov 2023 11:59:10 -0500 Subject: [PATCH 6/6] Fix integration test --- integration/form-test.ts | 4 +- yarn.lock | 109 ++++++++++++++++----------------------- 2 files changed, 46 insertions(+), 67 deletions(-) diff --git a/integration/form-test.ts b/integration/form-test.ts index f2331ad2987..b2c5ead7a2b 100644 --- a/integration/form-test.ts +++ b/integration/form-test.ts @@ -921,7 +921,7 @@ test.describe("Forms", () => { await app.goto("/projects/blarg"); let html = await app.getHtml(); let el = getElement(html, `#${SPLAT_ROUTE_NO_ACTION}`); - expect(el.attr("action")).toMatch("/projects"); + expect(el.attr("action")).toMatch("/projects/blarg"); }); test("no action resolves to URL including search params", async ({ @@ -931,7 +931,7 @@ test.describe("Forms", () => { await app.goto("/projects/blarg?foo=bar"); let html = await app.getHtml(); let el = getElement(html, `#${SPLAT_ROUTE_NO_ACTION}`); - expect(el.attr("action")).toMatch("/projects?foo=bar"); + expect(el.attr("action")).toMatch("/projects/blarg?foo=bar"); }); test("absolute action resolves relative to the root route", async ({ diff --git a/yarn.lock b/yarn.lock index ae5e5bd5b0c..79e0d85149b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3411,25 +3411,12 @@ accepts@^1.3.7, accepts@~1.3.5, accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" -acorn-globals@^7.0.0: - version "7.0.1" - resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" - integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q== - dependencies: - acorn "^8.1.0" - acorn-walk "^8.0.2" - acorn-jsx@^5.0.0, acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^8.0.2: - version "8.3.0" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz#2097665af50fd0cf7a2dfccd2b9368964e66540f" - integrity sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA== - -acorn@^8.0.0, acorn@^8.1.0, acorn@^8.8.0, acorn@^8.8.1: +acorn@^8.0.0, acorn@^8.8.0, acorn@^8.8.1: version "8.11.2" resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== @@ -4852,22 +4839,12 @@ cssesc@^3.0.0: resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssom@^0.5.0: - version "0.5.0" - resolved "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" - integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw== - -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -cssstyle@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" - integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== +cssstyle@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz#17ca9c87d26eac764bb8cfd00583cff21ce0277a" + integrity sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg== dependencies: - cssom "~0.3.6" + rrweb-cssom "^0.6.0" csstype@^3.0.2, csstype@^3.0.7: version "3.1.1" @@ -4969,14 +4946,14 @@ data-uri-to-buffer@^5.0.1: resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-5.0.1.tgz#db89a9e279c2ffe74f50637a59a32fb23b3e4d7c" integrity sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg== -data-urls@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143" - integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ== +data-urls@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz#333a454eca6f9a5b7b0f1013ff89074c3f522dd4" + integrity sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g== dependencies: abab "^2.0.6" whatwg-mimetype "^3.0.0" - whatwg-url "^11.0.0" + whatwg-url "^12.0.0" dataloader@^1.4.0: version "1.4.0" @@ -5027,7 +5004,7 @@ decamelize@^1.1.0, decamelize@^1.2.0: resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== -decimal.js@^10.4.2: +decimal.js@^10.4.3: version "10.4.3" resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== @@ -5601,7 +5578,7 @@ escape-string-regexp@^5.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz" integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== -escodegen@^2.0.0, escodegen@^2.1.0: +escodegen@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== @@ -8142,27 +8119,24 @@ jsbn@~0.1.0: resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdom@^20.0.0: - version "20.0.3" - resolved "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db" - integrity sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ== +jsdom@^20.0.0, jsdom@^22.0.0: + version "22.1.0" + resolved "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz#0fca6d1a37fbeb7f4aac93d1090d782c56b611c8" + integrity sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw== dependencies: abab "^2.0.6" - acorn "^8.8.1" - acorn-globals "^7.0.0" - cssom "^0.5.0" - cssstyle "^2.3.0" - data-urls "^3.0.2" - decimal.js "^10.4.2" + cssstyle "^3.0.0" + data-urls "^4.0.0" + decimal.js "^10.4.3" domexception "^4.0.0" - escodegen "^2.0.0" form-data "^4.0.0" html-encoding-sniffer "^3.0.0" http-proxy-agent "^5.0.0" https-proxy-agent "^5.0.1" is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.2" - parse5 "^7.1.1" + nwsapi "^2.2.4" + parse5 "^7.1.2" + rrweb-cssom "^0.6.0" saxes "^6.0.0" symbol-tree "^3.2.4" tough-cookie "^4.1.2" @@ -8170,8 +8144,8 @@ jsdom@^20.0.0: webidl-conversions "^7.0.0" whatwg-encoding "^2.0.0" whatwg-mimetype "^3.0.0" - whatwg-url "^11.0.0" - ws "^8.11.0" + whatwg-url "^12.0.1" + ws "^8.13.0" xml-name-validator "^4.0.0" jsesc@3.0.2: @@ -10064,7 +10038,7 @@ nth-check@^2.0.1: dependencies: boolbase "^1.0.0" -nwsapi@^2.2.2: +nwsapi@^2.2.4: version "2.2.7" resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30" integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== @@ -10414,7 +10388,7 @@ parse5-htmlparser2-tree-adapter@^7.0.0: domhandler "^5.0.2" parse5 "^7.0.0" -parse5@^7.0.0, parse5@^7.1.1: +parse5@^7.0.0, parse5@^7.1.2: version "7.1.2" resolved "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== @@ -10943,7 +10917,7 @@ pumpify@^1.3.3: inherits "^2.0.3" pump "^2.0.0" -punycode@^2.1.0, punycode@^2.1.1: +punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.0: version "2.3.1" resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== @@ -11539,6 +11513,11 @@ rollup@^4.2.0: "@rollup/rollup-win32-x64-msvc" "4.4.0" fsevents "~2.3.2" +rrweb-cssom@^0.6.0: + version "0.6.0" + resolved "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz#ed298055b97cbddcdeb278f904857629dec5e0e1" + integrity sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw== + run-async@^2.4.0: version "2.4.1" resolved "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz" @@ -12541,12 +12520,12 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" -tr46@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" - integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== +tr46@^4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz#281a758dcc82aeb4fe38c7dfe4d11a395aac8469" + integrity sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw== dependencies: - punycode "^2.1.1" + punycode "^2.3.0" tr46@~0.0.3: version "0.0.3" @@ -13249,12 +13228,12 @@ whatwg-mimetype@^3.0.0: resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== -whatwg-url@^11.0.0: - version "11.0.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" - integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== +whatwg-url@^12.0.0, whatwg-url@^12.0.1: + version "12.0.1" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz#fd7bcc71192e7c3a2a97b9a8d6b094853ed8773c" + integrity sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ== dependencies: - tr46 "^3.0.0" + tr46 "^4.1.1" webidl-conversions "^7.0.0" whatwg-url@^5.0.0: @@ -13399,7 +13378,7 @@ ws@^7.4.5: resolved "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz" integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== -ws@^8.11.0: +ws@^8.13.0: version "8.14.2" resolved "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f" integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==