Skip to content

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Sep 6, 2025

Migrate all JS config and tools to TS and fix a number of type issues. This required Node.js 22.18.0 or greater where type-stripping was enabled by default.

Given that Node 22 is the current LTS, I think it's ok to assume that the user has a recent version of it.

Webpack currently requires the --disable-interpret flag to work, should be fixed eventually with webpack/webpack-cli#4525.
fast-glob is replaced by fs.globSync, available in Node 22.0.0 or greater.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 6, 2025
@silverwind
Copy link
Member Author

silverwind commented Sep 6, 2025

Looks like docker.io/library/golang:1.25-alpine3.22 is on a slightly too old node.js version. Alpine v3.23 wil update it but is still 2-3 months off.

/go # apk add --no-cache nodejs
/go # node -v
v22.16.0

I think it needs a multi-stage build.

@silverwind
Copy link
Member Author

Docker build works now. As a workaround, I'm copying over the node binary from the node 22 alpine 3.22 image. I guess this may be acceptable, otherwise this needs to wait 3 months for alpine 3.23.

Copy link
Member

@techknowlogick techknowlogick left a comment

Choose a reason for hiding this comment

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

💕

@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 Sep 6, 2025
@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 Sep 6, 2025
@denyskon denyskon added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 6, 2025
@denyskon denyskon enabled auto-merge (squash) September 6, 2025 11:48
@denyskon denyskon merged commit b8f1c9f into go-gitea:main Sep 6, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Sep 6, 2025
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 6, 2025
@silverwind silverwind deleted the tstools branch September 6, 2025 14:39
@silverwind
Copy link
Member Author

silverwind commented Sep 6, 2025

There is a failure on main: https://github.com/go-gitea/gitea/actions/runs/17514788636/job/49750917680

I think it's because the node image lacks the linux/riscv64 architecture, related to nodejs/docker-node#1707.

https://hub.docker.com/_/node/tags?name=22-alpine3.22
https://hub.docker.com/_/golang/tags?name=alpine3.22

I wonder why the CI tests did not bring this up.

@silverwind
Copy link
Member Author

Might have to revert this and wait for alpine 3.23. The only other option seems to be to compile node.js from source which seems complicated.

@lunny lunny modified the milestones: 1.26.0, 1.25.0 Sep 7, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull request Sep 8, 2025
* giteaofficial/main:
  fix: add author.name field to Swift Package Registry API response (go-gitea#35410)
  Update js dependencies (go-gitea#35429)
  Support Node.js 22.6 with type stripping (go-gitea#35427)
  [skip ci] Updated translations via Crowdin
  apply as maintainer (go-gitea#35424)
  Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (go-gitea#35418)
  Migrate tools and configs to typescript, require node.js >= 22.18.0 (go-gitea#35421)
  [skip ci] Updated translations via Crowdin
  Switch to `@resvg/resvg-wasm` for `generate-images` (go-gitea#35415)
  fix(webhook/discord): fixed username cannot be empty error (go-gitea#35412)
  add `/.pnpm-store` to .gitignore (go-gitea#35414)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/dependencies modifies/frontend modifies/internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants