Skip to content

Commit 019f74b

Browse files
author
Minh Cung
authored
Merge branch 'master' into patch-1
2 parents 365b272 + 2139f1d commit 019f74b

File tree

852 files changed

+41392
-97587
lines changed

Some content is hidden

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

852 files changed

+41392
-97587
lines changed

.changeset/@graphql-codegen_client-preset-8757-dependencies.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/big-mice-switch.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/config.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
"access": "restricted",
66
"baseBranch": "master",
77
"updateInternalDependencies": "patch",
8-
"ignore": ["website", "example-*"],
8+
"ignore": [
9+
"website",
10+
"example-*",
11+
"@graphql-codegen/client-preset-swc-plugin",
12+
"example-apollo-client-swc-plugin",
13+
"example-react-nextjs-swr"
14+
],
915
"changelog": [
1016
"@changesets/changelog-github",
1117
{

.changeset/lemon-zebras-hunt.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

.changeset/tasty-adults-doubt.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

.changeset/unlucky-suits-pay.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,20 @@ module.exports = {
4545
},
4646
},
4747
{
48-
files: '**/tests/fixtures/*.ts',
48+
files: '**/tests/fixtures/*.{ts,js}',
4949
rules: {
5050
'@typescript-eslint/no-unused-vars': 'off',
5151
},
5252
},
5353
],
54-
ignorePatterns: ['dev-test', 'examples/front-end', 'website'],
54+
ignorePatterns: [
55+
'dev-test',
56+
'website',
57+
'examples/**/gql/**',
58+
'**/react-app-env.d.ts',
59+
'packages/presets/swc-plugin/tests/fixtures/simple-uppercase-operation-name.js',
60+
'packages/presets/swc-plugin/tests/fixtures/simple-uppercase-operation-name.other-dir.js',
61+
'**/build/**/*',
62+
'**/dist/**/*',
63+
],
5564
};

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ body:
6767
- '@graphql-codegen/typed-document-node'
6868
- '@graphql-codegen/typescript'
6969
- '@graphql-codegen/client-preset'
70-
- '@graphql-codegen/gql-tag-operations-preset'
7170
- '@graphql-codegen/graphql-modules-preset'
7271
- '@graphql-codegen/testing'
7372
- '@graphql-codegen/plugin-helpers'

.github/workflows/main.yml

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
env:
1212
NODE_OPTIONS: '--max_old_space_size=4096'
13+
CARGO_TERM_COLOR: always
1314

1415
jobs:
1516
lint:
@@ -28,10 +29,10 @@ jobs:
2829
- name: Setup env
2930
uses: the-guild-org/shared-config/setup@main
3031
with:
31-
nodeVersion: 17
32+
nodeVersion: 16
3233
- name: Prettier Check
3334
run: yarn prettier:check
34-
dev-tests:
35+
dev-tests-old:
3536
name: Validating dev-tests
3637
runs-on: ubuntu-latest
3738
strategy:
@@ -45,7 +46,7 @@ jobs:
4546
- name: Setup env
4647
uses: the-guild-org/shared-config/setup@main
4748
with:
48-
nodeVersion: 17
49+
nodeVersion: 16
4950
- name: Build
5051
run: yarn build
5152
env:
@@ -54,6 +55,39 @@ jobs:
5455
run: |
5556
yarn run generate:examples:${{matrix.method}}
5657
git diff --exit-code -- dev-test/
58+
dev-tests:
59+
name: Examples
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@v3
64+
- name: Setup env
65+
uses: the-guild-org/shared-config/setup@main
66+
with:
67+
nodeVersion: 16
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
77+
- name: Build
78+
run: yarn build
79+
env:
80+
CI: true
81+
- name: Generate and Diff Codegen Artifacts
82+
run: |
83+
yarn examples:codegen
84+
git diff --exit-code -- examples/
85+
- name: Build Examples
86+
run: |
87+
yarn examples:build
88+
- name: End2End Test Examples
89+
run: |
90+
yarn examples:test:end2end
5791
esm:
5892
name: Testing exports integrity
5993
runs-on: ubuntu-latest
@@ -63,7 +97,7 @@ jobs:
6397
- name: Setup env
6498
uses: the-guild-org/shared-config/setup@main
6599
with:
66-
nodeVersion: 17
100+
nodeVersion: 16
67101
- name: Build
68102
run: yarn build
69103
env:
@@ -81,10 +115,10 @@ jobs:
81115
strategy:
82116
matrix:
83117
os: [ubuntu-latest] # remove windows to speed up the tests
84-
node_version: [12, 14, 16, 18]
118+
node_version: [16, 18, 20]
85119
graphql_version: [15, 16]
86120
include:
87-
- node-version: 12
121+
- node-version: 14
88122
os: windows-latest
89123
graphql_version: 16
90124
steps:
@@ -111,3 +145,22 @@ jobs:
111145
run: yarn test
112146
env:
113147
CI: true
148+
test-rust-swc-plugin:
149+
name: Build and Unit Test SWC Plugin
150+
runs-on: ubuntu-latest
151+
steps:
152+
- uses: actions/checkout@v2
153+
- uses: actions-rs/toolchain@v1
154+
with:
155+
toolchain: 1.65.0
156+
target: wasm32-wasi
157+
override: true
158+
- uses: marcopolo/cargo@a527bf4d534717ff4424a84446c5d710f8833139
159+
with:
160+
working-directory: ./packages/presets/swc-plugin
161+
command: build
162+
args: --target wasm32-wasi
163+
- uses: marcopolo/cargo@a527bf4d534717ff4424a84446c5d710f8833139
164+
with:
165+
working-directory: ./packages/presets/swc-plugin
166+
command: test

