Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- run: pnpm format:check
- run: pnpm lint
- run: pnpm typecheck
- run: pnpm test
- run: pnpm test:coverage
- run: pnpm build

e2e:
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"lint": "eslint",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui",
"db:push": "drizzle-kit push",
Expand Down Expand Up @@ -50,6 +51,7 @@
"@types/node": "^26",
"@types/react": "^19",
"@types/react-dom": "^19",
"@vitest/coverage-v8": "^4.1.9",
"drizzle-kit": "^0.31.10",
"eslint": "^9",
"eslint-config-next": "16.2.9",
Expand Down
98 changes: 96 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
allowBuilds:
core-js: false
core-js: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Does the current core-jspackage execute a lifecycle or postinstall script during installation, and is enabling pnpm build scripts forcore-jsnormally required when adding Vitest coverage with@vitest/coverage-v8?

💡 Result:

Yes, the core-js package executes a postinstall script [1][2]. This script, located in the package as postinstall.js, is primarily used to display a message to users about the project [1][3][4]. Regarding your second question, enabling pnpm build scripts for core-js is not normally required specifically for adding Vitest coverage with @vitest/coverage-v8. Vitest with the @vitest/coverage-v8 provider performs code coverage collection at runtime by instructing the V8 engine, which does not require your dependencies to undergo custom build or instrumentation steps during the installation process [5]. While pnpm may restrict package lifecycle scripts (such as postinstall) by default for security, this restriction is independent of the functional requirements of Vitest coverage [2][6]. If your environment or pnpm configuration blocks the core-js postinstall script, you may need to explicitly approve it to ensure the package is installed as intended, but this is a package management configuration, not a requirement for enabling Vitest coverage itself [2][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== pnpm-workspace.yaml ==\n'
cat -n pnpm-workspace.yaml

printf '\n== core-js mentions in repo ==\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/.git/**' '\bcore-js\b' .

printf '\n== package.json files mentioning vitest or coverage-v8 ==\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/.git/**' '"`@vitest/coverage-v8`"|vitest|coverage-v8' --glob 'package.json' .

printf '\n== package.json files mentioning core-js ==\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/.git/**' '"core-js"' --glob 'package.json' .

Repository: DataDave-Dev/weftmap

Length of output: 851


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import pathlib, re, json
p = pathlib.Path('pnpm-workspace.yaml')
print(p.read_text())
PY

Repository: DataDave-Dev/weftmap

Length of output: 242


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== pnpm-workspace.yaml ==\n'
cat -n pnpm-workspace.yaml

printf '\n== core-js mentions in repo ==\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/.git/**' '\bcore-js\b' .

printf '\n== package.json files mentioning vitest or coverage-v8 ==\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/.git/**' '"`@vitest/coverage-v8`"|vitest|coverage-v8' --glob 'package.json' .

printf '\n== package.json files mentioning core-js ==\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/.git/**' '"core-js"' --glob 'package.json' .

Repository: DataDave-Dev/weftmap

Length of output: 851


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import pathlib
print(pathlib.Path('pnpm-workspace.yaml').read_text())
PY

Repository: DataDave-Dev/weftmap

Length of output: 242


Keep core-js off the build-script allowlist unless there’s a separate install failure to justify it. @vitest/coverage-v8 doesn’t need lifecycle scripts, and core-js’s postinstall is unrelated to coverage. pnpm-workspace.yaml:2

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm-workspace.yaml` at line 2, The build-script allowlist currently includes
core-js unnecessarily; remove core-js from the allowlist in the workspace config
so only packages with a justified install failure are kept. Update the pnpm
workspace allowlist entry directly, and leave `@vitest/coverage-v8` out since it
does not need lifecycle scripts and core-js postinstall is unrelated.

esbuild: true
sharp: false
unrs-resolver: false
6 changes: 6 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ export default defineConfig({
test: {
environment: "node",
include: ["src/**/*.test.ts"],
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
include: ["src/**/*"],
exclude: ["src/**/*.test.ts", "src/types/**/*"],
},
},
resolve: {
alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) },
Expand Down