Repository navigation
docs: add Deno to install instructions - #5315
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe README installation section now lists Deno alongside npm, yarn, and bun, with an added ChangesInstallation documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Thanks! Ooc: I've also been slowly adding Cheerio's dependencies to JSR, is that still worthwhile? The removal of the prefix sounds like JSR is deprecated? |
There was a problem hiding this comment.
🟡 Not ready to approve
The added Deno command uses deno install, which is likely to confuse readers compared to the canonical deno add dependency workflow.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Updates the README installation instructions to include Deno alongside existing package manager examples, aiming for parity in “how to install” guidance.
Changes:
- Adds Deno to the list of supported installation approaches in the Installation section.
- Adds a Deno CLI command example next to npm and bun examples.
File summaries
| File | Description |
|---|---|
| Readme.md | Extends Installation instructions by adding Deno alongside existing package manager commands. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
| # or | ||
| bun add cheerio | ||
| # or | ||
| deno install cheerio |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Readme.md`:
- Around line 40-47: Update the Cheerio installation instructions near the Deno
command to either document Deno 2.8+ as the minimum required version or change
the command to use the npm:cheerio prefix, while keeping the npm, yarn, and bun
examples unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| Install Cheerio using a package manager like npm, yarn, bun, or Deno. | ||
|
|
||
| ```bash | ||
| npm install cheerio | ||
| # or | ||
| bun add cheerio | ||
| # or | ||
| deno install cheerio |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
sed -n '35,55p' Readme.mdRepository: cheeriojs/cheerio
Length of output: 625
🌐 Web query:
Deno documentation deno install npm package prefix version 2.8 unprefixed npm resolution
💡 Result:
In Deno 2.8 and later, unprefixed package names used in CLI commands such as deno install, deno add, deno remove, and deno uninstall are treated as npm packages by default [1][2][3]. Key details regarding this change include: Command Line Convenience: You no longer need to include the npm: prefix when running these commands at the CLI [4][3]. For example, deno install express is functionally equivalent to deno install npm:express [1][5]. Scope and Precedence: This default applies to local installs, global installs (deno install -g) [6], and package management commands [2][3]. Explicit prefixes like npm: or jsr: continue to take precedence over the default behavior, allowing you to override the npm default when necessary [7][8]. Import Specifiers: The npm: prefix remains required within import specifiers in your source code [1][2][3]. JSR Packages: JSR packages still require the jsr: prefix at the CLI to remain unambiguous [1][3]. Compatibility: This change was designed to make Deno CLI commands more familiar to users of other Node.js package managers [7][3]. The --npm flag remains available but is functionally a no-op because npm is now the default registry for unprefixed names [7][8].
Citations:
- 1: https://docs.deno.com/runtime/reference/cli/install.md
- 2: https://docs.deno.com/runtime/reference/cli/add.md
- 3: https://deno.com/blog/v2.8
- 4: https://docs.deno.com/runtime/reference/cli/install/
- 5: https://docs.deno.com/runtime/reference/cli/add/
- 6: feat(install): default to npm for
deno install -gunprefixed packages denoland/deno#34290 - 7: feat(add/install): default to npm registry for unprefixed packages denoland/deno#33246
- 8: denoland/deno@6b44f6d
Document the Deno 2.8+ requirement.
deno install cheerio only works as written on Deno 2.8+, where unprefixed npm package names are supported. Older Deno versions need deno install npm:cheerio, so the README should call out the minimum version or use the prefixed form.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Readme.md` around lines 40 - 47, Update the Cheerio installation instructions
near the Deno command to either document Deno 2.8+ as the minimum required
version or change the command to use the npm:cheerio prefix, while keeping the
npm, yarn, and bun examples unchanged.
@fb55 it's not deprecated, but people were complaining that npm being more popular requires 4 additional characters, that's why we removed the prefix. |
👋 Bartek from the Deno team here. Thanks for cheerio, it's a go-to for HTML scraping on Deno too.
The README's Installation section shows npm and bun. Since Deno is a drop-in replacement for npm these days, this adds a Deno line in parity:
(As of Deno 2.8, no
npm:prefix needed, same shape asnpm install.)Totally fine to close this if you'd rather keep the list short. Happy to tweak.
Disclosure: I work on Deno, so I have an interest here. The goal is parity with the package managers you already list, not promotion. This PR was prepared with AI assistance under human supervision: I review every change myself and personally respond to any comments or review feedback.