Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dart_style from 2.3.7 to 3.0.0 #3945

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 15, 2024

Bumps dart_style from 2.3.7 to 3.0.0.

Release notes

Sourced from dart_style's releases.

package:dart_style v3.0.0

This is a large change. Under the hood, the formatter was almost completely rewritten, with the codebase now containing both the old and new implementations. The old formatter exists to support the older "short" style and the new code implements the new "tall" style.

The formatter uses the language version of the formatted code to determine which style you get. If the language version is 3.6 or lower, the code is formatted with the old style. If 3.7 or later, you get the new tall style. You typically control the language version by setting a min SDK constraint in your package's pubspec.

In addition to the new formatting style, a number of other API and CLI changes are included, some of them breaking:

  • Support project-wide page width configuration. By long request, you can now configure your preferred formatting page width on a project-wide basis. When formatting files, the formatter will look in the file's directory and any surrounding directories for an analysis_options.yaml file. If it finds one, it looks for the following YAML:

    formatter:
      page_width: 123

    If it finds a formatter key containing a map with a page_width key whose value is an integer, then that is the page width that the file is formatted using. Since the formatter will walk the surrounding directories until it finds an analysis_options.yaml file, this can be used to globally set the page width for an entire directory, package, or even collection of packages.

  • Support overriding the page width for a single file. In code formatted using the new tall style, you can use a special marker comment to control the page width that it's formatted using:

    // dart format width=30
    main() {
      someExpression +
          thatSplitsAt30;
    }

    This comment must appear before any code in the file and must match that

... (truncated)

Changelog

Sourced from dart_style's changelog.

3.0.0

This is a large change. Under the hood, the formatter was almost completely rewritten, with the codebase now containing both the old and new implementations. The old formatter exists to support the older "short" style and the new code implements the new "tall" style.

The formatter uses the language version of the formatted code to determine which style you get. If the language version is 3.6 or lower, the code is formatted with the old style. If 3.7 or later, you get the new tall style. You typically control the language version by setting a min SDK constraint in your package's pubspec.

In addition to the new formatting style, a number of other API and CLI changes are included, some of them breaking:

  • Support project-wide page width configuration. By long request, you can now configure your preferred formatting page width on a project-wide basis. When formatting files, the formatter will look in the file's directory and any surrounding directories for an analysis_options.yaml file. If it finds one, it looks for the following YAML:

    formatter:
      page_width: 123

    If it finds a formatter key containing a map with a page_width key whose value is an integer, then that is the page width that the file is formatted using. Since the formatter will walk the surrounding directories until it finds an analysis_options.yaml file, this can be used to globally set the page width for an entire directory, package, or even collection of packages.

  • Support overriding the page width for a single file. In code formatted using the new tall style, you can use a special marker comment to control the page width that it's formatted using:

    // dart format width=30
    main() {
      someExpression +
          thatSplitsAt30;
    }

    This comment must appear before any code in the file and must match that

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [dart_style](https://github.com/dart-lang/dart_style) from 2.3.7 to 3.0.0.
- [Release notes](https://github.com/dart-lang/dart_style/releases)
- [Changelog](https://github.com/dart-lang/dart_style/blob/main/CHANGELOG.md)
- [Commits](dart-lang/dart_style@v2.3.7...v3.0.0)

---
updated-dependencies:
- dependency-name: dart_style
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the type-infra A repository infrastructure change or enhancement label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant