Skip to content

Commit

Permalink
chore(ecmascript): switch to ES2024
Browse files Browse the repository at this point in the history
  • Loading branch information
ferferga committed Nov 25, 2024
1 parent 1bc5a5c commit 13c5a62
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions frontend/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Top-level await requires ES2022 (at least) as target and module
* for TypeScript compiler (check tsconfig.json)
* https://caniuse.com/mdn-javascript_operators_await_top_level
* These features are used across the codebase and requires specific
* ECMAScript versions as target in TypeScript compiler (check tsconfig.json):
* - Top-level: ES2022 https://caniuse.com/mdn-javascript_operators_await_top_level
* - Object.groupBy: ES2024 https://caniuse.com/mdn-javascript_builtins_object_groupby
*/
import { createApp } from 'vue';
import { routes } from 'vue-router/auto-routes';
Expand Down
2 changes: 1 addition & 1 deletion frontend/types/global/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,4 @@ declare module 'vue' {
WizardMetadata: typeof import('./../../src/components/Wizard/WizardMetadata.vue')['default']
WizardRemoteAccess: typeof import('./../../src/components/Wizard/WizardRemoteAccess.vue')['default']
}
}
}
2 changes: 1 addition & 1 deletion frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default defineConfig({
/**
* See main.ts for an explanation of this target
*/
target: 'esnext',
target: 'es2024',
/**
* Disable chunk size warnings
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/configs/typescript/base.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ESNext",
"target": "ES2024",
"module": "Preserve",
"moduleResolution": "Bundler",
"esModuleInterop": true,
Expand Down

0 comments on commit 13c5a62

Please sign in to comment.