Skip to content

Commit f3ce427

Browse files
eddeee888github-actions[bot]dotansimha
authored
Correctly set dep of client-preset, fix publishing (#10848)
* Correctly set dep of client-preset * Fix dep linking --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Dotan Simha <dotansimha@gmail.com>
1 parent 9e61d5d commit f3ce427

9 files changed

Lines changed: 67 additions & 144 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@graphql-codegen/cli": patch
3+
---
4+
dependencies updates:
5+
- Updated dependency [`@graphql-codegen/client-preset@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-codegen/client-preset/v/workspace:^) (from `^6.0.0`, in `dependencies`)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@graphql-codegen/client-preset": patch
3+
---
4+
dependencies updates:
5+
- Updated dependency [`@graphql-codegen/gql-tag-operations@^6.0.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/gql-tag-operations/v/6.0.0) (from `6.0.0`, in `dependencies`)

.changeset/legal-cobras-hang.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-codegen/client-preset': patch
3+
---
4+
5+
Fix package pinning

.github/workflows/pr.yml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,11 @@ on:
44
branches:
55
- master
66

7-
concurrency:
8-
group: ${{ github.workflow }}-${{ github.ref }}
9-
cancel-in-progress: true
10-
11-
permissions:
12-
contents: write
13-
id-token: write
14-
pull-requests: write
15-
167
jobs:
178
dependencies:
189
uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
1910
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
20-
secrets:
21-
githubToken: ${{ secrets.GITHUB_TOKEN }}
22-
23-
alpha:
24-
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
25-
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
26-
with:
27-
npmTag: alpha
28-
buildScript: build
29-
packageManager: pnpm
30-
secrets:
31-
githubToken: ${{ secrets.GITHUB_TOKEN }}
32-
npmToken: ${{ secrets.NPM_TOKEN }}
33-
34-
release-candidate:
35-
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
36-
if: ${{ github.event.pull_request.title == 'Upcoming Release Changes' }}
37-
with:
38-
npmTag: rc
39-
restoreDeletedChangesets: true
40-
buildScript: build
41-
packageManager: pnpm
11+
permissions:
12+
contents: write # allows modifying changeset files
4213
secrets:
4314
githubToken: ${{ secrets.GITHUB_TOKEN }}
44-
npmToken: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: release
22
on:
3-
push:
3+
pull_request: # for snapshot release
4+
branches:
5+
- master
6+
7+
push: # for stable release
48
branches:
59
- master
610

@@ -9,11 +13,36 @@ concurrency:
913
cancel-in-progress: true
1014

1115
jobs:
12-
stable:
16+
release-snapshot:
17+
if:
18+
github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name ==
19+
github.repository
20+
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@1c4632ccc198d4c9b34d9e6b3d556c6f245b4e69
21+
permissions:
22+
id-token: write # allows OIDC publishing
23+
pull-requests: write # allows creating comment with alpha versions
24+
with:
25+
nodeVersion: 24
26+
npmTag: alpha
27+
packageManager: pnpm
28+
buildScript: build
29+
secrets:
30+
githubToken: ${{ secrets.GITHUB_TOKEN }}
31+
32+
release-stable:
33+
if:
34+
github.event_name == 'push' && github.event.pull_request.head.repo.full_name ==
35+
github.repository
1336
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
37+
permissions:
38+
id-token: write # allows OIDC publishing
39+
pull-requests: write # allows creating Version Packages PR
40+
contents: write # allows modifying changeset files
1441
with:
15-
releaseScript: release
42+
nodeVersion: 24
43+
npmTag: alpha
1644
packageManager: pnpm
45+
buildScript: build
46+
releaseScript: release
1747
secrets:
1848
githubToken: ${{ secrets.GITHUB_TOKEN }}
19-
npmToken: ${{ secrets.NPM_TOKEN }}

packages/graphql-codegen-cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "module",
55
"repository": {
66
"type": "git",
7-
"url": "https://github.com/dotansimha/graphql-code-generator.git",
7+
"url": "git+https://github.com/dotansimha/graphql-code-generator.git",
88
"directory": "packages/graphql-codegen-cli"
99
},
1010
"homepage": "https://github.com/dotansimha/graphql-code-generator#readme",
@@ -77,7 +77,7 @@
7777
"@babel/generator": "^7.18.13",
7878
"@babel/template": "^7.18.10",
7979
"@babel/types": "^7.18.13",
80-
"@graphql-codegen/client-preset": "^6.0.0",
80+
"@graphql-codegen/client-preset": "workspace:^",
8181
"@graphql-codegen/core": "^6.0.0",
8282
"@graphql-codegen/plugin-helpers": "^7.0.0",
8383
"@graphql-tools/apollo-engine-loader": "^8.0.28",

packages/presets/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "GraphQL Code Generator preset for client.",
66
"repository": {
77
"type": "git",
8-
"url": "https://github.com/dotansimha/graphql-code-generator.git",
8+
"url": "git+https://github.com/dotansimha/graphql-code-generator.git",
99
"directory": "packages/presets/client"
1010
},
1111
"license": "MIT",
@@ -49,7 +49,7 @@
4949
"@babel/helper-plugin-utils": "^7.20.2",
5050
"@babel/template": "^7.20.7",
5151
"@graphql-codegen/add": "^7.0.0",
52-
"@graphql-codegen/gql-tag-operations": "6.0.0",
52+
"@graphql-codegen/gql-tag-operations": "^6.0.0",
5353
"@graphql-codegen/plugin-helpers": "^7.0.0",
5454
"@graphql-codegen/typed-document-node": "^7.0.0",
5555
"@graphql-codegen/typescript": "^6.0.0",

pnpm-lock.yaml

Lines changed: 11 additions & 102 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"@graphql-codegen/add": "7.0.0",
1515
"@graphql-codegen/c-sharp": "6.0.1",
1616
"@graphql-codegen/c-sharp-operations": "4.0.1",
17-
"@graphql-codegen/cli": "7.0.0",
18-
"@graphql-codegen/client-preset": "6.0.0",
17+
"@graphql-codegen/cli": "workspace:*",
18+
"@graphql-codegen/client-preset": "workspace:*",
1919
"@graphql-codegen/core": "6.0.0",
2020
"@graphql-codegen/flow": "3.0.1",
2121
"@graphql-codegen/flow-operations": "3.0.2",

0 commit comments

Comments
 (0)