From 16647dd901566695c8c00b8289fa4e5dfe16c757 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 23:04:20 +0000 Subject: [PATCH 1/6] chore: bump @core/unknownutil from 3.18.1 to 4.0.1 --- cli/src/tasks.ts | 4 ++-- core/locks.ts | 4 ++-- core/maps.ts | 6 +++--- core/updates.ts | 4 ++-- deno.json | 2 +- deno.lock | 9 ++++----- integration/github.ts | 8 ++++---- integration/repository.ts | 4 ++-- 8 files changed, 20 insertions(+), 21 deletions(-) diff --git a/cli/src/tasks.ts b/cli/src/tasks.ts index f09f5f62..811beb7e 100644 --- a/cli/src/tasks.ts +++ b/cli/src/tasks.ts @@ -1,4 +1,4 @@ -import { ensure, is } from "@core/unknownutil"; +import { as, ensure, is } from "@core/unknownutil"; import { colors } from "@cliffy/ansi/colors"; import $ from "@david/dax"; import { associateWith, mapEntries } from "@std/collections"; @@ -19,7 +19,7 @@ async function getTasks(config?: string): Promise { } const json = ensure( parseJsonc(await Deno.readTextFile(config)), - is.ObjectOf({ tasks: is.OptionalOf(is.RecordOf(is.String, is.String)) }), + is.ObjectOf({ tasks: as.Optional(is.RecordOf(is.String, is.String)) }), ); return { ...tasks, diff --git a/core/locks.ts b/core/locks.ts index d9d11465..f652cea4 100644 --- a/core/locks.ts +++ b/core/locks.ts @@ -1,4 +1,4 @@ -import { ensure, is } from "@core/unknownutil"; +import { as, ensure, is } from "@core/unknownutil"; import { createGraph } from "@deno/graph"; import { filterValues, pick } from "@std/collections"; import * as SemVer from "@std/semver"; @@ -197,7 +197,7 @@ async function getNpmPackageInfo( dist: is.ObjectOf({ integrity: is.String, }), - dependencies: is.OptionalOf(is.RecordOf(is.String, is.String)), + dependencies: as.Optional(is.RecordOf(is.String, is.String)), }), ); const dependencies: [name: string, version: string][] = []; diff --git a/core/maps.ts b/core/maps.ts index de77ffde..c4658c10 100644 --- a/core/maps.ts +++ b/core/maps.ts @@ -1,5 +1,5 @@ import * as Jsonc from "@std/jsonc"; -import { ensure, is } from "@core/unknownutil"; +import { as, ensure, is } from "@core/unknownutil"; export interface ImportMapJson { imports?: Record; @@ -15,8 +15,8 @@ export function parseImportMapJson( return ensure( Jsonc.parse(src), is.ObjectOf({ - imports: is.OptionalOf(is.RecordOf(is.String)), - scopes: is.OptionalOf(is.RecordOf(is.RecordOf(is.String))), + imports: as.Optional(is.RecordOf(is.String)), + scopes: as.Optional(is.RecordOf(is.RecordOf(is.String))), }), ); } diff --git a/core/updates.ts b/core/updates.ts index ab5b7ddf..c9bf5bef 100644 --- a/core/updates.ts +++ b/core/updates.ts @@ -1,4 +1,4 @@ -import { ensure, is } from "@core/unknownutil"; +import { as, ensure, is } from "@core/unknownutil"; import { filterValues, mapNotNullish, maxWith } from "@std/collections"; import * as SemVer from "@std/semver"; import { @@ -140,7 +140,7 @@ async function getJsrVersions(dep: DependencyState<"jsr">): Promise { assertOk(res); const isJsrPackageMeta = is.ObjectOf({ versions: is.RecordOf( - is.ObjectOf({ yanked: is.OptionalOf(is.Boolean) }), + is.ObjectOf({ yanked: as.Optional(is.Boolean) }), is.String, ), }); diff --git a/deno.json b/deno.json index 40f816b2..55b42c94 100644 --- a/deno.json +++ b/deno.json @@ -17,7 +17,7 @@ "@cliffy/table": "jsr:@cliffy/table@1.0.0-rc.5", "@conventional-commits/parser": "npm:@conventional-commits/parser@^0.4.1", "@core/match": "jsr:@core/match@^0.3.1", - "@core/unknownutil": "jsr:@core/unknownutil@^3.18.1", + "@core/unknownutil": "jsr:@core/unknownutil@^4.0.0", "@david/dax": "jsr:@david/dax@^0.41.0", "@deno/graph": "jsr:@deno/graph@^0.81.0", "@molt/core": "jsr:@molt/core@^0.19.0", diff --git a/deno.lock b/deno.lock index 702473df..79099d33 100644 --- a/deno.lock +++ b/deno.lock @@ -10,8 +10,7 @@ "jsr:@cliffy/table@1.0.0-rc.5": "jsr:@cliffy/table@1.0.0-rc.5", "jsr:@core/match@^0.3.1": "jsr:@core/match@0.3.1", "jsr:@core/unknownutil@3.18.0": "jsr:@core/unknownutil@3.18.0", - "jsr:@core/unknownutil@^3.18.0": "jsr:@core/unknownutil@3.18.1", - "jsr:@core/unknownutil@^3.18.1": "jsr:@core/unknownutil@3.18.1", + "jsr:@core/unknownutil@^4.0.0": "jsr:@core/unknownutil@4.0.1", "jsr:@david/dax@^0.41.0": "jsr:@david/dax@0.41.0", "jsr:@david/which@^0.4.1": "jsr:@david/which@0.4.1", "jsr:@deno/graph@^0.81.0": "jsr:@deno/graph@0.81.0", @@ -115,8 +114,8 @@ "@core/unknownutil@3.18.0": { "integrity": "bff7ab4a2f554bbade301127519523b0d3baa4273ecbed51287133ac00a48738" }, - "@core/unknownutil@3.18.1": { - "integrity": "6aaa108b623ff971d062dd345da7ca03b97f61ae3d29c8677bff14fec11f0d76" + "@core/unknownutil@4.0.1": { + "integrity": "5e08141ea8284d064bc4ee8c70aab42825355fb1399eaeb6140936f5f763f42d" }, "@david/dax@0.41.0": { "integrity": "9e1ecf66a0415962cc8ad3ba4e3fa93ce0f1a1cc797dd95c36fdfb6977dc7fc8", @@ -505,7 +504,7 @@ "jsr:@cliffy/command@1.0.0-rc.5", "jsr:@cliffy/table@1.0.0-rc.5", "jsr:@core/match@^0.3.1", - "jsr:@core/unknownutil@^3.18.1", + "jsr:@core/unknownutil@^4.0.0", "jsr:@david/dax@^0.41.0", "jsr:@deno/graph@^0.81.0", "jsr:@molt/core@^0.19.0", diff --git a/integration/github.ts b/integration/github.ts index 8a531c9f..d600dacc 100644 --- a/integration/github.ts +++ b/integration/github.ts @@ -1,9 +1,9 @@ import { dirname } from "@std/path"; import { parse as parseJsonc } from "@std/jsonc"; import { match, placeholder as _ } from "@core/match"; -import { isString } from "@core/unknownutil"; +import { is } from "@core/unknownutil"; import { Octokit } from "@octokit/rest"; -import { is, type Package } from "./packages.ts"; +import { is as isPackage, type Package } from "./packages.ts"; import type { Repository } from "./repository.ts"; const octokit = new Octokit({ @@ -86,10 +86,10 @@ async function resolveJsrPackageRoot( file_sha: config.sha, }); const json = match( - { name: _("name", isString) }, + { name: _("name", is.String) }, parseJsonc(atob(data.content)), ); - if (json && is(`jsr:${json.name}`, pkg)) { + if (json && isPackage(`jsr:${json.name}`, pkg)) { return dirname(config.path); } } diff --git a/integration/repository.ts b/integration/repository.ts index 7fb9a4e0..ea3095bf 100644 --- a/integration/repository.ts +++ b/integration/repository.ts @@ -1,4 +1,4 @@ -import { ensure, is } from "@core/unknownutil"; +import { as, ensure, is } from "@core/unknownutil"; import { type Package, stringify } from "./packages.ts"; import * as github from "./github.ts"; @@ -115,7 +115,7 @@ export async function resolveCreatedDate( } const isJsrPackageDetails = is.ObjectOf({ - githubRepository: is.OptionalOf(is.ObjectOf({ + githubRepository: as.Optional(is.ObjectOf({ owner: is.String, name: is.String, })), From 23b73adf2c67a6eb3d7438dc5be8b2e9caba5507 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 23:04:20 +0000 Subject: [PATCH 2/6] chore: bump @std/assert from 1.0.1 to 1.0.2 --- deno.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deno.lock b/deno.lock index 79099d33..3848491d 100644 --- a/deno.lock +++ b/deno.lock @@ -17,7 +17,7 @@ "jsr:@luca/flag@1.0.0": "jsr:@luca/flag@1.0.0", "jsr:@std/assert@1.0.0-rc.2": "jsr:@std/assert@1.0.0-rc.2", "jsr:@std/assert@^0.221.0": "jsr:@std/assert@0.221.0", - "jsr:@std/assert@^1.0.0": "jsr:@std/assert@1.0.1", + "jsr:@std/assert@^1.0.0": "jsr:@std/assert@1.0.2", "jsr:@std/async@^1.0.0-rc.2": "jsr:@std/async@1.0.1", "jsr:@std/bytes@^0.221.0": "jsr:@std/bytes@0.221.0", "jsr:@std/bytes@^1.0.0-rc.3": "jsr:@std/bytes@1.0.2", @@ -163,8 +163,8 @@ "jsr:@std/internal@^1.0.0" ] }, - "@std/assert@1.0.1": { - "integrity": "13590ef8e5854f59e4ad252fd987e83239a1bf1f16cb9c69c1d123ebb807a75b", + "@std/assert@1.0.2": { + "integrity": "ccacec332958126deaceb5c63ff8b4eaf9f5ed0eac9feccf124110435e59e49c", "dependencies": [ "jsr:@std/internal@^1.0.1" ] From ef35c7024ffdd1ad9e40aee299eb030d5ede3617 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 23:04:20 +0000 Subject: [PATCH 3/6] chore: bump @std/fmt from 0.225.6 to 1.0.0 --- deno.json | 2 +- deno.lock | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deno.json b/deno.json index 55b42c94..394bef83 100644 --- a/deno.json +++ b/deno.json @@ -27,7 +27,7 @@ "@std/assert": "jsr:@std/assert@^1.0.0", "@std/collections": "jsr:@std/collections@^1.0.1", "@std/dotenv": "jsr:@std/dotenv@^0.225.0", - "@std/fmt": "jsr:@std/fmt@^0.225.0", + "@std/fmt": "jsr:@std/fmt@^1.0.0", "@std/fs": "jsr:@std/fs@^1.0.0", "@std/jsonc": "jsr:@std/jsonc@^1.0.0", "@std/path": "jsr:@std/path@^1.0.0", diff --git a/deno.lock b/deno.lock index 3848491d..e4192545 100644 --- a/deno.lock +++ b/deno.lock @@ -32,6 +32,7 @@ "jsr:@std/fmt@^0.221.0": "jsr:@std/fmt@0.221.0", "jsr:@std/fmt@^0.225.0": "jsr:@std/fmt@0.225.6", "jsr:@std/fmt@^0.225.4": "jsr:@std/fmt@0.225.6", + "jsr:@std/fmt@^1.0.0": "jsr:@std/fmt@1.0.0", "jsr:@std/fmt@~0.225.4": "jsr:@std/fmt@0.225.6", "jsr:@std/fs@0.221.0": "jsr:@std/fs@0.221.0", "jsr:@std/fs@^1.0.0": "jsr:@std/fs@1.0.0", @@ -199,6 +200,9 @@ "@std/fmt@0.225.6": { "integrity": "aba6aea27f66813cecfd9484e074a9e9845782ab0685c030e453a8a70b37afc8" }, + "@std/fmt@1.0.0": { + "integrity": "8a95c9fdbb61559418ccbc0f536080cf43341655e1444f9d375a66886ceaaa3d" + }, "@std/fs@0.221.0": { "integrity": "028044450299de8ed5a716ade4e6d524399f035513b85913794f4e81f07da286", "dependencies": [ @@ -513,7 +517,7 @@ "jsr:@std/assert@^1.0.0", "jsr:@std/collections@^1.0.1", "jsr:@std/dotenv@^0.225.0", - "jsr:@std/fmt@^0.225.0", + "jsr:@std/fmt@^1.0.0", "jsr:@std/fs@^1.0.0", "jsr:@std/jsonc@^1.0.0", "jsr:@std/path@^1.0.0", From 8ac91467a85823feab217d76db1d23f3e97c4fee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 23:04:20 +0000 Subject: [PATCH 4/6] chore: bump @std/fs from 1.0.0 to 1.0.1 --- deno.lock | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deno.lock b/deno.lock index e4192545..c64b2f5e 100644 --- a/deno.lock +++ b/deno.lock @@ -216,6 +216,12 @@ "jsr:@std/path@^1.0.2" ] }, + "@std/fs@1.0.1": { + "integrity": "d6914ca2c21abe591f733b31dbe6331e446815e513e2451b3b9e472daddfefcb", + "dependencies": [ + "jsr:@std/path@^1.0.2" + ] + }, "@std/internal@1.0.1": { "integrity": "6f8c7544d06a11dd256c8d6ba54b11ed870aac6c5aeafff499892662c57673e6" }, From ec9b1329354804c787e7899e4e05109480cef3d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 23:04:20 +0000 Subject: [PATCH 5/6] chore: bump @std/semver from 0.224.3 to 1.0.1 --- core/updates.ts | 4 ++-- deno.json | 2 +- deno.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/updates.ts b/core/updates.ts index c9bf5bef..51ae6dd9 100644 --- a/core/updates.ts +++ b/core/updates.ts @@ -82,11 +82,11 @@ async function getPackageUpdate( const versions = await getVersions(dep); const semvers = mapNotNullish(versions, SemVer.tryParse); - const locked = SemVer.tryParse(dep.locked); + const locked = dep.locked ? SemVer.tryParse(dep.locked) : undefined; const range = SemVer.parseRange(dep.constraint); const constrainted = SemVer.maxSatisfying( - semvers.filter((it) => SemVer.greaterThan(it, locked ?? SemVer.MIN)), + locked ? semvers.filter((it) => SemVer.greaterThan(it, locked)) : semvers, range, ); diff --git a/deno.json b/deno.json index 394bef83..556f1910 100644 --- a/deno.json +++ b/deno.json @@ -31,7 +31,7 @@ "@std/fs": "jsr:@std/fs@^1.0.0", "@std/jsonc": "jsr:@std/jsonc@^1.0.0", "@std/path": "jsr:@std/path@^1.0.0", - "@std/semver": "jsr:@std/semver@^0.224.3", + "@std/semver": "jsr:@std/semver@^1.0.0", "@std/streams": "jsr:@std/streams@^1.0.0", "@std/testing": "jsr:@std/testing@^0.225.0", "dedent": "npm:dedent@^1.5.3" diff --git a/deno.lock b/deno.lock index c64b2f5e..bc187f1e 100644 --- a/deno.lock +++ b/deno.lock @@ -50,7 +50,7 @@ "jsr:@std/path@^0.221.0": "jsr:@std/path@0.221.0", "jsr:@std/path@^1.0.0": "jsr:@std/path@1.0.2", "jsr:@std/path@^1.0.2": "jsr:@std/path@1.0.2", - "jsr:@std/semver@^0.224.3": "jsr:@std/semver@0.224.3", + "jsr:@std/semver@^1.0.0": "jsr:@std/semver@1.0.1", "jsr:@std/streams@0.221.0": "jsr:@std/streams@0.221.0", "jsr:@std/streams@^1.0.0": "jsr:@std/streams@1.0.0", "jsr:@std/testing@^0.225.0": "jsr:@std/testing@0.225.3", @@ -262,8 +262,8 @@ "@std/path@1.0.2": { "integrity": "a452174603f8c620bd278a380c596437a9eef50c891c64b85812f735245d9ec7" }, - "@std/semver@0.224.3": { - "integrity": "7bb34b5ad46de2c0c73de0ca3e30081ef64b4361f66abd57c84ff1011c6a1233" + "@std/semver@1.0.1": { + "integrity": "f0c9b41b70e27e8cdfe9252b486c55a727d66ead72625e0fa1aae75f45ca15e1" }, "@std/streams@0.221.0": { "integrity": "47f2f74634b47449277c0ee79fe878da4424b66bd8975c032e3afdca88986e61", @@ -527,7 +527,7 @@ "jsr:@std/fs@^1.0.0", "jsr:@std/jsonc@^1.0.0", "jsr:@std/path@^1.0.0", - "jsr:@std/semver@^0.224.3", + "jsr:@std/semver@^1.0.0", "jsr:@std/streams@^1.0.0", "jsr:@std/testing@^0.225.0", "npm:@conventional-commits/parser@^0.4.1", From db3de95391b4c02fcac497394c418cc99aca80bf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 23:04:21 +0000 Subject: [PATCH 6/6] chore: bump @std/testing from 0.225.3 to 1.0.0 --- deno.json | 2 +- deno.lock | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/deno.json b/deno.json index 556f1910..7d63ad83 100644 --- a/deno.json +++ b/deno.json @@ -33,7 +33,7 @@ "@std/path": "jsr:@std/path@^1.0.0", "@std/semver": "jsr:@std/semver@^1.0.0", "@std/streams": "jsr:@std/streams@^1.0.0", - "@std/testing": "jsr:@std/testing@^0.225.0", + "@std/testing": "jsr:@std/testing@^1.0.0", "dedent": "npm:dedent@^1.5.3" }, "lint": { diff --git a/deno.lock b/deno.lock index bc187f1e..aa958be1 100644 --- a/deno.lock +++ b/deno.lock @@ -18,7 +18,9 @@ "jsr:@std/assert@1.0.0-rc.2": "jsr:@std/assert@1.0.0-rc.2", "jsr:@std/assert@^0.221.0": "jsr:@std/assert@0.221.0", "jsr:@std/assert@^1.0.0": "jsr:@std/assert@1.0.2", + "jsr:@std/assert@^1.0.2": "jsr:@std/assert@1.0.2", "jsr:@std/async@^1.0.0-rc.2": "jsr:@std/async@1.0.1", + "jsr:@std/async@^1.0.2": "jsr:@std/async@1.0.3", "jsr:@std/bytes@^0.221.0": "jsr:@std/bytes@0.221.0", "jsr:@std/bytes@^1.0.0-rc.3": "jsr:@std/bytes@1.0.2", "jsr:@std/bytes@^1.0.1-rc.3": "jsr:@std/bytes@1.0.2", @@ -27,6 +29,7 @@ "jsr:@std/collections@^1.0.0": "jsr:@std/collections@1.0.5", "jsr:@std/collections@^1.0.1": "jsr:@std/collections@1.0.5", "jsr:@std/data-structures@^1.0.0-rc.1": "jsr:@std/data-structures@1.0.1", + "jsr:@std/data-structures@^1.0.1": "jsr:@std/data-structures@1.0.1", "jsr:@std/dotenv@^0.225.0": "jsr:@std/dotenv@0.225.0", "jsr:@std/encoding@1.0.0-rc.2": "jsr:@std/encoding@1.0.0-rc.2", "jsr:@std/fmt@^0.221.0": "jsr:@std/fmt@0.221.0", @@ -35,8 +38,9 @@ "jsr:@std/fmt@^1.0.0": "jsr:@std/fmt@1.0.0", "jsr:@std/fmt@~0.225.4": "jsr:@std/fmt@0.225.6", "jsr:@std/fs@0.221.0": "jsr:@std/fs@0.221.0", - "jsr:@std/fs@^1.0.0": "jsr:@std/fs@1.0.0", + "jsr:@std/fs@^1.0.0": "jsr:@std/fs@1.0.1", "jsr:@std/fs@^1.0.0-rc.1": "jsr:@std/fs@1.0.0", + "jsr:@std/fs@^1.0.1": "jsr:@std/fs@1.0.1", "jsr:@std/internal@^1.0.0": "jsr:@std/internal@1.0.1", "jsr:@std/internal@^1.0.1": "jsr:@std/internal@1.0.1", "jsr:@std/io@0.221.0": "jsr:@std/io@0.221.0", @@ -54,6 +58,7 @@ "jsr:@std/streams@0.221.0": "jsr:@std/streams@0.221.0", "jsr:@std/streams@^1.0.0": "jsr:@std/streams@1.0.0", "jsr:@std/testing@^0.225.0": "jsr:@std/testing@0.225.3", + "jsr:@std/testing@^1.0.0": "jsr:@std/testing@1.0.0", "jsr:@std/text@1.0.0-rc.1": "jsr:@std/text@1.0.0-rc.1", "npm:@conventional-commits/parser@0.4.0": "npm:@conventional-commits/parser@0.4.0", "npm:@conventional-commits/parser@^0.4.1": "npm:@conventional-commits/parser@0.4.1", @@ -173,6 +178,9 @@ "@std/async@1.0.1": { "integrity": "3c7f6324a8a1b47ca657e5a349b511c9a6c2c0729e9d66b223c9ecaac0753ecb" }, + "@std/async@1.0.3": { + "integrity": "6ed64678db43451683c6c176a21426a2ccd21ba0269ebb2c36133ede3f165792" + }, "@std/bytes@0.221.0": { "integrity": "64a047011cf833890a4a2ab7293ac55a1b4f5a050624ebc6a0159c357de91966" }, @@ -291,6 +299,17 @@ "jsr:@std/path@1.0.0-rc.2" ] }, + "@std/testing@1.0.0": { + "integrity": "27cfc06392c69c2acffe54e6d0bcb5f961cf193f519255372bd4fff1481bfef8", + "dependencies": [ + "jsr:@std/assert@^1.0.2", + "jsr:@std/async@^1.0.2", + "jsr:@std/data-structures@^1.0.1", + "jsr:@std/fs@^1.0.1", + "jsr:@std/internal@^1.0.1", + "jsr:@std/path@^1.0.2" + ] + }, "@std/text@1.0.0-rc.1": { "integrity": "34c722203e87ee12792c8d4a0cd2ee0e001341cbce75b860fc21be19d62232b0" } @@ -529,7 +548,7 @@ "jsr:@std/path@^1.0.0", "jsr:@std/semver@^1.0.0", "jsr:@std/streams@^1.0.0", - "jsr:@std/testing@^0.225.0", + "jsr:@std/testing@^1.0.0", "npm:@conventional-commits/parser@^0.4.1", "npm:@octokit/rest@^21.0.0", "npm:dedent@^1.5.3"