Skip to content

Releases: aridyckovsky/effect-migrate

@effect-migrate/preset-basic@0.3.2

08 Nov 23:32
fa6096e

Choose a tag to compare

Patch Changes

@effect-migrate/preset-basic@0.3.1

08 Nov 01:28
13ed91d

Choose a tag to compare

Patch Changes

@effect-migrate/core@0.5.0

08 Nov 23:32
fa6096e

Choose a tag to compare

Minor Changes

  • #46 30ca7cd Thanks @aridyckovsky! - Add time-series checkpoint persistence with Time and ProcessInfo services. New checkpoint manager provides automatic thread linking via AMP_CURRENT_THREAD_ID, delta computation between audits, and manifest-based history navigation. Checkpoints use normalized FindingsGroup schema for 40-70% size reduction. New services enable testable date/time and environment variable access.

Patch Changes

  • #43 caefe69 Thanks @aridyckovsky! - Add getPackageMeta service for dynamic version reading from package.json. Exports PackageMeta interface and getPackageMeta Effect that reads both toolVersion and schemaVersion at runtime, with intelligent path resolution for development and production environments.

@effect-migrate/core@0.4.0

08 Nov 01:28
13ed91d

Choose a tag to compare

Minor Changes

  • #41 f22c2dd Thanks @aridyckovsky! - Add normalized schema for 40-70% audit.json size reduction and move business logic to core

    Breaking Changes:

    1. Schema version 0.1.0 → 0.2.0 (audit.json - no backwards compatibility)
      • Replace byFile/byRule with deduplicated rules[], files[], results[] arrays
      • Add index-based groupings in groups field for O(1) lookup
      • Implement deterministic ordering (sorted rules/files) for reproducible output
      • Add stable content-based keys for cross-checkpoint delta computation
      • Compact range representation using tuples instead of objects
      • Add separate info counter to FindingsSummary (previously counted as warnings)
    2. CLI loaders removed - business logic moved to @effect-migrate/core
      • ❌ Removed @effect-migrate/cli/loaders/config - use @effect-migrate/core exports instead
      • ❌ Removed @effect-migrate/cli/loaders/presets - use PresetLoader service instead

    New @effect-migrate/core exports:

    Config utilities:

    • mergeConfig(defaults, userConfig) - Merge preset defaults with user config
    • deepMerge(target, source) - Deep merge plain objects (arrays replaced, not concatenated)
    • isPlainObject(value) - Type guard for plain objects

    Preset loading:

    • PresetLoader - Context.Tag for preset loading service
    • PresetLoaderService - Service interface
    • PresetLoaderNpmLive - Default Layer for npm-based preset resolution
    • PresetLoadError - Tagged error for preset loading failures
    • Preset - Preset type (rules + optional defaults)
    • LoadPresetsResult - Result of loading multiple presets

    Rule construction:

    • rulesFromConfig(config) - Build rules from config (pattern + boundary)

    Schema enhancements:

    • Config now supports presets?: string[] field for preset names

    Normalizer utilities:

    • normalizeResults(results, config, threads?) - Convert to normalized schema
    • expandResult(normalized) - Convert back to flat format
    • deriveResultKey(result) - Generate stable content-based key

    @effect-migrate/cli changes:

    New workspace-aware preset resolution:

    • PresetLoaderWorkspaceLive - Layer that tries workspace path first, falls back to npm
    • Supports monorepo development with automatic workspace preset detection
    • Windows-compatible file URL handling with pathToFileURL()

    Refactored loaders:

    • loadRulesAndConfig() now orchestrates core services instead of implementing logic
    • Uses Effect.catchTag("PresetLoadError") for precise error handling
    • Reduced CLI code by ~1291 lines (60% reduction in loaders)

    Build improvements:

    • Implement TypeScript Project References (src/test separation) for proper type checking
    • Fix NodeNext module resolution (.js extension requirements)
    • Consolidate test organization (all tests in test/ directories)
    • Fix barrel import violations (use direct imports from @effect/platform)
    • Remove duplicate utils folder (merged util/ into utils/)

    Migration guide:

    If you were importing from CLI loaders:

    // Before
    import { loadConfig } from "@effect-migrate/cli/loaders/config"
    import { loadPresets } from "@effect-migrate/cli/loaders/presets"
    
    // After
    import { loadConfig, PresetLoader } from "@effect-migrate/core"
    
    const config = yield * loadConfig(configPath)
    const loader = yield * PresetLoader
    const { rules, defaults } = yield * loader.loadPresets(config.presets ?? [])

    Test coverage:

    • 50 new tests for core utilities (config merge, preset loading, rule builders)
    • 6 new tests for CLI workspace preset resolution
    • 40+ tests for normalized schema
    • Total: 308 tests passing

