@open-pioneer/vite-plugin-pioneer 6.0.2 → 7.0.0-dev.20260729122223

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog @open-pioneer/vite-plugin-pioneer
2
2
 
3
+ ## 7.0.0-dev.20260729122223
4
+
5
+ ### Major Changes
6
+
7
+ - 8e38b33: Switch this package from legacy `main` / `types` fields to the modern `exports` field in `package.json`
8
+
9
+ ### Patch Changes
10
+
11
+ - 8e38b33: Change build setup: now uses tsdown instead of esbuild.
12
+ - Updated dependencies [8e38b33]
13
+ - Updated dependencies [8e38b33]
14
+ - Updated dependencies [8e38b33]
15
+ - @open-pioneer/build-common@5.0.0-dev.20260729122223
16
+
17
+ ## 6.0.3
18
+
19
+ ### Patch Changes
20
+
21
+ - 3b1f9cf: Migrate from eslint to oxlint and from prettier to oxfmt
22
+ - Updated dependencies [3b1f9cf]
23
+ - @open-pioneer/build-common@4.0.3
24
+
3
25
  ## 6.0.2
4
26
 
5
27
  ### Patch Changes
@@ -8,7 +30,7 @@
8
30
  - 82b4559: Fix parsing of `qualifier` for services defined by dependencies in `node_modules`.
9
31
  - Updated dependencies [1a78924]
10
32
  - Updated dependencies [82b4559]
11
- - @open-pioneer/build-common@4.0.2
33
+ - @open-pioneer/build-common@4.0.2
12
34
 
13
35
  ## 6.0.1
14
36
 
@@ -17,7 +39,7 @@
17
39
  - 78e38e2: Bump various dependencies
18
40
  - 7d706a3: Refactor: use private javascript properties instead of typescript private keyword
19
41
  - Updated dependencies [78e38e2]
20
- - @open-pioneer/build-common@4.0.1
42
+ - @open-pioneer/build-common@4.0.1
21
43
 
22
44
  ## 6.0.0
23
45
 
@@ -29,14 +51,14 @@
29
51
 
30
52
  - 9dda91c: Support a new virtual module to get the current deployment's base URL both during development and production:
31
53
 
32
- ```ts
33
- import { baseUrl } from "open-pioneer:deployment";
54
+ ```ts
55
+ import { baseUrl } from "open-pioneer:deployment";
34
56
 
35
- // Base URL of the deployed application, for example:
36
- // - http://localhost:5173/ or http://localhost:5173/optional/path/ (during development)
37
- // - https://example.com/path/to/root/ (during production)
38
- console.log(baseUrl);
39
- ```
57
+ // Base URL of the deployed application, for example:
58
+ // - http://localhost:5173/ or http://localhost:5173/optional/path/ (during development)
59
+ // - https://example.com/path/to/root/ (during production)
60
+ console.log(baseUrl);
61
+ ```
40
62
 
41
63
  - 18c9d75: Add codegen support for hot reloading of i18n message during development.
42
64
  HMR of i18n messages requires the latest version of the runtime package.
@@ -50,7 +72,7 @@
50
72
  - Updated dependencies [9dda91c]
51
73
  - Updated dependencies [9dda91c]
52
74
  - Updated dependencies [9dda91c]
53
- - @open-pioneer/build-common@4.0.0
75
+ - @open-pioneer/build-common@4.0.0
54
76
 
55
77
  ## 5.1.2
56
78
 
@@ -58,7 +80,7 @@
58
80
 
59
81
  - 50ddcbd: Fix default package property values not being applied correctly when using a trails package from node modules.
60
82
  - Updated dependencies [50ddcbd]
61
- - @open-pioneer/build-common@3.2.2
83
+ - @open-pioneer/build-common@3.2.2
62
84
 
63
85
  ## 5.1.1
64
86
 
@@ -67,7 +89,7 @@
67
89
  - fa84b0e: Bump dependencies
68
90
  - 093ae42: Prevent detection of duplicated packages on windows
