-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
introduce pnpm, fix build tooling #3054
Conversation
|
5ac8635
to
4a2d1a6
Compare
The latest changes of this PR are not available as canary, since there are no linked |
deb4850
to
f4bcb59
Compare
@@ -5,5 +5,5 @@ GraphQL implementation with parcel bundler. | |||
|
|||
### Setup | |||
|
|||
1. `yarn` and `yarn start` from this folder to start parcel dev mode. | |||
1. `yarn build` to find production ready files. | |||
1. `pnpm` and `pnpm start` from this folder to start parcel dev mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. `pnpm` and `pnpm start` from this folder to start parcel dev mode. | |
1. `pnpm i` and `pnpm start` from this folder to start parcel dev mode. |
@@ -4,5 +4,5 @@ This example demonstrates how to transpile your own custom ES6 and typescript Gr | |||
|
|||
### Setup | |||
|
|||
1. `yarn` and `yarn start` from this folder to start `react-scripts` dev server. | |||
1. `yarn build` from this folder to build production ready transpiled files using `react-scripts`. Find the output in `build` folder. | |||
1. `pnpm` and `pnpm start` from this folder to start `react-scripts` dev server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. `pnpm` and `pnpm start` from this folder to start `react-scripts` dev server. | |
1. `pnpm i` and `pnpm start` from this folder to start `react-scripts` dev server. |
@@ -5,5 +5,5 @@ implementation with parcel bundler. | |||
|
|||
### Setup | |||
|
|||
1. `yarn` and `yarn start` from this folder to start parcel dev mode. | |||
1. `yarn build` to find production ready files. | |||
1. `pnpm` and `pnpm start` from this folder to start parcel dev mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. `pnpm` and `pnpm start` from this folder to start parcel dev mode. | |
1. `pnpm i` and `pnpm start` from this folder to start parcel dev mode. |
@@ -10,4 +10,4 @@ This workspace could be used to help us prototype components & hooks for | |||
|
|||
## Setup | |||
|
|||
In this directory, you can just run `yarn` and `yarn start` | |||
In this directory, you can just run `pnpm` and `pnpm start` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this directory, you can just run `pnpm` and `pnpm start` | |
In this directory, you can just run `pnpm i` and `pnpm start` |
@@ -4,7 +4,7 @@ A simple example of `monaco-graphql` using webpack 4 | |||
|
|||
### Setup | |||
|
|||
`yarn` and `yarn start` from this folder to start webpack dev server | |||
`pnpm` and `pnpm start` from this folder to start webpack dev server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`pnpm` and `pnpm start` from this folder to start webpack dev server | |
`pnpm i` and `pnpm start` from this folder to start webpack dev server |
@@ -35,10 +35,10 @@ | |||
"!jest.config.js" | |||
], | |||
"scripts": { | |||
"build": "yarn build-clean && yarn build-js && yarn build-esm && yarn build-flow .", | |||
"build": "yarn build-js && yarn build-esm && yarn build-flow .", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use pnpm here and for other scripts in this file?
@@ -9,7 +9,7 @@ analyzer.html | |||
/graphiql.*js.map | |||
/graphiql.*css | |||
/graphiql.*css.map | |||
example/yarn.lock | |||
example/pnpm.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example/pnpm.lock | |
example/pnpm-lock.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you tell I did a cheap bulk find replace and it's a mess ? haha
"e2e-server": "start-server-and-test 'cross-env PORT=8080 node test/e2e-server' 'http-get://localhost:8080/graphql?query={test { id }}'", | ||
"storybook": "start-storybook", | ||
"webpack": "webpack-cli --config resources/webpack.config.js" | ||
}, | ||
"dependencies": { | ||
"@graphiql/react": "^0.16.0", | ||
"@graphiql/toolkit": "^0.8.1", | ||
"@graphiql/toolkit": "^0.8.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"@graphiql/toolkit": "^0.8.0", | |
"@graphiql/toolkit": "workspace:*", |
All monorepo packages/examples should contain the above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm ok, and then they are rewritten on publish? i will have to double check how this works with changesets, because currently this is automatically managed by changesets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and then they are rewritten on publish?
yes
@@ -1,3 +1,3 @@ | |||
node_modules | |||
src | |||
yarn.lock | |||
pnpm.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm.lock | |
pnpm-lock.yaml |
|
||
```sh | ||
yarn global add graphql-language-service-cli | ||
pnpm global add graphql-language-service-cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm global add graphql-language-service-cli | |
pnpm add -g graphql-language-service-cli |
@@ -35,6 +35,7 @@ | |||
"graphql": "^15.5.0 || ^16.0.0" | |||
}, | |||
"dependencies": { | |||
"@types/yargs": "^16.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be devdeps
@@ -1,3 +1,3 @@ | |||
node_modules | |||
src | |||
yarn.lock | |||
pnpm.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm.lock | |
pnpm-lock.yaml |
${bright('yarn global add graphql-language-service-cli')} | ||
pnpm: | ||
${bright('pnpm global remove graphql-language-service')} | ||
${bright('pnpm global add graphql-language-service-cli')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${bright('pnpm global add graphql-language-service-cli')} | |
${bright('pnpm add -g graphql-language-service-cli')} |
${bright('yarn global remove graphql-language-service')} | ||
${bright('yarn global add graphql-language-service-cli')} | ||
pnpm: | ||
${bright('pnpm global remove graphql-language-service')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${bright('pnpm global remove graphql-language-service')} | |
${bright('pnpm remove -g graphql-language-service')} |
@@ -301,7 +301,7 @@ This plugin uses the | |||
[GraphQL language server](https://github.com/graphql/graphql-language-service-server) | |||
|
|||
1. Clone the repository - https://github.com/graphql/graphiql | |||
1. `yarn` | |||
1. `pnpm` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. `pnpm` | |
1. `pnpm i` |
@@ -29,7 +29,7 @@ const git = async (...commands) => execa('git', commands, execOpts); | |||
// async function preReleaseVSCode(version) { | |||
// try { | |||
// await execa( | |||
// 'yarn', | |||
// 'pnpm', | |||
// ['workspace', `vscode-graphql`, 'run', 'release', '--pre'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ['workspace', `vscode-graphql`, 'run', 'release', '--pre'], | |
// ['--filter', `vscode-graphql`, 'release', '--pre'], |
@dotansimha and @B2o5T - i have pushed the afformentioned additional commit from changes that i had left on my local git stash from february, the very helpful review comments are still relevant. tonight after work I will clean it up and I'm available for a chat or async if you have any questions! |
todo:
|
@acao I think @thomasheyenbrock found some issues with it #3017 |
@B2o5T indeed, this PR was created after that, and required reverting the change he made there for now, but we will figure that out! |
vite.config.js | ||
vite.config.d.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove also generated files vite.config.js
, vite.config.d.ts
from packages/graphiql-react
?
@B2o5T also, fwiw, feel free to push to this branch if you don't want to wait for me haha |
@B2o5T indeed, i will try to get to it after work, maybe around 19:00 UTC. i just wanted to push what i had during lunch break real quick for reference |
tsc --build
builds for all workspacesI almost forgot to look at #232, which has plenty of the missing pieces to borrow from, and give credit to the author as well! For example, they have taken care of github actions/etc already