diff options
author | silverwind <me@silverwind.io> | 2024-12-10 09:44:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-10 08:44:39 +0000 |
commit | d061f6b70a65de50ff1a7577e4acceeb4f5cfd69 (patch) | |
tree | 717633f0e06021f7be5cf2bd39a54dd94ce313ee /web_src | |
parent | 90d20be5411a25e6e5e3ac25990265445ec71bc0 (diff) | |
download | gitea-d061f6b70a65de50ff1a7577e4acceeb4f5cfd69.tar.gz gitea-d061f6b70a65de50ff1a7577e4acceeb4f5cfd69.zip |
Change typescript `module` to `nodenext` (#32757)
Typescript 5.7 changed semantics around JSON imports and `nodenext` is
now [treated
differently](https://devblogs.microsoft.com/typescript/announcing-typescript-5-7-beta/#validated-json-imports-in---module-nodenext)
than `node16` for JSON imports and it requires the import attribute, so
change the value to that and add the attribute to eliminate this
typescript error.
[`moduleResolution`](https://www.typescriptlang.org/tsconfig/#moduleResolution)
is treated as an alias when `module` is `nodenext`, so we don't need to
specify it.
Also see https://github.com/microsoft/TypeScript/issues/60589. It
appears the next Typescript release will fix this for `node16`, but I
guess it'll still be good to switch to `nodenext`.
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/utils/match.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/utils/match.ts b/web_src/js/utils/match.ts index 274c9322ff..af669116a2 100644 --- a/web_src/js/utils/match.ts +++ b/web_src/js/utils/match.ts @@ -1,4 +1,4 @@ -import emojis from '../../../assets/emoji.json'; +import emojis from '../../../assets/emoji.json' with {type: 'json'}; import {GET} from '../modules/fetch.ts'; import type {Issue} from '../types.ts'; |