Skip to content

Feature/#28 change package name#29

Merged
cawpea merged 12 commits into
developfrom
feature/#28_change-package-name
Jan 1, 2026
Merged

Feature/#28 change package name#29
cawpea merged 12 commits into
developfrom
feature/#28_change-package-name

Conversation

@cawpea

@cawpea cawpea commented Jan 1, 2026

Copy link
Copy Markdown
Owner

Issue

closes #28

cawpea and others added 6 commits January 1, 2026 00:05
fix: cause error by rollup module on release
# 1.0.0 (2025-12-31)

### Bug Fixes

* add npm rebuild step to resolve rollup native binary issue in CI ([4ec06ad](4ec06ad))
* add pull-requests write permission to claude-code-review workflow ([be5b41d](be5b41d))
* add rollup as explicit devDependency to resolve CI build issue ([01061e5](01061e5))
* clear npm cache to resolve rollup native binary issue in CI ([0cd15bd](0cd15bd))
* correct collectCoverageFrom pattern order in Jest config ([dbac613](dbac613))
* prevent command injection in git-diff by using spawnSync ([105a9c2](105a9c2))
* reinstall rollup to ensure native binaries are installed in CI ([389e7af](389e7af))
* run npm install after npm ci to fix rollup native binary issue ([2816913](2816913))
* translate remaining japanese character to english in src/utils/fix.ts ([68c57ba](68c57ba))
* update project root to use config ([97724b3](97724b3))

### Features

* add ESLint configuration for scripts directory ([236ad04](236ad04))
* add variable reference support in CODE_REF ([d098259](d098259))
* implement CLI with commander and programmatic API ([3ec29f8](3ec29f8))
* implement configuration system ([43bf006](43bf006))
* integrate configuration system into fix.ts ([6192ccd](6192ccd))
* integrate configuration system into validate.ts ([b6638ef](b6638ef))
* migrate core logic and utils from figma-a11y-reviewer ([19efe8c](19efe8c))
* translate comments and logs to english in src/cli/fix.ts ([f4cd0b8](f4cd0b8))
* translate comments and messages to english in src/core/validate.ts and tests ([79f609e](79f609e))
* translate comments and messages to english in src/utils/fix.ts and tests ([7b2dafb](7b2dafb))
* translate japanese logs and comments to english ([4a20066](4a20066))
# [1.0.0](v0.1.0...v1.0.0) (2026-01-01)

### Bug Fixes

* exclude CODE_REF comments in unclosed code blocks from validation ([f1f5287](f1f5287))
* handle variable-length backtick sequences in code blocks ([b5674ad](b5674ad))

### Features

* remove default .docsignore value from configuration ([67967d3](67967d3))

### BREAKING CHANGES

* The `ignoreFile` configuration no longer defaults to '.docsignore'.
To continue using .docsignore, explicitly set `ignoreFile: '.docsignore'` in your
configuration file (.coderefrc.json or package.json).

This change makes the ignore file behavior explicit rather than implicit, applying
ignore patterns only when intentionally configured. All documentation examples now
use `.gitignore` instead of `.docsignore` to reflect this generic approach.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changes:
- Package name: @cawpea/coderef → docs-coderef (remove scope)
- CLI command: coderef → docs-coderef
- Config file: .coderefrc.json → .docs-coderefrc.json
- package.json field: "coderef" → "docs-coderef"
- Environment variables: CODEREF_* → DOCS_CODEREF_*
- Binary: bin/coderef.js → bin/docs-coderef.js
- Repository URLs updated to cawpea/docs-coderef

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jan 1, 2026

Copy link
Copy Markdown

Code Review

Overview

This PR implements a package rename from @cawpea/coderef to docs-coderef (removing the scoped package). This is a significant breaking change that affects the package name, CLI command, configuration files, and environment variables.


✅ Positive Aspects

  1. Comprehensive Rename: The changes are thorough and cover all necessary areas:

    • Package name in package.json
    • CLI binary name (bin/docs-coderef.js)
    • Configuration file references (.docs-coderefrc.json)
    • Environment variable prefixes (DOCS_CODEREF_*)
    • Repository URLs
    • All documentation files
  2. Test Coverage: The test suite (src/config.test.ts) has been properly updated to reflect the new naming conventions, including:

    • Config file name changes
    • Environment variable prefix changes
    • package.json field name changes
  3. Documentation Updates: Extensive documentation updates across all user-facing files (README, user guides, architecture docs)

  4. Consistency: The naming is now more descriptive and follows a clear pattern


🐛 Issues Found

Critical Issue: CHANGELOG.md Line 14

Location: CHANGELOG.md:14

- **Config file**: Renamed from `.docs-coderefrc.json` to `.docs-coderefrc.json`

Problem: This line shows the config file being renamed from .docs-coderefrc.json to .docs-coderefrc.json (identical names). This is clearly an error.

Expected: Should be:

- **Config file**: Renamed from `.coderefrc.json` to `.docs-coderefrc.json`

📋 Recommendations

1. Breaking Change Communication (High Priority)

This is a major breaking change that will affect all existing users. Consider:

  • Adding a migration guide in the documentation
  • Providing a script or clear steps for users to migrate from @cawpea/coderef to docs-coderef
  • Documenting what users need to change:
    • Update their package.json dependency
    • Rename config files (.coderefrc.json.docs-coderefrc.json)
    • Update environment variables (CODEREF_*DOCS_CODEREF_*)
    • Update CLI commands (coderefdocs-coderef)
    • Update package.json config field ("coderef""docs-coderef")

2. Version Bump (Medium Priority)

The package.json shows version 1.0.0, which is already released according to the CHANGELOG. Since this is a breaking change:

  • Consider if this should be 2.0.0 (if 1.0.0 was already published with the old name)
  • Or keep 1.0.0 if this is being done before the actual 1.0.0 release

3. Testing (High Priority)

Before merging:

  • Run the full test suite to ensure all changes work correctly
  • Test the CLI manually with the new docs-coderef command
  • Verify environment variables work with the new DOCS_CODEREF_* prefix
  • Test that the new config file name is properly detected

4. Package Scope Consideration (Low Priority - Informational)

Removing the package scope (@cawpea/) means:

  • The package name docs-coderef must be unique across all of npm (not just your namespace)
  • If not already done, verify that docs-coderef is available on npm
  • The publishConfig.access: "public" in package.json is now redundant (only needed for scoped packages)

🔒 Security Concerns

No security issues identified in this refactoring.


⚡ Performance Concerns

No performance implications from this naming change.


🧪 Test Coverage

Test coverage appears adequate - the config tests have been properly updated to test the new naming conventions. However, I recommend running the full test suite before merge to ensure nothing was missed.


📚 Documentation

Documentation has been comprehensively updated. However, consider adding:

  1. A migration guide for existing users
  2. A note in the README about the package rename (if there were prior releases under the old name)

Summary

The PR is well-executed with comprehensive changes across the codebase. The main blocker is the CHANGELOG.md error on line 14 that must be fixed before merge. Additionally, strong consideration should be given to migration documentation for existing users.

Recommendation: Request changes to fix the CHANGELOG error, then approve after verification.

cawpea and others added 3 commits January 1, 2026 17:14
@github-actions

github-actions Bot commented Jan 1, 2026

Copy link
Copy Markdown

Pull Request Review: Package Rename from @cawpea/coderef to docs-coderef

Summary

This PR successfully renames the package from @cawpea/coderef to docs-coderef, removing the npm scope. The changes are comprehensive and well-executed across all relevant files.

✅ Strengths

Comprehensive Coverage

  • All references updated: Package name, CLI command, config files, environment variables, and repository URLs are consistently updated across 17 files
  • Documentation thoroughness: All user-facing documentation, code comments, and examples have been updated
  • Test alignment: Test files properly updated to reflect new naming conventions

Consistency

  • Naming is consistent across:
    • Package name: @cawpea/coderefdocs-coderef
    • CLI command: coderefdocs-coderef
    • Config file: .coderefrc.json.docs-coderefrc.json
    • package.json field: "coderef""docs-coderef"
    • Environment variables: CODEREF_*DOCS_CODEREF_*

