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

Update JS and PY dependencies, build for es2020 browsers #28977

Merged
merged 9 commits into from
Feb 2, 2024

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jan 29, 2024

  • Update all JS dependencies minus @mcaptcha/vanilla-glue
  • Fix new lint errors
  • Regenerate SVGs
  • Switch to maintained stylelint stylistic plugin
  • Tested Mermaid, Citation, Swagger, sorting
  • Raise ESBuild target to es2020 as dictated by pretty-ms dependency.

- Update all JS dependencies minus @mcaptcha/vanilla-glue
- Update djlint and workaround false-positive
- Fix new lint errors
- Regenerate SVGs
- Switch to maintained stylelint stylistic plugin
- Tested Mermaid, Citation, Swagger, sorting
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 29, 2024
@silverwind silverwind added this to the 1.22.0 milestone Jan 29, 2024
@pull-request-size pull-request-size bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 29, 2024
@silverwind
Copy link
Member Author

silverwind commented Jan 29, 2024

Webpack chokes on BigInt literals in pretty-ms, which will require raising the webpack target to es2020, and I think it's not worth doing that as it will likely cause problems with older browsers like PaleMoon, so I will exclude it from further updates via updates.config.js.

@silverwind
Copy link
Member Author

On the other hand, PaleMoon seems to implement BigInt since v32.4.0 (https://www.palemoon.org/releasenotes.shtml), so I think it's worth to switch to es2020, it will also reduce bundle size.

@silverwind
Copy link
Member Author

silverwind commented Jan 29, 2024

Now with es2020, there is a 70kB reduction (0.28%) in JS asset size:

# es2015
$ du -b --apparent-size public/assets/js
23300624  public/assets/js

# es2020
$ du -b --apparent-size public/assets/js
23235235  public/assets/js

@silverwind silverwind changed the title Update JS and PY dependencies Update JS and PY dependencies, build for es2020 browsers Jan 29, 2024
@techknowlogick
Copy link
Member

@wolfbeast a gentle ping as a heads up about this.

@wolfbeast
Copy link

wolfbeast commented Jan 29, 2024

@techknowlogick thanks for the ping. We should have complete support for ES2020 as of 6 months ago, but let me know if you want me to test something.
Ref for our final implementation meta issue of what we didn't yet have before: https://repo.palemoon.org/MoonchildProductions/UXP/issues/1734

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 29, 2024
* origin/main:
  [skip ci] Updated translations via Crowdin
  Fix UI Spacing Errors in mirror settings (go-gitea#28990)
  Add htmx guidelines (go-gitea#28993)
  Some refactor for git http (go-gitea#28995)
  Fix an actions schedule bug (go-gitea#28942)
  Fix doc img path in profile readme (go-gitea#28994)
  Introduce htmx and use it to avoid full page load on `Subscribe` and `Follow` (go-gitea#28908)
  Fix joins in `db.Find(AndCount)` (go-gitea#28978)
  Update golang links to use https (go-gitea#28980)
  Fix google logo in security page (go-gitea#28982)
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 2, 2024
@yardenshoham yardenshoham added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 2, 2024
@lunny lunny enabled auto-merge (squash) February 2, 2024 09:28
@lunny lunny merged commit a062725 into go-gitea:main Feb 2, 2024
25 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 2, 2024
@silverwind silverwind deleted the deps-67 branch February 2, 2024 10:09
silverwind added a commit that referenced this pull request Feb 2, 2024
Followup #28977. I forgot to pass
the updated option to esbuild-loader, e.g. previously it was only passed
to the minifier.
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 4, 2024
* giteaofficial/main:
  Add `must-change-password` cli parameter (go-gitea#27626)
  Include username in email headers (go-gitea#28981)
  Update tool dependencies (go-gitea#29030)
  Add artifacts v4 jwt to job message and accept it (go-gitea#28885)
  Pass es2020 to esbuild-loader as well (go-gitea#29027)
  Fix default avatar image size in PR diff page (go-gitea#28971)
  Update JS and PY dependencies, build for `es2020` browsers (go-gitea#28977)
silverwind added a commit to silverwind/gitea that referenced this pull request Feb 20, 2024
…28977)

- Update all JS dependencies minus @mcaptcha/vanilla-glue
- Fix new lint errors
- Regenerate SVGs
- Switch to maintained stylelint stylistic plugin
- Tested Mermaid, Citation, Swagger, sorting
- Raise ESBuild target to `es2020` as dictated by `pretty-ms`
dependency.
silverwind added a commit to silverwind/gitea that referenced this pull request Feb 20, 2024
Followup go-gitea#28977. I forgot to pass
the updated option to esbuild-loader, e.g. previously it was only passed
to the minifier.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/docs modifies/internal size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants