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

Move next-urql to monorepo #557

Merged
merged 54 commits into from
Mar 1, 2020
Merged

Move next-urql to monorepo #557

merged 54 commits into from
Mar 1, 2020

Conversation

parkerziegler
Copy link
Contributor

NOTE: Please don't squash & merge, but do a merge commit.

parkerziegler and others added 30 commits October 16, 2019 16:15
… doscumentation and example README instructions.
…Add TypeScript definitions. (#2)

* Improve publishing steps. Add formal LICENSE. Improve documentation. Add TypeScript definitions.

* Remove declaration: true from tsconfig.

* PR feedback. Improve README language around automatic static optimization. Add CONTRIBUTING.md. Adjust ESLint settings.
* Add support for accessing ctx in withUrqlClient.

* Update TS definitions. Add test of mergeExchanges.
* Prevent circular structure in getInitialProps.

* Update TS defs to better match wrapped components that implement their own getInitialProps.

* Final edits to index.d.ts.
* Fix support for using withUrqlClient with _app.js

Co-authored-by: bmathews <brian.mathews@formidable.com>

* Update example READMEs.

* Final adjustments to index.d.ts

Co-authored-by: Brian Mathews <spoonart@gmail.com>
* add urqlClient to Page Context

* revert import ordering

* add urqClient to PageProps interface in index.d.ts

* move type to NextContextWithAppTree
parkerziegler and others added 23 commits January 9, 2020 10:36
* Add auto-generated tsconfig.json and next-env.d.ts

* Convert components and pages to TypeScript

* Use correct NextContext type

* Point TS compiler to next-urql at root of the repo

* Update example to use our custom NextContext
* Convert example 2 to TypeScript

* Add `tsconfig.json` and `next-env.d.ts`
* JS -> TS conversion
* Add types for pokemon data
* Add type for Next App
* Refactor pokemon type mapping

* Use AppPropsType from Next
* Upgrade to Next 9 (test fixes WIP)

* Remove deprecated `@types/next`
* Add `next@9.1.7` to devDependencies
* Replace `NextComponentClass` | `NextFC` union describing `Page` with
`NextPage`
* Rename `NextContextWithAppTree` to `NextUrqlContext`
* Make `NextUrqlContext` extend `NextPageContext` instead of
`NextContext`

* Import types directly from top-level next

* Coerce mock request object

* Fix withUrqlClient test config

* Coerce ctx into more accurate representation
…velopment environments. (#30)

* Add Travis CI. Autogenerate TS defs into dist. Add displayName for development environments.

* Fix issues with Rollup not transforming regeneratorRuntime in examples.

* Use correct name for formatting script in CI.

* Add in Buble.

* Preserve displayName in all environments. Add build badge to README.
* Add initial custom exchange example

* Remove console log
* Remove serialization of clientOptions in getInitialProps.

* Remove unnecessary console.log.

* Remove another console.log.

* Move mockMergeExchanges to upper describe block.

* Move beforeEach rendering component into relevant describe block.

* Remove test stage as Travis explicitly includes it.
* bump react-ssr-prepass to 1.1.1 to fix the suspense bug

* use 1.1.2 this includes some refactors
* Add better support for _app.js. Move types to separate module.

* Remove unnecessary type casting.

* Fix type issues in tests by relaxing types 😂
…731be96be7'

git-subtree-dir: packages/next-urql
git-subtree-mainline: 814fb04
git-subtree-split: 321328c
@changeset-bot
Copy link

changeset-bot bot commented Feb 28, 2020

🦋 Changeset is good to go

Latest commit: 2a24461

We got this.

Not sure what this means? Click here to learn what changesets are.

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

@parkerziegler
Copy link
Contributor Author

@JoviDeCroock @kitten and I cranked this out on Friday afternoon. I think we should be good to merge, but let me know if you'd like any additional bits brought in here. We used git subtree for this (thanks for showing me that Phil!) so it should preserve the whole commit history. A few snags getting the build working with the shared Rollup setup but otherwise looking good. Once we merge I'll archive the next-urql repo and transfer open issues over here.

Copy link
Collaborator

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

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

Nice work Parker! Some minor nits but all fine on my part 👍

npm install --save next-urql urql react-is isomorphic-unfetch
```

`react-is`, `styled-components`, and `isomorphic-unfetch` help to support server-side `Suspense` with `react-ssr-prepass`. This assumes you have followed the basic installation steps for `urql` [here](https://github.com/FormidableLabs/urql#installation).
Copy link
Collaborator

Choose a reason for hiding this comment

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

is styled-components needed since it's not in the above install

Copy link
Member

Choose a reason for hiding this comment

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

Good point! That’s not required anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, will remove it. It used to be needed in previous versions of react-ssr-prepass, but no longer!

@@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We might want to add these to the global gitignore instead to reduce files (same for the logo maybe use them from /docs)

Copy link
Member

Choose a reason for hiding this comment

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

I think it’s fine to make an exception for examples until those are cleaned up maybe? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

✅ Agreed, will do.

@parkerziegler parkerziegler merged commit 1aa1553 into master Mar 1, 2020
@parkerziegler parkerziegler deleted the task/add-next-urql branch March 1, 2020 20:32
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.

6 participants