From d2427b8c10945cd4ed6d73c06e795dbb85113808 Mon Sep 17 00:00:00 2001 From: Luffy Date: Fri, 21 Aug 2026 16:26:23 +0800 Subject: [PATCH] fix: update postinstall script and add install.mjs for Husky setup --- .husky/install.mjs | 6 ++++++ SECURITY.md | 23 ----------------------- package.json | 4 ++-- 3 files changed, 8 insertions(+), 25 deletions(-) create mode 100644 .husky/install.mjs delete mode 100644 SECURITY.md diff --git a/.husky/install.mjs b/.husky/install.mjs new file mode 100644 index 0000000000..5a33bee71d --- /dev/null +++ b/.husky/install.mjs @@ -0,0 +1,6 @@ +// Skip Husky install in production and CI +if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') { + process.exit(0); +} +const husky = (await import('husky')).default; +console.log(husky()); diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index f57d273a08..0000000000 --- a/SECURITY.md +++ /dev/null @@ -1,23 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in docsify, please report it to us asap. - -## Reporting a Vulnerability - -**Please do not report security vulnerabilities through our public GitHub issues.** - -Send email to us via :email: maintainers@docsifyjs.org. - -Please include as much of the following information as possible to help us better understand the possible issue: - -- Type of issue (e.g. cross-site scripting) -- Full paths of source file(s) related to the manifestation of the issue -- The location of the affected source code (tag/branch/commit or direct URL) -- Any special configuration required to reproduce the issue -- Step-by-step instructions to reproduce the issue -- Proof-of-concept or exploit code -- Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -Thank you in advance. diff --git a/package.json b/package.json index ee1eb75203..6e6c1a8ec7 100644 --- a/package.json +++ b/package.json @@ -115,8 +115,8 @@ "docker:test": "npm run docker:cli -- test", "lint:fix": "prettier . --write && eslint . --fix", "lint": "prettier . --check && eslint .", - "postinstall": "opencollective-postinstall && npx husky install", - "prepare": "npm run build", + "postinstall": "opencollective-postinstall", + "prepare": "npm run build && node .husky/install.mjs", "prettier": "prettier . --write", "pub:next": "cross-env RELEASE_TAG=next sh build/release.sh", "pub": "sh build/release.sh",