Conversation
Contributor
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. |
Member
Author
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.