Excellent Changelog

  • CHANGELOG.md properly documents all breaking changes
  • Clear migration path for users

📝 Issues & Recommendations

🔴 Critical: Version Bump Missing

Issue: The package version remains at 0.1.0 in package.json:8, but this is a major breaking change that requires a version bump.

Impact: According to your semantic versioning conventions, changing:

  • Package name
  • CLI command name
  • Config file name
  • Environment variable names
  • package.json field name

All of these are breaking changes that will break existing user setups.

Recommendation:

- "version": "0.1.0",
+ "version": "1.0.0",

Since this is pre-1.0, you could also consider bumping to 0.2.0 if you want to stay in beta, but given the scope of breaking changes, 1.0.0 would be more appropriate.

⚠️ High Priority: Missing Migration Guide

Issue: While CHANGELOG.md lists the changes, there's no dedicated migration guide for users upgrading from @cawpea/coderef.

Recommendation: Add a MIGRATION.md or a dedicated section in the changelog with step-by-step migration instructions:

## Migration from @cawpea/coderef to docs-coderef

1. Update package.json:
   - Change `"@cawpea/coderef"` to `"docs-coderef"`
   - Rename the config field from `"coderef"` to `"docs-coderef"`

2. Rename config file:
   - `.coderefrc.json``.docs-coderefrc.json`

3. Update environment variables:
   - `CODEREF_*``DOCS_CODEREF_*`

4. Update CLI commands in scripts:
   - `coderef``docs-coderef`

5. Update imports in code:
   - `from '@cawpea/coderef'``from 'docs-coderef'`

⚠️ Medium Priority: Binary File Rename

Issue: The binary file was renamed from bin/coderef.js to bin/docs-coderef.js, but the old file might still exist in the repository if it wasn't explicitly deleted via git.

Recommendation: Verify with:

git status
git ls-files | grep "bin/"

If bin/coderef.js still exists, it should be deleted.

📦 Package.json Field Name

Observation: Using "docs-coderef" as a package.json field name works, but the hyphen is unconventional for JSON keys in package.json.

Current (src/config.ts:120):

return packageJson['docs-coderef'] || null;

Consideration: While this works perfectly fine, consider if a camelCase alternative like docsCoderef would be more idiomatic. However, this is a minor style preference and the current approach maintains consistency with the package name, which is valid.

🧪 Test Coverage Observations

Good: Tests have been updated comprehensively:

  • Environment variable tests updated (src/config.test.ts:132-135)
  • Config file tests updated (src/config.test.ts:61-75)
  • package.json field tests updated (src/config.test.ts:79-95)

No Issues Found: All test updates appear correct and maintain coverage.

📄 Documentation Quality

Excellent: Documentation updates are thorough and consistent:

  • User guides updated with new command names
  • API examples updated with new package name
  • Installation instructions updated
  • Development documentation updated

🔒 Security Concerns

None identified: This is purely a renaming refactor with no security implications.

⚡ Performance Concerns

None: No performance impact from these changes.

🎯 Code Quality

Adherence to Coding Standards

  • ✅ Follows conventional commits format
  • ✅ 2-space indentation maintained
  • ✅ Consistent string formatting
  • ✅ No linting issues introduced

Best Practices

  • ✅ Single responsibility: PR focuses solely on the rename
  • ✅ Backward compatibility consideration: Breaking changes are clearly documented
  • ✅ Error messages updated appropriately (src/config.ts:102)

🧪 Test Coverage

Status: ✅ Adequate

All config system tests have been updated:

  • .docs-coderefrc.json loading tests
  • Environment variable tests with new prefix
  • package.json field tests with new field name
  • Precedence tests updated

No gaps identified in test coverage for the rename.

📚 Documentation Needs

Required Before Merge:

  1. Version bump to 1.0.0 (or 0.2.0)
  2. Migration guide for existing users

Recommended:

  1. Consider adding a deprecation notice if @cawpea/coderef package will remain published on npm with a deprecation message pointing to docs-coderef

