mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Dart introduced sound null safety in version 2.12.0, and as of Dart 3,
null safety is mandatory. Older Dart SDKs allowed both pre-null safety
and null-safe packages, but modern Dart SDKs, where most source code is
null-safe, now reject pre-null safety packages.
The current `pubspec.yaml` template with `sdk: '>=2.10.0'` is
incompatible with recent Dart SDKs, leading to the following error:
An unexpected error has occurred: CalledProcessError: command: ('/path/to/dart-sdk/bin/dart', 'pub', 'get')
return code: 65
stdout:
Resolving dependencies...
stderr:
The lower bound of "sdk: '>=2.10.0'" must be 2.12.0'
or higher to enable null safety.
The current Dart SDK (3.8.3) only supports null safety.
For details, see https://dart.dev/null-safety
To ensure compatibility with the modern Dart ecosystem, this commit
updates the minimum Dart SDK version to 2.12.0 or higher,
which implicitly supports null safety.
Additionally, `testing/get-dart.sh` has been updated to verify that
the pre-commit hook functions correctly with the latest Dart versions.
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| empty_template_.npmignore | ||
| empty_template_activate.R | ||
| empty_template_Cargo.toml | ||
| empty_template_environment.yml | ||
| empty_template_go.mod | ||
| empty_template_LICENSE.renv | ||
| empty_template_main.go | ||
| empty_template_main.rs | ||
| empty_template_Makefile.PL | ||
| empty_template_package.json | ||
| empty_template_pre-commit-package-dev-1.rockspec | ||
| empty_template_pre_commit_placeholder_package.gemspec | ||
| empty_template_pubspec.yaml | ||
| empty_template_renv.lock | ||
| empty_template_setup.py | ||
| hook-tmpl | ||
| rbenv.tar.gz | ||
| ruby-build.tar.gz | ||
| ruby-download.tar.gz | ||