fix: adds missing devDependency
TL;DR
Commit #102eb9 introduces a new dependency ('eslint-parse-visit') on line 1 of 'recma/importImages.mjs' BUT leaves the 'package.json' manifest to become stale by not updating it. This simply adds the missing dependency where expected. Trivial fix for new contributors.
Longer Explanation
In a generic directory, invoking,
git clone https://github.com/tailwind-labs/tailwindcss.com ; cd tailwindcss.com ; git checkout 102eb9~1 ; pnpm i
produces,
TL;DR
...
Packages: +1017
dependencies:
+ @badrap/bar-of-progress 0.1.2 (0.2.2 is available)
+ @docsearch/react 3.6.0
...
TL;DR
...
devDependencies:
+ @typescript-eslint/eslint-plugin 2.34.0 (7.3.1 is available)
+ @typescript-eslint/parser 2.34.0 (7.3.1 is available)
...
TL;DR
lending a workspace where pnpm dev runs as expected. However, if HEAD is moved forward by one commit, the same workflow gives
git clean -xdf ; git checkout 102eb9 ; pnpm dev
...
TL;DR
...
> tailwindcss.com@ dev /home/clay/workspaces/tailwind-labs/tailwindcss.com
> next dev
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'estree-util-visit' imported from /home/clay/workspaces/tailwind-labs/tailwindcss.com/recma/importImages.mjs
Did you mean to import [email protected]/node_modules/estree-util-visit/index.js?
at new NodeError (node:internal/errors:406:5)
...
TL;DR
which was resolved using
pnpm add -D estree-util-visit
...
TL;DR
...
Packages: +2
++
Progress: resolved 1025, reused 1017, downloaded 0, added 2, done
devDependencies:
+ estree-util-visit 2.0.0
Done in 9.6s
(base) clay@clay:~/workspaces/tailwind-labs/tailwindcss.com$ pnpm dev
> tailwindcss.com@ dev /home/clay/workspaces/tailwind-labs/tailwindcss.com
> next dev
automatically enabled Fast Refresh for 6 custom loaders
▲ Next.js 13.5.6
- Local: http://localhost:3000
- Experiments (use at your own risk):
· esmExternals
· scrollRestoration
✓ Ready in 2.5s
QED 🫡
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| tailwindcss-com | ❌ Failed (Inspect) | Mar 19, 2024 1:15am |
Hey!
I appreciate the fix, but we don't use pnpm on this codebase, we currently use npm and don't have any plans to switch to pnpm on this codebase.
It's still a good idea to add missing (dev) dependencies, however we don't use eslint-parse-visit directly as far as I can tell. Adding it as a dependency ourselves doesn't make a lot of sense because tools relying on it might require different versions, or it could be that the dependency is not needed at all anymore and then we have dependencies in our package.json that shouldn't be there.
Because of this and because we don't use pnpm, I'm going to close this one for now.
Thanks!