🎬 Summary

This is a well-executed comprehensive rename with only a few critical items to address before merging:

Must Fix Before Merge:

  • Bump version to reflect breaking changes (1.0.0 recommended)
  • Add migration guide for users

Should Consider:

  • Verify old binary file is deleted from git
  • Add npm deprecation notice for old package name (if applicable)

Commit Type Recommendation:

This should use commit type feat!: or chore!: (with the ! indicating breaking changes):

chore!: rename package from @cawpea/coderef to docs-coderef

BREAKING CHANGE: Package renamed to docs-coderef with updated CLI commands,
config files, and environment variables. See MIGRATION.md for upgrade guide.

Overall, this is high-quality work with excellent attention to detail. Once the version is bumped and migration guide is added, this will be ready to merge. Great job on the thoroughness! 🎉

@github-actions

github-actions Bot commented Jan 1, 2026

Copy link
Copy Markdown

Pull Request Review: Package Rename from @cawpea/coderef to docs-coderef

Summary

This PR successfully renames the package from @cawpea/coderef to docs-coderef, removing the npm scope. The changes are comprehensive and cover all necessary areas including code, configuration, documentation, and tests.

✅ Positive Aspects

1. Comprehensive Rename

  • All references updated consistently across the codebase
  • Package name, CLI command, config file, and environment variables all renamed
  • Binary path updated from bin/coderef.js to bin/docs-coderef.js
  • Repository URLs updated to cawpea/docs-coderef

2. Documentation Quality

  • Excellent CHANGELOG.md update with clear breakdown of changes
  • README.md properly updated with new package name and examples
  • All user-facing documentation updated (installation, configuration, CLI usage)
  • Architecture documentation updated appropriately

3. Test Coverage

  • Config tests comprehensively updated (25 changes in test file)
  • Test descriptions match new naming conventions
  • Tests cover .docs-coderefrc.json, DOCS_CODEREF_* env vars, and package.json["docs-coderef"] field

4. Code Quality

  • Clean, consistent changes throughout
  • No leftover references to old naming (based on pattern search)
  • Follows existing code style and conventions

🔍 Areas of Concern

1. Version Number Inconsistency ⚠️

Issue: The PR shows changes to version number in different commits:

  • One commit resets version to 0.1.0 for initial npm publish
  • Another commit shows version as 1.0.0 in package-lock.json
  • Final package.json shows version 0.1.0

Impact: This could cause confusion during release. The version should be consistent.

Recommendation: Verify the intended version number before merging. If this is truly the initial publish under the new name, 0.1.0 makes sense. Otherwise, ensure semantic versioning is properly maintained.

2. Breaking Change Implications ⚠️

Issue: This is a significant breaking change for existing users:

  • Package name changes require users to uninstall old package and install new one
  • CLI command changes from coderef to docs-coderef
  • Config file changes from .coderefrc.json to .docs-coderefrc.json
  • Environment variables change from CODEREF_* to DOCS_CODEREF_*

Recommendation:

  • Consider adding a migration guide in the documentation
  • Add prominent notices in README.md and release notes
  • Consider deprecating the old package on npm with a notice pointing to the new one

3. Missing publishConfig Verification

Issue: The comment in docs/development/release.md:240 still references scoped packages:

For scoped packages (docs-coderef), verify publishConfig.access: "public" is set

Impact: Minor - the example text is incorrect as docs-coderef is no longer a scoped package.

Recommendation: Update this comment to use an actual scoped package example (e.g., @company/package-name).

📋 Checklist Review

Code Quality ✅

  • Clean, readable code with consistent style
  • No code smells or anti-patterns detected
  • Follows TypeScript best practices

Potential Bugs ✅

  • No obvious bugs introduced
  • Configuration system properly handles all naming changes
  • Path resolution logic unchanged (low risk)

Performance ✅

  • No performance-related changes
  • Rename is purely cosmetic, no algorithmic changes

Security ✅

  • No security concerns introduced
  • No changes to validation or sanitization logic
  • File path handling remains secure