69
91
  - Updated dependencies [fa84b0e]
70
- - @open-pioneer/build-common@3.2.1
92
+ - @open-pioneer/build-common@3.2.1
71
93
 
72
94
  ## 5.1.0
73
95
 
@@ -75,27 +97,27 @@
75
97
 
76
98
  - eac3ef4: Add service modules of trails packages from `node_modules` to the modules optimized by vite's deps optimizer.
77
99
 
78
- This can reduce the number of events like this:
100
+ This can reduce the number of events like this:
79
101
 
80
- ```
81
- 5:14:21 PM [vite] (client) ✨ new dependencies optimized: <...>
82
- 5:14:21 PM [vite] (client) ✨ optimized dependencies changed. reloading
83
- ```
102
+ ```
103
+ 5:14:21 PM [vite] (client) ✨ new dependencies optimized: <...>
104
+ 5:14:21 PM [vite] (client) ✨ optimized dependencies changed. reloading
105
+ ```
84
106
 
85
107
  - 19aa36f: Implement sourceId helper which provides an easy way to obtain an id for the current source file:
86
108
 
87
- ```ts
88
- import { sourceId } from "open-pioneer:source-info";
109
+ ```ts
110
+ import { sourceId } from "open-pioneer:source-info";
89
111
 
90
- // If imported from foo/bar/baz.ts in package my-package: my-package/foo/bar/baz
91
- console.log(sourceId);
92
- ```
112
+ // If imported from foo/bar/baz.ts in package my-package: my-package/foo/bar/baz
113
+ console.log(sourceId);
114
+ ```
93
115
 
94
116
  ### Patch Changes
95
117
 
96
118
  - eac3ef4: Switch from fast-glob to tinyglobby (it has fewer dependencies).
97
119
  - Updated dependencies [19aa36f]
98
- - @open-pioneer/build-common@3.2.0
120
+ - @open-pioneer/build-common@3.2.0
99
121
 
100
122
  ## 5.0.3
101
123
 
@@ -103,7 +125,7 @@
103
125
 
104
126
  - 2c45a18: Bump dependencies
105
127
  - Updated dependencies [2c45a18]
106
- - @open-pioneer/build-common@3.1.2
128
+ - @open-pioneer/build-common@3.1.2
107
129
 
108
130
  ## 5.0.2
109
131
 
@@ -112,7 +134,7 @@
112
134
  - fe37e18: Remove obsolete eslint directive from typings.
113
135
  - f229f63: Bump dependencies
114
136
  - Updated dependencies [f229f63]
115
- - @open-pioneer/build-common@3.1.1
137
+ - @open-pioneer/build-common@3.1.1
116
138
 
117
139
  ## 5.0.1
118
140
 
@@ -121,16 +143,17 @@
121
143
  - 1b99d82: Update eslint to version 9.
122
144
  - f12e73f: Emit better errors when an application's i18n configuration does not match the supported locales of its dependencies.
123
145
 
124
- This can happen if:
125
- - An application does not list the `i18n` option in its `build.config.mjs` at all, or if
126
- - there is no overlap between the application's locales and the locales supported by one of its dependencies.
146
+ This can happen if:
147
+
148
+ - An application does not list the `i18n` option in its `build.config.mjs` at all, or if
149
+ - there is no overlap between the application's locales and the locales supported by one of its dependencies.
127
150
 
128
- The vite plugin will now throw errors such as this to make it easier to detect the issue:
151
+ The vite plugin will now throw errors such as this to make it easier to detect the issue:
129
152
 
130
- ```
131
- [plugin:pioneer:codegen] Invalid i18n configuration in application at <...>/src/samples/chakra-sample/chakra-app:
132
- There is no match between the locales supported by the application (none) and the locales supported by the packages '@open-pioneer/chakra-snippets' (de, en).
133
- ```
153
+ ```
154
+ [plugin:pioneer:codegen] Invalid i18n configuration in application at <...>/src/samples/chakra-sample/chakra-app:
155
+ There is no match between the locales supported by the application (none) and the locales supported by the packages '@open-pioneer/chakra-snippets' (de, en).
156
+ ```
134
157
 
