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

Use Vite and cleanup some old deps for frontend #61

Merged
merged 6 commits into from
May 5, 2023

Conversation

hugo-vrijswijk
Copy link
Contributor

@hugo-vrijswijk hugo-vrijswijk commented May 5, 2023

Create-react-app is deprecated and not maintained anymore, the community is moving to vite. Vite also should speed up the build a little bit.

Other changes:

  • Replace axios with fetch (smaller bundle, and no axios-specific features are used)
  • Replace moment with date-fns (moment is deprecated, and date-fns is smaller)
  • Fix bug of 'Next run' date not being able to be parsed and showing 'Invalid date' (maybe due to my timezone?)
  • Move schedule text to be next to 'Waiting for next run' text
  • Clean-up effects, effects now use setInterval to run every 10 seconds, and useEffect returns a clean-up function to clear the interval (prevents leakage when dismounting the component)
  • Remove router, since there is only one page
  • Use the new React 18 mounting method of createRoot instead of ReactDOM.render which puts React into compatibility mode

@hugo-vrijswijk hugo-vrijswijk changed the title Use Vite and remove some old deps Use Vite and remove cleanup old deps May 5, 2023
@hugo-vrijswijk hugo-vrijswijk changed the title Use Vite and remove cleanup old deps Use Vite and cleanup some old deps May 5, 2023
@hugo-vrijswijk hugo-vrijswijk changed the title Use Vite and cleanup some old deps Use Vite and cleanup some old deps for frontend May 5, 2023
@aetaric aetaric self-assigned this May 5, 2023
@aetaric aetaric self-requested a review May 5, 2023 17:47
@aetaric aetaric added the javascript Pull requests that update Javascript code label May 5, 2023
@aetaric aetaric added this to the 3.1.3 milestone May 5, 2023
Copy link
Owner

@aetaric aetaric left a comment

Choose a reason for hiding this comment

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

Hey, thanks for this PR! I'm definitely not a JS or TS dev, so I have little working knowledge of what direction the community is going. Code tested and verified on the major browsers. Will merge to main (it won't hit a release until 3.1.3).

@aetaric aetaric merged commit bba3572 into aetaric:main May 5, 2023
aetaric pushed a commit that referenced this pull request May 5, 2023
* Replace react-scripts with vite

* Clean up some packages

* Replace moment with date-fns

* Move schedule text

* Cleanup effects
aetaric added a commit that referenced this pull request Jun 2, 2023
* Swap address logic to use generic strings instead of IPs

* Bump github.com/gin-gonic/gin from 1.8.2 to 1.9.0 (#60)

Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](gin-gonic/gin@v1.8.2...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use Vite and cleanup some old deps for frontend (#61)

* Replace react-scripts with vite

* Clean up some packages

* Replace moment with date-fns

* Move schedule text

* Cleanup effects

* equalfold file extension and ignore extension in ignore check

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Rijswijk <git@hugovr.nl>
@hugo-vrijswijk hugo-vrijswijk deleted the vite branch June 19, 2023 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants