From 90bf02d07ec3664221e492a5fb72cf5a72dbf55f Mon Sep 17 00:00:00 2001 From: oviirup <49820575+oviirup@users.noreply.github.com> Date: Sun, 13 Sep 2026 22:37:50 +0530 Subject: [PATCH 1/4] =?UTF-8?q?=E2=86=A9=EF=B8=8F=20revert=20back=20to=20u?= =?UTF-8?q?sing=20standalone=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yaml | 9 ++++++--- .github/workflows/publish.yaml | 32 ++++++++++++++++++++++++-------- .nvmrc | 1 + 3 files changed, 31 insertions(+), 11 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 74f6f34..ea9dbc1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,19 +9,22 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: oviirup/actions/bun@v1 + - uses: oven-sh/setup-bun@v2 + - run: bun install --frozen-lockfile - run: bun run typecheck lint: name: ๐Ÿงช lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: oviirup/actions/bun@v1 + - uses: oven-sh/setup-bun@v2 + - run: bun install --frozen-lockfile - run: bun run lint test: name: ๐Ÿงช test runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: oviirup/actions/bun@v1 + - uses: oven-sh/setup-bun@v2 + - run: bun install --frozen-lockfile - run: bun run test diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 0063366..dc97b4f 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -19,7 +19,9 @@ jobs: - name: ๐Ÿ”ท Checkout uses: actions/checkout@v7 - name: ๐ŸŸข Setup bun - uses: oviirup/actions/bun@v1 + uses: oven-sh/setup-bun@v2 + - name: ๐Ÿ“ฆ Install dependencies + run: bun install --frozen-lockfile - name: ๐Ÿ”ง Select changesets mode id: changesets-mode uses: changesets/action/select-mode@v2 @@ -35,7 +37,9 @@ jobs: - name: ๐Ÿ”ท Checkout uses: actions/checkout@v7 - name: ๐ŸŸข Setup bun - uses: oviirup/actions/bun@v1 + uses: oven-sh/setup-bun@v2 + - name: ๐Ÿ“ฆ Install dependencies + run: bun install --frozen-lockfile - name: ๐Ÿท๏ธ Update version id: version uses: changesets/action/version@v2 @@ -58,9 +62,16 @@ jobs: - name: ๐Ÿ”ท Checkout uses: actions/checkout@v7 - name: ๐ŸŸข Setup bun - uses: oviirup/actions/bun@v1 - - name: ๐Ÿ“ฆ Build - run: bun run build + uses: oven-sh/setup-bun@v2 + - name: ๐ŸŸก Setup node + uses: actions/setup-node@v5 + with: + node-version: 24 + package-manager-cache: false + - name: ๐Ÿ“ฆ Install dependencies & build + run: | + bun install --frozen-lockfile + bun run build - name: ๐Ÿ“ฆ Pack artifacts id: pack uses: changesets/action/pack@v2 @@ -76,12 +87,17 @@ jobs: - name: ๐Ÿ”ท Checkout uses: actions/checkout@v7 - name: ๐ŸŸข Setup bun - uses: oviirup/actions/bun@v1 + uses: oven-sh/setup-bun@v2 + - name: ๐ŸŸก Setup node + uses: actions/setup-node@v5 with: node-version: 24 registry-url: https://registry.npmjs.org/ - - name: ๐Ÿ“ฆ Build - run: bun run build + package-manager-cache: false + - name: ๐Ÿ“ฆ Install dependencies & build + run: | + bun install --frozen-lockfile + bun run build - name: โš™๏ธ Publish packages id: publish uses: changesets/action/publish@v2 diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..18c92ea --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v24 \ No newline at end of file From ffce2e1fc9467b3954c65fec35e5e2ae49332958 Mon Sep 17 00:00:00 2001 From: oviirup <49820575+oviirup@users.noreply.github.com> Date: Sun, 13 Sep 2026 22:39:51 +0530 Subject: [PATCH 2/4] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20using=20relative=20pat?= =?UTF-8?q?hs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/number.ts | 4 ++-- src/promise.ts | 2 +- src/string.ts | 2 +- tests/array.test.ts | 2 +- tests/assertions.test.ts | 2 +- tests/nanoid.test.ts | 2 +- tests/number.test.ts | 2 +- tests/promise.test.ts | 2 +- tests/string.test.ts | 2 +- tsconfig.json | 1 - 10 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/number.ts b/src/number.ts index ad95eee..00e6ee8 100644 --- a/src/number.ts +++ b/src/number.ts @@ -1,5 +1,5 @@ -import { isNumber, isObject } from "@/assertions"; -import { AbbreviateOptions, AbbreviationSymbols, Dictionary } from "@/types"; +import { isNumber, isObject } from "./assertions"; +import { AbbreviateOptions, AbbreviationSymbols, Dictionary } from "./types"; /** * Checks if a number is within a range diff --git a/src/promise.ts b/src/promise.ts index 610282b..b214816 100644 --- a/src/promise.ts +++ b/src/promise.ts @@ -1,5 +1,5 @@ -import { Awaitable } from "@/types"; import { isNumber } from "./assertions"; +import { Awaitable } from "./types"; /** * Delays execution for a specified number of milliseconds diff --git a/src/string.ts b/src/string.ts index ec3f0a7..1d353ae 100644 --- a/src/string.ts +++ b/src/string.ts @@ -1,4 +1,4 @@ -import { isEmpty } from "@/assertions"; +import { isEmpty } from "./assertions"; /** * Replace backslash to slash diff --git a/tests/array.test.ts b/tests/array.test.ts index 94aac8b..eb7b59b 100644 --- a/tests/array.test.ts +++ b/tests/array.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, test } from "bun:test"; -import * as array from "@/array"; +import * as array from "../src/array"; describe("array", () => { // biome-ignore format: off diff --git a/tests/assertions.test.ts b/tests/assertions.test.ts index 4eb8eb2..62fd3f8 100644 --- a/tests/assertions.test.ts +++ b/tests/assertions.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, test } from "bun:test"; -import * as ast from "@/assertions"; +import * as ast from "../src/assertions"; describe("assertions", () => { describe("isNumber", () => { diff --git a/tests/nanoid.test.ts b/tests/nanoid.test.ts index 1d0abcb..45d2005 100644 --- a/tests/nanoid.test.ts +++ b/tests/nanoid.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "bun:test"; -import { charset, nanoid } from "@/nanoid"; +import { charset, nanoid } from "../src/nanoid"; describe("nanoid", () => { it("should be ready for 0 size", () => { diff --git a/tests/number.test.ts b/tests/number.test.ts index 450e5fa..0fc0b26 100644 --- a/tests/number.test.ts +++ b/tests/number.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "bun:test"; -import { AbbreviationSymbols, abbreviate } from "@/number"; +import { AbbreviationSymbols, abbreviate } from "../src/number"; describe("abbreviate", () => { it.each([ diff --git a/tests/promise.test.ts b/tests/promise.test.ts index 25c39a5..4ff1b4e 100644 --- a/tests/promise.test.ts +++ b/tests/promise.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "bun:test"; -import { retry, sleep, tryCatch } from "@/promise"; +import { retry, sleep, tryCatch } from "../src/promise"; describe("promise", () => { describe("sleep", () => { diff --git a/tests/string.test.ts b/tests/string.test.ts index 534293d..d7af370 100644 --- a/tests/string.test.ts +++ b/tests/string.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "bun:test"; -import * as string from "@/string"; +import * as string from "../src/string"; describe("string", () => { describe("truncate", () => { diff --git a/tsconfig.json b/tsconfig.json index e69d7dc..51c9819 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,6 @@ "moduleDetection": "force", "moduleResolution": "bundler", "noEmit": true, - "paths": { "@/*": ["./src/*"] }, "resolveJsonModule": true, "skipLibCheck": true, "strict": true, From 8dd5cb065797fabffa50d79438af0f78e36c7b40 Mon Sep 17 00:00:00 2001 From: oviirup <49820575+oviirup@users.noreply.github.com> Date: Sun, 13 Sep 2026 22:43:52 +0530 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=9A=9A=20rename=20`assertions`=20to?= =?UTF-8?q?=20`guards`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- src/array.ts | 2 +- src/{assertions.ts => guards.ts} | 0 src/index.ts | 2 +- src/number.ts | 2 +- src/object.ts | 2 +- src/promise.ts | 2 +- src/string.ts | 2 +- tests/assertions.test.ts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) rename src/{assertions.ts => guards.ts} (100%) diff --git a/README.md b/README.md index 3b9cf41..1922d63 100644 --- a/README.md +++ b/README.md @@ -50,9 +50,9 @@ string.toKebabCase("Hello World"); ## API -### Assertions +### Guards -Runtime type checks and a predicate helper. Available from `@oviirup/utils` and `@oviirup/utils/assertions`. +Runtime type checks and a predicate helper. Available from `@oviirup/utils` and `@oviirup/utils/guards`. - **`isDefined`** - Non-null and non-undefined - **`isString`**, **`isNumber`**, **`isInteger`**, **`isFloat`** - Primitive number and string checks diff --git a/src/array.ts b/src/array.ts index a56513f..302fd25 100644 --- a/src/array.ts +++ b/src/array.ts @@ -1,4 +1,4 @@ -import { isEmptyArray, isInteger, isTruthy } from "./assertions"; +import { isEmptyArray, isInteger, isTruthy } from "./guards"; import { Truthy } from "./types"; /** diff --git a/src/assertions.ts b/src/guards.ts similarity index 100% rename from src/assertions.ts rename to src/guards.ts diff --git a/src/index.ts b/src/index.ts index 8f576dd..82b1742 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ export * as array from "./array"; -export * from "./assertions"; +export * from "./guards"; export * from "./nanoid"; export * as number from "./number"; export * as object from "./object"; diff --git a/src/number.ts b/src/number.ts index 00e6ee8..cbfbb29 100644 --- a/src/number.ts +++ b/src/number.ts @@ -1,4 +1,4 @@ -import { isNumber, isObject } from "./assertions"; +import { isNumber, isObject } from "./guards"; import { AbbreviateOptions, AbbreviationSymbols, Dictionary } from "./types"; /** diff --git a/src/object.ts b/src/object.ts index f7173b7..c83012d 100644 --- a/src/object.ts +++ b/src/object.ts @@ -1,5 +1,5 @@ import { toArray } from "./array"; -import { isObject } from "./assertions"; +import { isObject } from "./guards"; import { Dictionary } from "./types"; /** diff --git a/src/promise.ts b/src/promise.ts index b214816..a0601da 100644 --- a/src/promise.ts +++ b/src/promise.ts @@ -1,4 +1,4 @@ -import { isNumber } from "./assertions"; +import { isNumber } from "./guards"; import { Awaitable } from "./types"; /** diff --git a/src/string.ts b/src/string.ts index 1d353ae..570d379 100644 --- a/src/string.ts +++ b/src/string.ts @@ -1,4 +1,4 @@ -import { isEmpty } from "./assertions"; +import { isEmpty } from "./guards"; /** * Replace backslash to slash diff --git a/tests/assertions.test.ts b/tests/assertions.test.ts index 62fd3f8..b977904 100644 --- a/tests/assertions.test.ts +++ b/tests/assertions.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, test } from "bun:test"; -import * as ast from "../src/assertions"; +import * as ast from "../src/guards"; describe("assertions", () => { describe("isNumber", () => { From bd4ba246d69e1dbcbdd478162be7dc7be328486c Mon Sep 17 00:00:00 2001 From: oviirup <49820575+oviirup@users.noreply.github.com> Date: Sun, 13 Sep 2026 22:46:21 +0530 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=94=A7=20added=20changesets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/perky-dragons-scream.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/perky-dragons-scream.md diff --git a/.changeset/perky-dragons-scream.md b/.changeset/perky-dragons-scream.md new file mode 100644 index 0000000..bc1635e --- /dev/null +++ b/.changeset/perky-dragons-scream.md @@ -0,0 +1,5 @@ +--- +"@oviirup/utils": minor +--- + +๐Ÿšš rename `assertions` to `guards`