diff --git a/package.json b/package.json index a3764a6..561e211 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "dependencies": { "c12": "^1.10.0", "colorette": "^2.0.20", + "confbox": "^0.1.7", "consola": "^3.2.3", "convert-gitmoji": "^0.1.5", "execa": "^8.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 49093cb..f399b04 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ dependencies: colorette: specifier: ^2.0.20 version: 2.0.20 + confbox: + specifier: ^0.1.7 + version: 0.1.7 consola: specifier: ^3.2.3 version: 3.2.3 @@ -110,7 +113,7 @@ packages: dev: true /@babel/code-frame@7.22.13: - resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} + resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==, tarball: https://repo.linecorp.com/repository/npm/@babel/code-frame/-/code-frame-7.22.13.tgz} engines: {node: '>=6.9.0'} requiresBuild: true dependencies: @@ -330,7 +333,7 @@ packages: dev: true /@esbuild/android-arm64@0.18.20: - resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -339,7 +342,7 @@ packages: optional: true /@esbuild/android-arm64@0.19.5: - resolution: {integrity: sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==} + resolution: {integrity: sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -348,7 +351,7 @@ packages: optional: true /@esbuild/android-arm@0.18.20: - resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/android-arm/-/android-arm-0.18.20.tgz} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -357,7 +360,7 @@ packages: optional: true /@esbuild/android-arm@0.19.5: - resolution: {integrity: sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==} + resolution: {integrity: sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/android-arm/-/android-arm-0.19.5.tgz} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -366,7 +369,7 @@ packages: optional: true /@esbuild/android-x64@0.18.20: - resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/android-x64/-/android-x64-0.18.20.tgz} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -375,7 +378,7 @@ packages: optional: true /@esbuild/android-x64@0.19.5: - resolution: {integrity: sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==} + resolution: {integrity: sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/android-x64/-/android-x64-0.19.5.tgz} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -384,7 +387,7 @@ packages: optional: true /@esbuild/darwin-arm64@0.18.20: - resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -393,7 +396,7 @@ packages: optional: true /@esbuild/darwin-arm64@0.19.5: - resolution: {integrity: sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==} + resolution: {integrity: sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -402,7 +405,7 @@ packages: optional: true /@esbuild/darwin-x64@0.18.20: - resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -411,7 +414,7 @@ packages: optional: true /@esbuild/darwin-x64@0.19.5: - resolution: {integrity: sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==} + resolution: {integrity: sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -420,7 +423,7 @@ packages: optional: true /@esbuild/freebsd-arm64@0.18.20: - resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -429,7 +432,7 @@ packages: optional: true /@esbuild/freebsd-arm64@0.19.5: - resolution: {integrity: sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==} + resolution: {integrity: sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -438,7 +441,7 @@ packages: optional: true /@esbuild/freebsd-x64@0.18.20: - resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -447,7 +450,7 @@ packages: optional: true /@esbuild/freebsd-x64@0.19.5: - resolution: {integrity: sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==} + resolution: {integrity: sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -456,7 +459,7 @@ packages: optional: true /@esbuild/linux-arm64@0.18.20: - resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -465,7 +468,7 @@ packages: optional: true /@esbuild/linux-arm64@0.19.5: - resolution: {integrity: sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==} + resolution: {integrity: sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -474,7 +477,7 @@ packages: optional: true /@esbuild/linux-arm@0.18.20: - resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -483,7 +486,7 @@ packages: optional: true /@esbuild/linux-arm@0.19.5: - resolution: {integrity: sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==} + resolution: {integrity: sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -492,7 +495,7 @@ packages: optional: true /@esbuild/linux-ia32@0.18.20: - resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -501,7 +504,7 @@ packages: optional: true /@esbuild/linux-ia32@0.19.5: - resolution: {integrity: sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==} + resolution: {integrity: sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -510,7 +513,7 @@ packages: optional: true /@esbuild/linux-loong64@0.18.20: - resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -519,7 +522,7 @@ packages: optional: true /@esbuild/linux-loong64@0.19.5: - resolution: {integrity: sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==} + resolution: {integrity: sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -528,7 +531,7 @@ packages: optional: true /@esbuild/linux-mips64el@0.18.20: - resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -537,7 +540,7 @@ packages: optional: true /@esbuild/linux-mips64el@0.19.5: - resolution: {integrity: sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==} + resolution: {integrity: sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -546,7 +549,7 @@ packages: optional: true /@esbuild/linux-ppc64@0.18.20: - resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -555,7 +558,7 @@ packages: optional: true /@esbuild/linux-ppc64@0.19.5: - resolution: {integrity: sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==} + resolution: {integrity: sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -564,7 +567,7 @@ packages: optional: true /@esbuild/linux-riscv64@0.18.20: - resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -573,7 +576,7 @@ packages: optional: true /@esbuild/linux-riscv64@0.19.5: - resolution: {integrity: sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==} + resolution: {integrity: sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -582,7 +585,7 @@ packages: optional: true /@esbuild/linux-s390x@0.18.20: - resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -591,7 +594,7 @@ packages: optional: true /@esbuild/linux-s390x@0.19.5: - resolution: {integrity: sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==} + resolution: {integrity: sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -600,7 +603,7 @@ packages: optional: true /@esbuild/linux-x64@0.18.20: - resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -609,7 +612,7 @@ packages: optional: true /@esbuild/linux-x64@0.19.5: - resolution: {integrity: sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==} + resolution: {integrity: sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -618,7 +621,7 @@ packages: optional: true /@esbuild/netbsd-x64@0.18.20: - resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -627,7 +630,7 @@ packages: optional: true /@esbuild/netbsd-x64@0.19.5: - resolution: {integrity: sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==} + resolution: {integrity: sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -636,7 +639,7 @@ packages: optional: true /@esbuild/openbsd-x64@0.18.20: - resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -645,7 +648,7 @@ packages: optional: true /@esbuild/openbsd-x64@0.19.5: - resolution: {integrity: sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==} + resolution: {integrity: sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -654,7 +657,7 @@ packages: optional: true /@esbuild/sunos-x64@0.18.20: - resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -663,7 +666,7 @@ packages: optional: true /@esbuild/sunos-x64@0.19.5: - resolution: {integrity: sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==} + resolution: {integrity: sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -672,7 +675,7 @@ packages: optional: true /@esbuild/win32-arm64@0.18.20: - resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -681,7 +684,7 @@ packages: optional: true /@esbuild/win32-arm64@0.19.5: - resolution: {integrity: sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==} + resolution: {integrity: sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -690,7 +693,7 @@ packages: optional: true /@esbuild/win32-ia32@0.18.20: - resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -699,7 +702,7 @@ packages: optional: true /@esbuild/win32-ia32@0.19.5: - resolution: {integrity: sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==} + resolution: {integrity: sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -708,7 +711,7 @@ packages: optional: true /@esbuild/win32-x64@0.18.20: - resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -717,7 +720,7 @@ packages: optional: true /@esbuild/win32-x64@0.19.5: - resolution: {integrity: sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==} + resolution: {integrity: sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==, tarball: http://repo.linecorp.com/repository/npm/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -949,7 +952,7 @@ packages: dev: true /@rollup/rollup-android-arm-eabi@4.12.1: - resolution: {integrity: sha512-iU2Sya8hNn1LhsYyf0N+L4Gf9Qc+9eBTJJJsaOGUp+7x4n2M9dxTt8UvhJl3oeftSjblSlpCfvjA/IfP3g5VjQ==} + resolution: {integrity: sha512-iU2Sya8hNn1LhsYyf0N+L4Gf9Qc+9eBTJJJsaOGUp+7x4n2M9dxTt8UvhJl3oeftSjblSlpCfvjA/IfP3g5VjQ==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.1.tgz} cpu: [arm] os: [android] requiresBuild: true @@ -957,7 +960,7 @@ packages: optional: true /@rollup/rollup-android-arm64@4.12.1: - resolution: {integrity: sha512-wlzcWiH2Ir7rdMELxFE5vuM7D6TsOcJ2Yw0c3vaBR3VOsJFVTx9xvwnAvhgU5Ii8Gd6+I11qNHwndDscIm0HXg==} + resolution: {integrity: sha512-wlzcWiH2Ir7rdMELxFE5vuM7D6TsOcJ2Yw0c3vaBR3VOsJFVTx9xvwnAvhgU5Ii8Gd6+I11qNHwndDscIm0HXg==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.1.tgz} cpu: [arm64] os: [android] requiresBuild: true @@ -965,7 +968,7 @@ packages: optional: true /@rollup/rollup-darwin-arm64@4.12.1: - resolution: {integrity: sha512-YRXa1+aZIFN5BaImK+84B3uNK8C6+ynKLPgvn29X9s0LTVCByp54TB7tdSMHDR7GTV39bz1lOmlLDuedgTwwHg==} + resolution: {integrity: sha512-YRXa1+aZIFN5BaImK+84B3uNK8C6+ynKLPgvn29X9s0LTVCByp54TB7tdSMHDR7GTV39bz1lOmlLDuedgTwwHg==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.1.tgz} cpu: [arm64] os: [darwin] requiresBuild: true @@ -973,7 +976,7 @@ packages: optional: true /@rollup/rollup-darwin-x64@4.12.1: - resolution: {integrity: sha512-opjWJ4MevxeA8FhlngQWPBOvVWYNPFkq6/25rGgG+KOy0r8clYwL1CFd+PGwRqqMFVQ4/Qd3sQu5t7ucP7C/Uw==} + resolution: {integrity: sha512-opjWJ4MevxeA8FhlngQWPBOvVWYNPFkq6/25rGgG+KOy0r8clYwL1CFd+PGwRqqMFVQ4/Qd3sQu5t7ucP7C/Uw==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.1.tgz} cpu: [x64] os: [darwin] requiresBuild: true @@ -981,7 +984,7 @@ packages: optional: true /@rollup/rollup-linux-arm-gnueabihf@4.12.1: - resolution: {integrity: sha512-uBkwaI+gBUlIe+EfbNnY5xNyXuhZbDSx2nzzW8tRMjUmpScd6lCQYKY2V9BATHtv5Ef2OBq6SChEP8h+/cxifQ==} + resolution: {integrity: sha512-uBkwaI+gBUlIe+EfbNnY5xNyXuhZbDSx2nzzW8tRMjUmpScd6lCQYKY2V9BATHtv5Ef2OBq6SChEP8h+/cxifQ==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.1.tgz} cpu: [arm] os: [linux] requiresBuild: true @@ -989,47 +992,52 @@ packages: optional: true /@rollup/rollup-linux-arm64-gnu@4.12.1: - resolution: {integrity: sha512-0bK9aG1kIg0Su7OcFTlexkVeNZ5IzEsnz1ept87a0TUgZ6HplSgkJAnFpEVRW7GRcikT4GlPV0pbtVedOaXHQQ==} + resolution: {integrity: sha512-0bK9aG1kIg0Su7OcFTlexkVeNZ5IzEsnz1ept87a0TUgZ6HplSgkJAnFpEVRW7GRcikT4GlPV0pbtVedOaXHQQ==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.1.tgz} cpu: [arm64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true /@rollup/rollup-linux-arm64-musl@4.12.1: - resolution: {integrity: sha512-qB6AFRXuP8bdkBI4D7UPUbE7OQf7u5OL+R94JE42Z2Qjmyj74FtDdLGeriRyBDhm4rQSvqAGCGC01b8Fu2LthQ==} + resolution: {integrity: sha512-qB6AFRXuP8bdkBI4D7UPUbE7OQf7u5OL+R94JE42Z2Qjmyj74FtDdLGeriRyBDhm4rQSvqAGCGC01b8Fu2LthQ==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.1.tgz} cpu: [arm64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true /@rollup/rollup-linux-riscv64-gnu@4.12.1: - resolution: {integrity: sha512-sHig3LaGlpNgDj5o8uPEoGs98RII8HpNIqFtAI8/pYABO8i0nb1QzT0JDoXF/pxzqO+FkxvwkHZo9k0NJYDedg==} + resolution: {integrity: sha512-sHig3LaGlpNgDj5o8uPEoGs98RII8HpNIqFtAI8/pYABO8i0nb1QzT0JDoXF/pxzqO+FkxvwkHZo9k0NJYDedg==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.1.tgz} cpu: [riscv64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true /@rollup/rollup-linux-x64-gnu@4.12.1: - resolution: {integrity: sha512-nD3YcUv6jBJbBNFvSbp0IV66+ba/1teuBcu+fBBPZ33sidxitc6ErhON3JNavaH8HlswhWMC3s5rgZpM4MtPqQ==} + resolution: {integrity: sha512-nD3YcUv6jBJbBNFvSbp0IV66+ba/1teuBcu+fBBPZ33sidxitc6ErhON3JNavaH8HlswhWMC3s5rgZpM4MtPqQ==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.1.tgz} cpu: [x64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true /@rollup/rollup-linux-x64-musl@4.12.1: - resolution: {integrity: sha512-7/XVZqgBby2qp/cO0TQ8uJK+9xnSdJ9ct6gSDdEr4MfABrjTyrW6Bau7HQ73a2a5tPB7hno49A0y1jhWGDN9OQ==} + resolution: {integrity: sha512-7/XVZqgBby2qp/cO0TQ8uJK+9xnSdJ9ct6gSDdEr4MfABrjTyrW6Bau7HQ73a2a5tPB7hno49A0y1jhWGDN9OQ==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.1.tgz} cpu: [x64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true /@rollup/rollup-win32-arm64-msvc@4.12.1: - resolution: {integrity: sha512-CYc64bnICG42UPL7TrhIwsJW4QcKkIt9gGlj21gq3VV0LL6XNb1yAdHVp1pIi9gkts9gGcT3OfUYHjGP7ETAiw==} + resolution: {integrity: sha512-CYc64bnICG42UPL7TrhIwsJW4QcKkIt9gGlj21gq3VV0LL6XNb1yAdHVp1pIi9gkts9gGcT3OfUYHjGP7ETAiw==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.1.tgz} cpu: [arm64] os: [win32] requiresBuild: true @@ -1037,7 +1045,7 @@ packages: optional: true /@rollup/rollup-win32-ia32-msvc@4.12.1: - resolution: {integrity: sha512-LN+vnlZ9g0qlHGlS920GR4zFCqAwbv2lULrR29yGaWP9u7wF5L7GqWu9Ah6/kFZPXPUkpdZwd//TNR+9XC9hvA==} + resolution: {integrity: sha512-LN+vnlZ9g0qlHGlS920GR4zFCqAwbv2lULrR29yGaWP9u7wF5L7GqWu9Ah6/kFZPXPUkpdZwd//TNR+9XC9hvA==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.1.tgz} cpu: [ia32] os: [win32] requiresBuild: true @@ -1045,7 +1053,7 @@ packages: optional: true /@rollup/rollup-win32-x64-msvc@4.12.1: - resolution: {integrity: sha512-n+vkrSyphvmU0qkQ6QBNXCGr2mKjhP08mPRM/Xp5Ck2FV4NrHU+y6axzDeixUrCBHVUS51TZhjqrKBBsHLKb2Q==} + resolution: {integrity: sha512-n+vkrSyphvmU0qkQ6QBNXCGr2mKjhP08mPRM/Xp5Ck2FV4NrHU+y6axzDeixUrCBHVUS51TZhjqrKBBsHLKb2Q==, tarball: http://repo.linecorp.com/repository/npm/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.1.tgz} cpu: [x64] os: [win32] requiresBuild: true @@ -1520,7 +1528,7 @@ packages: resolution: {integrity: sha512-0SsG7UDhoRWcuSvKWHaXmu5uNjDCDN3nkQLRL4Q42IlFy+ze58FcCoI3uPwINXinkz7ZinbhEgyzYFw9u9ZV8g==} dependencies: chokidar: 3.6.0 - confbox: 0.1.3 + confbox: 0.1.7 defu: 6.1.4 dotenv: 16.4.5 giget: 1.2.1 @@ -1710,8 +1718,8 @@ packages: typedarray: 0.0.6 dev: true - /confbox@0.1.3: - resolution: {integrity: sha512-eH3ZxAihl1PhKfpr4VfEN6/vUd87fmgb6JkldHgg/YR6aEBhW63qUDgzP2Y6WM0UumdsYp5H3kibalXAdHfbgg==} + /confbox@0.1.7: + resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==, tarball: https://repo.linecorp.com/repository/npm/confbox/-/confbox-0.1.7.tgz} dev: false /consola@3.2.3: @@ -2730,7 +2738,7 @@ packages: dev: true /fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, tarball: https://repo.linecorp.com/repository/npm/fsevents/-/fsevents-2.3.3.tgz} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -4741,7 +4749,7 @@ packages: dev: false /uglify-js@3.17.4: - resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} + resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==, tarball: https://repo.linecorp.com/repository/npm/uglify-js/-/uglify-js-3.17.4.tgz} engines: {node: '>=0.8.0'} hasBin: true requiresBuild: true diff --git a/src/commands/default.ts b/src/commands/default.ts index 02728d5..c93d919 100644 --- a/src/commands/default.ts +++ b/src/commands/default.ts @@ -65,15 +65,17 @@ export default async function defaultMain(args: Argv) { await renamePackage(config, `-${args.nameSuffix}`); } + let changedFiles = []; // Bump version optionally if (args.bump || args.release) { const bumpOptions = _getBumpVersionOptions(args); - const newVersion = await bumpVersion(commits, config, bumpOptions); - if (!newVersion) { + const bumpVersionInfo = await bumpVersion(commits, config, bumpOptions); + if (!bumpVersionInfo) { consola.error("Unable to bump version based on changes."); process.exit(1); } - config.newVersion = newVersion; + config.newVersion = bumpVersionInfo.newVersion; + changedFiles = bumpVersionInfo.changedFiles; } // Generate markdown @@ -114,7 +116,7 @@ export default async function defaultMain(args: Argv) { // Commit and tag changes for release mode if (args.release) { if (args.commit !== false) { - const filesToAdd = [config.output, "package.json"].filter( + const filesToAdd = [config.output, ...changedFiles].filter( (f) => f && typeof f === "string" ) as string[]; await execa("git", ["add", ...filesToAdd], { cwd }); diff --git a/src/package.ts b/src/package.ts index ec6bc87..a32bd7e 100644 --- a/src/package.ts +++ b/src/package.ts @@ -1,3 +1,5 @@ +import { constants, promises as fsp } from "node:fs"; + import { resolve } from "pathe"; import consola from "consola"; import { @@ -6,6 +8,8 @@ import { writePackageJSON as _writePackageJSON, } from "pkg-types"; import { isCI, provider } from "std-env"; +import { parseJSON, stringifyJSON } from "confbox"; + import type { ChangelogConfig } from "./config"; import { execCommand } from "./exec"; @@ -56,3 +60,34 @@ export async function npmPublish(config: ChangelogConfig) { return await execCommand("npm", ["publish", ...args]); } + +export async function existsPackageLockJSON( + config: ChangelogConfig, + file: "package-lock.json" | "npm-shrinkwrap.json" +) { + const path = resolve(config.cwd, file); + try { + await fsp.access(path, constants.W_OK); + return true; + } catch { + return false; + } +} + +export async function readPackageLockJSON( + config: ChangelogConfig, + file: "package-lock.json" | "npm-shrinkwrap.json" +) { + const path = resolve(config.cwd, file); + const blob = await fsp.readFile(path, "utf8"); + return parseJSON(blob); +} + +export function writePackageLockJSON( + config: ChangelogConfig, + pkg: Record, + file: "package-lock.json" | "npm-shrinkwrap.json" +) { + const path = resolve(config.cwd, file); + return fsp.writeFile(path, stringifyJSON(pkg)); +} diff --git a/src/semver.ts b/src/semver.ts index 59fa0fa..d1b1214 100644 --- a/src/semver.ts +++ b/src/semver.ts @@ -2,7 +2,13 @@ import semver from "semver"; import consola from "consola"; import type { ChangelogConfig } from "./config"; import type { GitCommit } from "./git"; -import { readPackageJSON, writePackageJSON } from "./package"; +import { + existsPackageLockJSON, + readPackageJSON, + readPackageLockJSON, + writePackageJSON, + writePackageLockJSON, +} from "./package"; export type SemverBumpType = | "major" @@ -43,7 +49,7 @@ export async function bumpVersion( commits: GitCommit[], config: ChangelogConfig, opts: BumpVersionOptions = {} -): Promise { +): Promise<{ newVersion: string; changedFiles: string[] } | undefined> { let type = opts.type || determineSemverChange(commits, config) || "patch"; const originalType = type; @@ -75,7 +81,7 @@ export async function bumpVersion( } if (pkg.version === currentVersion) { - return false; + return undefined; } consola.info( @@ -83,6 +89,21 @@ export async function bumpVersion( ); await writePackageJSON(config, pkg); + const changedFiles = ["package.json"]; - return pkg.version; + for (const file of ["package-lock.json", "npm-shrinkwrap.json"] as const) { + if (await existsPackageLockJSON(config, file)) { + const pkgLock = await readPackageLockJSON(config, file); + pkgLock.version = pkg.version; + + if (pkgLock.packages && pkgLock.packages[""]) { + pkgLock.packages[""].version = pkg.version; + } + + await writePackageLockJSON(config, pkgLock, file); + changedFiles.push(file); + } + } + + return { newVersion: pkg.version, changedFiles }; }