From f8dfb5905f8a90ea4bdd38f2f3eb97f68a47d5c5 Mon Sep 17 00:00:00 2001
From: wxiaoguang
Date: Tue, 11 Mar 2025 00:52:08 +0800
Subject: [PATCH 01/21] Remove "noscript" tag from html head (#33846)
(cherry picked from commit 7fa47de7e96f6d05cdc6d920b0264ce8115de5a8)
---
templates/base/head.tmpl | 6 ------
1 file changed, 6 deletions(-)
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index 9eb5b5addf..7ec2ac87b3 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -20,12 +20,6 @@
{{template "base/head_script" .}}
-
-
-
{{template "shared/user/mention_highlight" .}}
{{template "base/head_opengraph" .}}
{{template "base/head_style" .}}
From 0dfa5d0c7de137cd072fb007e067bdd722670865 Mon Sep 17 00:00:00 2001
From: wxiaoguang
Date: Fri, 14 Mar 2025 16:36:39 +0800
Subject: [PATCH 02/21] Ignore trivial errors when updating push data (#33864)
Fix #23213
(cherry picked from commit cb6b33c9cd1efa619351a458e2bce8ad1e6cd623)
---
services/gitdiff/gitdiff.go | 2 --
services/repository/push.go | 36 ++++++++++++++++++++----------------
2 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go
index 65f6ac8d12..f2070983e6 100644
--- a/services/gitdiff/gitdiff.go
+++ b/services/gitdiff/gitdiff.go
@@ -1381,10 +1381,8 @@ func GetWhitespaceFlag(whitespaceBehavior string) git.TrustedCmdArgs {
"ignore-eol": {"--ignore-space-at-eol"},
"show-all": nil,
}
-
if flag, ok := whitespaceFlags[whitespaceBehavior]; ok {
return flag
}
- log.Warn("unknown whitespace behavior: %q, default to 'show-all'", whitespaceBehavior)
return nil
}
diff --git a/services/repository/push.go b/services/repository/push.go
index 0c2b66aa3e..924f365c05 100644
--- a/services/repository/push.go
+++ b/services/repository/push.go
@@ -23,6 +23,7 @@ import (
repo_module "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/timeutil"
+ "code.gitea.io/gitea/modules/util"
issue_service "code.gitea.io/gitea/services/issue"
notify_service "code.gitea.io/gitea/services/notify"
pull_service "code.gitea.io/gitea/services/pull"
@@ -133,23 +134,26 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
} else { // is new tag
newCommit, err := gitRepo.GetCommit(opts.NewCommitID)
if err != nil {
- return fmt.Errorf("gitRepo.GetCommit(%s) in %s/%s[%d]: %w", opts.NewCommitID, repo.OwnerName, repo.Name, repo.ID, err)
+ // in case there is dirty data, for example, the "github.com/git/git" repository has tags pointing to non-existing commits
+ if !errors.Is(err, util.ErrNotExist) {
+ log.Error("Unable to get tag commit: gitRepo.GetCommit(%s) in %s/%s[%d]: %v", opts.NewCommitID, repo.OwnerName, repo.Name, repo.ID, err)
+ }
+ } else {
+ commits := repo_module.NewPushCommits()
+ commits.HeadCommit = repo_module.CommitToPushCommit(newCommit)
+ commits.CompareURL = repo.ComposeCompareURL(objectFormat.EmptyObjectID().String(), opts.NewCommitID)
+
+ notify_service.PushCommits(
+ ctx, pusher, repo,
+ &repo_module.PushUpdateOptions{
+ RefFullName: opts.RefFullName,
+ OldCommitID: objectFormat.EmptyObjectID().String(),
+ NewCommitID: opts.NewCommitID,
+ }, commits)
+
+ addTags = append(addTags, tagName)
+ notify_service.CreateRef(ctx, pusher, repo, opts.RefFullName, opts.NewCommitID)
}
-
- commits := repo_module.NewPushCommits()
- commits.HeadCommit = repo_module.CommitToPushCommit(newCommit)
- commits.CompareURL = repo.ComposeCompareURL(objectFormat.EmptyObjectID().String(), opts.NewCommitID)
-
- notify_service.PushCommits(
- ctx, pusher, repo,
- &repo_module.PushUpdateOptions{
- RefFullName: opts.RefFullName,
- OldCommitID: objectFormat.EmptyObjectID().String(),
- NewCommitID: opts.NewCommitID,
- }, commits)
-
- addTags = append(addTags, tagName)
- notify_service.CreateRef(ctx, pusher, repo, opts.RefFullName, opts.NewCommitID)
}
} else if opts.RefFullName.IsBranch() {
if pusher == nil || pusher.ID != opts.PusherID {
From 5e338062c5d231decc7f60e3690df4b57b05ac39 Mon Sep 17 00:00:00 2001
From: Renovate Bot
Date: Mon, 17 Mar 2025 08:17:54 +0000
Subject: [PATCH 03/21] Update renovate to v39.205.0 (forgejo) (#7246)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7246
Reviewed-by: Michael Kriese
Co-authored-by: Renovate Bot
Co-committed-by: Renovate Bot
---
.forgejo/workflows/renovate.yml | 2 +-
Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.forgejo/workflows/renovate.yml b/.forgejo/workflows/renovate.yml
index b97ce6f3b0..48f2d6dd50 100644
--- a/.forgejo/workflows/renovate.yml
+++ b/.forgejo/workflows/renovate.yml
@@ -28,7 +28,7 @@ jobs:
runs-on: docker
container:
- image: data.forgejo.org/renovate/renovate:39.195.1
+ image: data.forgejo.org/renovate/renovate:39.205.1
steps:
- name: Load renovate repo cache
diff --git a/Makefile b/Makefile
index b715a1be38..ce607b3668 100644
--- a/Makefile
+++ b/Makefile
@@ -49,7 +49,7 @@ GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1 # renovate: datasour
DEADCODE_PACKAGE ?= golang.org/x/tools/cmd/deadcode@v0.31.0 # renovate: datasource=go
GOMOCK_PACKAGE ?= go.uber.org/mock/mockgen@v0.4.0 # renovate: datasource=go
GOPLS_PACKAGE ?= golang.org/x/tools/gopls@v0.18.1 # renovate: datasource=go
-RENOVATE_NPM_PACKAGE ?= renovate@39.195.1 # renovate: datasource=docker packageName=data.forgejo.org/renovate/renovate
+RENOVATE_NPM_PACKAGE ?= renovate@39.205.1 # renovate: datasource=docker packageName=data.forgejo.org/renovate/renovate
# https://github.com/disposable-email-domains/disposable-email-domains/commits/main/
DISPOSABLE_EMAILS_SHA ?= 0c27e671231d27cf66370034d7f6818037416989 # renovate: ...
From 511148dbc3b18df56cef1dfd2f0f84b88930684c Mon Sep 17 00:00:00 2001
From: Gusted
Date: Mon, 17 Mar 2025 09:00:12 +0000
Subject: [PATCH 04/21] perf: avoid sorting team names for `ComposeMetas`
(#7223)
- `ComposeMetas` is called to compose meta information for the markdown processer (which is called a lot), one of those information is the team names that have access to the repository. This is used to decide if a mention is a team mention or not.
- The SQL query sorts the names, this is unnecessary and not required for within the processer; it does a simple `strings.Contains(teams, ","+teamName+",")`, which doesn't rely on sorted values.
- Doing the SQL query with sorting against Codeberg's MariaDB took ~0.180s and without sorting took ~0.03s. Although the returned values are often a few rows (the query I tested returned 8 values) it seems that doing any sorting will create an temporary index and is mainly optimized where it has to sort a huge amount of rows.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7223
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto
Co-authored-by: Gusted
Co-committed-by: Gusted
---
models/repo/repo.go | 1 -
1 file changed, 1 deletion(-)
diff --git a/models/repo/repo.go b/models/repo/repo.go
index bdf0de2f85..ca7d50ca6a 100644
--- a/models/repo/repo.go
+++ b/models/repo/repo.go
@@ -529,7 +529,6 @@ func (repo *Repository) ComposeMetas(ctx context.Context) map[string]string {
Join("INNER", "team", "team.id = team_repo.team_id").
Where("team_repo.repo_id = ?", repo.ID).
Select("team.lower_name").
- OrderBy("team.lower_name").
Find(&teams)
metas["teams"] = "," + strings.Join(teams, ",") + ","
metas["org"] = strings.ToLower(repo.OwnerName)
From ccd87001c8822f575ba6e2c45c37078c3d6fc625 Mon Sep 17 00:00:00 2001
From: Gusted
Date: Mon, 17 Mar 2025 09:00:24 +0000
Subject: [PATCH 05/21] chore(runner): return errors created by `connect`
(#7222)
- Instead of creating errors via `google.golang.org/grpc`, use `connectrpc.com/connect`.
- This _avoids_ another dependency (still indirectly referenced in testing).
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7222
Reviewed-by: Otto
Co-authored-by: Gusted
Co-committed-by: Gusted
---
assets/go-licenses.json | 10 -----
go.mod | 2 +-
routers/api/actions/runner/interceptor.go | 8 ++--
routers/api/actions/runner/runner.go | 45 +++++++++++------------
4 files changed, 26 insertions(+), 39 deletions(-)
diff --git a/assets/go-licenses.json b/assets/go-licenses.json
index c9e80d16ae..af9c0ce8e0 100644
--- a/assets/go-licenses.json
+++ b/assets/go-licenses.json
@@ -1059,16 +1059,6 @@
"path": "golang.org/x/time/rate/LICENSE",
"licenseText": "Copyright 2009 The Go Authors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n * Neither the name of Google LLC nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
},
- {
- "name": "google.golang.org/genproto/googleapis/rpc/status",
- "path": "google.golang.org/genproto/googleapis/rpc/status/LICENSE",
- "licenseText": "\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright [yyyy] [name of copyright owner]\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n"
- },
- {
- "name": "google.golang.org/grpc",
- "path": "google.golang.org/grpc/LICENSE",
- "licenseText": "\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright [yyyy] [name of copyright owner]\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n"
- },
{
"name": "google.golang.org/protobuf",
"path": "google.golang.org/protobuf/LICENSE",
diff --git a/go.mod b/go.mod
index dccbaf9029..eed74a4536 100644
--- a/go.mod
+++ b/go.mod
@@ -108,7 +108,6 @@ require (
golang.org/x/sync v0.12.0
golang.org/x/sys v0.31.0
golang.org/x/text v0.23.0
- google.golang.org/grpc v1.71.0
google.golang.org/protobuf v1.36.4
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/ini.v1 v1.67.0
@@ -276,6 +275,7 @@ require (
google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
+ google.golang.org/grpc v1.71.0 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)
diff --git a/routers/api/actions/runner/interceptor.go b/routers/api/actions/runner/interceptor.go
index 521ba910e3..b56e6870ac 100644
--- a/routers/api/actions/runner/interceptor.go
+++ b/routers/api/actions/runner/interceptor.go
@@ -16,8 +16,6 @@ import (
"code.gitea.io/gitea/modules/util"
"connectrpc.com/connect"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/status"
)
const (
@@ -37,12 +35,12 @@ var withRunner = connect.WithInterceptors(connect.UnaryInterceptorFunc(func(unar
runner, err := actions_model.GetRunnerByUUID(ctx, uuid)
if err != nil {
if errors.Is(err, util.ErrNotExist) {
- return nil, status.Error(codes.Unauthenticated, "unregistered runner")
+ return nil, connect.NewError(connect.CodeUnauthenticated, errors.New("unregistered runner"))
}
- return nil, status.Error(codes.Internal, err.Error())
+ return nil, connect.NewError(connect.CodeInternal, err)
}
if subtle.ConstantTimeCompare([]byte(runner.TokenHash), []byte(auth_model.HashToken(token, runner.TokenSalt))) != 1 {
- return nil, status.Error(codes.Unauthenticated, "unregistered runner")
+ return nil, connect.NewError(connect.CodeUnauthenticated, errors.New("unregistered runner"))
}
cols := []string{"last_online"}
diff --git a/routers/api/actions/runner/runner.go b/routers/api/actions/runner/runner.go
index 4316b4a8e1..6cd37fd224 100644
--- a/routers/api/actions/runner/runner.go
+++ b/routers/api/actions/runner/runner.go
@@ -6,6 +6,7 @@ package runner
import (
"context"
"errors"
+ "fmt"
"net/http"
actions_model "code.gitea.io/gitea/models/actions"
@@ -20,8 +21,6 @@ import (
"code.gitea.io/actions-proto-go/runner/v1/runnerv1connect"
"connectrpc.com/connect"
gouuid "github.com/google/uuid"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/status"
)
func NewRunnerServiceHandler() (string, http.Handler) {
@@ -44,27 +43,27 @@ func (s *Service) Register(
req *connect.Request[runnerv1.RegisterRequest],
) (*connect.Response[runnerv1.RegisterResponse], error) {
if req.Msg.Token == "" || req.Msg.Name == "" {
- return nil, errors.New("missing runner token, name")
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("missing runner token, name"))
}
runnerToken, err := actions_model.GetRunnerToken(ctx, req.Msg.Token)
if err != nil {
- return nil, errors.New("runner registration token not found")
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("runner registration token not found"))
}
if !runnerToken.IsActive {
- return nil, errors.New("runner registration token has been invalidated, please use the latest one")
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("runner registration token has been invalidated, please use the latest one"))
}
if runnerToken.OwnerID > 0 {
if _, err := user_model.GetUserByID(ctx, runnerToken.OwnerID); err != nil {
- return nil, errors.New("owner of the token not found")
+ return nil, connect.NewError(connect.CodeInternal, errors.New("owner of the token not found"))
}
}
if runnerToken.RepoID > 0 {
if _, err := repo_model.GetRepositoryByID(ctx, runnerToken.RepoID); err != nil {
- return nil, errors.New("repository of the token not found")
+ return nil, connect.NewError(connect.CodeInternal, errors.New("repository of the token not found"))
}
}
@@ -81,18 +80,18 @@ func (s *Service) Register(
AgentLabels: labels,
}
if err := runner.GenerateToken(); err != nil {
- return nil, errors.New("can't generate token")
+ return nil, connect.NewError(connect.CodeInternal, errors.New("can't generate token"))
}
// create new runner
if err := actions_model.CreateRunner(ctx, runner); err != nil {
- return nil, errors.New("can't create new runner")
+ return nil, connect.NewError(connect.CodeInternal, errors.New("can't create new runner"))
}
// update token status
runnerToken.IsActive = true
if err := actions_model.UpdateRunnerToken(ctx, runnerToken, "is_active"); err != nil {
- return nil, errors.New("can't update runner token status")
+ return nil, connect.NewError(connect.CodeInternal, errors.New("can't update runner token status"))
}
res := connect.NewResponse(&runnerv1.RegisterResponse{
@@ -117,7 +116,7 @@ func (s *Service) Declare(
runner.AgentLabels = req.Msg.Labels
runner.Version = req.Msg.Version
if err := actions_model.UpdateRunner(ctx, runner, "agent_labels", "version"); err != nil {
- return nil, status.Errorf(codes.Internal, "update runner: %v", err)
+ return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("update runner: %w", err))
}
return connect.NewResponse(&runnerv1.DeclareResponse{
@@ -143,10 +142,10 @@ func (s *Service) FetchTask(
tasksVersion := req.Msg.TasksVersion // task version from runner
latestVersion, err := actions_model.GetTasksVersionByScope(ctx, runner.OwnerID, runner.RepoID)
if err != nil {
- return nil, status.Errorf(codes.Internal, "query tasks version failed: %v", err)
+ return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("query tasks version failed: %w", err))
} else if latestVersion == 0 {
if err := actions_model.IncreaseTaskVersion(ctx, runner.OwnerID, runner.RepoID); err != nil {
- return nil, status.Errorf(codes.Internal, "fail to increase task version: %v", err)
+ return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("fail to increase task version: %w", err))
}
// if we don't increase the value of `latestVersion` here,
// the response of FetchTask will return tasksVersion as zero.
@@ -160,7 +159,7 @@ func (s *Service) FetchTask(
// try to pick a task for the runner that send the request.
if t, ok, err := actions_service.PickTask(ctx, runner); err != nil {
log.Error("pick task failed: %v", err)
- return nil, status.Errorf(codes.Internal, "pick task: %v", err)
+ return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("pick task: %w", err))
} else if ok {
task = t
}
@@ -181,7 +180,7 @@ func (s *Service) UpdateTask(
task, err := actions_model.UpdateTaskByState(ctx, runner.ID, req.Msg.State)
if err != nil {
- return nil, status.Errorf(codes.Internal, "update task: %v", err)
+ return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("update task: %w", err))
}
for k, v := range req.Msg.Outputs {
@@ -210,10 +209,10 @@ func (s *Service) UpdateTask(
}
if err := task.LoadJob(ctx); err != nil {
- return nil, status.Errorf(codes.Internal, "load job: %v", err)
+ return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("load job: %w", err))
}
if err := task.Job.LoadRun(ctx); err != nil {
- return nil, status.Errorf(codes.Internal, "load run: %v", err)
+ return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("load run: %w", err))
}
// don't create commit status for cron job
@@ -247,9 +246,9 @@ func (s *Service) UpdateLog(
task, err := actions_model.GetTaskByID(ctx, req.Msg.TaskId)
if err != nil {
- return nil, status.Errorf(codes.Internal, "get task: %v", err)
+ return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("get task: %w", err))
} else if runner.ID != task.RunnerID {
- return nil, status.Errorf(codes.Internal, "invalid runner for task")
+ return nil, connect.NewError(connect.CodeInternal, errors.New("invalid runner for task"))
}
ack := task.LogLength
@@ -259,13 +258,13 @@ func (s *Service) UpdateLog(
}
if task.LogInStorage {
- return nil, status.Errorf(codes.AlreadyExists, "log file has been archived")
+ return nil, connect.NewError(connect.CodeAlreadyExists, errors.New("log file has been archived"))
}
rows := req.Msg.Rows[ack-req.Msg.Index:]
ns, err := actions.WriteLogs(ctx, task.LogFilename, task.LogSize, rows)
if err != nil {
- return nil, status.Errorf(codes.Internal, "write logs: %v", err)
+ return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("write logs: %w", err))
}
task.LogLength += int64(len(rows))
for _, n := range ns {
@@ -280,12 +279,12 @@ func (s *Service) UpdateLog(
task.LogInStorage = true
remove, err = actions.TransferLogs(ctx, task.LogFilename)
if err != nil {
- return nil, status.Errorf(codes.Internal, "transfer logs: %v", err)
+ return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("transfer logs: %w", err))
}
}
if err := actions_model.UpdateTask(ctx, task, "log_indexes", "log_length", "log_size", "log_in_storage"); err != nil {
- return nil, status.Errorf(codes.Internal, "update task: %v", err)
+ return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("update task: %w", err))
}
if remove != nil {
remove()
From d5c8091e089ed9b56574ef6488c99aac01a75298 Mon Sep 17 00:00:00 2001
From: Gusted
Date: Mon, 17 Mar 2025 09:00:34 +0000
Subject: [PATCH 06/21] perf: optimize converting releases to feed items
(#7221)
- `releasesToFeedItems` is called to convert release structs to feed items, which is then used to render RSS or Atom feeds.
- Optimize the loading of attributes for the releases, introduce `ReleaseList` type which uses caching to load repository and publishers. It also no longer loads release attachments and downloads counts as that is not used in feed items.
- Optimize the composing of meta by introducing caching, this operation is especially slow when the owner is an organization.
- Add unit test (ensures new `LoadAttributes` works correctly).
- Add integration test (ensures that feed output is still as expected).
Loading https://codeberg.org/forgejo/forgejo/releases.rss reduced from ~15s to ~1s. (It is currently is deployed on codeberg.org)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7221
Reviewed-by: Otto
Co-authored-by: Gusted
Co-committed-by: Gusted
---
models/repo/release_list.go | 45 +++++++++++++
models/repo/release_list_test.go | 42 ++++++++++++
routers/web/feed/convert.go | 22 ++++---
tests/integration/release_feed_test.go | 91 ++++++++++++++++++++++++++
4 files changed, 192 insertions(+), 8 deletions(-)
create mode 100644 models/repo/release_list.go
create mode 100644 models/repo/release_list_test.go
create mode 100644 tests/integration/release_feed_test.go
diff --git a/models/repo/release_list.go b/models/repo/release_list.go
new file mode 100644
index 0000000000..6c33262125
--- /dev/null
+++ b/models/repo/release_list.go
@@ -0,0 +1,45 @@
+// Copyright 2025 The Forgejo Authors. All rights reserved.
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+package repo
+
+import (
+ "context"
+
+ user_model "code.gitea.io/gitea/models/user"
+)
+
+type ReleaseList []*Release
+
+// LoadAttributes loads the repository and publisher for the releases.
+func (r ReleaseList) LoadAttributes(ctx context.Context) error {
+ repoCache := make(map[int64]*Repository)
+ userCache := make(map[int64]*user_model.User)
+
+ for _, release := range r {
+ var err error
+ repo, ok := repoCache[release.RepoID]
+ if !ok {
+ repo, err = GetRepositoryByID(ctx, release.RepoID)
+ if err != nil {
+ return err
+ }
+ repoCache[release.RepoID] = repo
+ }
+ release.Repo = repo
+
+ publisher, ok := userCache[release.PublisherID]
+ if !ok {
+ publisher, err = user_model.GetUserByID(ctx, release.PublisherID)
+ if err != nil {
+ if !user_model.IsErrUserNotExist(err) {
+ return err
+ }
+ publisher = user_model.NewGhostUser()
+ }
+ userCache[release.PublisherID] = publisher
+ }
+ release.Publisher = publisher
+ }
+ return nil
+}
diff --git a/models/repo/release_list_test.go b/models/repo/release_list_test.go
new file mode 100644
index 0000000000..cbd77683d0
--- /dev/null
+++ b/models/repo/release_list_test.go
@@ -0,0 +1,42 @@
+// Copyright 2025 The Forgejo Authors. All rights reserved.
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+package repo
+
+import (
+ "testing"
+
+ "code.gitea.io/gitea/models/unittest"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestReleaseListLoadAttributes(t *testing.T) {
+ require.NoError(t, unittest.PrepareTestDatabase())
+
+ releases := ReleaseList{&Release{
+ RepoID: 1,
+ PublisherID: 1,
+ }, &Release{
+ RepoID: 2,
+ PublisherID: 2,
+ }, &Release{
+ RepoID: 1,
+ PublisherID: 2,
+ }, &Release{
+ RepoID: 2,
+ PublisherID: 1,
+ }}
+
+ require.NoError(t, releases.LoadAttributes(t.Context()))
+
+ assert.EqualValues(t, 1, releases[0].Repo.ID)
+ assert.EqualValues(t, 1, releases[0].Publisher.ID)
+ assert.EqualValues(t, 2, releases[1].Repo.ID)
+ assert.EqualValues(t, 2, releases[1].Publisher.ID)
+ assert.EqualValues(t, 1, releases[2].Repo.ID)
+ assert.EqualValues(t, 2, releases[2].Publisher.ID)
+ assert.EqualValues(t, 2, releases[3].Repo.ID)
+ assert.EqualValues(t, 1, releases[3].Publisher.ID)
+}
diff --git a/routers/web/feed/convert.go b/routers/web/feed/convert.go
index d3d01a87e0..5f7687d803 100644
--- a/routers/web/feed/convert.go
+++ b/routers/web/feed/convert.go
@@ -298,14 +298,14 @@ func GetFeedType(name string, req *http.Request) (bool, string, string) {
return false, name, ""
}
-// feedActionsToFeedItems convert gitea's Repo's Releases to feeds Item
-func releasesToFeedItems(ctx *context.Context, releases []*repo_model.Release) (items []*feeds.Item, err error) {
- for _, rel := range releases {
- err := rel.LoadAttributes(ctx)
- if err != nil {
- return nil, err
- }
+// feedActionsToFeedItems convert repository releases into feed items.
+func releasesToFeedItems(ctx *context.Context, releases repo_model.ReleaseList) (items []*feeds.Item, err error) {
+ if err := releases.LoadAttributes(ctx); err != nil {
+ return nil, err
+ }
+ composeCache := make(map[int64]map[string]string)
+ for _, rel := range releases {
var title string
var content template.HTML
@@ -315,13 +315,19 @@ func releasesToFeedItems(ctx *context.Context, releases []*repo_model.Release) (
title = rel.Title
}
+ metas, ok := composeCache[rel.RepoID]
+ if !ok {
+ metas = rel.Repo.ComposeMetas(ctx)
+ composeCache[rel.RepoID] = metas
+ }
+
link := &feeds.Link{Href: rel.HTMLURL()}
content, err = markdown.RenderString(&markup.RenderContext{
Ctx: ctx,
Links: markup.Links{
Base: rel.Repo.Link(),
},
- Metas: rel.Repo.ComposeMetas(ctx),
+ Metas: metas,
}, rel.Note)
if err != nil {
return nil, err
diff --git a/tests/integration/release_feed_test.go b/tests/integration/release_feed_test.go
new file mode 100644
index 0000000000..fd1f42c3cd
--- /dev/null
+++ b/tests/integration/release_feed_test.go
@@ -0,0 +1,91 @@
+// Copyright 2025 The Forgejo Authors. All rights reserved.
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+package integration
+
+import (
+ "net/http"
+ "regexp"
+ "testing"
+
+ "code.gitea.io/gitea/tests"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestReleaseFeed(t *testing.T) {
+ defer tests.PrepareTestEnv(t)()
+
+ normalize := func(body string) string {
+ // Remove port.
+ body = regexp.MustCompile(`localhost:\d+`).ReplaceAllString(body, "localhost")
+ // date is timezone dependent.
+ body = regexp.MustCompile(`.* `).ReplaceAllString(body, " ")
+ body = regexp.MustCompile(`.* `).ReplaceAllString(body, " ")
+ return body
+ }
+ t.Run("RSS feed", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+
+ resp := MakeRequest(t, NewRequest(t, "GET", "/user2/repo1/releases.rss"), http.StatusOK)
+ assert.EqualValues(t, `
+
+ Releases for user2/repo1
+ http://localhost/user2/repo1/release
+
+
+ -
+
pre-release
+ http://localhost/user2/repo1/releases/tag/v1.0
+
+ some text for a pre release
+]]>
+ user2
+ 5: http://localhost/user2/repo1/releases/tag/v1.0
+
+
+ -
+
testing-release
+ http://localhost/user2/repo1/releases/tag/v1.1
+
+ user2
+ 1: http://localhost/user2/repo1/releases/tag/v1.1
+
+
+
+`, normalize(resp.Body.String()))
+ })
+
+ t.Run("Atom feed", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+
+ resp := MakeRequest(t, NewRequest(t, "GET", "/user2/repo1/releases.atom"), http.StatusOK)
+ assert.EqualValues(t, `
+ Releases for user2/repo1
+ http://localhost/user2/repo1/release
+
+
+
+ pre-release
+
+ 5: http://localhost/user2/repo1/releases/tag/v1.0
+ <p dir="auto">some text for a pre release</p>
+
+
+ user2
+ user2@noreply.example.org
+
+
+
+ testing-release
+
+ 1: http://localhost/user2/repo1/releases/tag/v1.1
+
+
+ user2
+ user2@noreply.example.org
+
+
+ `, normalize(resp.Body.String()))
+ })
+}
From 7d6d4f94ee909b1a330817017041e6becddfa0f8 Mon Sep 17 00:00:00 2001
From: Gusted
Date: Mon, 17 Mar 2025 09:02:57 +0000
Subject: [PATCH 07/21] feat(api): add sort parameter to list issues API
(#7211)
- Add the `sort` parameter to the `/api/v1/{repo}/{owner}/issues` API endpoint. Default behavior is preserved.
- Resolves forgejo/forgejo#4173
- Add (non-exhaustive) integration testing.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7211
Reviewed-by: Otto
Co-authored-by: Gusted
Co-committed-by: Gusted
---
modules/indexer/issues/indexer.go | 28 ++++++++++++++++++
routers/api/v1/repo/issue.go | 8 +++++-
templates/swagger/v1_json.tmpl | 18 ++++++++++++
tests/integration/api_issue_test.go | 44 +++++++++++++++++++++++++++++
4 files changed, 97 insertions(+), 1 deletion(-)
diff --git a/modules/indexer/issues/indexer.go b/modules/indexer/issues/indexer.go
index 7edcb3aa6f..3078882258 100644
--- a/modules/indexer/issues/indexer.go
+++ b/modules/indexer/issues/indexer.go
@@ -8,6 +8,7 @@ import (
"fmt"
"os"
"runtime/pprof"
+ "strings"
"sync/atomic"
"time"
@@ -280,6 +281,33 @@ const (
SortByDeadlineAsc = internal.SortByDeadlineAsc
)
+// ParseSortBy parses the `sortBy` string and returns the associated `SortBy`
+// value, if one exists. Otherwise return `defaultSortBy`.
+func ParseSortBy(sortBy string, defaultSortBy internal.SortBy) internal.SortBy {
+ switch strings.ToLower(sortBy) {
+ case "relevance":
+ return SortByScore
+ case "latest":
+ return SortByCreatedDesc
+ case "oldest":
+ return SortByCreatedAsc
+ case "recentupdate":
+ return SortByUpdatedDesc
+ case "leastupdate":
+ return SortByUpdatedAsc
+ case "mostcomment":
+ return SortByCommentsDesc
+ case "leastcomment":
+ return SortByCommentsAsc
+ case "nearduedate":
+ return SortByDeadlineAsc
+ case "farduedate":
+ return SortByDeadlineDesc
+ default:
+ return defaultSortBy
+ }
+}
+
// SearchIssues search issues by options.
func SearchIssues(ctx context.Context, opts *SearchOptions) ([]int64, int64, error) {
indexer := *globalIndexer.Load()
diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go
index 6221681875..57fc4b2f17 100644
--- a/routers/api/v1/repo/issue.go
+++ b/routers/api/v1/repo/issue.go
@@ -397,6 +397,12 @@ func ListIssues(ctx *context.APIContext) {
// in: query
// description: page size of results
// type: integer
+ // - name: sort
+ // in: query
+ // description: Type of sort
+ // type: string
+ // enum: [relevance, latest, oldest, recentupdate, leastupdate, mostcomment, leastcomment, nearduedate, farduedate]
+ // default: latest
// responses:
// "200":
// "$ref": "#/responses/IssueList"
@@ -510,7 +516,7 @@ func ListIssues(ctx *context.APIContext) {
RepoIDs: []int64{ctx.Repo.Repository.ID},
IsPull: isPull,
IsClosed: isClosed,
- SortBy: issue_indexer.SortByCreatedDesc,
+ SortBy: issue_indexer.ParseSortBy(ctx.FormString("sort"), issue_indexer.SortByCreatedDesc),
}
if since != 0 {
searchOpt.UpdatedAfterUnix = optional.Some(since)
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 36ed631207..4679a13fa3 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -8628,6 +8628,24 @@
"description": "page size of results",
"name": "limit",
"in": "query"
+ },
+ {
+ "enum": [
+ "relevance",
+ "latest",
+ "oldest",
+ "recentupdate",
+ "leastupdate",
+ "mostcomment",
+ "leastcomment",
+ "nearduedate",
+ "farduedate"
+ ],
+ "type": "string",
+ "default": "latest",
+ "description": "Type of sort",
+ "name": "sort",
+ "in": "query"
}
],
"responses": {
diff --git a/tests/integration/api_issue_test.go b/tests/integration/api_issue_test.go
index 4051f95ed9..2d3fd80c06 100644
--- a/tests/integration/api_issue_test.go
+++ b/tests/integration/api_issue_test.go
@@ -74,6 +74,50 @@ func TestAPIListIssues(t *testing.T) {
if assert.Len(t, apiIssues, 1) {
assert.EqualValues(t, 1, apiIssues[0].ID)
}
+
+ t.Run("Sort", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+
+ link.RawQuery = url.Values{"token": {token}, "sort": {"oldest"}}.Encode()
+ resp = MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
+ DecodeJSON(t, resp, &apiIssues)
+ if assert.Len(t, apiIssues, 4) {
+ assert.EqualValues(t, 1, apiIssues[0].ID)
+ assert.EqualValues(t, 2, apiIssues[1].ID)
+ assert.EqualValues(t, 3, apiIssues[2].ID)
+ assert.EqualValues(t, 11, apiIssues[3].ID)
+ }
+
+ link.RawQuery = url.Values{"token": {token}, "sort": {"newest"}}.Encode()
+ resp = MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
+ DecodeJSON(t, resp, &apiIssues)
+ if assert.Len(t, apiIssues, 4) {
+ assert.EqualValues(t, 11, apiIssues[0].ID)
+ assert.EqualValues(t, 3, apiIssues[1].ID)
+ assert.EqualValues(t, 2, apiIssues[2].ID)
+ assert.EqualValues(t, 1, apiIssues[3].ID)
+ }
+
+ link.RawQuery = url.Values{"token": {token}, "sort": {"recentupdate"}}.Encode()
+ resp = MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
+ DecodeJSON(t, resp, &apiIssues)
+ if assert.Len(t, apiIssues, 4) {
+ assert.EqualValues(t, 11, apiIssues[0].ID)
+ assert.EqualValues(t, 1, apiIssues[1].ID)
+ assert.EqualValues(t, 2, apiIssues[2].ID)
+ assert.EqualValues(t, 3, apiIssues[3].ID)
+ }
+
+ link.RawQuery = url.Values{"token": {token}, "sort": {"leastupdate"}}.Encode()
+ resp = MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
+ DecodeJSON(t, resp, &apiIssues)
+ if assert.Len(t, apiIssues, 4) {
+ assert.EqualValues(t, 3, apiIssues[0].ID)
+ assert.EqualValues(t, 2, apiIssues[1].ID)
+ assert.EqualValues(t, 1, apiIssues[2].ID)
+ assert.EqualValues(t, 11, apiIssues[3].ID)
+ }
+ })
}
func TestAPIListIssuesPublicOnly(t *testing.T) {
From 3901ae6ab142aaa6db645a75459a6951272f935d Mon Sep 17 00:00:00 2001
From: Renovate Bot
Date: Mon, 17 Mar 2025 13:49:34 +0000
Subject: [PATCH 08/21] Update module
github.com/editorconfig/editorconfig-core-go/v2 to v2.6.3 (forgejo) (#7214)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7214
Reviewed-by: Gusted
Co-authored-by: Renovate Bot
Co-committed-by: Renovate Bot
---
go.mod | 2 +-
go.sum | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/go.mod b/go.mod
index eed74a4536..819b1ee351 100644
--- a/go.mod
+++ b/go.mod
@@ -33,7 +33,7 @@ require (
github.com/djherbis/nio/v3 v3.0.1
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
github.com/dustin/go-humanize v1.0.1
- github.com/editorconfig/editorconfig-core-go/v2 v2.6.2
+ github.com/editorconfig/editorconfig-core-go/v2 v2.6.3
github.com/emersion/go-imap v1.2.1
github.com/felixge/fgprof v0.9.5
github.com/fsnotify/fsnotify v1.8.0
diff --git a/go.sum b/go.sum
index 4cf6d6e1e0..30fa071418 100644
--- a/go.sum
+++ b/go.sum
@@ -845,8 +845,8 @@ github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdf
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
-github.com/editorconfig/editorconfig-core-go/v2 v2.6.2 h1:dKG8sc7n321deIVRcQtwlMNoBEra7j0qQ8RwxO8RN0w=
-github.com/editorconfig/editorconfig-core-go/v2 v2.6.2/go.mod h1:7dvD3GCm7eBw53xZ/lsiq72LqobdMg3ITbMBxnmJmqY=
+github.com/editorconfig/editorconfig-core-go/v2 v2.6.3 h1:XVUp6qW3BIkmM3/1EkrHpa6bL56APOynfXcZEmIgOhs=
+github.com/editorconfig/editorconfig-core-go/v2 v2.6.3/go.mod h1:ThHVc+hqbUsmE1wmK/MASpQEhCleWu1JDJDNhUOMy0c=
github.com/elazarl/goproxy v1.4.0 h1:4GyuSbFa+s26+3rmYNSuUVsx+HgPrV1bk1jXI0l9wjM=
github.com/elazarl/goproxy v1.4.0/go.mod h1:X/5W/t+gzDyLfHW4DrMdpjqYjpXsURlBt9lpBDxZZZQ=
github.com/emersion/go-imap v1.2.1 h1:+s9ZjMEjOB8NzZMVTM3cCenz2JrQIGGo5j1df19WjTA=
From 736adbde23a553b1bf5dbec809fad4db4554fe13 Mon Sep 17 00:00:00 2001
From: Renovate Bot
Date: Mon, 17 Mar 2025 14:40:58 +0000
Subject: [PATCH 09/21] Update dependency eslint-import-resolver-typescript to
v4 (forgejo) (#7253) Co-authored-by: Renovate Bot
Co-committed-by: Renovate Bot
---
package-lock.json | 222 +++++++++++++++++++++++++++++++++++++++-------
package.json | 2 +-
2 files changed, 193 insertions(+), 31 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 9686148328..7da8bfd8b7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -73,7 +73,7 @@
"@vitest/eslint-plugin": "1.1.25",
"@vue/test-utils": "2.4.6",
"eslint": "9.22.0",
- "eslint-import-resolver-typescript": "3.8.7",
+ "eslint-import-resolver-typescript": "4.1.1",
"eslint-plugin-array-func": "5.0.2",
"eslint-plugin-import-x": "4.7.0",
"eslint-plugin-no-jquery": "3.1.1",
@@ -1690,16 +1690,6 @@
"node": ">= 8"
}
},
- "node_modules/@nolyfill/is-core-module": {
- "version": "1.0.39",
- "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz",
- "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12.4.0"
- }
- },
"node_modules/@npmcli/fs": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz",
@@ -3429,6 +3419,163 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
+ "node_modules/@unrs/rspack-resolver-binding-darwin-arm64": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-darwin-arm64/-/rspack-resolver-binding-darwin-arm64-1.1.2.tgz",
+ "integrity": "sha512-bQx2L40UF5XxsXwkD26PzuspqUbUswWVbmclmUC+c83Cv/EFrFJ1JaZj5Q5jyYglKGOtyIWY/hXTCdWRN9vT0Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@unrs/rspack-resolver-binding-darwin-x64": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-darwin-x64/-/rspack-resolver-binding-darwin-x64-1.1.2.tgz",
+ "integrity": "sha512-dMi9a7//BsuPTnhWEDxmdKZ6wxQlPnAob8VSjefGbKX/a+pHfTaX1pm/jv2VPdarP96IIjCKPatJS/TtLQeGQA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@unrs/rspack-resolver-binding-freebsd-x64": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-freebsd-x64/-/rspack-resolver-binding-freebsd-x64-1.1.2.tgz",
+ "integrity": "sha512-RiBZQ+LSORQObfhV1yH7jGz+4sN3SDYtV53jgc8tUVvqdqVDaUm1KA3zHLffmoiYNGrYkE3sSreGC+FVpsB4Vg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@unrs/rspack-resolver-binding-linux-arm-gnueabihf": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm-gnueabihf/-/rspack-resolver-binding-linux-arm-gnueabihf-1.1.2.tgz",
+ "integrity": "sha512-IyKIFBtOvuPCJt1WPx9e9ovTGhZzrIbW11vWzw4aPmx3VShE+YcMpAldqQubdCep0UVKZyFt+2hQDQZwFiJ4jg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/rspack-resolver-binding-linux-arm64-gnu": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm64-gnu/-/rspack-resolver-binding-linux-arm64-gnu-1.1.2.tgz",
+ "integrity": "sha512-RfYtlCtJrv5i6TO4dSlpbyOJX9Zbhmkqrr9hjDfr6YyE5KD0ywLRzw8UjXsohxG1XWgRpb2tvPuRYtURJwbqWg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/rspack-resolver-binding-linux-arm64-musl": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm64-musl/-/rspack-resolver-binding-linux-arm64-musl-1.1.2.tgz",
+ "integrity": "sha512-MaITzkoqsn1Rm3+YnplubgAQEfOt+2jHfFvuFhXseUfcfbxe8Zyc3TM7LKwgv7mRVjIl+/yYN5JqL0cjbnhAnQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/rspack-resolver-binding-linux-x64-gnu": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-x64-gnu/-/rspack-resolver-binding-linux-x64-gnu-1.1.2.tgz",
+ "integrity": "sha512-Nu981XmzQqis/uB3j4Gi3p5BYCd/zReU5zbJmjMrEH7IIRH0dxZpdOmS/+KwEk6ao7Xd8P2D2gDHpHD/QTp0aQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/rspack-resolver-binding-linux-x64-musl": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-x64-musl/-/rspack-resolver-binding-linux-x64-musl-1.1.2.tgz",
+ "integrity": "sha512-xJupeDvaRpV0ADMuG1dY9jkOjhUzTqtykvchiU2NldSD+nafSUcMWnoqzNUx7HGiqbTMOw9d9xT8ZiFs+6ZFyQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@unrs/rspack-resolver-binding-wasm32-wasi": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-wasm32-wasi/-/rspack-resolver-binding-wasm32-wasi-1.1.2.tgz",
+ "integrity": "sha512-un6X/xInks+KEgGpIHFV8BdoODHRohaDRvOwtjq+FXuoI4Ga0P6sLRvf4rPSZDvoMnqUhZtVNG0jG9oxOnrrLQ==",
+ "cpu": [
+ "wasm32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@napi-rs/wasm-runtime": "^0.2.7"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@unrs/rspack-resolver-binding-win32-arm64-msvc": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-win32-arm64-msvc/-/rspack-resolver-binding-win32-arm64-msvc-1.1.2.tgz",
+ "integrity": "sha512-2lCFkeT1HYUb/OOStBS1m67aZOf9BQxRA+Wf/xs94CGgzmoQt7H4V/BrkB/GSGKsudXjkiwt2oHNkHiowAS90A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@unrs/rspack-resolver-binding-win32-x64-msvc": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-win32-x64-msvc/-/rspack-resolver-binding-win32-x64-msvc-1.1.2.tgz",
+ "integrity": "sha512-EYfya5HCQ/8Yfy7rvAAX2rGytu81+d/CIhNCbZfNKLQ690/qFsdEeTXRsMQW1afHoluMM50PsjPYu8ndy8fSQg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
"node_modules/@vitejs/plugin-vue": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.5.tgz",
@@ -6609,22 +6756,21 @@
}
},
"node_modules/eslint-import-resolver-typescript": {
- "version": "3.8.7",
- "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.8.7.tgz",
- "integrity": "sha512-U7k84gOzrfl09c33qrIbD3TkWTWu3nt3dK5sDajHSekfoLlYGusIwSdPlPzVeA6TFpi0Wpj+ZdBD8hX4hxPoww==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.1.1.tgz",
+ "integrity": "sha512-91As8PwH6xjPwndAbvhTuZ3DUfdl4HttocWRyaLOd5T4uUo6km8EDO7Sve4jzH50V1wbgql2nOFbE3GGfARJag==",
"dev": true,
"license": "ISC",
"dependencies": {
- "@nolyfill/is-core-module": "1.0.39",
- "debug": "^4.3.7",
- "enhanced-resolve": "^5.15.0",
+ "debug": "^4.4.0",
"get-tsconfig": "^4.10.0",
- "is-bun-module": "^1.0.2",
- "stable-hash": "^0.0.4",
+ "is-bun-module": "^1.3.0",
+ "rspack-resolver": "^1.1.2",
+ "stable-hash": "^0.0.5",
"tinyglobby": "^0.2.12"
},
"engines": {
- "node": "^14.18.0 || >=16.0.0"
+ "node": "^16.17.0 || >=18.6.0"
},
"funding": {
"url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts"
@@ -6683,13 +6829,6 @@
"eslint": "^8.57.0 || ^9.0.0"
}
},
- "node_modules/eslint-plugin-import-x/node_modules/stable-hash": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz",
- "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/eslint-plugin-no-jquery": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.1.1.tgz",
@@ -12172,6 +12311,29 @@
"points-on-path": "^0.2.1"
}
},
+ "node_modules/rspack-resolver": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/rspack-resolver/-/rspack-resolver-1.1.2.tgz",
+ "integrity": "sha512-eHhz+9JWHFdbl/CVVqEP6kviLFZqw1s0MWxLdsGMtUKUspSO3SERptPohmrUIC9jT1bGV9Bd3+r8AmWbdfNAzQ==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/JounQin"
+ },
+ "optionalDependencies": {
+ "@unrs/rspack-resolver-binding-darwin-arm64": "1.1.2",
+ "@unrs/rspack-resolver-binding-darwin-x64": "1.1.2",
+ "@unrs/rspack-resolver-binding-freebsd-x64": "1.1.2",
+ "@unrs/rspack-resolver-binding-linux-arm-gnueabihf": "1.1.2",
+ "@unrs/rspack-resolver-binding-linux-arm64-gnu": "1.1.2",
+ "@unrs/rspack-resolver-binding-linux-arm64-musl": "1.1.2",
+ "@unrs/rspack-resolver-binding-linux-x64-gnu": "1.1.2",
+ "@unrs/rspack-resolver-binding-linux-x64-musl": "1.1.2",
+ "@unrs/rspack-resolver-binding-wasm32-wasi": "1.1.2",
+ "@unrs/rspack-resolver-binding-win32-arm64-msvc": "1.1.2",
+ "@unrs/rspack-resolver-binding-win32-x64-msvc": "1.1.2"
+ }
+ },
"node_modules/run-con": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/run-con/-/run-con-1.3.2.tgz",
@@ -12778,9 +12940,9 @@
}
},
"node_modules/stable-hash": {
- "version": "0.0.4",
- "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.4.tgz",
- "integrity": "sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==",
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz",
+ "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==",
"dev": true,
"license": "MIT"
},
diff --git a/package.json b/package.json
index 6046307ab4..b63072e835 100644
--- a/package.json
+++ b/package.json
@@ -72,7 +72,7 @@
"@vitest/eslint-plugin": "1.1.25",
"@vue/test-utils": "2.4.6",
"eslint": "9.22.0",
- "eslint-import-resolver-typescript": "3.8.7",
+ "eslint-import-resolver-typescript": "4.1.1",
"eslint-plugin-array-func": "5.0.2",
"eslint-plugin-import-x": "4.7.0",
"eslint-plugin-no-jquery": "3.1.1",
From 2b79c236861b4a5f0e42a51b1c582e894f19b008 Mon Sep 17 00:00:00 2001
From: Gusted
Date: Mon, 17 Mar 2025 14:52:31 +0000
Subject: [PATCH 10/21] chore: add `@vitejs/plugin-vue` to renovate automerge
(#7252)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7252
Reviewed-by: Michael Kriese
Co-authored-by: Gusted
Co-committed-by: Gusted
---
renovate.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/renovate.json b/renovate.json
index 7efe4123b0..f3fcd3d5fc 100644
--- a/renovate.json
+++ b/renovate.json
@@ -148,7 +148,8 @@
"mvdan.cc/gofumpt",
"updates",
"vite-string-plugin",
- "@vue/test-utils"
+ "@vue/test-utils",
+ "@vitejs/plugin-vue"
],
"automerge": true
},
From d40ff8c1c1d226700a14931376dcdd024519c42e Mon Sep 17 00:00:00 2001
From: Renovate Bot
Date: Mon, 17 Mar 2025 15:53:54 +0000
Subject: [PATCH 11/21] Update dependency @vitejs/plugin-vue to v5.2.3
(forgejo) (#7248)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#readme) ([source](https://github.com/vitejs/vite-plugin-vue/tree/HEAD/packages/plugin-vue)) | devDependencies | minor | [`5.1.5` -> `5.2.3`](https://renovatebot.com/diffs/npm/@vitejs%2fplugin-vue/5.1.5/5.2.3) |
---
### Release Notes
vitejs/vite-plugin-vue (@vitejs/plugin-vue)
### [`v5.2.3`](https://github.com/vitejs/vite-plugin-vue/blob/HEAD/packages/plugin-vue/CHANGELOG.md#small523-2025-03-17-small)
- Revert "fix: generate unique component id" ([#548](https://github.com/vitejs/vite-plugin-vue/issues/548)) ([4bc5517](https://github.com/vitejs/vite-plugin-vue/commit/4bc5517)), closes [#548](https://github.com/vitejs/vite-plugin-vue/issues/548)
### [`v5.2.2`](https://github.com/vitejs/vite-plugin-vue/blob/HEAD/packages/plugin-vue/CHANGELOG.md#small522-2025-03-17-small)
- feat: pass descriptor vapor flag to compileTemplte ([219e007](https://github.com/vitejs/vite-plugin-vue/commit/219e007))
- feat(css): tree shake scoped styles ([#533](https://github.com/vitejs/vite-plugin-vue/issues/533)) ([333094f](https://github.com/vitejs/vite-plugin-vue/commit/333094f)), closes [#533](https://github.com/vitejs/vite-plugin-vue/issues/533)
- fix: generate unique component id ([#538](https://github.com/vitejs/vite-plugin-vue/issues/538)) ([2704e85](https://github.com/vitejs/vite-plugin-vue/commit/2704e85)), closes [#538](https://github.com/vitejs/vite-plugin-vue/issues/538)
- fix: properly interpret boolean values in `define` ([#545](https://github.com/vitejs/vite-plugin-vue/issues/545)) ([46d3d65](https://github.com/vitejs/vite-plugin-vue/commit/46d3d65)), closes [#545](https://github.com/vitejs/vite-plugin-vue/issues/545)
- fix(deps): update all non-major dependencies ([#482](https://github.com/vitejs/vite-plugin-vue/issues/482)) ([cdbae68](https://github.com/vitejs/vite-plugin-vue/commit/cdbae68)), closes [#482](https://github.com/vitejs/vite-plugin-vue/issues/482)
- fix(deps): update all non-major dependencies ([#488](https://github.com/vitejs/vite-plugin-vue/issues/488)) ([5d39582](https://github.com/vitejs/vite-plugin-vue/commit/5d39582)), closes [#488](https://github.com/vitejs/vite-plugin-vue/issues/488)
- fix(index): move the if check earlier to avoid creating unnecessary ssr when entering return block ( ([2135c84](https://github.com/vitejs/vite-plugin-vue/commit/2135c84)), closes [#523](https://github.com/vitejs/vite-plugin-vue/issues/523)
- fix(plugin-vue): default value for compile time flags ([#495](https://github.com/vitejs/vite-plugin-vue/issues/495)) ([ae9d948](https://github.com/vitejs/vite-plugin-vue/commit/ae9d948)), closes [#495](https://github.com/vitejs/vite-plugin-vue/issues/495)
- fix(plugin-vue): ensure HMR updates styles when SFC is treated as a type dependency ([#541](https://github.com/vitejs/vite-plugin-vue/issues/541)) ([4abe3be](https://github.com/vitejs/vite-plugin-vue/commit/4abe3be)), closes [#541](https://github.com/vitejs/vite-plugin-vue/issues/541)
- fix(plugin-vue): resolve sourcemap conflicts in build watch mode with cached modules ([#505](https://github.com/vitejs/vite-plugin-vue/issues/505)) ([906cebb](https://github.com/vitejs/vite-plugin-vue/commit/906cebb)), closes [#505](https://github.com/vitejs/vite-plugin-vue/issues/505)
- fix(plugin-vue): support external import URLs for monorepos ([#524](https://github.com/vitejs/vite-plugin-vue/issues/524)) ([cdd4922](https://github.com/vitejs/vite-plugin-vue/commit/cdd4922)), closes [#524](https://github.com/vitejs/vite-plugin-vue/issues/524)
- fix(plugin-vue): support vapor template-only component ([#529](https://github.com/vitejs/vite-plugin-vue/issues/529)) ([95be153](https://github.com/vitejs/vite-plugin-vue/commit/95be153)), closes [#529](https://github.com/vitejs/vite-plugin-vue/issues/529)
- fix(plugin-vue): suppress warnings for non-recognized pseudo selectors form lightningcss ([#521](https://github.com/vitejs/vite-plugin-vue/issues/521)) ([15c0eb0](https://github.com/vitejs/vite-plugin-vue/commit/15c0eb0)), closes [#521](https://github.com/vitejs/vite-plugin-vue/issues/521)
- chore(deps): update dependency rollup to ^4.27.4 ([#479](https://github.com/vitejs/vite-plugin-vue/issues/479)) ([428320d](https://github.com/vitejs/vite-plugin-vue/commit/428320d)), closes [#479](https://github.com/vitejs/vite-plugin-vue/issues/479)
- chore(deps): update dependency rollup to ^4.28.1 ([#484](https://github.com/vitejs/vite-plugin-vue/issues/484)) ([388403f](https://github.com/vitejs/vite-plugin-vue/commit/388403f)), closes [#484](https://github.com/vitejs/vite-plugin-vue/issues/484)
- chore(deps): update dependency rollup to ^4.29.1 ([#493](https://github.com/vitejs/vite-plugin-vue/issues/493)) ([b092bc8](https://github.com/vitejs/vite-plugin-vue/commit/b092bc8)), closes [#493](https://github.com/vitejs/vite-plugin-vue/issues/493)
- chore(deps): update upstream ([#503](https://github.com/vitejs/vite-plugin-vue/issues/503)) ([8c12b9f](https://github.com/vitejs/vite-plugin-vue/commit/8c12b9f)), closes [#503](https://github.com/vitejs/vite-plugin-vue/issues/503)
- chore(deps): update upstream ([#511](https://github.com/vitejs/vite-plugin-vue/issues/511)) ([d057351](https://github.com/vitejs/vite-plugin-vue/commit/d057351)), closes [#511](https://github.com/vitejs/vite-plugin-vue/issues/511)
- chore(deps): update upstream ([#526](https://github.com/vitejs/vite-plugin-vue/issues/526)) ([59946d3](https://github.com/vitejs/vite-plugin-vue/commit/59946d3)), closes [#526](https://github.com/vitejs/vite-plugin-vue/issues/526)
- chore(plugin-vue): simplify `resolved` declaration ([7288a59](https://github.com/vitejs/vite-plugin-vue/commit/7288a59))
### [`v5.2.1`](https://github.com/vitejs/vite-plugin-vue/blob/HEAD/packages/plugin-vue/CHANGELOG.md#small521-2024-11-26-small)
- chore: add vite 6 peer dep ([#481](https://github.com/vitejs/vite-plugin-vue/issues/481)) ([4288652](https://github.com/vitejs/vite-plugin-vue/commit/4288652)), closes [#481](https://github.com/vitejs/vite-plugin-vue/issues/481)
- chore: fix lint ([378aea3](https://github.com/vitejs/vite-plugin-vue/commit/378aea3))
- chore(deps): update dependency rollup to ^4.27.2 ([#476](https://github.com/vitejs/vite-plugin-vue/issues/476)) ([b2df95e](https://github.com/vitejs/vite-plugin-vue/commit/b2df95e)), closes [#476](https://github.com/vitejs/vite-plugin-vue/issues/476)
### [`v5.2.0`](https://github.com/vitejs/vite-plugin-vue/blob/HEAD/packages/plugin-vue/CHANGELOG.md#520-2024-11-13)
- feat: add a feature option to support custom component id generator ([#461](https://github.com/vitejs/vite-plugin-vue/issues/461)) ([7a1fc4c](https://github.com/vitejs/vite-plugin-vue/commit/7a1fc4c)), closes [#461](https://github.com/vitejs/vite-plugin-vue/issues/461)
---
### Configuration
📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [x] If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7248
Reviewed-by: Gusted
Co-authored-by: Renovate Bot
Co-committed-by: Renovate Bot
---
package-lock.json | 10 +++++-----
package.json | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 7da8bfd8b7..5f83e7c923 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -68,7 +68,7 @@
"@stylistic/eslint-plugin-js": "4.2.0",
"@stylistic/stylelint-plugin": "3.1.2",
"@typescript-eslint/parser": "8.26.1",
- "@vitejs/plugin-vue": "5.1.5",
+ "@vitejs/plugin-vue": "5.2.3",
"@vitest/coverage-v8": "3.0.8",
"@vitest/eslint-plugin": "1.1.25",
"@vue/test-utils": "2.4.6",
@@ -3577,16 +3577,16 @@
]
},
"node_modules/@vitejs/plugin-vue": {
- "version": "5.1.5",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.5.tgz",
- "integrity": "sha512-dlnib73G05CDBAUR/YpuZcQQ47fpjihnnNouAAqN62z+oqSsWJ+kh52GRzIxpkgFG3q11eXK7Di7RMmoCwISZA==",
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.3.tgz",
+ "integrity": "sha512-IYSLEQj4LgZZuoVpdSUCw3dIynTWQgPlaRP6iAvMle4My0HdYwr5g5wQAfwOeHQBmYwEkqF70nRpSilr6PoUDg==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^18.0.0 || >=20.0.0"
},
"peerDependencies": {
- "vite": "^5.0.0",
+ "vite": "^5.0.0 || ^6.0.0",
"vue": "^3.2.25"
}
},
diff --git a/package.json b/package.json
index b63072e835..db5fbbc431 100644
--- a/package.json
+++ b/package.json
@@ -67,7 +67,7 @@
"@stylistic/eslint-plugin-js": "4.2.0",
"@stylistic/stylelint-plugin": "3.1.2",
"@typescript-eslint/parser": "8.26.1",
- "@vitejs/plugin-vue": "5.1.5",
+ "@vitejs/plugin-vue": "5.2.3",
"@vitest/coverage-v8": "3.0.8",
"@vitest/eslint-plugin": "1.1.25",
"@vue/test-utils": "2.4.6",
From 83e186c00cd71c7acd3e9970f79770dbbf25cdf4 Mon Sep 17 00:00:00 2001
From: Earl Warren
Date: Mon, 17 Mar 2025 16:25:37 +0000
Subject: [PATCH 12/21] fix: discard v25 secrets migrations errors instead of
failing (#7251)
Failing the migration when a corrupted record is found is problematic because there is no transaction and the database may need to be restored from a backup to attempt the migration again, after deleting the corrupted records.
Each documented case of failed migration was resolved by removing the corrupted records. There is no instance of a failed migration that was caused by non corrupted record.
In the unlikely event of a false negative where a two_factor record is discarded although it is in use, the only consequence is that the user will have to enroll again. Detailed logs are displayed so the Forgejo admin can file a bug report if that happens.
Refs: https://codeberg.org/forgejo/forgejo/issues/6637
## Release notes
- Bug fixes
- [PR](https://codeberg.org/forgejo/forgejo/pulls/7251): When migrating to Forgejo v10, the TOTP secrets found to be corrupted are now transparently removed from the database instead of failing the migration. TOTP is no longer required to login with the associated users. They should be informed because they will need to visit their security settings and configure TOTP again. No other action is required.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7251
Reviewed-by: Gusted
Co-authored-by: Earl Warren
Co-committed-by: Earl Warren
---
models/forgejo_migrations/v25.go | 27 ++++++++++++++++---
models/forgejo_migrations/v25_test.go | 6 ++++-
.../two_factor.yml | 9 +++++++
release-notes/7251.md | 1 +
4 files changed, 39 insertions(+), 4 deletions(-)
create mode 100644 release-notes/7251.md
diff --git a/models/forgejo_migrations/v25.go b/models/forgejo_migrations/v25.go
index e2316007cf..5e3dff80b3 100644
--- a/models/forgejo_migrations/v25.go
+++ b/models/forgejo_migrations/v25.go
@@ -7,9 +7,11 @@ import (
"context"
"crypto/md5"
"encoding/base64"
+ "fmt"
"code.gitea.io/gitea/models/auth"
"code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/secret"
"code.gitea.io/gitea/modules/setting"
@@ -57,19 +59,38 @@ func MigrateTwoFactorToKeying(x *xorm.Engine) error {
oldEncryptionKey := md5.Sum([]byte(setting.SecretKey))
- return db.Iterate(context.Background(), nil, func(ctx context.Context, bean *auth.TwoFactor) error {
+ messages := make([]string, 0, 100)
+ ids := make([]int64, 0, 100)
+
+ err = db.Iterate(context.Background(), nil, func(ctx context.Context, bean *auth.TwoFactor) error {
decodedStoredSecret, err := base64.StdEncoding.DecodeString(string(bean.Secret))
if err != nil {
- return err
+ messages = append(messages, fmt.Sprintf("two_factor.id=%d, two_factor.uid=%d: base64.StdEncoding.DecodeString: %v", bean.ID, bean.UID, err))
+ ids = append(ids, bean.ID)
+ return nil
}
secretBytes, err := secret.AesDecrypt(oldEncryptionKey[:], decodedStoredSecret)
if err != nil {
- return err
+ messages = append(messages, fmt.Sprintf("two_factor.id=%d, two_factor.uid=%d: secret.AesDecrypt: %v", bean.ID, bean.UID, err))
+ ids = append(ids, bean.ID)
+ return nil
}
bean.SetSecret(string(secretBytes))
_, err = db.GetEngine(ctx).Cols("secret").ID(bean.ID).Update(bean)
return err
})
+ if err == nil {
+ if len(ids) > 0 {
+ log.Error("Forgejo migration[25]: The following TOTP secrets were found to be corrupted and removed from the database. TOTP is no longer required to login with the associated users. They should be informed because they will need to visit their security settings and configure TOTP again. No other action is required. See https://codeberg.org/forgejo/forgejo/issues/6637 for more context on the various causes for such a corruption.")
+ for _, message := range messages {
+ log.Error("Forgejo migration[25]: %s", message)
+ }
+
+ _, err = db.GetEngine(context.Background()).In("id", ids).NoAutoCondition().NoAutoTime().Delete(&auth.TwoFactor{})
+ }
+ }
+
+ return err
}
diff --git a/models/forgejo_migrations/v25_test.go b/models/forgejo_migrations/v25_test.go
index 43c5885c39..73b97f7a35 100644
--- a/models/forgejo_migrations/v25_test.go
+++ b/models/forgejo_migrations/v25_test.go
@@ -36,10 +36,14 @@ func Test_MigrateTwoFactorToKeying(t *testing.T) {
cnt, err := x.Table("two_factor").Count()
require.NoError(t, err)
- assert.EqualValues(t, 1, cnt)
+ assert.EqualValues(t, 2, cnt)
require.NoError(t, MigrateTwoFactorToKeying(x))
+ cnt, err = x.Table("two_factor").Count()
+ require.NoError(t, err)
+ assert.EqualValues(t, 1, cnt)
+
var twofactor auth.TwoFactor
_, err = x.Table("two_factor").ID(1).Get(&twofactor)
require.NoError(t, err)
diff --git a/models/migrations/fixtures/Test_MigrateTwoFactorToKeying/two_factor.yml b/models/migrations/fixtures/Test_MigrateTwoFactorToKeying/two_factor.yml
index ef6c158659..91aa420340 100644
--- a/models/migrations/fixtures/Test_MigrateTwoFactorToKeying/two_factor.yml
+++ b/models/migrations/fixtures/Test_MigrateTwoFactorToKeying/two_factor.yml
@@ -7,3 +7,12 @@
last_used_passcode:
created_unix: 1564253724
updated_unix: 1564253724
+-
+ id: 2
+ uid: 23
+ secret: badbad
+ scratch_salt: badbad
+ scratch_hash: badbad
+ last_used_passcode:
+ created_unix: 1564253724
+ updated_unix: 1564253724
diff --git a/release-notes/7251.md b/release-notes/7251.md
new file mode 100644
index 0000000000..9c35603981
--- /dev/null
+++ b/release-notes/7251.md
@@ -0,0 +1 @@
+When migrating from a Forgejo version lower than v10, the TOTP secrets found to be corrupted are now transparently removed from the database instead of failing the migration. TOTP is no longer required to login with the associated users. They should be informed because they will need to visit their security settings and configure TOTP again. No other action is required.
From 9786982c6eff6e80bb7cb7b6d9eed48e84c755b6 Mon Sep 17 00:00:00 2001
From: Renovate Bot
Date: Mon, 17 Mar 2025 19:57:41 +0000
Subject: [PATCH 13/21] Lock file maintenance (forgejo) (#7247)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7247
Reviewed-by: Gusted
Co-authored-by: Renovate Bot
Co-committed-by: Renovate Bot
---
package-lock.json | 420 ++++++++++++++---------------
web_src/fomantic/package-lock.json | 12 +-
2 files changed, 216 insertions(+), 216 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 5f83e7c923..3154368ccf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -216,12 +216,12 @@
}
},
"node_modules/@babel/parser": {
- "version": "7.26.9",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz",
- "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==",
+ "version": "7.26.10",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz",
+ "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==",
"license": "MIT",
"dependencies": {
- "@babel/types": "^7.26.9"
+ "@babel/types": "^7.26.10"
},
"bin": {
"parser": "bin/babel-parser.js"
@@ -231,9 +231,9 @@
}
},
"node_modules/@babel/runtime": {
- "version": "7.26.9",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz",
- "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==",
+ "version": "7.26.10",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz",
+ "integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==",
"license": "MIT",
"dependencies": {
"regenerator-runtime": "^0.14.0"
@@ -243,9 +243,9 @@
}
},
"node_modules/@babel/types": {
- "version": "7.26.9",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz",
- "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==",
+ "version": "7.26.10",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz",
+ "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==",
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
@@ -562,9 +562,9 @@
}
},
"node_modules/@esbuild/aix-ppc64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz",
- "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz",
+ "integrity": "sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==",
"cpu": [
"ppc64"
],
@@ -578,9 +578,9 @@
}
},
"node_modules/@esbuild/android-arm": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz",
- "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.1.tgz",
+ "integrity": "sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==",
"cpu": [
"arm"
],
@@ -594,9 +594,9 @@
}
},
"node_modules/@esbuild/android-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz",
- "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.1.tgz",
+ "integrity": "sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==",
"cpu": [
"arm64"
],
@@ -610,9 +610,9 @@
}
},
"node_modules/@esbuild/android-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz",
- "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.1.tgz",
+ "integrity": "sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==",
"cpu": [
"x64"
],
@@ -626,9 +626,9 @@
}
},
"node_modules/@esbuild/darwin-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz",
- "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.1.tgz",
+ "integrity": "sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==",
"cpu": [
"arm64"
],
@@ -642,9 +642,9 @@
}
},
"node_modules/@esbuild/darwin-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz",
- "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.1.tgz",
+ "integrity": "sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==",
"cpu": [
"x64"
],
@@ -658,9 +658,9 @@
}
},
"node_modules/@esbuild/freebsd-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz",
- "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.1.tgz",
+ "integrity": "sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==",
"cpu": [
"arm64"
],
@@ -674,9 +674,9 @@
}
},
"node_modules/@esbuild/freebsd-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz",
- "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.1.tgz",
+ "integrity": "sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==",
"cpu": [
"x64"
],
@@ -690,9 +690,9 @@
}
},
"node_modules/@esbuild/linux-arm": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz",
- "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.1.tgz",
+ "integrity": "sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==",
"cpu": [
"arm"
],
@@ -706,9 +706,9 @@
}
},
"node_modules/@esbuild/linux-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz",
- "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz",
+ "integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==",
"cpu": [
"arm64"
],
@@ -722,9 +722,9 @@
}
},
"node_modules/@esbuild/linux-ia32": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz",
- "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.1.tgz",
+ "integrity": "sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==",
"cpu": [
"ia32"
],
@@ -738,9 +738,9 @@
}
},
"node_modules/@esbuild/linux-loong64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz",
- "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.1.tgz",
+ "integrity": "sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==",
"cpu": [
"loong64"
],
@@ -754,9 +754,9 @@
}
},
"node_modules/@esbuild/linux-mips64el": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz",
- "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.1.tgz",
+ "integrity": "sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==",
"cpu": [
"mips64el"
],
@@ -770,9 +770,9 @@
}
},
"node_modules/@esbuild/linux-ppc64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz",
- "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.1.tgz",
+ "integrity": "sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==",
"cpu": [
"ppc64"
],
@@ -786,9 +786,9 @@
}
},
"node_modules/@esbuild/linux-riscv64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz",
- "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.1.tgz",
+ "integrity": "sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==",
"cpu": [
"riscv64"
],
@@ -802,9 +802,9 @@
}
},
"node_modules/@esbuild/linux-s390x": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz",
- "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.1.tgz",
+ "integrity": "sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==",
"cpu": [
"s390x"
],
@@ -818,9 +818,9 @@
}
},
"node_modules/@esbuild/linux-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz",
- "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.1.tgz",
+ "integrity": "sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==",
"cpu": [
"x64"
],
@@ -834,9 +834,9 @@
}
},
"node_modules/@esbuild/netbsd-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz",
- "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.1.tgz",
+ "integrity": "sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==",
"cpu": [
"arm64"
],
@@ -850,9 +850,9 @@
}
},
"node_modules/@esbuild/netbsd-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz",
- "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.1.tgz",
+ "integrity": "sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==",
"cpu": [
"x64"
],
@@ -866,9 +866,9 @@
}
},
"node_modules/@esbuild/openbsd-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz",
- "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.1.tgz",
+ "integrity": "sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==",
"cpu": [
"arm64"
],
@@ -882,9 +882,9 @@
}
},
"node_modules/@esbuild/openbsd-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz",
- "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.1.tgz",
+ "integrity": "sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==",
"cpu": [
"x64"
],
@@ -898,9 +898,9 @@
}
},
"node_modules/@esbuild/sunos-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz",
- "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.1.tgz",
+ "integrity": "sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==",
"cpu": [
"x64"
],
@@ -914,9 +914,9 @@
}
},
"node_modules/@esbuild/win32-arm64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz",
- "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.1.tgz",
+ "integrity": "sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==",
"cpu": [
"arm64"
],
@@ -930,9 +930,9 @@
}
},
"node_modules/@esbuild/win32-ia32": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz",
- "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.1.tgz",
+ "integrity": "sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==",
"cpu": [
"ia32"
],
@@ -946,9 +946,9 @@
}
},
"node_modules/@esbuild/win32-x64": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz",
- "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.1.tgz",
+ "integrity": "sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==",
"cpu": [
"x64"
],
@@ -982,9 +982,9 @@
}
},
"node_modules/@eslint-community/eslint-utils": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz",
- "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==",
+ "version": "4.5.1",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.5.1.tgz",
+ "integrity": "sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1960,9 +1960,9 @@
"license": "MIT"
},
"node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.35.0.tgz",
- "integrity": "sha512-uYQ2WfPaqz5QtVgMxfN6NpLD+no0MYHDBywl7itPYd3K5TjjSghNKmX8ic9S8NU8w81NVhJv/XojcHptRly7qQ==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.36.0.tgz",
+ "integrity": "sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==",
"cpu": [
"arm"
],
@@ -1974,9 +1974,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.35.0.tgz",
- "integrity": "sha512-FtKddj9XZudurLhdJnBl9fl6BwCJ3ky8riCXjEw3/UIbjmIY58ppWwPEvU3fNu+W7FUsAsB1CdH+7EQE6CXAPA==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.36.0.tgz",
+ "integrity": "sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==",
"cpu": [
"arm64"
],
@@ -1988,9 +1988,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.35.0.tgz",
- "integrity": "sha512-Uk+GjOJR6CY844/q6r5DR/6lkPFOw0hjfOIzVx22THJXMxktXG6CbejseJFznU8vHcEBLpiXKY3/6xc+cBm65Q==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.36.0.tgz",
+ "integrity": "sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==",
"cpu": [
"arm64"
],
@@ -2002,9 +2002,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.35.0.tgz",
- "integrity": "sha512-3IrHjfAS6Vkp+5bISNQnPogRAW5GAV1n+bNCrDwXmfMHbPl5EhTmWtfmwlJxFRUCBZ+tZ/OxDyU08aF6NI/N5Q==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.36.0.tgz",
+ "integrity": "sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==",
"cpu": [
"x64"
],
@@ -2016,9 +2016,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.35.0.tgz",
- "integrity": "sha512-sxjoD/6F9cDLSELuLNnY0fOrM9WA0KrM0vWm57XhrIMf5FGiN8D0l7fn+bpUeBSU7dCgPV2oX4zHAsAXyHFGcQ==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.36.0.tgz",
+ "integrity": "sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==",
"cpu": [
"arm64"
],
@@ -2030,9 +2030,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.35.0.tgz",
- "integrity": "sha512-2mpHCeRuD1u/2kruUiHSsnjWtHjqVbzhBkNVQ1aVD63CcexKVcQGwJ2g5VphOd84GvxfSvnnlEyBtQCE5hxVVw==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.36.0.tgz",
+ "integrity": "sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==",
"cpu": [
"x64"
],
@@ -2044,9 +2044,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.35.0.tgz",
- "integrity": "sha512-mrA0v3QMy6ZSvEuLs0dMxcO2LnaCONs1Z73GUDBHWbY8tFFocM6yl7YyMu7rz4zS81NDSqhrUuolyZXGi8TEqg==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.36.0.tgz",
+ "integrity": "sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==",
"cpu": [
"arm"
],
@@ -2058,9 +2058,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.35.0.tgz",
- "integrity": "sha512-DnYhhzcvTAKNexIql8pFajr0PiDGrIsBYPRvCKlA5ixSS3uwo/CWNZxB09jhIapEIg945KOzcYEAGGSmTSpk7A==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.36.0.tgz",
+ "integrity": "sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==",
"cpu": [
"arm"
],
@@ -2072,9 +2072,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.35.0.tgz",
- "integrity": "sha512-uagpnH2M2g2b5iLsCTZ35CL1FgyuzzJQ8L9VtlJ+FckBXroTwNOaD0z0/UF+k5K3aNQjbm8LIVpxykUOQt1m/A==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.36.0.tgz",
+ "integrity": "sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==",
"cpu": [
"arm64"
],
@@ -2086,9 +2086,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.35.0.tgz",
- "integrity": "sha512-XQxVOCd6VJeHQA/7YcqyV0/88N6ysSVzRjJ9I9UA/xXpEsjvAgDTgH3wQYz5bmr7SPtVK2TsP2fQ2N9L4ukoUg==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.36.0.tgz",
+ "integrity": "sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==",
"cpu": [
"arm64"
],
@@ -2100,9 +2100,9 @@
]
},
"node_modules/@rollup/rollup-linux-loongarch64-gnu": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.35.0.tgz",
- "integrity": "sha512-5pMT5PzfgwcXEwOaSrqVsz/LvjDZt+vQ8RT/70yhPU06PTuq8WaHhfT1LW+cdD7mW6i/J5/XIkX/1tCAkh1W6g==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.36.0.tgz",
+ "integrity": "sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==",
"cpu": [
"loong64"
],
@@ -2114,9 +2114,9 @@
]
},
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.35.0.tgz",
- "integrity": "sha512-c+zkcvbhbXF98f4CtEIP1EBA/lCic5xB0lToneZYvMeKu5Kamq3O8gqrxiYYLzlZH6E3Aq+TSW86E4ay8iD8EA==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.36.0.tgz",
+ "integrity": "sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==",
"cpu": [
"ppc64"
],
@@ -2128,9 +2128,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.35.0.tgz",
- "integrity": "sha512-s91fuAHdOwH/Tad2tzTtPX7UZyytHIRR6V4+2IGlV0Cej5rkG0R61SX4l4y9sh0JBibMiploZx3oHKPnQBKe4g==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.36.0.tgz",
+ "integrity": "sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==",
"cpu": [
"riscv64"
],
@@ -2142,9 +2142,9 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.35.0.tgz",
- "integrity": "sha512-hQRkPQPLYJZYGP+Hj4fR9dDBMIM7zrzJDWFEMPdTnTy95Ljnv0/4w/ixFw3pTBMEuuEuoqtBINYND4M7ujcuQw==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.36.0.tgz",
+ "integrity": "sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==",
"cpu": [
"s390x"
],
@@ -2156,9 +2156,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.35.0.tgz",
- "integrity": "sha512-Pim1T8rXOri+0HmV4CdKSGrqcBWX0d1HoPnQ0uw0bdp1aP5SdQVNBy8LjYncvnLgu3fnnCt17xjWGd4cqh8/hA==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.36.0.tgz",
+ "integrity": "sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==",
"cpu": [
"x64"
],
@@ -2170,9 +2170,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.35.0.tgz",
- "integrity": "sha512-QysqXzYiDvQWfUiTm8XmJNO2zm9yC9P/2Gkrwg2dH9cxotQzunBHYr6jk4SujCTqnfGxduOmQcI7c2ryuW8XVg==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.36.0.tgz",
+ "integrity": "sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==",
"cpu": [
"x64"
],
@@ -2184,9 +2184,9 @@
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.35.0.tgz",
- "integrity": "sha512-OUOlGqPkVJCdJETKOCEf1mw848ZyJ5w50/rZ/3IBQVdLfR5jk/6Sr5m3iO2tdPgwo0x7VcncYuOvMhBWZq8ayg==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.36.0.tgz",
+ "integrity": "sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==",
"cpu": [
"arm64"
],
@@ -2198,9 +2198,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.35.0.tgz",
- "integrity": "sha512-2/lsgejMrtwQe44glq7AFFHLfJBPafpsTa6JvP2NGef/ifOa4KBoglVf7AKN7EV9o32evBPRqfg96fEHzWo5kw==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.36.0.tgz",
+ "integrity": "sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==",
"cpu": [
"ia32"
],
@@ -2212,9 +2212,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.35.0.tgz",
- "integrity": "sha512-PIQeY5XDkrOysbQblSW7v3l1MDZzkTEzAfTPkj5VAu3FW8fS4ynyLg2sINp0fp3SjZ8xkRYpLqoKcYqAkhU1dw==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.36.0.tgz",
+ "integrity": "sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==",
"cpu": [
"x64"
],
@@ -4705,9 +4705,9 @@
}
},
"node_modules/cacheable/node_modules/keyv": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.3.1.tgz",
- "integrity": "sha512-13hQT2q2VIwOoaJdJa7nY3J8UVbYtMTJFHnwm9LI+SaQRfUiM6Em9KZeOVTCKbMnGcRIL3NSUFpAdjZCq24nLQ==",
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.3.2.tgz",
+ "integrity": "sha512-Lji2XRxqqa5Wg+CHLVfFKBImfJZ4pCSccu9eVWK6w4c2SDFLd8JAn1zqTuSFnsxb7ope6rMsnIHfp+eBbRBRZQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4783,9 +4783,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001703",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001703.tgz",
- "integrity": "sha512-kRlAGTRWgPsOj7oARC9m1okJEXdL/8fekFVcxA8Hl7GH4r/sN4OJn/i6Flde373T50KS7Y37oFbMwlE8+F42kQ==",
+ "version": "1.0.30001705",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001705.tgz",
+ "integrity": "sha512-S0uyMMiYvA7CxNgomYBwwwPUnWzFD83f3B1ce5jHUfHTH//QL6hHsreI8RVC5606R4ssqravelYO5TU6t8sEyg==",
"funding": [
{
"type": "opencollective",
@@ -6314,9 +6314,9 @@
}
},
"node_modules/electron-to-chromium": {
- "version": "1.5.113",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.113.tgz",
- "integrity": "sha512-wjT2O4hX+wdWPJ76gWSkMhcHAV2PTMX+QetUCPYEdCIe+cxmgzzSSiGRCKW8nuh4mwKZlpv0xvoW7OF2X+wmHg==",
+ "version": "1.5.119",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.119.tgz",
+ "integrity": "sha512-Ku4NMzUjz3e3Vweh7PhApPrZSS4fyiCIbcIrG9eKrriYVLmbMepETR/v6SU7xPm98QTqMSYiCwfO89QNjXLkbQ==",
"license": "ISC"
},
"node_modules/emoji-regex": {
@@ -6565,9 +6565,9 @@
}
},
"node_modules/esbuild": {
- "version": "0.25.0",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz",
- "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==",
+ "version": "0.25.1",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz",
+ "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==",
"hasInstallScript": true,
"license": "MIT",
"bin": {
@@ -6577,31 +6577,31 @@
"node": ">=18"
},
"optionalDependencies": {
- "@esbuild/aix-ppc64": "0.25.0",
- "@esbuild/android-arm": "0.25.0",
- "@esbuild/android-arm64": "0.25.0",
- "@esbuild/android-x64": "0.25.0",
- "@esbuild/darwin-arm64": "0.25.0",
- "@esbuild/darwin-x64": "0.25.0",
- "@esbuild/freebsd-arm64": "0.25.0",
- "@esbuild/freebsd-x64": "0.25.0",
- "@esbuild/linux-arm": "0.25.0",
- "@esbuild/linux-arm64": "0.25.0",
- "@esbuild/linux-ia32": "0.25.0",
- "@esbuild/linux-loong64": "0.25.0",
- "@esbuild/linux-mips64el": "0.25.0",
- "@esbuild/linux-ppc64": "0.25.0",
- "@esbuild/linux-riscv64": "0.25.0",
- "@esbuild/linux-s390x": "0.25.0",
- "@esbuild/linux-x64": "0.25.0",
- "@esbuild/netbsd-arm64": "0.25.0",
- "@esbuild/netbsd-x64": "0.25.0",
- "@esbuild/openbsd-arm64": "0.25.0",
- "@esbuild/openbsd-x64": "0.25.0",
- "@esbuild/sunos-x64": "0.25.0",
- "@esbuild/win32-arm64": "0.25.0",
- "@esbuild/win32-ia32": "0.25.0",
- "@esbuild/win32-x64": "0.25.0"
+ "@esbuild/aix-ppc64": "0.25.1",
+ "@esbuild/android-arm": "0.25.1",
+ "@esbuild/android-arm64": "0.25.1",
+ "@esbuild/android-x64": "0.25.1",
+ "@esbuild/darwin-arm64": "0.25.1",
+ "@esbuild/darwin-x64": "0.25.1",
+ "@esbuild/freebsd-arm64": "0.25.1",
+ "@esbuild/freebsd-x64": "0.25.1",
+ "@esbuild/linux-arm": "0.25.1",
+ "@esbuild/linux-arm64": "0.25.1",
+ "@esbuild/linux-ia32": "0.25.1",
+ "@esbuild/linux-loong64": "0.25.1",
+ "@esbuild/linux-mips64el": "0.25.1",
+ "@esbuild/linux-ppc64": "0.25.1",
+ "@esbuild/linux-riscv64": "0.25.1",
+ "@esbuild/linux-s390x": "0.25.1",
+ "@esbuild/linux-x64": "0.25.1",
+ "@esbuild/netbsd-arm64": "0.25.1",
+ "@esbuild/netbsd-x64": "0.25.1",
+ "@esbuild/openbsd-arm64": "0.25.1",
+ "@esbuild/openbsd-x64": "0.25.1",
+ "@esbuild/sunos-x64": "0.25.1",
+ "@esbuild/win32-arm64": "0.25.1",
+ "@esbuild/win32-ia32": "0.25.1",
+ "@esbuild/win32-x64": "0.25.1"
}
},
"node_modules/esbuild-loader": {
@@ -8046,9 +8046,9 @@
}
},
"node_modules/hookified": {
- "version": "1.7.1",
- "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.7.1.tgz",
- "integrity": "sha512-OXcdHsXeOiD7OJ5zvWj8Oy/6RCdLwntAX+wUrfemNcMGn6sux4xbEHi2QXwqePYhjQ/yvxxq2MvCRirdlHscBw==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.8.1.tgz",
+ "integrity": "sha512-GrO2l93P8xCWBSTBX9l2BxI78VU/MAAYag+pG8curS3aBGy0++ZlxrQ7PdUOUVMbn5BwkGb6+eRrnf43ipnFEA==",
"dev": true,
"license": "MIT"
},
@@ -10597,9 +10597,9 @@
}
},
"node_modules/nanoid": {
- "version": "3.3.9",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.9.tgz",
- "integrity": "sha512-SppoicMGpZvbF1l3z4x7No3OlIjP7QJvC9XR7AhZr1kL133KHnKPztkKDc+Ir4aJ/1VhTySrtKhrsycmrMQfvg==",
+ "version": "3.3.10",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.10.tgz",
+ "integrity": "sha512-vSJJTG+t/dIKAUhUDw/dLdZ9s//5OxcHqLaDWWrW4Cdq7o6tdLIczUkMXt2MBNmk6sJRZBZRXVixs7URY1CmIg==",
"funding": [
{
"type": "github",
@@ -14895,9 +14895,9 @@
}
},
"node_modules/vite/node_modules/rollup": {
- "version": "4.35.0",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.35.0.tgz",
- "integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==",
+ "version": "4.36.0",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.36.0.tgz",
+ "integrity": "sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -14911,25 +14911,25 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.35.0",
- "@rollup/rollup-android-arm64": "4.35.0",
- "@rollup/rollup-darwin-arm64": "4.35.0",
- "@rollup/rollup-darwin-x64": "4.35.0",
- "@rollup/rollup-freebsd-arm64": "4.35.0",
- "@rollup/rollup-freebsd-x64": "4.35.0",
- "@rollup/rollup-linux-arm-gnueabihf": "4.35.0",
- "@rollup/rollup-linux-arm-musleabihf": "4.35.0",
- "@rollup/rollup-linux-arm64-gnu": "4.35.0",
- "@rollup/rollup-linux-arm64-musl": "4.35.0",
- "@rollup/rollup-linux-loongarch64-gnu": "4.35.0",
- "@rollup/rollup-linux-powerpc64le-gnu": "4.35.0",
- "@rollup/rollup-linux-riscv64-gnu": "4.35.0",
- "@rollup/rollup-linux-s390x-gnu": "4.35.0",
- "@rollup/rollup-linux-x64-gnu": "4.35.0",
- "@rollup/rollup-linux-x64-musl": "4.35.0",
- "@rollup/rollup-win32-arm64-msvc": "4.35.0",
- "@rollup/rollup-win32-ia32-msvc": "4.35.0",
- "@rollup/rollup-win32-x64-msvc": "4.35.0",
+ "@rollup/rollup-android-arm-eabi": "4.36.0",
+ "@rollup/rollup-android-arm64": "4.36.0",
+ "@rollup/rollup-darwin-arm64": "4.36.0",
+ "@rollup/rollup-darwin-x64": "4.36.0",
+ "@rollup/rollup-freebsd-arm64": "4.36.0",
+ "@rollup/rollup-freebsd-x64": "4.36.0",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.36.0",
+ "@rollup/rollup-linux-arm-musleabihf": "4.36.0",
+ "@rollup/rollup-linux-arm64-gnu": "4.36.0",
+ "@rollup/rollup-linux-arm64-musl": "4.36.0",
+ "@rollup/rollup-linux-loongarch64-gnu": "4.36.0",
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.36.0",
+ "@rollup/rollup-linux-riscv64-gnu": "4.36.0",
+ "@rollup/rollup-linux-s390x-gnu": "4.36.0",
+ "@rollup/rollup-linux-x64-gnu": "4.36.0",
+ "@rollup/rollup-linux-x64-musl": "4.36.0",
+ "@rollup/rollup-win32-arm64-msvc": "4.36.0",
+ "@rollup/rollup-win32-ia32-msvc": "4.36.0",
+ "@rollup/rollup-win32-x64-msvc": "4.36.0",
"fsevents": "~2.3.2"
}
},
diff --git a/web_src/fomantic/package-lock.json b/web_src/fomantic/package-lock.json
index b42eaf66a7..1612636096 100644
--- a/web_src/fomantic/package-lock.json
+++ b/web_src/fomantic/package-lock.json
@@ -1249,9 +1249,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001703",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001703.tgz",
- "integrity": "sha512-kRlAGTRWgPsOj7oARC9m1okJEXdL/8fekFVcxA8Hl7GH4r/sN4OJn/i6Flde373T50KS7Y37oFbMwlE8+F42kQ==",
+ "version": "1.0.30001705",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001705.tgz",
+ "integrity": "sha512-S0uyMMiYvA7CxNgomYBwwwPUnWzFD83f3B1ce5jHUfHTH//QL6hHsreI8RVC5606R4ssqravelYO5TU6t8sEyg==",
"funding": [
{
"type": "opencollective",
@@ -2005,9 +2005,9 @@
}
},
"node_modules/electron-to-chromium": {
- "version": "1.5.113",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.113.tgz",
- "integrity": "sha512-wjT2O4hX+wdWPJ76gWSkMhcHAV2PTMX+QetUCPYEdCIe+cxmgzzSSiGRCKW8nuh4mwKZlpv0xvoW7OF2X+wmHg==",
+ "version": "1.5.119",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.119.tgz",
+ "integrity": "sha512-Ku4NMzUjz3e3Vweh7PhApPrZSS4fyiCIbcIrG9eKrriYVLmbMepETR/v6SU7xPm98QTqMSYiCwfO89QNjXLkbQ==",
"license": "ISC"
},
"node_modules/emoji-regex": {
From e2aa9adad75e18c7f4fa7816bdd4acb615d4d45d Mon Sep 17 00:00:00 2001
From: Gusted
Date: Mon, 17 Mar 2025 20:03:24 +0000
Subject: [PATCH 14/21] feat(api): add more sorting to own repository list
(#7256)
- Add more sorting options, by leveraging the existing `repo_model.OrderByFlatMap` map, to the `/api/v1/user/repos` endpoint.
- Swagger has been updated.
- Add (non-exhaustive) integration testing.
- Ref: gitnex/GitNex#1266
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7256
Reviewed-by: Earl Warren
Co-authored-by: Gusted
Co-committed-by: Gusted
---
routers/api/v1/user/repo.go | 14 ++++----
templates/swagger/v1_json.tmpl | 22 +++++++++++-
tests/integration/api_repo_test.go | 55 ++++++++++++++++++++++++++++++
3 files changed, 84 insertions(+), 7 deletions(-)
diff --git a/routers/api/v1/user/repo.go b/routers/api/v1/user/repo.go
index 3b0654ef13..7df13ee413 100644
--- a/routers/api/v1/user/repo.go
+++ b/routers/api/v1/user/repo.go
@@ -101,8 +101,9 @@ func ListMyRepos(ctx *context.APIContext) {
// type: integer
// - name: order_by
// in: query
- // description: order the repositories by name (default), id, or size
+ // description: order the repositories
// type: string
+ // enum: [name, id, newest, oldest, recentupdate, leastupdate, reversealphabetically, alphabetically, reversesize, size, reversegitsize, gitsize, reverselfssize, lfssize, moststars, feweststars, mostforks, fewestforks]
// responses:
// "200":
// "$ref": "#/responses/RepositoryList"
@@ -124,14 +125,15 @@ func ListMyRepos(ctx *context.APIContext) {
switch orderBy {
case "name":
opts.OrderBy = "name ASC"
- case "size":
- opts.OrderBy = "size DESC"
case "id":
opts.OrderBy = "id ASC"
- case "":
default:
- ctx.Error(http.StatusUnprocessableEntity, "", "invalid order_by")
- return
+ if orderBy, ok := repo_model.OrderByFlatMap[orderBy]; ok {
+ opts.OrderBy = orderBy
+ } else if orderBy != "" {
+ ctx.Error(http.StatusUnprocessableEntity, "", "invalid order_by")
+ return
+ }
}
repos, count, err := repo_model.SearchRepository(ctx, opts)
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 4679a13fa3..4cc8f7eddd 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -19361,8 +19361,28 @@
"in": "query"
},
{
+ "enum": [
+ "name",
+ "id",
+ "newest",
+ "oldest",
+ "recentupdate",
+ "leastupdate",
+ "reversealphabetically",
+ "alphabetically",
+ "reversesize",
+ "size",
+ "reversegitsize",
+ "gitsize",
+ "reverselfssize",
+ "lfssize",
+ "moststars",
+ "feweststars",
+ "mostforks",
+ "fewestforks"
+ ],
"type": "string",
- "description": "order the repositories by name (default), id, or size",
+ "description": "order the repositories",
"name": "order_by",
"in": "query"
}
diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go
index b635b7099e..6cc7aea2c8 100644
--- a/tests/integration/api_repo_test.go
+++ b/tests/integration/api_repo_test.go
@@ -764,3 +764,58 @@ func TestAPIRepoCommitPull(t *testing.T) {
req = NewRequest(t, "GET", "/api/v1/repos/user2/repo1/commits/not-a-commit/pull")
MakeRequest(t, req, http.StatusNotFound)
}
+
+func TestAPIListOwnRepoSorting(t *testing.T) {
+ defer tests.PrepareTestEnv(t)()
+
+ user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
+ session := loginUser(t, user.Name)
+ token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadRepository, auth_model.AccessTokenScopeReadUser)
+
+ t.Run("No sorting", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+
+ MakeRequest(t, NewRequest(t, "GET", "/api/v1/user/repos").AddTokenAuth(token), http.StatusOK)
+ })
+
+ t.Run("ID sorting", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+
+ var repos []api.Repository
+ resp := MakeRequest(t, NewRequest(t, "GET", "/api/v1/user/repos?limit=2&order_by=id").AddTokenAuth(token), http.StatusOK)
+ DecodeJSON(t, resp, &repos)
+
+ assert.Len(t, repos, 2)
+ assert.EqualValues(t, 1, repos[0].ID)
+ assert.EqualValues(t, 2, repos[1].ID)
+ })
+
+ t.Run("Name sorting", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+
+ var repos []api.Repository
+ resp := MakeRequest(t, NewRequest(t, "GET", "/api/v1/user/repos?limit=2&order_by=name").AddTokenAuth(token), http.StatusOK)
+ DecodeJSON(t, resp, &repos)
+
+ assert.Len(t, repos, 2)
+ assert.EqualValues(t, "big_test_private_4", repos[0].Name)
+ // Postgres doesn't do ascii sorting.
+ if setting.Database.Type.IsPostgreSQL() {
+ assert.EqualValues(t, "commitsonpr", repos[1].Name)
+ } else {
+ assert.EqualValues(t, "commits_search_test", repos[1].Name)
+ }
+ })
+
+ t.Run("Reverse alphabetic sorting", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+
+ var repos []api.Repository
+ resp := MakeRequest(t, NewRequest(t, "GET", "/api/v1/user/repos?limit=2&order_by=reversealphabetically").AddTokenAuth(token), http.StatusOK)
+ DecodeJSON(t, resp, &repos)
+
+ assert.Len(t, repos, 2)
+ assert.EqualValues(t, "utf8", repos[0].Name)
+ assert.EqualValues(t, "test_workflows", repos[1].Name)
+ })
+}
From 9ad3f2813b2d680d472bc4af8b1288b09adc03fc Mon Sep 17 00:00:00 2001
From: Renovate Bot
Date: Tue, 18 Mar 2025 07:28:52 +0000
Subject: [PATCH 15/21] Update dependency yamllint to v1.36.2 (forgejo) (#7259)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7259
Reviewed-by: Michael Kriese
Co-authored-by: Renovate Bot
Co-committed-by: Renovate Bot
---
poetry.lock | 8 ++++----
pyproject.toml | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/poetry.lock b/poetry.lock
index 9735921fa0..5cda33c903 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -404,13 +404,13 @@ files = [
[[package]]
name = "yamllint"
-version = "1.36.1"
+version = "1.36.2"
description = "A linter for YAML files."
optional = false
python-versions = ">=3.9"
files = [
- {file = "yamllint-1.36.1-py3-none-any.whl", hash = "sha256:3e2ccd47ea12449837adf6b2c56fd9e31172ce42bc1470380806be461f25df66"},
- {file = "yamllint-1.36.1.tar.gz", hash = "sha256:a287689daaafc301a80549b2d0170452ebfdcabd826e3fe3b4c66e322d4851fa"},
+ {file = "yamllint-1.36.2-py3-none-any.whl", hash = "sha256:6ba19800513d86c987ed3cf48c0aba4e82b3624596e1dab55723b3733e11f35c"},
+ {file = "yamllint-1.36.2.tar.gz", hash = "sha256:c9ccc818659736e7b13f7e2f9c3c9bb9ac77445be13e789e7d843e92cb8428ef"},
]
[package.dependencies]
@@ -423,4 +423,4 @@ dev = ["doc8", "flake8", "flake8-import-order", "rstcheck[sphinx]", "sphinx"]
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
-content-hash = "15925764be9383752b2d6eaba27c7f65e3a07456123bb69a2837fa54c916d7cb"
+content-hash = "6e4e2a74db7e165f0aa8cae9bb8932cbe1e84ea9bef64db42371e6d620d77c93"
diff --git a/pyproject.toml b/pyproject.toml
index a11496510c..eb3b338794 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -6,7 +6,7 @@ python = "^3.10"
[tool.poetry.group.dev.dependencies]
djlint = "1.36.4"
-yamllint = "1.36.1"
+yamllint = "1.36.2"
codespell = "2.4.1"
[tool.djlint]
From 5032388cc7128f58deb91f163666dfe7110c7a58 Mon Sep 17 00:00:00 2001
From: Renovate Bot
Date: Tue, 18 Mar 2025 07:49:36 +0000
Subject: [PATCH 16/21] Update module gitlab.com/gitlab-org/api/client-go to
v0.126.0 (forgejo) (#7260)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [gitlab.com/gitlab-org/api/client-go](https://gitlab.com/gitlab-org/api/client-go) | require | minor | `v0.123.0` -> `v0.126.0` |
---
### Release Notes
gitlab-org/api/client-go (gitlab.com/gitlab-org/api/client-go)
### [`v0.126.0`](https://gitlab.com/gitlab-org/api/client-go/tags/v0.126.0)
[Compare Source](https://gitlab.com/gitlab-org/api/client-go/compare/v0.125.0...v0.126.0)
#### 0.126.0 (2025-03-17)
##### Improvements (6 changes)
- [Parallelize unit tests](https://gitlab.com/gitlab-org/api/client-go/-/commit/8075babaf90b6ca07780fb1d1e2ea2b990dc99f8) ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2209))
- [Adding service ping API](https://gitlab.com/gitlab-org/api/client-go/-/commit/e84bdb0357fc3372fbbcc9fb88079ba048f05954) ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2196))
- [Exclude generated files from coverage report](https://gitlab.com/gitlab-org/api/client-go/-/commit/e6484c32b9553503bfe6cdf0ea82bb1fb5f047f9) ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2203))
- [Enable SAST scans](https://gitlab.com/gitlab-org/api/client-go/-/commit/2587cc764136d30bd1444384c588611227195457) ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2204))
- [bug: Add fallback for macOS version of readlink](https://gitlab.com/gitlab-org/api/client-go/-/commit/8ecad42574aa5255918b62448694cf8c6fe91528) ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2206))
- [Implement testing package for gomock based tests](https://gitlab.com/gitlab-org/api/client-go/-/commit/ca46822612ab4c5522446eebea4af0e21d60290b) ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2199))
### [`v0.125.0`](https://gitlab.com/gitlab-org/api/client-go/tags/v0.125.0)
[Compare Source](https://gitlab.com/gitlab-org/api/client-go/compare/v0.124.0...v0.125.0)
#### 0.125.0 (2025-03-14)
##### Improvements (11 changes)
- [Add function for deleting a user's identity](https://gitlab.com/gitlab-org/api/client-go/-/commit/8b7fe39f30034ad0ce465acde93695af5de56a05) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2197))
- [Add `GetProjectMirrorPublicKey`, and add support for `auth_method` to `ProjectMirror`](https://gitlab.com/gitlab-org/api/client-go/-/commit/8b74606a431629390d1be7e2a70e461b2423f8f4) by @mness ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2195))
- [Add custom role support to LDAP links](https://gitlab.com/gitlab-org/api/client-go/-/commit/27ce4cb84c3ed0f9b348877c3d58bca1b0d1c233) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2194))
- [Add function for configuring a project pull mirror](https://gitlab.com/gitlab-org/api/client-go/-/commit/4f1442ef76556a5cefe8b6ecd5ef44cc3c1eaebc) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2192))
- [Add new user filter options: Humans, ExcludeActive and ExcludeHumans](https://gitlab.com/gitlab-org/api/client-go/-/commit/0297e100facc7035e7767df233ff01eaf98858a6) by @mjovanovic1 ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2191))
- [Add support for `Usernames` in project-level MR approval rules](https://gitlab.com/gitlab-org/api/client-go/-/commit/a7434e79b052250d125f65a7e73204ce7ad37068) by @rkosegi ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2186))
- [add `ci_id_token_sub_claim_components` to EditProjectOptions](https://gitlab.com/gitlab-org/api/client-go/-/commit/2632817f163095003685e24ca412b997e04a1107) by @bakkerduncan ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2173))
- [feat: Add support for list shared projects group API](https://gitlab.com/gitlab-org/api/client-go/-/commit/e34f2c78a13f595f2bfce7897a1835e688201874) by @sy-be ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2187))
- [Fix pipeline for arbitrary fork location without Ultimate access](https://gitlab.com/gitlab-org/api/client-go/-/commit/6b1baf787fb57edb18e77b6d5287f6cf37d63575) ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2189))
- [Update access tokens to use alias type to reduce duplication](https://gitlab.com/gitlab-org/api/client-go/-/commit/0e325d6335557ad0748f33faa3cffbc704f278e4) ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2178))
- [Add support for merge request approval settings API](https://gitlab.com/gitlab-org/api/client-go/-/commit/165fd77adf308aca36a273ec66feffe2fb83f408) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2184))
### [`v0.124.0`](https://gitlab.com/gitlab-org/api/client-go/tags/v0.124.0)
[Compare Source](https://gitlab.com/gitlab-org/api/client-go/compare/v0.123.0...v0.124.0)
#### 0.124.0 (2025-02-28)
##### Breaking Changes (4 changes)
- [Refactor ShareWithGroup as a Named Struct instead of an Anonymous Struct](https://gitlab.com/gitlab-org/api/client-go/-/commit/65524df62bbcef5ad2debf21aef51bac8c4c3526) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2181))
- [Add support for instance member roles API, and align `CreateMemberRoleOptions`...](https://gitlab.com/gitlab-org/api/client-go/-/commit/6d63332b5704b5dff060e88c058215738b4abae7) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2179))
- [Switch to using BasicMergeRequest for API endpoints that use it](https://gitlab.com/gitlab-org/api/client-go/-/commit/42ec248d8b3bd359b57740e4f9b0f3d03ba02b97) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2176))
- [Add state option when listing project access tokens. This requires that...](https://gitlab.com/gitlab-org/api/client-go/-/commit/761f7de049e19f7486ebe1bda00b713713e6885d) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2170))
##### Improvements (13 changes)
- [Add bundled reviewable command for ease of local development](https://gitlab.com/gitlab-org/api/client-go/-/commit/fd06b55dbfc6ff2ca15706648b512d85f35fcf2f) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2180))
- [Add function for uploading a wiki attachment](https://gitlab.com/gitlab-org/api/client-go/-/commit/bf2d5c0f6bb8b93a005ceac6f9f60c0feea8d633) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2177))
- [Add internal flag when creating different types of notes. Update documentation...](https://gitlab.com/gitlab-org/api/client-go/-/commit/c103a6b83ef874d727e9f3760d82647b588f69e9) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2172))
- [Add `Internal` support to `CreateIssueNoteOptions`](https://gitlab.com/gitlab-org/api/client-go/-/commit/27f52bd13d5d087bba18972404141acce4c17716) by @ebuildy ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2154))
- [Add support for Secure Files API](https://gitlab.com/gitlab-org/api/client-go/-/commit/601d75bc57337619b2bc2c1964070d1c98fdcfa0) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2171))
- [add ci_delete_pipelines_in_seconds to project edit and read](https://gitlab.com/gitlab-org/api/client-go/-/commit/ece925e686e8cea22f00d2263e2c845c5b1d0f51) by @kingcrunch ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2158))
- [Add filter to group variables update and delete](https://gitlab.com/gitlab-org/api/client-go/-/commit/72e52c99db72b3fd6200c01d9aa1a72d67a24738) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2169))
- [Add support for group releases API](https://gitlab.com/gitlab-org/api/client-go/-/commit/4c519f881c7ad7decaa80de47ef861d8803da5dc) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2162))
- [Add description to personal access token APIs](https://gitlab.com/gitlab-org/api/client-go/-/commit/390a3caceaba82f2cf351f129ca78050c6a83217) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2165))
- [Add description to group access token APIs](https://gitlab.com/gitlab-org/api/client-go/-/commit/23a6b28a8ebe475067b8da47646c737af8efaf1a) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2166))
- [Add description to project access token APIs](https://gitlab.com/gitlab-org/api/client-go/-/commit/bb10e8c656627f4d4781e82da1004b2d7f3a3bda) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2167))
- [Add 'username' support to AddProjectMemberOptions](https://gitlab.com/gitlab-org/api/client-go/-/commit/82645d9d45e889d22d20d502de12f8ccb573744b) by @sy-be ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2163))
- [Update Group Hooks to add missing options and fix documentation links](https://gitlab.com/gitlab-org/api/client-go/-/commit/380a7809d2997f78e16419a0b337059e7a234532) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2159))
##### Breaking Change (1 change)
- [Fix return value of CreateMergeRequestDependency to return a single...](https://gitlab.com/gitlab-org/api/client-go/-/commit/a17c2255e18d05fcb7216ec750ae525994aaf221) by @llxp ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2174))
##### Features (1 change)
- [Add support for project security settings API](https://gitlab.com/gitlab-org/api/client-go/-/commit/2826180657895a6bc511d251dd421ebaa473af39) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/api/client-go/-/merge_requests/2157))
---
### Configuration
📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7260
Reviewed-by: Earl Warren
Co-authored-by: Renovate Bot
Co-committed-by: Renovate Bot
---
go.mod | 6 +++---
go.sum | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/go.mod b/go.mod
index 819b1ee351..4fcdbe30c5 100644
--- a/go.mod
+++ b/go.mod
@@ -99,8 +99,8 @@ require (
github.com/yohcop/openid-go v1.0.1
github.com/yuin/goldmark v1.7.8
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
- gitlab.com/gitlab-org/api/client-go v0.123.0
- go.uber.org/mock v0.4.0
+ gitlab.com/gitlab-org/api/client-go v0.126.0
+ go.uber.org/mock v0.5.0
golang.org/x/crypto v0.36.0
golang.org/x/image v0.25.0
golang.org/x/net v0.37.0
@@ -269,7 +269,7 @@ require (
go.uber.org/zap v1.27.0 // indirect
go.uber.org/zap/exp v0.3.0 // indirect
golang.org/x/mod v0.24.0 // indirect
- golang.org/x/time v0.9.0 // indirect
+ golang.org/x/time v0.10.0 // indirect
golang.org/x/tools v0.31.0 // indirect
google.golang.org/api v0.203.0 // indirect
google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53 // indirect
diff --git a/go.sum b/go.sum
index 30fa071418..2d1587ec93 100644
--- a/go.sum
+++ b/go.sum
@@ -1452,8 +1452,8 @@ github.com/zeebo/blake3 v0.2.4/go.mod h1:7eeQ6d2iXWRGF6npfaxl2CU+xy2Fjo2gxeyZGCR
github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo=
github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
-gitlab.com/gitlab-org/api/client-go v0.123.0 h1:W3LZ5QNyiSCJA0Zchkwz8nQIUzOuDoSWMZtRDT5DjPI=
-gitlab.com/gitlab-org/api/client-go v0.123.0/go.mod h1:Jh0qjLILEdbO6z/OY94RD+3NDQRUKiuFSFYozN6cpKM=
+gitlab.com/gitlab-org/api/client-go v0.126.0 h1:VV5TdkF6pMbEdFGvbR2CwEgJwg6qdg1u3bj5eD2tiWk=
+gitlab.com/gitlab-org/api/client-go v0.126.0/go.mod h1:bYC6fPORKSmtuPRyD9Z2rtbAjE7UeNatu2VWHRf4/LE=
go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI=
go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
@@ -1491,8 +1491,8 @@ go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
-go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
-go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
+go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU=
+go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
@@ -1839,8 +1839,8 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
-golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
+golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4=
+golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
From 30b438ff84242c6bfe3e3bab177dc811b4d009d8 Mon Sep 17 00:00:00 2001
From: viceice
Date: Tue, 18 Mar 2025 07:52:00 +0000
Subject: [PATCH 17/21] chore(renovate): add `yamllint` to automerge (#7262)
Only used for linting, so safe for automerge. Also sort list alphabetically.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7262
Reviewed-by: Earl Warren
Co-authored-by: viceice
Co-committed-by: viceice
---
renovate.json | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/renovate.json b/renovate.json
index f3fcd3d5fc..d3bf8c875c 100644
--- a/renovate.json
+++ b/renovate.json
@@ -137,6 +137,8 @@
"@playwright/**",
"@stoplight/spectral-cli",
"@stylistic/**",
+ "@vitejs/plugin-vue",
+ "@vue/test-utils",
"djlint",
"github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker",
"github.com/golangci/golangci-lint/cmd/golangci-lint",
@@ -148,8 +150,7 @@
"mvdan.cc/gofumpt",
"updates",
"vite-string-plugin",
- "@vue/test-utils",
- "@vitejs/plugin-vue"
+ "yamllint"
],
"automerge": true
},
From 316682f17b9b1eec83815c26092b82a18407dcea Mon Sep 17 00:00:00 2001
From: Earl Warren
Date: Tue, 18 Mar 2025 14:18:00 +0000
Subject: [PATCH 18/21] chore(dependency): upgrade gof3 v3.10.6 (#7258)
cherry-pick from the forgefriends fork, except for the F3 API for mirroring which is a functional change that is not safe enough to introduce in Forgejo.
Refs: https://code.forgejo.org/forgefriends/forgefriends/commit/3aad1f4e641c4fbbff8c0ced65337b32782d805d
---
The motivation is to keep up-to-date with the rather large refactor of gof3. The changes are syntactic only and test is provided by the compliance suite.
Co-authored-by: limiting-factor
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7258
Reviewed-by: Michael Kriese
---
go.mod | 2 +-
go.sum | 4 ++--
services/f3/driver/asset.go | 5 +++--
services/f3/driver/comment.go | 5 +++--
services/f3/driver/common.go | 3 ++-
services/f3/driver/container.go | 8 ++++----
services/f3/driver/forge.go | 10 ++++++----
services/f3/driver/issue.go | 5 +++--
services/f3/driver/label.go | 5 +++--
services/f3/driver/milestone.go | 5 +++--
services/f3/driver/organization.go | 5 +++--
services/f3/driver/organizations.go | 5 +++--
services/f3/driver/project.go | 5 +++--
services/f3/driver/projects.go | 7 ++++---
services/f3/driver/pullrequest.go | 10 ++++++----
services/f3/driver/reaction.go | 5 +++--
services/f3/driver/release.go | 5 +++--
services/f3/driver/repository.go | 7 ++++---
services/f3/driver/review.go | 5 +++--
services/f3/driver/reviewcomment.go | 5 +++--
services/f3/driver/root.go | 5 +++--
services/f3/driver/tests/new.go | 6 +++---
services/f3/driver/topic.go | 5 +++--
services/f3/driver/tree.go | 5 +++--
services/f3/driver/user.go | 7 ++++---
services/f3/driver/users.go | 5 +++--
26 files changed, 84 insertions(+), 60 deletions(-)
diff --git a/go.mod b/go.mod
index 4fcdbe30c5..ce1718c0a3 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.24
toolchain go1.24.1
require (
- code.forgejo.org/f3/gof3/v3 v3.10.4
+ code.forgejo.org/f3/gof3/v3 v3.10.6
code.forgejo.org/forgejo-contrib/go-libravatar v0.0.0-20191008002943-06d1c002b251
code.forgejo.org/forgejo/levelqueue v1.0.0
code.forgejo.org/forgejo/reply v1.0.2
diff --git a/go.sum b/go.sum
index 2d1587ec93..3c3733c219 100644
--- a/go.sum
+++ b/go.sum
@@ -610,8 +610,8 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS
cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M=
cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA=
cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw=
-code.forgejo.org/f3/gof3/v3 v3.10.4 h1:NOkw8lG3PhgYykdR5pJ19KFLdYmRFVII43YBSNKtpvk=
-code.forgejo.org/f3/gof3/v3 v3.10.4/go.mod h1:aQSlSGpISIf016g1dBrmm16h53WUKjCR7nSCuoO8dq8=
+code.forgejo.org/f3/gof3/v3 v3.10.6 h1:Ru/Iz+pqM8IPi7atUHE7+q7v3O3DRbYgMFqrFTsO1m8=
+code.forgejo.org/f3/gof3/v3 v3.10.6/go.mod h1:K6lQCWQIyN/5rjP/OJL9fMA6fd++satndE20w/I6Kss=
code.forgejo.org/forgejo-contrib/go-libravatar v0.0.0-20191008002943-06d1c002b251 h1:HTZl3CBk3ABNYtFI6TPLvJgGKFIhKT5CBk0sbOtkDKU=
code.forgejo.org/forgejo-contrib/go-libravatar v0.0.0-20191008002943-06d1c002b251/go.mod h1:PphB88CPbx601QrWPMZATeorACeVmQlyv3u+uUMbSaM=
code.forgejo.org/forgejo/act v1.23.1 h1:4LU7u3FE380DicHz1oZ4ohsWU9I527OHeslVHnr9eP4=
diff --git a/services/f3/driver/asset.go b/services/f3/driver/asset.go
index 6759cc645c..61e571d1b6 100644
--- a/services/f3/driver/asset.go
+++ b/services/f3/driver/asset.go
@@ -20,6 +20,7 @@ import (
"code.gitea.io/gitea/services/attachment"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -131,7 +132,7 @@ func (o *asset) Patch(ctx context.Context) {
}
}
-func (o *asset) Put(ctx context.Context) generic.NodeID {
+func (o *asset) Put(ctx context.Context) f3_id.NodeID {
node := o.GetNode()
o.Trace("%s", node.GetID())
@@ -154,7 +155,7 @@ func (o *asset) Put(ctx context.Context) generic.NodeID {
}
o.Trace("asset created %d", o.forgejoAsset.ID)
- return generic.NewNodeID(o.forgejoAsset.ID)
+ return f3_id.NewNodeID(o.forgejoAsset.ID)
}
func (o *asset) Delete(ctx context.Context) {
diff --git a/services/f3/driver/comment.go b/services/f3/driver/comment.go
index 0c10fd744d..166bfcd328 100644
--- a/services/f3/driver/comment.go
+++ b/services/f3/driver/comment.go
@@ -14,6 +14,7 @@ import (
"code.gitea.io/gitea/modules/timeutil"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -95,7 +96,7 @@ func (o *comment) Patch(ctx context.Context) {
}
}
-func (o *comment) Put(ctx context.Context) generic.NodeID {
+func (o *comment) Put(ctx context.Context) f3_id.NodeID {
node := o.GetNode()
o.Trace("%s", node.GetID())
@@ -105,7 +106,7 @@ func (o *comment) Put(ctx context.Context) generic.NodeID {
panic(err)
}
o.Trace("comment created %d", o.forgejoComment.ID)
- return generic.NewNodeID(o.forgejoComment.ID)
+ return f3_id.NewNodeID(o.forgejoComment.ID)
}
func (o *comment) Delete(ctx context.Context) {
diff --git a/services/f3/driver/common.go b/services/f3/driver/common.go
index 104f91c977..4c5dfd8b1a 100644
--- a/services/f3/driver/common.go
+++ b/services/f3/driver/common.go
@@ -7,6 +7,7 @@ package driver
import (
"context"
+ f3_kind "code.forgejo.org/f3/gof3/v3/kind"
"code.forgejo.org/f3/gof3/v3/tree/generic"
)
@@ -37,7 +38,7 @@ func (o *common) getPageSize() int {
return o.getTreeDriver().GetPageSize()
}
-func (o *common) getKind() generic.Kind {
+func (o *common) getKind() f3_kind.Kind {
return o.GetNode().GetKind()
}
diff --git a/services/f3/driver/container.go b/services/f3/driver/container.go
index 153044416e..1ca47ef285 100644
--- a/services/f3/driver/container.go
+++ b/services/f3/driver/container.go
@@ -8,8 +8,8 @@ import (
"context"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
- "code.forgejo.org/f3/gof3/v3/tree/generic"
)
type container struct {
@@ -30,7 +30,7 @@ func (o *container) FromFormat(content f3.Interface) {
func (o *container) Get(context.Context) bool { return true }
-func (o *container) Put(ctx context.Context) generic.NodeID {
+func (o *container) Put(ctx context.Context) f3_id.NodeID {
return o.upsert(ctx)
}
@@ -38,6 +38,6 @@ func (o *container) Patch(ctx context.Context) {
o.upsert(ctx)
}
-func (o *container) upsert(context.Context) generic.NodeID {
- return generic.NewNodeID(o.getKind())
+func (o *container) upsert(context.Context) f3_id.NodeID {
+ return f3_id.NewNodeID(o.getKind())
}
diff --git a/services/f3/driver/forge.go b/services/f3/driver/forge.go
index a4bcf61231..c232882753 100644
--- a/services/f3/driver/forge.go
+++ b/services/f3/driver/forge.go
@@ -11,6 +11,8 @@ import (
user_model "code.gitea.io/gitea/models/user"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
+ f3_kind "code.forgejo.org/f3/gof3/v3/kind"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
"code.forgejo.org/f3/gof3/v3/util"
@@ -19,16 +21,16 @@ import (
type forge struct {
generic.NullDriver
- ownersKind map[string]generic.Kind
+ ownersKind map[string]f3_kind.Kind
}
func newForge() generic.NodeDriverInterface {
return &forge{
- ownersKind: make(map[string]generic.Kind),
+ ownersKind: make(map[string]f3_kind.Kind),
}
}
-func (o *forge) getOwnersKind(ctx context.Context, id string) generic.Kind {
+func (o *forge) getOwnersKind(ctx context.Context, id string) f3_kind.Kind {
kind, ok := o.ownersKind[id]
if !ok {
user, err := user_model.GetUserByID(ctx, util.ParseInt(id))
@@ -50,7 +52,7 @@ func (o *forge) getOwnersPath(ctx context.Context, id string) f3_tree.Path {
func (o *forge) Equals(context.Context, generic.NodeInterface) bool { return true }
func (o *forge) Get(context.Context) bool { return true }
-func (o *forge) Put(context.Context) generic.NodeID { return generic.NewNodeID("forge") }
+func (o *forge) Put(context.Context) f3_id.NodeID { return f3_id.NewNodeID("forge") }
func (o *forge) Patch(context.Context) {}
func (o *forge) Delete(context.Context) {}
func (o *forge) NewFormat() f3.Interface { return &f3.Forge{} }
diff --git a/services/f3/driver/issue.go b/services/f3/driver/issue.go
index 371ff9d45a..7e10f3a9db 100644
--- a/services/f3/driver/issue.go
+++ b/services/f3/driver/issue.go
@@ -17,6 +17,7 @@ import (
issue_service "code.gitea.io/gitea/services/issue"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -210,7 +211,7 @@ func updateIssueLabels(ctx context.Context, issueID int64, labels []*issues_mode
}
}
-func (o *issue) Put(ctx context.Context) generic.NodeID {
+func (o *issue) Put(ctx context.Context) f3_id.NodeID {
node := o.GetNode()
o.Trace("%s", node.GetID())
@@ -232,7 +233,7 @@ func (o *issue) Put(ctx context.Context) generic.NodeID {
updateIssueLabels(ctx, o.forgejoIssue.ID, o.forgejoIssue.Labels)
o.Trace("issue created %d/%d", o.forgejoIssue.ID, o.forgejoIssue.Index)
- return generic.NewNodeID(o.forgejoIssue.Index)
+ return f3_id.NewNodeID(o.forgejoIssue.Index)
}
func (o *issue) Delete(ctx context.Context) {
diff --git a/services/f3/driver/label.go b/services/f3/driver/label.go
index aef0d0256d..509a69cf71 100644
--- a/services/f3/driver/label.go
+++ b/services/f3/driver/label.go
@@ -13,6 +13,7 @@ import (
issues_model "code.gitea.io/gitea/models/issues"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -86,7 +87,7 @@ func (o *label) Patch(ctx context.Context) {
}
}
-func (o *label) Put(ctx context.Context) generic.NodeID {
+func (o *label) Put(ctx context.Context) f3_id.NodeID {
node := o.GetNode()
o.Trace("%s", node.GetID())
@@ -95,7 +96,7 @@ func (o *label) Put(ctx context.Context) generic.NodeID {
panic(err)
}
o.Trace("label created %d", o.forgejoLabel.ID)
- return generic.NewNodeID(o.forgejoLabel.ID)
+ return f3_id.NewNodeID(o.forgejoLabel.ID)
}
func (o *label) Delete(ctx context.Context) {
diff --git a/services/f3/driver/milestone.go b/services/f3/driver/milestone.go
index f133d37f7a..e57fee95a7 100644
--- a/services/f3/driver/milestone.go
+++ b/services/f3/driver/milestone.go
@@ -15,6 +15,7 @@ import (
"code.gitea.io/gitea/modules/timeutil"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -122,7 +123,7 @@ func (o *milestone) Patch(ctx context.Context) {
}
}
-func (o *milestone) Put(ctx context.Context) generic.NodeID {
+func (o *milestone) Put(ctx context.Context) f3_id.NodeID {
node := o.GetNode()
o.Trace("%s", node.GetID())
@@ -131,7 +132,7 @@ func (o *milestone) Put(ctx context.Context) generic.NodeID {
panic(err)
}
o.Trace("milestone created %d", o.forgejoMilestone.ID)
- return generic.NewNodeID(o.forgejoMilestone.ID)
+ return f3_id.NewNodeID(o.forgejoMilestone.ID)
}
func (o *milestone) Delete(ctx context.Context) {
diff --git a/services/f3/driver/organization.go b/services/f3/driver/organization.go
index 76b240068d..8e818a231a 100644
--- a/services/f3/driver/organization.go
+++ b/services/f3/driver/organization.go
@@ -13,6 +13,7 @@ import (
user_model "code.gitea.io/gitea/models/user"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -81,7 +82,7 @@ func (o *organization) Patch(ctx context.Context) {
}
}
-func (o *organization) Put(ctx context.Context) generic.NodeID {
+func (o *organization) Put(ctx context.Context) f3_id.NodeID {
node := o.GetNode()
o.Trace("%s", node.GetID())
@@ -94,7 +95,7 @@ func (o *organization) Put(ctx context.Context) generic.NodeID {
panic(err)
}
- return generic.NewNodeID(o.forgejoOrganization.ID)
+ return f3_id.NewNodeID(o.forgejoOrganization.ID)
}
func (o *organization) Delete(ctx context.Context) {
diff --git a/services/f3/driver/organizations.go b/services/f3/driver/organizations.go
index 98c4c1497d..adebdbbe95 100644
--- a/services/f3/driver/organizations.go
+++ b/services/f3/driver/organizations.go
@@ -12,6 +12,7 @@ import (
org_model "code.gitea.io/gitea/models/organization"
user_model "code.gitea.io/gitea/models/user"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
)
@@ -36,13 +37,13 @@ func (o *organizations) ListPage(ctx context.Context, page int) generic.Children
return f3_tree.ConvertListed(ctx, o.GetNode(), f3_tree.ConvertToAny(organizations...)...)
}
-func (o *organizations) GetIDFromName(ctx context.Context, name string) generic.NodeID {
+func (o *organizations) GetIDFromName(ctx context.Context, name string) f3_id.NodeID {
organization, err := org_model.GetOrgByName(ctx, name)
if err != nil {
panic(fmt.Errorf("GetOrganizationByName: %v", err))
}
- return generic.NewNodeID(organization.ID)
+ return f3_id.NewNodeID(organization.ID)
}
func newOrganizations() generic.NodeDriverInterface {
diff --git a/services/f3/driver/project.go b/services/f3/driver/project.go
index c2a2df38c4..2400663426 100644
--- a/services/f3/driver/project.go
+++ b/services/f3/driver/project.go
@@ -14,6 +14,7 @@ import (
repo_service "code.gitea.io/gitea/services/repository"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -121,7 +122,7 @@ func (o *project) Patch(ctx context.Context) {
}
}
-func (o *project) Put(ctx context.Context) generic.NodeID {
+func (o *project) Put(ctx context.Context) f3_id.NodeID {
node := o.GetNode()
o.Trace("%s", node.GetID())
@@ -166,7 +167,7 @@ func (o *project) Put(ctx context.Context) generic.NodeID {
o.forgejoProject = repo
o.Trace("project created %d", o.forgejoProject.ID)
}
- return generic.NewNodeID(o.forgejoProject.ID)
+ return f3_id.NewNodeID(o.forgejoProject.ID)
}
func (o *project) Delete(ctx context.Context) {
diff --git a/services/f3/driver/projects.go b/services/f3/driver/projects.go
index a2dabc3f95..fb447f3f01 100644
--- a/services/f3/driver/projects.go
+++ b/services/f3/driver/projects.go
@@ -11,6 +11,7 @@ import (
"code.gitea.io/gitea/models/db"
repo_model "code.gitea.io/gitea/models/repo"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
)
@@ -19,18 +20,18 @@ type projects struct {
container
}
-func (o *projects) GetIDFromName(ctx context.Context, name string) generic.NodeID {
+func (o *projects) GetIDFromName(ctx context.Context, name string) f3_id.NodeID {
owner := f3_tree.GetOwnerName(o.GetNode())
forgejoProject, err := repo_model.GetRepositoryByOwnerAndName(ctx, owner, name)
if repo_model.IsErrRepoNotExist(err) {
- return generic.NilID
+ return f3_id.NilID
}
if err != nil {
panic(fmt.Errorf("error GetRepositoryByOwnerAndName(%s, %s): %v", owner, name, err))
}
- return generic.NewNodeID(forgejoProject.ID)
+ return f3_id.NewNodeID(forgejoProject.ID)
}
func (o *projects) ListPage(ctx context.Context, page int) generic.ChildrenSlice {
diff --git a/services/f3/driver/pullrequest.go b/services/f3/driver/pullrequest.go
index 466b4bd576..b8cb06c4d5 100644
--- a/services/f3/driver/pullrequest.go
+++ b/services/f3/driver/pullrequest.go
@@ -18,6 +18,8 @@ import (
issue_service "code.gitea.io/gitea/services/issue"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
+ f3_path "code.forgejo.org/f3/gof3/v3/path"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -51,7 +53,7 @@ func (o *pullRequest) repositoryToReference(ctx context.Context, repository *rep
if repository == nil {
panic("unexpected nil repository")
}
- forge := o.getTree().GetRoot().GetChild(generic.NewNodeID(f3_tree.KindForge)).GetDriver().(*forge)
+ forge := o.getTree().GetRoot().GetChild(f3_id.NewNodeID(f3_tree.KindForge)).GetDriver().(*forge)
owners := forge.getOwnersPath(ctx, fmt.Sprintf("%d", repository.OwnerID))
return f3_tree.NewRepositoryReference(owners.String(), repository.OwnerID, repository.ID)
}
@@ -61,7 +63,7 @@ func (o *pullRequest) referenceToRepository(reference *f3.Reference) int64 {
if reference.Get() == "../../repository/vcs" {
project = f3_tree.GetProjectID(o.GetNode())
} else {
- p := f3_tree.ToPath(generic.PathAbsolute(o.GetNode().GetCurrentPath().String(), reference.Get()))
+ p := f3_tree.ToPath(f3_path.PathAbsolute(generic.NewElementNode, o.GetNode().GetCurrentPath().String(), reference.Get()))
o.Trace("%v %v", o.GetNode().GetCurrentPath().String(), p)
_, project = p.OwnerAndProjectID()
}
@@ -237,7 +239,7 @@ func (o *pullRequest) GetPullRequestRef() string {
return fmt.Sprintf("refs/pull/%s/head", o.GetNativeID())
}
-func (o *pullRequest) Put(ctx context.Context) generic.NodeID {
+func (o *pullRequest) Put(ctx context.Context) f3_id.NodeID {
node := o.GetNode()
o.Trace("%s", node.GetID())
@@ -289,7 +291,7 @@ func (o *pullRequest) Put(ctx context.Context) generic.NodeID {
}
o.Trace("pullRequest created %d/%d", o.forgejoPullRequest.ID, o.forgejoPullRequest.Index)
- return generic.NewNodeID(o.forgejoPullRequest.Index)
+ return f3_id.NewNodeID(o.forgejoPullRequest.Index)
}
func (o *pullRequest) Delete(ctx context.Context) {
diff --git a/services/f3/driver/reaction.go b/services/f3/driver/reaction.go
index 0dc486c729..4f12fa41db 100644
--- a/services/f3/driver/reaction.go
+++ b/services/f3/driver/reaction.go
@@ -13,6 +13,7 @@ import (
user_model "code.gitea.io/gitea/models/user"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -87,7 +88,7 @@ func (o *reaction) Patch(ctx context.Context) {
}
}
-func (o *reaction) Put(ctx context.Context) generic.NodeID {
+func (o *reaction) Put(ctx context.Context) f3_id.NodeID {
o.Error("%v", o.forgejoReaction.User)
sess := db.GetEngine(ctx)
@@ -115,7 +116,7 @@ func (o *reaction) Put(ctx context.Context) generic.NodeID {
panic(err)
}
o.Trace("reaction created %d", o.forgejoReaction.ID)
- return generic.NewNodeID(o.forgejoReaction.ID)
+ return f3_id.NewNodeID(o.forgejoReaction.ID)
}
func (o *reaction) Delete(ctx context.Context) {
diff --git a/services/f3/driver/release.go b/services/f3/driver/release.go
index e937f84d05..86490e8b02 100644
--- a/services/f3/driver/release.go
+++ b/services/f3/driver/release.go
@@ -17,6 +17,7 @@ import (
release_service "code.gitea.io/gitea/services/release"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -115,7 +116,7 @@ func (o *release) Patch(ctx context.Context) {
}
}
-func (o *release) Put(ctx context.Context) generic.NodeID {
+func (o *release) Put(ctx context.Context) f3_id.NodeID {
node := o.GetNode()
o.Trace("%s", node.GetID())
@@ -133,7 +134,7 @@ func (o *release) Put(ctx context.Context) generic.NodeID {
panic(err)
}
o.Trace("release created %d", o.forgejoRelease.ID)
- return generic.NewNodeID(o.forgejoRelease.ID)
+ return f3_id.NewNodeID(o.forgejoRelease.ID)
}
func (o *release) Delete(ctx context.Context) {
diff --git a/services/f3/driver/repository.go b/services/f3/driver/repository.go
index 21f826e551..118d5f2f2a 100644
--- a/services/f3/driver/repository.go
+++ b/services/f3/driver/repository.go
@@ -11,6 +11,7 @@ import (
"code.forgejo.org/f3/gof3/v3/f3"
helpers_repository "code.forgejo.org/f3/gof3/v3/forges/helpers/repository"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
)
@@ -57,7 +58,7 @@ func (o *repository) Get(ctx context.Context) bool {
return o.h.Get(ctx)
}
-func (o *repository) Put(ctx context.Context) generic.NodeID {
+func (o *repository) Put(ctx context.Context) f3_id.NodeID {
return o.upsert(ctx)
}
@@ -65,10 +66,10 @@ func (o *repository) Patch(ctx context.Context) {
o.upsert(ctx)
}
-func (o *repository) upsert(ctx context.Context) generic.NodeID {
+func (o *repository) upsert(ctx context.Context) f3_id.NodeID {
o.Trace("%s", o.GetNativeID())
o.h.Upsert(ctx, o.f)
- return generic.NewNodeID(o.f.Name)
+ return f3_id.NewNodeID(o.f.Name)
}
func (o *repository) SetFetchFunc(fetchFunc func(ctx context.Context, destination string, internalRefs []string)) {
diff --git a/services/f3/driver/review.go b/services/f3/driver/review.go
index a3c074bd63..d180ea96be 100644
--- a/services/f3/driver/review.go
+++ b/services/f3/driver/review.go
@@ -14,6 +14,7 @@ import (
"code.gitea.io/gitea/modules/timeutil"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -134,7 +135,7 @@ func (o *review) Patch(ctx context.Context) {
}
}
-func (o *review) Put(ctx context.Context) generic.NodeID {
+func (o *review) Put(ctx context.Context) f3_id.NodeID {
node := o.GetNode()
o.Trace("%s", node.GetID())
@@ -153,7 +154,7 @@ func (o *review) Put(ctx context.Context) generic.NodeID {
panic(err)
}
o.Trace("review created %d", o.forgejoReview.ID)
- return generic.NewNodeID(o.forgejoReview.ID)
+ return f3_id.NewNodeID(o.forgejoReview.ID)
}
func (o *review) Delete(ctx context.Context) {
diff --git a/services/f3/driver/reviewcomment.go b/services/f3/driver/reviewcomment.go
index 8e13d86b63..7ba0e15802 100644
--- a/services/f3/driver/reviewcomment.go
+++ b/services/f3/driver/reviewcomment.go
@@ -15,6 +15,7 @@ import (
"code.gitea.io/gitea/modules/timeutil"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -115,7 +116,7 @@ func (o *reviewComment) Patch(ctx context.Context) {
}
}
-func (o *reviewComment) Put(ctx context.Context) generic.NodeID {
+func (o *reviewComment) Put(ctx context.Context) f3_id.NodeID {
node := o.GetNode()
o.Trace("%s", node.GetID())
@@ -125,7 +126,7 @@ func (o *reviewComment) Put(ctx context.Context) generic.NodeID {
panic(err)
}
o.Trace("reviewComment created %d", o.forgejoReviewComment.ID)
- return generic.NewNodeID(o.forgejoReviewComment.ID)
+ return f3_id.NewNodeID(o.forgejoReviewComment.ID)
}
func (o *reviewComment) Delete(ctx context.Context) {
diff --git a/services/f3/driver/root.go b/services/f3/driver/root.go
index 0e8a67faf3..f4a6e6a7ca 100644
--- a/services/f3/driver/root.go
+++ b/services/f3/driver/root.go
@@ -8,6 +8,7 @@ import (
"context"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
"code.forgejo.org/f3/gof3/v3/tree/generic"
)
@@ -33,8 +34,8 @@ func (o *root) ToFormat() f3.Interface {
func (o *root) Get(context.Context) bool { return true }
-func (o *root) Put(context.Context) generic.NodeID {
- return generic.NilID
+func (o *root) Put(context.Context) f3_id.NodeID {
+ return f3_id.NilID
}
func (o *root) Patch(context.Context) {
diff --git a/services/f3/driver/tests/new.go b/services/f3/driver/tests/new.go
index 2e3dfc3c95..dc6ac437e6 100644
--- a/services/f3/driver/tests/new.go
+++ b/services/f3/driver/tests/new.go
@@ -9,8 +9,8 @@ import (
driver_options "code.gitea.io/gitea/services/f3/driver/options"
+ f3_kind "code.forgejo.org/f3/gof3/v3/kind"
"code.forgejo.org/f3/gof3/v3/options"
- "code.forgejo.org/f3/gof3/v3/tree/generic"
forge_test "code.forgejo.org/f3/gof3/v3/tree/tests/f3/forge"
)
@@ -22,8 +22,8 @@ func (o *forgeTest) NewOptions(t *testing.T) options.Interface {
return newTestOptions(t)
}
-func (o *forgeTest) GetExceptions() []generic.Kind {
- return []generic.Kind{}
+func (o *forgeTest) GetExceptions() []f3_kind.Kind {
+ return []f3_kind.Kind{}
}
func (o *forgeTest) GetNonTestUsers() []string {
diff --git a/services/f3/driver/topic.go b/services/f3/driver/topic.go
index 16b2eb3142..eeb387cf93 100644
--- a/services/f3/driver/topic.go
+++ b/services/f3/driver/topic.go
@@ -12,6 +12,7 @@ import (
repo_model "code.gitea.io/gitea/models/repo"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -79,14 +80,14 @@ func (o *topic) Patch(ctx context.Context) {
}
}
-func (o *topic) Put(ctx context.Context) generic.NodeID {
+func (o *topic) Put(ctx context.Context) f3_id.NodeID {
sess := db.GetEngine(ctx)
if _, err := sess.Insert(o.forgejoTopic); err != nil {
panic(err)
}
o.Trace("topic created %d", o.forgejoTopic.ID)
- return generic.NewNodeID(o.forgejoTopic.ID)
+ return f3_id.NewNodeID(o.forgejoTopic.ID)
}
func (o *topic) Delete(ctx context.Context) {
diff --git a/services/f3/driver/tree.go b/services/f3/driver/tree.go
index 0302ed74ae..2377d3794d 100644
--- a/services/f3/driver/tree.go
+++ b/services/f3/driver/tree.go
@@ -10,6 +10,7 @@ import (
forgejo_options "code.gitea.io/gitea/services/f3/driver/options"
+ f3_kind "code.forgejo.org/f3/gof3/v3/kind"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
)
@@ -24,7 +25,7 @@ func (o *treeDriver) Init() {
o.NullTreeDriver.Init()
}
-func (o *treeDriver) Factory(ctx context.Context, kind generic.Kind) generic.NodeDriverInterface {
+func (o *treeDriver) Factory(ctx context.Context, kind f3_kind.Kind) generic.NodeDriverInterface {
switch kind {
case f3_tree.KindForge:
return newForge()
@@ -88,7 +89,7 @@ func (o *treeDriver) Factory(ctx context.Context, kind generic.Kind) generic.Nod
return newRepositories()
case f3_tree.KindRepository:
return newRepository(ctx)
- case generic.KindRoot:
+ case f3_kind.KindRoot:
return newRoot(o.GetTree().(f3_tree.TreeInterface).NewFormat(kind))
default:
panic(fmt.Errorf("unexpected kind %s", kind))
diff --git a/services/f3/driver/user.go b/services/f3/driver/user.go
index 221b06e834..0ba6cbb7c6 100644
--- a/services/f3/driver/user.go
+++ b/services/f3/driver/user.go
@@ -14,6 +14,7 @@ import (
user_service "code.gitea.io/gitea/services/user"
"code.forgejo.org/f3/gof3/v3/f3"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
f3_util "code.forgejo.org/f3/gof3/v3/util"
@@ -96,9 +97,9 @@ func (o *user) Get(ctx context.Context) bool {
func (o *user) Patch(context.Context) {
}
-func (o *user) Put(ctx context.Context) generic.NodeID {
+func (o *user) Put(ctx context.Context) f3_id.NodeID {
if user := getSystemUserByName(o.forgejoUser.Name); user != nil {
- return generic.NewNodeID(user.ID)
+ return f3_id.NewNodeID(user.ID)
}
o.forgejoUser.LowerName = strings.ToLower(o.forgejoUser.Name)
@@ -111,7 +112,7 @@ func (o *user) Put(ctx context.Context) generic.NodeID {
panic(err)
}
- return generic.NewNodeID(o.forgejoUser.ID)
+ return f3_id.NewNodeID(o.forgejoUser.ID)
}
func (o *user) Delete(ctx context.Context) {
diff --git a/services/f3/driver/users.go b/services/f3/driver/users.go
index 92ed0bcbc5..59b10fc51d 100644
--- a/services/f3/driver/users.go
+++ b/services/f3/driver/users.go
@@ -11,6 +11,7 @@ import (
"code.gitea.io/gitea/models/db"
user_model "code.gitea.io/gitea/models/user"
+ f3_id "code.forgejo.org/f3/gof3/v3/id"
f3_tree "code.forgejo.org/f3/gof3/v3/tree/f3"
"code.forgejo.org/f3/gof3/v3/tree/generic"
)
@@ -34,13 +35,13 @@ func (o *users) ListPage(ctx context.Context, page int) generic.ChildrenSlice {
return f3_tree.ConvertListed(ctx, o.GetNode(), f3_tree.ConvertToAny(users...)...)
}
-func (o *users) GetIDFromName(ctx context.Context, name string) generic.NodeID {
+func (o *users) GetIDFromName(ctx context.Context, name string) f3_id.NodeID {
user, err := user_model.GetUserByName(ctx, name)
if err != nil {
panic(fmt.Errorf("GetUserByName: %v", err))
}
- return generic.NewNodeID(user.ID)
+ return f3_id.NewNodeID(user.ID)
}
func newUsers() generic.NodeDriverInterface {
From e033967eee22fd45b5f5b9b419cbfe3fa5e89163 Mon Sep 17 00:00:00 2001
From: forgejo-release-manager
Date: Wed, 19 Mar 2025 07:01:17 +0000
Subject: [PATCH 19/21] chore(release-notes): Forgejo v7.0.14 (#7266)
https://codeberg.org/forgejo/forgejo/milestone/9819
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7266
Reviewed-by: Earl Warren
Co-authored-by: forgejo-release-manager
Co-committed-by: forgejo-release-manager
---
release-notes-published/7.0.14.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 release-notes-published/7.0.14.md
diff --git a/release-notes-published/7.0.14.md b/release-notes-published/7.0.14.md
new file mode 100644
index 0000000000..b7e85d8184
--- /dev/null
+++ b/release-notes-published/7.0.14.md
@@ -0,0 +1,14 @@
+
+
+
+
+## Release notes
+
+- Bug fixes
+ - [PR](https://codeberg.org/forgejo/forgejo/pulls/7143) ([backported](https://codeberg.org/forgejo/forgejo/pulls/7145)): consider public issues for project boards
+ - [PR](https://codeberg.org/forgejo/forgejo/pulls/7038) ([backported](https://codeberg.org/forgejo/forgejo/pulls/7049)): the rootless image version label is not set
+- Included for completeness but not worth a release note
+ - [PR](https://codeberg.org/forgejo/forgejo/pulls/6299) ([backported](https://codeberg.org/forgejo/forgejo/pulls/7233)): chore: Make Forgejo build with go1.24
+ - [PR](https://codeberg.org/forgejo/forgejo/pulls/7081): Update golang packages to v1.23 (v7.0/forgejo) (minor)
+ - [PR](https://codeberg.org/forgejo/forgejo/pulls/7051): Update https://code.forgejo.org/forgejo/forgejo-build-publish action to v5.3.4 (v7.0/forgejo)
+
From 2cd9872b105f31a7084fe6326e9fa6f55a24c2b7 Mon Sep 17 00:00:00 2001
From: fauno
Date: Wed, 19 Mar 2025 11:28:55 +0000
Subject: [PATCH 20/21] Include platform information on rubygems compact index
API #6507 (#7257)
Per #6507, platform information was missing from the rubygems package registry, so binary gems where not served correctly. This change adds the platform information when necessary.
Co-authored-by: f
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7257
Reviewed-by: Gusted
Co-authored-by: fauno
Co-committed-by: fauno
---
routers/api/packages/rubygems/rubygems.go | 23 +++
.../integration/api_packages_rubygems_test.go | 179 ++++++++++++++++++
2 files changed, 202 insertions(+)
diff --git a/routers/api/packages/rubygems/rubygems.go b/routers/api/packages/rubygems/rubygems.go
index dfefe2c4fb..28f584b391 100644
--- a/routers/api/packages/rubygems/rubygems.go
+++ b/routers/api/packages/rubygems/rubygems.go
@@ -105,9 +105,11 @@ func ServePackageInfo(ctx *context.Context) {
ctx, ctx.Package.Owner.ID, packages_model.TypeRubyGems, packageName)
if err != nil {
apiError(ctx, http.StatusInternalServerError, err)
+ return
}
if len(versions) == 0 {
apiError(ctx, http.StatusNotFound, fmt.Sprintf("Could not find package %s", packageName))
+ return
}
result, err := buildInfoFileForPackage(ctx, versions)
@@ -135,6 +137,7 @@ func ServeVersionsFile(ctx *context.Context) {
ctx, ctx.Package.Owner.ID, packages_model.TypeRubyGems, pack.Name)
if err != nil {
apiError(ctx, http.StatusInternalServerError, err)
+ return
}
if len(versions) == 0 {
// No versions left for this package, we should continue.
@@ -144,6 +147,20 @@ func ServeVersionsFile(ctx *context.Context) {
fmt.Fprintf(result, "%s ", pack.Name)
for i, v := range versions {
result.WriteString(v.Version)
+
+ pd, err := packages_model.GetPackageDescriptor(ctx, v)
+ if err != nil {
+ apiError(ctx, http.StatusInternalServerError, err)
+ return
+ }
+
+ metadata := pd.Metadata.(*rubygems_module.Metadata)
+
+ if metadata.Platform != "ruby" {
+ result.WriteString("_")
+ result.WriteString(metadata.Platform)
+ }
+
if i != len(versions)-1 {
result.WriteString(",")
}
@@ -152,6 +169,7 @@ func ServeVersionsFile(ctx *context.Context) {
info, err := buildInfoFileForPackage(ctx, versions)
if err != nil {
apiError(ctx, http.StatusInternalServerError, err)
+ return
}
checksum := md5.Sum([]byte(*info))
@@ -413,6 +431,11 @@ func buildRequirementStringFromVersion(ctx *context.Context, version *packages_m
additionalRequirements.WriteString(",rubygems:")
writeRequirements(metadata.RequiredRubygemsVersion, additionalRequirements)
}
+
+ if metadata.Platform != "ruby" {
+ return fmt.Sprintf("%s-%s %s|%s", version.Version, metadata.Platform, dependencyRequirements, additionalRequirements), nil
+ }
+
return fmt.Sprintf("%s %s|%s", version.Version, dependencyRequirements, additionalRequirements), nil
}
diff --git a/tests/integration/api_packages_rubygems_test.go b/tests/integration/api_packages_rubygems_test.go
index eb3dc0e7f2..0ec9b9321b 100644
--- a/tests/integration/api_packages_rubygems_test.go
+++ b/tests/integration/api_packages_rubygems_test.go
@@ -201,6 +201,137 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==`)
holaChecksum := fmt.Sprintf("%x", sha256.Sum256(holaGemContent))
+ binaryPackageName := "debug_inspector"
+ binaryPackageVersion := "0.0.3"
+ binaryRubyGemsRequirements := "ruby:~> 3.1.0"
+ binaryGemContent, _ := base64.StdEncoding.DecodeString(`bWV0YWRhdGEuZ3oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAwMDA0NDQAMDAwMDAw
+MAAwMDAwMDAwADAwMDAwMDAxMTM0ADE0NDQyNjI3NzcyADAxMzQ1NAAgMAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB1c3RhcgAwMHdoZWVsAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAd2hlZWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwADAwMDAw
+MDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf
+iwgA+i+LZAIDxVRbb9MwFH73rzB9KTzksnYrkyUmKm1CRaqECuIBhCInOU28xRdsZ7Sa4LdznN7W
+bExcHkgi5ficz+d852JHUUSf2TZfJzq/hsKzNyAZe2+gEEtRcC+0IopLYLSEvK0yoRzavLbkFqxD
+K3tk+8eNiVC6B6VxGo+JabhfaisZXZ1Psslp1AjVriLZuobw1tfaOkYi+lbXis65sPR5zpVwHuxS
+gCpfBJC28LUVFhjJhSqFZRT/pADrs6LmAmN9/kJK7pHyKD15GaVnUXpO05R1X5zuHvqJlGDQK6hC
+QBf3YSaXO8Qak9nUQQolPDiPii0TCco/VobFwYzgIziGC5oI38HFq0G3CMunarl59hUdng1R6dcG
+ObESbqHRZhvKWLDQAHdoWvLGwaET2RGJ/0K6BFdYYXynmNIFbqbfLDcGLMXhoL4GOl/M6ChO+0NH
+p+9mBCQXTWjXtUXJvq7COi60JLCCovU8b7CdYQpg5UGFwPul5ZktdZEtxQ6zkdAbEg8ySour6eX8
+KpZlkPkNbNU9LnEFMohoQcdJz5qgrtBqGdscAY3I+4BfGpJtsQKg1hIMr7CNtffGsSSphK/bPGSb
+7I5G3wFpRIFpb7Kazz4QCZ7jgeCM3n0nRjsfsJ43TSbBueCedEXRXU82Zdm2PTPc150jZLpTlllo
+ePbEBXA8RP0R6gbox8WA/N747OOM45M4PSYRevCPRHaT/AdEhumQHJ+jULEHdMbxOB5NiBOVEqrK
+bmDNiLt/sx6gp8S1UnK7/qsTEa6jeyP9E+HiLnPUBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZGF0
+YS50YXIuZ3oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAwMDA0NDQAMDAwMDAwMAAw
+MDAwMDAwADAwMDAwMDA1MzMzADE0NDQyNjI3NzcyADAxMzM3NwAgMAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB1c3RhcgAwMHdoZWVsAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAd2hlZWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwADAwMDAwMDAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfiwgA
++i+LZAID7Fp7U9tIEs/f+hR94m79KCMTnleuZfcMCNCtsSnbJJsiOSNLY3uCLGn1CMvl8dnv16OH
+sQnZvatdbjfFFBU0M/2e7p7uISdiPpGeePZ7jo3nGxu729vPNrKx+hubW8+eb29vb+5u7u3tbQJ+
+c3dr4xltPHuEkcaJHUGUm5kQ3hfgfml/Vbk/yYiDNHIE6bMkCeNWsxml49upmMdGEE11TePPUDjq
+gyqRfS0q2rOn8fWMvtk+OjONufv/i//tnZ3te/G/ufMU/48xXDFOpyPpc5QnQUSXf7k8SKXn0iCx
+kzR+Uy0SQxLZ72S87kjODM2x7cs4EVFzBd+I302/H0e278z25zZD1P5bEjVtf3lo2qhNfeQluons
+MBQRTSBoMhPkixs661u0aWyQovL6jibtc2ukaUOAXa1wuKJDEj8nwo9l4JPtuwxLNyISoBLLqS9c
+tTqGIRIC38sfAunMJA3s2HbthUJTmczSseEE8+Z18LzWgFAypjAK3oKPhs+38C6yCclTTqRjJ8wv
+mBBD3QTRtaFp9Xq3NzQHrXod3zTkHU/CgNEtzZFtY0pjwSiFukoVWtISs8IKxkaD6nU3ID9IFGZy
+l2CQJrF0FTlFZir9KcUySZVgcb1uQISe790q4WIKFnSpL35KZcQIMuGN1I/TMAyiBLbC2UhIeiM9
+jyIRpzAaRLIhxHoQatpFbE+Fts5D066urviK0SJFT1Bl5WwqmrZGvVD4uaZO4Cc4Kyye23EMZleu
+UyHJwkFO20nkO5FxG3uBc62xn7w4a7WOGNsq3TJgiu/pg+t80IjWaGw713BH3HzAytSnaiSSNMKH
+DXJRZN+yoYazSNhuq3VQILRanaA4yTGfc1wDRVCJaZ9cxygpj0rKmmJ5G6TkgPRUJNAtTGZMHsnH
+uaZJZM8F7Ie1K6ZkxPLfuGgzsmpiJHIOE+NkP0jWQOkgfZcPBGTkOlAd2/M4OBSxhTJ0UMApcQlO
+40uvpoiELLFCGOXUqrKm5fRlLH76ReKFvWHqJEod1neAoxU+TPtlhkz+DjfHw/l+lt0qooJkTCLh
+u9pH9ilNO4SjwB0yP2NPO4+CsYfyhflDoDg7ZCcDI2hhJ3SZRXAW0csBXaQnCNiRDnKFWJCuclY5
+s4aU79SYfXgbyeksoapTo01cYev4Z4uq/wxmCCNbMqFzEc1lrLIOPHiGhIPkMkW2RBQ1oKxQsenM
+7GgqkEwCeOItIeHFytkSW/o4Ic2GEuFtlhRAJg4myY2NUOKUBcsEjrQ5Kt3ASecC2ipf5SIfLo40
+olUGOUalppi4wvY4hDjFFFvKGZEvOJ6TSKpzbQDI8VL2Eq3Y9uRc5hwYXVkgZqJIPg0lZ4PmgSsn
+/FsotcJ07Ml41tBcyaTHaYLFmBeVLRusRxNnFgukE1Dg1JInwEI6BQMuWsgGTXITKb43s2C+rAlM
+NIGzgqVwlboBTKY4Ku8EFQafBJ4X3HCYwENcqZyllV0f9jhAjnHKA0ZuhaiZCCrfL04134pncF8a
+Cy0zGPhyhrqjTsTsEft+ImF7TqPKOVfUxPUwPDVp0Dsevmz3TbIGdN7vvbCOzCOqtAeYVxr00hqe
+9i6GBIh+uzt8Rb1jandf0Q9W96ihmT+e983BgHp9ss7OO5Z51CCre9i5OLK6J3QAPFw/1LHgzCA6
+7BEzzElZJvCOtTOzf3iKafvA6ljDVw06toZdpnkMom06b/eH1uFFp92n84v+eW9ggv0RyHat7nEf
+XMwzszs0NKuLNTJfYEKD03ano1i1LyB9X8l32Dt/1bdOTod02uscmVg8MCFZ+6BjZqy6r7TDTts6
+a9BR+6x9YiqsHqj0FVgu3ctTUy2BXxs/h0Or12WbHPa6wz6mDW3Y6w9L1JfWwGxQu28N2CDH/R7I
+szmB0VNEgNc1MypsapZaK08EIKzFxcBcyHJktjugNWDku8dn/CEbpz6KjN/7AYDr/72dnYfq/63t
+3b2V+n9rY/Op/3+U8deWgVJuJicJVVAnVhaFGTf7TccTtr9Y1FeqteY7ZF6kLn0FLcGtkdjxNao5
+10P5htKoP8YNPZHTVgsRdWydXFaOOuaPw8ob3AORcABxDDc0xM8hEusotJNZVS1g18etXx2Njq2O
+ORrVasgCvYMDs2/k2bWq1+vNurH2XrH6qDdILXwqPtbqxZfhBdPyO9CZktnuLugAvXmPVrmYI5fz
+QG+o0mQxyr1PdwEz/gu08dv7kq3VjfrD5AxXTJZohO64wBxNvFvuFBSB5aVS1WjsQFmNY73VGuJs
+hjgbA+1EtcUnVVN1ZcJ1ZWLACWL69lvSeUdXS/w1ygqI7JQ6uLkvFYASZ8RfYKK/UeC4urhOASwq
+QqGW4CbjAO1IvsRlm4ZWyyF9MAtuqPQi9hlq5VNIBeQQTcs9vyswWrT2frnSb7Ve4OpAtv6o32UT
+pShQIGVc8IBFbW5U9r+jyxbqvRBqNUiZ442Ww4Tome7I4AW2qqNXZZE+qgrAsrHiGemMth5BMuXY
+H5uw6GqPuyTbWPXbfPGjBrcjFAiFkLlcmRDODPRIL8myM6yGo56BZnJwn8V9LgqaCZ9OucG+QSqy
+l9cWMyekRRCQYTTxw2roec29kL6i6KShkr9squNKoUG+q8RSQs1hmwl9xiaLoPsflK0sdKpwzeqk
+gpuOe+LqaF1qIJFwNYa2vLB0JIpFOESLHztLiXmS+sX26kEuMyvgC+h1b+EGK5jrD3uuoQRTQmfS
+3ZWtlHTZfXg79OxkEsDC/GrL7U2ALqzQkMXKnJ2NBFeP5gz2ZlnRjNhDMhv5c/ByaIk518f3BChN
+q/gseUBJv65UvWvDe3HBZXaYAhG0EZxLpHldEV86NOU7VcWhVrjIkYwu9YzbG0PYzkylvGn2x48P
+ed4tjKDYrb3Pdz9mYcGCLbzpq3n/feCEH/P99/nzvZ2V+m+X/yT0VP89wlij9fo63NoJ+G5rUZpM
+1v/Oa2VFd68sq+SXwQO1IHrSslbTtBMxb7UGgCgfQA31jInoiznuYoOrOw6w/Xu3vLpQjaIa2KcH
+8qWCstNkFkRcoFzq5ZMLVYtXnIlE1NZUgRIbYm5LT0G+jfAZ/WPKC/zqkwPMgrkI7SnXK/pn3nof
+ernO5I3T+ZxfW4H7wLP10pP18ot1RoLzXyTDJFO7JKn2sjqsGPt0BcHIi9fV+pURh55MqvprX68p
+8DIl75M6ivN83mr1Lw5eZeYob21lk89dtXeqiMxC+WMNECpn1rCSHYHrjlzxTnhByO9O+A5hdLjW
+La5n6UtO33COynf7tFP5urLon3d8+bQfpf/f2MH3cv7f29p4yv+PdP9PaILaeTTPH4IQyirj819M
+sg78bSD9B3pxNJhnOZ7Okxu9Ru8/TLKCamKovulvl3nB2nrtv06EMwtI79qubahU8rGo+CY0j+Ro
+83usYSJ94X5f5RQ1MrsnVtes0Tff0J057e9nHY6ODcVObeZXAu1/oua/NpsZcSJN3iFfPlXMr+cT
+Tl1OJFBblhao3vubVE0TXsyWWbbU15DCPteI/VZx/2v//8/zvdX439l9iv/HGYt3u7Gj3ud+1ZOd
+NhZT6d+JJf3hZj5v7jqB7ZpRFERZTD7dvH/Y+C8K+d/0/v/i///b2V29/zf3nuL/UcY8cFNPrLRW
+COzyIiV9w9gwtvSngv1pPI2n8TS+qvEfAAAA//8DAME4UCsAMAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABjaGVja3N1bXMu
+eWFtbC5negAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMDAwMDQ0NAAwMDAwMDAwADAwMDAwMDAA
+MDAwMDAwMDA0NTAAMTQ0NDI2Mjc3NzIAMDE0NjIyACAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAHVzdGFyADAwd2hlZWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAB3aGVlbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAAMDAwMDAwMAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB+LCAD6L4tkAgNl
+kD2yFEAIhPM9xV5grWH4f5mZuSeAAYxMrBd5escNNaOrmuajX6/X4/u3r5vl4/F8/uzPqPiMLz9+
+fzwJjNOXQnXMQG2UxSyqlbBnU0v7VVtpLZeNBsO8dMgBO+ncvHfWZ/x6500p68qBNVRwl5Y5AJep
+Z0LobkCdNR5XnVkeiyDF0sM7kf5yMuz/ODmDGF2Sz+6oMt5mMb5zT/PQkcM3NesOZYI5MzsADNzo
+PbhIKiAsZCrqa5IcQ7ZAG6Ktw+UXT1dIYIeTph5BaF20//2TSsE1OfAscfPUe1zJLiSagTIZUCLe
+5lCp02ap4MA5xT7iRbhh9Tbqi3MpZBBIvGtOlF/vuf8dWJs5tNWlSy6ajvbt1R9/AA8NE1rUAQAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==`)
+ binaryChecksum := fmt.Sprintf("%x", sha256.Sum256(binaryGemContent))
+
root := fmt.Sprintf("/api/packages/%s/rubygems", user.Name)
uploadFile := func(t *testing.T, content []byte, expectedStatus int) {
@@ -234,6 +365,8 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==`)
pb, err := packages.GetBlobByID(db.DefaultContext, pfs[0].BlobID)
require.NoError(t, err)
assert.Equal(t, int64(4608), pb.Size)
+
+ assert.Equal(t, "ruby", pd.Metadata.(*rubygems.Metadata).Platform)
})
t.Run("UploadExists", func(t *testing.T) {
@@ -322,6 +455,33 @@ gAAAAP//MS06Gw==`)
sep, holaPackageVersion, holaPackageDependency, holaChecksum, holaRubyGemsRequirements)
assert.Equal(t, expected, resp.Body.String())
})
+
+ t.Run("UploadBinary", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+
+ uploadFile(t, binaryGemContent, http.StatusCreated)
+
+ pvs, err := packages.GetVersionsByPackageName(db.DefaultContext, user.ID, packages.TypeRubyGems, binaryPackageName)
+ require.NoError(t, err)
+
+ pd, err := packages.GetPackageDescriptor(db.DefaultContext, pvs[0])
+ require.NoError(t, err)
+
+ assert.Equal(t, binaryPackageName, pd.Package.Name)
+ assert.Equal(t, "x86_64-linux-musl", pd.Metadata.(*rubygems.Metadata).Platform)
+ })
+
+ t.Run("BinaryPackageInfo", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+
+ req := NewRequest(t, "GET", fmt.Sprintf("%s/info/%s", root, binaryPackageName)).
+ AddBasicAuth(user.Name)
+ resp := MakeRequest(t, req, http.StatusOK)
+ expected := fmt.Sprintf("%s\n%s-x86_64-linux-musl |checksum:%s,%s\n",
+ sep, binaryPackageVersion, binaryChecksum, binaryRubyGemsRequirements)
+ assert.Equal(t, expected, resp.Body.String())
+ })
+
t.Run("Versions", func(t *testing.T) {
defer tests.PrintCurrentTest(t)()
@@ -334,12 +494,16 @@ gAAAAP//MS06Gw==`)
holaInfoReq := NewRequest(t, "GET", fmt.Sprintf("%s/info/%s", root, holaPackageName)).
AddBasicAuth(user.Name)
holaInfoResp := MakeRequest(t, holaInfoReq, http.StatusOK)
+ binaryInfoReq := NewRequest(t, "GET", fmt.Sprintf("%s/info/%s", root, binaryPackageName)).
+ AddBasicAuth(user.Name)
+ binaryInfoResp := MakeRequest(t, binaryInfoReq, http.StatusOK)
// expected := fmt.Sprintf("%s\n%s %s %x\n",
// sep, packageName, packageVersion, md5.Sum(infoResp.Body.Bytes()))
lines := versionsResp.Body.String()
assert.ElementsMatch(t, strings.Split(lines, "\n"), []string{
sep,
+ fmt.Sprintf("%s %s_x86_64-linux-musl %x", binaryPackageName, binaryPackageVersion, md5.Sum(binaryInfoResp.Body.Bytes())),
fmt.Sprintf("%s %s %x", packageName, packageVersion, md5.Sum(infoResp.Body.Bytes())),
fmt.Sprintf("%s %s %x", holaPackageName, holaPackageVersion, md5.Sum(holaInfoResp.Body.Bytes())),
"",
@@ -361,6 +525,21 @@ gAAAAP//MS06Gw==`)
MakeRequest(t, req, http.StatusOK)
})
+ t.Run("DeleteBinary", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+
+ body := bytes.Buffer{}
+ writer := multipart.NewWriter(&body)
+ writer.WriteField("gem_name", binaryPackageName)
+ writer.WriteField("version", binaryPackageVersion)
+ writer.Close()
+
+ req := NewRequestWithBody(t, "DELETE", fmt.Sprintf("%s/api/v1/gems/yank", root), &body).
+ SetHeader("Content-Type", writer.FormDataContentType()).
+ AddBasicAuth(user.Name)
+ MakeRequest(t, req, http.StatusOK)
+ })
+
t.Run("Delete", func(t *testing.T) {
defer tests.PrintCurrentTest(t)()
From 72ee7f3b006f8cb5c1031a5607c87618e0609242 Mon Sep 17 00:00:00 2001
From: Gusted
Date: Wed, 19 Mar 2025 16:45:42 +0000
Subject: [PATCH 21/21] fix: consider issues in repository accessible via
`access` table (#7270)
- Consider the following scenario: a private repository in an organization with a team that has no specific access to that repository. Members of that team are still able to visit the repository because of entries in the `access` table.
- Consider this specific scenario for the gathering of issues for project tables.
- Unit test added
- Resolves forgejo/forgejo#7217
- Ref: forgejo/forgejo#6843
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7270
Reviewed-by: Earl Warren
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted
Co-committed-by: Gusted
---
.../TestPrivateRepoProjects/access.yml | 5 ++
.../TestPrivateRepoProjects/project.yml | 11 ++++
.../TestPrivateRepoProjects/project_board.yml | 8 +++
.../TestPrivateRepoProjects/project_issue.yml | 11 ++++
models/issues/issue_project_test.go | 54 +++++++++++++++++++
models/issues/issue_search.go | 3 ++
6 files changed, 92 insertions(+)
create mode 100644 models/fixtures/TestPrivateRepoProjects/access.yml
create mode 100644 models/fixtures/TestPrivateRepoProjects/project.yml
create mode 100644 models/fixtures/TestPrivateRepoProjects/project_board.yml
create mode 100644 models/fixtures/TestPrivateRepoProjects/project_issue.yml
diff --git a/models/fixtures/TestPrivateRepoProjects/access.yml b/models/fixtures/TestPrivateRepoProjects/access.yml
new file mode 100644
index 0000000000..4149e34b0b
--- /dev/null
+++ b/models/fixtures/TestPrivateRepoProjects/access.yml
@@ -0,0 +1,5 @@
+-
+ id: 1001
+ user_id: 29
+ repo_id: 3
+ mode: 1
diff --git a/models/fixtures/TestPrivateRepoProjects/project.yml b/models/fixtures/TestPrivateRepoProjects/project.yml
new file mode 100644
index 0000000000..f66e4c8676
--- /dev/null
+++ b/models/fixtures/TestPrivateRepoProjects/project.yml
@@ -0,0 +1,11 @@
+-
+ id: 1001
+ title: Org project that contains private issues
+ owner_id: 3
+ repo_id: 0
+ is_closed: false
+ creator_id: 2
+ board_type: 1
+ type: 3
+ created_unix: 1738000000
+ updated_unix: 1738000000
diff --git a/models/fixtures/TestPrivateRepoProjects/project_board.yml b/models/fixtures/TestPrivateRepoProjects/project_board.yml
new file mode 100644
index 0000000000..9829cf7e27
--- /dev/null
+++ b/models/fixtures/TestPrivateRepoProjects/project_board.yml
@@ -0,0 +1,8 @@
+-
+ id: 1001
+ project_id: 1001
+ title: Triage
+ creator_id: 2
+ default: true
+ created_unix: 1738000000
+ updated_unix: 1738000000
diff --git a/models/fixtures/TestPrivateRepoProjects/project_issue.yml b/models/fixtures/TestPrivateRepoProjects/project_issue.yml
new file mode 100644
index 0000000000..3e8c1dca9e
--- /dev/null
+++ b/models/fixtures/TestPrivateRepoProjects/project_issue.yml
@@ -0,0 +1,11 @@
+-
+ id: 1001
+ issue_id: 6
+ project_id: 1001
+ project_board_id: 1001
+
+-
+ id: 1002
+ issue_id: 15
+ project_id: 1001
+ project_board_id: 1001
diff --git a/models/issues/issue_project_test.go b/models/issues/issue_project_test.go
index e28b52128e..d724922946 100644
--- a/models/issues/issue_project_test.go
+++ b/models/issues/issue_project_test.go
@@ -117,3 +117,57 @@ func TestPrivateIssueProjects(t *testing.T) {
})
})
}
+
+func TestPrivateRepoProjects(t *testing.T) {
+ defer tests.AddFixtures("models/fixtures/TestPrivateRepoProjects/")()
+ require.NoError(t, unittest.PrepareTestDatabase())
+
+ org := unittest.AssertExistsAndLoadBean(t, &organization.Organization{ID: 3})
+ orgProject := unittest.AssertExistsAndLoadBean(t, &project.Project{ID: 1001, OwnerID: org.ID})
+ column := unittest.AssertExistsAndLoadBean(t, &project.Column{ID: 1001, ProjectID: orgProject.ID})
+
+ t.Run("Partial access", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+ user29 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 29})
+
+ issueList, err := issues.LoadIssuesFromColumn(db.DefaultContext, column, user29, org, optional.None[bool]())
+ require.NoError(t, err)
+ assert.Len(t, issueList, 1)
+ assert.EqualValues(t, 6, issueList[0].ID)
+
+ issuesNum, err := issues.NumIssuesInProject(db.DefaultContext, orgProject, user29, org, optional.None[bool]())
+ require.NoError(t, err)
+ assert.EqualValues(t, 1, issuesNum)
+
+ issuesNum, err = issues.NumIssuesInProject(db.DefaultContext, orgProject, user29, org, optional.Some(true))
+ require.NoError(t, err)
+ assert.EqualValues(t, 0, issuesNum)
+
+ issuesNum, err = issues.NumIssuesInProject(db.DefaultContext, orgProject, user29, org, optional.Some(false))
+ require.NoError(t, err)
+ assert.EqualValues(t, 1, issuesNum)
+ })
+
+ t.Run("Full access", func(t *testing.T) {
+ defer tests.PrintCurrentTest(t)()
+ user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
+
+ issueList, err := issues.LoadIssuesFromColumn(db.DefaultContext, column, user2, org, optional.None[bool]())
+ require.NoError(t, err)
+ assert.Len(t, issueList, 2)
+ assert.EqualValues(t, 15, issueList[0].ID)
+ assert.EqualValues(t, 6, issueList[1].ID)
+
+ issuesNum, err := issues.NumIssuesInProject(db.DefaultContext, orgProject, user2, org, optional.None[bool]())
+ require.NoError(t, err)
+ assert.EqualValues(t, 2, issuesNum)
+
+ issuesNum, err = issues.NumIssuesInProject(db.DefaultContext, orgProject, user2, org, optional.Some(true))
+ require.NoError(t, err)
+ assert.EqualValues(t, 0, issuesNum)
+
+ issuesNum, err = issues.NumIssuesInProject(db.DefaultContext, orgProject, user2, org, optional.Some(false))
+ require.NoError(t, err)
+ assert.EqualValues(t, 2, issuesNum)
+ })
+}
diff --git a/models/issues/issue_search.go b/models/issues/issue_search.go
index 56c219af39..6592f3708c 100644
--- a/models/issues/issue_search.go
+++ b/models/issues/issue_search.go
@@ -341,6 +341,9 @@ func issuePullAccessibleRepoCond(repoIDstr string, userID int64, org *organizati
builder.Or(
repo_model.UserOrgUnitRepoCond(repoIDstr, userID, org.ID, unitType), // team member repos
repo_model.UserOrgPublicUnitRepoCond(userID, org.ID), // user org public non-member repos, TODO: check repo has issues
+ builder.And(
+ builder.In("issue.repo_id", builder.Select("id").From("repository").Where(builder.Eq{"owner_id": org.ID})),
+ repo_model.UserAccessRepoCond(repoIDstr, userID)), // user can access org repo in a unit independent way
),
)
}