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

Many updates for v2, see PR description #102

Merged
merged 5 commits into from
May 27, 2021
Merged

Many updates for v2, see PR description #102

merged 5 commits into from
May 27, 2021

Conversation

IlCallo
Copy link
Member

@IlCallo IlCallo commented May 11, 2021

Linting

I tinkered with ESLint config to only apply TS linting to TS files, avoiding false positives for JS files

File generation

I moved the boot file to be generated into actual boot folder.
I guess you put it into the "apollo" folder to automatically register it via the AE index file, but you can do so only if you have full control over the file, eg. if you don't expose it.
If you do expose it, it may need to be applied in a different order depending on what the dev does into it.
Otherwise you're just going against the boot files pattern and adding mental burden for the user to the process.

I also removed extension containing folder as we never used this convention on other official AEs AFAIK, what's the rationale behind it?

I also set the typescript prompts to false by default, as only 25% of Quasar userbase uses TS right now. We can change this depending on next years community surveys.

Typings

I fixed some typings here and there, eg. you don't need BootFileParams if you use boot wrapper.

Old extensions/apollo/index.d.ts isn't needed anymore, as forcing TS to bring in quasar typings into tsconfig.json automatically imports all needed types.

I had to disable lib check due to chain-webpack types conflicting with webpack5 ones. It's strange as we don't get this problem on generated projects, honestly couldn't understand which is the problem and why it happens there.

Deps

I updated all deps to latest version.
I removed "react" dep as importing stuff from '@apollo/client/core' instead of '@apollo/client' removes the need for it.
I removed "typescript" dep as '@quasar/app' already provides it.

Repo mangement

I added yarn format to apply Prettier formatting everywhere.

I added yarn build to automatically clean the lib folder, generate the updated JS files versions and format them with Prettier. In this way we lose the newlines in generated JS files (until TS guys figure out a way to allow it) but a lot of repo management time and mental burden is removed.

I added yarn deploy scripts to automatize the publishing process, in particular to avoid forgetting to generate JS files and using the wrong npm tag.

Installation steps

I used app.provide into the boot file, this avoids the need to update App.vue (which was needed when using Vue2 as there wasn't a global provide API).

Left out / WIP

I also want to add tooling support for https://www.apollographql.com/docs/devtools/apollo-config/ and automatically scaffold an example one, as well as injecting apollographql.vscode-apollo into vscode suggested extensions files if present

Subscriptions via WebSocket need a particular setup, it could be asked at installation time or a guide could be integrated into the README


Let me know what do you think of the changes

@smolinari
Copy link
Collaborator

@IlCallo - Thanks for this. Some of the changes I can say 👍 to. Others are beyond my own competence. 🤷‍♂️

@ejez - Your 2 cents would be valuable and appreciated too.

Thank you both!!!!

Scott

@ejez
Copy link
Contributor

ejez commented May 11, 2021

Thanks @IlCallo for your additions!

The changes will make the extension a lot better.

Just to add to the WIP list the "ssr support", if you have little time for it 😇

@smolinari The "package.json" contributors section needs a new entry!

README.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@IlCallo
Copy link
Member Author

IlCallo commented May 12, 2021

I removed the need to update App.vue file, check out the updated PR description and latest commits

@smolinari smolinari merged commit 9f0b78a into quasarframework:v2 May 27, 2021
@smolinari
Copy link
Collaborator

@IlCallo - merged. I'll wait for your further improvements before publishing the next release. Thanks a lot for your help!!! :)

Scott

@IlCallo IlCallo deleted the v2-updates branch May 27, 2021 07: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