Skip to content

Commit 9bdcd81

Browse files
authored
Merge branch 'master' into typed-document-string
2 parents 4ca4b2d + c911f76 commit 9bdcd81

File tree

8 files changed

+78
-62
lines changed

8 files changed

+78
-62
lines changed

examples/programmatic-typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"prettier": "2.8.4"
2525
},
2626
"devDependencies": {
27-
"@types/node": "18.14.6",
27+
"@types/node": "18.15.0",
2828
"tsup": "6.6.3"
2929
}
3030
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"jest": "28.1.3",
5353
"jest-docblock": "28.1.1",
5454
"jest-junit": "15.0.0",
55-
"lint-staged": "13.1.2",
55+
"lint-staged": "13.2.0",
5656
"patch-package": "6.5.1",
5757
"prettier": "2.8.4",
5858
"prettier-plugin-svelte": "2.9.0",

packages/presets/swc-plugin/Cargo.lock

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

packages/presets/swc-plugin/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "swc-plugin"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
edition = "2021"
55
description = "SWC plugin for https://the-guild.dev/graphql/codegen/plugins/presets/preset-client"
66
license = "MIT"
@@ -27,7 +27,7 @@ graphql-parser = "0.4.0"
2727
pathdiff = "0.2.1"
2828
serde = "1"
2929
serde_json = "1.0.94"
30-
swc_core = { version = "0.64.*", features = ["ecma_plugin_transform", "ecma_visit", "ecma_utils", "ecma_parser", "common", "testing" ] }
30+
swc_core = { version = "0.59.*", features = ["ecma_plugin_transform", "ecma_visit", "ecma_utils", "ecma_parser", "common", "testing" ] }
3131

3232
# .cargo/config defines few alias to build plugin.
3333
# cargo build-wasi generates wasm-wasi32 binary

packages/presets/swc-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@graphql-codegen/client-preset-swc-plugin",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "A SWC plugin for https://the-guild.dev/graphql/codegen/plugins/presets/preset-client",
55
"license": "MIT",
66
"bob": false,

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@theguild/tailwind-config": "0.2.1",
1515
"@types/dedent": "0.7.0",
1616
"@types/jsonpath": "0.2.0",
17-
"@types/node": "18.14.6",
17+
"@types/node": "18.15.0",
1818
"@types/react": "18.0.28",
1919
"fast-xml-parser": "4.1.3",
2020
"jsonpath": "1.1.1",

