这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@depfu
Copy link

@depfu depfu bot commented Apr 12, 2025

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ lint-staged (15.4.1 → 15.5.1) · Repo · Changelog

Release Notes

15.5.1

Patch Changes

  • #1533 5d53534 Thanks @iiroj! - Improve listing of staged files so that lint-staged doesn't crash when encountering an uninitialized submodule. This should result in less errors like:

    ✖ Failed to get staged files!
    

15.5.0

Minor Changes

  • #1526 630af5f Thanks @iiroj! - Lint-staged no longer resets to the original state when preventing an empty git commit. This happens when your configured tasks reset all the staged changes, typically when trying to commit formatting changes which conflict with your linter setup like ESLint or Prettier.

    Example with Prettier

    By default Prettier prefers double quotes.

    Previously

    1. Stage file.js with only double quotes " changed to '
    2. Run git commit -am "I don't like double quotes"
    3. Lint-staged runs prettier --write file.js, converting all the ' back to "
    4. Because there are now no changes, lint-staged fails, cancels the commit, and resets back to the original state
    5. Commit was not done, original state is restored and single quotes ' are staged

    Now

    1. Stage file.js with only double-quotes " changed to '
    2. Run git commit -am "I don't like double quotes"
    3. Lint-staged runs prettier --write file.js, converting all the ' back to "
    4. Because there are now no changes, lint-staged fails and cancels the commit
    5. Commit was not done, and there are no staged changes

15.4.3

Patch Changes

  • #1512 cbfed1d Thanks @tarik02! - Adjust TypeScript types for the default export so that it can be used as a value without error TS2693.

15.4.2

Patch Changes

  • #1509 8827ebf Thanks @iiroj! - Change lint-staged's dependencies to use caret (^) ranges instead of tilde (~). This makes it easier for package managers to perform dependency management when minor-level updates are also permitted instead of just patch-level.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 21 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

Summary by Sourcery

Update lint-staged from version 15.4.1 to 15.5.1, incorporating minor improvements and bug fixes

New Features:

  • Lint-staged no longer resets to the original state when preventing an empty git commit, improving behavior with formatting changes

Bug Fixes:

  • Improved handling of staged files to prevent crashes when encountering uninitialized submodules

Enhancements:

  • Updated dependencies to use caret ranges for better package management

@depfu depfu bot added the depfu label Apr 12, 2025
@codesandbox
Copy link

codesandbox bot commented Apr 12, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Apr 12, 2025

Reviewer's Guide by Sourcery

This pull request updates the lint-staged dependency from version 15.4.1 to 15.5.1. It also updates the commander dependency to version 13.1.0 and the yaml dependency to version 2.7.0. The changes are reflected in pnpm-lock.yaml and package.json.

Sequence diagram for preventing empty commit

sequenceDiagram
    actor Developer
    participant Git
    participant lint-staged
    participant Prettier

    Developer->>Git: Stage file.js (double quotes changed to single quotes)
    Developer->>Git: Run git commit -am "I don't like double quotes"
    Git->>lint-staged: Runs lint-staged
    lint-staged->>Prettier: prettier --write file.js (converts single quotes back to double quotes)
    Prettier-->>lint-staged: File modified
    lint-staged->>Git: Check for changes
    Git-->>lint-staged: No changes
    lint-staged->>Git: Fails and cancels the commit
    Git-->>Developer: Commit not done, no staged changes
Loading

File-Level Changes

Change Details Files
Updated the lint-staged dependency to version 15.5.1.
  • Updated lint-staged from version 15.4.1 to 15.5.1 in pnpm-lock.yaml.
  • Updated lint-staged version from 15.3.0 to 15.5.1 in package.json.
pnpm-lock.yaml
package.json
Updated the commander dependency to version 13.1.0.
  • Updated commander from version 12.1.0 to 13.1.0 in pnpm-lock.yaml.
pnpm-lock.yaml
Updated the yaml dependency to version 2.7.0.
  • Updated yaml from version 2.6.1 to 2.7.0 in pnpm-lock.yaml.
pnpm-lock.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, depfu[bot]!). We assume it knows what it's doing!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants