diff --git a/.changeset/afraid-forks-develop.md b/.changeset/afraid-forks-develop.md deleted file mode 100644 index ebd2421..0000000 --- a/.changeset/afraid-forks-develop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@changesets/ghcommit": major ---- - -Remove `queries` export from index. You should not rely on these queries as stable APIs. diff --git a/.changeset/chatty-kiwis-fold.md b/.changeset/chatty-kiwis-fold.md deleted file mode 100644 index e5034aa..0000000 --- a/.changeset/chatty-kiwis-fold.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@changesets/ghcommit": major ---- - -Add `"engines"` field for explicit node version support. The supported node versions are `^22.11 || ^24 || >=26`. diff --git a/.changeset/humble-weeks-watch.md b/.changeset/humble-weeks-watch.md deleted file mode 100644 index 9eeec5e..0000000 --- a/.changeset/humble-weeks-watch.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@changesets/ghcommit": major ---- - -Removed the `commitFilesFromBuffers` and `commitFilesFromDirectory` APIs. These APIs were simple wrappers over the core `commitChangesFromBase64` API, which should be used instead. Read the file and pass the base64-encoded content to `commitChangesFromBase64` `fileChanges` directly. For example: - -- `Buffer.from("hello world").toString("base64")` -- `await fs.readFile("path/to/file", "base64")` diff --git a/.changeset/kind-spoons-prove.md b/.changeset/kind-spoons-prove.md deleted file mode 100644 index 5ad2782..0000000 --- a/.changeset/kind-spoons-prove.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@changesets/ghcommit": major ---- - -Remove `recursivelyFindRoot` and make `cwd` optional for `commitChangesSinceBase`. Files will also not be filtered by `cwd` by default. To only commit files from a directory, use the `filterFiles` option instead. diff --git a/.changeset/lazy-jokes-camp.md b/.changeset/lazy-jokes-camp.md deleted file mode 100644 index 5468e3f..0000000 --- a/.changeset/lazy-jokes-camp.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@changesets/ghcommit": major ---- - -Publish code as ESM only diff --git a/.changeset/little-colts-bet.md b/.changeset/little-colts-bet.md deleted file mode 100644 index e664118..0000000 --- a/.changeset/little-colts-bet.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@changesets/ghcommit": minor ---- - -Improve create, update, and force update handling in `commitFilesFromBase64`: - -- Correctly detect if the `base` is the same as `branch` by comparing their SHAs instead of names. -- Perform a normal update if the branch exists and the `base` and branch HEAD SHAs match, instead of always a force update if `force` is true. -- Always clean up created or existing temporary branches during force updates, even if it fails. -- Always return a non-nullable `refId` from `commitFilesFromBase64` (and consequently `commitChangesFromRepo`). If the commit fails, it'll throw an error instead, similar to existing parts of the implementation. diff --git a/.changeset/polite-carrots-exist.md b/.changeset/polite-carrots-exist.md deleted file mode 100644 index 3f02016..0000000 --- a/.changeset/polite-carrots-exist.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@changesets/ghcommit": minor ---- - -Support `branch` and `tag` format for `commitChangesFromRepo` `base` option. This aligns with the `commitFilesFromBase64` `base` option. diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 225e2cb..0000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "mode": "exit", - "tag": "next", - "initialVersions": { - "@changesets/ghcommit": "2.1.1" - }, - "changesets": [ - "afraid-forks-develop", - "chatty-kiwis-fold", - "humble-weeks-watch", - "kind-spoons-prove", - "lazy-jokes-camp", - "little-colts-bet", - "polite-carrots-exist", - "six-eyes-return", - "slick-bottles-try", - "sunny-nights-heal", - "tidy-chefs-bake" - ] -} diff --git a/.changeset/six-eyes-return.md b/.changeset/six-eyes-return.md deleted file mode 100644 index ce2a798..0000000 --- a/.changeset/six-eyes-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@changesets/ghcommit": minor ---- - -Replace `isomorphic-git` with direct `git` command calls to get the file changes since a given ref diff --git a/.changeset/slick-bottles-try.md b/.changeset/slick-bottles-try.md deleted file mode 100644 index 5a978b6..0000000 --- a/.changeset/slick-bottles-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@changesets/ghcommit": major ---- - -Removed all subpath exports. All APIs should be imported from root, e.g. `import { commitChangesFromRepo } from "@changesets/ghcommit"`. diff --git a/.changeset/sunny-nights-heal.md b/.changeset/sunny-nights-heal.md deleted file mode 100644 index 95226ba..0000000 --- a/.changeset/sunny-nights-heal.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@changesets/ghcommit": major ---- - -Rename public APIs and export types. Note that the existing changelog may still reference the old names, but the new names should be used instead. - -- `commitFilesFromBase64` -> `commitChanges` -- `commitChangesFromRepo` -> `commitChangesSinceBase` diff --git a/.changeset/tidy-chefs-bake.md b/.changeset/tidy-chefs-bake.md deleted file mode 100644 index 00a13fe..0000000 --- a/.changeset/tidy-chefs-bake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@changesets/ghcommit": major ---- - -Remove `log` argument from APIs. If you need to debug the package, use breakpoints or manually add logs in the package code. diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dbea94..525b57b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,41 @@ # @changesets/ghcommit +## 3.0.0 + +### Major Changes + +- [#91](https://github.com/changesets/ghcommit/pull/91) [`9ac746d`](https://github.com/changesets/ghcommit/commit/9ac746d10c551f0e167aa88e87346378860a8270) Thanks [@bluwy](https://github.com/bluwy)! - Remove `queries` export from index. You should not rely on these queries as stable APIs. + +- [#89](https://github.com/changesets/ghcommit/pull/89) [`e34689e`](https://github.com/changesets/ghcommit/commit/e34689e5f5a9334fcae2c714655fc4a0d1ccf154) Thanks [@bluwy](https://github.com/bluwy)! - Add `"engines"` field for explicit node version support. The supported node versions are `^22.11 || ^24 || >=26`. + +- [#109](https://github.com/changesets/ghcommit/pull/109) [`203f0b7`](https://github.com/changesets/ghcommit/commit/203f0b795d58f74532abe328dda815489cb215ba) Thanks [@bluwy](https://github.com/bluwy)! - Removed the `commitFilesFromBuffers` and `commitFilesFromDirectory` APIs. These APIs were simple wrappers over the core `commitChangesFromBase64` API, which should be used instead. Read the file and pass the base64-encoded content to `commitChangesFromBase64` `fileChanges` directly. For example: + - `Buffer.from("hello world").toString("base64")` + - `await fs.readFile("path/to/file", "base64")` + +- [#118](https://github.com/changesets/ghcommit/pull/118) [`e2b975d`](https://github.com/changesets/ghcommit/commit/e2b975dc48003dfa24fd18393149cd8e1d6d2037) Thanks [@bluwy](https://github.com/bluwy)! - Remove `recursivelyFindRoot` and make `cwd` optional for `commitChangesSinceBase`. Files will also not be filtered by `cwd` by default. To only commit files from a directory, use the `filterFiles` option instead. + +- [#88](https://github.com/changesets/ghcommit/pull/88) [`19ea73a`](https://github.com/changesets/ghcommit/commit/19ea73a1643cba9fd8de3583c895f1d95725cd01) Thanks [@bluwy](https://github.com/bluwy)! - Publish code as ESM only + +- [#109](https://github.com/changesets/ghcommit/pull/109) [`203f0b7`](https://github.com/changesets/ghcommit/commit/203f0b795d58f74532abe328dda815489cb215ba) Thanks [@bluwy](https://github.com/bluwy)! - Removed all subpath exports. All APIs should be imported from root, e.g. `import { commitChangesFromRepo } from "@changesets/ghcommit"`. + +- [#117](https://github.com/changesets/ghcommit/pull/117) [`165c6cb`](https://github.com/changesets/ghcommit/commit/165c6cbbd2e284a9af4ea5dacb8752798e243b70) Thanks [@bluwy](https://github.com/bluwy)! - Rename public APIs and export types. Note that the existing changelog may still reference the old names, but the new names should be used instead. + - `commitFilesFromBase64` -> `commitChanges` + - `commitChangesFromRepo` -> `commitChangesSinceBase` + +- [#110](https://github.com/changesets/ghcommit/pull/110) [`ead1e55`](https://github.com/changesets/ghcommit/commit/ead1e55ab4256f5bd73f41f751e5d23166b57b12) Thanks [@bluwy](https://github.com/bluwy)! - Remove `log` argument from APIs. If you need to debug the package, use breakpoints or manually add logs in the package code. + +### Minor Changes + +- [#116](https://github.com/changesets/ghcommit/pull/116) [`67853bf`](https://github.com/changesets/ghcommit/commit/67853bfb20c860ba1cb4069be443ba4e54c79095) Thanks [@bluwy](https://github.com/bluwy)! - Improve create, update, and force update handling in `commitFilesFromBase64`: + - Correctly detect if the `base` is the same as `branch` by comparing their SHAs instead of names. + - Perform a normal update if the branch exists and the `base` and branch HEAD SHAs match, instead of always a force update if `force` is true. + - Always clean up created or existing temporary branches during force updates, even if it fails. + - Always return a non-nullable `refId` from `commitFilesFromBase64` (and consequently `commitChangesFromRepo`). If the commit fails, it'll throw an error instead, similar to existing parts of the implementation. + +- [#111](https://github.com/changesets/ghcommit/pull/111) [`1cf711e`](https://github.com/changesets/ghcommit/commit/1cf711eac92dc535787c3af3cc488989826ee43d) Thanks [@bluwy](https://github.com/bluwy)! - Support `branch` and `tag` format for `commitChangesFromRepo` `base` option. This aligns with the `commitFilesFromBase64` `base` option. + +- [#108](https://github.com/changesets/ghcommit/pull/108) [`8b5585d`](https://github.com/changesets/ghcommit/commit/8b5585d61175b3adec43335cfae7e3160cb9e525) Thanks [@bluwy](https://github.com/bluwy)! - Replace `isomorphic-git` with direct `git` command calls to get the file changes since a given ref + ## 3.0.0-next.1 ### Major Changes diff --git a/package.json b/package.json index 3e0fad2..8d1609d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@changesets/ghcommit", - "version": "3.0.0-next.1", + "version": "3.0.0", "description": "Directly change files on github using the github API, to support GPG signing", "keywords": [ "actions",