Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for installing the Deno runtime through a new resolver that fetches platform-specific binary assets from GitHub releases. The implementation uses version resolution from the npm registry and asset downloads from GitHub to provide a mixed approach for better performance.
Key changes include:
- Introduction of a new binary resolution system with platform-specific asset variants
- New Deno resolver that handles version resolution and asset fetching
- Unified binary fetcher infrastructure for downloading and extracting runtime binaries
Reviewed Changes
Copilot reviewed 42 out of 47 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
resolving/resolver-base/src/index.ts |
Introduces BinaryResolution and VariationsResolution types for platform-specific binary assets |
resolving/deno-resolver/ |
New package implementing Deno runtime resolution from GitHub releases |
fetching/binary-fetcher/ |
New generic binary fetcher for downloading and extracting zip/tarball archives |
env/node.resolver/src/index.ts |
Refactored to use new VariationsResolution format instead of NodeRuntimeResolution |
pkg-manager/package-requester/src/packageRequester.ts |
Updated to handle VariationsResolution and select appropriate platform-specific assets |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
fetching/binary-fetcher/src/index.ts:141
- The variable name
nodeDiris misleading since this is a generic binary fetcher, not Node.js specific. Consider renaming toextractDirorbaseDir.
const nodeDir = basename === '' ? targetDir : path.dirname(targetDir)
|
Maybe late to the table but is it possible to add a list of engines? I have a few projects where I use both node and Deno. |
|
Yes, it is possible. Like this: {
"devEngines": {
"runtime": [
{
"name": "node",
"version": "^24.4.0",
"onFail": "download"
},
{
"name": "deno",
"version": "^2.4.3",
"onFail": "download"
}
]
}
}It is documented here: https://pnpm.io/package_json#devenginesruntime |
There are two ways we can install Deno. We can install it either from the npm registry or from github release pages.
If we decide to install it from Github, version resolution can be done by getting the list of tag names via: https://api.github.com/repos/denoland/deno/releases. However, we need to make multiple requests as this list is paginated and can return not more than 100 items per page.
We can use a mixed approach and use npm registry just for resolving the version.
For getting the checksums of assets we can use the github API for newer versions: https://api.github.com/repos/denoland/deno/releases/tags/v2.4.2. However, seems like it is a recent feature of Github and older versions don't have the digest field defined: https://api.github.com/repos/denoland/deno/releases/tags/v2.0.0. So, for older versions we need to fetch the .sha256sum file of the asset.