Test Coverage ✅

  • Tests comprehensively updated
  • All configuration loading paths tested
  • Edge cases covered (invalid config files, missing files, etc.)

Documentation ✅

  • User-facing docs thoroughly updated
  • Examples reflect new naming
  • CHANGELOG properly maintained
  • Missing: Migration guide for existing users

📝 Recommendations

High Priority

  1. Add Migration Guide: Create a migration document for users upgrading from @cawpea/coderef

    • How to uninstall old package
    • How to update config files
    • How to update CI/CD scripts
    • Environment variable updates
  2. Verify Version Strategy: Confirm whether starting at 0.1.0 is intentional or if semantic versioning should continue from previous version

Medium Priority

  1. Update release.md: Fix the scoped package example on line 240
  2. Add Deprecation Notice: If possible, publish a final version of @cawpea/coderef with deprecation warning

Low Priority

  1. Consider Backwards Compatibility: For config files, consider supporting both .coderefrc.json and .docs-coderefrc.json for a deprecation period
  2. Add Warning for Old Config: Consider logging a warning if .coderefrc.json is detected

🎯 Overall Assessment

Rating: ✅ Approve with Recommendations

This is a well-executed package rename with comprehensive coverage across code, tests, and documentation. The changes are clean and consistent. The main concerns are around version management and user migration experience, which should be addressed before or immediately after merge.

Merge Recommendation

  • ✅ Safe to merge after addressing version number consistency
  • ✅ Consider adding migration guide before or immediately after merge
  • ✅ Ensure release notes prominently mention breaking changes

📊 Statistics

  • Files Changed: 17
  • Additions: 127
  • Deletions: 126
  • Net Change: +1 (mostly renaming, minimal new content)

Great work on maintaining consistency throughout this significant rename! 👏

@github-actions

github-actions Bot commented Jan 1, 2026

Copy link
Copy Markdown

PR Review: Package Rename from @cawpea/coderef to docs-coderef

Summary

This PR successfully renames the package from @cawpea/coderef to docs-coderef, which is a breaking change for users. The changes are comprehensive and well-documented in the CHANGELOG.

✅ Strengths

  1. Comprehensive renaming: The PR updates most references across:

    • Package name and bin command
    • CLI command name (coderefdocs-coderef)
    • Config file (.coderefrc.json.docs-coderefrc.json)
    • Environment variables (CODEREF_*DOCS_CODEREF_*)
    • package.json field ("coderef""docs-coderef")
    • Repository URLs
  2. Excellent documentation: CHANGELOG.md clearly documents all breaking changes

  3. Consistent updates: Most code, tests, and documentation were updated correctly

  4. Removed unnecessary config: Removed publishConfig.access: "public" which is no longer needed for non-scoped packages

🐛 Issues Found

Critical

1. Incorrect import in documentation (docs/user-guide/configuration.md:270)

// Current (incorrect):
import { validate, fix } from '@cawpea/docs-coderef';

// Should be:
import { validate, fix } from 'docs-coderef';

2. Test file reference not updated (scripts/lib/path-checker.test.ts:40)

// Current (incorrect):
const changedFiles = ['bin/coderef.js'];

// Should be:
const changedFiles = ['bin/docs-coderef.js'];

3. Version inconsistency in package-lock.json
The diff shows package-lock.json version changing from 0.1.0 to 1.0.0, but package.json remains at 0.1.0. This suggests:

  • Either the package-lock.json needs to be regenerated with npm install
  • Or this is a major version bump that should be handled by semantic-release

Since this is a breaking change and you're using semantic-release, the version should likely stay at 0.1.0 and let semantic-release handle the bump to 1.0.0 automatically when this PR is merged.

Minor

4. Comment in release.md could be clearer (docs/development/release.md:240)

// Current:
- For scoped packages (e.g., `@company/package-name`), verify `publishConfig.access: "public"` is set

// Consider:
- For scoped packages (e.g., `@company/package-name`), verify `publishConfig.access: "public"` is set. Note: This package is no longer scoped and doesn't require this configuration.

📋 Recommendations

