@open-pioneer/vite-plugin-pioneer 6.0.3 → 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,12 +1,26 @@
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
+
3
17
  ## 6.0.3
4
18
 
5
19
  ### Patch Changes
6
20
 
7
21
  - 3b1f9cf: Migrate from eslint to oxlint and from prettier to oxfmt
8
22
  - Updated dependencies [3b1f9cf]
9
- - @open-pioneer/build-common@4.0.3
23
+ - @open-pioneer/build-common@4.0.3
10
24
 
11
25
  ## 6.0.2
12
26
 
@@ -16,7 +30,7 @@
16
30
  - 82b4559: Fix parsing of `qualifier` for services defined by dependencies in `node_modules`.
17
31
  - Updated dependencies [1a78924]
18
32
  - Updated dependencies [82b4559]
19
- - @open-pioneer/build-common@4.0.2
33
+ - @open-pioneer/build-common@4.0.2
20
34
 
21
35
  ## 6.0.1
22
36
 
@@ -25,7 +39,7 @@
25
39
  - 78e38e2: Bump various dependencies
26
40
  - 7d706a3: Refactor: use private javascript properties instead of typescript private keyword
27
41
  - Updated dependencies [78e38e2]
28
- - @open-pioneer/build-common@4.0.1
42
+ - @open-pioneer/build-common@4.0.1
29
43
 
30
44
  ## 6.0.0
31
45
 
@@ -37,14 +51,14 @@
37
51
 
38
52
  - 9dda91c: Support a new virtual module to get the current deployment's base URL both during development and production:
39
53
 
40
- ```ts
41
- import { baseUrl } from "open-pioneer:deployment";
54
+ ```ts
55
+ import { baseUrl } from "open-pioneer:deployment";
42
56
 
43
- // Base URL of the deployed application, for example:
44
- // - http://localhost:5173/ or http://localhost:5173/optional/path/ (during development)
45
- // - https://example.com/path/to/root/ (during production)
46
- console.log(baseUrl);
47
- ```
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
+ ```
48
62
 
49
63
  - 18c9d75: Add codegen support for hot reloading of i18n message during development.
50
64
  HMR of i18n messages requires the latest version of the runtime package.
@@ -58,7 +72,7 @@
58
72
  - Updated dependencies [9dda91c]
59
73
  - Updated dependencies [9dda91c]
60
74
  - Updated dependencies [9dda91c]
61
- - @open-pioneer/build-common@4.0.0
75
+ - @open-pioneer/build-common@4.0.0
62
76
 
63
77
  ## 5.1.2
64
78
 
@@ -66,7 +80,7 @@
66
80
 
67
81
  - 50ddcbd: Fix default package property values not being applied correctly when using a trails package from node modules.
68
82
  - Updated dependencies [50ddcbd]
69
- - @open-pioneer/build-common@3.2.2
83
+ - @open-pioneer/build-common@3.2.2
70
84
 
71
85
  ## 5.1.1
72
86
 
@@ -75,7 +89,7 @@
75
89
  - fa84b0e: Bump dependencies
76
90
  - 093ae42: Prevent detection of duplicated packages on windows
77
91
  - Updated dependencies [fa84b0e]
78
- - @open-pioneer/build-common@3.2.1
92
+ - @open-pioneer/build-common@3.2.1
79
93
 
80
94
  ## 5.1.0
81
95
 
@@ -83,27 +97,27 @@
83
97
 
84
98
  - eac3ef4: Add service modules of trails packages from `node_modules` to the modules optimized by vite's deps optimizer.
85
99
 
86
- This can reduce the number of events like this:
100
+ This can reduce the number of events like this:
87
101
 
88
- ```
89
- 5:14:21 PM [vite] (client) ✨ new dependencies optimized: <...>
90
- 5:14:21 PM [vite] (client) ✨ optimized dependencies changed. reloading
91
- ```
102
+ ```
103
+ 5:14:21 PM [vite] (client) ✨ new dependencies optimized: <...>
104
+ 5:14:21 PM [vite] (client) ✨ optimized dependencies changed. reloading
105
+ ```
92
106
 
93
107
  - 19aa36f: Implement sourceId helper which provides an easy way to obtain an id for the current source file:
94
108
 
95
- ```ts
96
- import { sourceId } from "open-pioneer:source-info";
109
+ ```ts
110
+ import { sourceId } from "open-pioneer:source-info";
97
111
 
98
- // If imported from foo/bar/baz.ts in package my-package: my-package/foo/bar/baz
99
- console.log(sourceId);
100
- ```
112
+ // If imported from foo/bar/baz.ts in package my-package: my-package/foo/bar/baz
113
+ console.log(sourceId);
114
+ ```
101
115
 
102
116
  ### Patch Changes
103
117
 
104
118
  - eac3ef4: Switch from fast-glob to tinyglobby (it has fewer dependencies).
105
119
  - Updated dependencies [19aa36f]
106
- - @open-pioneer/build-common@3.2.0
120
+ - @open-pioneer/build-common@3.2.0
107
121
 
108
122
  ## 5.0.3
109
123
 
@@ -111,7 +125,7 @@
111
125
 
112
126
  - 2c45a18: Bump dependencies
113
127
  - Updated dependencies [2c45a18]
114
- - @open-pioneer/build-common@3.1.2
128
+ - @open-pioneer/build-common@3.1.2
115
129
 
116
130
  ## 5.0.2
117
131
 
@@ -120,7 +134,7 @@
120
134
  - fe37e18: Remove obsolete eslint directive from typings.
121
135
  - f229f63: Bump dependencies
122
136
  - Updated dependencies [f229f63]
123
- - @open-pioneer/build-common@3.1.1
137
+ - @open-pioneer/build-common@3.1.1
124
138
 
125
139
  ## 5.0.1
126
140
 
@@ -129,17 +143,17 @@
129
143
  - 1b99d82: Update eslint to version 9.
130
144
  - f12e73f: Emit better errors when an application's i18n configuration does not match the supported locales of its dependencies.
131
145
 
132
- This can happen if:
146
+ This can happen if:
133
147
 
134
- - An application does not list the `i18n` option in its `build.config.mjs` at all, or if
135
- - there is no overlap between the application's locales and the locales supported by one of its dependencies.
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.
136
150
 
137
- 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:
138
152
 
139
- ```
140
- [plugin:pioneer:codegen] Invalid i18n configuration in application at <...>/src/samples/chakra-sample/chakra-app:
141
- 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).
142
- ```
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
+ ```
143
157
 
144
158
  ## 5.0.0
145
159
 
@@ -157,7 +171,7 @@
157
171
  - 6dc999e: Refactor caching of package.json, build.config.mjs and i18n files. Manual caching code was removed.
158
172
  - Updated dependencies [340c415]
159
173
  - Updated dependencies [ba600ea]
160
- - @open-pioneer/build-common@3.1.0
174
+ - @open-pioneer/build-common@3.1.0
161
175
 
162
176
  ## 4.0.2
163
177
 
@@ -165,7 +179,7 @@
165
179
 
166
180
  - 26cb9d8: Bump dependencies
167
181
  - Updated dependencies [26cb9d8]
168
- - @open-pioneer/build-common@3.0.2
182
+ - @open-pioneer/build-common@3.0.2
169
183
 
170
184
  ## 4.0.1
171
185
 
@@ -176,7 +190,7 @@
176
190
  - 67ba039: Bump dependencies
177
191
  - Updated dependencies [23c031a]
178
192
  - Updated dependencies [67ba039]
179
- - @open-pioneer/build-common@3.0.1
193
+ - @open-pioneer/build-common@3.0.1
180
194
 
181
195
  ## 4.0.0
182
196
 
@@ -193,7 +207,7 @@
193
207
 
194
208
  - Updated dependencies [798ef0b]
195
209
  - Updated dependencies [798ef0b]
196
- - @open-pioneer/build-common@3.0.0
210
+ - @open-pioneer/build-common@3.0.0
197
211
 
198
212
  ## 3.0.5
199
213
 
@@ -203,7 +217,7 @@
203
217
  - 7668cd9: Update dependencies.
204
218
  - Updated dependencies [2526935]
205
219
  - Updated dependencies [7668cd9]
206
- - @open-pioneer/build-common@2.0.5
220
+ - @open-pioneer/build-common@2.0.5
207
221
 
208
222
  ## 3.0.4
209
223
 
@@ -211,11 +225,11 @@
211
225
 
212
226
  - 1b84a49: Fix a problem that may produce dev server errors on newer versions of vite:
213
227
 
214
- ```
215
- 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
216
230
 
217
- Caused by: Cannot read properties of undefined (reading 'resolveId')
218
- ```
231
+ Caused by: Cannot read properties of undefined (reading 'resolveId')
232
+ ```
219
233
 
220
234
  ## 3.0.3
221
235
 
@@ -223,7 +237,7 @@
223
237
 
224
238
  - 3550ca8: Update dependencies
225
239
  - Updated dependencies [d9a0c1b]
226
- - @open-pioneer/build-common@2.0.4
240
+ - @open-pioneer/build-common@2.0.4
227
241
 
228
242
  ## 3.0.2
229
243
 
@@ -237,7 +251,7 @@
237
251
 
238
252
  - 017b8f3: Harmonize naming of Open Pioneer Trails in READMEs, package.json files and error messages.
239
253
  - Updated dependencies [017b8f3]
240
- - @open-pioneer/build-common@2.0.3
254
+ - @open-pioneer/build-common@2.0.3
241
255
 
242
256
  ## 3.0.0
243
257
 
@@ -252,7 +266,7 @@
252
266
  - c08520d: Update dependencies
253
267
  - Updated dependencies [c08520d]
254
268
  - Updated dependencies [c08520d]
255
- - @open-pioneer/build-common@2.0.2
269
+ - @open-pioneer/build-common@2.0.2
256
270
 
257
271
  ## 2.0.1
258
272
 
@@ -261,7 +275,7 @@
261
275
  - 9d4a9d5: Bump dependencies
262
276
  - 715b45e: Update package.json metadata
263
277
  - Updated dependencies [715b45e]
264
- - @open-pioneer/build-common@2.0.1
278
+ - @open-pioneer/build-common@2.0.1
265
279
 
266
280
  ## 2.0.0
267
281
 
@@ -271,17 +285,17 @@
271
285
  - c15512c: **Breaking Change:** A trails package's `devDependencies` are no longer included in the build (fixes #43).
272
286
  For normal dependencies, service classes are automatically picked up and compiled into the application.
273
287
 
274
- This behavior is surprising for `devDependencies`: license scanners and cve scanner sometimes chose to exclude
275
- `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).
276
290
 
277
- 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.
278
292
 
279
293
  ### Patch Changes
280
294
 
281
295
  - 5601a5e: Bump dependencies
282
296
  - Updated dependencies [5601a5e]
283
297
  - Updated dependencies [5601a5e]
284
- - @open-pioneer/build-common@2.0.0
298
+ - @open-pioneer/build-common@2.0.0
285
299
 
286
300
  ## 1.1.2
287
301
 
@@ -306,29 +320,29 @@
306
320
  - 99354bf: Improve error message when two versions of the same Trails package are encountered.
307
321
  Only a single version per Trails package per app is supported: all packages must share the same version and location on disk.
308
322
 
309
- 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:
310
324
 
311
- ```text
312
- [plugin:pioneer:codegen] Encountered the package '@open-pioneer/runtime' at two different locations.
313
- Trails packages cannot be used more than once in the same application.
314
- 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'.
315
329
 
316
- 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
317
331
 
318
- 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
319
- ```
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
+ ```
320
334
 
321
335
  - 146743d: Bump dependencies
322
336
  - Updated dependencies [3a0fb62]
323
337
  - Updated dependencies [146743d]
324
- - @open-pioneer/build-common@1.0.2
338
+ - @open-pioneer/build-common@1.0.2
325
339
 
326
340
  ## 1.0.2
327
341
 
328
342
  ### Patch Changes
329
343
 
330
344
  - Updated dependencies [1a8c745]
331
- - @open-pioneer/build-common@1.0.1
345
+ - @open-pioneer/build-common@1.0.1
332
346
 
333
347
  ## 1.0.1
334
348
 
@@ -345,7 +359,7 @@
345
359
  ### Patch Changes
