@entur/typography 1.10.0-beta.12 → 1.10.0-beta.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur/typography",
3
- "version": "1.10.0-beta.12",
3
+ "version": "1.10.0-beta.13",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/typography.esm.js",
@@ -42,5 +42,5 @@
42
42
  "devDependencies": {
43
43
  "dts-cli": "2.0.5"
44
44
  },
45
- "gitHead": "2a01de420517ee321602ced4e534eada22e2a10c"
45
+ "gitHead": "c9b59ab0f79e2611a602951c89f4f2c8213e235f"
46
46
  }
@@ -663,6 +663,9 @@ function updateImports(content) {
663
663
  .split(',')
664
664
  .map(comp => comp.trim())
665
665
  .filter(comp => {
666
+ // Skip empty components
667
+ if (!comp) return false;
668
+
666
669
  // Keep components that are:
667
670
  // 1. Not in the migration mapping (old components), OR
668
671
  // 2. Are the target components (new beta components)
@@ -694,7 +697,13 @@ function updateImports(content) {
694
697
  ...existingComponents,
695
698
  ...Array.from(uniqueComponents),
696
699
  ];
697
- const finalImportList = allComponents.join(', ');
700
+
701
+ // Filter out any empty components and deduplicate
702
+ const finalComponents = allComponents
703
+ .filter(comp => comp && comp.trim())
704
+ .filter((comp, index, arr) => arr.indexOf(comp) === index); // Remove duplicates
705
+
706
+ const finalImportList = finalComponents.join(', ');
698
707
  return `import {${finalImportList}} from '${BETA_IMPORT}'`;
699
708
  }
700
709