bytestrone-ef-6-1-3-to-ef-6-5-0-upgrade
bytestrone EF 6.1.3 to EF 6.5.0 upgrade
# bytestrone-ef-6-1-3-to-ef-6-5-0-upgrade
bytestrone EF 6.1.3 to EF 6.5.0 upgrade
## What It Does
This package ships a single byte-preserving `@intuita-inc/filemod` codemod that dispatches by file path:
- `*.config`
- Updates `<package ...>` entries for `EntityFramework` from `6.1.3` to `6.5.0`
- Updates `<package ...>` entries for `EntityFramework.SqlServerCompact` from `6.1.3` to `6.5.0`
- Updates EntityFramework binding redirects from `newVersion="6.0.0.0"` to `newVersion="6.5.0.0"` inside `dependentAssembly` blocks for `EntityFramework`
- `*.csproj`
- Updates `<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>` to `v4.6.2`
The codemod does targeted string replacements only. It does not parse XML, pretty-print XML, or reserialize files. Unchanged files are left untouched, and changed files preserve existing BOM and newline style because the codemod only rewrites the matched text.
## Workflow
`workflow.yaml` runs two steps:
- `Run byte-preserving EntityFramework filemod`
- `AI review and cleanup` (optional)
### Workflow Parameter
- `runAiCleanup`
- Type: `boolean`
- Default: `true`
- Purpose: enables the optional AI cleanup step after the deterministic filemod pass
The AI step is intended only for follow-up cleanup after the main transform. It should review the resulting diff, preserve the migration intent, handle edge cases conservatively, and avoid unrelated rewrites.
## Installation
```bash
# Run from registry
npx codemod bytestrone-ef-6-1-3-to-ef-6-5-0-upgrade
# Or run locally
npx codemod workflow run -w . -t /path/to/repository
```
## Usage
Run the package workflow on a target repository:
```bash
npx codemod workflow run -w . -t /path/to/repository
```
Run the deterministic filemod directly during local development:
```bash
pnpm exec tsx ./scripts/run.ts /path/to/repository
```
Disable the optional AI cleanup step:
```bash
npx codemod workflow run -w . -t /path/to/repository --param runAiCleanup=false
```
## Guarantees And No-Op Cases
- Does not globally replace every `6.1.3` string
- Does not touch non-EntityFramework package entries in `.config` files
- Does not touch unrelated binding redirects in non-EntityFramework `dependentAssembly` blocks
- Does not touch `TargetFrameworkVersion` values other than exact `v4.5.1`
- Is idempotent on repeated runs
## Development
```bash
# Test the transformation
pnpm test
# Type-check the package
pnpm check-types
# Validate the workflow
npx codemod workflow validate -w .
# Publish to registry
npx codemod login
npx codemod publish
```
## License
MIT