From 8dc4a5e7627090b101f6fd32573a9a6b2f44a8dc Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Mon, 20 Apr 2026 01:17:22 -0700 Subject: [PATCH 1/5] ci: separage coverage file, push to main --- .github/workflows/ci.yml | 6 ------ .github/workflows/coverage.yml | 14 ++++++++++++++ README.md | 14 ++++++++++---- 3 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c1fbee..c86c910 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,12 +13,6 @@ jobs: permissions: contents: read - coverage: - uses: NicTool/.github/.github/workflows/coverage.yml@main - secrets: inherit - permissions: - contents: read - test: uses: NicTool/.github/.github/workflows/test.yml@main secrets: inherit diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..3bb2ed5 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,14 @@ +name: Coverage + +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: [main] + +jobs: + coverage: + uses: NicTool/.github/.github/workflows/coverage.yml@main + secrets: inherit + permissions: + contents: read diff --git a/README.md b/README.md index 8578bfb..cd7fd3d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![Module Tests](https://github.com/NicTool/dns-zone/actions/workflows/ci.yml/badge.svg)](https://github.com/NicTool/dns-zone/actions/workflows/ci.yml) -[![Coverage Status](https://coveralls.io/repos/github/NicTool/dns-zone/badge.svg?branch=main)](https://coveralls.io/github/NicTool/dns-zone?branch=main) +[![Tests][test-img]][test-uri] +[![Coverage][cov-img]][cov-uri] # dns-zone @@ -122,7 +122,7 @@ const rrs = await tinydns.parseData(dataText) const rrs = await maradns.parseZoneFile(csv2Text, { origin: 'example.com.' }) ``` -Each RR is a [`@nictool/dns-resource-record`](https://github.com/NicTool/dns-resource-record) instance; use `rr.toBind()`, `rr.toTinydns()`, `rr.toMaraDNS()` to emit in other formats. +Each RR is a [`@nictool/dns-resource-record`][dns-rr] instance; use `rr.toBind()`, `rr.toTinydns()`, `rr.toMaraDNS()` to emit in other formats. Zone-level validation: @@ -148,9 +148,15 @@ Violations are collected on `zone.errors` and also printed by the CLI (with `-v` ## RELATED PACKAGES -- [`@nictool/dns-resource-record`](https://github.com/NicTool/dns-resource-record) — record-level parsing, validation, and format conversion +- [`@nictool/dns-resource-record`][dns-rr] — record-level parsing, validation, and format conversion - [`@nictool/dns-nameserver`](https://github.com/NicTool/dns-nameserver) — nameserver config parsers (BIND, Knot, MaraDNS, NSD, tinydns) ## LICENSE BSD-3-Clause — see [LICENSE](LICENSE). + +[dns-rr]: https://github.com/NicTool/dns-resource-record +[test-img]: https://github.com/NicTool/dns-zone/actions/workflows/ci.yml/badge.svg +[test-uri]: https://github.com/NicTool/dns-zone/actions/workflows/ci.yml +[cov-img]: https://coveralls.io/repos/github/NicTool/dns-zone/badge.svg +[cov-uri]: https://coveralls.io/github/NicTool/dns-zone From b4baa8eb42ad9d2824621f2eca46365aed88b244 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Mon, 20 Apr 2026 01:17:31 -0700 Subject: [PATCH 2/5] doc(CHANGELOG): add commit messages for 1.2.2 --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4da20b3..d64ca77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ### Unreleased +### [1.2.2] - 2026-04-20 + +#### Changed + +- separage coverage file, push to main + + ### [1.2.1] - 2026-04-20 - fix(package.json): syntax @@ -227,3 +234,4 @@ [1.1.8]: https://github.com/NicTool/dns-zone/releases/tag/v1.1.8 [1.2.0]: https://github.com/NicTool/dns-zone/releases/tag/v1.2.0 [1.2.1]: https://github.com/NicTool/dns-zone/releases/tag/v1.2.1 +[1.2.2]: https://github.com/NicTool/dns-zone/releases/tag/v1.2.2 diff --git a/package.json b/package.json index 2089b11..ac1c150 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nictool/dns-zone", - "version": "1.2.1", + "version": "1.2.2", "description": "DNS Zone", "main": "index.js", "type": "module", From 8b75d6d2ef3661cc1b07669fe1e9bda4e879ede1 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Mon, 20 Apr 2026 01:17:33 -0700 Subject: [PATCH 3/5] doc(CONTRIBUTORS): updated --- CONTRIBUTORS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index fba4d2d..8d1ccec 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -2,8 +2,8 @@ This handcrafted artisanal software is brought to you by: -|
msimerson (30) | -| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +|
msimerson (31)| +| :---: | this file is generated by [.release](https://github.com/msimerson/.release). Contribute to this project to get your GitHub profile included here. From 30353003addfddc5f14e8ab2095527aa52d16c5e Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Mon, 20 Apr 2026 01:35:47 -0700 Subject: [PATCH 4/5] bind: constrain regex to limit backtracking --- CHANGELOG.md | 6 ++---- lib/bind.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d64ca77..6c044f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,8 @@ ### [1.2.2] - 2026-04-20 -#### Changed - -- separage coverage file, push to main - +- bind: constrain regex to limit backtracking +- ci: separage coverage file, push to main ### [1.2.1] - 2026-04-20 diff --git a/lib/bind.js b/lib/bind.js index fe658c7..39960b3 100644 --- a/lib/bind.js +++ b/lib/bind.js @@ -20,7 +20,7 @@ const rrTypes = Object.entries(RR) .join('|') const re = { - directive: /^\$(\w+)\s+([^\s;]+)/, + directive: /^\$(\w{1,16})\s+([^\s;]{1,256})/, ttl: '([0-9]+)', classes: '(IN|CS|CH|HS|NONE|ANY)', } From c6dec57bb42bb6280ac446c7e7345c78f6c4a80b Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Mon, 20 Apr 2026 01:36:00 -0700 Subject: [PATCH 5/5] chore: format --- CONTRIBUTORS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 8d1ccec..e0450b8 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -2,8 +2,8 @@ This handcrafted artisanal software is brought to you by: -|
msimerson (31)| -| :---: | +|
msimerson (31) | +| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | this file is generated by [.release](https://github.com/msimerson/.release). Contribute to this project to get your GitHub profile included here.