Skip to content

Commit 52658d0

Browse files
committed
Merge remote-tracking branch 'origin/main' into darkmono
* origin/main: Update JS dependencies and misc tweaks (go-gitea#37064) Redirect to the only OAuth2 provider when no other login methods and fix various problems (go-gitea#36901) Show workflow link (go-gitea#37070) Remove leftover `webpackChunkName` comments from codeeditor (go-gitea#37062) Update Go dependencies (go-gitea#36781) Add webhook name field to improve webhook identification (go-gitea#37025) (go-gitea#37040) Upgrade `go-git` to v5.17.2 (go-gitea#37060) Replace Monaco with CodeMirror (go-gitea#36764) Update Combine method to treat warnings as failures and adjust tests (go-gitea#37048) Raise minimum Node.js version to 22.18.0 (go-gitea#37058) Update golangci-lint to v2.11.4 (go-gitea#37059) Upgrade `golang.org/x/image` to v0.38.0 (go-gitea#37054) # Conflicts: # web_src/css/themes/theme-gitea-dark.css
2 parents 37813ea + 3a9cab0 commit 52658d0

107 files changed

Lines changed: 4153 additions & 2123 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ XGO_VERSION := go-1.25.x
1515
AIR_PACKAGE ?= github.com/air-verse/air@v1
1616
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3
1717
GOFUMPT_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
1919
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.15
2020
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.8.0
2121
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.33.1
@@ -81,15 +81,6 @@ STORED_VERSION_FILE := VERSION
8181
GITHUB_REF_TYPE ?= branch
8282
GITHUB_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-
9384
ifneq ($(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)
124115
FRONTEND_CONFIGS := vite.config.ts tailwind.config.ts
125116
FRONTEND_DEST := public/assets/.vite/manifest.json
126117
FRONTEND_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts public/assets/.vite
118+
FRONTEND_DEV_LOG_LEVEL ?= warn
127119

128120
BINDATA_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
295287
lint-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
300292
lint-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
305297
lint-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
309301
lint-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
313305
lint-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
317309
lint-md: node_modules ## lint markdown files
318-
$(NODE_VARS) pnpm exec markdownlint *.md
310+
pnpm exec markdownlint *.md
319311

320312
.PHONY: lint-md-fix
321313
lint-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
325317
lint-spell: ## lint spelling
@@ -369,19 +361,19 @@ lint-yaml: .venv ## lint yaml files
369361

370362
.PHONY: lint-json
371363
lint-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
375367
lint-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
379371
watch: ## watch everything and continuously rebuild
380372
@bash tools/watch.sh
381373

382374
.PHONY: watch-frontend
383375
watch-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
387379
watch-backend: ## watch backend files and continuously rebuild
@@ -397,7 +389,7 @@ test-backend: ## test backend files
397389

398390
.PHONY: test-frontend
399391
test-frontend: node_modules ## test frontend files
400-
$(NODE_VARS) pnpm exec vitest
392+
pnpm exec vitest
401393

402394
.PHONY: test-check
403395
test-check:
@@ -533,7 +525,7 @@ test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test
533525
.PHONY: playwright
534526
playwright: 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
539531
test-e2e: playwright $(EXECUTABLE_E2E)
@@ -749,28 +741,33 @@ deps-tools: ## install tool dependencies
749741
wait
750742

751743
node_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
763760
update-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
772769
update-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
804801
lockfile-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"; \

assets/go-licenses.json

Lines changed: 48 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/backport/backport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"strconv"
1717
"strings"
1818

19-
"github.com/google/go-github/v74/github"
19+
"github.com/google/go-github/v84/github"
2020
"github.com/urfave/cli/v3"
2121
"gopkg.in/yaml.v3"
2222
)

eslint.config.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export default defineConfig([
329329
'github/no-innerText': [2],
330330
'github/no-then': [2],
331331
'github/no-useless-passive': [2],
332-
'github/prefer-observers': [2],
332+
'github/prefer-observers': [0],
333333
'github/require-passive-events': [2],
334334
'github/unescaped-html-literal': [2],
335335
'grouped-accessor-pairs': [2],
@@ -766,6 +766,7 @@ export default defineConfig([
766766
'unicorn/catch-error-name': [0],
767767
'unicorn/consistent-destructuring': [2],
768768
'unicorn/consistent-empty-array-spread': [2],
769+
'unicorn/consistent-template-literal-escape': [2],
769770
'unicorn/consistent-existence-index-check': [0],
770771
'unicorn/consistent-function-scoping': [0],
771772
'unicorn/custom-error-definition': [0],
@@ -821,6 +822,7 @@ export default defineConfig([
821822
'unicorn/no-unused-properties': [2],
822823
'unicorn/no-useless-collection-argument': [2],
823824
'unicorn/no-useless-fallback-in-spread': [2],
825+
'unicorn/no-useless-iterator-to-array': [2],
824826
'unicorn/no-useless-length-check': [2],
825827
'unicorn/no-useless-promise-resolve-reject': [2],
826828
'unicorn/no-useless-spread': [2],
@@ -870,6 +872,7 @@ export default defineConfig([
870872
'unicorn/prefer-response-static-json': [2],
871873
'unicorn/prefer-set-has': [0],
872874
'unicorn/prefer-set-size': [2],
875+
'unicorn/prefer-simple-condition-first': [0],
873876
'unicorn/prefer-spread': [0],
874877
'unicorn/prefer-string-raw': [0],
875878
'unicorn/prefer-string-replace-all': [0],
@@ -888,6 +891,7 @@ export default defineConfig([
888891
'unicorn/require-post-message-target-origin': [0],
889892
'unicorn/string-content': [0],
890893
'unicorn/switch-case-braces': [0],
894+
'unicorn/switch-case-break-position': [2],
891895
'unicorn/template-indent': [2],
892896
'unicorn/text-encoding-identifier-case': [0],
893897
'unicorn/throw-new-error': [2],
@@ -1013,7 +1017,7 @@ export default defineConfig([
10131017
},
10141018
},
10151019
{
1016-
files: ['*', 'tools/**/*'],
1020+
files: ['*', 'tools/**/*', 'tests/**/*'],
10171021
languageOptions: {globals: globals.nodeBuiltin},
10181022
},
10191023
{

0 commit comments

Comments
 (0)