[READ-ONLY] Mirror of https://github.com/bombshell-dev/tools. Internal CLI to standardize tooling across all Bombshell projects
0

Configure Feed

Select the types of activity you want to include in your feed.

fix: update `runKnip` (#30)

* fix: update `runKnip`

* add tests

* update knip

* add changeset

authored by

Roman and committed by
GitHub
(Apr 29, 2026, 7:02 PM +0100) 747c1895 df7cae5d

+265 -144
+6
.changeset/large-actors-remain.md
··· 1 + --- 2 + "@bomb.sh/tools": patch 3 + --- 4 + 5 + - Fixes `runKnip` to correctly handle reported violations 6 + - Updates `knip` dependency to `6.9.0`
+10
knip.jsonc
··· 1 + { 2 + "$schema": "./node_modules/knip/schema-jsonc.json", 3 + "entry": [ 4 + "src/index.ts", 5 + "src/test-utils/*.ts" 6 + ], 7 + "ignoreDependencies": [ 8 + "@tanstack/intent" 9 + ] 10 + }
+1 -1
package.json
··· 64 64 "@humanfs/node": "^0.16.7", 65 65 "@humanfs/types": "^0.15.0", 66 66 "@typescript/native-preview": "7.0.0-dev.20260427.1", 67 - "knip": "^6.7.0", 67 + "knip": "^6.9.0", 68 68 "oxfmt": "^0.47.0", 69 69 "oxlint": "^1.62.0", 70 70 "publint": "^0.3.18",
+98 -117
pnpm-lock.yaml
··· 21 21 specifier: 7.0.0-dev.20260427.1 22 22 version: 7.0.0-dev.20260427.1 23 23 knip: 24 - specifier: ^6.7.0 25 - version: 6.7.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) 24 + specifier: ^6.9.0 25 + version: 6.9.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) 26 26 oxfmt: 27 27 specifier: ^0.47.0 28 28 version: 0.47.0 ··· 143 143 '@emnapi/core@1.10.0': 144 144 resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} 145 145 146 - '@emnapi/core@1.9.2': 147 - resolution: {integrity: sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==} 148 - 149 146 '@emnapi/runtime@1.10.0': 150 147 resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} 151 - 152 - '@emnapi/runtime@1.9.2': 153 - resolution: {integrity: sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==} 154 148 155 149 '@emnapi/wasi-threads@1.2.1': 156 150 resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} ··· 373 367 resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} 374 368 engines: {node: '>= 8'} 375 369 376 - '@oxc-parser/binding-android-arm-eabi@0.127.0': 377 - resolution: {integrity: sha512-0LC7ye4hvqbIKxAzThzvswgHLFu2AURKzYLeSVvLdu2TBOYWQDmHnTqPLeA597BcUCxiLqLsS4CJ5uoI5WYWCQ==} 370 + '@oxc-parser/binding-android-arm-eabi@0.128.0': 371 + resolution: {integrity: sha512-aca6ZvzmCBUGOANQRiRQRZuRKYI3ENhcit6GisnknOOmcezfQc7xJ4dxlPU7MV7mOvrC7RNR1u3LAD7xyaiCxA==} 378 372 engines: {node: ^20.19.0 || >=22.12.0} 379 373 cpu: [arm] 380 374 os: [android] 381 375 382 - '@oxc-parser/binding-android-arm64@0.127.0': 383 - resolution: {integrity: sha512-b5jtVTH6AU5CJXHNdj7Jj9IEiR9yVjjnwHzPJhGyHGPdcsZSzBCkS9GBbV33niRMvKthDwQRFRJfI4a+k4PvYg==} 376 + '@oxc-parser/binding-android-arm64@0.128.0': 377 + resolution: {integrity: sha512-BbeDmuohoJ7Rz/it5wnkj69i/OsCPS3Z51nLEzwO/Y6YshtC4JU+15oNwhY8v4LRKRYclRc7ggOikwrsJ/eOEQ==} 384 378 engines: {node: ^20.19.0 || >=22.12.0} 385 379 cpu: [arm64] 386 380 os: [android] 387 381 388 - '@oxc-parser/binding-darwin-arm64@0.127.0': 389 - resolution: {integrity: sha512-obCE8B7ISKkJidjlhv9xRGJPOSDG2Yu6PRga9Ruaz35uintHxbp1Ki/Yc71wx4rj3Edrm0a1kzG1TAwit0wFpg==} 382 + '@oxc-parser/binding-darwin-arm64@0.128.0': 383 + resolution: {integrity: sha512-tRUHPt80417QmvNpoSslJT1VY8NUbWdrWR+L14Zn+RbOTcaqB8E6PYE/ZGN8jjWBzqporiA/H4MfO50ew/NCNA==} 390 384 engines: {node: ^20.19.0 || >=22.12.0} 391 385 cpu: [arm64] 392 386 os: [darwin] 393 387 394 - '@oxc-parser/binding-darwin-x64@0.127.0': 395 - resolution: {integrity: sha512-JL6Xb5IwPQT8rUzlpsX7E+AgfcdNklXNPFp8pjCQQ5MQOQo5rtEB2ui+3Hgg9Sn7Y9Egj6YOLLiHhLpdAe12Aw==} 388 + '@oxc-parser/binding-darwin-x64@0.128.0': 389 + resolution: {integrity: sha512-rWI2Hb1Nt3U/vKsjyNvZzDC8i/l144U20DKjhzaTmwIhIiSRGeroPWWiImwypmKLqrw8GuIixbWJkpGWLbkzrQ==} 396 390 engines: {node: ^20.19.0 || >=22.12.0} 397 391 cpu: [x64] 398 392 os: [darwin] 399 393 400 - '@oxc-parser/binding-freebsd-x64@0.127.0': 401 - resolution: {integrity: sha512-SDQ/3MQFw58fqQz3Z1PhSKFF3JoCF4gmlNjziDm8X02tTahCw0qJbd7FGPDKw1i4VTBZene9JPyC3mHtSvi+wA==} 394 + '@oxc-parser/binding-freebsd-x64@0.128.0': 395 + resolution: {integrity: sha512-hhpdVMaNCLgQxjgNPeeFzSeJMmZPc5lKfv0NGSI3egZq9EdnEGqeC8JsYsQjK7PoQgbvZ17xlj0SO5ziH5Obkg==} 402 396 engines: {node: ^20.19.0 || >=22.12.0} 403 397 cpu: [x64] 404 398 os: [freebsd] 405 399 406 - '@oxc-parser/binding-linux-arm-gnueabihf@0.127.0': 407 - resolution: {integrity: sha512-Av+D1MIqzV0YMGPT9we2SIZaMKD7Cxs4CvXSx/yxaWHewZjYEjScpOf5igc8IILASViw4WTnjlwUdI1KzVtDHQ==} 400 + '@oxc-parser/binding-linux-arm-gnueabihf@0.128.0': 401 + resolution: {integrity: sha512-093zNw0zZ/e/obML+rhlSdmnzR0mVZluPcAkxunEc5E3F0yBVsFn24Y1ILfsEte11Ud041qn/gp2OJ1jxNqUng==} 408 402 engines: {node: ^20.19.0 || >=22.12.0} 409 403 cpu: [arm] 410 404 os: [linux] 411 405 412 - '@oxc-parser/binding-linux-arm-musleabihf@0.127.0': 413 - resolution: {integrity: sha512-Cs2fdJ8cPpFdeebj6p4dag8A4+56hPvZ0AhQQzlaLswGz1tz7bXt1nETLeorrM9+AMcWFFkqxcXwDGfTVidY8g==} 406 + '@oxc-parser/binding-linux-arm-musleabihf@0.128.0': 407 + resolution: {integrity: sha512-fq7DmKmfC+dvD97IXrgbph6Jzwe0EDu+PYMofmzZ6fv5X1k9vtaqLpDGMuICO9MmUnyKAQmVl+wIv2RNy4Dz8g==} 414 408 engines: {node: ^20.19.0 || >=22.12.0} 415 409 cpu: [arm] 416 410 os: [linux] 417 411 418 - '@oxc-parser/binding-linux-arm64-gnu@0.127.0': 419 - resolution: {integrity: sha512-qdOfTcT6SY8gsJrrV92uyEUyjqMGPpIB5JZUG6QN5dukYd+7/j0kX6MwK1DgQj39jtUYixxPiaRUiEN1+0CXgQ==} 412 + '@oxc-parser/binding-linux-arm64-gnu@0.128.0': 413 + resolution: {integrity: sha512-Xvm48jJah8TlIrURIjNOP/gNiGe6aKvCB+r06VliflFo8Kq7VOLE8PxtgShJzZIqubrgdMdYfvuPPozn7F6MbQ==} 420 414 engines: {node: ^20.19.0 || >=22.12.0} 421 415 cpu: [arm64] 422 416 os: [linux] 423 417 424 - '@oxc-parser/binding-linux-arm64-musl@0.127.0': 425 - resolution: {integrity: sha512-EoTCZneNFU/P2qrpEM+RHmQwt+CvDkyGESG6qhr7KaegXLZwePfbrkCDfAk8/rhxbDUVGsZILX+2tqPzFtoFWA==} 418 + '@oxc-parser/binding-linux-arm64-musl@0.128.0': 419 + resolution: {integrity: sha512-M7iwBGmYJTx+pKOYFjI0buop4gJvlmcVzFGaXPt21DKpQkbQZG1f63Yg7LloIYT/t9yLxCw0Lhfx/RFlAlMSjA==} 426 420 engines: {node: ^20.19.0 || >=22.12.0} 427 421 cpu: [arm64] 428 422 os: [linux] 429 423 430 - '@oxc-parser/binding-linux-ppc64-gnu@0.127.0': 431 - resolution: {integrity: sha512-zALjmZYgxFLHjXeudcDF0xFGNydTAtkAeXAr2EuC17ywCyFxcmQra4w0BMde0Yi/re4Bi4iwEoEXtYN7l6eBLQ==} 424 + '@oxc-parser/binding-linux-ppc64-gnu@0.128.0': 425 + resolution: {integrity: sha512-21LGNIZb1Pcfk5/EGsqabrxv4yqQOWis1407JJrClS7XpFCrbvr74YAB1V+m54cYbwvO6UWwQqS4WecxiyfCRg==} 432 426 engines: {node: ^20.19.0 || >=22.12.0} 433 427 cpu: [ppc64] 434 428 os: [linux] 435 429 436 - '@oxc-parser/binding-linux-riscv64-gnu@0.127.0': 437 - resolution: {integrity: sha512-fPP8M6zQLS7Jz7o9d5ArUSuAuSK3e+WCYVrCpdzeCOejidtZExJ9tjhDrAd3HEPqARBCPmdpqxESPFqy44vkBQ==} 430 + '@oxc-parser/binding-linux-riscv64-gnu@0.128.0': 431 + resolution: {integrity: sha512-gyHjOTFpg9bTTYjxPmQirvufb89+VdZwVfcMtAUyPr6F5H8ZswvCQshK4qOW+Q+2Xyb33hduRgY/eFHJQjU/vQ==} 438 432 engines: {node: ^20.19.0 || >=22.12.0} 439 433 cpu: [riscv64] 440 434 os: [linux] 441 435 442 - '@oxc-parser/binding-linux-riscv64-musl@0.127.0': 443 - resolution: {integrity: sha512-7IcC4Ao02oGpfnjt+X/oF4U2mllo2qoSkw5xxiXNKL9MCTsTiAC6616beOuehdxGcnz1bRoPC1RQ2f1GQDdN+g==} 436 + '@oxc-parser/binding-linux-riscv64-musl@0.128.0': 437 + resolution: {integrity: sha512-X6Q2oKUrP5GyDd2xniuEBLk6aFQCZ97W2+aVXGgJXdjx5t4/oFuA9ri0wLOUrBIX+qdSuK581snMBio4z910eA==} 444 438 engines: {node: ^20.19.0 || >=22.12.0} 445 439 cpu: [riscv64] 446 440 os: [linux] 447 441 448 - '@oxc-parser/binding-linux-s390x-gnu@0.127.0': 449 - resolution: {integrity: sha512-pbXIhiNFHoqWeqDNLiJ9JkpHz1IM9k4DXa66x+1GTWMG7iLxtkXgE53iiuKSXwmk3zIYmaPVfBvgcAhS583K4Q==} 442 + '@oxc-parser/binding-linux-s390x-gnu@0.128.0': 443 + resolution: {integrity: sha512-BdzTmqxfxoYkpgokoLaSnOX6T+R3/goL42klre2tnG+kHbG2TXS0VN+P5BPofH1axdKOHy5ei4ENZrjmCOt2lA==} 450 444 engines: {node: ^20.19.0 || >=22.12.0} 451 445 cpu: [s390x] 452 446 os: [linux] 453 447 454 - '@oxc-parser/binding-linux-x64-gnu@0.127.0': 455 - resolution: {integrity: sha512-MYCguB9RvBvlSd6gbuNI7QwiLoCCAlGnlRJFPrzLI6U1/9wkC/WK6LtBAUln55H1Ctqw45PWmqrobKoMhsYQzQ==} 448 + '@oxc-parser/binding-linux-x64-gnu@0.128.0': 449 + resolution: {integrity: sha512-OO1nW2Q7sSYYvJZpDHdvyFSdRaVcQqRijZSSmWVMqFxPYy8cEF45zJ9fcdIYuzIT3jYq6YRhEFm/VMWNWhE22Q==} 456 450 engines: {node: ^20.19.0 || >=22.12.0} 457 451 cpu: [x64] 458 452 os: [linux] 459 453 460 - '@oxc-parser/binding-linux-x64-musl@0.127.0': 461 - resolution: {integrity: sha512-5eY0B/bxf1xIUxb4NOTvOI3KWtBQfPWYyKAzgcrCt0mDibSZygVpO1Pz8bkeiSZ5Jj9+M09dkggG3H8I5d0Uyg==} 454 + '@oxc-parser/binding-linux-x64-musl@0.128.0': 455 + resolution: {integrity: sha512-4NehAe404MRdoZVS9DW8C5XbJwbXIc/KfVlYdpi5vE4081zc9Y0YzKVqyOYj/Puye7/Do+ohaONBFWlEHYl9hw==} 462 456 engines: {node: ^20.19.0 || >=22.12.0} 463 457 cpu: [x64] 464 458 os: [linux] 465 459 466 - '@oxc-parser/binding-openharmony-arm64@0.127.0': 467 - resolution: {integrity: sha512-Gld0ajrFTUXNtdw20fVBuTQx66FA75nIVg+//pPfR3sXkuABB4mTBhl3r9JNzrJpgW//qiwxf0nWXUWGJSL3UQ==} 460 + '@oxc-parser/binding-openharmony-arm64@0.128.0': 461 + resolution: {integrity: sha512-kVbqgW9xLL8bh8oc7aYOJilRKXE5G33+tE0jan+duo/9OriaFRpijcCwT2waWs2oqYROYq0GlE7/p3ywoshVeg==} 468 462 engines: {node: ^20.19.0 || >=22.12.0} 469 463 cpu: [arm64] 470 464 os: [openharmony] 471 465 472 - '@oxc-parser/binding-wasm32-wasi@0.127.0': 473 - resolution: {integrity: sha512-T6KVD7rhLzFlwGRXMnxUFfkCZD8FHnb968wVXW1mXzgRFc5RNXOBY2mPPDZ77x5Ln76ltLMgtPg0cOkU1NSrEQ==} 466 + '@oxc-parser/binding-wasm32-wasi@0.128.0': 467 + resolution: {integrity: sha512-L38ojghJYHmgiz6fJd7jwLB/ESDBpB02NdFxh+smqVM6P2anCEvHn0jhaSrt5eVNR1Ak8+moOeftUlofeyvniA==} 474 468 engines: {node: ^20.19.0 || >=22.12.0} 475 469 cpu: [wasm32] 476 470 477 - '@oxc-parser/binding-win32-arm64-msvc@0.127.0': 478 - resolution: {integrity: sha512-Ujvw4X+LD1CCGULcsQcvb4YNVoBGqt+JHgNNzGGaCImELiZLk477ifUH53gIbE7EKd933NdTi25JWEr9K2HwXw==} 471 + '@oxc-parser/binding-win32-arm64-msvc@0.128.0': 472 + resolution: {integrity: sha512-xgvO35GyHBtjlQ5AEpaYr7Rll1rvY7zqIhT6ty8E3ezBW2J1SFLjIDEvI/tcgDg6oaseDAqVcM+jU1HuCekgZw==} 479 473 engines: {node: ^20.19.0 || >=22.12.0} 480 474 cpu: [arm64] 481 475 os: [win32] 482 476 483 - '@oxc-parser/binding-win32-ia32-msvc@0.127.0': 484 - resolution: {integrity: sha512-0cwxKO7KHQQQfo4Uf4B2SQrhgm+cJaP9OvFFhx52Tkg4bezsacu83GB2/In5bC415Ueeym+kXdnge/57rbSfTw==} 477 + '@oxc-parser/binding-win32-ia32-msvc@0.128.0': 478 + resolution: {integrity: sha512-OY+3eM2SN72prHKRB22mPz8o5A/7dJ+f5DFLBVvggyZhEaNDAH9IB+ElMjmOkOIwf5MDCUAowCK7pAncNxzpBA==} 485 479 engines: {node: ^20.19.0 || >=22.12.0} 486 480 cpu: [ia32] 487 481 os: [win32] 488 482 489 - '@oxc-parser/binding-win32-x64-msvc@0.127.0': 490 - resolution: {integrity: sha512-rOrnSQSCbhI2kowr9XxE7m9a8oQXnBHjnS6j95LxxAnEZ0+Fz20WlRXG4ondQb+ejjt2KOsa65sE6++L6kUd+w==} 483 + '@oxc-parser/binding-win32-x64-msvc@0.128.0': 484 + resolution: {integrity: sha512-NE9ny+cPUCCObXa0IKLfj0tCdPd7pe/dz9ZpkxpUOymB3miNeMPybdlYYTBSGJUalMWeBM85/4JcCErCNTqOXw==} 491 485 engines: {node: ^20.19.0 || >=22.12.0} 492 486 cpu: [x64] 493 487 os: [win32] 494 488 495 489 '@oxc-project/types@0.127.0': 496 490 resolution: {integrity: sha512-aIYXQBo4lCbO4z0R3FHeucQHpF46l2LbMdxRvqvuRuW2OxdnSkcng5B8+K12spgLDj93rtN3+J2Vac/TIO+ciQ==} 491 + 492 + '@oxc-project/types@0.128.0': 493 + resolution: {integrity: sha512-huv1Y/LzBJkBVHt3OlC7u0zHBW9qXf1FdD7sGmc1rXc2P1mTwHssYv7jyGx5KAACSCH+9B3Bhn6Z9luHRvf7pQ==} 497 494 498 495 '@oxc-resolver/binding-android-arm-eabi@11.19.1': 499 496 resolution: {integrity: sha512-aUs47y+xyXHUKlbhqHUjBABjvycq6YSD7bpxSW7vplUmdzAlJ93yXY6ZR0c1o1x5A/QKbENCvs3+NlY8IpIVzg==} ··· 1386 1383 jsonfile@4.0.0: 1387 1384 resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} 1388 1385 1389 - knip@6.7.0: 1390 - resolution: {integrity: sha512-ckL51NDH1YJxnv1kNB0iUdDngB4f/e9Igz8uIqYfmNDoyOFmmk1V0WFv3LQ7/hzC63b2Z9X41gGUE9eOWrZpaA==} 1386 + knip@6.9.0: 1387 + resolution: {integrity: sha512-2GLjxteBwmsSA3Z5sJZpPDaNPBIMnlm4/9Nx4CZadEK7YccJZ2/4kwKgPWhVYEqxhwhD0WO4txWXNGTO/Odkkg==} 1391 1388 engines: {node: ^20.19.0 || >=22.12.0} 1392 1389 hasBin: true 1393 1390 ··· 1427 1424 outdent@0.5.0: 1428 1425 resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} 1429 1426 1430 - oxc-parser@0.127.0: 1431 - resolution: {integrity: sha512-bkgD4qHlN7WxLdX8bLXdaU54TtQtAIg/ZBAfm0aje/mo3MRDo3P0hZSgr4U7O3xfX+fQmR5AP04JS/TGcZLcFA==} 1427 + oxc-parser@0.128.0: 1428 + resolution: {integrity: sha512-XkOw3eiIxAgQ19WRew/Bq9wc5Ga/guaWIzDBzq80z1PyuDNGvWBpPby9k6YGwV8A8uMw+Nlq3xqlzuDYmUFYUw==} 1432 1429 engines: {node: ^20.19.0 || >=22.12.0} 1433 1430 1434 1431 oxc-resolver@11.19.1: ··· 2008 2005 tslib: 2.8.1 2009 2006 optional: true 2010 2007 2011 - '@emnapi/core@1.9.2': 2012 - dependencies: 2013 - '@emnapi/wasi-threads': 1.2.1 2014 - tslib: 2.8.1 2015 - optional: true 2016 - 2017 2008 '@emnapi/runtime@1.10.0': 2018 2009 dependencies: 2019 2010 tslib: 2.8.1 2020 2011 optional: true 2021 2012 2022 - '@emnapi/runtime@1.9.2': 2023 - dependencies: 2024 - tslib: 2.8.1 2025 - optional: true 2026 - 2027 2013 '@emnapi/wasi-threads@1.2.1': 2028 2014 dependencies: 2029 2015 tslib: 2.8.1 ··· 2162 2148 '@tybys/wasm-util': 0.10.1 2163 2149 optional: true 2164 2150 2165 - '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.9.2)(@emnapi/runtime@1.9.2)': 2166 - dependencies: 2167 - '@emnapi/core': 1.9.2 2168 - '@emnapi/runtime': 1.9.2 2169 - '@tybys/wasm-util': 0.10.1 2170 - optional: true 2171 - 2172 2151 '@nodelib/fs.scandir@2.1.5': 2173 2152 dependencies: 2174 2153 '@nodelib/fs.stat': 2.0.5 ··· 2181 2160 '@nodelib/fs.scandir': 2.1.5 2182 2161 fastq: 1.20.1 2183 2162 2184 - '@oxc-parser/binding-android-arm-eabi@0.127.0': 2163 + '@oxc-parser/binding-android-arm-eabi@0.128.0': 2185 2164 optional: true 2186 2165 2187 - '@oxc-parser/binding-android-arm64@0.127.0': 2166 + '@oxc-parser/binding-android-arm64@0.128.0': 2188 2167 optional: true 2189 2168 2190 - '@oxc-parser/binding-darwin-arm64@0.127.0': 2169 + '@oxc-parser/binding-darwin-arm64@0.128.0': 2191 2170 optional: true 2192 2171 2193 - '@oxc-parser/binding-darwin-x64@0.127.0': 2172 + '@oxc-parser/binding-darwin-x64@0.128.0': 2194 2173 optional: true 2195 2174 2196 - '@oxc-parser/binding-freebsd-x64@0.127.0': 2175 + '@oxc-parser/binding-freebsd-x64@0.128.0': 2197 2176 optional: true 2198 2177 2199 - '@oxc-parser/binding-linux-arm-gnueabihf@0.127.0': 2178 + '@oxc-parser/binding-linux-arm-gnueabihf@0.128.0': 2200 2179 optional: true 2201 2180 2202 - '@oxc-parser/binding-linux-arm-musleabihf@0.127.0': 2181 + '@oxc-parser/binding-linux-arm-musleabihf@0.128.0': 2203 2182 optional: true 2204 2183 2205 - '@oxc-parser/binding-linux-arm64-gnu@0.127.0': 2184 + '@oxc-parser/binding-linux-arm64-gnu@0.128.0': 2206 2185 optional: true 2207 2186 2208 - '@oxc-parser/binding-linux-arm64-musl@0.127.0': 2187 + '@oxc-parser/binding-linux-arm64-musl@0.128.0': 2209 2188 optional: true 2210 2189 2211 - '@oxc-parser/binding-linux-ppc64-gnu@0.127.0': 2190 + '@oxc-parser/binding-linux-ppc64-gnu@0.128.0': 2212 2191 optional: true 2213 2192 2214 - '@oxc-parser/binding-linux-riscv64-gnu@0.127.0': 2193 + '@oxc-parser/binding-linux-riscv64-gnu@0.128.0': 2215 2194 optional: true 2216 2195 2217 - '@oxc-parser/binding-linux-riscv64-musl@0.127.0': 2196 + '@oxc-parser/binding-linux-riscv64-musl@0.128.0': 2218 2197 optional: true 2219 2198 2220 - '@oxc-parser/binding-linux-s390x-gnu@0.127.0': 2199 + '@oxc-parser/binding-linux-s390x-gnu@0.128.0': 2221 2200 optional: true 2222 2201 2223 - '@oxc-parser/binding-linux-x64-gnu@0.127.0': 2202 + '@oxc-parser/binding-linux-x64-gnu@0.128.0': 2224 2203 optional: true 2225 2204 2226 - '@oxc-parser/binding-linux-x64-musl@0.127.0': 2205 + '@oxc-parser/binding-linux-x64-musl@0.128.0': 2227 2206 optional: true 2228 2207 2229 - '@oxc-parser/binding-openharmony-arm64@0.127.0': 2208 + '@oxc-parser/binding-openharmony-arm64@0.128.0': 2230 2209 optional: true 2231 2210 2232 - '@oxc-parser/binding-wasm32-wasi@0.127.0': 2211 + '@oxc-parser/binding-wasm32-wasi@0.128.0': 2233 2212 dependencies: 2234 - '@emnapi/core': 1.9.2 2235 - '@emnapi/runtime': 1.9.2 2236 - '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.9.2)(@emnapi/runtime@1.9.2) 2213 + '@emnapi/core': 1.10.0 2214 + '@emnapi/runtime': 1.10.0 2215 + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) 2237 2216 optional: true 2238 2217 2239 - '@oxc-parser/binding-win32-arm64-msvc@0.127.0': 2218 + '@oxc-parser/binding-win32-arm64-msvc@0.128.0': 2240 2219 optional: true 2241 2220 2242 - '@oxc-parser/binding-win32-ia32-msvc@0.127.0': 2221 + '@oxc-parser/binding-win32-ia32-msvc@0.128.0': 2243 2222 optional: true 2244 2223 2245 - '@oxc-parser/binding-win32-x64-msvc@0.127.0': 2224 + '@oxc-parser/binding-win32-x64-msvc@0.128.0': 2246 2225 optional: true 2247 2226 2248 2227 '@oxc-project/types@0.127.0': {} 2228 + 2229 + '@oxc-project/types@0.128.0': {} 2249 2230 2250 2231 '@oxc-resolver/binding-android-arm-eabi@11.19.1': 2251 2232 optional: true ··· 2879 2860 optionalDependencies: 2880 2861 graceful-fs: 4.2.11 2881 2862 2882 - knip@6.7.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0): 2863 + knip@6.9.0(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0): 2883 2864 dependencies: 2884 2865 fdir: 6.5.0(picomatch@4.0.4) 2885 2866 formatly: 0.3.0 2886 2867 get-tsconfig: 4.14.0 2887 2868 jiti: 2.6.1 2888 2869 minimist: 1.2.8 2889 - oxc-parser: 0.127.0 2870 + oxc-parser: 0.128.0 2890 2871 oxc-resolver: 11.19.1(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) 2891 2872 picomatch: 4.0.4 2892 2873 smol-toml: 1.6.1 ··· 2926 2907 2927 2908 outdent@0.5.0: {} 2928 2909 2929 - oxc-parser@0.127.0: 2910 + oxc-parser@0.128.0: 2930 2911 dependencies: 2931 - '@oxc-project/types': 0.127.0 2912 + '@oxc-project/types': 0.128.0 2932 2913 optionalDependencies: 2933 - '@oxc-parser/binding-android-arm-eabi': 0.127.0 2934 - '@oxc-parser/binding-android-arm64': 0.127.0 2935 - '@oxc-parser/binding-darwin-arm64': 0.127.0 2936 - '@oxc-parser/binding-darwin-x64': 0.127.0 2937 - '@oxc-parser/binding-freebsd-x64': 0.127.0 2938 - '@oxc-parser/binding-linux-arm-gnueabihf': 0.127.0 2939 - '@oxc-parser/binding-linux-arm-musleabihf': 0.127.0 2940 - '@oxc-parser/binding-linux-arm64-gnu': 0.127.0 2941 - '@oxc-parser/binding-linux-arm64-musl': 0.127.0 2942 - '@oxc-parser/binding-linux-ppc64-gnu': 0.127.0 2943 - '@oxc-parser/binding-linux-riscv64-gnu': 0.127.0 2944 - '@oxc-parser/binding-linux-riscv64-musl': 0.127.0 2945 - '@oxc-parser/binding-linux-s390x-gnu': 0.127.0 2946 - '@oxc-parser/binding-linux-x64-gnu': 0.127.0 2947 - '@oxc-parser/binding-linux-x64-musl': 0.127.0 2948 - '@oxc-parser/binding-openharmony-arm64': 0.127.0 2949 - '@oxc-parser/binding-wasm32-wasi': 0.127.0 2950 - '@oxc-parser/binding-win32-arm64-msvc': 0.127.0 2951 - '@oxc-parser/binding-win32-ia32-msvc': 0.127.0 2952 - '@oxc-parser/binding-win32-x64-msvc': 0.127.0 2914 + '@oxc-parser/binding-android-arm-eabi': 0.128.0 2915 + '@oxc-parser/binding-android-arm64': 0.128.0 2916 + '@oxc-parser/binding-darwin-arm64': 0.128.0 2917 + '@oxc-parser/binding-darwin-x64': 0.128.0 2918 + '@oxc-parser/binding-freebsd-x64': 0.128.0 2919 + '@oxc-parser/binding-linux-arm-gnueabihf': 0.128.0 2920 + '@oxc-parser/binding-linux-arm-musleabihf': 0.128.0 2921 + '@oxc-parser/binding-linux-arm64-gnu': 0.128.0 2922 + '@oxc-parser/binding-linux-arm64-musl': 0.128.0 2923 + '@oxc-parser/binding-linux-ppc64-gnu': 0.128.0 2924 + '@oxc-parser/binding-linux-riscv64-gnu': 0.128.0 2925 + '@oxc-parser/binding-linux-riscv64-musl': 0.128.0 2926 + '@oxc-parser/binding-linux-s390x-gnu': 0.128.0 2927 + '@oxc-parser/binding-linux-x64-gnu': 0.128.0 2928 + '@oxc-parser/binding-linux-x64-musl': 0.128.0 2929 + '@oxc-parser/binding-openharmony-arm64': 0.128.0 2930 + '@oxc-parser/binding-wasm32-wasi': 0.128.0 2931 + '@oxc-parser/binding-win32-arm64-msvc': 0.128.0 2932 + '@oxc-parser/binding-win32-ia32-msvc': 0.128.0 2933 + '@oxc-parser/binding-win32-x64-msvc': 0.128.0 2953 2934 2954 2935 oxc-resolver@11.19.1(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0): 2955 2936 optionalDependencies:
+47
src/commands/__snapshots__/lint.test.ts.snap
··· 1 + // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html 2 + 3 + exports[`lint command > runKnip > detects unused exports and unused files 1`] = ` 4 + [ 5 + { 6 + "code": "unused-file", 7 + "column": undefined, 8 + "file": "src/unused-file.ts", 9 + "level": "warning", 10 + "line": undefined, 11 + "message": "Unused file", 12 + "tool": "knip", 13 + }, 14 + { 15 + "code": "unused-export", 16 + "column": 20, 17 + "file": "src/used.ts", 18 + "level": "warning", 19 + "line": 3, 20 + "message": "Unused export 'unusedExport'", 21 + "tool": "knip", 22 + }, 23 + ] 24 + `; 25 + 26 + exports[`lint command > runOxlint > detects violations in bad code 1`] = ` 27 + [ 28 + { 29 + "code": "eslint(no-unused-vars)", 30 + "column": 5, 31 + "file": "src/index.ts", 32 + "level": "error", 33 + "line": 1, 34 + "message": "Variable 'x' is declared but never used. Unused variables should start with a '_'.", 35 + "tool": "oxlint", 36 + }, 37 + { 38 + "code": "eslint(no-var)", 39 + "column": 1, 40 + "file": "src/index.ts", 41 + "level": "error", 42 + "line": 1, 43 + "message": "Unexpected var, use let or const instead.", 44 + "tool": "oxlint", 45 + }, 46 + ] 47 + `;
+82
src/commands/lint.test.ts
··· 1 + import { describe, it, expect, beforeEach, afterEach } from "vitest"; 2 + import { createFixture } from "../test-utils/index.ts"; 3 + import { runOxlint, runKnip } from "./lint.ts"; 4 + import { fileURLToPath } from "node:url"; 5 + 6 + describe("lint command", () => { 7 + let originalCwd: string; 8 + let fixture: Awaited<ReturnType<typeof createFixture>>; 9 + 10 + beforeEach(() => { 11 + originalCwd = process.cwd(); 12 + }); 13 + 14 + afterEach(async () => { 15 + process.chdir(originalCwd); 16 + if (fixture) await fixture.cleanup(); 17 + }); 18 + 19 + describe("runOxlint", () => { 20 + it("detects violations in bad code", async () => { 21 + fixture = await createFixture({ 22 + src: { 23 + "index.ts": "var x = 1;", 24 + }, 25 + }); 26 + process.chdir(fileURLToPath(fixture.root)); 27 + 28 + const violations = await runOxlint(["./src"]); 29 + 30 + expect(violations).not.toEqual([]); 31 + expect(violations).toMatchSnapshot(); 32 + }); 33 + 34 + it("returns empty array for clean code", async () => { 35 + fixture = await createFixture({ 36 + src: { 37 + "index.ts": ` 38 + export const x = 1; 39 + `, 40 + }, 41 + }); 42 + process.chdir(fileURLToPath(fixture.root)); 43 + 44 + const violations = await runOxlint(["./src"]); 45 + 46 + expect(violations).toEqual([]); 47 + }); 48 + }); 49 + 50 + describe("runKnip", () => { 51 + it("detects unused exports and unused files", async () => { 52 + fixture = await createFixture({ 53 + "package.json": { 54 + name: "test-pkg", 55 + version: "1.0.0", 56 + type: "module", 57 + exports: "./src/index.ts", 58 + }, 59 + src: { 60 + "index.ts": ` 61 + import { used } from "./used"; 62 + console.log(used); 63 + export const value = 42; 64 + `, 65 + "used.ts": ` 66 + export const used = "used"; 67 + export const unusedExport = "unusedExport"; 68 + `, 69 + "unused-file.ts": ` 70 + export const unused = "unused"; 71 + `, 72 + }, 73 + }); 74 + process.chdir(fileURLToPath(fixture.root)); 75 + 76 + const violations = await runKnip(); 77 + 78 + expect(violations).not.toEqual([]); 79 + expect(violations).toMatchSnapshot(); 80 + }); 81 + }); 82 + });
+21 -26
src/commands/lint.ts
··· 2 2 import { parse } from "@bomb.sh/args"; 3 3 import { publint } from "publint"; 4 4 import { x } from "tinyexec"; 5 + import type { JSONReport as KnipJSONReport } from "knip"; 5 6 import type { CommandContext } from "../context.ts"; 6 7 import { local } from "../utils.ts"; 7 8 ··· 21 22 22 23 // -- Tool Runners -- 23 24 24 - async function runOxlint(targets: string[], fix?: boolean): Promise<Violation[]> { 25 + export async function runOxlint(targets: string[], fix?: boolean): Promise<Violation[]> { 25 26 const args = ["-c", oxlintConfig, "--format=json", ...targets]; 26 27 if (fix) args.push("--fix"); 27 28 const result = await x(local("oxlint"), args, { throwOnError: false }); ··· 58 59 })); 59 60 } 60 61 61 - interface KnipIssue { 62 - file: string; 63 - dependencies: Array<{ name: string; line: number; col: number }>; 64 - devDependencies: Array<{ name: string; line: number; col: number }>; 65 - exports: Array<{ name: string; line: number; col: number }>; 66 - types: Array<{ name: string; line: number; col: number }>; 67 - } 68 - 69 - async function runKnip(): Promise<Violation[]> { 62 + export async function runKnip(): Promise<Violation[]> { 70 63 const args = ["--no-progress", "--reporter", "json"]; 71 64 const result = await x(local("knip"), args, { throwOnError: false }); 72 65 if (!result.stdout.trim()) return []; 73 - const json = JSON.parse(result.stdout); 66 + 67 + const json: KnipJSONReport = JSON.parse(result.stdout); 74 68 const violations: Violation[] = []; 75 69 76 - for (const issue of json.issues as KnipIssue[]) { 77 - for (const dep of issue.dependencies) { 70 + for (const issue of json.issues) { 71 + for (const dep of issue.dependencies ?? []) { 78 72 violations.push({ 79 73 tool: "knip", 80 74 level: "warning", ··· 85 79 column: dep.col, 86 80 }); 87 81 } 88 - for (const dep of issue.devDependencies) { 82 + for (const dep of issue.devDependencies ?? []) { 89 83 violations.push({ 90 84 tool: "knip", 91 85 level: "warning", ··· 96 90 column: dep.col, 97 91 }); 98 92 } 99 - for (const exp of issue.exports) { 93 + for (const exp of issue.exports ?? []) { 100 94 violations.push({ 101 95 tool: "knip", 102 96 level: "warning", ··· 107 101 column: exp.col, 108 102 }); 109 103 } 110 - for (const t of issue.types) { 104 + for (const t of issue.types ?? []) { 111 105 violations.push({ 112 106 tool: "knip", 113 107 level: "warning", ··· 118 112 column: t.col, 119 113 }); 120 114 } 121 - } 122 - 123 - for (const file of json.files as string[]) { 124 - violations.push({ 125 - tool: "knip", 126 - level: "warning", 127 - code: "unused-file", 128 - message: `Unused file`, 129 - file, 130 - }); 115 + for (const file of issue.files ?? []) { 116 + violations.push({ 117 + tool: "knip", 118 + level: "warning", 119 + code: "unused-file", 120 + message: `Unused file`, 121 + file: issue.file, 122 + line: file.line, 123 + column: file.col, 124 + }); 125 + } 131 126 } 132 127 133 128 return violations;