Skip to content

Commit

Permalink
Merge branch 'main' into log-remove-NOTET-LogLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
timreichen authored Nov 8, 2024
2 parents ae6d237 + bf0ad52 commit fdfa0e8
Show file tree
Hide file tree
Showing 111 changed files with 3,758 additions and 656 deletions.
1 change: 1 addition & 0 deletions .github/workflows/title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
io(/unstable)?
json(/unstable)?
jsonc(/unstable)?
kv(/unstable)?
log(/unstable)?
media-types(/unstable)?
msgpack(/unstable)?
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2

- name: Run version bump
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workspace_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: canary

Expand Down
95 changes: 95 additions & 0 deletions Releases.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,98 @@
### 2024.11.01

#### @std/assert 1.0.7 (patch)

- fix(assert): fix assertion error message of isError (#6147)
- test(assert): change inert comments to @ts-expect-error directives (#6162)

#### @std/async 1.0.8 (patch)

- test(async): fix flakiness of throttle example (#6156)
- test(async/unstable): fix typo (#6149)

#### @std/bytes 1.0.3 (patch)

- test(bytes): document the cases being tested for equals/startsWith/endsWith
(#6163)

#### @std/expect 1.0.7 (patch)

- fix(expect): re-align `expect.toMatchObject` api (#6160)
- fix(expect): support
expect.not.{arrayContaining,objectContaining,stringContaining,stringMatching}
(#6138)
- fix(expect,internal,testing): support `expect.assertions` (#6032)

#### @std/internal 1.0.5 (patch)

- fix(expect,internal,testing): support `expect.assertions` (#6032)

#### @std/path 1.0.8 (patch)

- refactor(path): always name the parameters (add param definition check in doc
linter) (#6158)

#### @std/streams 1.0.8 (patch)

- docs(streams): rest arguments not being asserted in docs (#6155)

#### @std/testing 1.0.4 (patch)

- feat(testing/unstable): support for stubbing properties (#6128)
- feat(testing/unstable): add type test for mutual assignability (#6154)
- fix(expect,internal,testing): support `expect.assertions` (#6032)

### 2024.10.24

#### @std/async 1.0.7 (patch)

- feat(async/unstable): add `throttle()` function (#6110)

#### @std/cbor 0.1.2 (patch)

- refactor(cbor): replace `toByteStream` function in common with import from
`@std/streams` (#6107)
- test(cbor): number precision error in decoding test (#6115)
- test(cbor): empty string being excluded from expected result (#6106)

#### @std/collections 1.0.9 (patch)

- feat(collections/unstable): support `Iterable` argument in `slidingWindows`
(#6095)

#### @std/expect 1.0.6 (patch)

- fix(expect): support `expect.objectContaining` (#6065)

#### @std/fmt 1.0.3 (patch)

- docs(fmt): fix %f width typo in printf docs (#6139)
- test(fmt): handle missing group separator for 1000.1 in some locales (#6117)

#### @std/fs 1.0.5 (patch)

- refactor(fs): fix uncaught errors in browsers (#6135)

#### @std/http 1.0.9 (patch)

- fix(http): fix tablet and smarttv in Device.type literal types (#6129)

#### @std/json 1.0.1 (patch)

- refactor(json): fix typo (#6103)

#### @std/path 1.0.7 (patch)

- docs(path): re-add URL examples to `@std/path/posix` examples (#6105)

#### @std/tar 0.1.3 (patch)

- docs(tar): fix example in creating directories (#6113)

#### @std/text 1.0.8 (patch)

- feat(text/unstable): handle non-Latin-script text in `slugify` (#6012)

### 2024.10.10a

#### @std/cbor 0.1.1 (patch)
Expand Down
48 changes: 48 additions & 0 deletions _tools/check_docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
type DocNodeModuleDoc,
type JsDoc,
type JsDocTagDocRequired,
type JsDocTagParam,
type Location,
type TsTypeDef,
} from "@deno/doc";
Expand Down Expand Up @@ -72,6 +73,7 @@ const ENTRY_POINTS = [
"../json/mod.ts",
"../jsonc/mod.ts",
"../log/base_handler.ts",
"../log/file_handler.ts",
"../log/warn.ts",
"../log/critical.ts",
"../log/debug.ts",
Expand All @@ -80,6 +82,7 @@ const ENTRY_POINTS = [
"../log/console_handler.ts",
"../log/formatters.ts",
"../log/get_logger.ts",
"../log/logger.ts",
"../media_types/mod.ts",
"../msgpack/mod.ts",
"../net/mod.ts",
Expand Down Expand Up @@ -182,6 +185,36 @@ function assertHasReturnTag(document: { jsDoc: JsDoc; location: Location }) {
}
}

/**
* Asserts that a @param tag has a corresponding function definition.
*/
function assertHasParamDefinition(
document: DocNodeWithJsDoc<DocNodeFunction | ClassMethodDef>,
param: JsDocTagParam,
) {
const paramDoc = document.functionDef.params.find((paramDoc) => {
if (paramDoc.kind === "identifier") {
return paramDoc.name === param.name;
} else if (paramDoc.kind === "rest" && paramDoc.arg.kind === "identifier") {
return paramDoc.arg.name === param.name;
} else if (
paramDoc.kind === "assign" && paramDoc.left.kind === "identifier"
) {
return paramDoc.left.name === param.name;
}
return false;
});

if (!paramDoc) {
diagnostics.push(
new DocumentError(
`@param ${param.name} must have a corresponding named function parameter definition.`,
document,
),
);
}
}

function assertHasParamTag(
document: { jsDoc: JsDoc; location: Location },
param: string,
Expand Down Expand Up @@ -295,6 +328,7 @@ function assertHasTypeParamTags(
* Asserts that a function document has:
* - A `@typeParam` tag for each type parameter.
* - A {@linkcode https://jsdoc.app/tags-param | @param} tag for each parameter.
* - A parameter definition inside the function for each @param tag.
* - A {@linkcode https://jsdoc.app/tags-returns | @returns} tag.
* - At least one {@linkcode https://jsdoc.app/tags-example | @example} tag with
* a code snippet that executes successfully.
Expand All @@ -307,10 +341,24 @@ function assertFunctionDocs(
if (param.kind === "identifier") {
assertHasParamTag(document, param.name);
}
if (param.kind === "rest" && param.arg.kind === "identifier") {
assertHasParamTag(document, param.arg.name);
}
if (param.kind === "assign" && param.left.kind === "identifier") {
assertHasParamTag(document, param.left.name);
}
}

const documentedParams = document.jsDoc.tags?.filter((
tag,
): tag is JsDocTagParam =>
// Filter nested definitions like options.root as it is still documenting options parameter
tag.kind === "param" && !tag.name.includes(".")
) ?? [];
for (const param of documentedParams) {
assertHasParamDefinition(document, param);
}

for (const typeParam of document.functionDef.typeParams) {
assertHasTypeParamTags(document, typeParam.name);
}
Expand Down
49 changes: 0 additions & 49 deletions _tools/release/01_bump_version.ts

This file was deleted.

54 changes: 0 additions & 54 deletions _tools/release/02_create_pr.ts

This file was deleted.

45 changes: 0 additions & 45 deletions _tools/release/03_release.ts

This file was deleted.

4 changes: 0 additions & 4 deletions _tools/release/deps.ts

This file was deleted.

Loading

0 comments on commit fdfa0e8

Please sign in to comment.