Commit Graph

22 Commits (main)

Author SHA1 Message Date
silverwind ca8c4ebecd
Update JS deps (#36091)
Result of `make update-js svg && git add --all`. Tested Mermaid.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-12-05 06:30:59 +07:00
silverwind 9668913d76
Update JS deps, fix deprecations (#36040)
- Update JS deps
- Regenerate SVGs
- Fix air `bin` deprecation
- Fix `monaco.languages.typescript` deprecation
- Remove `eslint-plugin-no-use-extend-native`, it's unnecessary with
typescript
- Enable new `@typescript-eslint` rules
- Disable `@typescript-eslint/no-redundant-type-constituents`, this rule
has bugs when not running under `strictNullChecks` (pending in
https://github.com/go-gitea/gitea/pull/35843).
2025-11-27 23:58:10 +07:00
silverwind 1baca49870
Update JS deps (#35978)
Update JS deps, regenerate SVGs, fixed lint issues and did cursory
testing of UI.
2025-11-20 21:53:44 +07:00
silverwind d69eede59b
Update JS dependencies (#35759)
- Update all JS dependencies
- Added new unicorn rules
- `updates` now also supports updating `packageManager` and `engines`,
and I see no reason not to do that, so I think we can try keeping these
updated as well. If something in the build breaks because of this, I
will revert and exclude `pnpm` from updating further, but as far as I
understand, only corepack respects this field and pnpm itself does not
care about it.
- Regenerate SVGs.
2025-10-28 17:32:11 +07:00
silverwind cab35ff17a
Update dependencies (#35733)
- Update all JS, Python and Makefile dependencies
- Fixed two new go lint issues
- Tested the affected JS dependencies.
2025-10-23 08:35:48 +07:00
dependabot[bot] 990201dc93
Bump happy-dom from 20.0.0 to 20.0.2 (#35677)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-15 19:07:40 +07:00
silverwind 49a0a11f55
Update JS deps, misc tweaks (#35643)
- Update all JS dependencies
- Enable eslint `no-useless-assignment` and fix 2 discovered issues
- Replace `gitea-vscode` svg with new `octicon-vscode`
- Remove now-unused `@ts-expect-error` comments
- Change Monaco wrapping behaviour to match the wrapping in code view:
no wrapping indent and break on any character.
2025-10-12 21:07:15 +07:00
dependabot[bot] 24a595c3fc
Bump happy-dom from 19.0.2 to 20.0.0 (#35625) 2025-10-12 01:52:03 +07:00
silverwind 6589326e96
Use bundled version of spectral (#35573)
To reduce the risk of npm supply chain attacks and to speed up
dependency installation, I've
[bundled](https://github.com/silverwind/spectral-cli-bundle) the
spectral package into a zero-dependency module. The upstream package is
pretty dead currently, so I expect to keep up with their updates.

The package
[exports](de05948c53/package.json (L9))
a `spectral` bin script, so `pnpm exec spectral` continues to work
as-is.

In total, this removes 86 dependencies from the npm dependency tree.
2025-10-03 22:25:09 +07:00
silverwind 340aed3982
Update JS and PY deps (#35565)
Updated all dependencies and did a quick test of the UI.
2025-10-02 08:45:56 +07:00
silverwind 90cb5f9a1f
Clean up npm dependencies (#35508)
- Remove `minimatch`, was inadvertently re-introduced in
https://github.com/go-gitea/gitea/pull/35482
- Remove `postcss-nesting`, originally introduced in
https://github.com/go-gitea/gitea/pull/29746 to support some fork, but
I'm now of the opinion we should not ship dependencies that we don't use
ourselves.
- Remove `eslint-plugin-no-jquery`, plugin is currently disabled because
of compat issues with eslint 9
(https://github.com/wikimedia/eslint-plugin-no-jquery/issues/311)
2025-09-17 21:39:44 +07:00
silverwind 6033c47f90
Enable more markdown paste features in textarea editor (#35494)
Enable the [same paste
features](https://github.com/github/paste-markdown#paste-markdown-objects)
that GitHub has, notably the ability to paste text containing HTML links
and have them automatically turn into Markdown links. As far as I can
tell, previous paste features all work as expected.

---------

Signed-off-by: silverwind <me@silverwind.io>
2025-09-16 23:55:57 +07:00
silverwind 8c8eb4b6f9
Clean up npm dependencies (#35484)
- `type-fest` is replaced by our own types
- `@stylistic/eslint-plugin-js` is no longer in use, it was replaced
with `@stylistic/eslint-plugin`
- `@types/license-checker-webpack-plugin` does not apply to our forked
version and has a type stub
2025-09-15 16:34:54 +07:00
silverwind 69e595cdd8
Update eslint to v9 (#35485)
Update eslint and all plugins. Many plugins still do not ship type
definitions so I had to add stubs. Also, I had to put a few typescript
error expectations because if some unknown error in the types.

`eslint-plugin-no-jquery` is disabled because it's not compatible with
eslint 9 flat config
(https://github.com/wikimedia/eslint-plugin-no-jquery/issues/311).
2025-09-14 19:15:06 +07:00
silverwind e612b9744c
Revert the rspack change (#35482)
Partially revert https://github.com/go-gitea/gitea/pull/35460 until
rspack supports RISC-V
(https://github.com/web-infra-dev/rspack/issues/11656).
2025-09-14 08:37:07 +07:00
wxiaoguang 325e059a50
Fix different behavior in status check pattern matching with double stars (#35474)
Drop the minimatch dependency, use our own glob compiler.

Fix #35473
2025-09-13 11:53:27 +07:00
silverwind 866c636f52
Replace webpack with rspack (#35460)
Given that this bundler is almost a drop-in replacement to webpack, it
might be worth switching. So far it seems everything is working, but
more testing is needed, so I'm setting draft.

- Dev build time is reduced from 10s to 5s
- Prod build time is reduced from 16s to 10s
- JS output size is reduced from 21.3MB to 19.8MB
- CSS output size is increased from 778kB to 818kB
2025-09-12 19:25:59 +07:00
silverwind 47df15cabc
Update JS and PY dependencies (#35444)
Tested all affected dependencies.
2025-09-10 02:30:20 +07:00
silverwind 801da7fdab
Update js dependencies (#35429) 2025-09-07 18:50:44 +07:00
silverwind b8f1c9f048
Migrate tools and configs to typescript, require node.js >= 22.18.0 (#35421)
Migrate all JS config and tools to TS and fix a number of type issues.
This required Node.js 22.18.0 or greater where [type-stripping was
enabled](https://nodejs.org/en/blog/release/v22.18.0) by default.

Given that Node 22 is the current LTS, I think it's ok to assume that
the user has a recent version of it.

Webpack currently requires the `--disable-interpret` flag to work,
should be fixed eventually with
https://github.com/webpack/webpack-cli/issues/4525.
`fast-glob` is replaced by `fs.globSync`, available in Node 22.0.0 or
greater.
2025-09-06 12:58:25 +07:00
silverwind 89b4be057b
Switch to `@resvg/resvg-wasm` for `generate-images` (#35415)
Use the WASM module of [`resvg-js`](https://github.com/thx/resvg-js) to
replace `fabric` and the problematic native `canvas` dependency. WASM
works cross-platform so we can include it in the main `package.json`.
2025-09-05 21:06:02 +07:00
techknowlogick 361e59fd53
Switch to pnpm (#35274)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
2025-09-04 01:17:14 +07:00