Description
The Standard Library (std
) aims to provide high-quality, reliable APIs for fearless use in JavaScript and TypeScript projects. For some time, how and when std would reach stability has been in question. Now, thanks to JSR and workspaces functionality in the Deno runtime, we have a path forward.
What stabilization will look like
Currently, std
acts as a single module with a single version, meaning a user may be inclined to upgrade, even if a release doesn't affect the sub-module they use.
After stabilization, new std
packages will be exclusively hosted on JSR as separate packages with independent versions. Deno's workspaces functionality allows us to treat each top-level subdirectory as its own package and better adhere to Semantic Versioning. Dependencies become more manageable by only requiring an upgrade for the packages you use, not the entire std
module.
More importantly, independent versioning allows us to work on stabilizing packages asynchronously. We can stabilize more established packages while preparing other packages for stabilization. In other words, we can progressively deliver stable packages for the community sooner rather than later.
These changes will also mean we will release std
packages independently of Deno runtime releases.
How we'll achieve stability
Step 1 - Decouple std
from the runtime (complete)
deno
and deno_std
are now effectively decoupled, so releasing them in tandem is not required. The remaining point of friction is apiland_scripts
, which generates docs. We now have two separate GH Actions in apiland_scripts
that can be run independently (release CLI
and release STD
). These actions can be run independently, and it's a matter of deciding if we do the "split".
Step 2 - Publish exclusively to JSR (complete)
At the moment, std
is published to deno.land/std as-is, then converted into a JSR-compatible form in CI and published to JSR as separate packages under the @std
scope. Once the previous step is complete, the codebase can be permanently converted into its JSR-compatible form, providing the granular package versioning for the next step.
Note: For the foreseeable future, deno.land/std will remain online and accessible until the version before the JSR cutover is complete.
Step 3 - Stabilize packages asynchronously (in progress)
Once std
is entirely cut over to JSR and packages become more stable, we can begin stabilizing packages. A package will only be stabilized once strict criteria are met that guarantee its quality. These will require that each package is:
- Reviewed and approved with sufficient consensus
- Tested for maximum coverage
- Fully documented and well-designed
- Void of any ongoing issues or known bugs
- Well supported across many versions of the Deno runtime
Each package follows the stabilization process defined in #4661
Current work
Work towards stabilizing each package is already in progress. This work includes:
- Completing documentation (tracking: complete documentation #3764)
- Increasing test coverage (tracking: improve test coverage #3713)
- Fixing bugs and adding missing features
- Closing issues and PRs
- Improving API design
You can track the stability status of each package here:
Package | Docs | Test | RC | 1.0.0 | The issue | Stabilization Date |
---|---|---|---|---|---|---|
bytes | ✅ | ✅ | ✅ | ✅ | #4629 | Jun 6, 2024 |
collections | ✅ | ✅ | ✅ | ✅ | #4647 | Jun 20, 2024 |
media-types | ✅ | ✅ | ✅ | ✅ | #4730 | Jun 24, 2024 |
crypto | ✅ | ✅ | ✅ | ✅ | #4885 | Jun 30, 2024 |
encoding | ✅ | ✅ | ✅ | ✅ | #4856 | Jun 30, 2024 |
uuid | ✅ | ✅ | ✅ | ✅ | #4748 | Jun 30, 2024 |
assert | ✅ | ✅ | ✅ | ✅ | #4717 | Jul 6, 2024 |
data-structures | ✅ | ✅ | ✅ | ✅ | #4986 | Jul 12, 2024 |
html | ✅ | ✅ | ✅ | ✅ | #4921 | Jul 12, 2024 |
msgpack | ✅ | ✅ | ✅ | ✅ | #5000 | Jul 12, 2024 |
path | ✅ | ✅ | ✅ | ✅ | #4922 | Jul 12, 2024 |
regexp | ✅ | ✅ | ✅ | ✅ | #4998 | Jul 12, 2024 |
toml | ✅ | ✅ | ✅ | ✅ | #4923 | Jul 12, 2024 |
async | ✅ | ✅ | ✅ | ✅ | #5001 | Jul 19, 2024 |
cli | ✅ | ✅ | ✅ | ✅ | #5002 | Jul 19, 2024 |
text | ✅ | ✅ | ✅ | ✅ | #4999 | Jul 19, 2024 |
ulid | ✅ | ✅ | ✅ | ✅ | #4996 | Jul 19, 2024 |
expect | ✅ | ✅ | ✅ | ✅ | #5014 | Jul 26, 2024 |
front-matter | ✅ | ✅ | ✅ | ✅ | #5016 | Jul 26, 2024 |
fs | ✅ | ✅ | ✅ | ✅ | #5008 | Jul 26, 2024 |
json | ✅ | ✅ | ✅ | ✅ | #5009 | Jul 26, 2024 |
jsonc | ✅ | ✅ | ✅ | ✅ | #5011 | Jul 26, 2024 |
streams | ✅ | ✅ | ✅ | ✅ | #5004 | Jul 26, 2024 |
yaml | ✅ | ✅ | ✅ | #5015 | Jul 26, 2024 | |
fmt | ✅ | ✅ | ✅ | ✅ | #5005 | Aug 2, 2024 |
http | ✅ | ✅ | ✅ | ✅ | #5007 | Aug 2, 2024 |
net | ✅ | ✅ | ✅ | ✅ | #5006 | Aug 2, 2024 |
semver | ✅ | ✅ | ✅ | ✅ | #5013 | Aug 2, 2024 |
testing | ✅ | ✅ | ✅ | ✅ | #5010 | Aug 2, 2024 |
csv | ✅ | ✅ | ✅ | ✅ | #5012 | Aug 5, 2024 |
Excluded Packages
Package | Note |
---|---|
archive | This package is excluded because it’s in the process of a re-design. Tracked in #1658. |
datetime | This package will be re-designed after Temporal is shipped. |
dotenv | This package is excluded because this feature conflicts with Deno CLI --env option. |
ini | This package is excluded because there still remain various concerns about parse and stringify behavior. See #5614 |
io | No consensus on what should/shouldn't be included in this module yet. Ideally this module shouldn't exist. See #5059 for more details. |
log | The design of this package is not ready yet. |
url | This package needs more discussion. See #4992 for details. |
webgpu | This package is excluded because WebGPU is not yet stable. Stabilization tracking issue is #5633. |
If you'd like to contribute to stabilizing the Standard Library in any of this work, please feel free to let us know, either on GitHub or Discord. All contributions are welcome and very much appreciated.
Stabilization process
Each package must go through the following steps to achieve stabilization:
- Publish version 1.0.0-rc.1 once meeting the following requirements:
- Approved by at least 2 maintainers. There must be a consensus that the design, documentation, and implementation of the package are good and that it is unlikely to undergo breaking changes in the future.
- 100% documented, passing
deno doc --lint
checks and adhering to the documentation guidelines. - Maximum reasonable test coverage
- There are no open issues or pull requests that might lead to breaking changes. For example, issues that suggest new non-breaking features are fine to exist at stabilization.
- Allow 3 weeks for the community and the core team to review the package and handle any feedback. There must be a consensus that the design, documentation, and implementation of the package are good and it is unlikely to undergo breaking changes in the future.
- If there are no remaining issues, publish version 1.0.0. If there are remaining issues, extend the waiting period to allow further time for a resolution. Then, repeat this step.
Reference: The dependency graph
The diagram below describes the dependencies between packages. The bottom packages (more dependent packages) usually need to be stabilized earlier than the top packages (more dependent packages).