Skip to content

Commit 7c781ff

Browse files
authored
Merge branch 'master' into fix-documents-when-no-operations
2 parents 53cfb4a + d8ce10a commit 7c781ff

417 files changed

Lines changed: 17244 additions & 13777 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.cjs

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
root: true,
3-
extends: ['@theguild'],
3+
extends: ['@theguild', 'plugin:tailwindcss/recommended'],
44
rules: {
55
'no-empty': 'off',
66
'@typescript-eslint/explicit-module-boundary-types': 'off',
@@ -14,10 +14,7 @@ module.exports = {
1414
'@typescript-eslint/explicit-function-return-type': 'off',
1515
'@typescript-eslint/ban-ts-ignore': 'off',
1616
'@typescript-eslint/ban-types': 'off',
17-
'import/no-extraneous-dependencies': [
18-
'error',
19-
{ devDependencies: ['**/*.test.ts', '**/*.spec.ts', '**/test/**/*.ts'] },
20-
],
17+
'import/no-extraneous-dependencies': 'error',
2118

2219
// todo: enable
2320
'unicorn/filename-case': 'off',
@@ -36,12 +33,17 @@ module.exports = {
3633
extends: '@theguild/eslint-config/react',
3734
},
3835
{
39-
files: ['**/tests/**/*.{js,ts,tsx}', '**/graphql-codegen-testing/**/*.ts', '*.spec.ts'],
40-
env: {
41-
jest: true,
42-
},
36+
files: [
37+
'*.spec.ts',
38+
'**/tests/**/*.{js,ts,tsx,cjs}',
39+
'**/graphql-codegen-testing/**/*.ts',
40+
'**/vitest.config.ts',
41+
'**/vitest.setup.ts',
42+
'**/__mocks__/*',
43+
],
4344
rules: {
4445
'import/no-extraneous-dependencies': 'off',
46+
'@typescript-eslint/no-require-imports': 'off',
4547
},
4648
},
4749
{
@@ -56,6 +58,12 @@ module.exports = {
5658
project: ['./tsconfig.json'],
5759
},
5860
},
61+
{
62+
files: ['scripts/*.{ts,js}', 'prettier.config.cjs'],
63+
rules: {
64+
'@typescript-eslint/no-require-imports': 'off',
65+
},
66+
},
5967
],
6068
ignorePatterns: [
6169
'dev-test',

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ body:
6666
- type: textarea
6767
id: context
6868
attributes:
69-
label: Is your feature request related to a problem? Please describe.
70-
description: 'Add any other context or screenshots about the feature request here.'
69+
label: Any additional important details?
70+
description: 'Add context or screenshots about the feature request here.'
7171
validations:
7272
required: false

.github/workflows/main.yml

Lines changed: 52 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout Master
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2929
- name: Setup env
3030
uses: the-guild-org/shared-config/setup@main
31-
with:
32-
nodeVersion: 18
3331
- name: Prettier Check
3432
run: yarn prettier:check
3533
dev-tests-old:
@@ -42,11 +40,9 @@ jobs:
4240
- 'esm'
4341
steps:
4442
- name: Checkout
45-
uses: actions/checkout@v3
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4644
- name: Setup env
4745
uses: the-guild-org/shared-config/setup@main
48-
with:
49-
nodeVersion: 18
5046
- name: Build
5147
run: yarn build
5248
env:
@@ -56,48 +52,69 @@ jobs:
5652
yarn run generate:examples:${{matrix.method}}
5753
git diff --exit-code -- dev-test/
5854
dev-tests:
59-
name: Examples
55+
name: Examples - Normal
6056
runs-on: ubuntu-latest
6157
steps:
6258
- name: Checkout
63-
uses: actions/checkout@v3
59+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
6460
- name: Setup env
6561
uses: the-guild-org/shared-config/setup@main
66-
with:
67-
nodeVersion: 18
68-
- uses: actions-rs/toolchain@v1
69-
with:
70-
toolchain: 1.65.0
71-
target: wasm32-wasi
72-
override: true
73-
- name: Build SWC plugin
74-
working-directory: ./packages/presets/swc-plugin
75-
run: |
76-
npm run build-wasm
7762
- name: Build
7863
run: yarn build
7964
env:
8065
CI: true
8166
- name: Generate and Diff Codegen Artifacts
8267
run: |
83-
yarn examples:codegen
68+
EXAMPLE_TYPE=normal yarn examples:codegen
8469
git diff --exit-code -- examples/
8570
- name: Build Examples
8671
run: |
87-
yarn examples:build
72+
EXAMPLE_TYPE=normal yarn examples:build
8873
- name: End2End Test Examples
8974
run: |
90-
yarn examples:test:end2end
75+
EXAMPLE_TYPE=normal yarn examples:test:end2end
76+
77+
# TODO: Remove all SWC test setup and references as that has been moved to https://github.com/swc-project/plugins/tree/main/contrib/graphql-codegen-client-preset
78+
# dev-tests-swc:
79+
# name: Examples - SWC
80+
# runs-on: ubuntu-latest
81+
# steps:
82+
# - name: Checkout
83+
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
84+
# - name: Setup env
85+
# uses: the-guild-org/shared-config/setup@main
86+
# - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
87+
# with:
88+
# toolchain: 1.65.0
89+
# target: wasm32-wasi
90+
# override: true
91+
# - name: Build SWC plugin
92+
# working-directory: ./packages/presets/swc-plugin
93+
# run: |
94+
# npm run build-wasm
95+
# - name: Build
96+
# run: yarn build
97+
# env:
98+
# CI: true
99+
# - name: Generate and Diff Codegen Artifacts
100+
# run: |
101+
# EXAMPLE_TYPE=swc yarn examples:codegen
102+
# git diff --exit-code -- examples/
103+
# - name: Build Examples
104+
# run: |
105+
# EXAMPLE_TYPE=swc yarn examples:build
106+
# - name: End2End Test Examples
107+
# run: |
108+
# EXAMPLE_TYPE=swc yarn examples:test:end2end
109+
91110
esm:
92111
name: Testing exports integrity
93112
runs-on: ubuntu-latest
94113
steps:
95114
- name: Checkout
96-
uses: actions/checkout@v3
115+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
97116
- name: Setup env
98117
uses: the-guild-org/shared-config/setup@main
99-
with:
100-
nodeVersion: 18
101118
- name: Build
102119
run: yarn build
103120
env:
@@ -114,15 +131,15 @@ jobs:
114131
strategy:
115132
matrix:
116133
os: [ubuntu-latest] # remove windows to speed up the tests
117-
node_version: [16, 18, 20]
134+
node_version: [20, 22, 24]
118135
graphql_version: [15, 16]
119136
include:
120-
- node-version: 14
137+
- node-version: 20
121138
os: windows-latest
122139
graphql_version: 16
123140
steps:
124141
- name: Checkout
125-
uses: actions/checkout@v3
142+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
126143
- name: Setup env
127144
uses: the-guild-org/shared-config/setup@main
128145
with:
@@ -131,13 +148,13 @@ jobs:
131148
run: node ./scripts/match-graphql.js ${{matrix.graphql_version}}
132149
- name: Install Dependencies
133150
run: yarn
134-
- name: Cache Jest
135-
uses: actions/cache@v3
151+
- name: Cache Vitest
152+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
136153
with:
137-
path: .cache/jest
138-
key: ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-jest-${{hashFiles('yarn.lock')}}
154+
path: node_modules/.vite
155+
key: ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-vitest-${{hashFiles('yarn.lock')}}
139156
restore-keys: |
140-
${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-jest-
157+
${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-vitest-
141158
- name: Build
142159
run: yarn build
143160
- name: Test
@@ -148,8 +165,8 @@ jobs:
148165
name: Build and Unit Test SWC Plugin
149166
runs-on: ubuntu-latest
150167
steps:
151-
- uses: actions/checkout@v3
152-
- uses: actions-rs/toolchain@v1
168+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
169+
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
153170
with:
154171
toolchain: 1.65.0
155172
target: wasm32-wasi

.github/workflows/pr.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ on:
55
- master
66

77
jobs:
8-
dependencies:
9-
uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@main
10-
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
11-
secrets:
12-
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
8+
# dependencies:
9+
# uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@main
10+
# if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
11+
# secrets:
12+
# githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
1313

1414
alpha:
1515
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
1616
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
1717
with:
1818
npmTag: alpha
1919
buildScript: build
20-
nodeVersion: 18
2120
secrets:
2221
githubToken: ${{ secrets.GITHUB_TOKEN }}
2322
npmToken: ${{ secrets.NPM_TOKEN }}
@@ -29,7 +28,6 @@ jobs:
2928
npmTag: rc
3029
restoreDeletedChangesets: true
3130
buildScript: build
32-
nodeVersion: 18
3331
secrets:
3432
githubToken: ${{ secrets.GITHUB_TOKEN }}
3533
npmToken: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
1010
with:
1111
releaseScript: release
12-
nodeVersion: 18
1312
secrets:
14-
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
13+
# githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
14+
githubToken: ${{ secrets.GITHUB_TOKEN }}
1515
npmToken: ${{ secrets.NPM_TOKEN }}

.github/workflows/rust.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ jobs:
66
publish-rust-swc-plugin:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1010
# Setup .npmrc file to publish to npm
11-
- uses: actions/setup-node@v3
11+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
1212
with:
1313
node-version: '18.x'
1414
registry-url: 'https://registry.npmjs.org'
15-
- uses: actions-rs/toolchain@v1
15+
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
1616
with:
1717
toolchain: 1.65.0
1818
target: wasm32-wasi

.github/workflows/website-integrity.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1212

1313
- name: Fetch
1414
run: git fetch origin master
1515

1616
- name: Setup env
1717
uses: the-guild-org/shared-config/setup@main
18-
with:
19-
nodeVersion: 18
2018

2119
- name: Build Packages
2220
run: yarn build
@@ -39,7 +37,7 @@ jobs:
3937
4038
- name: Publish a message
4139
if: always() && contains(steps.diff_result.outputs.result, 'diff')
42-
uses: marocchino/sticky-pull-request-comment@v2
40+
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2
4341
with:
4442
message: |
4543
```diff

.github/workflows/website.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,12 @@ jobs:
1414
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
1515
steps:
1616
- name: checkout
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1818
with:
1919
fetch-depth: 0
2020

2121
- uses: the-guild-org/shared-config/setup@main
2222
name: setup env
23-
with:
24-
nodeVersion: 18
25-
packageManager: yarn
2623

2724
- uses: the-guild-org/shared-config/website-cf@main
2825
name: build and deploy website

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
22

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ website/src/components/live-demo/LiveDemo.tsx
3030
# This should be added bc our rust test setup for the SWC plugin does a string diff, and it fails
3131
# bc it compares imports with double quotes against the formatted perttier single quotes
3232
packages/presets/swc-plugin/tests/fixtures
33+
34+
# Ignore intentional error files
35+
packages/graphql-codegen-cli/tests/test-files/schema-dir/error-schema.graphql
36+
packages/graphql-codegen-cli/tests/test-files/error-document.graphql

0 commit comments

Comments
 (0)