denoland / denoland/std

JSR package for depending on all of std?

Open
#4,327 16 comments 14 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

It would be nice if there was a JSR package for depending on all of std. This would allow the following pattern that was previously allowed.

For example:

```json
{
"imports": {
"$std/", "jsr:/@std/std@0.215/"
}
}
```

Then the "@std/std" package (or whatever name) would contain a deno.json like (this would probably be code generated):

```jsonc
{
"name": "@std/std",
"version": "0.215.0",
"exports": {
"./assert": "./assert/mod.ts",
"./assert/assert_equals": "./assert/assert_equals.ts",
// etc...
}
}
```

The individual files would then contain something like:

```ts
// mod.ts
export * from "jsr:@std/assert@1";
```

The downside would be these extra files, but probably not that bad for a first start. In the future, we may want to consider allowing JSR specifiers directly in an export value.

This solution would still be about as efficient as using the package directly since JSR only downloads the exports you use.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.