-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade JS dependencies to latest versions #66
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
fcea6d5
to
605a037
Compare
@@ -14,7 +14,7 @@ jobs: | |||
- name: Use Node.js | |||
uses: actions/setup-node@v2 | |||
with: | |||
node-version: "17.x" | |||
node-version: "20.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little bizarre - CI specified 17.x, but our Vercel deployment was still using 14.x (it doesn't even support non-LTS versions). Now, they're both using 20.x.
<Link href={destination}> | ||
<a className={CARD_STYLE} onClick={trackClick}> | ||
{children} | ||
</a> | ||
<Link href={destination} className={CARD_STYLE} onClick={trackClick}> | ||
{children} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Link>
components now render directly as <a>
tags as of Next 13. See this for more details. I ran their suggested codemod to upgrade our usages.
}) { | ||
if (!searchState.query || searchState.query.length == 0) { | ||
function Hits({ children }: { children: React.ReactNode }) { | ||
const { results } = useInstantSearch(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
connectStateResults
was removed in react-instantsearch
v7. They recommend getting the same information about state/results from this useInstantSearch()
hook instead.
@@ -44,4 +48,14 @@ function SearchBox({ refine }: { refine: Dispatch<SetStateAction<string>> }) { | |||
); | |||
} | |||
|
|||
function connectSearchBox(Component: any) { | |||
const SearchBox = (props: any) => { | |||
const data = useSearchBox(props); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar story here - useSearchBox
replaced connectSearchBox
. This is lightly adapted from their documentation.
// Initialize the index with the algolia index name we set up | ||
const index = client.initIndex("workflow_specs"); | ||
|
||
const indexName = "workflow_specs"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In version 4 of algoliasearch
, you called initIndex
on a client, which would then use that index for all future calls. Now, you provide the index to those individual calls. See here for more info.
@@ -7,7 +7,7 @@ import Layout from "../../components/layout"; | |||
import WorkflowTags from "../../components/WorkflowTags"; | |||
import { Argument, Workflow } from "warp-workflows"; | |||
import { CopyIcon } from "../../components/icons/copy"; | |||
import ReactTooltip from "react-tooltip"; | |||
import { Tooltip } from "react-tooltip"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yet another major version upgrade with a slightly different API. See the upgrade guide for more details on these changes.
@@ -41,5 +41,4 @@ module.exports = { | |||
}, | |||
}, | |||
}, | |||
plugins: [require("@tailwindcss/line-clamp")], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is included as of Tailwind v3.3, so we don't need to explicitly include it anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks for doing this
This will be easier to review commit-by-commit.
This PR upgrades all dependencies in
package.json
to their latest (or near-latest) versions. There were several breaking version changes that had to be applied as a result. I've added some inline comments to describe some of the larger changes.I verified the site still worked by running
npm run dev
and validating that I could perform the basic actions (viewing various pages, hotkeys, searching for workflows, copying snippets, etc).