Skip to content

Commit

Permalink
feat(compatibility): adapt compatibility module to new > semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
Falcion committed Oct 22, 2024
1 parent 492802c commit 47b5f80
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions source/addons/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,27 @@ export default class CompatibilityModule {
private async convert(data: any, version: string): Promise<boolean> {
const settingsMap: { [key: string]: any } = {
'1.*': {
extensions: data['extensions'].replace(',', ';'),
forced_extensions: data['force_extensions'].replace(',', ';'),
extensions: data['extensions'].replace(',', '>'),
forced_extensions: data['force_extensions'].replace(',', '>'),
is_onload: Boolean(data['is_dynamic_on']),
},
'2.0': {
extensions: data['extensions'].replace(',', ';'),
extensions: data['extensions'].replace(',', '>'),
grouped_extensions: data['grouped_extensions'].replace(',', '>'),
},
'2.1': {
grouped_extensions: data['grouped_extensions'].replace(',', '>'),
extensions: data['extensions'].replace(';', '>'),
forced_extensions: data['forced_extensions'].replace(';', '>'),
ignore_extensions: data['ignore_extensions'].replace(';', '>'),
ignore_masks: data['ignore_masks'].replace(';', '>'),
},
'2.4': {
grouped_extensions: data['grouped_extensions'].replace(',', '>'),
extensions: data['extensions'].replace(';', '>'),
forced_extensions: data['forced_extensions'].replace(';', '>'),
ignore_extensions: data['ignore_extensions'].replace(';', '>'),
ignore_masks: data['ignore_masks'].replace(';', '>'),
},
};

Expand Down

0 comments on commit 47b5f80

Please sign in to comment.