346
360
 
347
361
  - Updated dependencies [991be0f]
348
- - @open-pioneer/build-common@1.0.0
362
+ - @open-pioneer/build-common@1.0.0
349
363
 
350
364
  ## 0.8.7
351
365
 
@@ -353,7 +367,7 @@
353
367
 
354
368
  - f0cd283: Add package.json metadata
355
369
  - Updated dependencies [f0cd283]
356
- - @open-pioneer/build-common@0.6.1
370
+ - @open-pioneer/build-common@0.6.1
357
371
 
358
372
  ## 0.8.6
359
373
 
@@ -361,9 +375,9 @@
361
375
 
362
376
  - cf32df5: Add another workaround that unfortunately currently requires pnpm's `shamefully-hoist` option.
363
377
 
364
- [`shamefully-hoist`](https://pnpm.io/npmrc#shamefully-hoist) allows the application to 'see' all other installed node packages.
365
- This is usually a bad practice but we currently require it for the virtual module that imports all Open Pioneer Trails services.
366
- 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.
367
381
 
368
382
  ## 0.8.5
369
383
 
@@ -385,7 +399,7 @@
385
399
  - e6bbbfb: Simplify license comment in README
386
400
  - Updated dependencies [b6f55fe]
387
401
  - Updated dependencies [e6bbbfb]
388
- - @open-pioneer/build-common@0.6.0
402
+ - @open-pioneer/build-common@0.6.0
389
403
 
390
404
  ## 0.8.2
391
405
 
@@ -393,7 +407,7 @@
393
407
 
394
408
  - fdb5347: Use unresolved module ids for generated code.
395
409
  - Updated dependencies [fdb5347]
396
- - @open-pioneer/build-common@0.5.1
410
+ - @open-pioneer/build-common@0.5.1
397
411
 
398
412
  ## 0.8.1
399
413
 
@@ -401,7 +415,7 @@
401
415
 
402
416
  - 9f82090: Use react hooks code generation from @open-pioneer/build-common
403
417
  - Updated dependencies [9f82090]
404
- - @open-pioneer/build-common@0.5.0
418
+ - @open-pioneer/build-common@0.5.0
405
419
 
406
420
  ## 0.8.0
407
421
 
@@ -416,7 +430,7 @@
416
430
  - 38c8ee0: Don't re-emit warnings when a cached metadata entry is returned.
417
431
  - Updated dependencies [348afd8]
418
432
  - Updated dependencies [aeb702c]
419
- - @open-pioneer/build-common@0.4.0
433
+ - @open-pioneer/build-common@0.4.0
420
434
 
421
435
  ## 0.7.0
422
436
 
@@ -430,7 +444,7 @@
430
444
 
431
445
  - 0692aa2: Revert back to commonjs
432
446
  - Updated dependencies [0692aa2]
433
- - @open-pioneer/build-common@0.3.1
447
+ - @open-pioneer/build-common@0.3.1
434
448
 
435
449
  ## 0.6.0
436
450
 
@@ -444,7 +458,7 @@
444
458
  - Updated dependencies [393b294]
445
459
  - Updated dependencies [454ea2b]
446
460
  - Updated dependencies [39855ce]
447
- - @open-pioneer/build-common@0.3.0
461
+ - @open-pioneer/build-common@0.3.0
448
462
 
449
463
  ## 0.5.3
450
464
 
@@ -454,7 +468,7 @@
454
468
  - Updated dependencies [ef54f35]
455
469
  - Updated dependencies [125fd57]
456
470
  - Updated dependencies [37413f4]
457
- - @open-pioneer/build-common@0.2.0
471
+ - @open-pioneer/build-common@0.2.0
458
472
 
459
473
  ## 0.5.2
460
474
 
@@ -463,7 +477,7 @@
463
477
  - 434cc23: Migrate all tests to vitest.
464
478
  - 41399fa: Use new shared package to validate build.config.mjs
465
479
  - Updated dependencies [41399fa]
466
- - @open-pioneer/build-common@0.1.0
480
+ - @open-pioneer/build-common@0.1.0
467
481
 
468
482
  ## 0.5.1
469
483
 
@@ -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 };