@lang-tag/cli 0.18.1 → 0.20.0

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.
@@ -35,7 +35,7 @@ function applyCaseTransform(str, caseType) {
35
35
  }
36
36
  class DictionaryCollector extends namespaceCollector.TranslationsCollector {
37
37
  constructor(options = {
38
- appendNamespaceToPath: false
38
+ appendNamespaceToPath: true
39
39
  }) {
40
40
  super();
41
41
  this.options = options;
@@ -214,7 +214,7 @@ function pathBasedConfigGenerator(options = {}) {
214
214
  );
215
215
  path$1 = transformedParts.join(".");
216
216
  }
217
- const newConfig = event.config ? { ...event.config } : {};
217
+ const newConfig = event.getCurrentConfig();
218
218
  if (clearOnDefaultNamespace && namespace === actualFallbackNamespace) {
219
219
  if (path$1) {
220
220
  newConfig.path = path$1;
@@ -442,13 +442,10 @@ function configKeeper(options = {}) {
442
442
  if (keepMode !== "namespace" && keepMode !== "path" && keepMode !== "both") {
443
443
  return;
444
444
  }
445
- let restoredConfig;
445
+ let restoredConfig = event.getCurrentConfig();
446
446
  if (event.savedConfig === null) {
447
- restoredConfig = { ...event.config };
448
447
  delete restoredConfig.namespace;
449
448
  delete restoredConfig.path;
450
- } else {
451
- restoredConfig = { ...event.savedConfig };
452
449
  }
453
450
  let needsSave = false;
454
451
  const restorePropertyIfNeeded = (propertyKey) => {
@@ -17,7 +17,7 @@ function applyCaseTransform(str, caseType) {
17
17
  }
18
18
  class DictionaryCollector extends TranslationsCollector {
19
19
  constructor(options = {
20
- appendNamespaceToPath: false
20
+ appendNamespaceToPath: true
21
21
  }) {
22
22
  super();
23
23
  this.options = options;
@@ -196,7 +196,7 @@ function pathBasedConfigGenerator(options = {}) {
196
196
  );
197
197
  path2 = transformedParts.join(".");
198
198
  }
199
- const newConfig = event.config ? { ...event.config } : {};
199
+ const newConfig = event.getCurrentConfig();
200
200
  if (clearOnDefaultNamespace && namespace === actualFallbackNamespace) {
201
201
  if (path2) {
202
202
  newConfig.path = path2;
@@ -424,13 +424,10 @@ function configKeeper(options = {}) {
424
424
  if (keepMode !== "namespace" && keepMode !== "path" && keepMode !== "both") {
425
425
  return;
426
426
  }
427
- let restoredConfig;
427
+ let restoredConfig = event.getCurrentConfig();
428
428
  if (event.savedConfig === null) {
429
- restoredConfig = { ...event.config };
430
429
  delete restoredConfig.namespace;
431
430
  delete restoredConfig.path;
432
- } else {
433
- restoredConfig = { ...event.savedConfig };
434
431
  }
435
432
  let needsSave = false;
436
433
  const restorePropertyIfNeeded = (propertyKey) => {