From de01ab7e6f6314e368dc93ef5dc69be51cef31c3 Mon Sep 17 00:00:00 2001 From: Jon Major Condon Date: Mon, 3 Aug 2026 14:11:44 -0500 Subject: [PATCH 1/2] fix source map error and added tool-versions --- .tool-versions | 1 + package.json | 4 ++++ scripts/check-sourcemaps.mjs | 6 +++++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..f5fc23da --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 22.13.0 diff --git a/package.json b/package.json index 87d82c13..daecdb67 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,10 @@ "typescript": "5.9.3" }, "packageManager": "yarn@1.22.22", + "engines": { + "node": "22.13.0", + "npm": ">=10 <12" + }, "keywords": [ "NSFW", "JavaScript", diff --git a/scripts/check-sourcemaps.mjs b/scripts/check-sourcemaps.mjs index bada5750..8f0270da 100644 --- a/scripts/check-sourcemaps.mjs +++ b/scripts/check-sourcemaps.mjs @@ -17,7 +17,11 @@ const getPackedFiles = () => { ["pack", "--dry-run", "--json", "--ignore-scripts"], { encoding: "utf8" } ); - const report = JSON.parse(stdout); + const jsonStart = stdout.indexOf("["); + if (jsonStart === -1) { + throw new Error(`npm pack produced no JSON report:\n${stdout}`); + } + const report = JSON.parse(stdout.slice(jsonStart)); return report .flatMap((entry) => (entry.files ? entry.files : [entry])) .map((file) => normalize(file.path).replace(/\\/g, "/")); From 01c700c7dcd6287f1513e7594599a54cdc25fccc Mon Sep 17 00:00:00 2001 From: Jon Major Condon Date: Mon, 3 Aug 2026 14:30:35 -0500 Subject: [PATCH 2/2] add self to all contributors --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12efa0e4..30e41739 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

Client-side indecent content checking

-[![All Contributors](https://img.shields.io/badge/all_contributors-15-green.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-25-green.svg?style=flat-square)](#contributors) [![CircleCI](https://dl.circleci.com/status-badge/img/gh/infinitered/nsfwjs/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/infinitered/nsfwjs/tree/master) [![Netlify Status](https://api.netlify.com/api/v1/badges/72d19dc0-d316-4f75-9904-a33d833ff628/deploy-status)](https://app.netlify.com/sites/nsfwjs/deploys) @@ -508,6 +508,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d jan
jan

📖 Rohan Mukherjee
Rohan Mukherjee

💬 🚇 🚧 💻 Hasitha Wickramasinghe
Hasitha Wickramasinghe

💻 📖 💡 🤔 🚇 ⚠️ + Jon Major Condon
Jon Major Condon

💻 🚇