Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): pin nextjs version for nextjs-swc example #9737

Merged
merged 7 commits into from
Apr 25, 2024
Merged

Conversation

YassinEldeeb
Copy link
Collaborator

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2023

⚠️ No Changeset found

Latest commit: d714dcc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-codegen/cli 5.0.1-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/core 4.0.1-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/add 5.0.1-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/fragment-matcher 5.0.1-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/introspection 4.0.1-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/schema-ast 4.0.1-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/visitor-plugin-common 4.1.0-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-document-nodes 4.0.2-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/gql-tag-operations 4.0.2-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-operations 4.1.0-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-resolvers 4.0.2-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/typed-document-node 5.0.2-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript 4.0.2-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/client-preset 4.2.0-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/graphql-modules-preset 4.0.2-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/testing 3.0.1-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎
@graphql-codegen/plugin-helpers 5.0.2-alpha-20231026070541-cb05739d0 npm ↗︎ unpkg ↗︎

@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2023

💻 Website Preview

The latest changes are available as preview in: https://f6b944a8.graphql-code-generator.pages.dev

@@ -1,4 +1,5 @@
// eslint-disable-next-line import/no-extraneous-dependencies
// @ts-ignore
Copy link
Collaborator Author

@YassinEldeeb YassinEldeeb Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for some reason though, I faced some errors regarding:

Type error: Cannot find module '@graphql-codegen/cli' or its corresponding type declarations.

  1 | // eslint-disable-next-line import/no-extraneous-dependencies
> 2 | import { CodegenConfig } from '@graphql-codegen/cli'

when running yarn workspace example-react-nextjs-swr run build locally which I skipped with a // @ts-ignore for now, do you have any ideas on why is it throwing that?

@dotansimha dotansimha requested a review from saihaj October 26, 2023 07:22
@YassinEldeeb
Copy link
Collaborator Author

not sure why End2End step fails @saihaj

@eddeee888 eddeee888 force-pushed the pin-nextjs-version branch 2 times, most recently from 1eaacf6 to 5a226cd Compare April 24, 2024 10:49
Comment on lines +12 to +16
ID: { input: string; output: string };
String: { input: string; output: string };
Boolean: { input: boolean; output: boolean };
Int: { input: number; output: number };
Float: { input: number; output: number };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were never updated because codegen/tests are executed sequentially... and this example was after some other failing tests 😓

@@ -20,7 +20,7 @@ export function useGraphQL<TResult, TVariables>(
document.definitions.find(isOperationDefinition)?.name,
variables,
] as const,
async (_key: string, variables: any) =>
async ([_key, variables]: any) =>
Copy link
Collaborator

@eddeee888 eddeee888 Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the current version of swr keeps the array as-is: https://swr.vercel.app/docs/arguments#multiple-arguments

In the previous versions (< 2.0.0), The fetcher function will receive the spreaded arguments from original key when the key argument is array type. E.g., key [url, token] will become 2 arguments (url, token) for fetcher function.

Comment on lines -50 to -51
getPeople().then(res => console.log(res));
getPeople(10).then(res => console.log(res));
Copy link
Collaborator

@eddeee888 eddeee888 Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These calls cause the Jest tests to fail. These also look like debugging statements that were never removed 🤔

Screenshot 2024-04-24 at 9 56 58 pm

@@ -4,7 +4,7 @@ const fg = require('fast-glob');

const packageJSON = fg.sync(['examples/**/package.json'], { ignore: ['**/node_modules/**'] });

const ignoredPackages = ['example-react-nextjs-swr'];
const ignoredPackages = [];
Copy link
Collaborator

@eddeee888 eddeee888 Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can now remove the example from the ignored array 🎉

I'll keep the current implementation in case we need to ignore tests in the future (hope that time never comes! 🤞 )

Copy link
Collaborator Author

@YassinEldeeb YassinEldeeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, @saihaj or @enisdenjo can you take a last look before merging?

@eddeee888 eddeee888 force-pushed the pin-nextjs-version branch from e905c28 to ec5c7cb Compare April 25, 2024 02:46
Copy link
Collaborator

@saihaj saihaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🙏🏼

@saihaj saihaj merged commit 512190a into master Apr 25, 2024
19 checks passed
@saihaj saihaj deleted the pin-nextjs-version branch April 25, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants