Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: codeql tweakup #1121

Merged
merged 3 commits into from
Mar 7, 2025
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
11 changes: 11 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
paths:
- .github
- docs
- examples
- man
- src
- scripts
- test
- test-d
paths-ignore:
- build
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
config-file: ./.github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ package/
reports/
docs/.vitepress/cache/
yarn.lock
pnpm-lock.yaml
temp
2 changes: 1 addition & 1 deletion .size-limit.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
"name": "all",
"path": "build/*",
"limit": "851 kB",
"limit": "851.1 kB",
"brotli": false,
"gzip": false
}
Expand Down
6 changes: 3 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ async function runScript(
scriptPath: string,
tempPath: string
): Promise<void> {
let nm = ''
let nmLink = ''
const rmTemp = () => {
fs.rmSync(tempPath, { force: true, recursive: true })
nm && fs.rmSync(nm, { force: true, recursive: true })
nmLink && fs.rmSync(nmLink, { force: true, recursive: true })
}
try {
if (tempPath) {
Expand All @@ -140,7 +140,7 @@ async function runScript(
}
const cwd = path.dirname(scriptPath)
if (typeof argv.preferLocal === 'string') {
nm = linkNodeModules(cwd, argv.preferLocal)
nmLink = linkNodeModules(cwd, argv.preferLocal)
}
if (argv.install) {
await installDeps(parseDeps(script), cwd, argv.registry)
Expand Down
2 changes: 1 addition & 1 deletion src/vendor-extra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ global.AbortController = global.AbortController || AbortController

export const createRequire = _createRequire as unknown as (
filename: string | URL
) => NodeRequire
) => NodeJS.Require

export const globbyModule = {
convertPathToPattern,
Expand Down