135
158
  ## 5.0.0
136
159
 
@@ -148,7 +171,7 @@
148
171
  - 6dc999e: Refactor caching of package.json, build.config.mjs and i18n files. Manual caching code was removed.
149
172
  - Updated dependencies [340c415]
150
173
  - Updated dependencies [ba600ea]
151
- - @open-pioneer/build-common@3.1.0
174
+ - @open-pioneer/build-common@3.1.0
152
175
 
153
176
  ## 4.0.2
154
177
 
@@ -156,7 +179,7 @@
156
179
 
157
180
  - 26cb9d8: Bump dependencies
158
181
  - Updated dependencies [26cb9d8]
159
- - @open-pioneer/build-common@3.0.2
182
+ - @open-pioneer/build-common@3.0.2
160
183
 
161
184
  ## 4.0.1
162
185
 
@@ -167,7 +190,7 @@
167
190
  - 67ba039: Bump dependencies
168
191
  - Updated dependencies [23c031a]
169
192
  - Updated dependencies [67ba039]
170
- - @open-pioneer/build-common@3.0.1
193
+ - @open-pioneer/build-common@3.0.1
171
194
 
172
195
  ## 4.0.0
173
196
 
@@ -184,7 +207,7 @@
184
207
 
185
208
  - Updated dependencies [798ef0b]
186
209
  - Updated dependencies [798ef0b]
187
- - @open-pioneer/build-common@3.0.0
210
+ - @open-pioneer/build-common@3.0.0
188
211
 
189
212
  ## 3.0.5
190
213
 
@@ -194,7 +217,7 @@
194
217
  - 7668cd9: Update dependencies.
195
218
  - Updated dependencies [2526935]
196
219
  - Updated dependencies [7668cd9]
197
- - @open-pioneer/build-common@2.0.5
220
+ - @open-pioneer/build-common@2.0.5
198
221
 
199
222
  ## 3.0.4
200
223
 
@@ -202,11 +225,11 @@
202
225
 
203
226
  - 1b84a49: Fix a problem that may produce dev server errors on newer versions of vite:
204
227
 
205
- ```
206
- 11:11:21 AM [vite] Internal server error: Failed to resolve services entry point for package $DIR/src/samples/showcase/showcase-app
228
+ ```
229
+ 11:11:21 AM [vite] Internal server error: Failed to resolve services entry point for package $DIR/src/samples/showcase/showcase-app
207
230
 
208
- Caused by: Cannot read properties of undefined (reading 'resolveId')
209
- ```
231
+ Caused by: Cannot read properties of undefined (reading 'resolveId')
232
+ ```
210
233
 
211
234
  ## 3.0.3
212
235
 
@@ -214,7 +237,7 @@
214
237
 
215
238
  - 3550ca8: Update dependencies
216
239
  - Updated dependencies [d9a0c1b]
217
- - @open-pioneer/build-common@2.0.4
240
+ - @open-pioneer/build-common@2.0.4
218
241
 
219
242
  ## 3.0.2
220
243
 
@@ -228,7 +251,7 @@
228
251
 
229
252
  - 017b8f3: Harmonize naming of Open Pioneer Trails in READMEs, package.json files and error messages.
230
253
  - Updated dependencies [017b8f3]
231
- - @open-pioneer/build-common@2.0.3
254
+ - @open-pioneer/build-common@2.0.3
232
255
 
233
256
  ## 3.0.0
234
257
 
@@ -243,7 +266,7 @@
243
266
  - c08520d: Update dependencies
244
267
  - Updated dependencies [c08520d]
245
268
  - Updated dependencies [c08520d]
246
- - @open-pioneer/build-common@2.0.2
269
+ - @open-pioneer/build-common@2.0.2
247
270
 
248
271
  ## 2.0.1
249
272
 
@@ -252,7 +275,7 @@
252
275
  - 9d4a9d5: Bump dependencies
