The Deno Standard Library
Go to file
2023-05-31 08:49:16 +09:00
_tools refactor(_tools): update check_doc_imports.ts (#3351) 2023-05-03 15:42:04 +09:00
_util Remove std/node, it was merged into Deno itself (#3206) 2023-02-22 10:28:55 -05:00
.devcontainer chore: add development container configuration (#1938) 2022-02-21 14:23:43 +11:00
.github refactor(_tools): update check_doc_imports.ts (#3351) 2023-05-03 15:42:04 +09:00
archive chore(streams, archive): remove deprecated exports (#3107) 2023-01-14 19:10:03 +09:00
async feat(async): add jitter to retry exponential backoff (#3379) 2023-05-20 21:14:18 +09:00
bytes fix(bytes): correct slice() of BytesList (#3292) 2023-04-03 16:03:25 +09:00
collections feat(collections): switch functions to take iterables when possible (#3401) 2023-05-31 08:48:21 +09:00
console feat(console): add unicodeWidth for TTY text layout (#3297) 2023-04-18 16:13:58 +09:00
crypto chore(crypto): remove unused internal util (#3382) 2023-05-17 13:23:57 +09:00
csv refactor(csv): remove internal dead code (#3374) 2023-05-12 11:45:25 +09:00
datetime fix(datetime): negative months, quarters, and years (#3367) 2023-05-08 16:49:54 +09:00
dotenv feat(dotenv): allow reading from .env files without granting env access (#3306) 2023-04-19 18:05:51 +09:00
encoding BREAKING(encoding): remove deprecated APIs (#3315) 2023-04-14 11:20:24 +09:00
examples chore: update assertions following Deno.inspect change (#3345) 2023-05-01 08:28:36 +09:00
flags fix(flags): correctly collect default value (#3380) 2023-05-15 15:14:16 +09:00
fmt chore: update assertions following Deno.inspect change (#3345) 2023-05-01 08:28:36 +09:00
front_matter feat(front_matter): support +++ for TOML block (#3254) 2023-03-17 16:18:01 +09:00
fs fix(fs): fix NotFound error when moving src to itself with overwrite: true (#3289) 2023-04-05 20:19:24 +09:00
html feat(html): add escape and unescape functions for HTML entities (#3335) 2023-05-31 08:49:16 +09:00
http chore: remove ts-ignores (#3405) 2023-05-26 08:36:39 +03:00
io refactor(io): remove unused PartialReadError introduced in #1171 (#3340) 2023-05-01 12:11:08 +09:00
json docs: add JSDoc to csv and json modules (#3269) 2023-03-24 12:07:30 +09:00
jsonc feat(jsonc): annotate return types (#3327) 2023-04-24 17:30:54 +09:00
log chore: update copyright header (#3082) 2023-01-03 19:47:44 +09:00
media_types chore(tools): improved web-compatibility checks (#3263) 2023-03-18 21:36:00 +09:00
path BREAKING(path): deprecate path.sep (#3342) 2023-05-04 14:09:26 +09:00
permissions chore: update copyright header (#3082) 2023-01-03 19:47:44 +09:00
regexp feat(regexp): add escape function (#3334) 2023-05-11 16:26:51 +09:00
semver chore(tools): improved web-compatibility checks (#3263) 2023-03-18 21:36:00 +09:00
signal test(signal): avoid using SIGINT in signal testing (#3286) 2023-03-29 18:24:29 +09:00
streams fix(streams/mergeReadableStreams): better error handling (#3395) 2023-05-30 19:46:57 +09:00
testing chore: update assertions following Deno.inspect change (#3345) 2023-05-01 08:28:36 +09:00
toml chore(tools): improved web-compatibility checks (#3263) 2023-03-18 21:36:00 +09:00
uuid feat(uuid): add pre-defined namespace UUIDs (#3352) 2023-05-02 23:51:43 +09:00
wasi chore: formatting updates in deno 1.29.2 (#3091) 2023-01-05 11:57:56 +09:00
yaml chore(tools): improved web-compatibility checks (#3263) 2023-03-18 21:36:00 +09:00
.editorconfig chore(node): add asn1.js (#1971) 2022-02-28 20:55:56 +09:00
.gitattributes Remove std/node, it was merged into Deno itself (#3206) 2023-02-22 10:28:55 -05:00
.gitignore feat(console): add unicodeWidth for TTY text layout (#3297) 2023-04-18 16:13:58 +09:00
.gitmodules chore: Setup CI and tests 2021-02-01 12:20:35 +01:00
browser-compat.tsconfig.json fix: improve type safety for browser-compatible modules (#995) 2021-07-06 11:15:37 +09:00
deno.json chore: use new deno.json format (#3346) 2023-05-01 11:50:38 +09:00
LICENSE chore: update copyright header (#1871) 2022-02-02 23:21:39 +09:00
README.md BREAKING(encoding/varint): remove deprecated APIs (#3282) 2023-04-03 12:45:37 +09:00
Releases.md 0.190.0 (#3410) 2023-05-29 23:48:38 +02:00
test_import_map.json chore: remove outdated std import (#2627) 2022-09-07 20:18:44 +09:00
types.d.ts chore(tools): improved web-compatibility checks (#3263) 2023-03-18 21:36:00 +09:00
version.ts 0.190.0 (#3410) 2023-05-29 23:48:38 +02:00

Deno Standard Modules

codecov

These modules do not have external dependencies and they are reviewed by the Deno core team. The intention is to have a standard set of high quality code that all Deno projects can use fearlessly.

Contributions are welcome!

Releases

Standard library is currently tagged independently of Deno version. This will change once the library is stabilized.

To check compatibility of different version of standard library with Deno CLI see this list.

How to use

These modules will eventually be tagged in accordance with Deno releases but as of today we do not yet consider them stable and so we version the standard modules differently from the Deno runtime to reflect this.

It is strongly recommended that you link to tagged releases to avoid unintended updates and breaking changes.

Don't link to / import any module whose path:

  • Has a name or parent with an underscore prefix: _foo.ts, _util/bar.ts.
  • Is that of a test module or test data: test.ts, foo_test.ts, testdata/bar.txt.

Don't import any symbol with an underscore prefix: export function _baz() {}.

These elements are not considered part of the public API, thus no stability is guaranteed for them.

Documentation

To browse documentation for modules:

Contributing

NOTE: This repository was unarchived and synced on Feb, 1st, 2021. If you already had it cloned, we suggest to do a fresh clone to avoid git conflicts.

deno_std is a loose port of Go's standard library. When in doubt, simply port Go's source code, documentation, and tests. There are many times when the nature of JavaScript, TypeScript, or Deno itself justifies diverging from Go, but if possible we want to leverage the energy that went into building Go. We generally welcome direct ports of Go's code.

Please ensure the copyright headers cite the code's origin.

Follow the style guide.

Opening a pull request

After cloning don't forget to git submodule update --init.

Before opening a PR make sure to:

  • have the latest Deno version installed locally
  • add tests that cover your changes.
  • deno task test passes.
  • deno fmt --check passes.
  • deno task lint passes.

Give the PR a descriptive title.

Examples of good titles:

  • fix(http): Fix race condition in server
  • docs(fmt): Update docstrings
  • feat(log): Handle nested messages

Examples of bad titles:

  • fix #7123
  • update docs
  • fix bugs

Ensure there is a related issue and it is referenced in the PR text.

About CI checks:

We currently have 6 checks on CI. Each PR should pass all of these checks to be accepted.

  • test with Deno canary on Windows
  • test with Deno canary on Linux
  • test with Deno canary on macOS
  • lint
  • wasm crypto check
  • CLA

For maintainers:

To release a new version a tag in the form of x.y.z should be added.

Internal Assertions

All internal non-test code, that is files that do not have test or bench in the name, must use the assertion functions within _utils/asserts.ts and not testing/asserts.ts. This is to create a separation of concerns between internal and testing assertions.

Types

Deno is moving away from non-native IO functions and interfaces in favor of the Streams API. These types are to be defined here, in the Standard Library, instead of in the Deno namespace in the future. As a rule, use the following corresponding and identical types from types.d.ts:

  • Deno.Reader
  • Deno.Writer
  • Deno.ReaderSync
  • Deno.WriterSync
  • Deno.Closer

See the tracking issue here.