@public-ui/kolibri-cli 4.0.0-alpha.1 → 4.0.0-alpha.10
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/README.md +216 -64
- package/dist/info/index.js +2 -2
- package/dist/migrate/index.js +1 -1
- package/dist/migrate/runner/tasks/common/GenericUpdatePropertyValueTask.js +0 -8
- package/dist/migrate/runner/tasks/common/HandleDependencyTask.js +1 -1
- package/dist/migrate/runner/tasks/v1/button.js +1 -1
- package/dist/migrate/runner/tasks/v1/index.js +2 -2
- package/dist/migrate/runner/tasks/v1/input-email.js +1 -1
- package/dist/migrate/runner/tasks/v1/input-number.js +1 -1
- package/dist/migrate/runner/tasks/v1/input-password.js +1 -1
- package/dist/migrate/runner/tasks/v1/input-text.js +1 -1
- package/dist/migrate/runner/tasks/v1/link.js +1 -1
- package/dist/migrate/runner/tasks/v1/select.js +1 -1
- package/dist/migrate/runner/tasks/v3/all-input.js +1 -1
- package/dist/migrate/runner/tasks/v3/index.js +3 -3
- package/dist/migrate/runner/tasks/v3/toaster.js +1 -1
- package/dist/migrate/runner/tasks/v4/index.js +4 -0
- package/dist/migrate/runner/tasks/v4/link.js +66 -0
- package/dist/migrate/runner/tasks/v4/loader.js +36 -0
- package/dist/migrate/shares/reuse.js +4 -1
- package/package.json +14 -15
package/README.md
CHANGED
|
@@ -27,6 +27,14 @@ yarn add -g @public-ui/kolibri-cli
|
|
|
27
27
|
|
|
28
28
|
> **Important:** Install exactly the CLI version you want to upgrade to. The migration tool compares your locally installed `@public-ui/components` version with the CLI version to decide which migration tasks must run and in which order.
|
|
29
29
|
|
|
30
|
+
## Quickstart (Happy Path)
|
|
31
|
+
|
|
32
|
+
1. Install the CLI version that matches your target `@public-ui/components` release (see above).
|
|
33
|
+
2. Run the migration in your project root: `kolibri migrate .`.
|
|
34
|
+
3. Review the changes: `git status` and `git diff`.
|
|
35
|
+
4. Format updated files: `pnpm format`.
|
|
36
|
+
5. Commit the result and continue development.
|
|
37
|
+
|
|
30
38
|
## Usage
|
|
31
39
|
|
|
32
40
|
The `KoliBri` CLI is intended to be executed in your project root directory. Use the `kolibri` command to start the CLI.
|
|
@@ -69,27 +77,94 @@ If errors occur in our packages, we would like to ask you to create an issue und
|
|
|
69
77
|
|
|
70
78
|
With the `migrate` command you can migrate your project to the latest version of `KoliBri`.
|
|
71
79
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
- `.vscode/settings.json`
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
80
|
+
> **Hint:** The migration tool currently supports React projects (JSX/TSX), Vue single-file components, and HTML/XHTML template-based projects such as Angular applications or vanilla custom elements. Support for additional project types is planned.
|
|
81
|
+
|
|
82
|
+
The migration runner registers tasks in the following order and executes only those whose semantic version ranges match your
|
|
83
|
+
project: common tasks (`*`), v1 tasks (`^1`), v2 tasks (`^2` / `>=2.1.7 <3`), v3 tasks (`>=2 <4`), v4 tasks (`^4`) and
|
|
84
|
+
asset-related tasks (`^1`). All tasks are enabled by default. If you need to disable a noisy task or explicitly re-enable a
|
|
85
|
+
previously deactivated one for better migratability, set the corresponding flag in `.kolibri.config.json` under
|
|
86
|
+
`migrate.tasks` to `false` or `true`.
|
|
87
|
+
|
|
88
|
+
#### Migration tasks and version ranges
|
|
89
|
+
|
|
90
|
+
- **Common tasks (`*`)**
|
|
91
|
+
- Add `.kolibri.migrate.json` to `.gitignore`.
|
|
92
|
+
- Add `save-exact=true` to `.npmrc`.
|
|
93
|
+
- Configure `html.customData` in `.vscode/settings.json` to point to `@public-ui/components/vscode-custom-data.json`.
|
|
94
|
+
- **Version 1 tasks (`^1`, unless noted)**
|
|
95
|
+
- `kol-abbr`: rename `_align` → `_tooltip-align`; rename `_title` → `_label`.
|
|
96
|
+
- `kol-accordion`: rename `_heading` → `_label`; mark removed slot `header`; rename slot `content` to the default slot.
|
|
97
|
+
- `kol-alert`: rename `_heading` → `_label`.
|
|
98
|
+
- `kol-badge`: remove `_icon-only`; rename `_icon-only` → `_hide-label`; remove `_hide-label`; rename `_icon` → `_icons`.
|
|
99
|
+
- `kol-breadcrumb`: rename `_aria-label` → `_label`.
|
|
100
|
+
- `kol-button`: remove `_aria-current`; remove `_aria-label`; rename `_icon-only` → `_hide-label`; rename `_icon` → `_icons`;
|
|
101
|
+
refactor `_icon-align` into `_icons` (**`^2`**).
|
|
102
|
+
- `kol-button-link`: remove `_aria-current`; remove `_aria-label`; rename `_icon-only` → `_hide-label`; rename `_icon` →
|
|
103
|
+
`_icons`.
|
|
104
|
+
- `kol-card`: rename `_heading` → `_label`; rename `_headline` → `_label`; mark removed slots `footer` and `header`; rename
|
|
105
|
+
slot `content` to the default slot.
|
|
106
|
+
- `kol-details`: rename `_summary` → `_label`.
|
|
107
|
+
- `kol-icon`: rename `_aria-label` → `_label`; remove `_part`; rename `_icon` → `_icons`.
|
|
108
|
+
- `kol-input`: rename `_icon` → `_icons`.
|
|
109
|
+
- `kol-input-checkbox`: rename `_type` → `_variant`; rename `_icon` → `_icons`.
|
|
110
|
+
- `kol-input-color`: rename `_list` → `_suggestions`; rename `_icon` → `_icons`.
|
|
111
|
+
- `kol-input-date` / `kol-date`: rename `_list` → `_suggestions`; rename `_icon` → `_icons`.
|
|
112
|
+
- `kol-input-email`: rename `_list` → `_suggestions`; rename `_icon` → `_icons`; remove `_size`.
|
|
113
|
+
- `kol-input-file`: rename `_icon` → `_icons`.
|
|
114
|
+
- `kol-input-number`: rename `_list` → `_suggestions`; rename `_icon` → `_icons`; remove `_type`.
|
|
115
|
+
- `kol-input-password`: rename `_icon` → `_icons`; remove `_size`.
|
|
116
|
+
- `kol-input-radio`: rename `_list` → `_options`.
|
|
117
|
+
- `kol-input-range`: rename `_list` → `_suggestions`; rename `_icon` → `_icons`.
|
|
118
|
+
- `kol-input-text`: rename `_list` → `_suggestions`; rename `_icon` → `_icons`; remove `_size`.
|
|
119
|
+
- `kol-link`: remove `_aria-controls`, `_aria-expanded`, `_aria-label`, `_aria-selected`, `_disabled`, `_selector`, `_stealth`,
|
|
120
|
+
`_use-case`; rename `_aria-current` → `_listen-aria-current`; rename `_icon-only` → `_hide-label`; rename `_icon` → `_icons`;
|
|
121
|
+
refactor `_icon-align` (**`^2`**).
|
|
122
|
+
- `kol-link-button`: remove `_aria-controls`, `_aria-expanded`, `_aria-label`, `_aria-selected`, `_disabled`; rename
|
|
123
|
+
`_aria-current` → `_listen-aria-current`; rename `_icon-only` → `_hide-label`; rename `_icon` → `_icons`.
|
|
124
|
+
- `kol-link-group`: rename `_aria-label` → `_label`; rename `_heading` → `_label`; remove `_heading`; remove `_ordered`.
|
|
125
|
+
- `kol-logo`: rename `_abbr` → `_org`.
|
|
126
|
+
- `kol-modal`: rename `_aria-label` → `_label`.
|
|
127
|
+
- `kol-nav`: rename `_aria-label` → `_label`; rename `_compact` → `_hide-label`; remove `_variant`.
|
|
128
|
+
- `kol-pagination`: rename `_count` → `_total`; rename `_total` → `_max`.
|
|
129
|
+
- `kol-progress`: rename `_type` → `_variant`.
|
|
130
|
+
- `kol-quote`: rename `_caption` → `_label`.
|
|
131
|
+
- `kol-select`: rename `_height` → `_rows`; rename `_list` → `_options`; rename `_icon` → `_icons`; remove `_size`.
|
|
132
|
+
- `kol-skip-nav`: rename `_aria-label` → `_label`.
|
|
133
|
+
- `kol-span`: rename `_icon-only` → `_hide-label`; rename `_icon` → `_icons`.
|
|
134
|
+
- `kol-split-button`: remove `_aria-label`, `_access-key`, `_show-dropdown`; remove `_show`.
|
|
135
|
+
- `kol-symbol`: rename `_aria-label` → `_label`.
|
|
136
|
+
- `kol-table`: rename `_caption` → `_label`.
|
|
137
|
+
- `kol-tabs`: rename `_aria-label` → `_label`; rename `_tab-align` → `_align`; rename `_icon` → `_icons`; rename `_icon-only`
|
|
138
|
+
→ `_hide-label`.
|
|
139
|
+
- `kol-toast`: remove `_show-duration`; rename `_heading` → `_label`.
|
|
140
|
+
- `kol-version`: rename `_version` → `_label`.
|
|
141
|
+
- Expert slot migrations: move `innerText` to `_label` for `kol-heading`, `kol-input-*`, `kol-link`, `kol-select`,
|
|
142
|
+
`kol-textarea` (**`^1`**).
|
|
143
|
+
- Slot removals: mark removed `kol-accordion` `header`, `kol-card` `footer`/`header` (**`^1`**).
|
|
144
|
+
- Slot renames: `kol-accordion` / `kol-card` slot `content` → default slot (**`^1`**).
|
|
145
|
+
- Refactor `_label={false}` to empty string (**`>=1.6 <=1.7`**).
|
|
146
|
+
- **Version 2 tasks**
|
|
147
|
+
- `kol-card`: remove `_has-footer` (**`^2`**).
|
|
148
|
+
- `kol-link-group`: remove `_level` (**`^2`**).
|
|
149
|
+
- `kol-table`: rename tag `kol-table` → `kol-table-stateful` (**`>=2.1.7 <3`**).
|
|
150
|
+
- **Version 3 tasks (`>=2 <4`)**
|
|
151
|
+
- `kol-abbr`: remove `_tooltip-align`.
|
|
152
|
+
- `kol-input-file`: remove `_value`.
|
|
153
|
+
- `kol-modal`: remove `_active-element`.
|
|
154
|
+
- `kol-textarea`: `_resize="both"` → `_resize="vertical"`; `_resize="horizontal"` → `_resize="none"`.
|
|
155
|
+
- `kol-toaster`: rename `alertVariant` → `variant`; rename `defaultAlertType` → `defaultVariant`.
|
|
156
|
+
- All inputs (`kol-combobox`, `kol-input-*`, `kol-select`, `kol-single-select`, `kol-textarea`): remove `_alert`; rename
|
|
157
|
+
`_hide-error` → `_hide-msg`; refactor `_error` → `_msg`.
|
|
158
|
+
- **Version 4 tasks (`^4`)**
|
|
159
|
+
- Remove `_id` from `kol-button`, `kol-button-link`, `kol-combobox`, `kol-input-*`, `kol-popover-button`, `kol-select`,
|
|
160
|
+
`kol-single-select`, `kol-split-button`, `kol-textarea`, `kol-tooltip`.
|
|
161
|
+
- Remove `_label` and `_variant` keys from `_msg` objects.
|
|
162
|
+
- `kol-toast`: remove `variant` from `enqueue()` calls.
|
|
163
|
+
- `kol-toaster`: remove `defaultVariant` option from `getInstance()` calls.
|
|
164
|
+
- **Asset tasks (`^1`)**
|
|
165
|
+
- Remove old `cpy-cli`/`rimraf` versions and reinstall pinned ones.
|
|
166
|
+
- Add `scripts.prepare` to copy component assets into the project and remove `public/assets/codicons` before copying.
|
|
167
|
+
- Inject the Codicon stylesheet link into `index.html` (or warn if the file is missing).
|
|
93
168
|
|
|
94
169
|
#### Theme Migration
|
|
95
170
|
|
|
@@ -183,53 +258,124 @@ You can configure the migration with the `.kolibri.config.json` file in your pro
|
|
|
183
258
|
"tasks": {
|
|
184
259
|
".gitignore-add-rule-.kolibri.migrate.json": true,
|
|
185
260
|
".npmrc-add-rule-save-exact=true": true,
|
|
186
|
-
"
|
|
261
|
+
"add--cpy-cli,rimraf": true,
|
|
262
|
+
"exec-npx cpy \"node_modules/@public-ui/components/assets/**/*\" \"public/assets\" --dot": true,
|
|
263
|
+
"kol-abbr-remove-property-_tooltip-align": true,
|
|
187
264
|
"kol-abbr-rename-property-_align-to-_tooltip-align": true,
|
|
188
265
|
"kol-abbr-rename-property-_title-to-_label": true,
|
|
266
|
+
"kol-accordion-mark-removed-slot-header": true,
|
|
189
267
|
"kol-accordion-rename-property-_heading-to-_label": true,
|
|
268
|
+
"kol-accordion-rename-slot-content-to-": true,
|
|
190
269
|
"kol-alert-rename-property-_heading-to-_label": true,
|
|
191
|
-
"kol-badge-rename-property-_icon-only-to-_hide-label": true,
|
|
192
270
|
"kol-badge-remove-property-_hide-label": true,
|
|
193
271
|
"kol-badge-remove-property-_icon-only": true,
|
|
272
|
+
"kol-badge-rename-property-_icon-only-to-_hide-label": true,
|
|
194
273
|
"kol-badge-rename-property-_icon-to-_icons": true,
|
|
195
274
|
"kol-breadcrumb-rename-property-_aria-label-to-_label": true,
|
|
275
|
+
"kol-button-link-remove-property-_access-key": true,
|
|
196
276
|
"kol-button-link-remove-property-_aria-current": true,
|
|
197
277
|
"kol-button-link-remove-property-_aria-label": true,
|
|
278
|
+
"kol-button-link-remove-property-_id": true,
|
|
279
|
+
"kol-button-link-rename-property-_aria-current-to-_listen-aria-current": true,
|
|
198
280
|
"kol-button-link-rename-property-_icon-only-to-_hide-label": true,
|
|
199
281
|
"kol-button-link-rename-property-_icon-to-_icons": true,
|
|
282
|
+
"kol-button-remove-property-_access-key": true,
|
|
200
283
|
"kol-button-remove-property-_aria-current": true,
|
|
201
284
|
"kol-button-remove-property-_aria-label": true,
|
|
202
285
|
"kol-button-remove-property-_icon-align": true,
|
|
286
|
+
"kol-button-remove-property-_id": true,
|
|
203
287
|
"kol-button-rename-property-_icon-only-to-_hide-label": true,
|
|
288
|
+
"refactor-property-icon-align": true,
|
|
204
289
|
"kol-button-rename-property-_icon-to-_icons": true,
|
|
290
|
+
"kol-card-mark-removed-slot-footer": true,
|
|
291
|
+
"kol-card-mark-removed-slot-header": true,
|
|
292
|
+
"kol-card-remove-property-_has-footer": true,
|
|
205
293
|
"kol-card-rename-property-_heading-to-_label": true,
|
|
206
294
|
"kol-card-rename-property-_headline-to-_label": true,
|
|
295
|
+
"kol-card-rename-slot-content-to-": true,
|
|
296
|
+
"kol-checkbox-rename-property-_type-to-_variant": true,
|
|
297
|
+
"kol-color-rename-property-_icon-to-_icons": true,
|
|
298
|
+
"kol-color-rename-property-_list-to-_suggestions": true,
|
|
299
|
+
"kol-combobox-refactor-property-error-to-msg": true,
|
|
300
|
+
"kol-combobox-remove-property-_alert": true,
|
|
301
|
+
"kol-combobox-remove-property-_id": true,
|
|
302
|
+
"kol-combobox-rename-property-_hide-error-to-_hide-msg": true,
|
|
303
|
+
"kol-date-rename-property-_list-to-_suggestions": true,
|
|
207
304
|
"kol-details-rename-property-_summary-to-_label": true,
|
|
305
|
+
"kol-heading-move-innerText-to-property-_label": true,
|
|
208
306
|
"kol-icon-remove-property-_part": true,
|
|
209
307
|
"kol-icon-rename-property-_aria-label-to-_label": true,
|
|
210
308
|
"kol-icon-rename-property-_icon-to-_icons": true,
|
|
309
|
+
"kol-input-checkbox-move-innerText-to-property-_label": true,
|
|
310
|
+
"kol-input-checkbox-refactor-property-error-to-msg": true,
|
|
311
|
+
"kol-input-checkbox-remove-property-_alert": true,
|
|
312
|
+
"kol-input-checkbox-remove-property-_id": true,
|
|
313
|
+
"kol-input-checkbox-rename-property-_hide-error-to-_hide-msg": true,
|
|
211
314
|
"kol-input-checkbox-rename-property-_icon-to-_icons": true,
|
|
212
|
-
"kol-checkbox-rename-property-_type-to-_variant": true,
|
|
213
|
-
"kol-color-
|
|
214
|
-
"kol-color-
|
|
315
|
+
"kol-input-checkbox-rename-property-_type-to-_variant": true,
|
|
316
|
+
"kol-input-color-move-innerText-to-property-_label": true,
|
|
317
|
+
"kol-input-color-refactor-property-error-to-msg": true,
|
|
318
|
+
"kol-input-color-remove-property-_alert": true,
|
|
319
|
+
"kol-input-color-remove-property-_id": true,
|
|
320
|
+
"kol-input-color-rename-property-_hide-error-to-_hide-msg": true,
|
|
321
|
+
"kol-input-date-move-innerText-to-property-_label": true,
|
|
322
|
+
"kol-input-date-refactor-property-error-to-msg": true,
|
|
323
|
+
"kol-input-date-remove-property-_alert": true,
|
|
324
|
+
"kol-input-date-remove-property-_id": true,
|
|
325
|
+
"kol-input-date-rename-property-_hide-error-to-_hide-msg": true,
|
|
215
326
|
"kol-input-date-rename-property-_icon-to-_icons": true,
|
|
216
|
-
"kol-
|
|
327
|
+
"kol-input-email-move-innerText-to-property-_label": true,
|
|
328
|
+
"kol-input-email-refactor-property-error-to-msg": true,
|
|
329
|
+
"kol-input-email-remove-property-_alert": true,
|
|
330
|
+
"kol-input-email-remove-property-_id": true,
|
|
331
|
+
"kol-input-email-remove-property-_size": true,
|
|
332
|
+
"kol-input-email-rename-property-_hide-error-to-_hide-msg": true,
|
|
217
333
|
"kol-input-email-rename-property-_icon-to-_icons": true,
|
|
218
334
|
"kol-input-email-rename-property-_list-to-_suggestions": true,
|
|
219
|
-
"kol-input-
|
|
335
|
+
"kol-input-file-move-innerText-to-property-_label": true,
|
|
336
|
+
"kol-input-file-refactor-property-error-to-msg": true,
|
|
337
|
+
"kol-input-file-remove-property-_alert": true,
|
|
338
|
+
"kol-input-file-remove-property-_id": true,
|
|
339
|
+
"kol-input-file-remove-property-_value": true,
|
|
340
|
+
"kol-input-file-rename-property-_hide-error-to-_hide-msg": true,
|
|
220
341
|
"kol-input-file-rename-property-_icon-to-_icons": true,
|
|
342
|
+
"kol-input-number-move-innerText-to-property-_label": true,
|
|
343
|
+
"kol-input-number-refactor-property-error-to-msg": true,
|
|
344
|
+
"kol-input-number-remove-property-_alert": true,
|
|
345
|
+
"kol-input-number-remove-property-_id": true,
|
|
346
|
+
"kol-input-number-remove-property-_type": true,
|
|
347
|
+
"kol-input-number-rename-property-_hide-error-to-_hide-msg": true,
|
|
221
348
|
"kol-input-number-rename-property-_icon-to-_icons": true,
|
|
222
349
|
"kol-input-number-rename-property-_list-to-_suggestions": true,
|
|
223
|
-
"kol-input-
|
|
224
|
-
"kol-input-password-
|
|
350
|
+
"kol-input-password-move-innerText-to-property-_label": true,
|
|
351
|
+
"kol-input-password-refactor-property-error-to-msg": true,
|
|
352
|
+
"kol-input-password-remove-property-_alert": true,
|
|
353
|
+
"kol-input-password-remove-property-_id": true,
|
|
225
354
|
"kol-input-password-remove-property-_size": true,
|
|
355
|
+
"kol-input-password-rename-property-_hide-error-to-_hide-msg": true,
|
|
356
|
+
"kol-input-password-rename-property-_icon-to-_icons": true,
|
|
357
|
+
"kol-input-radio-move-innerText-to-property-_label": true,
|
|
358
|
+
"kol-input-radio-refactor-property-error-to-msg": true,
|
|
359
|
+
"kol-input-radio-remove-property-_alert": true,
|
|
360
|
+
"kol-input-radio-remove-property-_id": true,
|
|
361
|
+
"kol-input-radio-rename-property-_hide-error-to-_hide-msg": true,
|
|
226
362
|
"kol-input-radio-rename-property-_list-to-_options": true,
|
|
363
|
+
"kol-input-range-move-innerText-to-property-_label": true,
|
|
364
|
+
"kol-input-range-refactor-property-error-to-msg": true,
|
|
365
|
+
"kol-input-range-remove-property-_alert": true,
|
|
366
|
+
"kol-input-range-remove-property-_id": true,
|
|
367
|
+
"kol-input-range-rename-property-_hide-error-to-_hide-msg": true,
|
|
227
368
|
"kol-input-range-rename-property-_icon-to-_icons": true,
|
|
228
369
|
"kol-input-range-rename-property-_list-to-_suggestions": true,
|
|
229
370
|
"kol-input-rename-property-_icon-to-_icons": true,
|
|
371
|
+
"kol-input-text-move-innerText-to-property-_label": true,
|
|
372
|
+
"kol-input-text-refactor-property-error-to-msg": true,
|
|
373
|
+
"kol-input-text-remove-property-_alert": true,
|
|
374
|
+
"kol-input-text-remove-property-_id": true,
|
|
375
|
+
"kol-input-text-remove-property-_size": true,
|
|
376
|
+
"kol-input-text-rename-property-_hide-error-to-_hide-msg": true,
|
|
230
377
|
"kol-input-text-rename-property-_icon-to-_icons": true,
|
|
231
378
|
"kol-input-text-rename-property-_list-to-_suggestions": true,
|
|
232
|
-
"kol-input-text-remove-property-_size": true,
|
|
233
379
|
"kol-link-button-remove-property-_aria-controls": true,
|
|
234
380
|
"kol-link-button-remove-property-_aria-expanded": true,
|
|
235
381
|
"kol-link-button-remove-property-_aria-label": true,
|
|
@@ -238,16 +384,17 @@ You can configure the migration with the `.kolibri.config.json` file in your pro
|
|
|
238
384
|
"kol-link-button-rename-property-_aria-current-to-_listen-aria-current": true,
|
|
239
385
|
"kol-link-button-rename-property-_icon-only-to-_hide-label": true,
|
|
240
386
|
"kol-link-button-rename-property-_icon-to-_icons": true,
|
|
241
|
-
"kol-link-group-rename-property-_heading-to-_label": true,
|
|
242
387
|
"kol-link-group-remove-property-_heading": true,
|
|
388
|
+
"kol-link-group-remove-property-_level": true,
|
|
243
389
|
"kol-link-group-remove-property-_ordered": true,
|
|
244
390
|
"kol-link-group-rename-property-_aria-label-to-_label": true,
|
|
391
|
+
"kol-link-group-rename-property-_heading-to-_label": true,
|
|
392
|
+
"kol-link-move-innerText-to-property-_label": true,
|
|
245
393
|
"kol-link-remove-property-_aria-controls": true,
|
|
246
394
|
"kol-link-remove-property-_aria-expanded": true,
|
|
247
395
|
"kol-link-remove-property-_aria-label": true,
|
|
248
396
|
"kol-link-remove-property-_aria-selected": true,
|
|
249
397
|
"kol-link-remove-property-_disabled": true,
|
|
250
|
-
"kol-link-remove-property-_icon-align": true,
|
|
251
398
|
"kol-link-remove-property-_selector": true,
|
|
252
399
|
"kol-link-remove-property-_stealth": true,
|
|
253
400
|
"kol-link-remove-property-_use-case": true,
|
|
@@ -255,69 +402,74 @@ You can configure the migration with the `.kolibri.config.json` file in your pro
|
|
|
255
402
|
"kol-link-rename-property-_icon-only-to-_hide-label": true,
|
|
256
403
|
"kol-link-rename-property-_icon-to-_icons": true,
|
|
257
404
|
"kol-logo-rename-property-_abbr-to-_org": true,
|
|
405
|
+
"kol-modal-remove-property-_active-element": true,
|
|
258
406
|
"kol-modal-rename-property-_aria-label-to-_label": true,
|
|
407
|
+
"kol-nav-remove-property-_has-compact-button": true,
|
|
259
408
|
"kol-nav-remove-property-_variant": true,
|
|
260
409
|
"kol-nav-rename-property-_aria-label-to-_label": true,
|
|
261
410
|
"kol-nav-rename-property-_compact-to-_hide-label": true,
|
|
262
411
|
"kol-pagination-rename-property-_count-to-_total": true,
|
|
263
412
|
"kol-pagination-rename-property-_total-to-_max": true,
|
|
413
|
+
"kol-popover-button-remove-property-_id": true,
|
|
264
414
|
"kol-progress-rename-property-_type-to-_variant": true,
|
|
265
415
|
"kol-quote-rename-property-_caption-to-_label": true,
|
|
416
|
+
"kol-select-move-innerText-to-property-_label": true,
|
|
417
|
+
"kol-select-refactor-property-error-to-msg": true,
|
|
418
|
+
"kol-select-remove-property-_alert": true,
|
|
419
|
+
"kol-select-remove-property-_id": true,
|
|
420
|
+
"kol-select-remove-property-_size": true,
|
|
266
421
|
"kol-select-rename-property-_height-to-_rows": true,
|
|
422
|
+
"kol-select-rename-property-_hide-error-to-_hide-msg": true,
|
|
267
423
|
"kol-select-rename-property-_icon-to-_icons": true,
|
|
268
424
|
"kol-select-rename-property-_list-to-_options": true,
|
|
269
|
-
"kol-select-
|
|
425
|
+
"kol-single-select-refactor-property-error-to-msg": true,
|
|
426
|
+
"kol-single-select-remove-property-_alert": true,
|
|
427
|
+
"kol-single-select-remove-property-_id": true,
|
|
428
|
+
"kol-single-select-rename-property-_hide-error-to-_hide-msg": true,
|
|
270
429
|
"kol-skip-nav-rename-property-_aria-label-to-_label": true,
|
|
271
430
|
"kol-span-rename-property-_icon-only-to-_hide-label": true,
|
|
272
431
|
"kol-span-rename-property-_icon-to-_icons": true,
|
|
273
|
-
"kol-split-button-remove-property-_aria-label": true,
|
|
274
432
|
"kol-split-button-remove-property-_access-key": true,
|
|
275
|
-
"kol-split-button-remove-property-
|
|
433
|
+
"kol-split-button-remove-property-_aria-label": true,
|
|
434
|
+
"kol-split-button-remove-property-_id": true,
|
|
276
435
|
"kol-split-button-remove-property-_show": true,
|
|
436
|
+
"kol-split-button-remove-property-_show-dropdown": true,
|
|
277
437
|
"kol-symbol-rename-property-_aria-label-to-_label": true,
|
|
278
438
|
"kol-table-rename-property-_caption-to-_label": true,
|
|
279
439
|
"kol-tabs-rename-property-_aria-label-to-_label": true,
|
|
440
|
+
"kol-tabs-rename-property-_icon-only-to-_hide-label": true,
|
|
280
441
|
"kol-tabs-rename-property-_icon-to-_icons": true,
|
|
281
442
|
"kol-tabs-rename-property-_tab-align-to-_align": true,
|
|
282
|
-
"kol-
|
|
443
|
+
"kol-textarea-move-innerText-to-property-_label": true,
|
|
444
|
+
"kol-textarea-refactor-property-error-to-msg": true,
|
|
445
|
+
"kol-textarea-remove-property-_alert": true,
|
|
446
|
+
"kol-textarea-remove-property-_id": true,
|
|
447
|
+
"kol-textarea-rename-property-_hide-error-to-_hide-msg": true,
|
|
448
|
+
"kol-textarea-update-property-_resize-value-both-to-vertical": true,
|
|
449
|
+
"kol-textarea-update-property-_resize-value-horizontal-to-none": true,
|
|
283
450
|
"kol-toast-remove-property-_show-duration": true,
|
|
284
451
|
"kol-toast-rename-property-_heading-to-_label": true,
|
|
452
|
+
"kol-tooltip-remove-property-_id": true,
|
|
285
453
|
"kol-version-rename-property-_version-to-_label": true,
|
|
286
|
-
"
|
|
287
|
-
"
|
|
288
|
-
"
|
|
289
|
-
"kol-input-date-move-innerText-to-property-_label": true,
|
|
290
|
-
"kol-input-email-move-innerText-to-property-_label": true,
|
|
291
|
-
"kol-input-file-move-innerText-to-property-_label": true,
|
|
292
|
-
"kol-input-number-move-innerText-to-property-_label": true,
|
|
293
|
-
"kol-input-password-move-innerText-to-property-_label": true,
|
|
294
|
-
"kol-input-radio-move-innerText-to-property-_label": true,
|
|
295
|
-
"kol-input-range-move-innerText-to-property-_label": true,
|
|
296
|
-
"kol-input-text-move-innerText-to-property-_label": true,
|
|
297
|
-
"kol-link-move-innerText-to-property-_label": true,
|
|
298
|
-
"kol-select-move-innerText-to-property-_label": true,
|
|
299
|
-
"kol-textarea-move-innerText-to-property-_label": true,
|
|
300
|
-
"kol-accordion-mark-removed-slot-header": true,
|
|
301
|
-
"kol-card-mark-removed-slot-footer": true,
|
|
302
|
-
"kol-card-mark-removed-slot-header": true,
|
|
303
|
-
"kol-accordion-rename-slot-content-to-": true,
|
|
304
|
-
"kol-card-rename-slot-content-to-": true,
|
|
454
|
+
"merge-html-codicon-in-index.html": true,
|
|
455
|
+
"package.json-reconfigure-scripts.prepare": true,
|
|
456
|
+
"refactor-property-icon-align": true,
|
|
305
457
|
"refactor-property-label-replace-false": true,
|
|
306
|
-
"kol-card-remove-property-_has-footer": true,
|
|
307
|
-
"kol-link-group-remove-property-_level": true,
|
|
308
458
|
"remove--cpy-cli,rimraf": true,
|
|
309
|
-
"
|
|
310
|
-
"package.json-reconfigure-scripts.prepare": true,
|
|
459
|
+
"remove-msg-props": true,
|
|
311
460
|
"remove-public/assets/codicons": true,
|
|
312
|
-
"
|
|
313
|
-
"
|
|
314
|
-
"kol-
|
|
315
|
-
"
|
|
461
|
+
"remove-toast-variant-^4": true,
|
|
462
|
+
"remove-toaster-get-instance-options-^4": true,
|
|
463
|
+
"rename-tag-name-kol-table-to-kol-table-stateful": true,
|
|
464
|
+
"toaster-rename-properties": true,
|
|
465
|
+
"vscode-settings-reconfigure-html.customData": true
|
|
316
466
|
}
|
|
317
467
|
}
|
|
318
468
|
}
|
|
319
469
|
```
|
|
320
470
|
|
|
471
|
+
> The `exec-npx cpy` task copies the packaged component assets into your project's `public/assets` folder; leave it enabled unless your build already handles asset copying in a different location.
|
|
472
|
+
|
|
321
473
|
## Troubleshooting
|
|
322
474
|
|
|
323
475
|
If the migration failed, you can reset the migration with `git reset --hard HEAD~1`.
|
package/dist/info/index.js
CHANGED
|
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = default_1;
|
|
7
|
-
const os_1 = __importDefault(require("os"));
|
|
8
7
|
const child_process_1 = require("child_process");
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
8
|
const fs_1 = __importDefault(require("fs"));
|
|
9
|
+
const os_1 = __importDefault(require("os"));
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
11
11
|
// Function to get the binary version
|
|
12
12
|
const getBinaryVersion = (command) => {
|
|
13
13
|
try {
|
package/dist/migrate/index.js
CHANGED
|
@@ -15,10 +15,10 @@ const task_runner_1 = require("./runner/task-runner");
|
|
|
15
15
|
const tasks_1 = require("./runner/tasks");
|
|
16
16
|
const test_1 = require("./runner/tasks/test");
|
|
17
17
|
const v1_1 = require("./runner/tasks/v1");
|
|
18
|
+
const assets_1 = require("./runner/tasks/v1/assets");
|
|
18
19
|
const v2_1 = require("./runner/tasks/v2");
|
|
19
20
|
const v3_1 = require("./runner/tasks/v3");
|
|
20
21
|
const v4_1 = require("./runner/tasks/v4");
|
|
21
|
-
const assets_1 = require("./runner/tasks/v1/assets");
|
|
22
22
|
const reuse_1 = require("./shares/reuse");
|
|
23
23
|
const types_1 = require("./types");
|
|
24
24
|
const currentVersionOfPublicUi = (0, reuse_1.getVersionOfPublicUiComponents)();
|
|
@@ -55,14 +55,6 @@ class GenericUpdatePropertyValueTask extends abstract_task_1.AbstractTask {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
exports.GenericUpdatePropertyValueTask = GenericUpdatePropertyValueTask;
|
|
58
|
-
// Helper function to update attribute values in HTML strings
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
* @param htmlString
|
|
62
|
-
* @param tagRegExp
|
|
63
|
-
* @param oldValue
|
|
64
|
-
* @param newValue
|
|
65
|
-
*/
|
|
66
58
|
function updateAttributeValue(htmlString, tagRegExp, oldValue, newValue) {
|
|
67
59
|
return htmlString.replace(tagRegExp, (match) => {
|
|
68
60
|
return match.replace(`="${oldValue}"`, `="${newValue}"`).replace(`='${oldValue}'`, `='${newValue}'`);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HandleDependencyTask = void 0;
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
|
-
const abstract_task_1 = require("../../abstract-task");
|
|
6
5
|
const reuse_1 = require("../../../shares/reuse");
|
|
6
|
+
const abstract_task_1 = require("../../abstract-task");
|
|
7
7
|
class HandleDependencyTask extends abstract_task_1.AbstractTask {
|
|
8
8
|
command;
|
|
9
9
|
dependencies;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ButtonRenamePropertyIconToIcons = exports.ButtonRenamePropertyIconOnlyToHideLabel = exports.ButtonRefactorPropertyIconAlign = exports.ButtonRemovePropertyAriaLabel = exports.ButtonRemovePropertyAriaCurrent = void 0;
|
|
4
|
+
const RefactorPropertyIconAlign_1 = require("../common/RefactorPropertyIconAlign");
|
|
4
5
|
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
6
|
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
6
|
-
const RefactorPropertyIconAlign_1 = require("../common/RefactorPropertyIconAlign");
|
|
7
7
|
exports.ButtonRemovePropertyAriaCurrent = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-button', '_aria-current', '^1');
|
|
8
8
|
exports.ButtonRemovePropertyAriaLabel = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-button', '_aria-label', '^1');
|
|
9
9
|
exports.ButtonRefactorPropertyIconAlign = RefactorPropertyIconAlign_1.RefactorPropertyIconAlign.getInstance('kol-button');
|
|
@@ -7,6 +7,7 @@ const RefactorPropertyLabelReplaceFalse_1 = require("../common/RefactorPropertyL
|
|
|
7
7
|
const RenameSlotNameTask_1 = require("../common/RenameSlotNameTask");
|
|
8
8
|
const abbr_1 = require("./abbr");
|
|
9
9
|
const accordion_1 = require("./accordion");
|
|
10
|
+
const alert_1 = require("./alert");
|
|
10
11
|
const badge_1 = require("./badge");
|
|
11
12
|
const breadcrumb_1 = require("./breadcrumb");
|
|
12
13
|
const button_1 = require("./button");
|
|
@@ -38,12 +39,11 @@ const select_1 = require("./select");
|
|
|
38
39
|
const skip_nav_1 = require("./skip-nav");
|
|
39
40
|
const span_1 = require("./span");
|
|
40
41
|
const split_button_1 = require("./split-button");
|
|
42
|
+
const symbol_1 = require("./symbol");
|
|
41
43
|
const table_1 = require("./table");
|
|
42
44
|
const tabs_1 = require("./tabs");
|
|
43
45
|
const toast_1 = require("./toast");
|
|
44
46
|
const version_1 = require("./version");
|
|
45
|
-
const alert_1 = require("./alert");
|
|
46
|
-
const symbol_1 = require("./symbol");
|
|
47
47
|
exports.v1Tasks = [];
|
|
48
48
|
exports.v1Tasks.push(abbr_1.AbbrRenamePropertyAlignToTooltipAlign);
|
|
49
49
|
exports.v1Tasks.push(abbr_1.AbbrRenamePropertyTitleToLabel);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InputEmailRemovePropertySize = exports.InputEmailRenamePropertyIconToIcons = exports.InputEmailRenamePropertyListToSuggestions = void 0;
|
|
4
|
-
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
5
4
|
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
|
+
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
6
6
|
exports.InputEmailRenamePropertyListToSuggestions = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-input-email', '_list', '_suggestions', '^1');
|
|
7
7
|
exports.InputEmailRenamePropertyIconToIcons = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-input-email', '_icon', '_icons', '^1');
|
|
8
8
|
exports.InputEmailRemovePropertySize = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-input-email', '_size', '^1');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InputNumberRemovePropertyType = exports.InputNumberRenamePropertyIconToIcons = exports.InputNumberRenamePropertyListToSuggestions = void 0;
|
|
4
|
-
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
5
4
|
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
|
+
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
6
6
|
exports.InputNumberRenamePropertyListToSuggestions = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-input-number', '_list', '_suggestions', '^1');
|
|
7
7
|
// @todo export const InputNumberRemovePropertyType = RemovePropertyNameTask.getInstance('kol-input-number', '_type', '^1');
|
|
8
8
|
exports.InputNumberRenamePropertyIconToIcons = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-input-number', '_icon', '_icons', '^1');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InputPasswordRemovePropertySize = exports.InputPasswordRenamePropertyIconToIcons = void 0;
|
|
4
|
-
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
5
4
|
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
|
+
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
6
6
|
exports.InputPasswordRenamePropertyIconToIcons = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-input-password', '_icon', '_icons', '^1');
|
|
7
7
|
exports.InputPasswordRemovePropertySize = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-input-password', '_size', '^1');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InputTextRemovePropertySize = exports.InputTextRenamePropertyIconToIcons = exports.InputTextRenamePropertyListToSuggestions = void 0;
|
|
4
|
-
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
5
4
|
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
|
+
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
6
6
|
exports.InputTextRenamePropertyListToSuggestions = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-input-text', '_list', '_suggestions', '^1');
|
|
7
7
|
exports.InputTextRenamePropertyIconToIcons = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-input-text', '_icon', '_icons', '^1');
|
|
8
8
|
exports.InputTextRemovePropertySize = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-input-text', '_size', '^1');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LinkRemovePropertyUseCase = exports.LinkRemovePropertyStealth = exports.LinkRemovePropertySelector = exports.LinkRenamePropertyIconOnlyToHideLabel = exports.LinkRefactorPropertyIconAlign = exports.LinkRenamePropertyIconToIcons = exports.LinkRemovePropertyDisabled = exports.LinkRemovePropertyAriaSelected = exports.LinkRemovePropertyAriaLabel = exports.LinkRemovePropertyAriaExpanded = exports.LinkRenamePropertyAriaCurrentToListenAriaCurrent = exports.LinkRemovePropertyAriaControls = void 0;
|
|
4
|
+
const RefactorPropertyIconAlign_1 = require("../common/RefactorPropertyIconAlign");
|
|
4
5
|
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
6
|
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
6
|
-
const RefactorPropertyIconAlign_1 = require("../common/RefactorPropertyIconAlign");
|
|
7
7
|
exports.LinkRemovePropertyAriaControls = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-link', '_aria-controls', '^1');
|
|
8
8
|
exports.LinkRenamePropertyAriaCurrentToListenAriaCurrent = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-link', '_aria-current', '_listen-aria-current', '^1');
|
|
9
9
|
exports.LinkRemovePropertyAriaExpanded = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-link', '_aria-expanded', '^1');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SelectRemovePropertySize = exports.SelectRenamePropertyIconToIcons = exports.SelectRenamePropertyListToOptions = exports.SelectRenamePropertyHeightToRows = void 0;
|
|
4
|
-
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
5
4
|
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
|
+
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
6
6
|
exports.SelectRenamePropertyHeightToRows = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-select', '_height', '_rows', '^1');
|
|
7
7
|
exports.SelectRenamePropertyListToOptions = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-select', '_list', '_options', '^1');
|
|
8
8
|
exports.SelectRenamePropertyIconToIcons = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-select', '_icon', '_icons', '^1');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AllInputTasks = void 0;
|
|
4
|
-
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
4
|
const RefactorPropertyErrorToMsg_1 = require("../common/RefactorPropertyErrorToMsg");
|
|
5
|
+
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
6
6
|
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
7
7
|
const INPUT_COMPONENTS = [
|
|
8
8
|
'kol-combobox',
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.v3Tasks = void 0;
|
|
4
|
-
const textarea_1 = require("./textarea");
|
|
5
4
|
const abbr_1 = require("./abbr");
|
|
6
|
-
const modal_1 = require("./modal");
|
|
7
|
-
const input_file_1 = require("./input-file");
|
|
8
5
|
const all_input_1 = require("./all-input");
|
|
6
|
+
const input_file_1 = require("./input-file");
|
|
7
|
+
const modal_1 = require("./modal");
|
|
8
|
+
const textarea_1 = require("./textarea");
|
|
9
9
|
const toaster_1 = require("./toaster");
|
|
10
10
|
exports.v3Tasks = [];
|
|
11
11
|
exports.v3Tasks.push(textarea_1.TextareaUpdatePropertyValue_Resize_Both);
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ToasterRenameProperties = void 0;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const types_1 = require("../../../../types");
|
|
9
|
-
const fileExtensions = [...types_1.FILE_EXTENSIONS];
|
|
10
9
|
const reuse_1 = require("../../../shares/reuse");
|
|
11
10
|
const abstract_task_1 = require("../../abstract-task");
|
|
11
|
+
const fileExtensions = [...types_1.FILE_EXTENSIONS];
|
|
12
12
|
class ToasterRenamePropertiesTask extends abstract_task_1.AbstractTask {
|
|
13
13
|
constructor() {
|
|
14
14
|
super('toaster-rename-properties', 'Rename Toaster properties `alertVariant` to `variant` and `defaultAlertType` to `defaultVariant`', fileExtensions, '>=2 <4');
|
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.v4Tasks = void 0;
|
|
4
4
|
const id_1 = require("./id");
|
|
5
|
+
const link_1 = require("./link");
|
|
6
|
+
const loader_1 = require("./loader");
|
|
5
7
|
const msg_1 = require("./msg");
|
|
6
8
|
const toast_1 = require("./toast");
|
|
7
9
|
const toaster_1 = require("./toaster");
|
|
8
10
|
exports.v4Tasks = [];
|
|
11
|
+
exports.v4Tasks.push(...link_1.MapVariantStandaloneToInlineTasks);
|
|
9
12
|
exports.v4Tasks.push(...id_1.RemoveIdPropTasks);
|
|
10
13
|
exports.v4Tasks.push(...msg_1.RemoveMsgPropsTasks);
|
|
11
14
|
exports.v4Tasks.push(toast_1.RemoveToastVariantTask.getInstance('^4'));
|
|
12
15
|
exports.v4Tasks.push(toaster_1.RemoveToasterGetInstanceOptionsTask.getInstance('^4'));
|
|
16
|
+
exports.v4Tasks.push(loader_1.UpdateLoaderImportPathTask.getInstance('^4'));
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MapVariantStandaloneToInlineTasks = exports.MapLinkVariantStandaloneToInlineTask = exports.MapButtonLinkVariantStandaloneToInlineTask = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const types_1 = require("../../../../types");
|
|
9
|
+
const reuse_1 = require("../../../shares/reuse");
|
|
10
|
+
const abstract_task_1 = require("../../abstract-task");
|
|
11
|
+
class MapVariantStandaloneToInlineTask extends abstract_task_1.AbstractTask {
|
|
12
|
+
tag;
|
|
13
|
+
tagCapitalCase;
|
|
14
|
+
variantStandaloneRegExp = /\s_variant\s*=\s*(\{["'`]standalone["'`]\}|["'`]standalone["'`])/;
|
|
15
|
+
constructor(identifier, tag, versionRange, dependentTasks, options) {
|
|
16
|
+
super(identifier, `Map "_variant=standalone" to "_inline" for "${tag}"`, types_1.MARKUP_EXTENSIONS, versionRange, dependentTasks, options);
|
|
17
|
+
this.tag = tag;
|
|
18
|
+
this.tagCapitalCase = (0, reuse_1.kebabToCapitalCase)(tag);
|
|
19
|
+
}
|
|
20
|
+
static getInstance(tag, versionRange, dependentTasks, options) {
|
|
21
|
+
const identifier = `${tag}-map-variant-standalone-to-inline`;
|
|
22
|
+
if (!this.instances.has(identifier)) {
|
|
23
|
+
this.instances.set(identifier, new MapVariantStandaloneToInlineTask(identifier, tag, versionRange, dependentTasks, options));
|
|
24
|
+
}
|
|
25
|
+
return this.instances.get(identifier);
|
|
26
|
+
}
|
|
27
|
+
run(baseDir) {
|
|
28
|
+
this.transpileComponentFiles(baseDir);
|
|
29
|
+
this.transpileCustomElementFiles(baseDir);
|
|
30
|
+
}
|
|
31
|
+
transpileComponentFiles(baseDir) {
|
|
32
|
+
const tagRegExp = new RegExp(`<${this.tagCapitalCase}[^>]*_variant[^>]*>`, 'g');
|
|
33
|
+
(0, reuse_1.filterFilesByExt)(baseDir, types_1.COMPONENT_FILE_EXTENSIONS).forEach((file) => {
|
|
34
|
+
const content = fs_1.default.readFileSync(file, 'utf8');
|
|
35
|
+
const newContent = content.replace(tagRegExp, (componentTag) => this.rewriteTag(componentTag, true));
|
|
36
|
+
if (content !== newContent) {
|
|
37
|
+
reuse_1.MODIFIED_FILES.add(file);
|
|
38
|
+
fs_1.default.writeFileSync(file, newContent);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
transpileCustomElementFiles(baseDir) {
|
|
43
|
+
const tagRegExp = new RegExp(`<${this.tag}[^>]*_variant[^>]*>`, 'g');
|
|
44
|
+
(0, reuse_1.filterFilesByExt)(baseDir, types_1.CUSTOM_ELEMENT_FILE_EXTENSIONS).forEach((file) => {
|
|
45
|
+
const content = fs_1.default.readFileSync(file, 'utf8');
|
|
46
|
+
const newContent = content.replace(tagRegExp, (componentTag) => this.rewriteTag(componentTag, false));
|
|
47
|
+
if (content !== newContent) {
|
|
48
|
+
reuse_1.MODIFIED_FILES.add(file);
|
|
49
|
+
fs_1.default.writeFileSync(file, newContent);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
rewriteTag(componentTag, isComponent) {
|
|
54
|
+
if (!this.variantStandaloneRegExp.test(componentTag)) {
|
|
55
|
+
return componentTag;
|
|
56
|
+
}
|
|
57
|
+
const inlineReplacement = isComponent ? ' _inline={false}' : ' _inline="false"';
|
|
58
|
+
if (/\s_inline\s*=/.test(componentTag)) {
|
|
59
|
+
return componentTag.replace(this.variantStandaloneRegExp, '');
|
|
60
|
+
}
|
|
61
|
+
return componentTag.replace(this.variantStandaloneRegExp, inlineReplacement);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.MapButtonLinkVariantStandaloneToInlineTask = MapVariantStandaloneToInlineTask.getInstance('kol-button-link', '^4');
|
|
65
|
+
exports.MapLinkVariantStandaloneToInlineTask = MapVariantStandaloneToInlineTask.getInstance('kol-link', '^4');
|
|
66
|
+
exports.MapVariantStandaloneToInlineTasks = [exports.MapButtonLinkVariantStandaloneToInlineTask, exports.MapLinkVariantStandaloneToInlineTask];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UpdateLoaderImportPathTask = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const reuse_1 = require("../../../shares/reuse");
|
|
9
|
+
const abstract_task_1 = require("../../abstract-task");
|
|
10
|
+
const LOADER_FILE_EXTENSIONS = ['js', 'jsx', 'ts', 'tsx', 'vue'];
|
|
11
|
+
class UpdateLoaderImportPathTask extends abstract_task_1.AbstractTask {
|
|
12
|
+
constructor(identifier, versionRange, dependentTasks, options) {
|
|
13
|
+
super(identifier, 'Update loader imports to @public-ui/components/loader', LOADER_FILE_EXTENSIONS, versionRange, dependentTasks, options);
|
|
14
|
+
}
|
|
15
|
+
static getInstance(versionRange, dependentTasks = [], options = {}) {
|
|
16
|
+
const identifier = `update-loader-import-path-${versionRange}`;
|
|
17
|
+
if (!this.instances.has(identifier)) {
|
|
18
|
+
this.instances.set(identifier, new UpdateLoaderImportPathTask(identifier, versionRange, dependentTasks, options));
|
|
19
|
+
}
|
|
20
|
+
return this.instances.get(identifier);
|
|
21
|
+
}
|
|
22
|
+
run(baseDir) {
|
|
23
|
+
this.transpileFiles(baseDir);
|
|
24
|
+
}
|
|
25
|
+
transpileFiles(baseDir) {
|
|
26
|
+
(0, reuse_1.filterFilesByExt)(baseDir, LOADER_FILE_EXTENSIONS).forEach((file) => {
|
|
27
|
+
const content = fs_1.default.readFileSync(file, 'utf8');
|
|
28
|
+
const newContent = content.replace(/@public-ui\/components\/dist\/loader/g, '@public-ui/components/loader');
|
|
29
|
+
if (newContent !== content) {
|
|
30
|
+
reuse_1.MODIFIED_FILES.add(file);
|
|
31
|
+
fs_1.default.writeFileSync(file, newContent);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.UpdateLoaderImportPathTask = UpdateLoaderImportPathTask;
|
|
@@ -177,7 +177,10 @@ function setRemoveMode(mode) {
|
|
|
177
177
|
REMOVE_MODE = mode;
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
|
-
* Gets the remove mode
|
|
180
|
+
* Gets the current remove mode chosen via the CLI flag `--remove-mode`.
|
|
181
|
+
* - `prefix` (default) renames removed properties to `data-removed-<property>` so that developers can
|
|
182
|
+
* clean them up manually after the migration.
|
|
183
|
+
* - `delete` removes the properties entirely during migration.
|
|
181
184
|
* @returns {RemoveMode} The remove mode
|
|
182
185
|
*/
|
|
183
186
|
function getRemoveMode() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/kolibri-cli",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.10",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": {
|
|
@@ -22,34 +22,34 @@
|
|
|
22
22
|
"type": "commonjs",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"chalk": "5.6.2",
|
|
25
|
-
"commander": "14.0.
|
|
25
|
+
"commander": "14.0.2",
|
|
26
26
|
"deepmerge": "4.3.1",
|
|
27
27
|
"gradient-string": "3.0.0",
|
|
28
28
|
"loglevel": "1.9.2",
|
|
29
|
-
"prettier": "3.
|
|
30
|
-
"
|
|
29
|
+
"prettier": "3.7.4",
|
|
30
|
+
"prettier-plugin-organize-imports": "4.3.0",
|
|
31
|
+
"semver": "7.7.3",
|
|
31
32
|
"typed-bem": "1.0.2"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@types/node": "24.
|
|
35
|
+
"@types/node": "24.10.4",
|
|
35
36
|
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
36
37
|
"@typescript-eslint/parser": "7.18.0",
|
|
37
38
|
"cpy-cli": "6.0.0",
|
|
38
|
-
"cross-env": "10.
|
|
39
|
+
"cross-env": "10.1.0",
|
|
39
40
|
"eslint": "8.57.1",
|
|
40
41
|
"eslint-config-prettier": "9.1.2",
|
|
41
42
|
"eslint-plugin-html": "8.1.3",
|
|
42
|
-
"eslint-plugin-jsdoc": "50.8.0",
|
|
43
43
|
"eslint-plugin-json": "3.1.0",
|
|
44
44
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
45
45
|
"eslint-plugin-react": "7.37.5",
|
|
46
|
-
"knip": "5.
|
|
47
|
-
"mocha": "11.7.
|
|
48
|
-
"nodemon": "3.1.
|
|
49
|
-
"rimraf": "6.
|
|
46
|
+
"knip": "5.73.4",
|
|
47
|
+
"mocha": "11.7.5",
|
|
48
|
+
"nodemon": "3.1.11",
|
|
49
|
+
"rimraf": "6.1.2",
|
|
50
50
|
"ts-node": "10.9.2",
|
|
51
|
-
"typescript": "5.9.
|
|
52
|
-
"@public-ui/components": "4.0.0-alpha.
|
|
51
|
+
"typescript": "5.9.3",
|
|
52
|
+
"@public-ui/components": "4.0.0-alpha.10"
|
|
53
53
|
},
|
|
54
54
|
"files": [
|
|
55
55
|
"dist"
|
|
@@ -61,10 +61,9 @@
|
|
|
61
61
|
"lint": "pnpm lint:eslint && pnpm lint:tsc",
|
|
62
62
|
"lint:eslint": "eslint src",
|
|
63
63
|
"lint:tsc": "tsc --noemit",
|
|
64
|
-
"pretest": "pnpm build",
|
|
64
|
+
"pretest:unit": "pnpm build",
|
|
65
65
|
"restart": "pnpm reset && pnpm start",
|
|
66
66
|
"start": "rimraf test && cpy \"../../samples/react/src/components\" test/src && cpy \"../../samples/react/public/*.html\" test/ && ts-node src/index.ts migrate --ignore-uncommitted-changes --test-tasks test",
|
|
67
|
-
"test": "pnpm test:unit",
|
|
68
67
|
"test:unit": "cross-env TS_NODE_PROJECT=tsconfig.test.json mocha --require ts-node/register test/**/*.ts --no-experimental-strip-types",
|
|
69
68
|
"unused": "knip",
|
|
70
69
|
"watch": "nodemon --ignore package.json src/index.ts migrate --ignore-uncommitted-changes --test-tasks test"
|