.github/workflows/pr.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
jobs:
88
dependencies:
99
uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@main
10+
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
1011
secrets:
1112
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
1213

@@ -18,12 +19,25 @@ jobs:
1819
secrets:
1920
githubToken: ${{ secrets.GITHUB_TOKEN }}
2021

21-
release:
22+
alpha:
2223
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
24+
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
2325
with:
2426
npmTag: alpha
2527
buildScript: build
2628
nodeVersion: 18
2729
secrets:
2830
githubToken: ${{ secrets.GITHUB_TOKEN }}
2931
npmToken: ${{ secrets.NPM_TOKEN }}
32+
33+
release-candidate:
34+
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
35+
if: ${{ github.event.pull_request.title == 'Upcoming Release Changes' }}
36+
with:
37+
npmTag: rc
38+
restoreDeletedChangesets: true
39+
buildScript: build
40+
nodeVersion: 18
41+
secrets:
42+
githubToken: ${{ secrets.GITHUB_TOKEN }}
43+
npmToken: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ jobs:
1111
releaseScript: release
1212
nodeVersion: 18
1313
secrets:
14-
githubToken: ${{ secrets.GITHUB_TOKEN }}
14+
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
1515
npmToken: ${{ secrets.NPM_TOKEN }}
1616

1717
algolia:
1818
uses: the-guild-org/shared-config/.github/workflows/algolia-publish.yml@main
1919
secrets:
2020
githubToken: ${{ secrets.GITHUB_TOKEN }}
21-
algoliaAppId: ${{ secrets.ALGOLIA_APP_ID }}
2221
algoliaAdminApiKey: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
23-
algoliaIndexName: ${{ secrets.ALGOLIA_INDEX_NAME }}
2422
with:
2523
domain: https://www.the-guild.dev/graphql/codegen/
2624
source: 'Code Generator'

.github/workflows/rust.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Rust plugin
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
publish-rust-swc-plugin:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
# Setup .npmrc file to publish to npm
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: '18.x'
14+
registry-url: 'https://registry.npmjs.org'
15+
- uses: actions-rs/toolchain@v1
16+
with:
17+
toolchain: 1.65.0
18+
target: wasm32-wasi
19+
override: true
20+
- name: Build SWC plugin
21+
working-directory: ./packages/presets/swc-plugin
22+
run: |
23+
npm run build-wasm
24+
- name: Publish SWC plugin
25+
working-directory: ./packages/presets/swc-plugin
26+
run: |
27+
npm publish --access=public
28+
env:
29+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/website.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,15 @@ jobs:
2121
- uses: the-guild-org/shared-config/setup@main
2222
name: setup env
2323
with:
24-
nodeVersion: 17
24+
nodeVersion: 18
2525
packageManager: yarn
2626

2727
- uses: the-guild-org/shared-config/website-cf@main
2828
name: build and deploy website
2929
env:
3030
NEXT_BASE_PATH: ${{ github.ref == 'refs/heads/master' && '/graphql/codegen' || '' }}
3131
SITE_URL: ${{ github.ref == 'refs/heads/master' && 'https://the-guild.dev/graphql/codegen' || '' }}
32-
NEXT_PUBLIC_ALGOLIA_INDEX_NAME: ${{ secrets.NEXT_PUBLIC_ALGOLIA_INDEX_NAME }}
33-
NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY }}
34-
NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}
32+
NEXT_PUBLIC_MENDABLE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_MENDABLE_ANON_KEY }}
3533
with:
3634
cloudflareApiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3735
cloudflareAccountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ out/
2020
website/public/sitemap.xml
2121
website/public/_redirects
2222
.eslintcache
23+
24+
**/cypress/screenshots
25+
**/cypress/videos

0 commit comments

Comments
 (0)