Patch Changes

  • #41 cbd8eb9 Thanks @aridyckovsky! - Update all READMEs to reflect current architecture and published usage

    Documentation improvements:

    • Root README: Accurate CLI commands, output schemas (index.json, audit.json, metrics.json, threads.json), real rule examples, proper roadmap
    • CLI README: Complete options documentation (--strict, --log-level, --amp-out), troubleshooting guide, local development instructions
    • Core README: Comprehensive exported API documentation, service architecture, Layer patterns, real rule examples from preset-basic

    Key updates:

    • Reflect dogfooding status and unstable API warnings across all packages
    • Document complementary relationship with @effect/language-service
    • Add proper roadmap with planned features (SQLite, Polars, OpenTelemetry, MCP server, workflow orchestration)
    • User-focused: Published npm usage as primary, local development as secondary
    • Real examples from actual codebase (patterns.ts, boundaries.ts)

    Resolves #24

@effect-migrate/cli@0.5.0

08 Nov 23:32
fa6096e

Choose a tag to compare

Minor Changes

  • #46 30ca7cd Thanks @aridyckovsky! - Add checkpoints command for audit history navigation. New subcommands: list (show history with deltas), latest (show most recent), show (display specific checkpoint), and diff (compare two checkpoints). Supports --json flag for machine-readable output.

Patch Changes

  • #43 caefe69 Thanks @aridyckovsky! - Use dynamic version from package.json via getPackageMeta service instead of hardcoded value. Enhance CLI configuration with executable name, summary, and footer documentation links. Add proper error handling with Effect.catchAll for fatal errors.

  • Updated dependencies [30ca7cd, caefe69]:

    • @effect-migrate/core@0.5.0

@effect-migrate/cli@0.4.0

08 Nov 01:28
13ed91d

Choose a tag to compare

Minor Changes

  • #41 f22c2dd Thanks @aridyckovsky! - Add normalized schema for 40-70% audit.json size reduction and move business logic to core

    Breaking Changes:

    1. Schema version 0.1.0 → 0.2.0 (audit.json - no backwards compatibility)
      • Replace byFile/byRule with deduplicated rules[], files[], results[] arrays
      • Add index-based groupings in groups field for O(1) lookup
      • Implement deterministic ordering (sorted rules/files) for reproducible output
      • Add stable content-based keys for cross-checkpoint delta computation
      • Compact range representation using tuples instead of objects
      • Add separate info counter to FindingsSummary (previously counted as warnings)
    2. CLI loaders removed - business logic moved to @effect-migrate/core
      • ❌ Removed @effect-migrate/cli/loaders/config - use @effect-migrate/core exports instead
      • ❌ Removed @effect-migrate/cli/loaders/presets - use PresetLoader service instead

    New @effect-migrate/core exports:

    Config utilities:

    • mergeConfig(defaults, userConfig) - Merge preset defaults with user config
    • deepMerge(target, source) - Deep merge plain objects (arrays replaced, not concatenated)
    • isPlainObject(value) - Type guard for plain objects

    Preset loading:

    • PresetLoader - Context.Tag for preset loading service
    • PresetLoaderService - Service interface
    • PresetLoaderNpmLive - Default Layer for npm-based preset resolution
    • PresetLoadError - Tagged error for preset loading failures
    • Preset - Preset type (rules + optional defaults)
    • LoadPresetsResult - Result of loading multiple presets

    Rule construction:

    • rulesFromConfig(config) - Build rules from config (pattern + boundary)

    Schema enhancements:

    • Config now supports presets?: string[] field for preset names

    Normalizer utilities:

    • normalizeResults(results, config, threads?) - Convert to normalized schema
    • expandResult(normalized) - Convert back to flat format
    • deriveResultKey(result) - Generate stable content-based key

    @effect-migrate/cli changes:

    New workspace-aware preset resolution:

    • PresetLoaderWorkspaceLive - Layer that tries workspace path first, falls back to npm
    • Supports monorepo development with automatic workspace preset detection
    • Windows-compatible file URL handling with pathToFileURL()

    Refactored loaders:

    • loadRulesAndConfig() now orchestrates core services instead of implementing logic
    • Uses Effect.catchTag("PresetLoadError") for precise error handling
    • Reduced CLI code by ~1291 lines (60% reduction in loaders)

    Build improvements:

    • Implement TypeScript Project References (src/test separation) for proper type checking
    • Fix NodeNext module resolution (.js extension requirements)
    • Consolidate test organization (all tests in test/ directories)
    • Fix barrel import violations (use direct imports from @effect/platform)
    • Remove duplicate utils folder (merged util/ into utils/)

    Migration guide:

    If you were importing from CLI loaders:

    // Before
    import { loadConfig } from "@effect-migrate/cli/loaders/config"
    import { loadPresets } from "@effect-migrate/cli/loaders/presets"
    
    // After
    import { loadConfig, PresetLoader } from "@effect-migrate/core"
    
    const config = yield * loadConfig(configPath)
    const loader = yield * PresetLoader
    const { rules, defaults } = yield * loader.loadPresets(config.presets ?? [])

    Test coverage:

    • 50 new tests for core utilities (config merge, preset loading, rule builders)
    • 6 new tests for CLI workspace preset resolution
    • 40+ tests for normalized schema
    • Total: 308 tests passing

Patch Changes

  • #41 cbd8eb9 Thanks @aridyckovsky! - Update all READMEs to reflect current architecture and published usage

    Documentation improvements:

    • Root README: Accurate CLI commands, output schemas (index.json, audit.json, metrics.json, threads.json), real rule examples, proper roadmap
    • CLI README: Complete options documentation (--strict, --log-level, --amp-out), troubleshooting guide, local development instructions
    • Core README: Comprehensive exported API documentation, service architecture, Layer patterns, real rule examples from preset-basic

    Key updates:

    • Reflect dogfooding status and unstable API warnings across all packages
    • Document complementary relationship with @effect/language-service
    • Add proper roadmap with planned features (SQLite, Polars, OpenTelemetry, MCP server, workflow orchestration)
    • User-focused: Published npm usage as primary, local development as secondary
    • Real examples from actual codebase (patterns.ts, boundaries.ts)

    Resolves #24

  • Updated dependencies [f22c2dd, cbd8eb9]:

    • @effect-migrate/core@0.4.0

@effect-migrate/preset-basic@0.3.0

06 Nov 23:02
439a70d

Choose a tag to compare

Minor Changes

  • #31 fc74df3 Thanks @aridyckovsky! - Export complete preset with 17 rules (13 pattern + 4 boundary) and default configuration

Patch Changes

  • #40 b8c540a Thanks @aridyckovsky! - Upgrade effect packages and fix dependency versions

    • Upgrade effect from 3.18.4 to 3.19.2
    • Upgrade @effect/platform from 0.92.1 to 0.93.0
    • Upgrade @effect/platform-node from 0.98.4 to 0.100.0
    • Upgrade @effect/cli from 0.71.0 to 0.72.0
    • Upgrade @effect/vitest from 0.26.0 to 0.27.0
    • Replace "latest" with specific versions for @types/node (^24.10.0) and typescript (^5.9.3)
  • Updated dependencies [eeb0290, eeb0290, 255240b, b8c540a]:

    • @effect-migrate/core@0.3.0

@effect-migrate/core@0.3.0

06 Nov 23:02
439a70d

Choose a tag to compare

Minor Changes

  • #40 255240b Thanks @aridyckovsky! - Add unified schema versioning and amp utilities to core package
    • Add SCHEMA_VERSION constant - single version for all artifacts (simplicity over complexity)
    • Add Semver schema validator with subpath export @effect-migrate/core/schema
    • Move amp utilities (context-writer, metrics-writer, thread-manager) from CLI to core
    • Add schemaVersion field to index.json and audit.json schemas
    • Add revision counter field to audit.json (increments on each write)
    • Export amp utilities via @effect-migrate/core/amp subpath
    • All artifacts share same schema version for clearer versioning semantics

Patch Changes

  • #31 eeb0290 Thanks @aridyckovsky! - Fix boundary rule glob pattern handling for module specifiers. Patterns like react*internals now correctly match react/internals.

  • #31 eeb0290 Thanks @aridyckovsky! - Fix defineConfig to accept encoded input types. Users can now pass pattern strings directly instead of RegExp objects, avoiding TypeScript errors.

  • #40 b8c540a Thanks @aridyckovsky! - Upgrade effect packages and fix dependency versions

    • Upgrade effect from 3.18.4 to 3.19.2
    • Upgrade @effect/platform from 0.92.1 to 0.93.0
    • Upgrade @effect/platform-node from 0.98.4 to 0.100.0
    • Upgrade @effect/cli from 0.71.0 to 0.72.0
    • Upgrade @effect/vitest from 0.26.0 to 0.27.0
    • Replace "latest" with specific versions for @types/node (^24.10.0) and typescript (^5.9.3)

@effect-migrate/cli@0.3.0

06 Nov 23:02
439a70d

Choose a tag to compare

Minor Changes

  • #40 4fc03b9 Thanks @aridyckovsky! - Add tri-state --amp-out option with Effect patterns

    • Add normalizeArgs.ts for handling bare --amp-out flag (converts to sentinel value)
    • Add Effect-based helpers in amp/options.ts:
      • resolveAmpOut(): converts Option to tri-state AmpOutMode
      • withAmpOut(): conditionally executes Effect when output requested
      • getAmpOutPathWithDefault(): for commands that always write output
    • Refactor audit, metrics, and thread commands to use helpers (no switch statements)
    • Support three modes:
      • Omitted flag: no file output
      • Bare flag --amp-out: writes to default path .amp/effect-migrate
      • Flag with value --amp-out=path: writes to custom path
  • #31 54905e7 Thanks @aridyckovsky! - Add preset loading infrastructure with dynamic imports, config merging, and unified rule construction

Patch Changes

  • #40 255240b Thanks @aridyckovsky! - Refactor CLI to use amp utilities from core package

    • Import amp utilities from @effect-migrate/core/amp instead of local modules
    • Create amp/options.ts for CLI-specific amp options
    • Update audit, metrics, and thread commands to use core schemas
    • Remove duplicate amp utility code from CLI package
  • #31 faaf291 Thanks @aridyckovsky! - Refactor audit and metrics commands to use loadRulesAndConfig helper, simplifying rule construction logic

  • #40 b8c540a Thanks @aridyckovsky! - Upgrade effect packages and fix dependency versions

    • Upgrade effect from 3.18.4 to 3.19.2
    • Upgrade @effect/platform from 0.92.1 to 0.93.0
    • Upgrade @effect/platform-node from 0.98.4 to 0.100.0
    • Upgrade @effect/cli from 0.71.0 to 0.72.0
    • Upgrade @effect/vitest from 0.26.0 to 0.27.0
    • Replace "latest" with specific versions for @types/node (^24.10.0) and typescript (^5.9.3)
  • Updated dependencies [eeb0290, eeb0290, 255240b, b8c540a]:

    • @effect-migrate/core@0.3.0

@effect-migrate/preset-basic@0.2.1

05 Nov 21:33
b796d25

Choose a tag to compare

Patch Changes

  • #30 c34b8f0 Thanks @aridyckovsky! - Add comprehensive tests for async arrow function detection in noAsyncAwait rule. The rule already supported arrow functions, but tests only covered async function declarations. Now includes tests for:
    • Arrow functions without parameters: async () => {}
    • Arrow functions with multiple parameters: async (id, name) => {}
    • Arrow functions with single parameter: async x => {}
  • Updated dependencies [c1277e5]:
    • @effect-migrate/core@0.2.1