@@ -15,7 +15,7 @@ XGO_VERSION := go-1.25.x
1515AIR_PACKAGE ?= github.com/air-verse/air@v1
1616EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3
1717GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.9.2
18- GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.2
18+ GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4
1919GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.15
2020MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.8.0
2121SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.33.1
@@ -81,15 +81,6 @@ STORED_VERSION_FILE := VERSION
8181GITHUB_REF_TYPE ?= branch
8282GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
8383
84- # Enable typescript support in Node.js before 22.18
85- # TODO: Remove this once we can raise the minimum Node.js version to 22.18 (alpine >= 3.23)
86- NODE_VERSION := $(shell printf "% 03d% 03d% 03d" $(shell node -v 2>/dev/null | cut -c2- | sed 's/-.* //' | tr '.' ' ') )
87- ifeq ($(shell test "$(NODE_VERSION ) " -lt "022018000"; echo $$? ) ,0)
88- NODE_VARS := NODE_OPTIONS="--experimental-strip-types"
89- else
90- NODE_VARS :=
91- endif
92-
9384ifneq ($(GITHUB_REF_TYPE ) ,branch)
9485 VERSION ?= $(subst v,,$(GITHUB_REF_NAME))
9586 GITEA_VERSION ?= $(VERSION)
@@ -124,6 +115,7 @@ FRONTEND_SOURCES := $(shell find web_src/js web_src/css -type f)
124115FRONTEND_CONFIGS := vite.config.ts tailwind.config.ts
125116FRONTEND_DEST := public/assets/.vite/manifest.json
126117FRONTEND_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts public/assets/.vite
118+ FRONTEND_DEV_LOG_LEVEL ?= warn
127119
128120BINDATA_DEST_WILDCARD := modules/migration/bindata.* modules/public/bindata.* modules/options/bindata.* modules/templates/bindata.*
129121
@@ -293,33 +285,33 @@ lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backen
293285
294286.PHONY : lint-js
295287lint-js : node_modules # # lint js and ts files
296- $( NODE_VARS ) pnpm exec eslint --color --max-warnings=0 --concurrency $(ESLINT_CONCURRENCY ) $(ESLINT_FILES )
297- $( NODE_VARS ) pnpm exec vue-tsc
288+ pnpm exec eslint --color --max-warnings=0 --concurrency $(ESLINT_CONCURRENCY ) $(ESLINT_FILES )
289+ pnpm exec vue-tsc
298290
299291.PHONY : lint-js-fix
300292lint-js-fix : node_modules # # lint js and ts files and fix issues
301- $( NODE_VARS ) pnpm exec eslint --color --max-warnings=0 --concurrency $(ESLINT_CONCURRENCY ) $(ESLINT_FILES ) --fix
302- $( NODE_VARS ) pnpm exec vue-tsc
293+ pnpm exec eslint --color --max-warnings=0 --concurrency $(ESLINT_CONCURRENCY ) $(ESLINT_FILES ) --fix
294+ pnpm exec vue-tsc
303295
304296.PHONY : lint-css
305297lint-css : node_modules # # lint css files
306- $( NODE_VARS ) pnpm exec stylelint --color --max-warnings=0 $(STYLELINT_FILES )
298+ pnpm exec stylelint --color --max-warnings=0 $(STYLELINT_FILES )
307299
308300.PHONY : lint-css-fix
309301lint-css-fix : node_modules # # lint css files and fix issues
310- $( NODE_VARS ) pnpm exec stylelint --color --max-warnings=0 $(STYLELINT_FILES ) --fix
302+ pnpm exec stylelint --color --max-warnings=0 $(STYLELINT_FILES ) --fix
311303
312304.PHONY : lint-swagger
313305lint-swagger : node_modules # # lint swagger files
314- $( NODE_VARS ) pnpm exec spectral lint -q -F hint $(SWAGGER_SPEC )
306+ pnpm exec spectral lint -q -F hint $(SWAGGER_SPEC )
315307
316308.PHONY : lint-md
317309lint-md : node_modules # # lint markdown files
318- $( NODE_VARS ) pnpm exec markdownlint * .md
310+ pnpm exec markdownlint * .md
319311
320312.PHONY : lint-md-fix
321313lint-md-fix : node_modules # # lint markdown files and fix issues
322- $( NODE_VARS ) pnpm exec markdownlint --fix * .md
314+ pnpm exec markdownlint --fix * .md
323315
324316.PHONY : lint-spell
325317lint-spell : # # lint spelling
@@ -369,19 +361,19 @@ lint-yaml: .venv ## lint yaml files
369361
370362.PHONY : lint-json
371363lint-json : node_modules # # lint json files
372- $( NODE_VARS ) pnpm exec eslint -c eslint.json.config.ts --color --max-warnings=0 --concurrency $(ESLINT_CONCURRENCY )
364+ pnpm exec eslint -c eslint.json.config.ts --color --max-warnings=0 --concurrency $(ESLINT_CONCURRENCY )
373365
374366.PHONY : lint-json-fix
375367lint-json-fix : node_modules # # lint and fix json files
376- $( NODE_VARS ) pnpm exec eslint -c eslint.json.config.ts --color --max-warnings=0 --concurrency $(ESLINT_CONCURRENCY ) --fix
368+ pnpm exec eslint -c eslint.json.config.ts --color --max-warnings=0 --concurrency $(ESLINT_CONCURRENCY ) --fix
377369
378370.PHONY : watch
379371watch : # # watch everything and continuously rebuild
380372 @bash tools/watch.sh
381373
382374.PHONY : watch-frontend
383375watch-frontend : node_modules # # start vite dev server for frontend
384- NODE_ENV=development $( NODE_VARS ) pnpm exec vite
376+ NODE_ENV=development pnpm exec vite --logLevel $( FRONTEND_DEV_LOG_LEVEL )
385377
386378.PHONY : watch-backend
387379watch-backend : # # watch backend files and continuously rebuild
@@ -397,7 +389,7 @@ test-backend: ## test backend files
397389
398390.PHONY : test-frontend
399391test-frontend : node_modules # # test frontend files
400- $( NODE_VARS ) pnpm exec vitest
392+ pnpm exec vitest
401393
402394.PHONY : test-check
403395test-check :
@@ -533,7 +525,7 @@ test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test
533525.PHONY : playwright
534526playwright : deps-frontend
535527 @# on GitHub Actions VMs, playwright's system deps are pre-installed
536- @$( NODE_VARS ) pnpm exec playwright install $(if $(GITHUB_ACTIONS ) ,,--with-deps) chromium $(if $(CI ) ,firefox) $(PLAYWRIGHT_FLAGS )
528+ @pnpm exec playwright install $(if $(GITHUB_ACTIONS ) ,,--with-deps) chromium $(if $(CI ) ,firefox) $(PLAYWRIGHT_FLAGS )
537529
538530.PHONY : test-e2e
539531test-e2e : playwright $(EXECUTABLE_E2E )
@@ -749,28 +741,33 @@ deps-tools: ## install tool dependencies
749741 wait
750742
751743node_modules : pnpm-lock.yaml
752- $( NODE_VARS ) pnpm install --frozen-lockfile
744+ pnpm install --frozen-lockfile
753745 @touch node_modules
754746
755747.venv : uv.lock
756748 uv sync
757749 @touch .venv
758750
759751.PHONY : update
760- update : update-js update-py # # update js and py dependencies
752+ update : update-go update-js update-py # # update dependencies
753+
754+ .PHONY : update-go
755+ update-go : # # update go dependencies
756+ $(GO ) get -u ./...
757+ $(MAKE ) tidy
761758
762759.PHONY : update-js
763760update-js : node_modules # # update js dependencies
764- $( NODE_VARS ) pnpm exec updates -u -f package.json
761+ pnpm exec updates -u -f package.json
765762 rm -rf node_modules pnpm-lock.yaml
766- $( NODE_VARS ) pnpm install
767- $( NODE_VARS ) pnpm exec nolyfill install
768- $( NODE_VARS ) pnpm install
763+ pnpm install
764+ pnpm exec nolyfill install
765+ pnpm install
769766 @touch node_modules
770767
771768.PHONY : update-py
772769update-py : node_modules # # update py dependencies
773- $( NODE_VARS ) pnpm exec updates -u -f pyproject.toml
770+ pnpm exec updates -u -f pyproject.toml
774771 rm -rf .venv uv.lock
775772 uv sync
776773 @touch .venv
@@ -782,7 +779,7 @@ $(FRONTEND_DEST): $(FRONTEND_SOURCES) $(FRONTEND_CONFIGS) pnpm-lock.yaml
782779 @$(MAKE ) -s node_modules
783780 @rm -rf $(FRONTEND_DEST_ENTRIES )
784781 @echo " Running vite build..."
785- @$( NODE_VARS ) pnpm exec vite build
782+ @pnpm exec vite build
786783 @touch $(FRONTEND_DEST )
787784
788785.PHONY : svg
@@ -802,7 +799,7 @@ svg-check: svg
802799
803800.PHONY : lockfile-check
804801lockfile-check :
805- $( NODE_VARS ) pnpm install --frozen-lockfile
802+ pnpm install --frozen-lockfile
806803 @diff=$$(git diff --color=always pnpm-lock.yaml ) ; \
807804 if [ -n " $$ diff" ]; then \
808805 echo " pnpm-lock.yaml is inconsistent with package.json" ; \
0 commit comments