mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 13:51:31 +01:00
Merge pull request #1795 from stof/upgrade_dependencies
Upgrade dev dependencies to the latest version
This commit is contained in:
commit
e2f97055db
@ -11,16 +11,13 @@ analyzer:
|
||||
# These are necessary for matching the JS API.
|
||||
avoid_types_as_parameter_names: ignore
|
||||
|
||||
# This has tons of false positives for StreamSubscription.close().
|
||||
unawaited_futures: ignore
|
||||
|
||||
# These are style preferences rather than potential semantic issues. While
|
||||
# we're not intrinsically opposed to adopting them for consistency with the
|
||||
# Dart ecosystem, there aren't currently any automated tools to help us
|
||||
# migrate to and remain consistent with these style rules, so achieving
|
||||
# consistency isn't worth the engineering time we'd spend getting there.
|
||||
annotate_overrides: ignore
|
||||
prefer_single_quotes: ignore
|
||||
use_function_type_syntax_for_parameters: ignore
|
||||
prefer_interpolation_to_compose_strings: ignore
|
||||
|
||||
include: package:lints/recommended.yaml
|
||||
|
@ -6,7 +6,7 @@ homepage: https://github.com/sass/dart-sass/tree/master/analysis
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
sdk: ">=2.0.0 <3.0.0"
|
||||
sdk: ">=2.17.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
lints: ^1.0.0
|
||||
lints: ^2.0.0
|
||||
|
@ -10,8 +10,8 @@ import 'exception.dart';
|
||||
import 'value.dart';
|
||||
|
||||
export 'callable/async.dart';
|
||||
export 'callable/async_built_in.dart';
|
||||
export 'callable/built_in.dart';
|
||||
export 'callable/async_built_in.dart' show AsyncBuiltInCallable;
|
||||
export 'callable/built_in.dart' show BuiltInCallable;
|
||||
export 'callable/plain_css.dart';
|
||||
export 'callable/user_defined.dart';
|
||||
|
||||
|
@ -11,7 +11,7 @@ import '../value.dart';
|
||||
import 'async.dart';
|
||||
|
||||
/// An [AsyncBuiltInCallable]'s callback.
|
||||
typedef _Callback = FutureOr<Value> Function(List<Value> arguments);
|
||||
typedef Callback = FutureOr<Value> Function(List<Value> arguments);
|
||||
|
||||
/// A callable defined in Dart code.
|
||||
///
|
||||
@ -26,7 +26,7 @@ class AsyncBuiltInCallable implements AsyncCallable {
|
||||
final ArgumentDeclaration _arguments;
|
||||
|
||||
/// The callback to run when executing this callable.
|
||||
final _Callback _callback;
|
||||
final Callback _callback;
|
||||
|
||||
/// Creates a function with a single [arguments] declaration and a single
|
||||
/// [callback].
|
||||
@ -76,7 +76,7 @@ class AsyncBuiltInCallable implements AsyncCallable {
|
||||
/// If no exact match is found, finds the closest approximation. Note that this
|
||||
/// doesn't guarantee that [positional] and [names] are valid for the returned
|
||||
/// [ArgumentDeclaration].
|
||||
Tuple2<ArgumentDeclaration, _Callback> callbackFor(
|
||||
Tuple2<ArgumentDeclaration, Callback> callbackFor(
|
||||
int positional, Set<String> names) =>
|
||||
Tuple2(_arguments, _callback);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import '../ast/sass.dart';
|
||||
import '../callable.dart';
|
||||
import '../value.dart';
|
||||
|
||||
typedef _Callback = Value Function(List<Value> arguments);
|
||||
typedef Callback = Value Function(List<Value> arguments);
|
||||
|
||||
/// A callable defined in Dart code.
|
||||
///
|
||||
@ -20,7 +20,7 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
|
||||
final String name;
|
||||
|
||||
/// The overloads declared for this callable.
|
||||
final List<Tuple2<ArgumentDeclaration, _Callback>> _overloads;
|
||||
final List<Tuple2<ArgumentDeclaration, Callback>> _overloads;
|
||||
|
||||
/// Creates a function with a single [arguments] declaration and a single
|
||||
/// [callback].
|
||||
@ -73,7 +73,7 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
|
||||
/// If passed, [url] is the URL of the module in which the function is
|
||||
/// defined.
|
||||
BuiltInCallable.overloadedFunction(
|
||||
this.name, Map<String, _Callback> overloads,
|
||||
this.name, Map<String, Callback> overloads,
|
||||
{Object? url})
|
||||
: _overloads = [
|
||||
for (var entry in overloads.entries)
|
||||
@ -91,9 +91,9 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
|
||||
/// If no exact match is found, finds the closest approximation. Note that this
|
||||
/// doesn't guarantee that [positional] and [names] are valid for the returned
|
||||
/// [ArgumentDeclaration].
|
||||
Tuple2<ArgumentDeclaration, _Callback> callbackFor(
|
||||
Tuple2<ArgumentDeclaration, Callback> callbackFor(
|
||||
int positional, Set<String> names) {
|
||||
Tuple2<ArgumentDeclaration, _Callback>? fuzzyMatch;
|
||||
Tuple2<ArgumentDeclaration, Callback>? fuzzyMatch;
|
||||
int? minMismatchDistance;
|
||||
|
||||
for (var overload in _overloads) {
|
||||
|
@ -170,7 +170,7 @@ final _hasKey = _function("has-key", r"$map, $key, $keys...", (arguments) {
|
||||
Value _modify(SassMap map, Iterable<Value> keys, Value modify(Value old),
|
||||
{bool addNesting = true}) {
|
||||
var keyIterator = keys.iterator;
|
||||
SassMap _modifyNestedMap(SassMap map) {
|
||||
SassMap modifyNestedMap(SassMap map) {
|
||||
var mutableMap = Map.of(map.contents);
|
||||
var key = keyIterator.current;
|
||||
|
||||
@ -182,11 +182,11 @@ Value _modify(SassMap map, Iterable<Value> keys, Value modify(Value old),
|
||||
var nestedMap = mutableMap[key]?.tryMap();
|
||||
if (nestedMap == null && !addNesting) return SassMap(mutableMap);
|
||||
|
||||
mutableMap[key] = _modifyNestedMap(nestedMap ?? const SassMap.empty());
|
||||
mutableMap[key] = modifyNestedMap(nestedMap ?? const SassMap.empty());
|
||||
return SassMap(mutableMap);
|
||||
}
|
||||
|
||||
return keyIterator.moveNext() ? _modifyNestedMap(map) : modify(map);
|
||||
return keyIterator.moveNext() ? modifyNestedMap(map) : modify(map);
|
||||
}
|
||||
|
||||
/// Merges [map1] and [map2], with values in [map2] taking precedence.
|
||||
|
@ -455,7 +455,7 @@ extension MapExtension<K, V> on Map<K, V> {
|
||||
/// [key] to the result.
|
||||
V putOrMerge(K key, V value, V Function(V oldValue, V newValue) merge) =>
|
||||
containsKey(key)
|
||||
? this[key] = merge(this[key]!, value)
|
||||
? this[key] = merge(this[key] as V, value)
|
||||
: this[key] = value;
|
||||
}
|
||||
|
||||
|
@ -593,7 +593,7 @@ abstract class SassNumber extends Value {
|
||||
var otherHasUnits = newNumerators.isNotEmpty || newDenominators.isNotEmpty;
|
||||
if (coerceUnitless && (!hasUnits || !otherHasUnits)) return this.value;
|
||||
|
||||
SassScriptException _compatibilityException() {
|
||||
SassScriptException compatibilityException() {
|
||||
if (other != null) {
|
||||
var message = StringBuffer("$this and");
|
||||
if (otherName != null) message.write(" \$$otherName:");
|
||||
@ -634,7 +634,7 @@ abstract class SassNumber extends Value {
|
||||
if (factor == null) return false;
|
||||
value *= factor;
|
||||
return true;
|
||||
}, orElse: () => throw _compatibilityException());
|
||||
}, orElse: () => throw compatibilityException());
|
||||
}
|
||||
|
||||
var oldDenominators = denominatorUnits.toList();
|
||||
@ -644,11 +644,11 @@ abstract class SassNumber extends Value {
|
||||
if (factor == null) return false;
|
||||
value /= factor;
|
||||
return true;
|
||||
}, orElse: () => throw _compatibilityException());
|
||||
}, orElse: () => throw compatibilityException());
|
||||
}
|
||||
|
||||
if (oldNumerators.isNotEmpty || oldDenominators.isNotEmpty) {
|
||||
throw _compatibilityException();
|
||||
throw compatibilityException();
|
||||
}
|
||||
|
||||
return value;
|
||||
|
@ -32,15 +32,15 @@ dependencies:
|
||||
http: ^0.13.3
|
||||
|
||||
dev_dependencies:
|
||||
analyzer: ^3.0.0
|
||||
analyzer: ^4.7.0
|
||||
archive: ^3.1.2
|
||||
cli_pkg: ^2.1.4
|
||||
crypto: ^3.0.0
|
||||
dart_style: ^2.0.0
|
||||
dartdoc: ^5.0.0
|
||||
dartdoc: ^6.0.0
|
||||
grinder: ^0.9.0
|
||||
node_preamble: ^2.0.0
|
||||
lints: ^1.0.0
|
||||
lints: ^2.0.0
|
||||
pub_api_client: ^2.1.1
|
||||
pub_semver: ^2.0.0
|
||||
pubspec_parse: ^1.0.0
|
||||
|
@ -128,7 +128,7 @@ class _Visitor extends RecursiveAstVisitor<void> {
|
||||
}
|
||||
|
||||
void visitClassDeclaration(ClassDeclaration node) {
|
||||
if (_sharedClasses.contains(node.name.name)) {
|
||||
if (_sharedClasses.contains(node.name2.lexeme)) {
|
||||
_skipNode(node);
|
||||
} else {
|
||||
super.visitClassDeclaration(node);
|
||||
@ -141,7 +141,7 @@ class _Visitor extends RecursiveAstVisitor<void> {
|
||||
}
|
||||
|
||||
void visitMethodDeclaration(MethodDeclaration node) {
|
||||
if (_synchronizeName(node.name.name) != node.name.name) {
|
||||
if (_synchronizeName(node.name2.lexeme) != node.name2.lexeme) {
|
||||
// If the file defines any asynchronous versions of synchronous functions,
|
||||
// remove them.
|
||||
_skipNode(node);
|
||||
|
Loading…
x
Reference in New Issue
Block a user