Closed brandonmcconnell closed 5 months ago
To clarify—as I didn't mention this before—I ran the build process locally, and everything built without any errors, and I can see the solution correctly rendering when running my fork locally:
Thanks man! Here's a slice of the build errors, looks like this error is happening for most if not all blog posts:
@adamwathan The shortGeneric
error is because our Vercel build is still using Node 16 which we should change to be at least Node 18.
Switched to Node 20 and triggered a redeploy, cross your fingers! 😄
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
tailwindcss-com | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 1, 2024 4:51pm |
Awesome thanks @brandonmcconnell!
👋🏼 NOTE: I am reopening this as a follow-up to #1811. I closed that one thinking that I might need to install another dependency to polyfill
Intl.DateTimeFormat
for server use, but that does not appear to be the case.I'm unable to inspect the failures that caused the previous PR's build to fail, as I am not part of the
tailwindlabs
org on Vercel and do not have access to thetailwindlabs/tailwindcss-com
resource.If you report the failures here, I can take a stab at resolving them.
This PR will…
resolve a date mismatch issue caused by
tinytime
not preserving timezone informationI noticed this when sharing the job app links on Twitter. I'm not sure if this occurs in every time zone, or if I'm only seeing it because I'm currently traveling in Los Angeles.
refactor and improve the
formatDate
functionrefactor and improve the
formatDate
function to build upon built-in APIsMost of what tinytime was being used for can be offloaded to
Intl.DateTimeFormat
, which is natively supported with great browser support.The only regression/difference I noticed was that in the case of the job applications usage of
formatDate
, you lose the ordinal day number (e.g.4
now instead of4th
). If that's an important difference and you really want the ordinal number there, I have a helper that essentially shims'ordinal
support for the day number. It would just be a deviation from the built-inIntl.DateTimeFormatOptions
type, so if you do any TS type checking, you'll want to account for that as well.removes the—now unused—the
tinytime
dependency