diff options
author | silverwind <me@silverwind.io> | 2022-12-20 23:15:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 17:15:47 -0500 |
commit | e767b3372a2171860f07ff57ce165d6cd68448c8 (patch) | |
tree | b4c6b875583ea6f44291076463c7d810299a4043 /build | |
parent | 495b8b3635bdcc42aa419be7845c9bbaf72d7473 (diff) | |
download | gitea-e767b3372a2171860f07ff57ce165d6cd68448c8.tar.gz gitea-e767b3372a2171860f07ff57ce165d6cd68448c8.zip |
Update JS dependencies and eslint (#22190)
- Update all JS dependencies to latest version
- Enable unicorn/prefer-node-protocol and autofix issues
- Regenerate SVGs
- Add some comments to eslint rules
- Tested build, Mermaid and Katex rendering
Diffstat (limited to 'build')
-rwxr-xr-x | build/generate-images.js | 2 | ||||
-rwxr-xr-x | build/generate-svg.js | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/build/generate-images.js b/build/generate-images.js index 62ce5244f0..e5744526db 100755 --- a/build/generate-images.js +++ b/build/generate-images.js @@ -2,7 +2,7 @@ import imageminZopfli from 'imagemin-zopfli'; import {optimize} from 'svgo'; import {fabric} from 'fabric'; -import {readFile, writeFile} from 'fs/promises'; +import {readFile, writeFile} from 'node:fs/promises'; function exit(err) { if (err) console.error(err); diff --git a/build/generate-svg.js b/build/generate-svg.js index c4f3d5a7f9..31e65b8a75 100755 --- a/build/generate-svg.js +++ b/build/generate-svg.js @@ -1,9 +1,9 @@ #!/usr/bin/env node import fastGlob from 'fast-glob'; import {optimize} from 'svgo'; -import {parse} from 'path'; -import {readFile, writeFile, mkdir} from 'fs/promises'; -import {fileURLToPath} from 'url'; +import {parse} from 'node:path'; +import {readFile, writeFile, mkdir} from 'node:fs/promises'; +import {fileURLToPath} from 'node:url'; const glob = (pattern) => fastGlob.sync(pattern, { cwd: fileURLToPath(new URL('..', import.meta.url)), |