@foundrykit/cli 2.0.8 → 2.0.9

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": "@foundrykit/cli",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "glob": "^10.3.10",
26
26
  "inquirer": "^9.2.15",
27
27
  "node-fetch": "^3.3.0",
28
- "@foundrykit/types": "2.0.3"
28
+ "@foundrykit/types": "2.0.4"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^20.19.9",
@@ -731,19 +731,22 @@ function transformRegistryBarrelImports(
731
731
  'g'
732
732
  );
733
733
 
734
- return content.replace(importPattern, (match, imports: string, source: string) => {
735
- if (isPackageImportSpecifier(destinationBasePath)) {
736
- return match.replace(source, destinationBasePath);
737
- }
734
+ return content.replace(
735
+ importPattern,
736
+ (match, imports: string, source: string) => {
737
+ if (isPackageImportSpecifier(destinationBasePath)) {
738
+ return match.replace(source, destinationBasePath);
739
+ }
738
740
 
739
- const groupedImports = groupImportsByComponent(imports, config, category);
741
+ const groupedImports = groupImportsByComponent(imports, config, category);
740
742
 
741
- return Array.from(groupedImports.entries())
742
- .map(([componentPath, specifiers]) => {
743
- return `import { ${specifiers.join(', ')} } from "${destinationBasePath}/${componentPath}";`;
744
- })
745
- .join('\n');
746
- });
743
+ return Array.from(groupedImports.entries())
744
+ .map(([componentPath, specifiers]) => {
745
+ return `import { ${specifiers.join(', ')} } from "${destinationBasePath}/${componentPath}";`;
746
+ })
747
+ .join('\n');
748
+ }
749
+ );
747
750
  }
748
751
 
749
752
  function groupImportsByComponent(
@@ -451,7 +451,7 @@ import { cn } from "@foundrykit/utils";`;
451
451
  const source = `import {
452
452
  useAdvancedSearch,
453
453
  SearchContext,
454
- type EmptyStateBehaviour,
454
+ type EmptyStateBehavior,
455
455
  } from '@foundrykit/hooks';`;
456
456
 
457
457
  const transformed = transformImportsForConfig(
@@ -462,7 +462,7 @@ import { cn } from "@foundrykit/utils";`;
462
462
  expect(transformed).toBe(source);
463
463
  expect(transformed).not.toContain('@/hooks/use-advanced-search');
464
464
  expect(transformed).not.toContain('@/hooks/search-context');
465
- expect(transformed).not.toContain('@/hooks/empty-state-behaviour');
465
+ expect(transformed).not.toContain('@/hooks/empty-state-behavior');
466
466
  });
467
467
  });
468
468
  });