diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index e5b3495..c657571 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -19,7 +19,7 @@ jobs: - uses: oven-sh/setup-bun@v2 - uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '25' - uses: wgtechlabs/package-build-flow-action@v2.0.1 with: npm-token: ${{ secrets.NPM_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1794234..ef96a5e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,7 @@ Thanks for your interest in contributing to **GitHub Labels Template**! Here's h ## Prerequisites +- [Node.js](https://nodejs.org) (v25+) - [Bun](https://bun.sh) (v1.0+) - [GitHub CLI](https://cli.github.com) (`gh`) installed and authenticated @@ -19,7 +20,8 @@ bun install ```bash # Run the CLI locally -bun src/index.ts apply --help +bun run build +node dist/index.js apply --help # Build for production bun run build diff --git a/README.md b/README.md index 9139f86..a0415f1 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ A CLI tool to apply a curated set of GitHub labels to any repository using `gh` - 📊 **Clear Output**: Structured logging powered by [@wgtechlabs/log-engine](https://github.com/wgtechlabs/log-engine) with color-coded levels and emoji - 🎨 **ASCII Banner**: Beautiful ANSI Shadow figlet banner with version and author info - 🤖 **AI Label Generator**: Generate custom labels using GitHub Copilot — interactive pick, refine, and apply -- 🌐 **Dual Runtime**: Works with both `npx` and `bunx` +- 🌐 **Node Runtime + Bun Toolchain**: Runs on Node.js, built and tested with Bun ## Quick Start @@ -29,8 +29,8 @@ A CLI tool to apply a curated set of GitHub labels to any repository using `gh` # Using npx npx github-labels-template apply -# Using bunx -bunx github-labels-template apply +# Using npm exec +npm exec github-labels-template apply ``` That's it. All 23 labels are applied to the current repo. @@ -326,6 +326,8 @@ OPTIONS (preview) This project uses the [Bun test framework](https://bun.sh/docs/cli/test) for testing. +Runtime execution uses Node.js (latest recommended). + ```bash # Run all tests bun test diff --git a/bun.lock b/bun.lock index 545a84d..6286f02 100644 --- a/bun.lock +++ b/bun.lock @@ -15,6 +15,7 @@ "devDependencies": { "@types/bun": "latest", "@types/figlet": "^1.7.0", + "@types/node": "^25.7.0", }, }, }, @@ -71,7 +72,7 @@ "@types/figlet": ["@types/figlet@1.7.0", "", {}, "sha512-KwrT7p/8Eo3Op/HBSIwGXOsTZKYiM9NpWRBJ5sVjWP/SmlS+oxxRvJht/FNAtliJvja44N3ul1yATgohnVBV0Q=="], - "@types/node": ["@types/node@25.3.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A=="], + "@types/node": ["@types/node@25.7.0", "", { "dependencies": { "undici-types": "~7.21.0" } }, "sha512-z+pdZyxE+RTQE9AcboAZCb4otwcrvgHD+GlBpPgn0emDVt0ohrTMhAwlr2Wd9nZ+nihhYFxO2pThz3C5qSu2Eg=="], "@wgtechlabs/log-engine": ["@wgtechlabs/log-engine@2.3.1", "", {}, "sha512-qYwGef4KjcWpFvfC/e6uum/Q2ICTJbaXBZf+qCDmho1rNZ/umqyeDH3Cvk86e2Jy5TkDFPA+rOcTkmrM1rGKkw=="], @@ -105,10 +106,14 @@ "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], - "undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="], + "undici-types": ["undici-types@7.21.0", "", {}, "sha512-w9IMgQrz4O0YN1LtB7K5P63vhlIOvC7opSmouCJ+ZywlPAlO9gIkJ+otk6LvGpAs2wg4econaCz3TvQ9xPoyuQ=="], "vscode-jsonrpc": ["vscode-jsonrpc@8.2.1", "", {}, "sha512-kdjOSJ2lLIn7r1rtrMbbNCHjyMPfRnowdKjBQ+mGq6NAW5QY2bEZC/khaC5OR8svbbjvLEaIXkOq45e2X9BIbQ=="], "zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="], + + "bun-types/@types/node": ["@types/node@25.3.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A=="], + + "bun-types/@types/node/undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="], } } diff --git a/package.json b/package.json index 2fca49e..9e0bd57 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,13 @@ ], "scripts": { "build": "bun build src/index.ts --outfile dist/index.js --target node --packages external", - "dev": "bun src/index.ts", - "preview": "bun src/index.ts preview", + "dev": "bun run build && node dist/index.js", + "preview": "bun run build && node dist/index.js preview", + "start": "bun run build && node dist/index.js", "test": "bun test" }, "engines": { - "node": ">=18", + "node": ">=25", "bun": ">=1.0" }, "keywords": [ @@ -41,6 +42,7 @@ "picocolors": "^1.1.1" }, "devDependencies": { + "@types/node": "^25.7.0", "@types/bun": "latest", "@types/figlet": "^1.7.0" } diff --git a/tsconfig.json b/tsconfig.json index fbdfaa7..93f3505 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "target": "ESNext", "module": "ESNext", "moduleResolution": "bundler", - "types": ["bun-types"], + "types": ["node", "bun-types"], "resolveJsonModule": true, "strict": true, "skipLibCheck": true,