253
276
  - 715b45e: Update package.json metadata
254
277
  - Updated dependencies [715b45e]
255
- - @open-pioneer/build-common@2.0.1
278
+ - @open-pioneer/build-common@2.0.1
256
279
 
257
280
  ## 2.0.0
258
281
 
@@ -262,17 +285,17 @@
262
285
  - c15512c: **Breaking Change:** A trails package's `devDependencies` are no longer included in the build (fixes #43).
263
286
  For normal dependencies, service classes are automatically picked up and compiled into the application.
264
287
 
265
- This behavior is surprising for `devDependencies`: license scanners and cve scanner sometimes chose to exclude
266
- `devDependencies`; which would have been invalid prior to this change (as the code was compiled in anyway).
288
+ This behavior is surprising for `devDependencies`: license scanners and cve scanner sometimes chose to exclude
289
+ `devDependencies`; which would have been invalid prior to this change (as the code was compiled in anyway).
267
290
 
268
- If your package depends on another trails package at runtime, configure an entry in `peerDependencies` instead.
291
+ If your package depends on another trails package at runtime, configure an entry in `peerDependencies` instead.
269
292
 
270
293
  ### Patch Changes
271
294
 
272
295
  - 5601a5e: Bump dependencies
273
296
  - Updated dependencies [5601a5e]
274
297
  - Updated dependencies [5601a5e]
275
- - @open-pioneer/build-common@2.0.0
298
+ - @open-pioneer/build-common@2.0.0
276
299
 
277
300
  ## 1.1.2
278
301
 
@@ -297,29 +320,29 @@
297
320
  - 99354bf: Improve error message when two versions of the same Trails package are encountered.
298
321
  Only a single version per Trails package per app is supported: all packages must share the same version and location on disk.
299
322
 
300
- The vite overlay in the browser now shows a comprehensible error message such as this:
323
+ The vite overlay in the browser now shows a comprehensible error message such as this:
301
324
 
302
- ```text
303
- [plugin:pioneer:codegen] Encountered the package '@open-pioneer/runtime' at two different locations.
304
- Trails packages cannot be used more than once in the same application.
305
- All packages must use a common version of '@open-pioneer/runtime'.
325
+ ```text
326
+ [plugin:pioneer:codegen] Encountered the package '@open-pioneer/runtime' at two different locations.
327
+ Trails packages cannot be used more than once in the same application.
328
+ All packages must use a common version of '@open-pioneer/runtime'.
306
329
 
307
- 1. @open-pioneer/runtime@1.0.0 at $HOME/projects/pioneer/starter/node_modules/.pnpm/@open-pioneer+runtime@1.0.0_@formatjs+intl@2.9.0_@open-pioneer+chakra-integration@1.0.0_@open_4cza3noe47gq2v2rsqn2cypo4q/node_modules/@open-pioneer/runtime
330
+ 1. @open-pioneer/runtime@1.0.0 at $HOME/projects/pioneer/starter/node_modules/.pnpm/@open-pioneer+runtime@1.0.0_@formatjs+intl@2.9.0_@open-pioneer+chakra-integration@1.0.0_@open_4cza3noe47gq2v2rsqn2cypo4q/node_modules/@open-pioneer/runtime
308
331
 
309
- 2. @open-pioneer/runtime@0.1.5 at $HOME/projects/pioneer/starter/node_modules/.pnpm/@open-pioneer+runtime@0.1.5_@formatjs+intl@2.9.0_@open-pioneer+chakra-integration@0.1.4_@open_m544g2vyxvedm3ipuqpqhltgfy/node_modules/@open-pioneer/runtime
310
- ```
332
+ 2. @open-pioneer/runtime@0.1.5 at $HOME/projects/pioneer/starter/node_modules/.pnpm/@open-pioneer+runtime@0.1.5_@formatjs+intl@2.9.0_@open-pioneer+chakra-integration@0.1.4_@open_m544g2vyxvedm3ipuqpqhltgfy/node_modules/@open-pioneer/runtime
333
+ ```
311
334
 
