From cc4d875688493eefec495206ad617e8d4ae4a7b0 Mon Sep 17 00:00:00 2001 From: naitokosuke Date: Thu, 2 Apr 2026 00:36:36 +0900 Subject: [PATCH 1/7] refactor: remove rollup-plugin-license and implement custom license generation --- package.json | 1 - pnpm-lock.yaml | 570 +++++++++++++------------------- src/builders/plugins/license.ts | 306 +++++++++++------ test/fixture/package.json | 3 + test/fixture/src/index.ts | 3 +- test/obuild.test.ts | 19 ++ 6 files changed, 453 insertions(+), 449 deletions(-) diff --git a/package.json b/package.json index 809f5e4..5e28ee5 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "pretty-bytes": "^7.1.0", "rolldown": "^1.0.0-rc.13", "rolldown-plugin-dts": "^0.23.2", - "rollup-plugin-license": "^3.7.0", "tinyglobby": "^0.2.15" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed0ca7b..2bb258f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: dependencies: c12: specifier: ^4.0.0-beta.4 - version: 4.0.0-beta.4(chokidar@5.0.0)(dotenv@17.4.0)(giget@3.2.0)(jiti@2.6.1)(magicast@0.5.2) + version: 4.0.0-beta.4(chokidar@5.0.0)(dotenv@17.3.1)(giget@2.0.0)(jiti@2.6.1)(magicast@0.5.2) consola: specifier: ^3.4.2 version: 3.4.2 @@ -38,9 +38,6 @@ importers: rolldown-plugin-dts: specifier: ^0.23.2 version: 0.23.2(@typescript/native-preview@7.0.0-dev.20260401.1)(rolldown@1.0.0-rc.13)(typescript@6.0.2) - rollup-plugin-license: - specifier: ^3.7.0 - version: 3.7.0(picomatch@4.0.3)(rollup@4.59.0) tinyglobby: specifier: ^0.2.15 version: 0.2.15 @@ -81,6 +78,10 @@ importers: obuild: specifier: link:../.. version: link:../.. + devDependencies: + defu: + specifier: '*' + version: 6.1.4 packages: @@ -139,158 +140,158 @@ packages: '@emnapi/wasi-threads@1.2.0': resolution: {integrity: sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==} - '@esbuild/aix-ppc64@0.27.5': - resolution: {integrity: sha512-nGsF/4C7uzUj+Nj/4J+Zt0bYQ6bz33Phz8Lb2N80Mti1HjGclTJdXZ+9APC4kLvONbjxN1zfvYNd8FEcbBK/MQ==} + '@esbuild/aix-ppc64@0.27.3': + resolution: {integrity: sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.27.5': - resolution: {integrity: sha512-Oeghq+XFgh1pUGd1YKs4DDoxzxkoUkvko+T/IVKwlghKLvvjbGFB3ek8VEDBmNvqhwuL0CQS3cExdzpmUyIrgA==} + '@esbuild/android-arm64@0.27.3': + resolution: {integrity: sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.27.5': - resolution: {integrity: sha512-Cv781jd0Rfj/paoNrul1/r4G0HLvuFKYh7C9uHZ2Pl8YXstzvCyyeWENTFR9qFnRzNMCjXmsulZuvosDg10Mog==} + '@esbuild/android-arm@0.27.3': + resolution: {integrity: sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.27.5': - resolution: {integrity: sha512-nQD7lspbzerlmtNOxYMFAGmhxgzn8Z7m9jgFkh6kpkjsAhZee1w8tJW3ZlW+N9iRePz0oPUDrYrXidCPSImD0Q==} + '@esbuild/android-x64@0.27.3': + resolution: {integrity: sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.27.5': - resolution: {integrity: sha512-I+Ya/MgC6rr8oRWGRDF3BXDfP8K1BVUggHqN6VI2lUZLdDi1IM1v2cy0e3lCPbP+pVcK3Tv8cgUhHse1kaNZZw==} + '@esbuild/darwin-arm64@0.27.3': + resolution: {integrity: sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.27.5': - resolution: {integrity: sha512-MCjQUtC8wWJn/pIPM7vQaO69BFgwPD1jriEdqwTCKzWjGgkMbcg+M5HzrOhPhuYe1AJjXlHmD142KQf+jnYj8A==} + '@esbuild/darwin-x64@0.27.3': + resolution: {integrity: sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.27.5': - resolution: {integrity: sha512-X6xVS+goSH0UelYXnuf4GHLwpOdc8rgK/zai+dKzBMnncw7BTQIwquOodE7EKvY2UVUetSqyAfyZC1D+oqLQtg==} + '@esbuild/freebsd-arm64@0.27.3': + resolution: {integrity: sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.27.5': - resolution: {integrity: sha512-233X1FGo3a8x1ekLB6XT69LfZ83vqz+9z3TSEQCTYfMNY880A97nr81KbPcAMl9rmOFp11wO0dP+eB18KU/Ucg==} + '@esbuild/freebsd-x64@0.27.3': + resolution: {integrity: sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.27.5': - resolution: {integrity: sha512-euKkilsNOv7x/M1NKsx5znyprbpsRFIzTV6lWziqJch7yWYayfLtZzDxDTl+LSQDJYAjd9TVb/Kt5UKIrj2e4A==} + '@esbuild/linux-arm64@0.27.3': + resolution: {integrity: sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.27.5': - resolution: {integrity: sha512-0wkVrYHG4sdCCN/bcwQ7yYMXACkaHc3UFeaEOwSVW6e5RycMageYAFv+JS2bKLwHyeKVUvtoVH+5/RHq0fgeFw==} + '@esbuild/linux-arm@0.27.3': + resolution: {integrity: sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.27.5': - resolution: {integrity: sha512-hVRQX4+P3MS36NxOy24v/Cdsimy/5HYePw+tmPqnNN1fxV0bPrFWR6TMqwXPwoTM2VzbkA+4lbHWUKDd5ZDA/w==} + '@esbuild/linux-ia32@0.27.3': + resolution: {integrity: sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.27.5': - resolution: {integrity: sha512-mKqqRuOPALI8nDzhOBmIS0INvZOOFGGg5n1osGIXAx8oersceEbKd4t1ACNTHM3sJBXGFAlEgqM+svzjPot+ZQ==} + '@esbuild/linux-loong64@0.27.3': + resolution: {integrity: sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.27.5': - resolution: {integrity: sha512-EE/QXH9IyaAj1qeuIV5+/GZkBTipgGO782Ff7Um3vPS9cvLhJJeATy4Ggxikz2inZ46KByamMn6GqtqyVjhenA==} + '@esbuild/linux-mips64el@0.27.3': + resolution: {integrity: sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.27.5': - resolution: {integrity: sha512-0V2iF1RGxBf1b7/BjurA5jfkl7PtySjom1r6xOK2q9KWw/XCpAdtB6KNMO+9xx69yYfSCRR9FE0TyKfHA2eQMw==} + '@esbuild/linux-ppc64@0.27.3': + resolution: {integrity: sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.27.5': - resolution: {integrity: sha512-rYxThBx6G9HN6tFNuvB/vykeLi4VDsm5hE5pVwzqbAjZEARQrWu3noZSfbEnPZ/CRXP3271GyFk/49up2W190g==} + '@esbuild/linux-riscv64@0.27.3': + resolution: {integrity: sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.27.5': - resolution: {integrity: sha512-uEP2q/4qgd8goEUc4QIdU/1P2NmEtZ/zX5u3OpLlCGhJIuBIv0s0wr7TB2nBrd3/A5XIdEkkS5ZLF0ULuvaaYQ==} + '@esbuild/linux-s390x@0.27.3': + resolution: {integrity: sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.27.5': - resolution: {integrity: sha512-+Gq47Wqq6PLOOZuBzVSII2//9yyHNKZLuwfzCemqexqOQCSz0zy0O26kIzyp9EMNMK+nZ0tFHBZrCeVUuMs/ew==} + '@esbuild/linux-x64@0.27.3': + resolution: {integrity: sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.27.5': - resolution: {integrity: sha512-3F/5EG8VHfN/I+W5cO1/SV2H9Q/5r7vcHabMnBqhHK2lTWOh3F8vixNzo8lqxrlmBtZVFpW8pmITHnq54+Tq4g==} + '@esbuild/netbsd-arm64@0.27.3': + resolution: {integrity: sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.27.5': - resolution: {integrity: sha512-28t+Sj3CPN8vkMOlZotOmDgilQwVvxWZl7b8rxpn73Tt/gCnvrHxQUMng4uu3itdFvrtba/1nHejvxqz8xgEMA==} + '@esbuild/netbsd-x64@0.27.3': + resolution: {integrity: sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.27.5': - resolution: {integrity: sha512-Doz/hKtiuVAi9hMsBMpwBANhIZc8l238U2Onko3t2xUp8xtM0ZKdDYHMnm/qPFVthY8KtxkXaocwmMh6VolzMA==} + '@esbuild/openbsd-arm64@0.27.3': + resolution: {integrity: sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.27.5': - resolution: {integrity: sha512-WfGVaa1oz5A7+ZFPkERIbIhKT4olvGl1tyzTRaB5yoZRLqC0KwaO95FeZtOdQj/oKkjW57KcVF944m62/0GYtA==} + '@esbuild/openbsd-x64@0.27.3': + resolution: {integrity: sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.27.5': - resolution: {integrity: sha512-Xh+VRuh6OMh3uJ0JkCjI57l+DVe7VRGBYymen8rFPnTVgATBwA6nmToxM2OwTlSvrnWpPKkrQUj93+K9huYC6A==} + '@esbuild/openharmony-arm64@0.27.3': + resolution: {integrity: sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.27.5': - resolution: {integrity: sha512-aC1gpJkkaUADHuAdQfuVTnqVUTLqqUNhAvEwHwVWcnVVZvNlDPGA0UveZsfXJJ9T6k9Po4eHi3c02gbdwO3g6w==} + '@esbuild/sunos-x64@0.27.3': + resolution: {integrity: sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.27.5': - resolution: {integrity: sha512-0UNx2aavV0fk6UpZcwXFLztA2r/k9jTUa7OW7SAea1VYUhkug99MW1uZeXEnPn5+cHOd0n8myQay6TlFnBR07w==} + '@esbuild/win32-arm64@0.27.3': + resolution: {integrity: sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.27.5': - resolution: {integrity: sha512-5nlJ3AeJWCTSzR7AEqVjT/faWyqKU86kCi1lLmxVqmNR+j4HrYdns+eTGjS/vmrzCIe8inGQckUadvS0+JkKdQ==} + '@esbuild/win32-ia32@0.27.3': + resolution: {integrity: sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.27.5': - resolution: {integrity: sha512-PWypQR+d4FLfkhBIV+/kHsUELAnMpx1bRvvsn3p+/sAERbnCzFrtDRG2Xw5n+2zPxBK2+iaP+vetsRl4Ti7WgA==} + '@esbuild/win32-x64@0.27.3': + resolution: {integrity: sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -979,63 +980,63 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@8.55.0': - resolution: {integrity: sha512-1y/MVSz0NglV1ijHC8OT49mPJ4qhPYjiK08YUQVbIOyu+5k862LKUHFkpKHWu//zmr7hDR2rhwUm6gnCGNmGBQ==} + '@typescript-eslint/eslint-plugin@8.56.0': + resolution: {integrity: sha512-lRyPDLzNCuae71A3t9NEINBiTn7swyOhvUj3MyUOxb8x6g6vPEFoOU+ZRmGMusNC3X3YMhqMIX7i8ShqhT74Pw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.55.0 - eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/parser': ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/parser@8.55.0': - resolution: {integrity: sha512-4z2nCSBfVIMnbuu8uinj+f0o4qOeggYJLbjpPHka3KH1om7e+H9yLKTYgksTaHcGco+NClhhY2vyO3HsMH1RGw==} + '@typescript-eslint/parser@8.56.0': + resolution: {integrity: sha512-IgSWvLobTDOjnaxAfDTIHaECbkNlAlKv2j5SjpB2v7QHKv1FIfjwMy8FsDbVfDX/KjmCmYICcw7uGaXLhtsLNg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.55.0': - resolution: {integrity: sha512-zRcVVPFUYWa3kNnjaZGXSu3xkKV1zXy8M4nO/pElzQhFweb7PPtluDLQtKArEOGmjXoRjnUZ29NjOiF0eCDkcQ==} + '@typescript-eslint/project-service@8.56.0': + resolution: {integrity: sha512-M3rnyL1vIQOMeWxTWIW096/TtVP+8W3p/XnaFflhmcFp+U4zlxUxWj4XwNs6HbDeTtN4yun0GNTTDBw/SvufKg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/scope-manager@8.55.0': - resolution: {integrity: sha512-fVu5Omrd3jeqeQLiB9f1YsuK/iHFOwb04bCtY4BSCLgjNbOD33ZdV6KyEqplHr+IlpgT0QTZ/iJ+wT7hvTx49Q==} + '@typescript-eslint/scope-manager@8.56.0': + resolution: {integrity: sha512-7UiO/XwMHquH+ZzfVCfUNkIXlp/yQjjnlYUyYz7pfvlK3/EyyN6BK+emDmGNyQLBtLGaYrTAI6KOw8tFucWL2w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.55.0': - resolution: {integrity: sha512-1R9cXqY7RQd7WuqSN47PK9EDpgFUK3VqdmbYrvWJZYDd0cavROGn+74ktWBlmJ13NXUQKlZ/iAEQHI/V0kKe0Q==} + '@typescript-eslint/tsconfig-utils@8.56.0': + resolution: {integrity: sha512-bSJoIIt4o3lKXD3xmDh9chZcjCz5Lk8xS7Rxn+6l5/pKrDpkCwtQNQQwZ2qRPk7TkUYhrq3WPIHXOXlbXP0itg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/type-utils@8.55.0': - resolution: {integrity: sha512-x1iH2unH4qAt6I37I2CGlsNs+B9WGxurP2uyZLRz6UJoZWDBx9cJL1xVN/FiOmHEONEg6RIufdvyT0TEYIgC5g==} + '@typescript-eslint/type-utils@8.56.0': + resolution: {integrity: sha512-qX2L3HWOU2nuDs6GzglBeuFXviDODreS58tLY/BALPC7iu3Fa+J7EOTwnX9PdNBxUI7Uh0ntP0YWGnxCkXzmfA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/types@8.55.0': - resolution: {integrity: sha512-ujT0Je8GI5BJWi+/mMoR0wxwVEQaxM+pi30xuMiJETlX80OPovb2p9E8ss87gnSVtYXtJoU9U1Cowcr6w2FE0w==} + '@typescript-eslint/types@8.56.0': + resolution: {integrity: sha512-DBsLPs3GsWhX5HylbP9HNG15U0bnwut55Lx12bHB9MpXxQ+R5GC8MwQe+N1UFXxAeQDvEsEDY6ZYwX03K7Z6HQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.55.0': - resolution: {integrity: sha512-EwrH67bSWdx/3aRQhCoxDaHM+CrZjotc2UCCpEDVqfCE+7OjKAGWNY2HsCSTEVvWH2clYQK8pdeLp42EVs+xQw==} + '@typescript-eslint/typescript-estree@8.56.0': + resolution: {integrity: sha512-ex1nTUMWrseMltXUHmR2GAQ4d+WjkZCT4f+4bVsps8QEdh0vlBsaCokKTPlnqBFqqGaxilDNJG7b8dolW2m43Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/utils@8.55.0': - resolution: {integrity: sha512-BqZEsnPGdYpgyEIkDC1BadNY8oMwckftxBT+C8W0g1iKPdeqKZBtTfnvcq0nf60u7MkjFO8RBvpRGZBPw4L2ow==} + '@typescript-eslint/utils@8.56.0': + resolution: {integrity: sha512-RZ3Qsmi2nFGsS+n+kjLAYDPVlrzf7UhTffrDIKr+h2yzAlYP/y5ZulU0yeDEPItos2Ph46JAL5P/On3pe7kDIQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/visitor-keys@8.55.0': - resolution: {integrity: sha512-AxNRwEie8Nn4eFS1FzDMJWIISMGoXMb037sgCBJ3UR6o0fQTzr2tqN9WT+DkWJPhIdQCfV7T6D387566VtnCJA==} + '@typescript-eslint/visitor-keys@8.56.0': + resolution: {integrity: sha512-q+SL+b+05Ud6LbEE35qe4A99P+htKTKVbyiNEe45eCbJFyh/HVK9QXwlrbz+Q4L8SOW4roxSVwXYj4DMBT7Ieg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript/native-preview-darwin-arm64@7.0.0-dev.20260401.1': @@ -1140,10 +1141,6 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - array-find-index@1.0.2: - resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==} - engines: {node: '>=0.10.0'} - assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -1169,8 +1166,8 @@ packages: birpc@4.0.0: resolution: {integrity: sha512-LShSxJP0KTmd101b6DRyGBj57LZxSDYWKitQNW/mi8GRMvZb078Uf9+pveax1DrVL89vm7mWe+TovdI/UDOuPw==} - brace-expansion@1.1.13: - resolution: {integrity: sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==} + brace-expansion@1.1.12: + resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} brace-expansion@2.0.2: resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} @@ -1220,8 +1217,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - caniuse-lite@1.0.30001769: - resolution: {integrity: sha512-BCfFL1sHijQlBGWBMuJyhZUhzo7wer5sVj9hqekB/7xn0Ypy+pER/edCYQm4exbXj4WiySGp40P8UuTh6w1srg==} + caniuse-lite@1.0.30001770: + resolution: {integrity: sha512-x/2CLQ1jHENRbHg5PSId2sXq1CIO1CISvwWAj027ltMVG2UNgW+w9oH2+HzgEIRFembL8bUlXtfbBHR1fCg2xw==} ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -1255,8 +1252,8 @@ packages: citty@0.1.6: resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} - citty@0.2.0: - resolution: {integrity: sha512-8csy5IBFI2ex2hTVpaHN2j+LNE199AgiI7y4dMintrr8i0lQiFn+0AWMZrWdHKIgMOer65f8IThysYhoReqjWA==} + citty@0.2.1: + resolution: {integrity: sha512-kEV95lFBhQgtogAPlQfJJ0WGVSokvLr/UEoFPiKKOXF7pl98HfUVUD0ejsuTCld/9xH9vogSywZ5KqHzXrZpqg==} clean-regexp@1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} @@ -1269,9 +1266,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - commenting@1.1.0: - resolution: {integrity: sha512-YeNK4tavZwtH7jEgK1ZINXzLKm6DZdEMfsaaieOsCAN0S8vsY7UeuO3Q7d/M018EFgE+IeUAuBOKkFccBZsUZA==} - concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -1349,12 +1343,8 @@ packages: resolution: {integrity: sha512-+yW4SNY7W2DOWe2Jx5H4c2qMTFbLGM6wIyoDPkAPy66X+sD1KfYjBPAIWPVsYqMxelflaMQCloZDudELIPhLqA==} engines: {node: ^18.12.0 || >=20.9.0} - dotenv@17.2.4: - resolution: {integrity: sha512-mudtfb4zRB4bVvdj0xRo+e6duH1csJRM8IukBqfTRvHotn9+LBXB8ynAidP9zHqoRC/fsllXgk4kCKlR21fIhw==} - engines: {node: '>=12'} - - dotenv@17.4.0: - resolution: {integrity: sha512-kCKF62fwtzwYm0IGBNjRUjtJgMfGapII+FslMHIjMR5KTnwEmBmWLDRSnc3XSNP8bNy34tekgQyDT0hr7pERRQ==} + dotenv@17.3.1: + resolution: {integrity: sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA==} engines: {node: '>=12'} dts-resolver@2.1.3: @@ -1372,8 +1362,8 @@ packages: es-module-lexer@2.0.0: resolution: {integrity: sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==} - esbuild@0.27.5: - resolution: {integrity: sha512-zdQoHBjuDqKsvV5OPaWansOwfSQ0Js+Uj9J85TBvj3bFW1JjWTSULMRwdQAc8qMeIScbClxeMK0jlrtB9linhA==} + esbuild@0.27.3: + resolution: {integrity: sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==} engines: {node: '>=18'} hasBin: true @@ -1417,6 +1407,10 @@ packages: resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@5.0.0: + resolution: {integrity: sha512-A0XeIi7CXU7nPlfHS9loMYEKxUaONu/hTEzHTGba9Huu94Cq1hPivf+DE5erJozZOky0LfvXAyrV/tcswpLI0Q==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + eslint@9.39.2: resolution: {integrity: sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1498,8 +1492,8 @@ packages: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} - flatted@3.4.2: - resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} + flatted@3.3.4: + resolution: {integrity: sha512-3+mMldrTAPdta5kjX2G2J7iX4zxtnwpdA8Tr2ZSjkyPSanvbZAcy6flmtnXbEybHrDcU9641lxrMfFuUxVz9vA==} format@0.2.2: resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} @@ -1517,10 +1511,6 @@ packages: resolution: {integrity: sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==} hasBin: true - giget@3.2.0: - resolution: {integrity: sha512-GvHTWcykIR/fP8cj8dMpuMMkvaeJfPvYnhq0oW+chSeIr+ldX21ifU2Ms6KBoyKZQZmVaUAAhQ2EZ68KJF8a7A==} - hasBin: true - github-slugger@2.0.0: resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} @@ -1589,8 +1579,8 @@ packages: engines: {node: '>=14.16'} hasBin: true - is-wsl@3.1.0: - resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} + is-wsl@3.1.1: + resolution: {integrity: sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==} engines: {node: '>=16'} isexe@2.0.0: @@ -1653,9 +1643,6 @@ packages: lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - lodash@4.18.1: - resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} - longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} @@ -1811,9 +1798,6 @@ packages: mlly@1.8.0: resolution: {integrity: sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==} - moment@2.30.1: - resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} - mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -1883,10 +1867,6 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} - package-name-regex@2.0.6: - resolution: {integrity: sha512-gFL35q7kbE/zBaPA3UKhp2vSzcPYx2ecbYuwv1ucE9Il6IIgBDweBlH8D68UFGZic2MkllKa2KHCfC1IQBQUYA==} - engines: {node: '>=12'} - parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -1945,8 +1925,8 @@ packages: rc9@2.1.2: resolution: {integrity: sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==} - rc9@3.0.1: - resolution: {integrity: sha512-gMDyleLWVE+i6Sgtc0QbbY6pEKqYs97NGi6isHQPqYlLemPoO8dxQ3uGi0f4NiP98c+jMW6cG1Kx9dDwfvqARQ==} + rc9@3.0.0: + resolution: {integrity: sha512-MGOue0VqscKWQ104udASX/3GYDcKyPI4j4F8gu/jHHzglpmy9a/anZK3PNe8ug6aZFl+9GxLtdhe3kVZuMaQbA==} readdirp@5.0.0: resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} @@ -1991,12 +1971,6 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - rollup-plugin-license@3.7.0: - resolution: {integrity: sha512-RvvOIF+GH3fBR3wffgc/vmjQn6qOn72WjppWVDp/v+CLpT0BbcRBdSkPeeIOL6U5XccdYgSIMjUyXgxlKEEFcw==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 - rollup@4.59.0: resolution: {integrity: sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -2029,27 +2003,6 @@ packages: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} - spdx-compare@1.0.0: - resolution: {integrity: sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==} - - spdx-exceptions@2.5.0: - resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} - - spdx-expression-parse@3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - - spdx-expression-validate@2.0.0: - resolution: {integrity: sha512-b3wydZLM+Tc6CFvaRDBOF9d76oGIHNCLYFeHbftFXUWjnfZWganmDmvtM5sm1cRwJc/VDBMLyGGrsLFd1vOxbg==} - - spdx-license-ids@3.0.22: - resolution: {integrity: sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==} - - spdx-ranges@2.1.1: - resolution: {integrity: sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA==} - - spdx-satisfies@5.0.1: - resolution: {integrity: sha512-Nwor6W6gzFp8XX4neaKQ7ChV4wmpSh2sSDemMFSzHxpTw460jxFYeOn+jq4ybnSSw/5sc3pjka9MQPouksQNpw==} - stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} @@ -2078,10 +2031,6 @@ packages: resolution: {integrity: sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==} engines: {node: '>=18'} - tinyexec@1.0.4: - resolution: {integrity: sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==} - engines: {node: '>=18'} - tinyglobby@0.2.15: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} @@ -2107,11 +2056,11 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - typescript-eslint@8.55.0: - resolution: {integrity: sha512-HE4wj+r5lmDVS9gdaN0/+iqNvPZwGfnJ5lZuz7s5vLlg9ODw0bIiiETaios9LvFI1U94/VBXGm3CB2Y5cNFMpw==} + typescript-eslint@8.56.0: + resolution: {integrity: sha512-c7toRLrotJ9oixgdW7liukZpsnq5CZ7PuKztubGYlNppuTqhIoWfhgHo/7EU0v06gS2l/x0i2NEFK1qMIf0rIg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.0.0' typescript@6.0.2: @@ -2307,82 +2256,82 @@ snapshots: tslib: 2.8.1 optional: true - '@esbuild/aix-ppc64@0.27.5': + '@esbuild/aix-ppc64@0.27.3': optional: true - '@esbuild/android-arm64@0.27.5': + '@esbuild/android-arm64@0.27.3': optional: true - '@esbuild/android-arm@0.27.5': + '@esbuild/android-arm@0.27.3': optional: true - '@esbuild/android-x64@0.27.5': + '@esbuild/android-x64@0.27.3': optional: true - '@esbuild/darwin-arm64@0.27.5': + '@esbuild/darwin-arm64@0.27.3': optional: true - '@esbuild/darwin-x64@0.27.5': + '@esbuild/darwin-x64@0.27.3': optional: true - '@esbuild/freebsd-arm64@0.27.5': + '@esbuild/freebsd-arm64@0.27.3': optional: true - '@esbuild/freebsd-x64@0.27.5': + '@esbuild/freebsd-x64@0.27.3': optional: true - '@esbuild/linux-arm64@0.27.5': + '@esbuild/linux-arm64@0.27.3': optional: true - '@esbuild/linux-arm@0.27.5': + '@esbuild/linux-arm@0.27.3': optional: true - '@esbuild/linux-ia32@0.27.5': + '@esbuild/linux-ia32@0.27.3': optional: true - '@esbuild/linux-loong64@0.27.5': + '@esbuild/linux-loong64@0.27.3': optional: true - '@esbuild/linux-mips64el@0.27.5': + '@esbuild/linux-mips64el@0.27.3': optional: true - '@esbuild/linux-ppc64@0.27.5': + '@esbuild/linux-ppc64@0.27.3': optional: true - '@esbuild/linux-riscv64@0.27.5': + '@esbuild/linux-riscv64@0.27.3': optional: true - '@esbuild/linux-s390x@0.27.5': + '@esbuild/linux-s390x@0.27.3': optional: true - '@esbuild/linux-x64@0.27.5': + '@esbuild/linux-x64@0.27.3': optional: true - '@esbuild/netbsd-arm64@0.27.5': + '@esbuild/netbsd-arm64@0.27.3': optional: true - '@esbuild/netbsd-x64@0.27.5': + '@esbuild/netbsd-x64@0.27.3': optional: true - '@esbuild/openbsd-arm64@0.27.5': + '@esbuild/openbsd-arm64@0.27.3': optional: true - '@esbuild/openbsd-x64@0.27.5': + '@esbuild/openbsd-x64@0.27.3': optional: true - '@esbuild/openharmony-arm64@0.27.5': + '@esbuild/openharmony-arm64@0.27.3': optional: true - '@esbuild/sunos-x64@0.27.5': + '@esbuild/sunos-x64@0.27.3': optional: true - '@esbuild/win32-arm64@0.27.5': + '@esbuild/win32-arm64@0.27.3': optional: true - '@esbuild/win32-ia32@0.27.5': + '@esbuild/win32-ia32@0.27.3': optional: true - '@esbuild/win32-x64@0.27.5': + '@esbuild/win32-x64@0.27.3': optional: true '@eslint-community/eslint-utils@4.9.1(eslint@9.39.2(jiti@2.6.1))': @@ -2815,14 +2764,14 @@ snapshots: '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2))(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2)': + '@typescript-eslint/eslint-plugin@8.56.0(@typescript-eslint/parser@8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2))(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/scope-manager': 8.55.0 - '@typescript-eslint/type-utils': 8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/utils': 8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/visitor-keys': 8.55.0 + '@typescript-eslint/parser': 8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.56.0 + '@typescript-eslint/type-utils': 8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/utils': 8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/visitor-keys': 8.56.0 eslint: 9.39.2(jiti@2.6.1) ignore: 7.0.5 natural-compare: 1.4.0 @@ -2831,41 +2780,41 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2)': + '@typescript-eslint/parser@8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@typescript-eslint/scope-manager': 8.55.0 - '@typescript-eslint/types': 8.55.0 - '@typescript-eslint/typescript-estree': 8.55.0(typescript@6.0.2) - '@typescript-eslint/visitor-keys': 8.55.0 + '@typescript-eslint/scope-manager': 8.56.0 + '@typescript-eslint/types': 8.56.0 + '@typescript-eslint/typescript-estree': 8.56.0(typescript@6.0.2) + '@typescript-eslint/visitor-keys': 8.56.0 debug: 4.4.3 eslint: 9.39.2(jiti@2.6.1) typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.55.0(typescript@6.0.2)': + '@typescript-eslint/project-service@8.56.0(typescript@6.0.2)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.55.0(typescript@6.0.2) - '@typescript-eslint/types': 8.55.0 + '@typescript-eslint/tsconfig-utils': 8.56.0(typescript@6.0.2) + '@typescript-eslint/types': 8.56.0 debug: 4.4.3 typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.55.0': + '@typescript-eslint/scope-manager@8.56.0': dependencies: - '@typescript-eslint/types': 8.55.0 - '@typescript-eslint/visitor-keys': 8.55.0 + '@typescript-eslint/types': 8.56.0 + '@typescript-eslint/visitor-keys': 8.56.0 - '@typescript-eslint/tsconfig-utils@8.55.0(typescript@6.0.2)': + '@typescript-eslint/tsconfig-utils@8.56.0(typescript@6.0.2)': dependencies: typescript: 6.0.2 - '@typescript-eslint/type-utils@8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2)': + '@typescript-eslint/type-utils@8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@typescript-eslint/types': 8.55.0 - '@typescript-eslint/typescript-estree': 8.55.0(typescript@6.0.2) - '@typescript-eslint/utils': 8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/types': 8.56.0 + '@typescript-eslint/typescript-estree': 8.56.0(typescript@6.0.2) + '@typescript-eslint/utils': 8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) debug: 4.4.3 eslint: 9.39.2(jiti@2.6.1) ts-api-utils: 2.4.0(typescript@6.0.2) @@ -2873,14 +2822,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.55.0': {} + '@typescript-eslint/types@8.56.0': {} - '@typescript-eslint/typescript-estree@8.55.0(typescript@6.0.2)': + '@typescript-eslint/typescript-estree@8.56.0(typescript@6.0.2)': dependencies: - '@typescript-eslint/project-service': 8.55.0(typescript@6.0.2) - '@typescript-eslint/tsconfig-utils': 8.55.0(typescript@6.0.2) - '@typescript-eslint/types': 8.55.0 - '@typescript-eslint/visitor-keys': 8.55.0 + '@typescript-eslint/project-service': 8.56.0(typescript@6.0.2) + '@typescript-eslint/tsconfig-utils': 8.56.0(typescript@6.0.2) + '@typescript-eslint/types': 8.56.0 + '@typescript-eslint/visitor-keys': 8.56.0 debug: 4.4.3 minimatch: 9.0.5 semver: 7.7.4 @@ -2890,21 +2839,21 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2)': + '@typescript-eslint/utils@8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1)) - '@typescript-eslint/scope-manager': 8.55.0 - '@typescript-eslint/types': 8.55.0 - '@typescript-eslint/typescript-estree': 8.55.0(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.56.0 + '@typescript-eslint/types': 8.56.0 + '@typescript-eslint/typescript-estree': 8.56.0(typescript@6.0.2) eslint: 9.39.2(jiti@2.6.1) typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.55.0': + '@typescript-eslint/visitor-keys@8.56.0': dependencies: - '@typescript-eslint/types': 8.55.0 - eslint-visitor-keys: 4.2.1 + '@typescript-eslint/types': 8.56.0 + eslint-visitor-keys: 5.0.0 '@typescript/native-preview-darwin-arm64@7.0.0-dev.20260401.1': optional: true @@ -3013,8 +2962,6 @@ snapshots: argparse@2.0.1: {} - array-find-index@1.0.2: {} - assertion-error@2.0.1: {} ast-kit@3.0.0-beta.1: @@ -3033,9 +2980,9 @@ snapshots: dependencies: '@parcel/watcher': 2.5.6 c12: 3.3.3(magicast@0.5.2) - citty: 0.2.0 + citty: 0.2.1 consola: 3.4.2 - defu: 6.1.4 + defu: 6.1.6 destr: 2.0.5 didyoumean2: 7.0.4 magic-string: 0.30.21 @@ -3057,7 +3004,7 @@ snapshots: birpc@4.0.0: {} - brace-expansion@1.1.13: + brace-expansion@1.1.12: dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 @@ -3069,7 +3016,7 @@ snapshots: browserslist@4.28.1: dependencies: baseline-browser-mapping: 2.9.19 - caniuse-lite: 1.0.30001769 + caniuse-lite: 1.0.30001770 electron-to-chromium: 1.5.286 node-releases: 2.0.27 update-browserslist-db: 1.2.3(browserslist@4.28.1) @@ -3084,8 +3031,8 @@ snapshots: dependencies: chokidar: 5.0.0 confbox: 0.2.4 - defu: 6.1.4 - dotenv: 17.2.4 + defu: 6.1.6 + dotenv: 17.3.1 exsolve: 1.0.8 giget: 2.0.0 jiti: 2.6.1 @@ -3097,24 +3044,24 @@ snapshots: optionalDependencies: magicast: 0.5.2 - c12@4.0.0-beta.4(chokidar@5.0.0)(dotenv@17.4.0)(giget@3.2.0)(jiti@2.6.1)(magicast@0.5.2): + c12@4.0.0-beta.4(chokidar@5.0.0)(dotenv@17.3.1)(giget@2.0.0)(jiti@2.6.1)(magicast@0.5.2): dependencies: confbox: 0.2.4 defu: 6.1.6 exsolve: 1.0.8 pathe: 2.0.3 pkg-types: 2.3.0 - rc9: 3.0.1 + rc9: 3.0.0 optionalDependencies: chokidar: 5.0.0 - dotenv: 17.4.0 - giget: 3.2.0 + dotenv: 17.3.1 + giget: 2.0.0 jiti: 2.6.1 magicast: 0.5.2 callsites@3.1.0: {} - caniuse-lite@1.0.30001769: {} + caniuse-lite@1.0.30001770: {} ccount@2.0.1: {} @@ -3157,7 +3104,7 @@ snapshots: dependencies: consola: 3.4.2 - citty@0.2.0: {} + citty@0.2.1: {} clean-regexp@1.0.0: dependencies: @@ -3169,8 +3116,6 @@ snapshots: color-name@1.1.4: {} - commenting@1.1.0: {} - concat-map@0.0.1: {} confbox@0.1.8: {} @@ -3232,10 +3177,7 @@ snapshots: fastest-levenshtein: 1.0.16 lodash.deburr: 4.1.0 - dotenv@17.2.4: {} - - dotenv@17.4.0: - optional: true + dotenv@17.3.1: {} dts-resolver@2.1.3: {} @@ -3243,34 +3185,34 @@ snapshots: es-module-lexer@2.0.0: {} - esbuild@0.27.5: + esbuild@0.27.3: optionalDependencies: - '@esbuild/aix-ppc64': 0.27.5 - '@esbuild/android-arm': 0.27.5 - '@esbuild/android-arm64': 0.27.5 - '@esbuild/android-x64': 0.27.5 - '@esbuild/darwin-arm64': 0.27.5 - '@esbuild/darwin-x64': 0.27.5 - '@esbuild/freebsd-arm64': 0.27.5 - '@esbuild/freebsd-x64': 0.27.5 - '@esbuild/linux-arm': 0.27.5 - '@esbuild/linux-arm64': 0.27.5 - '@esbuild/linux-ia32': 0.27.5 - '@esbuild/linux-loong64': 0.27.5 - '@esbuild/linux-mips64el': 0.27.5 - '@esbuild/linux-ppc64': 0.27.5 - '@esbuild/linux-riscv64': 0.27.5 - '@esbuild/linux-s390x': 0.27.5 - '@esbuild/linux-x64': 0.27.5 - '@esbuild/netbsd-arm64': 0.27.5 - '@esbuild/netbsd-x64': 0.27.5 - '@esbuild/openbsd-arm64': 0.27.5 - '@esbuild/openbsd-x64': 0.27.5 - '@esbuild/openharmony-arm64': 0.27.5 - '@esbuild/sunos-x64': 0.27.5 - '@esbuild/win32-arm64': 0.27.5 - '@esbuild/win32-ia32': 0.27.5 - '@esbuild/win32-x64': 0.27.5 + '@esbuild/aix-ppc64': 0.27.3 + '@esbuild/android-arm': 0.27.3 + '@esbuild/android-arm64': 0.27.3 + '@esbuild/android-x64': 0.27.3 + '@esbuild/darwin-arm64': 0.27.3 + '@esbuild/darwin-x64': 0.27.3 + '@esbuild/freebsd-arm64': 0.27.3 + '@esbuild/freebsd-x64': 0.27.3 + '@esbuild/linux-arm': 0.27.3 + '@esbuild/linux-arm64': 0.27.3 + '@esbuild/linux-ia32': 0.27.3 + '@esbuild/linux-loong64': 0.27.3 + '@esbuild/linux-mips64el': 0.27.3 + '@esbuild/linux-ppc64': 0.27.3 + '@esbuild/linux-riscv64': 0.27.3 + '@esbuild/linux-s390x': 0.27.3 + '@esbuild/linux-x64': 0.27.3 + '@esbuild/netbsd-arm64': 0.27.3 + '@esbuild/netbsd-x64': 0.27.3 + '@esbuild/openbsd-arm64': 0.27.3 + '@esbuild/openbsd-x64': 0.27.3 + '@esbuild/openharmony-arm64': 0.27.3 + '@esbuild/sunos-x64': 0.27.3 + '@esbuild/win32-arm64': 0.27.3 + '@esbuild/win32-ia32': 0.27.3 + '@esbuild/win32-x64': 0.27.3 escalade@3.2.0: {} @@ -3288,7 +3230,7 @@ snapshots: eslint-plugin-unicorn: 62.0.0(eslint@9.39.2(jiti@2.6.1)) globals: 17.3.0 typescript: 6.0.2 - typescript-eslint: 8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) + typescript-eslint: 8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) transitivePeerDependencies: - supports-color @@ -3323,6 +3265,8 @@ snapshots: eslint-visitor-keys@4.2.1: {} + eslint-visitor-keys@5.0.0: {} + eslint@9.39.2(jiti@2.6.1): dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1)) @@ -3406,10 +3350,6 @@ snapshots: optionalDependencies: picomatch: 4.0.3 - fdir@6.5.0(picomatch@4.0.4): - optionalDependencies: - picomatch: 4.0.4 - file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -3423,10 +3363,10 @@ snapshots: flat-cache@4.0.1: dependencies: - flatted: 3.4.2 + flatted: 3.3.4 keyv: 4.5.4 - flatted@3.4.2: {} + flatted@3.3.4: {} format@0.2.2: {} @@ -3441,14 +3381,11 @@ snapshots: dependencies: citty: 0.1.6 consola: 3.4.2 - defu: 6.1.4 + defu: 6.1.6 node-fetch-native: 1.6.7 nypm: 0.6.5 pathe: 2.0.3 - giget@3.2.0: - optional: true - github-slugger@2.0.0: {} glob-parent@6.0.2: @@ -3494,7 +3431,7 @@ snapshots: dependencies: is-docker: 3.0.0 - is-wsl@3.1.0: + is-wsl@3.1.1: dependencies: is-inside-container: 1.0.0 @@ -3548,8 +3485,6 @@ snapshots: lodash.merge@4.6.2: {} - lodash@4.18.1: {} - longest-streak@3.1.0: {} magic-string@0.30.21: @@ -3887,7 +3822,7 @@ snapshots: minimatch@3.1.5: dependencies: - brace-expansion: 1.1.13 + brace-expansion: 1.1.12 minimatch@9.0.5: dependencies: @@ -3900,8 +3835,6 @@ snapshots: pkg-types: 1.3.1 ufo: 1.6.3 - moment@2.30.1: {} - mri@1.2.0: {} ms@2.1.3: {} @@ -3918,7 +3851,7 @@ snapshots: nypm@0.6.5: dependencies: - citty: 0.2.0 + citty: 0.2.1 pathe: 2.0.3 tinyexec: 1.0.2 @@ -4002,8 +3935,6 @@ snapshots: dependencies: p-limit: 3.1.0 - package-name-regex@2.0.6: {} - parent-module@1.0.1: dependencies: callsites: 3.1.0 @@ -4050,10 +3981,10 @@ snapshots: rc9@2.1.2: dependencies: - defu: 6.1.4 + defu: 6.1.6 destr: 2.0.5 - rc9@3.0.1: + rc9@3.0.0: dependencies: defu: 6.1.6 destr: 2.0.5 @@ -4110,20 +4041,6 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.13 '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.13 - rollup-plugin-license@3.7.0(picomatch@4.0.3)(rollup@4.59.0): - dependencies: - commenting: 1.1.0 - fdir: 6.5.0(picomatch@4.0.3) - lodash: 4.18.1 - magic-string: 0.30.21 - moment: 2.30.1 - package-name-regex: 2.0.6 - rollup: 4.59.0 - spdx-expression-validate: 2.0.0 - spdx-satisfies: 5.0.1 - transitivePeerDependencies: - - picomatch - rollup@4.59.0: dependencies: '@types/estree': 1.0.8 @@ -4171,33 +4088,6 @@ snapshots: source-map-js@1.2.1: {} - spdx-compare@1.0.0: - dependencies: - array-find-index: 1.0.2 - spdx-expression-parse: 3.0.1 - spdx-ranges: 2.1.1 - - spdx-exceptions@2.5.0: {} - - spdx-expression-parse@3.0.1: - dependencies: - spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.22 - - spdx-expression-validate@2.0.0: - dependencies: - spdx-expression-parse: 3.0.1 - - spdx-license-ids@3.0.22: {} - - spdx-ranges@2.1.1: {} - - spdx-satisfies@5.0.1: - dependencies: - spdx-compare: 1.0.0 - spdx-expression-parse: 3.0.1 - spdx-ranges: 2.1.1 - stackback@0.0.2: {} std-env@3.10.0: {} @@ -4216,8 +4106,6 @@ snapshots: tinyexec@1.0.2: {} - tinyexec@1.0.4: {} - tinyglobby@0.2.15: dependencies: fdir: 6.5.0(picomatch@4.0.3) @@ -4238,12 +4126,12 @@ snapshots: dependencies: prelude-ls: 1.2.1 - typescript-eslint@8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2): + typescript-eslint@8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2))(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/parser': 8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/typescript-estree': 8.55.0(typescript@6.0.2) - '@typescript-eslint/utils': 8.55.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/eslint-plugin': 8.56.0(@typescript-eslint/parser@8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2))(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/parser': 8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/typescript-estree': 8.56.0(typescript@6.0.2) + '@typescript-eslint/utils': 8.56.0(eslint@9.39.2(jiti@2.6.1))(typescript@6.0.2) eslint: 9.39.2(jiti@2.6.1) typescript: 6.0.2 transitivePeerDependencies: @@ -4277,7 +4165,7 @@ snapshots: untyped@2.0.0: dependencies: citty: 0.1.6 - defu: 6.1.4 + defu: 6.1.6 jiti: 2.6.1 knitwork: 1.3.0 scule: 1.3.0 @@ -4294,9 +4182,9 @@ snapshots: vite@7.3.1(@types/node@25.5.0)(jiti@2.6.1): dependencies: - esbuild: 0.27.5 - fdir: 6.5.0(picomatch@4.0.4) - picomatch: 4.0.4 + esbuild: 0.27.3 + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 postcss: 8.5.8 rollup: 4.59.0 tinyglobby: 0.2.15 @@ -4319,10 +4207,10 @@ snapshots: magic-string: 0.30.21 obug: 2.1.1 pathe: 2.0.3 - picomatch: 4.0.4 + picomatch: 4.0.3 std-env: 4.0.0 tinybench: 2.9.0 - tinyexec: 1.0.4 + tinyexec: 1.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.1.0 vite: 7.3.1(@types/node@25.5.0)(jiti@2.6.1) @@ -4345,7 +4233,7 @@ snapshots: wsl-utils@0.1.0: dependencies: - is-wsl: 3.1.0 + is-wsl: 3.1.1 yocto-queue@0.1.0: {} diff --git a/src/builders/plugins/license.ts b/src/builders/plugins/license.ts index 42ea5ad..7d494f4 100644 --- a/src/builders/plugins/license.ts +++ b/src/builders/plugins/license.ts @@ -6,127 +6,219 @@ * MIT Licensed: https://github.com/rollup/rollup/blob/master/LICENSE-CORE.md */ -import { appendFile, mkdir, writeFile } from "node:fs/promises"; -import license from "rollup-plugin-license"; - -import type { Dependency } from "rollup-plugin-license"; -import type { Plugin, PluginContext } from "rolldown"; -import { dirname } from "node:path"; +import { appendFile, mkdir, readFile, writeFile } from "node:fs/promises"; import { existsSync } from "node:fs"; +import { dirname, join, sep } from "node:path"; +import type { Plugin, PluginContext } from "rolldown"; -export default function licensePlugin(opts: { output: string }): Plugin { - const originalPlugin = (license as unknown as typeof license.default)({ - async thirdParty(dependencies: Dependency[]) { - const deps = sortDependencies([...dependencies]); - const licenses = sortLicenses( - new Set(dependencies.map((dep: Dependency) => dep.license).filter(Boolean) as string[]), - ); - - let dependencyLicenseTexts = ""; - for (let i = 0; i < deps.length; i++) { - // Find dependencies with the same license text so it can be shared - const licenseText = deps[i].licenseText; - const sameDeps = [deps[i]]; - if (licenseText) { - for (let j = i + 1; j < deps.length; j++) { - if (licenseText === deps[j].licenseText) { - sameDeps.push(...deps.splice(j, 1)); - j--; - } - } - } +interface Person { + name?: string; + email?: string; + url?: string; +} - let text = `## ${sameDeps.map((d) => d.name || "unknown").join(", ")}\n\n`; - const depInfos = sameDeps.map((d) => getDependencyInformation(d)); - - // If all same dependencies have the same license and contributor names, show them only once - if ( - depInfos.length > 1 && - depInfos.every( - (info) => info.license === depInfos[0].license && info.names === depInfos[0].names, - ) - ) { - const { license, names } = depInfos[0]; - const repositoryText = depInfos - .map((info) => info.repository) - .filter(Boolean) - .join(", "); - - if (license) text += `License: ${license}\n`; - if (names) text += `By: ${names}\n`; - if (repositoryText) text += `Repositories: ${repositoryText}\n`; - } - // Else show each dependency separately - else { - for (let j = 0; j < depInfos.length; j++) { - const { license, names, repository } = depInfos[j]; - - if (license) text += `License: ${license}\n`; - if (names) text += `By: ${names}\n`; - if (repository) text += `Repository: ${repository}\n`; - if (j !== depInfos.length - 1) text += "\n"; - } - } +interface Dependency { + name?: string; + version?: string; + license?: string; + licenseText?: string; + author?: string | Person; + maintainers: (string | Person)[]; + contributors: (string | Person)[]; + repository?: string | { type?: string; url: string }; +} - if (licenseText) { - text += - "\n" + - licenseText - .trim() - .replace(/\r\n|\r/g, "\n") - .split("\n") - .map((line: string) => `> ${line}`) - .join("\n") + - "\n"; - } +async function collectDependencies( + moduleIds: Iterable, +): Promise { + const seen = new Set(); + const deps: Dependency[] = []; - if (i !== deps.length - 1) { - text += "\n---------------------------------------\n\n"; - } + for (const id of moduleIds) { + const nodeModulesIdx = id.lastIndexOf(`${sep}node_modules${sep}`); + if (nodeModulesIdx === -1) continue; + + const afterNodeModules = id.slice( + nodeModulesIdx + `${sep}node_modules${sep}`.length, + ); + // Handle scoped packages (@scope/name) + const parts = afterNodeModules.split(sep); + const pkgName = + parts[0].startsWith("@") ? `${parts[0]}/${parts[1]}` : parts[0]; - dependencyLicenseTexts += text; + if (seen.has(pkgName)) continue; + seen.add(pkgName); + + const pkgDir = id.slice( + 0, + nodeModulesIdx + + `${sep}node_modules${sep}`.length + + pkgName.length, + ); + const pkgJsonPath = join(pkgDir, "package.json"); + + try { + const pkgJson = JSON.parse(await readFile(pkgJsonPath, "utf8")); + const dep: Dependency = { + name: pkgJson.name, + version: pkgJson.version, + license: pkgJson.license, + author: pkgJson.author, + maintainers: pkgJson.maintainers || [], + contributors: pkgJson.contributors || [], + repository: pkgJson.repository, + }; + + // Try to find LICENSE file + for (const licenseFile of [ + "LICENSE", + "LICENSE.md", + "LICENSE.txt", + "LICENCE", + "LICENCE.md", + "LICENCE.txt", + "license", + "license.md", + "license.txt", + ]) { + const licensePath = join(pkgDir, licenseFile); + if (existsSync(licensePath)) { + dep.licenseText = await readFile(licensePath, "utf8"); + break; + } } - if (!dependencyLicenseTexts) { - return; + deps.push(dep); + } catch { + // Skip packages without a valid package.json + } + } + + return deps; +} + +export default function licensePlugin(opts: { output: string }): Plugin { + return { + name: "obuild:license", + async generateBundle(this: PluginContext) { + if (this.meta.watchMode) return; + + const dependencies = await collectDependencies(this.getModuleIds()); + await generateLicenseFile(dependencies, opts.output); + }, + }; +} + +async function generateLicenseFile( + dependencies: Dependency[], + output: string, +): Promise { + const deps = sortDependencies([...dependencies]); + const licenses = sortLicenses( + new Set( + dependencies + .map((dep: Dependency) => dep.license) + .filter(Boolean) as string[], + ), + ); + + let dependencyLicenseTexts = ""; + for (let i = 0; i < deps.length; i++) { + // Find dependencies with the same license text so it can be shared + const licenseText = deps[i].licenseText; + const sameDeps = [deps[i]]; + if (licenseText) { + for (let j = i + 1; j < deps.length; j++) { + if (licenseText === deps[j].licenseText) { + sameDeps.push(...deps.splice(j, 1)); + j--; + } } + } + + let text = `## ${sameDeps.map((d) => d.name || "unknown").join(", ")}\n\n`; + const depInfos = sameDeps.map((d) => getDependencyInformation(d)); + + // If all same dependencies have the same license and contributor names, show them only once + if ( + depInfos.length > 1 && + depInfos.every( + (info) => + info.license === depInfos[0].license && + info.names === depInfos[0].names, + ) + ) { + const { license, names } = depInfos[0]; + const repositoryText = depInfos + .map((info) => info.repository) + .filter(Boolean) + .join(", "); - if (existsSync(opts.output)) { - // TODO: Deep merge? - console.log("Appending third-party licenses to", opts.output); - await appendFile(opts.output, "\n\n" + dependencyLicenseTexts); - } else { - const licenseText = - `# Licenses of Bundled Dependencies\n\n` + - `The published artifact additionally contains code with the following licenses:\n` + - `${licenses.join(", ")}\n\n` + - `# Bundled Dependencies\n\n` + - dependencyLicenseTexts; - - console.log("Writing third-party licenses to", opts.output); - - await mkdir(dirname(opts.output!), { recursive: true }); - await writeFile(opts.output!, licenseText); + if (license) text += `License: ${license}\n`; + if (names) text += `By: ${names}\n`; + if (repositoryText) text += `Repositories: ${repositoryText}\n`; + } + // Else show each dependency separately + else { + for (let j = 0; j < depInfos.length; j++) { + const { license, names, repository } = depInfos[j]; + + if (license) text += `License: ${license}\n`; + if (names) text += `By: ${names}\n`; + if (repository) text += `Repository: ${repository}\n`; + if (j !== depInfos.length - 1) text += "\n"; } - }, - }); - // Skip for watch mode - for (const hook of ["renderChunk", "generateBundle"] as const) { - const originalHook = originalPlugin[hook]; - if (!originalHook) continue; - // @ts-expect-error - originalPlugin[hook] = function (this: PluginContext, ...args: unknown[]) { - if (this.meta.watchMode) return; - // @ts-expect-error - return originalHook.apply(this, args); - }; + } + + if (licenseText) { + text += + "\n" + + licenseText + .trim() + .replace(/\r\n|\r/g, "\n") + .split("\n") + .map((line: string) => `> ${line}`) + .join("\n") + + "\n"; + } + + if (i !== deps.length - 1) { + text += "\n---------------------------------------\n\n"; + } + + dependencyLicenseTexts += text; + } + + if (!dependencyLicenseTexts) { + return; + } + + if (existsSync(output)) { + // TODO: Deep merge? + console.log("Appending third-party licenses to", output); + await appendFile(output, "\n\n" + dependencyLicenseTexts); + } else { + const licenseText = + `# Licenses of Bundled Dependencies\n\n` + + `The published artifact additionally contains code with the following licenses:\n` + + `${licenses.join(", ")}\n\n` + + `# Bundled Dependencies\n\n` + + dependencyLicenseTexts; + + console.log("Writing third-party licenses to", output); + + await mkdir(dirname(output!), { recursive: true }); + await writeFile(output!, licenseText); } - return originalPlugin as Plugin; } function sortDependencies(dependencies: Dependency[]) { return dependencies.sort(({ name: nameA }, { name: nameB }) => { - return (nameA || "") > (nameB || "") ? 1 : (nameB || "") > (nameA || "") ? -1 : 0; + return (nameA || "") > (nameB || "") + ? 1 + : (nameB || "") > (nameA || "") + ? -1 + : 0; }); } @@ -171,7 +263,9 @@ function getDependencyInformation(dep: Dependency): DependencyInfo { } if (repository) { - info.repository = normalizeGitUrl(typeof repository === "string" ? repository : repository.url); + info.repository = normalizeGitUrl( + typeof repository === "string" ? repository : repository.url, + ); } return info; diff --git a/test/fixture/package.json b/test/fixture/package.json index b47270f..de0dba6 100644 --- a/test/fixture/package.json +++ b/test/fixture/package.json @@ -13,5 +13,8 @@ }, "dependencies": { "obuild": "latest" + }, + "devDependencies": { + "defu": "*" } } diff --git a/test/fixture/src/index.ts b/test/fixture/src/index.ts index 8edd1f0..df1a11d 100644 --- a/test/fixture/src/index.ts +++ b/test/fixture/src/index.ts @@ -1,7 +1,8 @@ import internal from "#internal"; +import { defu } from "defu"; export function test(): string { - return "test bundled: " + internal; + return "test bundled: " + internal + JSON.stringify(defu({}, {})); } export default "default export"; diff --git a/test/obuild.test.ts b/test/obuild.test.ts index af8c16c..fa29254 100644 --- a/test/obuild.test.ts +++ b/test/obuild.test.ts @@ -26,6 +26,10 @@ describe("obuild", () => { const distFiles = await readdir(distDir, { recursive: true }).then((r) => r.sort()); expect(distFiles).toMatchInlineSnapshot(` [ + "THIRD-PARTY-LICENSES.md", + "_chunks", + "_chunks/libs", + "_chunks/libs/defu.mjs", "cli.d.mts", "cli.mjs", "index.d.mts", @@ -71,4 +75,19 @@ describe("obuild", () => { const stats = await stat(cliPath); expect(stats.mode & 0o111).toBe(0o111); // Check if executable }); + + test("license file is generated with correct structure", async () => { + const content = await readFile(new URL("THIRD-PARTY-LICENSES.md", distDir), "utf8"); + expect(content).toContain("# Licenses of Bundled Dependencies"); + expect(content).toContain("# Bundled Dependencies"); + expect(content).toContain("MIT"); + }); + + test("license file contains bundled dependency info", async () => { + const content = await readFile(new URL("THIRD-PARTY-LICENSES.md", distDir), "utf8"); + expect(content).toContain("## defu"); + expect(content).toContain("License: MIT"); + expect(content).toContain("Pooya Parsa"); + expect(content).toContain("> MIT License"); + }); }); From b2e2d1131bfa2d75c67938727e8072d61d690edb Mon Sep 17 00:00:00 2001 From: naitokosuke Date: Thu, 2 Apr 2026 00:57:12 +0900 Subject: [PATCH 2/7] test: add snapshot test for license file generation Adds a characterization test that verifies THIRD-PARTY-LICENSES.md output using a snapshot, ensuring behavioral equivalence when replacing the license collection implementation. Co-Authored-By: Claude Opus 4.6 (1M context) --- test/__snapshots__/obuild.test.ts.snap | 38 ++++++++++++++++++++++++++ test/obuild.test.ts | 14 ++-------- 2 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 test/__snapshots__/obuild.test.ts.snap diff --git a/test/__snapshots__/obuild.test.ts.snap b/test/__snapshots__/obuild.test.ts.snap new file mode 100644 index 0000000..4283054 --- /dev/null +++ b/test/__snapshots__/obuild.test.ts.snap @@ -0,0 +1,38 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`obuild > license file matches snapshot 1`] = ` +"# Licenses of Bundled Dependencies + +The published artifact additionally contains code with the following licenses: +MIT + +# Bundled Dependencies + +## defu + +License: MIT +Repository: https://github.com/unjs/defu + +> MIT License +> +> Copyright (c) Pooya Parsa +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. +" +`; diff --git a/test/obuild.test.ts b/test/obuild.test.ts index fa29254..00d06d5 100644 --- a/test/obuild.test.ts +++ b/test/obuild.test.ts @@ -76,18 +76,8 @@ describe("obuild", () => { expect(stats.mode & 0o111).toBe(0o111); // Check if executable }); - test("license file is generated with correct structure", async () => { + test("license file matches snapshot", async () => { const content = await readFile(new URL("THIRD-PARTY-LICENSES.md", distDir), "utf8"); - expect(content).toContain("# Licenses of Bundled Dependencies"); - expect(content).toContain("# Bundled Dependencies"); - expect(content).toContain("MIT"); - }); - - test("license file contains bundled dependency info", async () => { - const content = await readFile(new URL("THIRD-PARTY-LICENSES.md", distDir), "utf8"); - expect(content).toContain("## defu"); - expect(content).toContain("License: MIT"); - expect(content).toContain("Pooya Parsa"); - expect(content).toContain("> MIT License"); + expect(content).toMatchSnapshot(); }); }); From e4b1981458f375e41b494706c5b65dc7375841be Mon Sep 17 00:00:00 2001 From: naitokosuke Date: Fri, 3 Apr 2026 10:59:14 +0900 Subject: [PATCH 3/7] chore: fmt --- src/builders/plugins/license.ts | 43 +++++++-------------------------- 1 file changed, 9 insertions(+), 34 deletions(-) diff --git a/src/builders/plugins/license.ts b/src/builders/plugins/license.ts index 7d494f4..1a8fe49 100644 --- a/src/builders/plugins/license.ts +++ b/src/builders/plugins/license.ts @@ -28,9 +28,7 @@ interface Dependency { repository?: string | { type?: string; url: string }; } -async function collectDependencies( - moduleIds: Iterable, -): Promise { +async function collectDependencies(moduleIds: Iterable): Promise { const seen = new Set(); const deps: Dependency[] = []; @@ -38,23 +36,15 @@ async function collectDependencies( const nodeModulesIdx = id.lastIndexOf(`${sep}node_modules${sep}`); if (nodeModulesIdx === -1) continue; - const afterNodeModules = id.slice( - nodeModulesIdx + `${sep}node_modules${sep}`.length, - ); + const afterNodeModules = id.slice(nodeModulesIdx + `${sep}node_modules${sep}`.length); // Handle scoped packages (@scope/name) const parts = afterNodeModules.split(sep); - const pkgName = - parts[0].startsWith("@") ? `${parts[0]}/${parts[1]}` : parts[0]; + const pkgName = parts[0].startsWith("@") ? `${parts[0]}/${parts[1]}` : parts[0]; if (seen.has(pkgName)) continue; seen.add(pkgName); - const pkgDir = id.slice( - 0, - nodeModulesIdx + - `${sep}node_modules${sep}`.length + - pkgName.length, - ); + const pkgDir = id.slice(0, nodeModulesIdx + `${sep}node_modules${sep}`.length + pkgName.length); const pkgJsonPath = join(pkgDir, "package.json"); try { @@ -109,17 +99,10 @@ export default function licensePlugin(opts: { output: string }): Plugin { }; } -async function generateLicenseFile( - dependencies: Dependency[], - output: string, -): Promise { +async function generateLicenseFile(dependencies: Dependency[], output: string): Promise { const deps = sortDependencies([...dependencies]); const licenses = sortLicenses( - new Set( - dependencies - .map((dep: Dependency) => dep.license) - .filter(Boolean) as string[], - ), + new Set(dependencies.map((dep: Dependency) => dep.license).filter(Boolean) as string[]), ); let dependencyLicenseTexts = ""; @@ -143,9 +126,7 @@ async function generateLicenseFile( if ( depInfos.length > 1 && depInfos.every( - (info) => - info.license === depInfos[0].license && - info.names === depInfos[0].names, + (info) => info.license === depInfos[0].license && info.names === depInfos[0].names, ) ) { const { license, names } = depInfos[0]; @@ -214,11 +195,7 @@ async function generateLicenseFile( function sortDependencies(dependencies: Dependency[]) { return dependencies.sort(({ name: nameA }, { name: nameB }) => { - return (nameA || "") > (nameB || "") - ? 1 - : (nameB || "") > (nameA || "") - ? -1 - : 0; + return (nameA || "") > (nameB || "") ? 1 : (nameB || "") > (nameA || "") ? -1 : 0; }); } @@ -263,9 +240,7 @@ function getDependencyInformation(dep: Dependency): DependencyInfo { } if (repository) { - info.repository = normalizeGitUrl( - typeof repository === "string" ? repository : repository.url, - ); + info.repository = normalizeGitUrl(typeof repository === "string" ? repository : repository.url); } return info; From 5d31abdb29fa50ac9e2032ed4ba3566762ec9bca Mon Sep 17 00:00:00 2001 From: naitokosuke Date: Fri, 3 Apr 2026 11:04:21 +0900 Subject: [PATCH 4/7] chore: unnecessary non-null assertion --- src/builders/plugins/license.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builders/plugins/license.ts b/src/builders/plugins/license.ts index 1a8fe49..84cb182 100644 --- a/src/builders/plugins/license.ts +++ b/src/builders/plugins/license.ts @@ -188,8 +188,8 @@ async function generateLicenseFile(dependencies: Dependency[], output: string): console.log("Writing third-party licenses to", output); - await mkdir(dirname(output!), { recursive: true }); - await writeFile(output!, licenseText); + await mkdir(dirname(output), { recursive: true }); + await writeFile(output, licenseText); } } From af8fc1f506db404e71e9fc8d5f4c8cd1d77d69b4 Mon Sep 17 00:00:00 2001 From: naitokosuke Date: Fri, 3 Apr 2026 11:11:19 +0900 Subject: [PATCH 5/7] refactor: use join() --- src/builders/plugins/license.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/builders/plugins/license.ts b/src/builders/plugins/license.ts index 84cb182..0626a11 100644 --- a/src/builders/plugins/license.ts +++ b/src/builders/plugins/license.ts @@ -39,12 +39,13 @@ async function collectDependencies(moduleIds: Iterable): Promise Date: Fri, 3 Apr 2026 12:08:31 +0900 Subject: [PATCH 6/7] fix --- src/builders/plugins/license.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/builders/plugins/license.ts b/src/builders/plugins/license.ts index 0626a11..a4827ac 100644 --- a/src/builders/plugins/license.ts +++ b/src/builders/plugins/license.ts @@ -41,11 +41,10 @@ async function collectDependencies(moduleIds: Iterable): Promise Date: Fri, 3 Apr 2026 12:11:46 +0900 Subject: [PATCH 7/7] fix: normalize module ID paths to POSIX slashes for Windows compatibility Rolldown normalizes module IDs to use forward slashes, but the license plugin used platform-dependent `path.sep`. This caused `node_modules` lookup to fail on Windows. Use `/` directly and normalize backslashes. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/builders/plugins/license.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/builders/plugins/license.ts b/src/builders/plugins/license.ts index a4827ac..5b3259e 100644 --- a/src/builders/plugins/license.ts +++ b/src/builders/plugins/license.ts @@ -8,7 +8,7 @@ import { appendFile, mkdir, readFile, writeFile } from "node:fs/promises"; import { existsSync } from "node:fs"; -import { dirname, join, sep } from "node:path"; +import { dirname, join } from "node:path"; import type { Plugin, PluginContext } from "rolldown"; interface Person { @@ -33,15 +33,16 @@ async function collectDependencies(moduleIds: Iterable): Promise