Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: callstack/repack
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: callstack/repack
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: refactor/unify-commands
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 6 commits
  • 28 files changed
  • 2 contributors

Commits on Feb 7, 2026

  1. refactor(commands): add shared CompilerInterface, CompilerAsset types…

    … and --bundler option
    
    Add Bundler type alias, CompilerInterface and CompilerAsset to the
    shared types.ts. Remove duplicate CompilerAsset definitions from
    rspack/types.ts and webpack/types.ts. Add --bundler <string> CLI
    option to both startCommandOptions and bundleCommandOptions.
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    jbroma and claude committed Feb 7, 2026
    Configuration menu
    Copy the full SHA
    d6a4ece View commit details
    Browse the repository at this point in the history
  2. feat(commands): add bundler auto-detection from config filename

    Add detectBundler() utility that determines the bundler engine with
    the following priority:
    1. Explicit --bundler flag
    2. Custom config path filename inference (rspack.* vs webpack.*)
    3. Config file discovery (rspack configs checked first)
    4. Default: rspack
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    jbroma and claude committed Feb 7, 2026
    Configuration menu
    Copy the full SHA
    831f368 View commit details
    Browse the repository at this point in the history
  3. refactor(commands): implement CompilerInterface on both Compiler classes

    Webpack Compiler:
    - Remove EventEmitter inheritance
    - Add platforms property and devServerContext with late-init
    - Add setDevServerContext() and start() (no-op) methods
    - Internalize event handling: worker messages now call
      devServerContext.notifyBuildStart/End and broadcastToHmrClients
      directly instead of emitting events
    - Constructor now takes platforms as first argument
    
    Rspack Compiler:
    - Add 'implements CompilerInterface' declaration
    - Import CompilerAsset from shared types
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    jbroma and claude committed Feb 7, 2026
    Configuration menu
    Copy the full SHA
    79b235e View commit details
    Browse the repository at this point in the history
  4. refactor(commands): create unified command entry point with auto-dete…

    …ction
    
    Add unified bundle.ts and start.ts that merge the rspack and webpack
    implementations, using detectBundler() and dynamic imports to select
    the correct engine at runtime.
    
    Add commands/index.ts exporting the unified command definitions and
    a createBoundCommands() helper for deprecated entry points.
    
    Add commands/index.js and commands/index.d.ts as the new primary
    CJS entry point. Update commands/rspack.js and commands/webpack.js
    to be deprecation wrappers that delegate via createBoundCommands().
    
    Add './commands' export to package.json (alongside existing wildcard).
    
    Delete old bundler-specific files:
    - rspack/bundle.ts, rspack/start.ts, rspack/index.ts
    - webpack/bundle.ts, webpack/start.ts, webpack/index.ts
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    jbroma and claude committed Feb 7, 2026
    Configuration menu
    Copy the full SHA
    0c8939f View commit details
    Browse the repository at this point in the history
  5. refactor: update consumers to use unified @callstack/repack/commands

    Update init package:
    - Remove bundler parameter from modifyReactNativeConfig()
    - Use '@callstack/repack/commands' instead of bundler-specific paths
    
    Simplify react-native.config.js in all test apps to use the unified
    import instead of conditional require based on USE_WEBPACK env var.
    
    Update integration tests to import from '@callstack/repack/commands'
    instead of separate rspack/webpack command sets.
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    jbroma and claude committed Feb 7, 2026
    Configuration menu
    Copy the full SHA
    60f05f3 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2026

  1. fix: types

    jbroma committed Feb 8, 2026
    Configuration menu
    Copy the full SHA
    35c831b View commit details
    Browse the repository at this point in the history
Loading