Fix relative-time RangeError#37021
Merged
silverwind merged 5 commits intogo-gitea:mainfrom Mar 28, 2026
Merged
Conversation
Contributor
|
It also fixes this: JavaScript error: Uncaught RangeError: Incorrect locale information provided #25324 |
wxiaoguang
reviewed
Mar 28, 2026
398ae9c to
f78cc47
Compare
Add 'en' fallback for navigator.language which can be undefined in headless browsers (e.g. Playwright Firefox), causing RangeError in Intl.DateTimeFormat. Add e2e test and shared assertNoJsError helper. Co-Authored-By: Claude (Opus 4.6) <[email protected]>
wxiaoguang
reviewed
Mar 28, 2026
wxiaoguang
approved these changes
Mar 28, 2026
Member
Author
|
Looks good. This new |
bircni
approved these changes
Mar 28, 2026
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Mar 28, 2026
* origin/main: Fix relative-time RangeError (go-gitea#37021) Restyle Workflow Graph (go-gitea#36912) Update message severity colors, fix navbar double border (go-gitea#37019) Clean up checkbox cursor styles (go-gitea#37016) add missing cron tasks to example ini (go-gitea#37012) Add e2e tests for server push events (go-gitea#36879)
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Mar 30, 2026
* main: (35 commits) Correct swagger annotations for enums, status codes, and notification state (go-gitea#37030) Update Nix flake (go-gitea#37024) Bump go and python versions in nix flake (go-gitea#37031) Make task list checkboxes clickable in the preview tab (go-gitea#37010) Add support for in_progress event in workflow_run webhook (go-gitea#36979) Fix various problems (go-gitea#37029) Update AI Contribution Policy (go-gitea#37022) Migrate from webpack to vite (go-gitea#37002) Upgrade yaml (go-gitea#37015) Fix issue label deletion with Actions tokens (go-gitea#37013) Hide delete branch or tag buttons in mirror or archived repositories. (go-gitea#37006) Update AGENTS.md with additional guidelines (go-gitea#37018) Optimize 'refreshAccesses' to perform update without removing then adding (go-gitea#35702) Fix relative-time RangeError (go-gitea#37021) Restyle Workflow Graph (go-gitea#36912) Update message severity colors, fix navbar double border (go-gitea#37019) Clean up checkbox cursor styles (go-gitea#37016) add missing cron tasks to example ini (go-gitea#37012) Add e2e tests for server push events (go-gitea#36879) Update JS dependencies (go-gitea#37001) ...
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Mar 30, 2026
* origin/main: (69 commits) Correct swagger annotations for enums, status codes, and notification state (go-gitea#37030) Update Nix flake (go-gitea#37024) Bump go and python versions in nix flake (go-gitea#37031) Make task list checkboxes clickable in the preview tab (go-gitea#37010) Add support for in_progress event in workflow_run webhook (go-gitea#36979) Fix various problems (go-gitea#37029) Update AI Contribution Policy (go-gitea#37022) Migrate from webpack to vite (go-gitea#37002) Upgrade yaml (go-gitea#37015) Fix issue label deletion with Actions tokens (go-gitea#37013) Hide delete branch or tag buttons in mirror or archived repositories. (go-gitea#37006) Update AGENTS.md with additional guidelines (go-gitea#37018) Optimize 'refreshAccesses' to perform update without removing then adding (go-gitea#35702) Fix relative-time RangeError (go-gitea#37021) Restyle Workflow Graph (go-gitea#36912) Update message severity colors, fix navbar double border (go-gitea#37019) Clean up checkbox cursor styles (go-gitea#37016) add missing cron tasks to example ini (go-gitea#37012) Add e2e tests for server push events (go-gitea#36879) Update JS dependencies (go-gitea#37001) ... # Conflicts: # package.json # pnpm-lock.yaml # tests/e2e/utils.ts # web_src/css/themes/theme-gitea-dark.css # web_src/css/themes/theme-gitea-light.css # web_src/js/bootstrap.ts # web_src/js/features/codeeditor.ts # web_src/js/modules/errors.test.ts # webpack.config.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
navigator.languagecan beundefinedin headless browsers (e.g. Playwright Firefox), causingRangeError: invalid language tag: "undefined"inIntl.DateTimeFormatwithin therelative-timeweb component.Also adds an e2e test that verifies
relative-timerenders correctly and a sharedassertNoJsErrorhelper.Bug is als present in https://github.com/github/relative-time-element but (incorrectly) masked there.
Fixes: #25324