lowsky / gh-dashboard-relay

Dashboard for all feature branches - linking to the deployed/running in docker containers and showing their states. Live Version:
https://dashboard-gh.vercel.app/
Apache License 2.0
2 stars 0 forks source link

chore(deps): update dependency relay-compiler to v18 #2749

Closed renovate[bot] closed 1 month ago

renovate[bot] commented 2 months ago

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
relay-compiler (source) 17.0.0 -> 18.1.0 age adoption passing confidence

Release Notes

facebook/relay (relay-compiler) ### [`v18.1.0`](https://redirect.github.com/facebook/relay/releases/tag/v18.1.0): Version 18.1.0 Release Notes [Compare Source](https://redirect.github.com/facebook/relay/compare/v18.0.0...v18.1.0) Following up from our v18.0.0 release last month, v18.1.0 provides a number of fixes and improvements, adds some new experimental APIs, and ships some long-running experimental features as stable. ##### Relay Resolvers are now stable For the past several years we've been iterating on [Relay Resolvers](https://relay.dev/docs/next/guides/relay-resolvers/introduction/) which provided a structured and typesafe way to model client state and derived data in your GraphQL graph. As of this release, **Relay Resolvers are enabled by default and no-longer experimental**. As part of this stabilization we shipped fixes for Relay Resolvers when used with TypeScript and fixed a few edge cases related to how errors encountered by resolvers are handled. - \[d10786]: Update docs now that resolvers are stable by Jordan Eldredge - \[4e5377]: Remove Relay Resolver compiler feature flag by Jordan Eldredge - \[7b8f1f]: Remove ENABLE_RELAY_RESOLVERS runtime feature flag by Jordan Eldredge - \[1467b6]: Stabilize LiveResolverStore as the new implementation of RelayModernStore ([#​4806](https://redirect.github.com/facebook/relay/issues/4806)) by Jordan Eldredge - \[dec5ee]: Avoid running resolver code if root fragment throws with [@​required](https://redirect.github.com/required)(action: THROW) ([#​4799](https://redirect.github.com/facebook/relay/issues/4799)) by Jordan Eldredge - \[478274]: Ensure we import the type of a resolver for RelayResolverValue fields by Jordan Eldredge - \[852fbc]: Improve edge resolver error messages by Gordy French - \[575f20]: Add satisfies type assertion for typescript ([#​4797](https://redirect.github.com/facebook/relay/issues/4797)) by Drew Atkinson - \[2314f4]: Document relay field logger ([#​4809](https://redirect.github.com/facebook/relay/issues/4809)) by Jordan Eldredge ##### Improvements to error [@​catch](https://redirect.github.com/catch) We released [`@catch`](https://relay.dev/docs/next/guides/catch-directive/) in v18.0.0 and are very excited about the capabilities it enables. Check out Itamar Kestenbaum's GraphQL conf talk about it here: [Build Confidently: How @​Catch and Error Handling Pave Way in Field Nullability](https://www.youtube.com/watch?v=\_TSYKAtaK5A). Since that release we've made a few improvements: - Fields within a `@catch` directive that are marked as `@semanticNonNull` in the schema now generate non-nullable TypeScript/Flow types. See [semantic nullability](https://relay.dev/docs/next/guides/semantic-nullability/). - Errors exposed to product code by `@catch` no-longer include the error message. This is because GraphQL error messages are generally not safe to show to users. These error messages can still be accessed by the field logger provided to your Relay Environment. In the future we plan to let users opt into allowing safe error messages through to product code. - \[26b78d]: Take advantage of [@​semanticNonNull](https://redirect.github.com/semanticNonNull) within [@​catch](https://redirect.github.com/catch) ([#​4794](https://redirect.github.com/facebook/relay/issues/4794)) by Jordan Eldredge - \[6a038d]: Replace actual server-side error with generic "server error" message by Itamar Kestenbaum - \[6c8827]: Don't report missing fields within an unmatched inline fragment by Jordan Eldredge - \[2314f4]: Document relay field logger ([#​4809](https://redirect.github.com/facebook/relay/issues/4809)) by Jordan Eldredge ##### Compiler Error Reporting We've improved how errors are reported by the Relay compiler to ensure we report as many errors as possible, and each error includes sufficient context. - \[9edbb0]: Report validation errors for all segements of a proejct by Jordan Eldredge - \[adaf8a]: Report location of operation that does not define variable by Jordan Eldredge ##### New "Copy Operation" VSCode command Our VSCode extension now includes a command to quickly copy the full text of a query directly from within your editor. ![Copy operation VSCode command](https://redirect.github.com/user-attachments/assets/25c7bbca-668b-45a1-a9e3-f6b640aaa1d8) - \[8d2380]: Add copy operation command ([#​4778](https://redirect.github.com/facebook/relay/issues/4778)) by Tobias Tengler ##### Experimental APIs for reading fragment data outside of React In some cases it can be useful to read a fragment outside of a React hook. However, doing this requires handling a number of concerns. 1. The fragment data may not yet be ready (`@defer` or Relay Resolver suspense). 2. The fragment may error (`@throwOnFieldError`, `@required(action: THROW)`) 3. The fragment's data might change over time. To enable users to read fragment data while correctly handling these cases, we've added two **experimental** APIs: - [`observeFragment`](https://relay.dev/docs/next/api-reference/relay-runtime/api-reference/observe-fragment/): Read a fragment as a stream of states where each state might be loading, error, or value. - [`waitForFragmentData`](https://relay.dev/docs/next/api-reference/wait-for-fragment-data/): Read a fragment as a promise which will resolve when data is available, or reject if an error is encountered. - \[6f0cbe]: Upstream observeFragment and waitForFragmentData to relay-runtime by Jordan Eldredge - \[36eecf]: Documentation for observeFragment and waitForFragmentData by Jordan Eldredge ##### Docs Thanks to members of our community for submitting pull requests to improve our docs: - \[e133fe]: Remove reference to the Google Chrome Extension Store from the installation guide for Relay Developer Tools by Jakub KopÃ…â„¢iva - \[e41490]: Replace story.image for story.thumbnail ([#​4793](https://redirect.github.com/facebook/relay/issues/4793)) by Theo Kouzelis - \[e95a5a]: Update mutations-updates.md in Tutorials ([#​4765](https://redirect.github.com/facebook/relay/issues/4765)) by Jbee - \[0cf094]: Update error handling and semantic nullability docs to include talks and links ([#​4800](https://redirect.github.com/facebook/relay/issues/4800)) by Jordan Eldredge ##### Improvements - \[08c74e]: Validate semantic-non-null interface implementations by Gordy French - \[a5b963]: Renaming missing_field log event types to missing_required_field by Itamar Kestenbaum - \[186c91]: Call cleanup of insertion effects when hidden ([#​30954](https://redirect.github.com/facebook/relay/issues/30954)) by rickhanlonii (Meta Employee) - \[ba0b46]: Add logging for normalization by Tianyu Yao - \[792628]: Relay: Allow omitting exists on ExternalFileSourceResult by Nico Reed - \[f1ee92]: Check pruned fields blocklist for undefined fields by Steven Chaitoff - \[23958c]: Make metadata_for_machine keys string constants by Steven Chaitoff - \[8d0302]: Relay: Remove unused code from oss code by Nico Reed - \[6d36d7]: Fix mockClientData with generateDeferredPayload = true by Fernando Gorodscy ##### Experimental We are always continuing to evolve and improve Relay. These changes are part of features or implementations which are either in progress or are being experimented with internally. - \[cb1b4d]: Add feature flag and config option to give custom path for artifacts by Monica Tang - \[4acf3f]: Make usePaginationFragment compatible with by Joe Savona - \[f9365f]: Attempt to avoid cycled when expanding updated ids to include impacted resolvers ([#​4792](https://redirect.github.com/facebook/relay/issues/4792)) by Jordan Eldredge - \[59b2a6]: UseQueryLoader() (and refetch()) compatibility with by Joe Savona - \[2f997b]: Update generated data driven dependency metadata for client 3D by Lynn Yu - \[790d46]: Update Relay API for disk caching by Evan Yeung - \[bb30bb]: Add feature flag for reader AST module imports by Evan Yeung - \[f0761b]: Add a priority flag to task scheduler for store network updates by Tianyu Yao - \[6f8f79]: Move corpus creation of program into helper function by Gordy French ### [`v18.0.0`](https://redirect.github.com/facebook/relay/releases/tag/v18.0.0): Version 18.0.0 Release Notes [Compare Source](https://redirect.github.com/facebook/relay/compare/v17.0.0...v18.0.0) With version 18, the Relay team at Meta and our community of contributors have made several significant improvements to Relay: - Improved validation of argument types - `@alias` released as stable - `@catch` to detect and granularly handle field errors - `@throwOnFieldError` and `@semanticNonNull` to avoid having to handle the nullability of fields which are only null in the case of error. - Intellisense for your Relay config file - Rename refactoring tools and inlay hints for fragment arguments Read all about them in more detail below: ##### Breaking Changes ##### Improved validation of field and fragment arguments Previously we were not correctly type-checking arguments passed to client-defined fields, such as Relay Resolvers and Client Schema Extensions. This new release adds that validation. If you need to opt out of this validation for any reason, you can enable the `disable_full_argument_type_validation` compiler feature flag. { // ... rest of config "featureFlags": { "disable_full_argument_type_validation": { "kind": "enabled" } } } ##### Major features ##### [@​alias](https://redirect.github.com/alias) fragment aliases released as stable Aliased fragments are a Relay feature that lets you access fragments spreads and inline fragments as named properties. This can be especially helpful for fragments which might be conditionally fetched due to `@skip`/`@include` or type conditions which might not match. With `@alias` these fragments get typed as nullable properties allowing you to check at runtime if they've matched or not before trying to use the data. **[Read more about @​alias](https://relay.dev/docs/next/guides/alias-directive/)** ##### [@​catch](https://redirect.github.com/catch) `@catch`, enabled by default will let you check at runtime if a field errored. This can allow you to disambiguate between true nulls returned by your server, and fields which are null due to [field level errors](https://spec.graphql.org/October2021/#sec-Handling-Field-Errors). **[Read more about @​catch](https://relay.dev/docs/next/guides/catch-directive/)** ##### [@​throwOnFieldError](https://redirect.github.com/throwOnFieldError) `@throwOnFieldError` can be added to fragments and queries and will cause any field errors within that fragment/query to throw when read. This ensures that all null values you encounter are true nulls as returned by your field resolvers on the server, and not field level errors that have been [coerced to null](https://spec.graphql.org/October2021/#sec-Handling-Field-Errors). **[Read more about @​throwOnFieldError](https://relay.dev/docs/next/guides/throw-on-field-error-directive/)** ##### Semantic Nullability `@throwOnFieldError` unlocks a powerful new feature when combined with a schema that has fields annotated with [`@semanticNonNull`](https://specs.apollo.dev/nullability/v0.2/). `@semanticNonNull` can be added to fields which have been made nullable in the schema only to enable more robust error handling, but are not expected to return null expect in the case of errors. **Within fragments or queries annotated with `@throwOnFieldError`, fields annotated with `@semanticNonNull` will be typed as non-nullable.** This has the potential to **dramatically** reduce the number of null checks you need to perform inside your product code, while also making your product code more "correct" by treating all field errors as explicit errors. **[Read more about Semantic Nullability](https://relay.dev/docs/next/guides/semantic-nullability/)** ##### Relay Resolvers can now have access to context Thanks for [Mark Polak](https://redirect.github.com/Markionium) and [Drew Atkinson](https://redirect.github.com/drewatk) from Microsoft, [Relay Resolvers](https://relay.dev/docs/next/guides/relay-resolvers/introduction/) can now be configured to accept a shared context object, similar to [standard GraphQL resolvers](https://graphql.org/learn/execution/#root-fields--resolvers). [Pull Request](https://redirect.github.com/facebook/relay/pull/4704) **[Read more about Resolver context](https://relay.dev/docs/next/guides/relay-resolvers/context/)** ##### Ability to opt out of Relay Compiler source control integration Thanks also to for Mark Polak from Microsoft, the Relay compiler config now supports the option `"noSourceControl": true` which will ask the Relay compiler to not automatically try to add/remove files from Git or Mercurial. [Pull Request](https://redirect.github.com/facebook/relay/pull/4767) ##### Editor Integration Improvements Thanks to Tobias Tengler, Relay's [editor support](https://relay.dev/docs/next/editor-support/) now includes: - **Intellisense (autocomplete, hover tooltips, diagnostics) for the Relay config file.** This fills a critical gap since the Relay config is quite under-documented. ([#​4724](https://redirect.github.com/facebook/relay/issues/4724)) by tobias-tengler - Editor integration ([#​4724](https://redirect.github.com/facebook/relay/issues/4724)) by tobias-tengler - Generate JSON schema for compiler config ([#​4723](https://redirect.github.com/facebook/relay/issues/4723)) by Jordan Eldredge - Rename refactoring tools ([#​4581](https://redirect.github.com/facebook/relay/issues/4581)) by tobias-tengler - Add Inlay Hints for Fragment arguments ([#​4740](https://redirect.github.com/facebook/relay/issues/4740)) by tobias-tengler - Improved documentation links in errors and hover tooltips ([#​4741](https://redirect.github.com/facebook/relay/issues/4741)) by tobias-tengler ##### Additional runtime logging integrations - \[9b24ad]: Log notify stats by Tianyu Yao - \[ed8a7f]: Add logging for DataChecker by Tianyu Yao - \[462b01]: Add logging for store lookup by Tianyu Yao - \[1faea5]: Add more loggings for GC by Tianyu Yao - \[f42215]: Add more information to execute.next log by Tianyu Yao ##### Additional Improvements - \[e84b10]: Inline enum values in hot code paths by Jan Kassens - \[ebd987]: Strictify relay entrypoint typing by Sam Zhou - \[989ebf]: Improve error reporting for argument type errors by Jordan Eldredge - \[3ba54c]: Use more precise variance for some relay types by Sam Zhou - \[9f0e9e]: Improve schema-validation error messaging by Steven Chaitoff - \[eec960]: Report schema parsing errors for synced schema sources ([#​4719](https://redirect.github.com/facebook/relay/issues/4719)) by tobias-tengler - \[176f96]: Parallelize dumping schemas to disk by Deepak Singh - \[e492d7]: Fix out of date component name in Mutations & Updates by Lynn Yu - \[0f49c2]: Skip importing export types in TS ([#​4754](https://redirect.github.com/facebook/relay/issues/4754)) by Drew Atkinson - \[aba9e9]: Ignore null/undefined queries in entrypoints by Jordan Eldredge - \[d5f1a0]: Correctly report unaliased fragments within inline fragment with [@​skip](https://redirect.github.com/skip) by Jordan Eldredge - \[2ad28f]: Disallow Node refetchable query on interfaces without implementations by Tianyu Yao - \[c446d4]: Fix Relay incremental build for enums by Evan Yeung - \[7998bc]: Support multiple [@​module](https://redirect.github.com/module) fragments in the same selection if they have [@​alias](https://redirect.github.com/alias) ([#​4744](https://redirect.github.com/facebook/relay/issues/4744)) by Jordan Eldredge - \[df2aca]: I think we could allow [@​module](https://redirect.github.com/module) in the same selection if they have different keys by Jordan Eldredge - \[294cb8]: Ensure we strip alias metadata from selections within inline fragments by Jordan Eldredge - \[531c6f]: Fix syntax error when using the new relay resolver by Tianyu Yao - \[6e47ac]: Return and handle all required_on_non_null_field errors by Gordy French - \[2b5028]: Ensure documents are synced before calculating completions [#​4473](https://redirect.github.com/facebook/relay/issues/4473) by Jordan Eldredge - \[c43429]: Add editor support for JSON config schema ([#​4724](https://redirect.github.com/facebook/relay/issues/4724)) by tobias-tengler - \[4d2fe9]: Error on multiple graphql type definitions on one flow type by Tianyu Yao - \[99003d]: Prevent using [@​alias](https://redirect.github.com/alias) within [@​match](https://redirect.github.com/match) by Jordan Eldredge - \[7491d3]: Update relay resolve API doc by Tianyu Yao - \[5d1225]: Fix incremental build when enum field argument changes by Monica Tang - \[0c5d69]: Support incremental schema change for union changes by Lynn Yu - \[d53615]: Refactor alias to always use inline fragments (and compose with other features) by Jordan Eldredge - \[86800e]: Add compiler command to emit json schema of config file by Jordan Eldredge - \[80e041]: Minor spell checking by Gordy French - \[6a2c39]: Validate that [@​match](https://redirect.github.com/match) fields always have supported arg by Jordan Eldredge - \[7bd521]: Only validate alias within each selection set by Jordan Eldredge - \[44cbff]: Support Client Edge to Client Union for strong types by Monica Tang - \[d35688]: Avoid reading inline fragments if abstract type condition does not match by Jordan Eldredge - \[3787b8]: Handle case where [@​required](https://redirect.github.com/required) bubbles to [@​aliased](https://redirect.github.com/aliased) inline fragment on abstract type by Jordan Eldredge - \[349334]: [@​required](https://redirect.github.com/required) should bubble nullable to parent semantic-non-null linked field by Gordy French - \[f96121]: Allow abstract inline fragments to be omitted by Daniel Lo Nigro - \[43bd9b]: Revert [`D542067`](https://redirect.github.com/facebook/relay/commit/D54206758): Validate edgeTypeName argument points to an existing type by Amy Hwang ##### Documentation Improvements - \[c54830]: Docs for [@​catch](https://redirect.github.com/catch) by Itamar Kestenbaum - \[f07f56]: Update semantic nullability docs to remove feature flag that is no-longer needed by Jordan Eldredge - \[861caa]: Fill in definitions for [@​stream](https://redirect.github.com/stream) and @​stream_connection in Glossary by Lynn Yu - \[e46ba9]: Document current support for experimental semantic nullability ([#​4770](https://redirect.github.com/facebook/relay/issues/4770)) by Jordan Eldredge - \[642e03]: Add definitions for [@​live](https://redirect.github.com/live) and @​live_query to glossary by Lynn Yu - \[27b2a1]: Document resolvers constants by Jordan Eldredge - \[175098]: [@​throwOnFieldError](https://redirect.github.com/throwOnFieldError) documentation by Gordy French - \[794cc3]: Pagination documentation fixes by Lynn Yu - \[23a7c2]: Fix the connection key in the mutations tutorial ([#​4751](https://redirect.github.com/facebook/relay/issues/4751)) by Sviatoslav Abakumov - \[bf6153]: Fix small errors in docs by Lynn Yu - \[99f4f6]: Organize sidebar for oss site by Evan Yeung - \[0ab687]: Re-organize hierarchy of docs interally by Evan Yeung - \[aa6538]: UseQueryLoader clarification by Monica Tang - \[9f314a]: Fix GraphQL Field name for story thumbnail examples by Jerry Francois - \[285dc2]: Spelling and capitalization by Gordy French - \[0e57c3]: Fix unclosed jsx tag by Monica Tang - \[7fccac]: Fix minor typo in editor-support.md ([#​4721](https://redirect.github.com/facebook/relay/issues/4721)) by SY Ryu - \[c632b4]: Link to Relay website [@​defer](https://redirect.github.com/defer) [@​stream](https://redirect.github.com/stream) docs by Monica Tang - \[d61ce0]: S/class/className/ in MDX ([#​4716](https://redirect.github.com/facebook/relay/issues/4716)) by Paul O’Shannessy - \[98d76c]: Add instructions to run relay compiler after query update ([#​4718](https://redirect.github.com/facebook/relay/issues/4718)) by Matthew Pawley - \[dbae5c]: Link GQL node definition in useRefetchableFragment section by Danny Zou ##### Miscellaneous - \[457e0c]: Update relay compiler README by Monica Tang - \[36e9ea]: Remove loadQuery during render warning ([#​4731](https://redirect.github.com/facebook/relay/issues/4731)) by Jordan Eldredge ##### Experimental Changes - \[8cb637]: Support in useFragmentInternal by Joe Savona - \[9125e2]: Support returning an interface in `IdOf` by Tianyu Yao - \[a1ce49]: Schemagen should allow list items to be true non-null by Gordy French - \[a726fc]: Add semanticNonNull support to generated schemas by Gordy French - \[4a378d]: Add support for global custom scalars by Evan Yeung - \[d3afbb]: Support [@​deprecated](https://redirect.github.com/deprecated) annotation by Lynn Yu - \[2efe7a]: Add support for fragment arguments by Evan Yeung - \[ce4388]: Add test for conflicting arguments by Evan Yeung - \[f239b7]: Add new relayresolver syntax to documents by Tianyu Yao - \[b26951]: Disallow non-nullable return type by Tianyu Yao - \[2152df]: Support attaching resolver fields onto Query by Tianyu Yao - \[6ddd80]: Map Flow -> GraphQL Scalars in schema gen by Evan Yeung - \[628b42]: Attach locations to parent types by Tianyu Yao - \[884c96]: Resolve return flow types to their flow types by Tianyu Yao - \[a1b186]: Unify processing weak fields by Tianyu Yao - \[217eb3]: Unify processing rootFragment fields by Tianyu Yao - \[5ee605]: Extract module for getting import and export by Tianyu Yao - \[2a3c04]: Fix IdOf Flowtype by Tianyu Yao - \[615020]: Add variable cycle detection by Jordan Eldredge - \[bb6f7b]: Add correct root fragment information by Evan Yeung ##### And more There were over 100 additional commits since our last release which have been omitted from this doc

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR was generated by Mend Renovate. View the repository job log.

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
gh-dashboard-relay ✅ Ready (Inspect) Visit Preview Oct 4, 2024 10:47pm
socket-security[bot] commented 2 months ago

Report too large to display inline

View full report↗︎

socket-security[bot] commented 2 months ago

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Critical CVE npm/webpack@5.75.0 ⚠︎

View full report↗︎

Next steps

What is a critical CVE?

Contains a Critical Common Vulnerability and Exposure (CVE).

Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/webpack@5.75.0