From a58145019f7a9bf43a57f65f216117acb88e763e Mon Sep 17 00:00:00 2001 From: Zefir Kirilov Date: Mon, 30 Mar 2026 12:29:38 +0300 Subject: [PATCH 1/2] added some missing types explicitly --- src/Subnet.ts | 4 ++-- src/SubnetList.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Subnet.ts b/src/Subnet.ts index 5b9527d..526caa4 100644 --- a/src/Subnet.ts +++ b/src/Subnet.ts @@ -1,5 +1,5 @@ /*! - * Copyright © 2024–2025 Cloudnode OÜ. + * Copyright © 2024–2026 Cloudnode OÜ. * * This file is part of @cldn/ip. * @@ -25,7 +25,7 @@ export class Subnet implements Network { /** * Subnet for IPv4-mapped IPv6 addresses (`::ffff:0.0.0.0/96`). */ - public static readonly IPV4_MAPPED_IPV6 = Subnet.fromCIDR( + public static readonly IPV4_MAPPED_IPV6: Subnet = Subnet.fromCIDR( "::ffff:0.0.0.0/96", ); diff --git a/src/SubnetList.ts b/src/SubnetList.ts index 9b94e33..5407627 100644 --- a/src/SubnetList.ts +++ b/src/SubnetList.ts @@ -1,5 +1,5 @@ /*! - * Copyright © 2024–2025 Cloudnode OÜ. + * Copyright © 2024–2026 Cloudnode OÜ. * * This file is part of @cldn/ip. * @@ -23,7 +23,7 @@ export class SubnetList implements Network { /** * A network of reserved subnets. This network does not contain publicly routable IP addresses. */ - public static readonly BOGON = new SubnetList([ + public static readonly BOGON: SubnetList = new SubnetList([ // IPv4 Subnet.fromCIDR("0.0.0.0/8"), Subnet.fromCIDR("10.0.0.0/8"), @@ -133,7 +133,7 @@ export class SubnetList implements Network { * @param subnet Subnet to remove. * @returns Whether the subnet was found and removed. */ - public remove(subnet: Subnet) { + public remove(subnet: Subnet): boolean { for (const [index, s] of this.#subnets.entries()) { if (s.equals(subnet)) { this.#subnets.splice(index, 1); From fded539ffd253202c37f7a40ab9fc92eeb2b9913 Mon Sep 17 00:00:00 2001 From: Zefir Kirilov Date: Mon, 30 Mar 2026 12:32:55 +0300 Subject: [PATCH 2/2] Added CI workflow steps for JSR publishing --- .github/workflows/ci.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4c4e36..ba5f223 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,6 +126,21 @@ jobs: - name: Install dependencies run: npm ci + - name: Set version from release tag + run: npm version ${{ github.event.release.tag_name }} --git-tag-version=false + + - name: Generate jsr.json from package.json + run: | + jq '{ + name: .name, + version: .version, + license: .license, + exports: "src/index.ts" + }' package.json > jsr.json + + - name: Publish to JSR + run: npx jsr publish + - name: Download build artifact uses: actions/download-artifact@v8 with: @@ -136,9 +151,6 @@ jobs: working-directory: ./package run: tar -xzf cldn-ip-0.0.0-dev.tgz - - name: Set version from release tag - run: npm version ${{ github.event.release.tag_name }} --git-tag-version=false - - name: Copy package.json to build package run: cp package.json package/package