Skip to content

Commit

Permalink
Add integration workflow w/ Bun
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Oct 8, 2023
1 parent a617a5c commit e00b5b9
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/integration.yml
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
42 changes: 42 additions & 0 deletions bun-compat.diff
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

0 comments on commit e00b5b9

Please sign in to comment.