test: add CI-backed verification suite and harden create flow

- add Vitest, coverage, CLI, package, and mutation test commands
- add GitHub Actions verify, mutation, and audit workflows
- document testing policy and contributor commands
- replace curl template download with streamed retryable axios helper
- improve background install exit-code handling and tracker error reasons
This commit is contained in:
junchi.zhang
2026-06-22 18:03:41 +08:00
parent f474ce7175
commit ce345f46e4
46 changed files with 9013 additions and 230 deletions
+21 -3
View File
@@ -8,7 +8,15 @@
"main": "dist/index.js",
"scripts": {
"build": "node build.js",
"dev": "NODE_ENV=development node build.js",
"dev": "node build.js",
"lint": "eslint --ext .ts,.mjs bin test tests vitest.config.ts vitest.mutation.config.ts",
"typecheck": "tsc --noEmit --project tsconfig.test.json",
"test": "vitest run test/unit test/integration test/login-tracking-source.test.mjs tests",
"test:coverage": "vitest run --coverage test/unit test/integration test/login-tracking-source.test.mjs tests",
"test:cli": "npm run build && vitest run test/cli",
"test:pack": "npm run build && vitest run test/pack",
"test:mutation": "stryker run",
"verify": "npm run lint && npm run typecheck && npm run test && npm run test:coverage && npm run build && npm run test:cli && npm run test:pack",
"prepublishOnly": "npm run build"
},
"bin": {
@@ -17,7 +25,6 @@
"files": [
"dist"
],
"keywords": [
"ipfs",
"cli",
@@ -49,7 +56,12 @@
"@rollup/plugin-commonjs": "22.0.2",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "14.1.0",
"@stryker-mutator/core": "^7.3.0",
"@stryker-mutator/vitest-runner": "^7.3.0",
"@types/adm-zip": "^0.5.8",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitest/coverage-v8": "^0.34.6",
"dotenv": "16.5.0",
"esbuild": "0.25.2",
"eslint": "8.33.0",
@@ -57,10 +69,16 @@
"eslint-config-prettier": "8.6.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-prettier": "4.2.1",
"execa": "^7.2.0",
"fast-check": "^3.23.2",
"nock": "^13.5.6",
"prettier": "2.8.3",
"rollup": "2.79.2",
"rollup-plugin-copy": "3.5.0",
"rollup-plugin-terser": "7.0.2"
"rollup-plugin-terser": "7.0.2",
"tmp-promise": "^3.0.3",
"typescript": "^5.4.5",
"vitest": "^0.34.6"
},
"engines": {
"node": ">= 16.13.0"