From fd8cae200cab7e3e84ace150cae1c1d38cabc6eb Mon Sep 17 00:00:00 2001 From: Alisue Date: Sat, 6 Apr 2024 13:48:34 +0900 Subject: [PATCH 1/3] :memo: Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 5253d47..c4b69db 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2021 Alisue, hashnote.net +Copyright 2024 jsr-core Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From d77e2d4fd226a67077d2efee0e61170a8550a6ff Mon Sep 17 00:00:00 2001 From: Alisue Date: Sat, 6 Apr 2024 13:49:09 +0900 Subject: [PATCH 2/3] :memo: Update linked repository --- README.md | 10 +++++----- scripts/build_npm.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1eebd51..0debd97 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ [![jsr](https://img.shields.io/jsr/v/%40core/unknownutil?logo=javascript&logoColor=white)](https://jsr.io/@core/unknownutil) [![npm](https://img.shields.io/npm/v/unknownutil?logo=npm&logoColor=white)](https://www.npmjs.com/package/unknownutil) -[![denoland](https://img.shields.io/github/v/release/lambdalisue/deno-unknownutil?logo=deno&label=denoland)](https://github.com/lambdalisue/deno-unknownutil/releases) +[![denoland](https://img.shields.io/github/v/release/jsr-core/unknownutil?logo=deno&label=denoland)](https://github.com/jsr-core/unknownutil/releases) [![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/unknownutil/mod.ts) -[![test](https://github.com/lambdalisue/deno-unknownutil/workflows/Test/badge.svg)](https://github.com/lambdalisue/deno-unknownutil/actions?query=workflow%3ATest) -[![codecov](https://codecov.io/github/lambdalisue/deno-unknownutil/graph/badge.svg?token=pfbLRGU5AM)](https://codecov.io/github/lambdalisue/deno-unknownutil) +[![test](https://github.com/jsr-core/unknownutil/workflows/Test/badge.svg)](https://github.com/jsr-core/unknownutil/actions?query=workflow%3ATest) +[![codecov](https://codecov.io/github/jsr-core/unknownutil/graph/badge.svg?token=pfbLRGU5AM)](https://codecov.io/github/jsr-core/unknownutil) A utility pack for handling `unknown` type. @@ -248,8 +248,8 @@ const _: string = maybe(a, is.String) ?? "default value"; ## Migration -See [GitHub Wiki](https://github.com/lambdalisue/deno-unknownutil/wiki) for -migration to v3 from v2 or v2 from v1. +See [GitHub Wiki](https://github.com/jsr-core/unknownutil/wiki) for migration to +v3 from v2 or v2 from v1. ## License diff --git a/scripts/build_npm.ts b/scripts/build_npm.ts index 12b1432..e75b1dd 100644 --- a/scripts/build_npm.ts +++ b/scripts/build_npm.ts @@ -29,7 +29,7 @@ await build({ version, author: "Alisue ", license: "MIT", - repository: "https://github.com/lambdalisue/deno-unknownutil", + repository: "https://github.com/jsr-core/unknownutil", }, }); From e7d49b35654f295aa6f804aa667a57776c1d5087 Mon Sep 17 00:00:00 2001 From: Alisue Date: Sat, 6 Apr 2024 16:58:23 +0900 Subject: [PATCH 3/3] :coffee: Avoid using HTTP imports and refine tools --- deno.jsonc | 10 +++++----- inspect_test.ts | 4 +--- is_test.ts | 11 +++-------- scripts/build_npm.ts | 2 +- util_test.ts | 5 +---- 5 files changed, 11 insertions(+), 21 deletions(-) diff --git a/deno.jsonc b/deno.jsonc index 320f2c3..6e26005 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -2,17 +2,17 @@ "name": "@core/unknownutil", "version": "0.0.0", "exports": "./mod.ts", - "lock": false, "imports": { + "@deno/dnt": "jsr:@deno/dnt@^0.41.1", + "@std/assert": "jsr:@std/assert@^0.221.0", + "@std/testing": "jsr:@std/testing@^0.221.0", "https://deno.land/x/unknownutil@$MODULE_VERSION/": "./" }, "tasks": { "build-npm": "deno run -A scripts/build_npm.ts $(git describe --tags --always --dirty)", + "check": "deno check ./**/*.ts", "test": "deno test -A --parallel --doc", "test:coverage": "deno task test --coverage=.coverage", - "check": "deno check ./**/*.ts", - "coverage": "deno coverage .coverage --exclude=is_bench.ts", - "upgrade": "deno run -q -A https://deno.land/x/molt@0.14.2/cli.ts ./**/*.ts", - "upgrade:commit": "deno task -q upgrade --commit --prefix :package: --pre-commit=fmt" + "coverage": "deno coverage .coverage --exclude=is_bench.ts" } } diff --git a/inspect_test.ts b/inspect_test.ts index 9494b68..eecceea 100644 --- a/inspect_test.ts +++ b/inspect_test.ts @@ -1,6 +1,4 @@ -import { - assertSnapshot, -} from "https://deno.land/std@0.211.0/testing/snapshot.ts"; +import { assertSnapshot } from "@std/testing/snapshot"; import { inspect } from "./inspect.ts"; Deno.test("inspect", async (t) => { diff --git a/is_test.ts b/is_test.ts index 9b9dccc..d2858dc 100644 --- a/is_test.ts +++ b/is_test.ts @@ -1,11 +1,6 @@ -import { - assertEquals, - assertStrictEquals, -} from "https://deno.land/std@0.211.0/assert/mod.ts"; -import { - assertSnapshot, -} from "https://deno.land/std@0.211.0/testing/snapshot.ts"; -import { assertType } from "https://deno.land/std@0.211.0/testing/types.ts"; +import { assertEquals, assertStrictEquals } from "@std/assert"; +import { assertSnapshot } from "@std/testing/snapshot"; +import { assertType } from "@std/testing/types"; import { type Equal, stringify } from "./_testutil.ts"; import type { Predicate, PredicateType } from "./is.ts"; import { diff --git a/scripts/build_npm.ts b/scripts/build_npm.ts index e75b1dd..b5b682b 100644 --- a/scripts/build_npm.ts +++ b/scripts/build_npm.ts @@ -1,4 +1,4 @@ -import { build, emptyDir } from "https://deno.land/x/dnt@0.39.0/mod.ts"; +import { build, emptyDir } from "@deno/dnt"; const name = "unknownutil"; const version = Deno.args[0]; diff --git a/util_test.ts b/util_test.ts index 8ba5de6..8087ff9 100644 --- a/util_test.ts +++ b/util_test.ts @@ -1,7 +1,4 @@ -import { - assertStrictEquals, - assertThrows, -} from "https://deno.land/std@0.211.0/assert/mod.ts"; +import { assertStrictEquals, assertThrows } from "@std/assert"; import { assert, AssertError,