mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-02-03 20:51:07 -05:00
Some checks are pending
/ release (push) Waiting to run
testing-integration / test-unit (push) Waiting to run
testing-integration / test-sqlite (push) Waiting to run
testing-integration / test-mariadb (v10.6) (push) Waiting to run
testing-integration / test-mariadb (v11.8) (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
- Replace the [Monaco Editor](https://microsoft.github.io/monaco-editor/) with [CodeMirror 6](https://codemirror.net/). This editor is used to facilitate the 'Add file' and 'Edit file' functionality. - Rationale: - Monaco editor is a great and powerful editor, however for Forgejo's purpose it acts more like a small IDE than a code editor and is doing too much. In my limited user research the usage of editing files via the web UI is largely for small changes that does not need the features that Monaco editor provides. - Monaco editor has no mobile support, Codemirror is very usable on mobile. - Monaco editor pulls in large dependencies (for language support) and by replacing it with Codemirror the amount of time that webpack needs to build the frontend is reduced by 50% (~30s -> ~15s). - The binary of Forgejo (build with `bindata` tag) is reduced by 2MiB. - Codemirror is much more lightweight and should be more usable on less powerful hardware, most notably the lazy loading is much faster as codemirror uses less javascript. - Because Codemirror is modular it is much easier to change the behavior of the code editor if we wish to. - Drawbacks: - Codemirror is quite modular and as seen in `package.json` and in `codeeditor.ts` we have to supply a lot more of its features to have feature parity with Monaco editor. - Monaco editor has great integrated language support (features that an lsp would provide), Codemirror only has such language support to an extend. - Monaco editor has its famous command palette (known by many as its also available in VSCode), this is not available in code mirror. - Good to note: - All features that was added on top of the monaco editor (such as dynamically changing language support depending on the filename) still works and the theme is based on the VSCode colors which largely resembles the monaco editor. - The code editor is still lazy-loaded (this is painfully clear by reading how imports are passed around in `codeeditor.ts`). - This change was privately tested by a few people, a few bugs were found (and fixed) but no major drawbacks were noted for their usage of the web editor. - There's a "search" button in the top bar, so that search can be used on mobile. It is otherwise only accessible via <kbd>Ctrl</kbd>+<kbd>f</kbd>. Co-authored-by: Beowulf <beowulf@beocode.eu> Co-authored-by: Gusted <postmaster@gusted.xyz> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10559 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-committed-by: Beowulf <beowulf@beocode.eu>
155 lines
5 KiB
JSON
155 lines
5 KiB
JSON
{
|
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
"extends": ["local>forgejo/renovate-config"],
|
|
"ignorePresets": [
|
|
":semanticPrefixFixDepsChoreOthers",
|
|
"docker:pinDigests",
|
|
"helpers:pinGitHubActionDigests"
|
|
],
|
|
"baseBranchPatterns": [
|
|
"$default",
|
|
"/^v11\\.\\d+/forgejo$/",
|
|
"/^v13\\.\\d+/forgejo$/"
|
|
],
|
|
"postUpdateOptions": ["gomodTidy", "gomodUpdateImportPaths", "npmDedupe"],
|
|
"prConcurrentLimit": 10,
|
|
"osvVulnerabilityAlerts": true,
|
|
"automergeStrategy": "squash",
|
|
"labels": ["dependency-upgrade", "test/not-needed"],
|
|
"packageRules": [
|
|
{
|
|
"description": "Require approval for python minor version",
|
|
"matchPackageNames": ["containerbase/python-prebuild", "python"],
|
|
"matchUpdateTypes": ["minor"],
|
|
"dependencyDashboardApproval": true
|
|
},
|
|
{
|
|
"description": "Require dashboard approval for some deps",
|
|
"matchPackageNames": [
|
|
"docker.io/bitnami/minio",
|
|
"github.com/go-ap/activitypub"
|
|
],
|
|
"dependencyDashboardApproval": true
|
|
},
|
|
{
|
|
"description": "Schedule some deps less frequently",
|
|
"matchPackageNames": [
|
|
"code.forgejo.org/f3/gof3/**",
|
|
"github.com/google/pprof"
|
|
],
|
|
"extends": ["schedule:quarterly"]
|
|
},
|
|
{
|
|
"description": "elasticsearch CI images are published about once a month and do not use semantic versioning or short tags",
|
|
"matchPackageNames": ["elasticsearch"],
|
|
"extends": ["schedule:quarterly"]
|
|
},
|
|
{
|
|
"description": "devcontainer is an optional tool used by some Forgejo contributors when working on the codebase",
|
|
"groupName": "devcontainer packages",
|
|
"extends": ["schedule:quarterly"],
|
|
"automerge": true,
|
|
"matchPackageNames": [
|
|
"ghcr.io/devcontainers/features/**",
|
|
"ghcr.io/devcontainers-contrib/features/**"
|
|
]
|
|
},
|
|
{
|
|
"description": "x/tools/* are used in the CI only and upgraded together",
|
|
"matchUpdateTypes": ["minor", "patch", "digest"],
|
|
"automerge": true,
|
|
"groupName": "x/tools",
|
|
"matchPackageNames": ["golang.org/x/tools{/,}**"]
|
|
},
|
|
{
|
|
"description": "Group postcss minor and patch updates",
|
|
"extends": ["packages:postcss"],
|
|
"matchUpdateTypes": ["minor", "patch"],
|
|
"groupName": "postcss"
|
|
},
|
|
{
|
|
"description": "Group Forgejo go-chi packages",
|
|
"matchUpdateTypes": ["minor", "patch", "digest"],
|
|
"matchPackageNames": ["code.forgejo.org/go-chi/**"],
|
|
"groupName": "forgejo go-chi packages"
|
|
},
|
|
{
|
|
"description": "Split minor and patch updates",
|
|
"matchPackageNames": [
|
|
"containerbase/python-prebuild",
|
|
"github.com/urfave/cli/**",
|
|
"python",
|
|
"swagger-ui-dist",
|
|
"vue"
|
|
],
|
|
"separateMinorPatch": true
|
|
},
|
|
{
|
|
"description": "Automerge patch updates",
|
|
"matchPackageNames": [
|
|
"vue",
|
|
"github.com/urfave/cli/**",
|
|
"swagger-ui-dist"
|
|
],
|
|
"matchUpdateTypes": ["patch"],
|
|
"automerge": true
|
|
},
|
|
{
|
|
"description": "Add reviewer and additional labels to renovate PRs",
|
|
"matchDatasources": ["docker"],
|
|
"matchPackageNames": ["data.forgejo.org/renovate/renovate"],
|
|
"reviewers": ["viceice"],
|
|
"addLabels": ["forgejo/ci"]
|
|
},
|
|
{
|
|
"description": "Disable renovate self-updates for release branches",
|
|
"matchBaseBranches": ["/^v\\d+\\.\\d+\\/forgejo$/"],
|
|
"matchPackageNames": [
|
|
"code.forgejo.org/forgejo-contrib/renovate",
|
|
"data.forgejo.org/renovate/renovate",
|
|
"ghcr.io/visualon/renovate"
|
|
],
|
|
"enabled": false
|
|
},
|
|
{
|
|
"description": "Automerge some packages when CI succeeds",
|
|
"extends": ["packages:linters", "packages:test", "schedule:monthly"],
|
|
"matchPackageNames": [
|
|
"@axe-core/playwright",
|
|
"@eslint-community/**",
|
|
"@playwright/**",
|
|
"@stoplight/spectral-cli",
|
|
"@stylistic/**",
|
|
"@vitejs/plugin-vue",
|
|
"@vue/test-utils",
|
|
"djlint",
|
|
"github.com/editorconfig-checker/editorconfig-checker/**",
|
|
"github.com/golangci/golangci-lint/**",
|
|
"github.com/go-testfixtures/testfixtures",
|
|
"github.com/PuerkitoBio/goquery",
|
|
"happy-dom",
|
|
"markdownlint-cli",
|
|
"mcr.microsoft.com/devcontainers/**",
|
|
"mvdan.cc/gofumpt",
|
|
"updates",
|
|
"vite-string-plugin",
|
|
"yamllint"
|
|
],
|
|
"automerge": true
|
|
},
|
|
{
|
|
"description": "Disable indirect updates for stable branches",
|
|
"matchBaseBranches": ["/^v\\d+\\.\\d+\\/forgejo$/"],
|
|
"matchManagers": ["gomod"],
|
|
"matchUpdateTypes": ["major", "minor", "patch", "digest"],
|
|
"matchDepTypes": ["indirect"],
|
|
"enabled": false
|
|
},
|
|
{
|
|
"description": "Require approval for stable branches (must be last rule to override all others)",
|
|
"matchBaseBranches": ["/^v\\d+\\.\\d+\\/forgejo$/"],
|
|
"dependencyDashboardApproval": true,
|
|
"schedule": ["at any time"]
|
|
}
|
|
]
|
|
}
|