Skip to content

Commit 321ecae

Browse files
committed
Update JS dependencies
- Update all JS dependencies - For octicons, rename trashcan to trash - For svgo, migrate to v2 api, output seems to have slightly changed but icons look the same - For stylelint, update config, fix custom property duplicates - For monaco, drop legacy Edge support - For eslint, enable new rules, fix new issues - For less-loader, remove deprecated import syntax
1 parent 24f7bd5 commit 321ecae

File tree

271 files changed

+1839
-1633
lines changed

Some content is hidden

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

271 files changed

+1839
-1633
lines changed

.eslintrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ rules:
344344
unicode-bom: [2, never]
345345
unicorn/better-regex: [0]
346346
unicorn/catch-error-name: [0]
347+
unicorn/consistent-destructuring: [2]
347348
unicorn/consistent-function-scoping: [2]
348349
unicorn/custom-error-definition: [0]
349350
unicorn/empty-brace-spaces: [2]
@@ -356,19 +357,23 @@ rules:
356357
unicorn/import-style: [0]
357358
unicorn/new-for-builtins: [2]
358359
unicorn/no-abusive-eslint-disable: [0]
360+
unicorn/no-array-for-each: [0]
359361
unicorn/no-array-instanceof: [0]
362+
unicorn/no-array-push-push: [2]
360363
unicorn/no-console-spaces: [0]
361364
unicorn/no-fn-reference-in-iterator: [0]
362365
unicorn/no-for-loop: [0]
363366
unicorn/no-hex-escape: [0]
364367
unicorn/no-keyword-prefix: [0]
365368
unicorn/no-lonely-if: [2]
366369
unicorn/no-nested-ternary: [0]
370+
unicorn/no-new-array: [0]
367371
unicorn/no-new-buffer: [0]
368372
unicorn/no-null: [0]
369373
unicorn/no-object-as-default-parameter: [2]
370374
unicorn/no-process-exit: [0]
371375
unicorn/no-reduce: [2]
376+
unicorn/no-this-assignment: [2]
372377
unicorn/no-unreadable-array-destructuring: [0]
373378
unicorn/no-unsafe-regex: [0]
374379
unicorn/no-unused-properties: [2]
@@ -378,8 +383,11 @@ rules:
378383
unicorn/numeric-separators-style: [0]
379384
unicorn/prefer-add-event-listener: [2]
380385
unicorn/prefer-array-find: [2]
386+
unicorn/prefer-array-index-of: [2]
387+
unicorn/prefer-array-some: [2]
381388
unicorn/prefer-dataset: [2]
382389
unicorn/prefer-date-now: [2]
390+
unicorn/prefer-default-parameters: [0]
383391
unicorn/prefer-event-key: [2]
384392
unicorn/prefer-includes: [2]
385393
unicorn/prefer-math-trunc: [2]
@@ -391,6 +399,7 @@ rules:
391399
unicorn/prefer-optional-catch-binding: [2]
392400
unicorn/prefer-query-selector: [0]
393401
unicorn/prefer-reflect-apply: [0]
402+
unicorn/prefer-regexp-test: [2]
394403
unicorn/prefer-replace-all: [0]
395404
unicorn/prefer-set-has: [0]
396405
unicorn/prefer-spread: [0]

build/generate-svg.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use strict';
33

44
const fastGlob = require('fast-glob');
5-
const Svgo = require('svgo');
5+
const {optimize, extendDefaultPlugins} = require('svgo');
66
const {resolve, parse} = require('path');
77
const {readFile, writeFile, mkdir} = require('fs').promises;
88

@@ -25,31 +25,31 @@ async function processFile(file, {prefix, fullName} = {}) {
2525
if (prefix === 'octicon') name = name.replace(/-[0-9]+$/, ''); // chop of '-16' on octicons
2626
}
2727

28-
const svgo = new Svgo({
29-
plugins: [
30-
{removeXMLNS: true},
31-
{removeDimensions: true},
28+
const {data} = optimize(await readFile(file, 'utf8'), {
29+
plugins: extendDefaultPlugins([
30+
'removeXMLNS',
31+
'removeDimensions',
3232
{
33-
addClassesToSVGElement: {
33+
name: 'addClassesToSVGElement',
34+
params: {
3435
classNames: [
3536
'svg',
3637
name,
3738
],
3839
},
3940
},
4041
{
41-
addAttributesToSVGElement: {
42+
name: 'addAttributesToSVGElement',
43+
params: {
4244
attributes: [
4345
{'width': '16'},
4446
{'height': '16'},
4547
{'aria-hidden': 'true'},
4648
],
4749
},
4850
},
49-
],
51+
]),
5052
});
51-
52-
const {data} = await svgo.optimize(await readFile(file, 'utf8'));
5353
await writeFile(resolve(outputDir, `${name}.svg`), data);
5454
}
5555

docs/content/page/index.de-de.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ Gitea ist ein [Gogs](http://gogs.io)-Fork.
3232

3333
## Browser Unterstützung
3434

35-
- Letzten 2 Versions von Chrome, Firefox, Safari, Edge (EdgeHTML) and Edge (Chromium)
35+
- Letzten 2 Versions von Chrome, Firefox, Safari und Edge
3636
- Firefox ESR

docs/content/page/index.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Windows, on architectures like amd64, i386, ARM, PowerPC, and others.
262262

263263
## Browser Support
264264

265-
- Last 2 versions of Chrome, Firefox, Safari, Edge (EdgeHTML) and Edge (Chromium)
265+
- Last 2 versions of Chrome, Firefox, Safari and Edge
266266
- Firefox ESR
267267

268268
## Components

docs/content/page/index.zh-tw.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Gitea 是從 [Gogs](http://gogs.io) Fork 出來的,請閱讀部落格文章 [G
261261

262262
## 瀏覽器支援
263263

264-
- 最近 2 個版本的 Chrome, Firefox, Safari, Edge (EdgeHTML), Edge (Chromium)
264+
- 最近 2 個版本的 Chrome, Firefox, Safari, Edge
265265
- Firefox ESR
266266

267267
## 元件

0 commit comments

Comments
 (0)