Before Merge

  1. Fix the critical issues above - especially the incorrect import statement in configuration.md and the test file reference
  2. Regenerate package-lock.json: Run npm install to ensure package-lock.json is in sync with package.json
  3. Run full test suite: Ensure all tests pass after the rename
  4. Consider a migration guide: Add a section to the CHANGELOG or README helping users migrate from the old package name

Migration Guide Suggestion

Consider adding this to your CHANGELOG.md under "Migration Guide" section:

### Migration from @cawpea/coderef to docs-coderef

If you're upgrading from `@cawpea/coderef`, follow these steps:

1. Uninstall the old package:
   \`\`\`bash
   npm uninstall @cawpea/coderef
   \`\`\`

2. Install the new package:
   \`\`\`bash
   npm install --save-dev docs-coderef
   \`\`\`

3. Update your imports:
   \`\`\`diff
   - import { validate } from '@cawpea/coderef';
   + import { validate } from 'docs-coderef';
   \`\`\`

4. Update CLI commands:
   \`\`\`diff
   - npx coderef validate
   + npx docs-coderef validate
   \`\`\`

5. Rename config file:
   \`\`\`bash
   mv .coderefrc.json .docs-coderefrc.json
   \`\`\`

6. Update package.json field:
   \`\`\`diff
   - "coderef": { ... }
   + "docs-coderef": { ... }
   \`\`\`

7. Update environment variables:
   \`\`\`diff
   - CODEREF_VERBOSE=true
   + DOCS_CODEREF_VERBOSE=true
   \`\`\`

🔒 Security

No security concerns identified.

📊 Test Coverage

The PR updates tests to reflect the new naming conventions. However, please ensure all tests pass after fixing the issues above, particularly:

  • scripts/lib/path-checker.test.ts (needs update)
  • All config-related tests in src/config.test.ts

📝 Documentation

Documentation is comprehensive and well-updated. Just needs the fix in configuration.md mentioned above.

⚡ Performance

No performance impact.

🎯 Code Quality

The code quality remains consistent with the project's standards. All changes follow the established patterns.

Conclusion

This is a well-executed package rename with thorough documentation. After addressing the 3 critical issues above (incorrect import, test file reference, and package-lock.json version), this PR will be ready to merge.

Recommendation: Fix the critical issues, then approve and merge.

@github-actions

github-actions Bot commented Jan 1, 2026

Copy link
Copy Markdown

Pull Request Review: Package Rename from @cawpea/coderef to docs-coderef

Thank you for this comprehensive package renaming PR! I've conducted a thorough review and here are my findings:


Strengths

  1. Comprehensive Renaming: The PR systematically updates the package name across all relevant files:

    • package.json and package-lock.json
    • Binary file renamed (bin/coderef.js → bin/docs-coderef.js)
    • All documentation files updated
    • Configuration system updated (.coderefrc.json → .docs-coderefrc.json)
    • Environment variables updated (CODEREF_* → DOCS_CODEREF_*)
    • Test files updated to reflect new naming
  2. Well-Documented Changes: The CHANGELOG.md clearly lists all the changes, making it easy for users to understand the migration path.

  3. Consistent Pattern: The renaming follows a consistent pattern throughout the codebase:

    • @cawpea/coderefdocs-coderef
    • coderef command → docs-coderef
    • .coderefrc.json.docs-coderefrc.json
    • CODEREF_*DOCS_CODEREF_*
  4. Test Coverage: All test files (src/config.test.ts) have been updated to reflect the new naming conventions.


⚠️ Areas for Improvement

1. Breaking Change Communication

Issue: This is a major breaking change but is being released under a chore commit type.

Impact:

  • Users upgrading from @cawpea/coderef to docs-coderef will experience breaking changes
  • Configuration files need to be renamed
  • Environment variables need to be updated
  • CLI command changes

Recommendation: Consider one of the following approaches:

Option A - Semantic Release Approach:
Add a BREAKING CHANGE: footer to the commit message to trigger a major version bump:

chore: rename package from @cawpea/coderef to docs-coderef

BREAKING CHANGE: Package name changed from @cawpea/coderef to docs-coderef.
This requires updating:
- npm install command: npm install docs-coderef
- CLI command: docs-coderef instead of coderef
- Config file: .docs-coderefrc.json instead of .coderefrc.json
- Package.json field: "docs-coderef" instead of "coderef"
- Environment variables: DOCS_CODEREF_* instead of CODEREF_*

Option B - Deprecation Notice:
Publish a final version of @cawpea/coderef with deprecation warnings pointing users to docs-coderef.

2. Migration Guide Missing

Issue: There's no migration guide for existing users.

Recommendation: Add a migration guide to the documentation. Example location: docs/user-guide/migration.md

Example content:

## Migrating from @cawpea/coderef to docs-coderef

### 1. Update package
```bash
npm uninstall @cawpea/coderef
npm install docs-coderef

2. Update configuration file

Rename .coderefrc.json to .docs-coderefrc.json

3. Update package.json

Change the field name from "coderef" to "docs-coderef"

4. Update environment variables

Rename all CODEREF_* variables to DOCS_CODEREF_*

5. Update scripts

Change CLI command from coderef to docs-coderef


#### 3. **Possible Missed References**

**Issue**: The CHANGELOG.md still contains references to old naming in historical context, which is acceptable, but verify these are intentional.

**Files to verify:**
- CHANGELOG.md:12-17 - Contains old names (this is fine for documentation of changes)

---

### 🔍 **Code Quality Assessment**

#### **Style & Conventions**: ✅ **Excellent**
- All changes follow the project's coding standards (2-space indentation, single quotes, etc.)
- Consistent naming patterns throughout

#### **Test Coverage**: ✅ **Good**
- All 25 test cases in config.test.ts updated to reflect new naming
- Tests cover:
  - .docs-coderefrc.json loading
  - package.json "docs-coderef" field
  - DOCS_CODEREF_* environment variables
  - Configuration precedence

#### **Documentation**: ⚠️ **Needs Enhancement**
- Documentation files updated consistently
- README examples updated
- **Missing**: Migration guide for existing users

---

### 🔒 **Security Assessment**

✅ **No security concerns identified**
- No changes to security-sensitive code
- The removal of `publishConfig.access: "public"` in package.json is correct since the package is no longer scoped

---

### 🐛 **Potential Issues**

#### **Minor Issue**: Package.json removal of publishConfig

**File**: package.json:51-53

**Observation**: The `publishConfig` field was removed entirely. While this is correct for unscoped packages (they're public by default), consider if there are any other publish configurations that should be maintained.

**Current**:
```json
// Removed entirely

Consideration: This is likely correct, but verify npm publishing works as expected.


📊 Performance & Architecture

No performance concerns

  • No changes to runtime code logic
  • Only naming and configuration updates

Testing Recommendations

Before merging, please verify:

  1. Build process:

    npm run build
  2. Test suite:

    npm test
  3. CLI functionality:

    npm run build
    ./bin/docs-coderef.js validate --help
    ./bin/docs-coderef.js fix --help
  4. Package installation (in a separate directory):

    npm pack
    cd /tmp/test-install
    npm install /path/to/docs-coderef-0.1.0.tgz
    npx docs-coderef validate --help

📝 Summary

Overall Assessment: ⭐⭐⭐⭐ (4/5)

This is a well-executed package renaming with comprehensive changes across the codebase. The main areas for improvement are:

  1. Add proper breaking change signaling for semantic versioning
  2. 📖 Add migration guide for existing users
  3. 🧪 Verify build and tests pass before merging

Recommendation: Approve with minor changes requested

Once the breaking change communication is added and tests verified, this PR will be ready to merge.


📚 Additional Notes

The systematic approach to this rename is commendable. The changes are clean, consistent, and well-documented in the CHANGELOG. Great work on maintaining the project's coding standards throughout!

If you have any questions about this review or need clarification on any points, please let me know.

@github-actions

github-actions Bot commented Jan 1, 2026

Copy link
Copy Markdown

PR Review: Package Rename from @cawpea/coderef to docs-coderef

Summary

This PR successfully renames the package from the scoped @cawpea/coderef to the unscoped docs-coderef. The changes are comprehensive and well-executed overall.

✅ Strengths

1. Comprehensive Rename Coverage

  • Package name updated in package.json and package-lock.json
  • Binary renamed from bin/coderef.js to bin/docs-coderef.js
  • Config file renamed from .coderefrc.json to .docs-coderefrc.json
  • Environment variables updated from CODEREF_* to DOCS_CODEREF_*
  • Repository URLs updated across all documentation

2. Documentation Updates

  • README.md thoroughly updated with new package name
  • All user guide documentation updated (installation, CLI usage, configuration, code-ref syntax)
  • CHANGELOG.md properly documents all naming changes
  • Architecture and development documentation updated

3. Code Quality

  • All TypeScript source files updated correctly
  • Test files updated to reflect new naming
  • Comments and JSDoc updated appropriately
  • Follows project coding standards (single quotes, 2-space indentation, etc.)

4. Configuration Management

  • publishConfig.access: "public" correctly removed (no longer needed for unscoped packages)
  • All configuration loading logic updated consistently
  • Environment variable handling updated throughout

⚠️ Issues Found

1. Test File Not Updated (Minor)

Location: scripts/lib/path-checker.test.ts:161

The test file still references the old binary name:

const changedFiles = ['bin/coderef.js'];  // Should be 'bin/docs-coderef.js'

Impact: Low - This is a test assertion that checks if bin file changes trigger documentation suggestions. While functional, it references a file that no longer exists.

Recommendation: Update line 161 to:

const changedFiles = ['bin/docs-coderef.js'];

📋 Additional Considerations

1. npm Package Publishing

Since this is changing from a scoped to unscoped package name:

  • Verify the package name docs-coderef is available on npm
  • Consider publishing strategy (this will be a completely new package, not an update to @cawpea/coderef)
  • May want to deprecate the old scoped package with a message pointing to the new one

2. Breaking Change Documentation

The CHANGELOG.md correctly documents the changes, but consider:

  • Adding a migration guide for existing users
  • Documenting that this is a breaking change requiring:
    • New npm package installation
    • CLI command updates
    • Config file renaming
    • Environment variable updates

3. Version Number

Currently at 0.1.0. Since this is effectively a new package:

  • Current version is appropriate for a new package
  • Consider whether to bump to 1.0.0 if you consider the tool production-ready

🔒 Security Review

✅ No security concerns identified

  • No new dependencies added
  • No changes to security-sensitive code
  • Environment variable changes are properly handled

🎯 Performance Review

✅ No performance concerns

  • No algorithmic changes
  • Purely naming/configuration updates

✅ Test Coverage

  • Existing test suite should catch regressions
  • All test files updated appropriately
  • One minor test file update needed (noted above)

📚 Documentation Quality

Excellent - Documentation is thorough and comprehensive:

  • Clear examples in README
  • Updated CLI usage guide
  • Configuration examples all correct
  • Release documentation updated

🎯 Overall Assessment

Status:Approved with minor fix recommended

This is a well-executed package rename with excellent attention to detail. The only issue is the single test file reference that should be updated. The PR is otherwise ready to merge.

Pre-merge Checklist

  • Fix test file reference in scripts/lib/path-checker.test.ts:161
  • Verify package name docs-coderef is available on npm
  • Run full test suite to ensure all tests pass
  • Consider adding migration notes for existing users

💡 Suggestions for Follow-up

  1. Post-merge: Deprecate the old @cawpea/coderef package on npm with a message
  2. Consider: Adding a migration guide in the documentation
  3. Consider: Announcing the package rename in release notes

Great work on this comprehensive rename! 🎉

@cawpea cawpea merged commit 30560d5 into develop Jan 1, 2026
4 checks passed
@cawpea cawpea deleted the feature/#28_change-package-name branch January 1, 2026 11:38
@github-actions

github-actions Bot commented Jan 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

github-actions Bot commented Jan 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 0.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change package name to docs-coderef

2 participants