312
335
  - 146743d: Bump dependencies
313
336
  - Updated dependencies [3a0fb62]
314
337
  - Updated dependencies [146743d]
315
- - @open-pioneer/build-common@1.0.2
338
+ - @open-pioneer/build-common@1.0.2
316
339
 
317
340
  ## 1.0.2
318
341
 
319
342
  ### Patch Changes
320
343
 
321
344
  - Updated dependencies [1a8c745]
322
- - @open-pioneer/build-common@1.0.1
345
+ - @open-pioneer/build-common@1.0.1
323
346
 
324
347
  ## 1.0.1
325
348
 
@@ -336,7 +359,7 @@
336
359
  ### Patch Changes
337
360
 
338
361
  - Updated dependencies [991be0f]
339
- - @open-pioneer/build-common@1.0.0
362
+ - @open-pioneer/build-common@1.0.0
340
363
 
341
364
  ## 0.8.7
342
365
 
@@ -344,7 +367,7 @@
344
367
 
345
368
  - f0cd283: Add package.json metadata
346
369
  - Updated dependencies [f0cd283]
347
- - @open-pioneer/build-common@0.6.1
370
+ - @open-pioneer/build-common@0.6.1
348
371
 
349
372
  ## 0.8.6
350
373
 
@@ -352,9 +375,9 @@
352
375
 
353
376
  - cf32df5: Add another workaround that unfortunately currently requires pnpm's `shamefully-hoist` option.
354
377
 
