-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Run Knip in external projects | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
|
||
jobs: | ||
integration: | ||
name: integration | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: oven-sh/setup-bun@v1 | ||
- run: git apply bun-compat.diff | ||
- run: bun install | ||
- run: bun run build | ||
- run: bun link | ||
|
||
- name: Test Knip against create-typescript-app | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: JoshuaKGoldberg/create-typescript-app | ||
path: create-typescript-app | ||
- run: bun install | ||
- run: bun link knip | ||
- run: bun knip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
diff --git a/package.json b/package.json | ||
index bba0020..4077490 100644 | ||
--- a/package.json | ||
+++ b/package.json | ||
@@ -44,6 +44,7 @@ | ||
"dependencies": { | ||
"@ericcornelissen/bash-parser": "^0.5.2", | ||
"@npmcli/map-workspaces": "^3.0.4", | ||
+ "@pkgjs/parseargs": "0.11.0", | ||
"@snyk/github-codeowners": "^1.1.0", | ||
"chalk": "^5.2.0", | ||
"easy-table": "^1.2.0", | ||
@@ -72,6 +73,7 @@ | ||
"@types/minimist": "1.2.3", | ||
"@types/node": "20.8.3", | ||
"@types/npmcli__map-workspaces": "3.0.2", | ||
+ "@types/pkgjs__parseargs": "0.10.1", | ||
"@types/webpack": "5.28.3", | ||
"@typescript-eslint/eslint-plugin": "6.7.4", | ||
"@typescript-eslint/parser": "6.7.4", | ||
diff --git a/scripts/create-new-plugin.ts b/scripts/create-new-plugin.ts | ||
index 84ddd28..5e56a5e 100644 | ||
--- a/scripts/create-new-plugin.ts | ||
+++ b/scripts/create-new-plugin.ts | ||
@@ -1,6 +1,6 @@ | ||
import fs from 'node:fs/promises'; | ||
import path from 'node:path'; | ||
-import { parseArgs } from 'node:util'; | ||
+import { parseArgs } from '@pkgjs/parseargs'; | ||
|
||
const { | ||
values: { name }, | ||
diff --git a/src/util/cli-arguments.ts b/src/util/cli-arguments.ts | ||
index 48be9e8..77c1b01 100644 | ||
--- a/src/util/cli-arguments.ts | ||
+++ b/src/util/cli-arguments.ts | ||
@@ -1,4 +1,4 @@ | ||
-import { parseArgs } from 'node:util'; | ||
+import { parseArgs } from '@pkgjs/parseargs'; | ||
|
||
export const helpText = `✂️ Find unused files, dependencies and exports in your JavaScript and TypeScript projects | ||
|