Skip to content

Commit 409e7c3

Browse files
committed
fix: resolve TypeErrors, security issues, and add CI
- Fix cleandns-inc#16: handle non-iterable entities with toArray() utility - Fix cleandns-inc#12: add Array.isArray() check before vcardArray[1].find() - Fix cleandns-inc#13: replace console.warn with debug module - Fix findTimestamps anti-pattern using proper loop with break - Fix ReDoS vulnerability by escaping regex in registrar name matching - Fix null pointer in ip.ts port43.match() access - Add null safety to findInObject recursive function - Add domain input validation - Add comprehensive test suite (43 tests) - Add GitHub Actions workflow for CI on Node 18/20/22 - Add test script to package.json
1 parent 4aaa2f4 commit 409e7c3

File tree

11 files changed

+1724
-82
lines changed

11 files changed

+1724
-82
lines changed

.github/workflows/test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18, 20, 22]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v4
22+
with:
23+
version: 9
24+
25+
- name: Setup Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: pnpm
30+
31+
- name: Install dependencies
32+
run: pnpm install
33+
34+
- name: Build
35+
run: pnpm run build
36+
37+
- name: Run tests
38+
run: pnpm test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dist/
22
node_modules/
33
.vscode
4+
.DS_Store

0 commit comments

Comments
 (0)