Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
* text=auto eol=lf

out/** -diff linguist-generated=true
dist/** -diff linguist-generated=true
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug Report
about: Report a bug to help us improve
title: '[Bug] '
labels: bug
assignees: ''
---

## Description

<!-- A clear description of the bug -->

## Steps to Reproduce

1.
2.
3.

## Expected Behavior

<!-- What you expected to happen -->

## Actual Behavior

<!-- What actually happened -->

## Environment

- VS Code Version:
- Extension Version:
- OS:

## Additional Context

<!-- Any other context, screenshots, or error messages -->
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Feature Request
about: Suggest a new feature or enhancement
title: '[Feature] '
labels: enhancement
assignees: ''
---

## Description

<!-- A clear description of the feature you'd like -->

## Use Case

<!-- Describe the problem this feature would solve -->

## Proposed Solution

<!-- How you envision this feature working -->

## Alternatives Considered

<!-- Any alternative solutions or features you've considered -->

## Additional Context

<!-- Any other context, mockups, or examples -->
26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Pull Request

## Description

<!-- Briefly describe the changes in this PR -->

## Type of Change

- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
- [ ] Refactoring
- [ ] Other (please describe)

## Checklist

- [ ] I have tested my changes locally
- [ ] I have added/updated tests as needed
- [ ] I have updated documentation as needed
- [ ] My code follows the project's coding standards
- [ ] I have run `npm run lint` and `npm run format:check`

## Related Issues

<!-- Link any related issues: Fixes #123, Closes #456 -->
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18.x, 20.x, 22.x]
node-version: [20.x, 22.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -26,6 +26,9 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Check for unused dependencies
run: npm run deps:check

- name: Type check
run: npm run typecheck

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Check for unused dependencies
run: npm run deps:check

- name: Package extension
run: npm run package

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ package-lock.json*

# Build outputs
lib/
out/
dist/
build/
*.vsix

# Test outputs
coverage/
.nyc_output/
*.lcov
.depcheck.json

# Logs
logs/
Expand Down
2 changes: 1 addition & 1 deletion .jscpd.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"**/__mocks__/**",
"**/coverage/**",
"**/node_modules/**",
"**/out/**"
"**/dist/**"
],
"minLines": 5,
"minTokens": 70,
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ badges/
# Build artifacts
.vscode-test/
audit/
out/
dist/
coverage/
node_modules/
*.log
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
audit/
coverage/
node_modules/
out/
dist/
script/*.sh
27 changes: 27 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,36 @@
src/**
.gitignore
.yarnrc
.yarn/**
coverage/**
webpack.config.js
webpack.config.cjs
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
node_modules/**
.npmignore
.prettierignore
.prettierrc.json
.jscpd.json
.markdownlint.yml
.yaml-lint.yml
.dependency-cruiser.cjs
.nvmrc
.editorconfig
.github/**
.devcontainer/**
scripts/**
tsconfig.test-suite.json
tsconfig.test.json
eslint.config.mjs
ARCHITECTURE.md
CHANGELOG.md
CONTRIBUTING.md
badges/**
!badges/coverage.svg
public/img/**
!public/img/barrel-roll-icon.png
dist/**
!dist/extension.js
5 changes: 0 additions & 5 deletions .yarnrc.yml

This file was deleted.

52 changes: 52 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Agents & Automation

This file documents automation, scripts, and "agent"-style tooling used in the repository.

## Overview

- Purpose: centralize notes about automation, dependency checks, CI steps, and conventions so they are easy to find and maintain.

## Dependency checks

- Canonical runner: `scripts/run-depcheck.cjs`
- Command: `npm run deps:check`
- Behavior: runs `depcheck` programmatically, writes `.depcheck.json`, filters references found in repository files and scripts, and exits non-zero if unused packages remain.
- Rationale: avoids `npx` platform issues and ensures CI and local runs behave identically.

## Testing & test conventions

- Test naming: all unit test titles must start with the word `should` (e.g., `should return true when input is null`). This is enforced by an ESLint rule.
- Shared test helpers: use `src/test/testTypes.ts` for common test utilities (fake URIs, logger helpers, etc.).
- Test runner: `scripts/run-tests.js` executes the test suite; invoked by `npm test` and `npm run test:unit`.
- Commands:
- `npm test` — full pipeline (compile tests, compile extension, lint, then run tests)
- `npm run test:unit` — quick test run (compile tests and extension, then run tests without linting)
- `npm run test:vscode` — VS Code integration tests (compile tests, then run VS Code test harness)

## Packaging & release

- Packaging: `npm run package` / `npm run ext:package`
- Install packaged VSIX locally: `npm run ext:install`
- Quick reinstall: `npm run ext:reinstall` (packages and installs the latest vsix using `scripts/install-extension.cjs` which uses package.json version)

## CI

- The CI workflows run the dependency check and tests. See `.github/workflows/ci.yml` and `.github/workflows/release.yml`.

## How to run locally

```bash
# install deps
npm install

# run dependency check
npm run deps:check

# run lint + dependency check
npm run lint

# run tests
npm test
```

If you have questions about automation or want to extend the tooling, please open a PR or ask in the repository discussion.
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ barrel-roll/
│ └── dependency-graph.md # Dependency analysis reports
├── .vscode/ # VS Code workspace config
├── .github/workflows/ # CI/CD pipelines
└── out/ # TypeScript compiled output
└── dist/ # TypeScript compiled output

```

Expand Down Expand Up @@ -216,7 +216,7 @@ All services throw descriptive errors that bubble up to the extension entry poin

### Development

1. **TypeScript Compilation**: `tsc` → `out/` directory
1. **TypeScript Compilation**: `tsc` → `dist/` directory

### Production

Expand Down
26 changes: 15 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@

All notable changes to the "barrel-roll" extension will be documented in this file.

## [0.0.1] - Initial Release
## [Unreleased]

### Added

- Initial release of Barrel Roll extension
- Right-click context menu for directories to generate barrel files
- Automatic detection of TypeScript exports (classes, interfaces, types, functions, constants, enums)
- Smart filtering of parent folder re-exports
- SOLID architecture with clear separation of concerns
- Comprehensive test suite
- CI/CD workflows for building and releasing
- Full TypeScript support with type checking
- ESLint configuration for code quality
- Prettier configuration for consistent formatting
- Programmatic dependency checker: `scripts/run-depcheck.cjs` and `npm run deps:check` (used by `npm run lint` and CI)
- `AGENTS.md` documenting automation, dependency checks, and developer conventions
- Coverage reporting and badge generation (`c8` + `make-coverage-badge`)
- Scripts for packaging and local install: `scripts/install-extension.cjs`, `npm run ext:package`, `npm run ext:install`, `npm run ext:reinstall`

### Changed

- Consolidated depcheck runner and removed forwarder shims; unified dependency checking across local runs and CI
- Enforced test naming convention (`should ...`) via ESLint and centralized shared test helpers in `src/test/testTypes.ts`
- Optimized packaging and VSIX contents to reduce artifact size
- Made pino logging robust for bundling by removing transport dependencies and adding webpack IgnorePlugin
- Added c8 coverage thresholds and badge generation to the repository scripts

> Note: This project is in pre-release development; no prior released version is recorded in this log.
Loading