vize 0.315.1 → 0.321.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,8 +35,16 @@ interface VizeConfig {
35
35
  * Base config files or presets to compose
36
36
  */
37
37
  extends?: string | string[];
38
+ /**
39
+ * Vue dialect profile for standalone HTML documents; when absent the dialect is detected structurally per document
40
+ */
41
+ dialect?: "vue" | "petite-vue";
38
42
  compiler?: CompilerConfig;
39
- experimentals?: Record<string, boolean | Record<string, unknown> | null>;
43
+ experimentals?: {
44
+ [k: string]: boolean | {
45
+ [k: string]: unknown;
46
+ } | null;
47
+ };
40
48
  vite?: VitePluginConfig;
41
49
  linter?: LinterConfig;
42
50
  typeChecker?: TypeCheckerConfig;
@@ -66,6 +74,10 @@ interface CompilerConfig {
66
74
  * Default output mode for .jsx/.tsx components without a "use vue:*" directive
67
75
  */
68
76
  jsxMode?: "vdom" | "vapor";
77
+ /**
78
+ * JSX semantics for projects migrating from @vue/babel-plugin-jsx
79
+ */
80
+ jsxCompat?: "native" | "babel";
69
81
  /**
70
82
  * Treat lowercase non-HTML tags as custom renderer elements
71
83
  */
@@ -130,11 +142,11 @@ interface CompilerCompatibilityConfig {
130
142
  */
131
143
  optionsApiVapor?: boolean;
132
144
  /**
133
- * Host Nuxt major version for compatibility bridges
145
+ * Nuxt major line for opt-in Nuxt compatibility behavior
134
146
  */
135
147
  nuxtVersion?: 2 | 3 | 4;
136
148
  /**
137
- * Host Webpack major version for compatibility bridges
149
+ * webpack major line for opt-in bundler compatibility behavior
138
150
  */
139
151
  webpackVersion?: 4 | 5;
140
152
  }
@@ -164,9 +176,13 @@ interface LinterConfig {
164
176
  * Enable linting
165
177
  */
166
178
  enabled?: boolean;
167
- /** Built-in lint preset */
179
+ /**
180
+ * Built-in lint preset
181
+ */
168
182
  preset?: "happy-path" | "opinionated" | "essential" | "incremental" | "ecosystem" | "nuxt";
169
- /** Enable native type-aware lint rules from the active lint configuration */
183
+ /**
184
+ * Enable native type-aware lint rules from the active lint configuration
185
+ */
170
186
  typeAware?: boolean;
171
187
  /**
172
188
  * Rules to enable/disable
@@ -174,6 +190,7 @@ interface LinterConfig {
174
190
  rules?: {
175
191
  [k: string]: "off" | "warn" | "error";
176
192
  };
193
+ ruleOptions?: LintRuleOptions;
177
194
  /**
178
195
  * Category-level severity overrides
179
196
  */
@@ -186,6 +203,25 @@ interface LinterConfig {
186
203
  security?: "off" | "warn" | "error";
187
204
  };
188
205
  }
206
+ interface LintRuleOptions {
207
+ "script/no-restricted-globals"?: NoRestrictedGlobalsOptions;
208
+ "script/no-restricted-members"?: NoRestrictedMembersOptions;
209
+ }
210
+ interface NoRestrictedGlobalsOptions {
211
+ globals?: RestrictedGlobal[];
212
+ }
213
+ interface RestrictedGlobal {
214
+ name: string;
215
+ message?: string;
216
+ }
217
+ interface NoRestrictedMembersOptions {
218
+ members?: RestrictedMember[];
219
+ }
220
+ interface RestrictedMember {
221
+ object: string;
222
+ property: string;
223
+ message?: string;
224
+ }
189
225
  interface TypeCheckerConfig {
190
226
  /**
191
227
  * Enable type checking
@@ -223,7 +259,9 @@ interface TypeCheckerConfig {
223
259
  * Check fallthrough attrs on multi-root templates
224
260
  */
225
261
  checkFallthroughAttrs?: boolean;
226
- /** Resolve Vue 3 Options API template bindings during type checking. */
262
+ /**
263
+ * Resolve Vue 3 Options API template bindings during type checking
264
+ */
227
265
  optionsApi?: boolean;
228
266
  /**
229
267
  * Enable Vue 2.7 / Nuxt 2 Options API template binding support
@@ -237,7 +275,9 @@ interface TypeCheckerConfig {
237
275
  * Path to tsconfig.json
238
276
  */
239
277
  tsconfig?: string;
240
- /** Path to the Corsa executable. tsgoPath is kept as a compatibility alias. */
278
+ /**
279
+ * Path to the Corsa executable. This is the canonical runtime key; tsgoPath is kept as a compatibility alias.
280
+ */
241
281
  corsaPath?: string;
242
282
  /**
243
283
  * Deprecated alias for typeChecker.corsaPath
@@ -572,8 +612,16 @@ interface VizeConfigEntry {
572
612
  * Base config files or presets to compose
573
613
  */
574
614
  extends?: string | string[];
615
+ /**
616
+ * Vue dialect profile for standalone HTML documents; when absent the dialect is detected structurally per document
617
+ */
618
+ dialect?: "vue" | "petite-vue";
575
619
  compiler?: CompilerConfig;
576
- experimentals?: Record<string, boolean | Record<string, unknown> | null>;
620
+ experimentals?: {
621
+ [k: string]: boolean | {
622
+ [k: string]: unknown;
623
+ } | null;
624
+ };
577
625
  vite?: VitePluginConfig;
578
626
  linter?: LinterConfig;
579
627
  typeChecker?: TypeCheckerConfig;
@@ -677,4 +725,4 @@ declare function resolveConfigExport(exported: UserConfigExport, env?: ConfigEnv
677
725
  declare function normalizeGlobalTypes(config: GlobalTypesConfig): Record<string, GlobalTypeDeclaration>;
678
726
  //#endregion
679
727
  export { MuseaConfig as A, GlobalTypeDeclaration as C, LinterConfig as D, LintPreset as E, VitePluginConfig as F, VizeConfig as I, VizeConfigEntry as L, RuleCategory as M, RuleSeverity as N, MuseaA11yConfig as O, TypeCheckerConfig as P, VueVersion as R, FormatterConfig as S, LanguageServerConfig as T, VueConfig as _, loadConfig as a, CompilerCompatibilityConfig as b, LspConfig as c, MaybePromise as d, ResolvedVizeConfig as f, UserConfigInput as g, UserConfigExport as h, defineConfig as i, MuseaVrtConfig as j, MuseaAutogenConfig as k, ConfigEnv as l, UserConfigEntry as m, VIZE_CONFIG_JSON_SCHEMA_PATH as n, normalizeGlobalTypes as o, UserConfig as p, VIZE_CONFIG_PKL_SCHEMA_PATH as r, resolveConfigExport as s, CONFIG_FILE_NAMES as t, LoadConfigOptions as u, LintRuleName as v, GlobalTypesConfig as w, CompilerConfig as x, LintRulesConfig as y };
680
- //# sourceMappingURL=config-BcMf3hSM.d.mts.map
728
+ //# sourceMappingURL=config-DGT1b9h8.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-DGT1b9h8.d.mts","names":[],"sources":["../src/types/generated.ts","../src/types/rules.ts","../src/types/runtime.ts","../src/types/index.ts","../src/config.ts"],"m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A,GAAU,eAAA;AAAA;AAAA,KAGA,eAAA,GAAkB,UAAA,GAAa,eAAA;AAAA,KAE/B,kBAAA,GAAqB,UAAA;EFf/B;;;;EEoBA,OAAA,EAAS,eAAA;AAAA;AAAA,KAGC,gBAAA,GACR,eAAA,KACE,GAAA,EAAK,SAAA,KAAc,YAAA,CAAa,eAAA;AAAA,UAMrB,iBAAA;EFTf;;;;;;;EEiBA,IAAA;EFPc;;;EEYd,UAAA;EFViB;;;EEejB,GAAA,GAAM,SAAA;AAAA;;;;;;KCpDI,SAAA,GAAS,oBAAA;;;cCLR,iBAAA;AAAA,cAeA,4BAAA;AAAA,cAMA,2BAAA;;;AJ7Bb;;iBImCgB,YAAA,CAAa,MAAA,EAAQ,gBAAA,GAAmB,gBAAA;;;AJjCxD;iBIwCsB,UAAA,CACpB,IAAA,UACA,OAAA,GAAS,iBAAA,GACR,OAAA,CAAQ,kBAAA;AAAA,iBA0FW,mBAAA,CACpB,QAAA,EAAU,gBAAA,EACV,GAAA,GAAM,SAAA,GACL,OAAA,CAAQ,kBAAA;;;AJnIX;iBIwMgB,oBAAA,CACd,MAAA,EAAQ,iBAAA,GACP,MAAA,SAAe,qBAAA"}
package/dist/config.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as loadConfig, i as defineConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-BcMf3hSM.mjs";
1
+ import { a as loadConfig, i as defineConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-DGT1b9h8.mjs";
2
2
  export { CONFIG_FILE_NAMES, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport };
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as MuseaConfig, C as GlobalTypeDeclaration, D as LinterConfig, E as LintPreset, F as VitePluginConfig, I as VizeConfig, L as VizeConfigEntry, M as RuleCategory, N as RuleSeverity, O as MuseaA11yConfig, P as TypeCheckerConfig, R as VueVersion, S as FormatterConfig, T as LanguageServerConfig, _ as VueConfig, a as loadConfig, b as CompilerCompatibilityConfig, c as LspConfig, d as MaybePromise, f as ResolvedVizeConfig, g as UserConfigInput, h as UserConfigExport, i as defineConfig, j as MuseaVrtConfig, k as MuseaAutogenConfig, l as ConfigEnv, m as UserConfigEntry, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, p as UserConfig, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES, u as LoadConfigOptions, v as LintRuleName, w as GlobalTypesConfig, x as CompilerConfig, y as LintRulesConfig } from "./config-BcMf3hSM.mjs";
1
+ import { A as MuseaConfig, C as GlobalTypeDeclaration, D as LinterConfig, E as LintPreset, F as VitePluginConfig, I as VizeConfig, L as VizeConfigEntry, M as RuleCategory, N as RuleSeverity, O as MuseaA11yConfig, P as TypeCheckerConfig, R as VueVersion, S as FormatterConfig, T as LanguageServerConfig, _ as VueConfig, a as loadConfig, b as CompilerCompatibilityConfig, c as LspConfig, d as MaybePromise, f as ResolvedVizeConfig, g as UserConfigInput, h as UserConfigExport, i as defineConfig, j as MuseaVrtConfig, k as MuseaAutogenConfig, l as ConfigEnv, m as UserConfigEntry, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, p as UserConfig, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES, u as LoadConfigOptions, v as LintRuleName, w as GlobalTypesConfig, x as CompilerConfig, y as LintRulesConfig } from "./config-DGT1b9h8.mjs";
2
2
  export { CONFIG_FILE_NAMES, type CompilerCompatibilityConfig, type CompilerConfig, type ConfigEnv, type FormatterConfig, type GlobalTypeDeclaration, type GlobalTypesConfig, type LanguageServerConfig, type LintPreset, type LintRuleName, type LintRulesConfig, type LinterConfig, type LoadConfigOptions, type LspConfig, type MaybePromise, type MuseaA11yConfig, type MuseaAutogenConfig, type MuseaConfig, type MuseaVrtConfig, type ResolvedVizeConfig, type RuleCategory, type RuleSeverity, type TypeCheckerConfig, type UserConfig, type UserConfigEntry, type UserConfigExport, type UserConfigInput, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, type VitePluginConfig, type VizeConfig, type VizeConfigEntry, type VueConfig, type VueVersion, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vize",
3
- "version": "0.315.1",
3
+ "version": "0.321.0",
4
4
  "description": "Vize - High-performance Vue.js toolchain in Rust",
5
5
  "keywords": [
6
6
  "cli",
@@ -53,7 +53,7 @@
53
53
  "access": "public"
54
54
  },
55
55
  "dependencies": {
56
- "@vizejs/native": "0.315.1",
56
+ "@vizejs/native": "0.321.0",
57
57
  "oxc-transform": "0.130.0"
58
58
  },
59
59
  "devDependencies": {
@@ -97,6 +97,6 @@
97
97
  "check:fix": "vp check --fix src tests vite.config.ts",
98
98
  "fmt": "vp fmt --write src tests vite.config.ts",
99
99
  "generate:rule-types": "vp run --workspace-root generate:rule-types",
100
- "test": "vp pack && vp test run tests/setup.test.ts tests/setup-oxlint-config.test.ts tests/init.test.ts tests/init-frameworks.test.ts tests/init-prompt.test.ts"
100
+ "test": "vp pack && vp test run tests/corsa-runtime.test.ts tests/setup.test.ts tests/setup-oxlint-config.test.ts tests/init.test.ts tests/init-frameworks.test.ts tests/init-prompt.test.ts"
101
101
  }
102
102
  }
@@ -4,6 +4,7 @@ module vize.CompilerConfig
4
4
  typealias VueVersion = "3"|"2.7"|"2"|"1"|"0.11"|"0.10"
5
5
  typealias TemplateSyntax = "standard" | "strict" | "quirks"
6
6
  typealias JsxMode = "vdom" | "vapor"
7
+ typealias JsxCompat = "native" | "babel"
7
8
 
8
9
  class CompilerCompatibilityConfig {
9
10
  /// Host Vue runtime version for opt-in compatibility modes.
@@ -35,6 +36,9 @@ class CompilerConfig {
35
36
  /// Default output mode for .jsx/.tsx components without a "use vue:*" directive.
36
37
  jsxMode: JsxMode = "vdom"
37
38
 
39
+ /// JSX semantics for projects migrating from @vue/babel-plugin-jsx.
40
+ jsxCompat: JsxCompat = "native"
41
+
38
42
  /// Treat lowercase non-HTML tags as custom renderer elements.
39
43
  customRenderer: Boolean = false
40
44
 
@@ -0,0 +1,205 @@
1
+ /// Shared definitions used by the secondary JSON Schema compatibility output.
2
+ module vize.jsonschema.ConfigArtifactDefinitions
3
+
4
+ import "@json_schema/JsonSchema.pkl"
5
+
6
+ experimentalsConfigDef: JsonSchema = new JsonSchema {
7
+ type = "object"
8
+ additionalProperties = new JsonSchema {
9
+ oneOf = new Listing {
10
+ new JsonSchema { type = "boolean" }
11
+ new JsonSchema {
12
+ type = "object"
13
+ additionalProperties = true
14
+ }
15
+ new JsonSchema { type = "null" }
16
+ }
17
+ }
18
+ }
19
+
20
+ vueVersionDef: JsonSchema = new JsonSchema {
21
+ type = "string"
22
+ description = "Host Vue runtime version for opt-in compatibility modes"
23
+ enum = new Listing { "3"; "2.7"; "2"; "1"; "0.11"; "0.10" }
24
+ }
25
+
26
+ compilerCompatibilityConfigDef: JsonSchema = new JsonSchema {
27
+ type = "object"
28
+ description = "Opt-in compatibility features for unsupported host/runtime combinations"
29
+ properties {
30
+ ["vueVersion"] = new JsonSchema {
31
+ `$ref` = "#/definitions/VueVersion"
32
+ }
33
+ ["hostCompiler"] = new JsonSchema {
34
+ type = "boolean"
35
+ description = "Delegate .vue compilation to the host Vue compiler for legacy Vue runtimes"
36
+ }
37
+ ["scriptSetupInStandalone"] = new JsonSchema {
38
+ type = "boolean"
39
+ description = "Enable <script setup> when emitting function-body output for CDN/global Vue usage"
40
+ default = false
41
+ }
42
+ ["optionsApiVapor"] = new JsonSchema {
43
+ type = "boolean"
44
+ description = "Allow Vapor output for Options API SFCs when Vapor mode is enabled"
45
+ default = false
46
+ }
47
+ ["nuxtVersion"] = new JsonSchema {
48
+ type = "integer"
49
+ description = "Nuxt major line for opt-in Nuxt compatibility behavior"
50
+ enum = new Listing { 2; 3; 4 }
51
+ }
52
+ ["webpackVersion"] = new JsonSchema {
53
+ type = "integer"
54
+ description = "webpack major line for opt-in bundler compatibility behavior"
55
+ enum = new Listing { 4; 5 }
56
+ }
57
+ }
58
+ additionalProperties = false
59
+ }
60
+
61
+ compilerConfigDef: JsonSchema = new JsonSchema {
62
+ type = "object"
63
+ description = "Vue compiler options"
64
+ properties {
65
+ ["mode"] = new JsonSchema {
66
+ type = "string"
67
+ enum = new Listing { "module"; "function" }
68
+ description = "Compilation mode"
69
+ default = "module"
70
+ }
71
+ ["vapor"] = new JsonSchema {
72
+ type = "boolean"
73
+ description = "Enable Vapor mode compilation"
74
+ default = false
75
+ }
76
+ ["jsxMode"] = new JsonSchema {
77
+ type = "string"
78
+ enum = new Listing { "vdom"; "vapor" }
79
+ description = "Default output mode for .jsx/.tsx components without a \"use vue:*\" directive"
80
+ default = "vdom"
81
+ }
82
+ ["jsxCompat"] = new JsonSchema {
83
+ type = "string"
84
+ enum = new Listing { "native"; "babel" }
85
+ description = "JSX semantics for projects migrating from @vue/babel-plugin-jsx"
86
+ default = "native"
87
+ }
88
+ ["customRenderer"] = new JsonSchema {
89
+ type = "boolean"
90
+ description = "Treat lowercase non-HTML tags as custom renderer elements"
91
+ default = false
92
+ }
93
+ ["ssr"] = new JsonSchema {
94
+ type = "boolean"
95
+ description = "Enable SSR mode"
96
+ default = false
97
+ }
98
+ ["templateSyntax"] = new JsonSchema {
99
+ type = "string"
100
+ enum = new Listing { "standard"; "strict"; "quirks" }
101
+ description = "Template syntax compatibility mode"
102
+ default = "standard"
103
+ }
104
+ ["sourceMap"] = new JsonSchema {
105
+ type = "boolean"
106
+ description = "Enable source map generation"
107
+ }
108
+ ["prefixIdentifiers"] = new JsonSchema {
109
+ type = "boolean"
110
+ description = "Prefix template identifiers with _ctx"
111
+ default = false
112
+ }
113
+ ["hoistStatic"] = new JsonSchema {
114
+ type = "boolean"
115
+ description = "Hoist static nodes"
116
+ default = true
117
+ }
118
+ ["cacheHandlers"] = new JsonSchema {
119
+ type = "boolean"
120
+ description = "Cache v-on handlers"
121
+ default = true
122
+ }
123
+ ["isTs"] = new JsonSchema {
124
+ type = "boolean"
125
+ description = "Enable TypeScript parsing in <script> blocks"
126
+ default = true
127
+ }
128
+ ["scriptExt"] = new JsonSchema {
129
+ type = "string"
130
+ enum = new Listing { "ts"; "js" }
131
+ description = "Script file extension for generated output"
132
+ default = "ts"
133
+ }
134
+ ["runtimeModuleName"] = new JsonSchema {
135
+ type = "string"
136
+ description = "Module name for runtime imports"
137
+ default = "vue"
138
+ }
139
+ ["runtimeGlobalName"] = new JsonSchema {
140
+ type = "string"
141
+ description = "Global variable name for runtime (IIFE builds)"
142
+ default = "Vue"
143
+ }
144
+ ["compatibility"] = new JsonSchema {
145
+ `$ref` = "#/definitions/CompilerCompatibilityConfig"
146
+ }
147
+ }
148
+ additionalProperties = false
149
+ }
150
+
151
+ restrictedGlobalDef: JsonSchema = new JsonSchema {
152
+ type = "object"
153
+ properties {
154
+ ["name"] = new JsonSchema { type = "string" }
155
+ ["message"] = new JsonSchema { type = "string" }
156
+ }
157
+ required = new Listing { "name" }
158
+ additionalProperties = false
159
+ }
160
+
161
+ restrictedMemberDef: JsonSchema = new JsonSchema {
162
+ type = "object"
163
+ properties {
164
+ ["object"] = new JsonSchema { type = "string" }
165
+ ["property"] = new JsonSchema { type = "string" }
166
+ ["message"] = new JsonSchema { type = "string" }
167
+ }
168
+ required = new Listing { "object"; "property" }
169
+ additionalProperties = false
170
+ }
171
+
172
+ noRestrictedGlobalsOptionsDef: JsonSchema = new JsonSchema {
173
+ type = "object"
174
+ properties {
175
+ ["globals"] = new JsonSchema {
176
+ type = "array"
177
+ items = new JsonSchema { `$ref` = "#/definitions/RestrictedGlobal" }
178
+ }
179
+ }
180
+ additionalProperties = false
181
+ }
182
+
183
+ noRestrictedMembersOptionsDef: JsonSchema = new JsonSchema {
184
+ type = "object"
185
+ properties {
186
+ ["members"] = new JsonSchema {
187
+ type = "array"
188
+ items = new JsonSchema { `$ref` = "#/definitions/RestrictedMember" }
189
+ }
190
+ }
191
+ additionalProperties = false
192
+ }
193
+
194
+ lintRuleOptionsDef: JsonSchema = new JsonSchema {
195
+ type = "object"
196
+ properties {
197
+ ["script/no-restricted-globals"] = new JsonSchema {
198
+ `$ref` = "#/definitions/NoRestrictedGlobalsOptions"
199
+ }
200
+ ["script/no-restricted-members"] = new JsonSchema {
201
+ `$ref` = "#/definitions/NoRestrictedMembersOptions"
202
+ }
203
+ }
204
+ additionalProperties = false
205
+ }
@@ -3,6 +3,7 @@
3
3
  /// Usage: pkl eval -f json pkl/jsonschema/generate.pkl
4
4
  module vize.jsonschema.generate
5
5
  import "@json_schema/JsonSchema.pkl"
6
+ import "ConfigArtifactDefinitions.pkl"
6
7
  local ruleSeverityEnum: JsonSchema = new JsonSchema {
7
8
  type = "string"
8
9
  enum = new Listing { "off"; "warn"; "error" }
@@ -22,81 +23,6 @@ local configExtendsDef: JsonSchema = new JsonSchema {
22
23
  stringListDef
23
24
  }
24
25
  }
25
- local compilerConfigDef: JsonSchema = new JsonSchema {
26
- type = "object"
27
- description = "Vue compiler options"
28
- properties {
29
- ["mode"] = new JsonSchema {
30
- type = "string"
31
- enum = new Listing { "module"; "function" }
32
- description = "Compilation mode"
33
- default = "module"
34
- }
35
- ["vapor"] = new JsonSchema {
36
- type = "boolean"
37
- description = "Enable Vapor mode compilation"
38
- default = false
39
- }
40
- ["jsxMode"] = new JsonSchema {
41
- type = "string"
42
- enum = new Listing { "vdom"; "vapor" }
43
- description = "Default output mode for .jsx/.tsx components without a \"use vue:*\" directive"
44
- default = "vdom"
45
- }
46
- ["ssr"] = new JsonSchema {
47
- type = "boolean"
48
- description = "Enable SSR mode"
49
- default = false
50
- }
51
- ["templateSyntax"] = new JsonSchema {
52
- type = "string"
53
- enum = new Listing { "standard"; "strict"; "quirks" }
54
- description = "Template syntax compatibility mode"
55
- default = "standard"
56
- }
57
- ["sourceMap"] = new JsonSchema {
58
- type = "boolean"
59
- description = "Enable source map generation"
60
- }
61
- ["prefixIdentifiers"] = new JsonSchema {
62
- type = "boolean"
63
- description = "Prefix template identifiers with _ctx"
64
- default = false
65
- }
66
- ["hoistStatic"] = new JsonSchema {
67
- type = "boolean"
68
- description = "Hoist static nodes"
69
- default = true
70
- }
71
- ["cacheHandlers"] = new JsonSchema {
72
- type = "boolean"
73
- description = "Cache v-on handlers"
74
- default = true
75
- }
76
- ["isTs"] = new JsonSchema {
77
- type = "boolean"
78
- description = "Enable TypeScript parsing in <script> blocks"
79
- default = true
80
- }
81
- ["scriptExt"] = new JsonSchema {
82
- type = "string"
83
- enum = new Listing { "ts"; "js" }
84
- description = "Script file extension for generated output"
85
- default = "ts"
86
- }
87
- ["runtimeModuleName"] = new JsonSchema {
88
- type = "string"
89
- description = "Module name for runtime imports"
90
- default = "vue"
91
- }
92
- ["runtimeGlobalName"] = new JsonSchema {
93
- type = "string"
94
- description = "Global variable name for runtime (IIFE builds)"
95
- default = "Vue"
96
- }
97
- }
98
- additionalProperties = false
99
- }
100
26
  local vitePluginConfigDef: JsonSchema = new JsonSchema {
101
27
  type = "object"
102
28
  properties {
@@ -145,7 +71,7 @@ local linterConfigDef: JsonSchema = new JsonSchema {
145
71
  type = lintPresetEnum.type
146
72
  enum = lintPresetEnum.enum
147
73
  description = "Built-in lint preset"
148
- default = "happy-path"
74
+ default = "ecosystem"
149
75
  }
150
76
  ["typeAware"] = new JsonSchema {
151
77
  type = "boolean"
@@ -156,6 +82,9 @@ local linterConfigDef: JsonSchema = new JsonSchema {
156
82
  description = "Rules to enable/disable"
157
83
  additionalProperties = ruleSeverityEnum
158
84
  }
85
+ ["ruleOptions"] = new JsonSchema {
86
+ `$ref` = "#/definitions/LintRuleOptions"
87
+ }
159
88
  ["categories"] = new JsonSchema {
160
89
  type = "object"
161
90
  description = "Category-level severity overrides"
@@ -221,6 +150,11 @@ local typeCheckerConfigDef: JsonSchema = new JsonSchema {
221
150
  description = "Check fallthrough attrs on multi-root templates"
222
151
  default = true
223
152
  }
153
+ ["optionsApi"] = new JsonSchema {
154
+ type = "boolean"
155
+ description = "Resolve Vue 3 Options API template bindings during type checking"
156
+ default = true
157
+ }
224
158
  ["legacyVue2"] = new JsonSchema {
225
159
  type = "boolean"
226
160
  description = "Enable Vue 2.7 / Nuxt 2 Options API template binding support"
@@ -644,8 +578,13 @@ local configEntryDef: JsonSchema = new JsonSchema {
644
578
  description = "Glob patterns this entry excludes"
645
579
  }
646
580
  ["extends"] = configExtendsDef
581
+ ["dialect"] = new JsonSchema {
582
+ type = "string"
583
+ enum = new Listing { "vue"; "petite-vue" }
584
+ description = "Vue dialect profile for standalone HTML documents; when absent the dialect is detected structurally per document"
585
+ }
647
586
  ["compiler"] = new JsonSchema { `$ref` = "#/definitions/CompilerConfig" }
648
- ["experimentals"] = new JsonSchema { type = "object" }
587
+ ["experimentals"] = ConfigArtifactDefinitions.experimentalsConfigDef
649
588
  ["vite"] = new JsonSchema { `$ref` = "#/definitions/VitePluginConfig" }
650
589
  ["linter"] = new JsonSchema { `$ref` = "#/definitions/LinterConfig" }
651
590
  ["typeChecker"] = new JsonSchema { `$ref` = "#/definitions/TypeCheckerConfig" }
@@ -665,9 +604,16 @@ output {
665
604
  description = "Configuration file for vize - High-performance Vue.js toolchain"
666
605
  type = "object"
667
606
  definitions {
668
- ["CompilerConfig"] = compilerConfigDef
607
+ ["VueVersion"] = ConfigArtifactDefinitions.vueVersionDef
608
+ ["CompilerCompatibilityConfig"] = ConfigArtifactDefinitions.compilerCompatibilityConfigDef
609
+ ["CompilerConfig"] = ConfigArtifactDefinitions.compilerConfigDef
669
610
  ["VitePluginConfig"] = vitePluginConfigDef
670
611
  ["LinterConfig"] = linterConfigDef
612
+ ["RestrictedGlobal"] = ConfigArtifactDefinitions.restrictedGlobalDef
613
+ ["RestrictedMember"] = ConfigArtifactDefinitions.restrictedMemberDef
614
+ ["NoRestrictedGlobalsOptions"] = ConfigArtifactDefinitions.noRestrictedGlobalsOptionsDef
615
+ ["NoRestrictedMembersOptions"] = ConfigArtifactDefinitions.noRestrictedMembersOptionsDef
616
+ ["LintRuleOptions"] = ConfigArtifactDefinitions.lintRuleOptionsDef
671
617
  ["TypeCheckerConfig"] = typeCheckerConfigDef
672
618
  ["FormatterConfig"] = formatterConfigDef
673
619
  ["LanguageServerConfig"] = languageServerConfigDef
@@ -704,8 +650,13 @@ output {
704
650
  description = "Glob patterns this config excludes"
705
651
  }
706
652
  ["extends"] = configExtendsDef
653
+ ["dialect"] = new JsonSchema {
654
+ type = "string"
655
+ enum = new Listing { "vue"; "petite-vue" }
656
+ description = "Vue dialect profile for standalone HTML documents; when absent the dialect is detected structurally per document"
657
+ }
707
658
  ["compiler"] = new JsonSchema { `$ref` = "#/definitions/CompilerConfig" }
708
- ["experimentals"] = new JsonSchema { type = "object" }
659
+ ["experimentals"] = ConfigArtifactDefinitions.experimentalsConfigDef
709
660
  ["vite"] = new JsonSchema { `$ref` = "#/definitions/VitePluginConfig" }
710
661
  ["linter"] = new JsonSchema { `$ref` = "#/definitions/LinterConfig" }
711
662
  ["typeChecker"] = new JsonSchema { `$ref` = "#/definitions/TypeCheckerConfig" }
package/pkl/vize.pkl CHANGED
@@ -11,6 +11,7 @@ module vize.Config
11
11
  typealias CompilerMode = "module" | "function"
12
12
  typealias TemplateSyntax = "standard" | "strict" | "quirks"
13
13
  typealias JsxMode = "vdom" | "vapor"
14
+ typealias JsxCompat = "native" | "babel"
14
15
  typealias ScriptExt = "ts" | "js"
15
16
  typealias RuleSeverity = "off" | "warn" | "error"
16
17
  typealias LintPreset = "happy-path" | "opinionated" | "essential" | "incremental" | "ecosystem" | "nuxt"
@@ -19,10 +20,20 @@ typealias FilterPattern = String | Listing<String>
19
20
  typealias GlobalTypeValue = String | GlobalTypeDeclaration
20
21
  typealias ConfigExtends = String | Listing<String>
21
22
 
23
+ class CompilerCompatibilityConfig {
24
+ vueVersion: ("3" | "2.7" | "2" | "1" | "0.11" | "0.10")? = null
25
+ hostCompiler: Boolean? = null
26
+ scriptSetupInStandalone: Boolean? = null
27
+ optionsApiVapor: Boolean? = null
28
+ nuxtVersion: Number? = null
29
+ webpackVersion: Number? = null
30
+ }
31
+
22
32
  class CompilerConfig {
23
33
  mode: CompilerMode? = null
24
34
  vapor: Boolean? = null
25
35
  jsxMode: JsxMode? = null
36
+ jsxCompat: JsxCompat? = null
26
37
  customRenderer: Boolean? = null
27
38
  ssr: Boolean? = null
28
39
  templateSyntax: TemplateSyntax? = null
@@ -34,6 +45,7 @@ class CompilerConfig {
34
45
  scriptExt: ScriptExt? = null
35
46
  runtimeModuleName: String? = null
36
47
  runtimeGlobalName: String? = null
48
+ compatibility: CompilerCompatibilityConfig?
37
49
  }
38
50
 
39
51
  class ExperimentalsConfig {
@@ -97,6 +109,7 @@ class TypeCheckerConfig {
97
109
  checkSetupContext: Boolean? = null
98
110
  checkInvalidExports: Boolean? = null
99
111
  checkFallthroughAttrs: Boolean? = null
112
+ optionsApi: Boolean? = null
100
113
  legacyVue2: Boolean? = null
101
114
  jsxTypecheck: Boolean? = null
102
115
  tsconfig: String? = null