@public-ui/kolibri-cli 2.0.0-rc.1 → 2.0.0-rc.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 +39 -28
- package/dist/migrate/index.js +31 -12
- package/dist/migrate/runner/task-runner.js +1 -1
- package/dist/migrate/runner/tasks/common/LabelExpertSlot.js +10 -4
- package/dist/migrate/runner/tasks/v1/button-link.js +1 -2
- package/dist/migrate/runner/tasks/v1/button.js +1 -2
- package/dist/migrate/runner/tasks/v1/index.js +0 -2
- package/dist/migrate/runner/tasks/v2/index.js +0 -2
- package/dist/types.js +3 -3
- package/package.json +9 -9
- package/dist/migrate/runner/tasks/v2/nav.js +0 -5
package/README.md
CHANGED
|
@@ -92,12 +92,14 @@ kolibri migrate <path>
|
|
|
92
92
|
|
|
93
93
|
#### Options
|
|
94
94
|
|
|
95
|
-
| Option | Description
|
|
96
|
-
| ------------------------------ |
|
|
97
|
-
| `--format` | Try to format the modified files with prettier
|
|
98
|
-
| `--
|
|
99
|
-
| `--
|
|
100
|
-
| `--
|
|
95
|
+
| Option | Description | Type | Default |
|
|
96
|
+
| ------------------------------ | ------------------------------------------------------------------ | :------------------: | :-----------------------: |
|
|
97
|
+
| `--format` | Try to format the modified files with prettier | boolean | true |
|
|
98
|
+
| `--overwrite-current-version` | Migrate from this current version instead of the installed version | version | current installed version |
|
|
99
|
+
| `--overwrite-target-version` | Migrate to this target version instead of the version of the CLI | version | version of the CLI |
|
|
100
|
+
| `--ignore-greater-version` | Allows execution with greater versions | boolean | false |
|
|
101
|
+
| `--ignore-uncommitted-changes` | Allows execution with uncommitted changes | boolean | false |
|
|
102
|
+
| `--remove-mode` | Prefix property name or delete property | `delete` \| `prefix` | `prefix` |
|
|
101
103
|
|
|
102
104
|
#### Configuration
|
|
103
105
|
|
|
@@ -110,25 +112,21 @@ You can configure the migration with the `.kolibri.config.json` file in your pro
|
|
|
110
112
|
"migrate": {
|
|
111
113
|
"tasks": {
|
|
112
114
|
".gitignore-add-rule-.kolibri.migrate.json": true,
|
|
113
|
-
"vscode-settings-reconfigure-html.customData": true,
|
|
114
|
-
"tsconfig-reconfigure-compilerOptions.types": true,
|
|
115
|
-
"remove--cpy-cli,rimraf": true,
|
|
116
|
-
"add--cpy-cli,rimraf": true,
|
|
117
|
-
"package.json-reconfigure-scripts.postinstall": true,
|
|
118
|
-
"merge-html-codicon-in-index.html": true,
|
|
119
|
-
"remove-public/assets/codicons": true,
|
|
120
|
-
"exec-npx cpy \"node_modules/@public-ui/components/assets/**/*\" \"public/assets\" --dot": true,
|
|
121
115
|
".npmrc-add-rule-save-exact=true": true,
|
|
116
|
+
"vscode-settings-reconfigure-html.customData": true,
|
|
122
117
|
"kol-abbr-rename-property-_align-to-_tooltip-align": true,
|
|
123
118
|
"kol-abbr-rename-property-_title-to-_label": true,
|
|
124
119
|
"kol-accordion-rename-property-_heading-to-_label": true,
|
|
120
|
+
"kol-alert-rename-property-_heading-to-_label": true,
|
|
125
121
|
"kol-badge-rename-property-_icon-only-to-_hide-label": true,
|
|
126
122
|
"kol-badge-remove-property-_hide-label": true,
|
|
127
123
|
"kol-badge-remove-property-_icon-only": true,
|
|
124
|
+
"kol-badge-rename-property-_icon-to-_icons": true,
|
|
128
125
|
"kol-breadcrumb-rename-property-_aria-label-to-_label": true,
|
|
129
126
|
"kol-button-link-remove-property-_aria-current": true,
|
|
130
127
|
"kol-button-link-remove-property-_aria-label": true,
|
|
131
128
|
"kol-button-link-rename-property-_icon-only-to-_hide-label": true,
|
|
129
|
+
"kol-button-link-rename-property-_icon-to-_icons": true,
|
|
132
130
|
"kol-button-remove-property-_aria-current": true,
|
|
133
131
|
"kol-button-remove-property-_aria-label": true,
|
|
134
132
|
"kol-button-remove-property-_icon-align": true,
|
|
@@ -148,28 +146,33 @@ You can configure the migration with the `.kolibri.config.json` file in your pro
|
|
|
148
146
|
"kol-date-rename-property-_list-to-_suggestions": true,
|
|
149
147
|
"kol-input-email-rename-property-_icon-to-_icons": true,
|
|
150
148
|
"kol-input-email-rename-property-_list-to-_suggestions": true,
|
|
149
|
+
"kol-input-email-remove-property-_size": true,
|
|
151
150
|
"kol-input-file-rename-property-_icon-to-_icons": true,
|
|
152
151
|
"kol-input-number-rename-property-_icon-to-_icons": true,
|
|
153
152
|
"kol-input-number-rename-property-_list-to-_suggestions": true,
|
|
153
|
+
"kol-input-number-remove-property-_type": true,
|
|
154
154
|
"kol-input-password-rename-property-_icon-to-_icons": true,
|
|
155
|
+
"kol-input-password-remove-property-_size": true,
|
|
155
156
|
"kol-input-radio-rename-property-_list-to-_options": true,
|
|
156
157
|
"kol-input-range-rename-property-_icon-to-_icons": true,
|
|
157
158
|
"kol-input-range-rename-property-_list-to-_suggestions": true,
|
|
158
159
|
"kol-input-rename-property-_icon-to-_icons": true,
|
|
159
160
|
"kol-input-text-rename-property-_icon-to-_icons": true,
|
|
160
161
|
"kol-input-text-rename-property-_list-to-_suggestions": true,
|
|
161
|
-
"kol-
|
|
162
|
+
"kol-input-text-remove-property-_size": true,
|
|
163
|
+
"kol-link-button-remove-property-_aria-controls": true,
|
|
162
164
|
"kol-link-button-remove-property-_aria-expanded": true,
|
|
163
165
|
"kol-link-button-remove-property-_aria-label": true,
|
|
164
166
|
"kol-link-button-remove-property-_aria-selected": true,
|
|
165
167
|
"kol-link-button-remove-property-_disabled": true,
|
|
166
168
|
"kol-link-button-rename-property-_aria-current-to-_listen-aria-current": true,
|
|
167
169
|
"kol-link-button-rename-property-_icon-only-to-_hide-label": true,
|
|
170
|
+
"kol-link-button-rename-property-_icon-to-_icons": true,
|
|
168
171
|
"kol-link-group-rename-property-_heading-to-_label": true,
|
|
169
172
|
"kol-link-group-remove-property-_heading": true,
|
|
170
173
|
"kol-link-group-remove-property-_ordered": true,
|
|
171
174
|
"kol-link-group-rename-property-_aria-label-to-_label": true,
|
|
172
|
-
"kol-link-remove-property-_aria-
|
|
175
|
+
"kol-link-remove-property-_aria-controls": true,
|
|
173
176
|
"kol-link-remove-property-_aria-expanded": true,
|
|
174
177
|
"kol-link-remove-property-_aria-label": true,
|
|
175
178
|
"kol-link-remove-property-_aria-selected": true,
|
|
@@ -180,6 +183,7 @@ You can configure the migration with the `.kolibri.config.json` file in your pro
|
|
|
180
183
|
"kol-link-remove-property-_use-case": true,
|
|
181
184
|
"kol-link-rename-property-_aria-current-to-_listen-aria-current": true,
|
|
182
185
|
"kol-link-rename-property-_icon-only-to-_hide-label": true,
|
|
186
|
+
"kol-link-rename-property-_icon-to-_icons": true,
|
|
183
187
|
"kol-logo-rename-property-_abbr-to-_org": true,
|
|
184
188
|
"kol-modal-rename-property-_aria-label-to-_label": true,
|
|
185
189
|
"kol-nav-remove-property-_variant": true,
|
|
@@ -192,15 +196,20 @@ You can configure the migration with the `.kolibri.config.json` file in your pro
|
|
|
192
196
|
"kol-select-rename-property-_height-to-_rows": true,
|
|
193
197
|
"kol-select-rename-property-_icon-to-_icons": true,
|
|
194
198
|
"kol-select-rename-property-_list-to-_options": true,
|
|
199
|
+
"kol-select-remove-property-_size": true,
|
|
195
200
|
"kol-skip-nav-rename-property-_aria-label-to-_label": true,
|
|
196
201
|
"kol-span-rename-property-_icon-only-to-_hide-label": true,
|
|
197
202
|
"kol-span-rename-property-_icon-to-_icons": true,
|
|
198
203
|
"kol-split-button-remove-property-_aria-label": true,
|
|
199
|
-
"kol-split-button-
|
|
204
|
+
"kol-split-button-remove-property-_access-key": true,
|
|
205
|
+
"kol-split-button-remove-property-_show-dropdown": true,
|
|
206
|
+
"kol-split-button-remove-property-_show": true,
|
|
207
|
+
"kol-symbol-rename-property-_aria-label-to-_label": true,
|
|
200
208
|
"kol-table-rename-property-_caption-to-_label": true,
|
|
201
209
|
"kol-tabs-rename-property-_aria-label-to-_label": true,
|
|
202
210
|
"kol-tabs-rename-property-_icon-to-_icons": true,
|
|
203
211
|
"kol-tabs-rename-property-_tab-align-to-_align": true,
|
|
212
|
+
"kol-tabs-rename-property-_icon-only-to-_hide-label": true,
|
|
204
213
|
"kol-toast-remove-property-_show-duration": true,
|
|
205
214
|
"kol-toast-rename-property-_heading-to-_label": true,
|
|
206
215
|
"kol-version-rename-property-_version-to-_label": true,
|
|
@@ -223,7 +232,17 @@ You can configure the migration with the `.kolibri.config.json` file in your pro
|
|
|
223
232
|
"kol-card-mark-removed-slot-header": true,
|
|
224
233
|
"kol-accordion-rename-slot-content-to-": true,
|
|
225
234
|
"kol-card-rename-slot-content-to-": true,
|
|
226
|
-
"refactor-property-label-replace-false": true
|
|
235
|
+
"refactor-property-label-replace-false": true,
|
|
236
|
+
"kol-card-remove-property-_has-footer": true,
|
|
237
|
+
"kol-link-group-remove-property-_level": true,
|
|
238
|
+
"remove--cpy-cli,rimraf": true,
|
|
239
|
+
"add--cpy-cli,rimraf": true,
|
|
240
|
+
"package.json-reconfigure-scripts.postinstall": true,
|
|
241
|
+
"remove-public/assets/codicons": true,
|
|
242
|
+
"exec-npx cpy \"node_modules/@public-ui/components/assets/**/*\" \"undefined/assets\" --dot": true,
|
|
243
|
+
"kol-button-link-remove-property-_access-key": true,
|
|
244
|
+
"kol-button-remove-property-_access-key": true,
|
|
245
|
+
"kol-nav-remove-property-_has-compact-button": true
|
|
227
246
|
}
|
|
228
247
|
}
|
|
229
248
|
}
|
|
@@ -235,6 +254,8 @@ If the migration failed, you can reset the migration with `git reset --hard HEAD
|
|
|
235
254
|
|
|
236
255
|
Use the configuration (`.kolibri.config.json`) to exclude some tasks.
|
|
237
256
|
|
|
257
|
+
If your project is already on a newer version of KoliBri, but you want to repeat the migration from a previous version, you can use this `--overwrite-current-version` option. It overwrites the offset version from which the migration originally starts, instead of using the installed version.
|
|
258
|
+
|
|
238
259
|
If there are multiple obsolete properties that have been migrated to just one new property, the new property may appear multiple times in the tag. You can then decide which variant to use and remove all other variants accordingly.
|
|
239
260
|
|
|
240
261
|
Maybe it can help to prepare your code in the tricky places for migration.
|
|
@@ -248,13 +269,3 @@ You have always the possibility of a dry run. Because before the migration will
|
|
|
248
269
|
After the migration you can check the result with `git status` and `git diff`.
|
|
249
270
|
|
|
250
271
|
Is anything wrong, you can reset the migration with `git reset --hard HEAD~1` or by discarding the affected files.
|
|
251
|
-
|
|
252
|
-
## Changelog
|
|
253
|
-
|
|
254
|
-
### 1.7.1
|
|
255
|
-
|
|
256
|
-
- Fix version handling by adding the absolut min version 1.4.2
|
|
257
|
-
- Add post message feature for more details
|
|
258
|
-
- Add `${` support by `_label` migration
|
|
259
|
-
- Activate Expert-Slot refactoring for `_label` migration
|
|
260
|
-
- Prevents `@public-ui/kolibri-cli` from being changed by the update process
|
package/dist/migrate/index.js
CHANGED
|
@@ -18,6 +18,8 @@ const v2_1 = require("./runner/tasks/v2");
|
|
|
18
18
|
const assets_1 = require("./runner/tasks/v1/assets");
|
|
19
19
|
const reuse_1 = require("./shares/reuse");
|
|
20
20
|
const types_1 = require("./types");
|
|
21
|
+
const currentVersionOfPublicUi = (0, reuse_1.getVersionOfPublicUiComponents)();
|
|
22
|
+
const targetVersionOfPublicUi = (0, reuse_1.getVersionOfPublicUiKoliBriCli)();
|
|
21
23
|
/**
|
|
22
24
|
* This function is used to register the migrate command.
|
|
23
25
|
* @param {Command} program The program object to register the command
|
|
@@ -28,6 +30,8 @@ function default_1(program) {
|
|
|
28
30
|
.description('This command migrates KoliBri code to the current version.')
|
|
29
31
|
.argument('[string]', 'Source code folder to migrate', 'src')
|
|
30
32
|
.addOption(new commander_1.Option('--format', 'Try to format the modified files with prettier').default(true))
|
|
33
|
+
.addOption(new commander_1.Option('--overwrite-current-version <version>', 'Migrate from this current version instead of the installed version of KoliBri').default(currentVersionOfPublicUi))
|
|
34
|
+
.addOption(new commander_1.Option('--overwrite-target-version <version>', 'Migrate to this target version instead of the version of the CLI').default(targetVersionOfPublicUi))
|
|
31
35
|
.addOption(new commander_1.Option('--ignore-greater-version', 'Allows execution with greater versions').default(false))
|
|
32
36
|
.addOption(new commander_1.Option('--ignore-uncommitted-changes', 'Allows execution with uncommitted changes').default(false))
|
|
33
37
|
.addOption(new commander_1.Option('--remove-mode <mode>', 'Prefix property name or delete property').choices(types_1.REMOVE_MODE).default('prefix'))
|
|
@@ -38,17 +42,25 @@ function default_1(program) {
|
|
|
38
42
|
console.error(`exec error: ${err.message}`);
|
|
39
43
|
return;
|
|
40
44
|
}
|
|
45
|
+
if (!semver_1.default.valid(options.overwriteCurrentVersion)) {
|
|
46
|
+
throw (0, reuse_1.logAndCreateError)('Please specify a valid version for the --overwrite-current-version option.');
|
|
47
|
+
}
|
|
48
|
+
if (!semver_1.default.valid(options.overwriteTargetVersion)) {
|
|
49
|
+
throw (0, reuse_1.logAndCreateError)('Please specify a valid version for the --overwrite-target-version option.');
|
|
50
|
+
}
|
|
51
|
+
if (!baseDir) {
|
|
52
|
+
throw (0, reuse_1.logAndCreateError)('Please specify the source code folder to migrate.');
|
|
53
|
+
}
|
|
41
54
|
if (!options.ignoreUncommittedChanges && stdout) {
|
|
42
|
-
throw (0, reuse_1.logAndCreateError)('There are uncommitted changes');
|
|
55
|
+
throw (0, reuse_1.logAndCreateError)('There are uncommitted changes', 'If you want to ignore this, use the --ignore-uncommitted-changes option.');
|
|
43
56
|
}
|
|
44
57
|
(0, reuse_1.setRemoveMode)(options.removeMode);
|
|
45
|
-
const versionOfPublicUiComponents = (0, reuse_1.getVersionOfPublicUiComponents)();
|
|
46
|
-
const versionOfPublicUiKoliBriCli = (0, reuse_1.getVersionOfPublicUiKoliBriCli)();
|
|
47
58
|
console.log(`
|
|
48
|
-
Current version of @public-ui
|
|
59
|
+
Current version of @public-ui/*: ${options.overwriteCurrentVersion}
|
|
60
|
+
Target version of @public-ui/*: ${options.overwriteTargetVersion}
|
|
49
61
|
Source folder to migrate: ${baseDir}
|
|
50
62
|
`);
|
|
51
|
-
if (!options.ignoreGreaterVersion && semver_1.default.lt(
|
|
63
|
+
if (!options.ignoreGreaterVersion && semver_1.default.lt(options.overwriteTargetVersion, options.overwriteCurrentVersion)) {
|
|
52
64
|
throw (0, reuse_1.logAndCreateError)('Your current version of @public-ui/components is greater than the version of @public-ui/kolibri-cli. Please update @public-ui/kolibri-cli or force the migration with --ignore-greater-version.');
|
|
53
65
|
}
|
|
54
66
|
const configFile = path_1.default.resolve(process.cwd(), '.kolibri.config.json');
|
|
@@ -61,7 +73,7 @@ Source folder to migrate: ${baseDir}
|
|
|
61
73
|
// ignore
|
|
62
74
|
}
|
|
63
75
|
}
|
|
64
|
-
const runner = new task_runner_1.TaskRunner(baseDir,
|
|
76
|
+
const runner = new task_runner_1.TaskRunner(baseDir, options.overwriteTargetVersion, options.overwriteCurrentVersion, config);
|
|
65
77
|
runner.registerTasks(tasks_1.commonTasks);
|
|
66
78
|
runner.registerTasks(v1_1.v1Tasks);
|
|
67
79
|
runner.registerTasks(v2_1.v2Tasks);
|
|
@@ -69,7 +81,7 @@ Source folder to migrate: ${baseDir}
|
|
|
69
81
|
if (options.testTasks) {
|
|
70
82
|
runner.registerTasks(test_1.testTasks);
|
|
71
83
|
}
|
|
72
|
-
let version =
|
|
84
|
+
let version = options.overwriteCurrentVersion;
|
|
73
85
|
/**
|
|
74
86
|
* Creates a replacer function for the package.json file.
|
|
75
87
|
* @param {string} version Version to set
|
|
@@ -112,14 +124,14 @@ Source folder to migrate: ${baseDir}
|
|
|
112
124
|
version = runner.getPendingMinVersion();
|
|
113
125
|
setVersionOfPublicUiPackages(version, runLoop);
|
|
114
126
|
}
|
|
115
|
-
else if (semver_1.default.lt(version,
|
|
127
|
+
else if (semver_1.default.lt(version, options.overwriteTargetVersion)) {
|
|
116
128
|
// CLI
|
|
117
|
-
version =
|
|
129
|
+
version = options.overwriteTargetVersion;
|
|
118
130
|
setVersionOfPublicUiPackages(version, finish);
|
|
119
131
|
}
|
|
120
|
-
else if (semver_1.default.lt(version,
|
|
132
|
+
else if (semver_1.default.lt(version, options.overwriteCurrentVersion)) {
|
|
121
133
|
// Components
|
|
122
|
-
version =
|
|
134
|
+
version = options.overwriteCurrentVersion;
|
|
123
135
|
setVersionOfPublicUiPackages(version, finish);
|
|
124
136
|
}
|
|
125
137
|
else {
|
|
@@ -130,10 +142,17 @@ Source folder to migrate: ${baseDir}
|
|
|
130
142
|
* Prints the status of the task runner and the modified files.
|
|
131
143
|
*/
|
|
132
144
|
function finish() {
|
|
145
|
+
var _a, _b;
|
|
133
146
|
console.log(`
|
|
134
147
|
Status of all executed Tasks:`);
|
|
135
148
|
const status = runner.getStatus(true);
|
|
136
|
-
|
|
149
|
+
// Merge config with current config of Runner
|
|
150
|
+
config = {
|
|
151
|
+
migrate: {
|
|
152
|
+
tasks: Object.assign(Object.assign({}, (_a = status.config.migrate) === null || _a === void 0 ? void 0 : _a.tasks), (_b = config.migrate) === null || _b === void 0 ? void 0 : _b.tasks),
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
fs_1.default.writeFileSync(configFile, JSON.stringify(config, null, 2));
|
|
137
156
|
console.log(`
|
|
138
157
|
Modified files: ${reuse_1.MODIFIED_FILES.size}`);
|
|
139
158
|
reuse_1.MODIFIED_FILES.forEach((file) => {
|
|
@@ -24,7 +24,7 @@ class TaskRunner {
|
|
|
24
24
|
this.setBaseDir(baseDir);
|
|
25
25
|
this.setCliVersion(cliVersion);
|
|
26
26
|
this.setProjectVersion(projectVersion);
|
|
27
|
-
this.setConfig(config);
|
|
27
|
+
this.setConfig(Object.assign({}, config)); // clone config
|
|
28
28
|
}
|
|
29
29
|
setBaseDir(baseDir) {
|
|
30
30
|
if (!fs_1.default.existsSync(path_1.default.resolve(process.cwd(), baseDir))) {
|
|
@@ -14,6 +14,7 @@ const removeLineBreaksAndSpaces = (match) => {
|
|
|
14
14
|
class LabelExpertSlot extends abstract_task_1.AbstractTask {
|
|
15
15
|
constructor(identifier, tag, property, versionRange, dependentTasks, options) {
|
|
16
16
|
super(identifier, `Move innerText of "${tag}" component to property "${property}"`, types_1.MARKUP_EXTENSIONS, versionRange, dependentTasks, options);
|
|
17
|
+
this.tag = tag;
|
|
17
18
|
this.property = property;
|
|
18
19
|
if (!reuse_1.isTagKebabCaseRegExp.test(tag)) {
|
|
19
20
|
throw (0, reuse_1.logAndCreateError)(`Tag "${tag}" is not in kebab case.`);
|
|
@@ -58,7 +59,7 @@ class LabelExpertSlot extends abstract_task_1.AbstractTask {
|
|
|
58
59
|
if (typeof args[2] === 'string' && args[2].includes('{')) {
|
|
59
60
|
args[2] = args[2].replace(/\{/g, '${');
|
|
60
61
|
}
|
|
61
|
-
return `<${args[1]} ${this.propertyInCamelCase}={\`${args[2]}\`}
|
|
62
|
+
return `<${args[1]} ${this.propertyInCamelCase}={\`${args[2]}\`}/>`;
|
|
62
63
|
})
|
|
63
64
|
.replace(this.componentNoLabelPropRegExp, this.addMissingEmptyLabelToActivateExpertSlot.bind(this));
|
|
64
65
|
if (content !== newContent) {
|
|
@@ -68,13 +69,18 @@ class LabelExpertSlot extends abstract_task_1.AbstractTask {
|
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
71
|
transpileCustomElementFileDelete(baseDir) {
|
|
71
|
-
(0, reuse_1.filterFilesByExt)(baseDir, types_1.
|
|
72
|
+
(0, reuse_1.filterFilesByExt)(baseDir, types_1.CUSTOM_ELEMENT_FILE_EXTENSIONS).forEach((file) => {
|
|
72
73
|
const content = fs_1.default.readFileSync(file, 'utf8');
|
|
73
74
|
const newContent = content
|
|
74
75
|
// Replacements
|
|
75
76
|
.replace(this.customElementRegExp, removeLineBreaksAndSpaces)
|
|
76
|
-
.replace(this.customElementRegExp,
|
|
77
|
-
|
|
77
|
+
.replace(this.customElementRegExp, (...args) => {
|
|
78
|
+
if (typeof args[2] === 'string' && args[2].includes('{')) {
|
|
79
|
+
args[2] = args[2].replace(/\{/g, '${');
|
|
80
|
+
}
|
|
81
|
+
return `<${args[1]} ${this.propertyInCamelCase}="${args[2]}"></${this.tag}>`;
|
|
82
|
+
})
|
|
83
|
+
.replace(this.customElementNoLabelPropRegExp, this.addMissingEmptyLabelToActivateExpertSlot.bind(this));
|
|
78
84
|
if (content !== newContent) {
|
|
79
85
|
reuse_1.MODIFIED_FILES.add(file);
|
|
80
86
|
fs_1.default.writeFileSync(file, newContent);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ButtonLinkRenamePropertyIconToIcons = exports.ButtonLinkRenamePropertyIconOnlyToHideLabel = exports.ButtonLinkRemovePropertyAriaLabel = exports.ButtonLinkRemovePropertyAriaCurrent =
|
|
3
|
+
exports.ButtonLinkRenamePropertyIconToIcons = exports.ButtonLinkRenamePropertyIconOnlyToHideLabel = exports.ButtonLinkRemovePropertyAriaLabel = exports.ButtonLinkRemovePropertyAriaCurrent = void 0;
|
|
4
4
|
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
5
|
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
6
|
-
exports.ButtonLinkRemovePropertyAccessKey = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-button-link', '_access-key', '^1');
|
|
7
6
|
exports.ButtonLinkRemovePropertyAriaCurrent = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-button-link', '_aria-current', '^1');
|
|
8
7
|
exports.ButtonLinkRemovePropertyAriaLabel = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-button-link', '_aria-label', '^1');
|
|
9
8
|
exports.ButtonLinkRenamePropertyIconOnlyToHideLabel = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-button-link', '_icon-only', '_hide-label', '^1');
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ButtonRenamePropertyIconToIcons = exports.ButtonRenamePropertyIconOnlyToHideLabel = exports.ButtonRemovePropertyIconAlign = exports.ButtonRemovePropertyAriaLabel = exports.ButtonRemovePropertyAriaCurrent =
|
|
3
|
+
exports.ButtonRenamePropertyIconToIcons = exports.ButtonRenamePropertyIconOnlyToHideLabel = exports.ButtonRemovePropertyIconAlign = exports.ButtonRemovePropertyAriaLabel = exports.ButtonRemovePropertyAriaCurrent = void 0;
|
|
4
4
|
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
5
|
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
6
|
-
exports.ButtonRemovePropertyAccessKey = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-button', '_access-key', '^1');
|
|
7
6
|
exports.ButtonRemovePropertyAriaCurrent = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-button', '_aria-current', '^1');
|
|
8
7
|
exports.ButtonRemovePropertyAriaLabel = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-button', '_aria-label', '^1');
|
|
9
8
|
// @todo: handle _icon-align in _icon
|
|
@@ -54,12 +54,10 @@ exports.v1Tasks.push(badge_1.BadgeRemovePropertyIconOnly);
|
|
|
54
54
|
exports.v1Tasks.push(badge_1.BadgeRenamePropertyIconOnlyToHideLabel);
|
|
55
55
|
exports.v1Tasks.push(badge_1.BadgeRenamePropertyIconToIcons);
|
|
56
56
|
exports.v1Tasks.push(breadcrumb_1.BreadcrumbRenamePropertyAriaLabelToLabel);
|
|
57
|
-
exports.v1Tasks.push(button_link_1.ButtonLinkRemovePropertyAccessKey);
|
|
58
57
|
exports.v1Tasks.push(button_link_1.ButtonLinkRemovePropertyAriaCurrent);
|
|
59
58
|
exports.v1Tasks.push(button_link_1.ButtonLinkRemovePropertyAriaLabel);
|
|
60
59
|
exports.v1Tasks.push(button_link_1.ButtonLinkRenamePropertyIconOnlyToHideLabel);
|
|
61
60
|
exports.v1Tasks.push(button_link_1.ButtonLinkRenamePropertyIconToIcons);
|
|
62
|
-
exports.v1Tasks.push(button_1.ButtonRemovePropertyAccessKey);
|
|
63
61
|
exports.v1Tasks.push(button_1.ButtonRemovePropertyAriaCurrent);
|
|
64
62
|
exports.v1Tasks.push(button_1.ButtonRemovePropertyAriaLabel);
|
|
65
63
|
exports.v1Tasks.push(button_1.ButtonRemovePropertyIconAlign);
|
|
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.v2Tasks = void 0;
|
|
4
4
|
const card_1 = require("./card");
|
|
5
5
|
const link_group_1 = require("./link-group");
|
|
6
|
-
const nav_1 = require("./nav");
|
|
7
6
|
exports.v2Tasks = [];
|
|
8
7
|
exports.v2Tasks.push(card_1.CardRemovePropertyHasFooter);
|
|
9
8
|
exports.v2Tasks.push(link_group_1.LinkGroupRemovePropertyLevel);
|
|
10
|
-
exports.v2Tasks.push(nav_1.NavRemovePropertyHasCompactButton);
|
package/dist/types.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MARKUP_EXTENSIONS = exports.CUSTOM_ELEMENT_FILE_EXTENSIONS = exports.COMPONENT_FILE_EXTENSIONS = exports.FILE_EXTENSIONS = void 0;
|
|
4
|
-
exports.FILE_EXTENSIONS = ['html', 'js', 'json', 'jsx', 'ts', 'tsx', 'vue'];
|
|
5
|
-
exports.COMPONENT_FILE_EXTENSIONS = ['jsx', 'tsx', 'vue'];
|
|
6
|
-
exports.CUSTOM_ELEMENT_FILE_EXTENSIONS = ['html', 'jsx', 'tsx', 'vue'];
|
|
4
|
+
exports.FILE_EXTENSIONS = ['html', 'js', 'json', 'jsx', 'md', 'mdx', 'ts', 'tsx', 'vue'];
|
|
5
|
+
exports.COMPONENT_FILE_EXTENSIONS = ['jsx', 'mdx', 'tsx', 'vue'];
|
|
6
|
+
exports.CUSTOM_ELEMENT_FILE_EXTENSIONS = ['html', 'jsx', 'md', 'mdx', 'tsx', 'vue'];
|
|
7
7
|
exports.MARKUP_EXTENSIONS = exports.COMPONENT_FILE_EXTENSIONS.concat(exports.CUSTOM_ELEMENT_FILE_EXTENSIONS);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/kolibri-cli",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.10",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": "https://github.com/public-ui/kolibri",
|
|
@@ -27,22 +27,22 @@
|
|
|
27
27
|
"semver": "7.5.4"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@public-ui/components": "2.0.0-rc.
|
|
31
|
-
"@types/gradient-string": "1.1.
|
|
32
|
-
"@types/node": "20.8.
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
34
|
-
"@typescript-eslint/parser": "6.
|
|
30
|
+
"@public-ui/components": "2.0.0-rc.10",
|
|
31
|
+
"@types/gradient-string": "1.1.5",
|
|
32
|
+
"@types/node": "20.8.10",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "6.10.0",
|
|
34
|
+
"@typescript-eslint/parser": "6.10.0",
|
|
35
35
|
"cpy-cli": "5.0.0",
|
|
36
36
|
"depcheck": "1.4.7",
|
|
37
|
-
"eslint": "8.
|
|
37
|
+
"eslint": "8.53.0",
|
|
38
38
|
"eslint-config-prettier": "9.0.0",
|
|
39
39
|
"eslint-plugin-html": "7.1.0",
|
|
40
40
|
"eslint-plugin-jsdoc": "46.8.2",
|
|
41
41
|
"eslint-plugin-json": "3.1.0",
|
|
42
|
-
"eslint-plugin-jsx-a11y": "6.
|
|
42
|
+
"eslint-plugin-jsx-a11y": "6.8.0",
|
|
43
43
|
"eslint-plugin-no-loops": "0.3.0",
|
|
44
44
|
"eslint-plugin-react": "7.33.2",
|
|
45
|
-
"knip": "2.
|
|
45
|
+
"knip": "2.40.0",
|
|
46
46
|
"mocha": "10.2.0",
|
|
47
47
|
"nodemon": "3.0.1",
|
|
48
48
|
"rimraf": "3.0.2",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavRemovePropertyHasCompactButton = void 0;
|
|
4
|
-
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
|
-
exports.NavRemovePropertyHasCompactButton = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-nav', '_has-compact-button', '^1');
|