Skip to content

Commit 8dca2b5

Browse files
mcollinaclaude
andcommitted
Merge main branch and fix constructor null handling
Resolves merge conflicts by integrating the enhanced constructor.prototype checking from main branch with safe null handling for issue #141. Changes: - Added null checks before accessing constructor.prototype - Enhanced test coverage for constructor null scenarios - Maintains compatibility with new main branch structure Fixes #141 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Matteo Collina <[email protected]>
2 parents 6c406dc + 8164ace commit 8dca2b5

23 files changed

+745
-133
lines changed

.dependabot/config.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set default behavior to automatically convert line endings
2+
* text=auto eol=lf

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
open-pull-requests-limit: 10
8+
9+
- package-ecosystem: "npm"
10+
directory: "/"
11+
schedule:
12+
interval: "monthly"
13+
open-pull-requests-limit: 10

.github/workflows/ci.yml

Lines changed: 139 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,148 @@
1-
name: CI workflow
2-
on: [push, pull_request]
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- next
8+
- 'v*'
9+
paths-ignore:
10+
- 'docs/**'
11+
- '*.md'
12+
pull_request:
13+
paths-ignore:
14+
- 'docs/**'
15+
- '*.md'
16+
17+
permissions:
18+
contents: read
19+
320
jobs:
21+
dependency-review:
22+
name: Dependency Review
23+
if: github.event_name == 'pull_request'
24+
runs-on: ubuntu-latest
25+
permissions:
26+
contents: read
27+
steps:
28+
- name: Check out repo
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
with:
31+
persist-credentials: false
32+
33+
- name: Dependency review
34+
uses: actions/dependency-review-action@ce3cf9537a52e8119d91fd484ab5b8a807627bf8 # v4.6.0
35+
36+
lint:
37+
name: Lint Code
38+
runs-on: ubuntu-latest
39+
permissions:
40+
contents: read
41+
steps:
42+
- name: Check out repo
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44+
with:
45+
persist-credentials: false
46+
47+
- name: Setup Node
48+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
49+
with:
50+
check-latest: true
51+
node-version: lts/*
52+
53+
- name: Install dependencies
54+
run: npm i --ignore-scripts
55+
56+
- name: Lint code
57+
run: npm run lint
58+
459
browsers:
60+
name: Test Browsers
561
runs-on: ubuntu-latest
62+
permissions:
63+
contents: read
664
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/setup-node@v1
9-
- name: Install Dependencies
10-
run: npm install
11-
- name: Test
12-
run: npm run test-in-browsers
65+
- name: Check out repo
66+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
67+
with:
68+
persist-credentials: false
69+
70+
- name: Setup Node
71+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
72+
with:
73+
check-latest: true
74+
node-version: lts/*
75+
76+
- name: Install dependencies
77+
run: npm i
78+
79+
- name: Install Playwright
80+
run: npx playwright install
81+
82+
- name: Run tests
83+
run: npm run test:browser
84+
1385
test:
86+
name: Test
1487
runs-on: ubuntu-latest
88+
permissions:
89+
contents: read
1590
strategy:
1691
matrix:
17-
node-version: [6.x, 8.x, 10.x, 11.x, 12.x, 13.x, 14.x, 15.x]
92+
node-version: [20, 22, 24]
93+
steps:
94+
- name: Check out repo
95+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
96+
with:
97+
persist-credentials: false
98+
99+
- name: Setup Node ${{ matrix.node-version }}
100+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
101+
with:
102+
check-latest: true
103+
node-version: ${{ matrix.node-version }}
104+
105+
- name: Install dependencies
106+
run: npm i --ignore-scripts
107+
108+
- name: Run tests
109+
run: npm run test:unit
110+
111+
typescript:
112+
name: Test TypeScript
113+
runs-on: ubuntu-latest
114+
permissions:
115+
contents: read
116+
steps:
117+
- name: Check out repo
118+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
119+
with:
120+
persist-credentials: false
121+
122+
- name: Setup Node
123+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
124+
with:
125+
check-latest: true
126+
node-version: lts/*
127+
128+
- name: Install dependencies
129+
run: npm i --ignore-scripts
130+
131+
- name: tsd
132+
run: npm run test:typescript
133+
134+
automerge:
135+
name: Automerge Dependabot PRs
136+
if: >
137+
github.event_name == 'pull_request' &&
138+
github.event.pull_request.user.login == 'dependabot[bot]'
139+
needs: [browsers, lint, test, typescript]
140+
permissions:
141+
pull-requests: write
142+
contents: write
143+
runs-on: ubuntu-latest
18144
steps:
19-
- uses: actions/checkout@v2
20-
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v1
22-
with:
23-
node-version: ${{ matrix.node-version }}
24-
- name: Install Dependencies
25-
run: npm install --ignore-scripts
26-
- name: Test
27-
run: npm run test
145+
- uses: fastify/github-action-merge-dependabot@e820d631adb1d8ab16c3b93e5afe713450884a4a # v3.11.1
146+
with:
147+
github-token: ${{ secrets.GITHUB_TOKEN }}
148+
target: major

.gitignore

Lines changed: 151 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,155 @@
1-
**/node_modules
2-
**/package-lock.json
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
39

4-
/.nyc_output
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
512

6-
**/.DS_Store
7-
**/._*
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
818

9-
**/*.pem
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
1085

11-
**/.vs
12-
**/.vscode
13-
**/.idea
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*
131+
132+
# Vim swap files
133+
*.swp
134+
135+
# macOS files
136+
.DS_Store
137+
138+
# Clinic
139+
.clinic
140+
141+
# lock files
142+
bun.lockb
143+
package-lock.json
144+
pnpm-lock.yaml
145+
yarn.lock
146+
147+
# editor files
148+
.vscode
149+
.idea
150+
151+
#tap files
152+
.tap/
153+
154+
**/._*
155+
**/*.pem

.npmignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

LICENSE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Copyright (c) 2019 The Fastify Team
2+
Copyright (c) 2019, Sideway Inc, and project contributors
3+
All rights reserved.
4+
5+
The complete list of contributors can be found at:
6+
- https://github.com/hapijs/bourne/graphs/contributors
7+
- https://github.com/fastify/secure-json-parse/graphs/contributors
8+
9+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
10+
11+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
12+
13+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
14+
15+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

LICENSE.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)