Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle @std deps #18

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Bundle @std deps #18

merged 2 commits into from
Sep 12, 2024

Conversation

gregnr
Copy link
Contributor

@gregnr gregnr commented Sep 12, 2024

Problem

We depend on 3 deps:

"@std/bytes": "npm:@jsr/std__bytes@^1.0.2",
"@std/crypto": "npm:@jsr/std__crypto@^1.0.3",
"@std/encoding": "npm:@jsr/std__encoding@^1.0.3"

which are hosted on JSR only (they are a part of Deno's standard lib). To make this work, JSR adds this to your .npmrc:

@jsr:registry=https://npm.jsr.io

So that JSR deps resolve through their own NPM-compat registry. This works great, unless you are publishing your own library. Published NPM packages don't include .npmrc (intentionally) so these deps aren't available to downstream users.

Solution

Bundle them. We already use tsup/esbuild for internal bundling. To get these external deps to bundle, we just move them to dev dependencies and tsup will pick them up.

@jgoux jgoux self-requested a review September 12, 2024 15:59
@gregnr gregnr merged commit fc4e2c4 into next Sep 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants