Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/curvy-lies-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@changesets/ghcommit": patch
---

Fixed an issue that caused GitHub types being bundled into the package and thus creating type incompatibilities in the dependent projects.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.27.7",
"@graphql-codegen/cli": "^7.0.0",
"@octokit/core": "^6.1.2",
"@octokit/graphql": "^8.1.1",
"@tsconfig/node22": "^22.0.5",
"@types/node": "^20.11.24",
"dotenv": "^16.4.5",
Expand Down
99 changes: 0 additions & 99 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 34 additions & 3 deletions src/github/graphql/queries.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
export type GitHubClient = ReturnType<
typeof import("@actions/github").getOctokit
>;
// Octokit types are messy. To avoid adding any (peer)dependencies we rely on TS structural typing here
export type GitHubClient = {
graphql: <T>(
query: string,
variables?: Record<string, unknown>,
) => Promise<T>;
rest: {
git: {
createRef: (params: {
owner: string;
repo: string;
ref: string;
sha: string;
}) => Promise<{ data: { node_id?: string } }>;
updateRef: (params: {
owner: string;
repo: string;
ref: string;
sha: string;
force?: boolean;
}) => Promise<{ data: { node_id?: string } }>;
deleteRef: (params: {
owner: string;
repo: string;
ref: string;
}) => Promise<unknown>;
getRef?: (params: {
owner: string;
repo: string;
ref: string;
}) => Promise<unknown>;
};
};
};

import type {
CreateCommitOnBranchMutation,
Expand Down
3 changes: 3 additions & 0 deletions tsdown.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export default defineConfig({
exports: false,
// useful for running `build --watch` and `test` concurrently
clean: !process.argv.includes("--watch"),
deps: {
onlyBundle: [], // require explicitly listing inlined dependencies
},

sourcemap: !isCi,
dts: { enabled: true, parallel: !isCi, sourcemap: !isCi },
Expand Down