Skip to content

Commit

Permalink
Merge branch 'fix/expect-custom-equality-case' of github.com:eryue022…
Browse files Browse the repository at this point in the history
…0/deno_std into fix/expect-custom-equality-case

* 'fix/expect-custom-equality-case' of github.com:eryue0220/deno_std: (63 commits)
  docs: link to `assertThrows()` and `assertRejects()` (denoland#4395)
  chore(log): sync `level` and `levelName` in BaseHandler (denoland#4393)
  docs: ignore bad snippet examples (denoland#4388)
  chore(media_types): format test names (denoland#4380)
  docs: clarify underscore guidance in README (denoland#4385)
  feat(collections): add `pick` and `omit` (denoland#4218)
  chore(msgpack): format test names (denoland#4381)
  refactor(encoding): prepare for `noUncheckedIndexedAccess` (denoland#4275)
  refactor(streams): prepare for `noUncheckedIndexedAccess` (denoland#4377)
  chore: fix .editorconfig syntax (denoland#4376)
  chore(semver): remove legacy `Range.ranges` object definition (denoland#4374)
  chore(semver): move breaking versions (denoland#4372)
  refactor(semver): rename `comparatorFormat()` to `formatComparator()` (denoland#4373)
  test(semver): add test for parse_range (denoland#4345)
  chore: use 'release' event for triggering jsr publish (denoland#4370)
  chore(http): fix spawned tests after migration script (denoland#4368)
  chore(crypto): move test scripts to own files (denoland#4367)
  0.217.0 (denoland#4369)
  build: update _ to - in workspace converter script (denoland#4357)
  chore(media_types): move `extensions` utility (denoland#4358)
  ...
  • Loading branch information
eryue0220 committed Feb 28, 2024
2 parents e2c364f + 22c4561 commit 810250f
Show file tree
Hide file tree
Showing 140 changed files with 2,821 additions and 1,663 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
root = true

[*.ts,*.js]
[*.{ts,js}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: ci

permissions:
contents: write

on:
push:
branches: [main]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/version_bump.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: version_bump

permissions:
contents: write

on:
workflow_dispatch:
inputs:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/workspace_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: workspace publish

on:
push:
branches: [main, workspace_publish]
tags:
- '[0-9]+.[0-9]+.[0-9]+'
branches: [main]
release:
types: [published]

env:
DENO_UNSTABLE_WORKSPACES: true
Expand Down Expand Up @@ -34,12 +34,12 @@ jobs:
run: deno fmt

- name: Type check
run: deno test --unstable --no-run --doc
run: deno test --no-run --doc

- name: Publish (dry run)
if: startsWith(github.ref, 'refs/tags/') == false
if: github.event_name == 'push'
run: deno publish --dry-run

- name: Publish (real)
if: startsWith(github.ref, 'refs/tags/')
if: github.event_name == 'release'
run: deno publish
94 changes: 54 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,25 @@ Check out the documentation [here](https://deno.land/std?doc).
import * as fs from "https://deno.land/std@$STD_VERSION/fs/mod.ts";
```

1. Do not import symbols with an underscore in the name.
1. Do not import symbols with a name _prefixed_ by an underscore (they're not
intended for public use).

Bad:
```ts
```ts, ignore
import { _format } from "https://deno.land/std@$STD_VERSION/path/_common/format.ts";
```

1. Do not import modules with an underscore in the path.
1. Do not import modules with a directory or filename _prefixed_ by an
underscore (they're not intended for public use).

Bad:
```ts, ignore
import { createLPS } from "https://deno.land/std@$STD_VERSION/streams/_common.ts";
```

Good:
```ts
import { filterInPlace } from "https://deno.land/std@$STD_VERSION/collections/_utils.ts";
import { TextLineStream } from "https://deno.land/std@$STD_VERSION/streams/text_line_stream.ts";
```

1. Do not import test modules or test data.
Expand All @@ -68,42 +75,49 @@ Check out the documentation [here](https://deno.land/std?doc).

## Stability

| Sub-module | Status |
| ------------ | ---------- |
| archive | Unstable |
| assert | Stable |
| async | Stable |
| bytes | Stable |
| collections | Stable |
| console | Unstable |
| csv | Stable |
| datetime | Unstable |
| dotenv | Unstable |
| encoding | Unstable |
| flags | Unstable |
| fmt | Stable |
| front_matter | Unstable |
| fs | Stable |
| html | Unstable |
| http | Unstable |
| io | Deprecated |
| json | Stable |
| jsonc | Stable |
| log | Unstable |
| media_types | Stable |
| msgpack | Unstable |
| path | Unstable |
| permissions | Deprecated |
| regexp | Unstable |
| semver | Unstable |
| streams | Unstable |
| testing | Stable |
| toml | Stable |
| ulid | Unstable |
| url | Unstable |
| uuid | Stable |
| webgpu | Unstable |
| yaml | Stable |
| Sub-module | Status |
| --------------- | ---------- |
| archive | Unstable |
| assert | Stable |
| async | Stable |
| bytes | Stable |
| cli | Unstable |
| collections | Stable |
| console | Unstable |
| crypto | Stable |
| csv | Stable |
| data_structures | Unstable |
| datetime | Unstable |
| dotenv | Unstable |
| encoding | Stable |
| expect | Unstable |
| flags | Unstable |
| fmt | Stable |
| front_matter | Stable |
| fs | Stable |
| html | Unstable |
| http | Unstable |
| ini | Unstable |
| io | Unstable |
| json | Stable |
| jsonc | Stable |
| log | Unstable |
| media_types | Stable |
| msgpack | Unstable |
| net | Unstable |
| path | Stable |
| permissions | Deprecated |
| regexp | Unstable |
| semver | Unstable |
| streams | Stable |
| testing | Stable |
| text | Unstable |
| toml | Stable |
| ulid | Unstable |
| url | Unstable |
| uuid | Stable |
| webgpu | Unstable |
| yaml | Stable |

> For background and discussions regarding the stability of the following
> sub-modules, see [#3489](https://github.com/denoland/deno_std/issues/3489).
Expand Down
39 changes: 39 additions & 0 deletions Releases.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
### 0.217.0 / 2024.02.22

- deprecation(semver): deprecate `==`, `===`, `!==`, and `""` operators (#4271)
- doc: fix `std/path/posix` link (#4337)
- feat(io): `iterateReader[Sync]()` (#4247)
- feat(io): un-deprecate `readerFromStreamReader()` (#4343)
- feat(testing): explicit resource management for `spy()` and `stub()` (#4306)
- fix(http): `version` from `deno.json` import (#4342)
- fix(media_types): load extensions when directly importing
`extensionsByTypes()` (#4351)
- fix(semver): fix `prerelease` handlings in range utils (#4323)
- fix(semver): fix parse_range for `>x.y` pattern (#4350)

### 0.216.0 / 2024.02.15

- BREAKING(path): remove `path/windows/separator.ts` (#4292)
- BREAKING(semver): remove `SemVerRange` and `isSemVerRange()` (#4295)
- BREAKING(semver): remove `eq()`, `gt()`, `gte()`, `lt()`, `lte()` and `neq()`
(#4294)
- BREAKING(semver): remove `outside()` (#4293)
- feat(datetime): `format()` options (#4285)
- fix(semver): return new object instance in `comparatorMin()` and
`comparatorMax()` (#4314)

### 0.215.0 / 2024.02.08

- BREAKING(log): remove `WARNING` log level (#4258)
- BREAKING(path): remove `glob.ts` files (#4259)
- BREAKING(path): remove `separator.ts` files (#4260)
- BREAKING(semver): remove `Comparator` functions (#4278)
- BREAKING(semver): remove `rangeFormat()` (#4265)
- BREAKING(semver): remove `sort()` (#4264)
- deprecation(semver): deprecate `ltr()` and `gtr()` (#4228)
- deprecation(semver): deprecate `reverseSort()` (#4280)
- feat(expect): add `expect.addEqualityTesters` api. (#4255)
- fix: version bump workflow (#4288)
- refactor(dotenv): prepare for `noUncheckedIndexedAccess` (#4261)
- refatcor(toml): prepare for `noUncheckedIndexedAccess` (#4274)

### 0.214.0 / 2024.02.01

- BREAKING(io): remove `types.d.ts` (#4237)
Expand Down
107 changes: 63 additions & 44 deletions _tools/check_circular_submodule_dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@ import { createGraph, ModuleGraphJson, ModuleJson } from "deno_graph";
/**
* Checks for circular dependencies in the std submodules.
*
* When run with `--graph` it will output a graphviz graph in dot language.
* Usage: deno run -A _tools/check_circular_submodule_dependencies.ts
*
* `--graph` option outputs graphviz diagram. You can convert the output to
* a visual graph using tools like https://dreampuf.github.io/GraphvizOnline/
*
* $ deno run -A _tools/check_circular_submodule_dependencies.ts --graph
*
* `--table` option outputs a table of submodules and their status.
*
* $ deno run -A _tools/check_circular_submodule_dependencies.ts --table
*/

type DepState = "ready" | "not ready" | "needs clean up" | "deprecated";
type DepState = "Stable" | "Unstable" | "Deprecated";
type Dep = {
name: string;
set: Set<string>;
Expand Down Expand Up @@ -38,6 +47,7 @@ async function check(
}
}
deps.delete(submod);
deps.delete("version.ts");
return { name: submod, set: deps, state };
}

Expand Down Expand Up @@ -71,18 +81,19 @@ function getSubmoduleDepsFromSpecifier(
return deps;
}

deps["archive"] = await check("archive", "not ready");
deps["assert"] = await check("assert", "ready");
deps["async"] = await check("async", "ready");
deps["bytes"] = await check("bytes", "ready");
deps["collections"] = await check("collections", "ready");
deps["console"] = await check("console", "not ready");
deps["crypto"] = await check("crypto", "needs clean up");
deps["csv"] = await check("csv", "ready");
deps["data_structures"] = await check("data_structures", "not ready");
deps["datetime"] = await check("datetime", "deprecated");
deps["dotenv"] = await check("dotenv", "not ready");
deps["encoding"] = await check("encoding", "needs clean up", [
deps["archive"] = await check("archive", "Unstable");
deps["assert"] = await check("assert", "Stable");
deps["async"] = await check("async", "Stable");
deps["bytes"] = await check("bytes", "Stable");
deps["cli"] = await check("cli", "Unstable");
deps["collections"] = await check("collections", "Stable");
deps["console"] = await check("console", "Unstable");
deps["crypto"] = await check("crypto", "Stable");
deps["csv"] = await check("csv", "Stable");
deps["data_structures"] = await check("data_structures", "Unstable");
deps["datetime"] = await check("datetime", "Unstable");
deps["dotenv"] = await check("dotenv", "Unstable");
deps["encoding"] = await check("encoding", "Stable", [
"ascii85.ts",
"base32.ts",
"base58.ts",
Expand All @@ -92,41 +103,45 @@ deps["encoding"] = await check("encoding", "needs clean up", [
"hex.ts",
"varint.ts",
]);
deps["flags"] = await check("flags", "not ready");
deps["fmt"] = await check("fmt", "ready", [
deps["expect"] = await check("expect", "Unstable");
deps["flags"] = await check("flags", "Unstable");
deps["fmt"] = await check("fmt", "Stable", [
"bytes.ts",
"colors.ts",
"duration.ts",
"printf.ts",
]);
deps["front_matter"] = await check("front_matter", "needs clean up");
deps["fs"] = await check("fs", "ready");
deps["html"] = await check("html", "not ready");
deps["http"] = await check("http", "needs clean up");
deps["io"] = await check("io", "deprecated");
deps["json"] = await check("json", "ready");
deps["jsonc"] = await check("jsonc", "ready");
deps["log"] = await check("log", "not ready");
deps["media_types"] = await check("media_types", "ready");
deps["msgpack"] = await check("msgpack", "not ready");
deps["path"] = await check("path", "needs clean up");
deps["permissions"] = await check("permissions", "deprecated");
deps["regexp"] = await check("regexp", "not ready");
deps["semver"] = await check("semver", "not ready");
deps["streams"] = await check("streams", "needs clean up");
deps["testing"] = await check("testing", "ready", [
deps["front_matter"] = await check("front_matter", "Stable");
deps["fs"] = await check("fs", "Stable");
deps["html"] = await check("html", "Unstable");
deps["http"] = await check("http", "Unstable");
deps["ini"] = await check("ini", "Unstable");
deps["io"] = await check("io", "Unstable");
deps["json"] = await check("json", "Stable");
deps["jsonc"] = await check("jsonc", "Stable");
deps["log"] = await check("log", "Unstable");
deps["media_types"] = await check("media_types", "Stable");
deps["msgpack"] = await check("msgpack", "Unstable");
deps["net"] = await check("net", "Unstable");
deps["path"] = await check("path", "Stable");
deps["permissions"] = await check("permissions", "Deprecated");
deps["regexp"] = await check("regexp", "Unstable");
deps["semver"] = await check("semver", "Unstable");
deps["streams"] = await check("streams", "Stable");
deps["testing"] = await check("testing", "Stable", [
"bdd.ts",
"mock.ts",
"snapshot.ts",
"time.ts",
"types.ts",
]);
deps["toml"] = await check("toml", "ready");
deps["ulid"] = await check("ulid", "not ready");
deps["url"] = await check("url", "not ready");
deps["uuid"] = await check("uuid", "ready");
deps["webgpu"] = await check("webgpu", "not ready");
deps["yaml"] = await check("yaml", "ready");
deps["text"] = await check("text", "Unstable");
deps["toml"] = await check("toml", "Stable");
deps["ulid"] = await check("ulid", "Unstable");
deps["url"] = await check("url", "Unstable");
deps["uuid"] = await check("uuid", "Stable");
deps["webgpu"] = await check("webgpu", "Unstable");
deps["yaml"] = await check("yaml", "Stable");

/** Checks circular deps between sub modules */
function checkCircularDeps(
Expand Down Expand Up @@ -158,14 +173,12 @@ function formatLabel(mod: string) {
/** Returns node style (in DOT language) for each state */
function stateToNodeStyle(state: DepState) {
switch (state) {
case "ready":
case "Stable":
return "[shape=doublecircle fixedsize=1 height=1.1]";
case "not ready":
case "Unstable":
return "[shape=box style=filled, fillcolor=pink]";
case "needs clean up":
return "[shape=circle fixedsize=1 height=1.1 style=filled, fillcolor=yellow]";
case "deprecated":
return "[shape=septagon style=filled, fillcolor=gray]";
case "Deprecated":
return "[shape=box style=filled, fillcolor=gray]";
}
}

Expand All @@ -179,6 +192,12 @@ if (Deno.args.includes("--graph")) {
}
}
console.log("}");
} else if (Deno.args.includes("--table")) {
console.log("| Sub-module | Status |");
console.log("| --------------- | ---------- |");
for (const [mod, info] of Object.entries(deps)) {
console.log(`| ${mod.padEnd(15)} | ${info.state.padEnd(10)} |`);
}
} else {
console.log(`${Object.keys(deps).length} submodules checked.`);
for (const mod of Object.keys(deps)) {
Expand Down
Loading

0 comments on commit 810250f

Please sign in to comment.