diff --git a/README.md b/README.md
index 5dad59b..62aab9a 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,20 @@
# Barrel Roll
-Visual Studio Code extension to automatically export types, functions, constants, and classes through barrel files.
+[](https://github.com/Coderrob/barrel-roll/actions/workflows/ci.yml)
+[](https://marketplace.visualstudio.com/items?itemName=Coderrob.barrel-roll)
+[](https://marketplace.visualstudio.com/items?itemName=Coderrob.barrel-roll)
+[](LICENSE)
+[](https://github.com/Coderrob/barrel-roll/actions/workflows/ci.yml)
+[](package.json)
+
+Barrel Roll is a Visual Studio Code extension that makes barrel file creation and upkeep effortless. Right-click any folder, pick a Barrel Roll command, and the extension assembles a curated `index.ts` that reflects the exports your module actually exposes—no tedious manual wiring, no temptation to `export *` the entire directory.
+
+Whether you need a single barrel refreshed or an entire tree brought into alignment, Barrel Roll keeps your exports clean, consistent, and ready for real work. It discovers TypeScript exports, connects child barrels to their parents, and prevents duplicate re-exports so your team can focus on building features instead of shuffling files.
## Features
- **Right-click Generation**: Right-click any folder in the VS Code explorer to generate or update an `index.ts` barrel file
-- **Recursive Commands**: Generate barrels for a single folder, for an entire subtree, or sanitize existing barrels via dedicated context menu entries
+- **Two Command Modes**: Choose between updating just the selected directory or traversing the full subtree via dedicated context menu entries
- **Recursive Barrels**: Automatically walks child folders, generating barrels for every directory and wiring parent barrels to re-export their children
- **Smart Export Detection**: Automatically detects and exports all TypeScript exports (classes, interfaces, types, functions, constants, enums)
- **Clean Architecture**: Follows SOLID principles for maintainability and extensibility
@@ -17,25 +26,24 @@ Visual Studio Code extension to automatically export types, functions, constants
### From VS Code Marketplace
1. Open VS Code
-2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
-3. Search for "Barrel Roll"
-4. Click Install
+1. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
+1. Search for "Barrel Roll"
+1. Click Install
### From VSIX
1. Download the latest `.vsix` file from the [releases page](https://github.com/Coderrob/barrel-roll/releases)
-2. In VS Code, go to Extensions
-3. Click the `...` menu and select "Install from VSIX..."
-4. Select the downloaded file
+1. In VS Code, go to Extensions
+1. Click the `...` menu and select "Install from VSIX..."
+1. Select the downloaded file
## Usage
1. Right-click on any folder in the VS Code explorer
-2. Select one of the Barrel Roll commands:
- - `Barrel Roll: Generate/Update index.ts` (current folder only)
- - `Barrel Roll: Generate/Update index.ts (Recursive)` (folder and all subfolders)
- - `Barrel Roll: Update Existing index.ts Files` (refresh existing barrels without adding new ones)
-3. The extension will:
+1. Select one of the Barrel Roll commands:
+ - `Barrel Roll: Update Barrel Directory` (updates only the selected folder)
+ - `Barrel Roll: Update Barrel Directory (Recursive)` (updates the selected folder and all subfolders)
+1. The extension will:
- Scan all `.ts`/`.tsx` files in the folder (excluding `index.ts` and declaration files)
- Recursively process each subfolder and generate its `index.ts`
- Extract all exported items
@@ -145,4 +153,4 @@ Contributions are welcome! Please feel free to submit a Pull Request.
## License
-MIT
+Apache-2.0
diff --git a/badges/coverage.svg b/badges/coverage.svg
index a1823ef..0d60a6c 100644
--- a/badges/coverage.svg
+++ b/badges/coverage.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/core/barrel/barrel-content.builder.test.ts b/src/core/barrel/barrel-content.builder.test.ts
index 4bb07ab..a079848 100644
--- a/src/core/barrel/barrel-content.builder.test.ts
+++ b/src/core/barrel/barrel-content.builder.test.ts
@@ -92,6 +92,19 @@ describe('BarrelContentBuilder', () => {
);
});
+ it('should ignore undefined entries produced by legacy callers', () => {
+ const entries = new Map();
+ entries.set('ghost.ts', undefined as unknown as BarrelEntry);
+ entries.set('echo.ts', {
+ kind: BarrelEntryKind.File,
+ exports: [{ kind: BarrelExportKind.Value, name: 'Echo' }],
+ });
+
+ const result = builder.buildContent(entries, '');
+
+ assert.strictEqual(result.trim(), "export { Echo } from './echo';");
+ });
+
const parentDirectoryCases: Array