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

Repo & development updates, Docs rewrite, CI improvements, and more #711

Merged
merged 42 commits into from
Jul 8, 2023

Conversation

favna
Copy link
Contributor

@favna favna commented Jan 23, 2023

It's been nearly 4 years since I created #291 changing this repository from Vows to Jest and the Node ecosystem has definitely not been standing still so I figured "let's create another general update PR".

  1. Migrated from Jest to Vitest.
    Vitest is a new test runner powered by Vite and is much faster than Jest. Like was the motivation for Jest in Three improvements for the price of one #291 it has TypeScript support built in, adding to that, in the future we can even make the TypeScript tests even better through Type Testing

  2. Updated from Vuepress v1 to Vuepress v2. This brings with it maaaaaaannnyy fixes, improvements, enhancements and so on. Both because I put quite a lot of effort in the rewrite, as well as because in general this updates from Vue 2 to Vue 3 and Vuepress has gone through many changes as well. Some notable things:

    • Dark mode! Wooh! Like modern websites it responds to the OS preference, and there is a button to switch.
    • The live demo now uses monaco editors (vscode's editor)! instead of codemirror. So a much better editing experience.
    • The "Twitter follow" button is now a custom component rather than a widget, which means it will no longer be blocked by content blockers (like adblockers)
    • Everything uses the Vue3 composition API instead of the Vue2 options API. This makes Vue scripts waaay easier to read.
    • Dropped stylus in favour of raw CSS and SCSS because Vuepress v2 only so/so seems to support Stylus. They dropped support for Stylus for customizing the theme, switching to SCSS. I figured for consistency it'd be best to drop it entirely.

    I am not sure how the current production website is deployed. You can reference https://v2.vuepress.vuejs.org/guide/deployment.html to learn how to deploy the new site. That said, if it's through GitHub pages then do let me know because these days it is possible to use a GH Action to deploy directly, you don't even need a gh-pages branch anymore then.

  3. Migrated from yarn to npm. Previously in Three improvements for the price of one #291 I made a change to prefer yarn.lock but I noticed that since then you have added scripts that use npm so I am making the assumption that is your package manager of choice. To ensure the repo is not in a 50/50 state of package managers I now fully switched the repo over to using npm in all references.

  4. Updated Husky to v8 and changed how it is configured to how it should've been above v4 (https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v8). The old way of doing it through package.json hasn't been working since v4, so the current repo wasn't protected by husky at all.

  5. Updated various dev dependencies. I did not update rollup because it included the breaking changes of v3.0.0 which I'm not sure if they will affect the project. Of note is that Fuse's engines are set to Node 10, whereas Rollup v3 targets Node >= 14.

  6. Added eslint-config-prettier to the eslintrc file, it was a dev dep that was never loaded before.

  7. Ran prettier on the whole repo

  8. Updated the GitHub issue templates to YAML style so issues are form-like inputs. These can be previewed on my branch: https://github.com/favna/Fuse/blob/chore/dev-migrations/.github/ISSUE_TEMPLATE/bug_report.yml

  9. Split tsconfig.json into 2 files, 1 for src and 1 for test. This is to ensure that each set can have its own dedicated config, and it's also a slight improvement for the TS language services of IDEs because they only load the ones for the files opened. A negligible difference for this repo, but it's a difference nonetheless.

  10. Add .prettierignore file to allow running npx prettier --write . without modifying files that shouldn't be formatted with Prettier. Just something I ran into when doing point 6.

  11. Update GitHub workflows

  12. Updated the files in dist by running npm run build to update their code with all the changes above

@favna favna marked this pull request as draft January 23, 2023 23:43
@favna favna marked this pull request as ready for review January 27, 2023 21:01
@favna
Copy link
Contributor Author

favna commented Jan 27, 2023

This PR is now ready for review. Sorry not sorry for the file count haha, that's mostly because of the vuepress changes.

@favna favna changed the title General repo & development updates Repo & development updates, Docs rewrite, CI improvements, and more Jan 27, 2023
@krisk
Copy link
Owner

krisk commented Jul 8, 2023

Oh wow this is huge. Will review it now. Thanks!

krisk added a commit that referenced this pull request Jul 8, 2023
@krisk krisk merged commit 08048e5 into krisk:main Jul 8, 2023
@favna favna deleted the chore/dev-migrations branch July 9, 2023 14:07
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.

2 participants