website/src/pages/plugins/presets/preset-client.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,22 @@ module.exports = {
450450

451451
### SWC plugin
452452

453+
<Callout type="warning">
454+
As of 2023/03/11, SWC's custom plugins is still an experimental feature, that means unexpected breaking changes that
455+
makes specific nextjs versions or our plugin incompatible are possible, so please file an issue
456+
[here](https://github.com/dotansimha/graphql-code-generator/issues/new?assignees=&labels=&template=bug_report.yml&title=@graphql-codegen/client-preset-swc-plugin%20...)
457+
if you faced any unexpected behavior/errors while using the plugin.
458+
459+
Pro tip: if you faced the following obscure error, or the nextjs `dev` script just instantly terminates the process without any errors,
460+
it most likely means that SWC is not happy with your nextjs version, so try upgrading it to `latest` if possible,
461+
then let us know of your current broken version to try fixing it or documenting its no longer supported.
462+
463+
```sh
464+
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/app/node_modules/next/dist/client/router.js")'
465+
```
466+
467+
</Callout>
468+
453469
The SWC plugin is not bundled in the `client-preset` package, so you will need to install it separately:
454470
455471
<PackageCmd packages={['-D @graphql-codegen/client-preset-swc-plugin']} />

yarn.lock

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4076,10 +4076,10 @@
40764076
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
40774077
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
40784078

4079-
"@types/node@*", "@types/node@18.14.6", "@types/node@^18.11.18":
4080-
version "18.14.6"
4081-
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.14.6.tgz#ae1973dd2b1eeb1825695bb11ebfb746d27e3e93"
4082-
integrity sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==
4079+
"@types/node@*", "@types/node@18.15.0", "@types/node@^18.11.18":
4080+
version "18.15.0"
4081+
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.0.tgz#286a65e3fdffd691e170541e6ecb0410b16a38be"
4082+
integrity sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w==
40834083

40844084
"@types/node@^12.7.1":
40854085
version "12.20.55"
@@ -5422,11 +5422,16 @@ [email protected], chalk@^2.0.0, chalk@^2.1.0:
54225422
escape-string-regexp "^1.0.5"
54235423
supports-color "^4.0.0"
54245424

5425-
[email protected], chalk@^5.0.1:
5425+
54265426
version "5.0.1"
54275427
resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.0.1.tgz#ca57d71e82bb534a296df63bbacc4a1c22b2a4b6"
54285428
integrity sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==
54295429

5430+
[email protected], chalk@^5.0.1:
5431+
version "5.2.0"
5432+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3"
5433+
integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==
5434+
54305435
chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2:
54315436
version "4.1.2"
54325437
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
@@ -5760,11 +5765,6 @@ commander@^8.0.0:
57605765
resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66"
57615766
integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==
57625767

5763-
commander@^9.4.1:
5764-
version "9.5.0"
5765-
resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
5766-
integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==
5767-
57685768
[email protected], common-tags@^1.8.0:
57695769
version "1.8.2"
57705770
resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6"
@@ -7433,14 +7433,14 @@ execa@^0.8.0:
74337433
signal-exit "^3.0.0"
74347434
strip-eof "^1.0.0"
74357435

7436-
execa@^6.1.0:
7437-
version "6.1.0"
7438-
resolved "https://registry.yarnpkg.com/execa/-/execa-6.1.0.tgz#cea16dee211ff011246556388effa0818394fb20"
7439-
integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==
7436+
execa@^7.0.0:
7437+
version "7.0.0"
7438+
resolved "https://registry.yarnpkg.com/execa/-/execa-7.0.0.tgz#2a44e20e73797f6c2df23889927972386157d7e4"
7439+
integrity sha512-tQbH0pH/8LHTnwTrsKWideqi6rFB/QNUawEwrn+WHyz7PX1Tuz2u7wfTvbaNBdP5JD5LVWxNo8/A8CHNZ3bV6g==
74407440
dependencies:
74417441
cross-spawn "^7.0.3"
74427442
get-stream "^6.0.1"
7443-
human-signals "^3.0.1"
7443+
human-signals "^4.3.0"
74447444
is-stream "^3.0.0"
74457445
merge-stream "^2.0.0"
74467446
npm-run-path "^5.1.0"
@@ -8425,10 +8425,10 @@ human-signals@^2.1.0:
84258425
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
84268426
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
84278427

8428-
human-signals@^3.0.1:
8429-
version "3.0.1"
8430-
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5"
8431-
integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==
8428+
human-signals@^4.3.0:
8429+
version "4.3.0"
8430+
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.0.tgz#2095c3cd5afae40049403d4b811235b03879db50"
8431+
integrity sha512-zyzVyMjpGBX2+6cDVZeFPCdtOtdsxOeseRhB9tkQ6xXmGUNrcnBzdEKPy3VPNYz+4gy1oukVOXcrJCunSyc6QQ==
84328432

84338433
84348434
version "8.0.3"
@@ -9762,34 +9762,34 @@ levn@~0.3.0:
97629762
prelude-ls "~1.1.2"
97639763
type-check "~0.3.2"
97649764

9765-
lilconfig@2.0.6, lilconfig@^2.0.3, lilconfig@^2.0.5, lilconfig@^2.0.6:
9766-
version "2.0.6"
9767-
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4"
9768-
integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==
9765+
lilconfig@2.1.0, lilconfig@^2.0.3, lilconfig@^2.0.5, lilconfig@^2.0.6:
9766+
version "2.1.0"
9767+
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52"
9768+
integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==
97699769

97709770
lines-and-columns@^1.1.6:
97719771
version "1.2.4"
97729772
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
97739773
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
97749774

9775-
lint-staged@13.1.2:
9776-
version "13.1.2"
9777-
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.1.2.tgz#443636a0cfd834d5518d57d228130dc04c83d6fb"
9778-
integrity sha512-K9b4FPbWkpnupvK3WXZLbgu9pchUJ6N7TtVZjbaPsoizkqFUDkUReUL25xdrCljJs7uLUF3tZ7nVPeo/6lp+6w==
9775+
lint-staged@13.2.0:
9776+
version "13.2.0"
9777+
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.2.0.tgz#b7abaf79c91cd36d824f17b23a4ce5209206126a"
9778+
integrity sha512-GbyK5iWinax5Dfw5obm2g2ccUiZXNGtAS4mCbJ0Lv4rq6iEtfBSjOYdcbOtAIFtM114t0vdpViDDetjVTSd8Vw==
97799779
dependencies:
9780+
chalk "5.2.0"
97809781
cli-truncate "^3.1.0"
9781-
colorette "^2.0.19"
9782-
commander "^9.4.1"
9782+
commander "^10.0.0"
97839783
debug "^4.3.4"
9784-
execa "^6.1.0"
9785-
lilconfig "2.0.6"
9786-
listr2 "^5.0.5"
9784+
execa "^7.0.0"
9785+
lilconfig "2.1.0"
9786+
listr2 "^5.0.7"
97879787
micromatch "^4.0.5"
97889788
normalize-path "^3.0.0"
9789-
object-inspect "^1.12.2"
9789+
object-inspect "^1.12.3"
97909790
pidtree "^0.6.0"
97919791
string-argv "^0.3.1"
9792-
yaml "^2.1.3"
9792+
yaml "^2.2.1"
97939793

97949794
listr2@^3.8.3:
97959795
version "3.14.0"
@@ -9819,7 +9819,7 @@ listr2@^4.0.5:
98199819
through "^2.3.8"
98209820
wrap-ansi "^7.0.0"
98219821

9822-
listr2@^5.0.5:
9822+
listr2@^5.0.7:
98239823
version "5.0.7"
98249824
resolved "https://registry.yarnpkg.com/listr2/-/listr2-5.0.7.tgz#de69ccc4caf6bea7da03c74f7a2ffecf3904bd53"
98259825
integrity sha512-MD+qXHPmtivrHIDRwPYdfNkrzqDiuaKU/rfBcec3WMyMF3xylQj3jMq344OtvQxz7zaCFViRAeqlr2AFhPvXHw==
@@ -11186,7 +11186,7 @@ object-hash@^3.0.0:
1118611186
resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9"
1118711187
integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==
1118811188

11189-
object-inspect@^1.12.2, object-inspect@^1.9.0:
11189+
object-inspect@^1.12.2, object-inspect@^1.12.3, object-inspect@^1.9.0:
1119011190
version "1.12.3"
1119111191
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9"
1119211192
integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==
@@ -14658,7 +14658,7 @@ yaml@^1.10.0, yaml@^1.10.2:
1465814658
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
1465914659
integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==
1466014660

14661-
yaml@^2.0.0, yaml@^2.1.3:
14661+
yaml@^2.0.0, yaml@^2.2.1:
1466214662
version "2.2.1"
1466314663
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.1.tgz#3014bf0482dcd15147aa8e56109ce8632cd60ce4"
1466414664
integrity sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==

0 commit comments

Comments
 (0)