biomejs / biome

A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.
https://biomejs.dev
Apache License 2.0
14.84k stars 460 forks source link

Commands failing #4225

Open artola opened 3 days ago

artola commented 3 days ago

Environment information

CLI:
  Version:                      1.9.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.13.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/4.5.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Workspace:
  Open Documents:               0

What happened?

yarn biome format --write --since 23fc81eac83b727f1a2e82570e6fb67e755c7ec0 throws an error:

  ✖ Incompatible arguments since and changed

Repro: https://github.com/artola/biome-issue-4225

Expected result

Just re-run the command over the changed files from that hash (git rev-parse HEAD).

Code of Conduct

github-actions[bot] commented 3 days ago

Hello @artola, please provide a minimal reproduction. You can use one of the following options:

Issues marked with S-Needs repro will be closed if they have no activity within 3 days.

artola commented 3 days ago

@dyc3 Here the repro. It is easy to test in any project, basically:

yarn format --write --since $(git rev-parse HEAD)

When using --changed plus --since no files are formatted (even if I did introduce some changes):

format --changed --since HEAD

While this shows changed files:

git diff --name-only HEAD