@publint/pack
Advanced tools
+3
-3
| { | ||
| "name": "@publint/pack", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "description": "Utilities for packing and unpacking npm packages", | ||
@@ -35,4 +35,4 @@ "type": "module", | ||
| "devDependencies": { | ||
| "fs-fixture": "^2.6.0", | ||
| "vitest": "^3.0.0-beta.4" | ||
| "fs-fixture": "^2.7.1", | ||
| "vitest": "^3.0.6" | ||
| }, | ||
@@ -39,0 +39,0 @@ "scripts": { |
+6
-2
@@ -5,7 +5,11 @@ # @publint/pack | ||
| - npm (v8, v9, v10) | ||
| <!-- The list below should sync with the docs at /docs/index.md --> | ||
| - npm (v9, v10, v11) | ||
| - yarn (v3, v4) | ||
| - pnpm (v8, v9) | ||
| - pnpm (v8, v9, v10) | ||
| - bun | ||
| Older versions of these package managers may still work, but they're not officially tested. Yarn 1 is also explicitly not supported. | ||
| ## API | ||
@@ -12,0 +16,0 @@ |
+9
-3
@@ -57,5 +57,11 @@ import cp from 'node:child_process' | ||
| if (!tarballFile) { | ||
| throw new Error( | ||
| `Failed to find packed tarball file in ${packDestination}. Command output:\n${JSON.stringify(output, null, 2)}`, | ||
| ) | ||
| if (output.stdout.startsWith('yarn pack v1')) { | ||
| throw new Error( | ||
| `Yarn 1 is not supported to pack files. Command output:\n${JSON.stringify(output, null, 2)}`, | ||
| ) | ||
| } else { | ||
| throw new Error( | ||
| `Failed to find packed tarball file in ${packDestination}. Command output:\n${JSON.stringify(output, null, 2)}`, | ||
| ) | ||
| } | ||
| } | ||
@@ -62,0 +68,0 @@ |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
19832
2.12%429
1.42%92
4.55%4
-20%