355
- [`shamefully-hoist`](https://pnpm.io/npmrc#shamefully-hoist) allows the application to 'see' all other installed node packages.
356
- This is usually a bad practice but we currently require it for the virtual module that imports all Open Pioneer Trails services.
357
- For more details see the linked commit.
378
+ [`shamefully-hoist`](https://pnpm.io/npmrc#shamefully-hoist) allows the application to 'see' all other installed node packages.
379
+ This is usually a bad practice but we currently require it for the virtual module that imports all Open Pioneer Trails services.
380
+ For more details see the linked commit.
358
381
 
359
382
  ## 0.8.5
360
383
 
@@ -376,7 +399,7 @@
376
399
  - e6bbbfb: Simplify license comment in README
377
400
  - Updated dependencies [b6f55fe]
378
401
  - Updated dependencies [e6bbbfb]
379
- - @open-pioneer/build-common@0.6.0
402
+ - @open-pioneer/build-common@0.6.0
380
403
 
381
404
  ## 0.8.2
382
405
 
@@ -384,7 +407,7 @@
384
407
 
385
408
  - fdb5347: Use unresolved module ids for generated code.
386
409
  - Updated dependencies [fdb5347]
387
- - @open-pioneer/build-common@0.5.1
410
+ - @open-pioneer/build-common@0.5.1
388
411
 
389
412
  ## 0.8.1
390
413
 
@@ -392,7 +415,7 @@
392
415
 
393
416
  - 9f82090: Use react hooks code generation from @open-pioneer/build-common
394
417
  - Updated dependencies [9f82090]
395
- - @open-pioneer/build-common@0.5.0
418
+ - @open-pioneer/build-common@0.5.0
396
419
 
397
420
  ## 0.8.0
398
421
 
@@ -407,7 +430,7 @@
407
430
  - 38c8ee0: Don't re-emit warnings when a cached metadata entry is returned.
408
431
  - Updated dependencies [348afd8]
409
432
  - Updated dependencies [aeb702c]
410
- - @open-pioneer/build-common@0.4.0
433
+ - @open-pioneer/build-common@0.4.0
411
434
 
412
435
  ## 0.7.0
413
436
 
@@ -421,7 +444,7 @@
421
444
 
422
445
  - 0692aa2: Revert back to commonjs
423
446
  - Updated dependencies [0692aa2]
424
- - @open-pioneer/build-common@0.3.1
447
+ - @open-pioneer/build-common@0.3.1
425
448
 
426
449
  ## 0.6.0
427
450
 
@@ -435,7 +458,7 @@
435
458
  - Updated dependencies [393b294]
436
459
  - Updated dependencies [454ea2b]
437
460
  - Updated dependencies [39855ce]
438
- - @open-pioneer/build-common@0.3.0
461
+ - @open-pioneer/build-common@0.3.0
439
462
 
440
463
  ## 0.5.3
441
464
 
@@ -445,7 +468,7 @@
445
468
  - Updated dependencies [ef54f35]
446
469
  - Updated dependencies [125fd57]
447
470
  - Updated dependencies [37413f4]
448
- - @open-pioneer/build-common@0.2.0
471
+ - @open-pioneer/build-common@0.2.0
449
472
 
450
473
  ## 0.5.2
451
474
 
@@ -454,7 +477,7 @@
454
477
  - 434cc23: Migrate all tests to vitest.
455
478
  - 41399fa: Use new shared package to validate build.config.mjs
456
479
  - Updated dependencies [41399fa]
457
- - @open-pioneer/build-common@0.1.0
480
+ - @open-pioneer/build-common@0.1.0
458
481
 
459
482
  ## 0.5.1
460
483
 
package/client.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  // SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)
2
2
  // SPDX-License-Identifier: Apache-2.0
3
+
3
4
  declare module "open-pioneer:app" {
4
5
  import { type ApplicationMetadata } from "@open-pioneer/runtime/metadata";
5
6
 
@@ -0,0 +1,69 @@
1
+ import { Plugin } from "vite";
2
+ //#region src/types.d.ts
3
+ interface PioneerPluginOptions {
4
+ /**
5
+ * Whether to include the root `index.html` site (by default at `src/index.html`) in the build.
6
+ *
7
+ * The file is always available when using the development server, but may be excluded when
8
+ * when deploying the project as it often contains content for testing.
9
+ *
10
+ * @default false
11
+ */
12
+ rootSite?: boolean;
13
+ /**
14
+ * List of sites to include in the build.
15
+ *
16
+ * Sites are located at `src/<SITE>/index.html` by default.
17
+ * Note that `<SITE>` may contain nested directory paths.
18
+ *
19
+ * @default []
20
+ */
21
+ sites?: string[] | undefined | false;
22
+ /**
23
+ * List of apps to include in the build.
24
+ * Apps typically register a custom web component.
25
+ *
26
+ * Apps are located at `src/apps/<APP_NAME>/app.<EXT>` by default.
27
+ * When an app is included in the build, the `dist` directory will
28
+ * contain an `<APP_NAME>.js` that can be directly imported from the browser.
29
+ *
30
+ * You can also use custom app locations instead of placing your apps in the `apps` directory,
31
+ * see examples below.
32
+ *
33
+ * Multiple extensions are supported for the app's main entry point: .ts, .tsx, .js and .jsx.
34
+ *
35
+ * @example
36
+ * Distribute the app at `src/apps/my-app/app.ts` as `my-app.js`:
37
+ *
38
+ * ```js
39
+ * {
40
+ * apps: ["my-app"]
41
+ * }
42
+ * ```
43
+ *
44
+ * Distribute the app at `src/custom/location/app.js` as `output-app.js`:
45
+ *
46
+ * ```js
47
+ * {
48
+ * apps: {
49
+ * "output-app": "custom/location/app.js"
50
+ * }
51
+ * }
52
+ * ```
53
+ *
54
+ * @default []
55
+ */
56
+ apps?: string[] | AdvancedAppOptions | undefined | false;
57
+ }
58
+ interface AdvancedAppOptions {
59
+ /**
60
+ * Associates an app name (the name of the .js file in the output directory)
61
+ * with the location of the app source code (a file name relative to the source directory).
62
+ */
63
+ [appName: string]: string;
64
+ }
65
+ //#endregion
66
+ //#region src/index.d.ts
67
+ declare function pioneer(options?: PioneerPluginOptions): Plugin[];
68
+ //#endregion
69
+ export { type AdvancedAppOptions, type PioneerPluginOptions, pioneer };