Skip to content

Commit e2f9705

Browse files
authored
Merge pull request #1795 from stof/upgrade_dependencies
Upgrade dev dependencies to the latest version
2 parents 0344842 + ba2971c commit e2f9705

File tree

10 files changed

+26
-29
lines changed

10 files changed

+26
-29
lines changed

analysis/lib/analysis_options.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@ analyzer:
1111
# These are necessary for matching the JS API.
1212
avoid_types_as_parameter_names: ignore
1313

14-
# This has tons of false positives for StreamSubscription.close().
15-
unawaited_futures: ignore
16-
1714
# These are style preferences rather than potential semantic issues. While
1815
# we're not intrinsically opposed to adopting them for consistency with the
1916
# Dart ecosystem, there aren't currently any automated tools to help us
2017
# migrate to and remain consistent with these style rules, so achieving
2118
# consistency isn't worth the engineering time we'd spend getting there.
2219
annotate_overrides: ignore
23-
prefer_single_quotes: ignore
2420
use_function_type_syntax_for_parameters: ignore
21+
prefer_interpolation_to_compose_strings: ignore
2522

2623
include: package:lints/recommended.yaml

analysis/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ homepage: https://github.com/sass/dart-sass/tree/master/analysis
66
publish_to: none
77

88
environment:
9-
sdk: ">=2.0.0 <3.0.0"
9+
sdk: ">=2.17.0 <3.0.0"
1010

1111
dependencies:
12-
lints: ^1.0.0
12+
lints: ^2.0.0

lib/src/callable.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import 'exception.dart';
1010
import 'value.dart';
1111

1212
export 'callable/async.dart';
13-
export 'callable/async_built_in.dart';
14-
export 'callable/built_in.dart';
13+
export 'callable/async_built_in.dart' show AsyncBuiltInCallable;
14+
export 'callable/built_in.dart' show BuiltInCallable;
1515
export 'callable/plain_css.dart';
1616
export 'callable/user_defined.dart';
1717

lib/src/callable/async_built_in.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import '../value.dart';
1111
import 'async.dart';
1212

1313
/// An [AsyncBuiltInCallable]'s callback.
14-
typedef _Callback = FutureOr<Value> Function(List<Value> arguments);
14+
typedef Callback = FutureOr<Value> Function(List<Value> arguments);
1515

1616
/// A callable defined in Dart code.
1717
///
@@ -26,7 +26,7 @@ class AsyncBuiltInCallable implements AsyncCallable {
2626
final ArgumentDeclaration _arguments;
2727

2828
/// The callback to run when executing this callable.
29-
final _Callback _callback;
29+
final Callback _callback;
3030

3131
/// Creates a function with a single [arguments] declaration and a single
3232
/// [callback].
@@ -76,7 +76,7 @@ class AsyncBuiltInCallable implements AsyncCallable {
7676
/// If no exact match is found, finds the closest approximation. Note that this
7777
/// doesn't guarantee that [positional] and [names] are valid for the returned
7878
/// [ArgumentDeclaration].
79-
Tuple2<ArgumentDeclaration, _Callback> callbackFor(
79+
Tuple2<ArgumentDeclaration, Callback> callbackFor(
8080
int positional, Set<String> names) =>
8181
Tuple2(_arguments, _callback);
8282
}

lib/src/callable/built_in.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import '../ast/sass.dart';
88
import '../callable.dart';
99
import '../value.dart';
1010

11-
typedef _Callback = Value Function(List<Value> arguments);
11+
typedef Callback = Value Function(List<Value> arguments);
1212

1313
/// A callable defined in Dart code.
1414
///
@@ -20,7 +20,7 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
2020
final String name;
2121

2222
/// The overloads declared for this callable.
23-
final List<Tuple2<ArgumentDeclaration, _Callback>> _overloads;
23+
final List<Tuple2<ArgumentDeclaration, Callback>> _overloads;
2424

2525
/// Creates a function with a single [arguments] declaration and a single
2626
/// [callback].
@@ -73,7 +73,7 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
7373
/// If passed, [url] is the URL of the module in which the function is
7474
/// defined.
7575
BuiltInCallable.overloadedFunction(
76-
this.name, Map<String, _Callback> overloads,
76+
this.name, Map<String, Callback> overloads,
7777
{Object? url})
7878
: _overloads = [
7979
for (var entry in overloads.entries)
@@ -91,9 +91,9 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
9191
/// If no exact match is found, finds the closest approximation. Note that this
9292
/// doesn't guarantee that [positional] and [names] are valid for the returned
9393
/// [ArgumentDeclaration].
94-
Tuple2<ArgumentDeclaration, _Callback> callbackFor(
94+
Tuple2<ArgumentDeclaration, Callback> callbackFor(
9595
int positional, Set<String> names) {
96-
Tuple2<ArgumentDeclaration, _Callback>? fuzzyMatch;
96+
Tuple2<ArgumentDeclaration, Callback>? fuzzyMatch;
9797
int? minMismatchDistance;
9898

9999
for (var overload in _overloads) {

lib/src/functions/map.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ final _hasKey = _function("has-key", r"$map, $key, $keys...", (arguments) {
170170
Value _modify(SassMap map, Iterable<Value> keys, Value modify(Value old),
171171
{bool addNesting = true}) {
172172
var keyIterator = keys.iterator;
173-
SassMap _modifyNestedMap(SassMap map) {
173+
SassMap modifyNestedMap(SassMap map) {
174174
var mutableMap = Map.of(map.contents);
175175
var key = keyIterator.current;
176176

@@ -182,11 +182,11 @@ Value _modify(SassMap map, Iterable<Value> keys, Value modify(Value old),
182182
var nestedMap = mutableMap[key]?.tryMap();
183183
if (nestedMap == null && !addNesting) return SassMap(mutableMap);
184184

185-
mutableMap[key] = _modifyNestedMap(nestedMap ?? const SassMap.empty());
185+
mutableMap[key] = modifyNestedMap(nestedMap ?? const SassMap.empty());
186186
return SassMap(mutableMap);
187187
}
188188

189-
return keyIterator.moveNext() ? _modifyNestedMap(map) : modify(map);
189+
return keyIterator.moveNext() ? modifyNestedMap(map) : modify(map);
190190
}
191191

192192
/// Merges [map1] and [map2], with values in [map2] taking precedence.

lib/src/utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ extension MapExtension<K, V> on Map<K, V> {
455455
/// [key] to the result.
456456
V putOrMerge(K key, V value, V Function(V oldValue, V newValue) merge) =>
457457
containsKey(key)
458-
? this[key] = merge(this[key]!, value)
458+
? this[key] = merge(this[key] as V, value)
459459
: this[key] = value;
460460
}
461461

lib/src/value/number.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ abstract class SassNumber extends Value {
593593
var otherHasUnits = newNumerators.isNotEmpty || newDenominators.isNotEmpty;
594594
if (coerceUnitless && (!hasUnits || !otherHasUnits)) return this.value;
595595

596-
SassScriptException _compatibilityException() {
596+
SassScriptException compatibilityException() {
597597
if (other != null) {
598598
var message = StringBuffer("$this and");
599599
if (otherName != null) message.write(" \$$otherName:");
@@ -634,7 +634,7 @@ abstract class SassNumber extends Value {
634634
if (factor == null) return false;
635635
value *= factor;
636636
return true;
637-
}, orElse: () => throw _compatibilityException());
637+
}, orElse: () => throw compatibilityException());
638638
}
639639

640640
var oldDenominators = denominatorUnits.toList();
@@ -644,11 +644,11 @@ abstract class SassNumber extends Value {
644644
if (factor == null) return false;
645645
value /= factor;
646646
return true;
647-
}, orElse: () => throw _compatibilityException());
647+
}, orElse: () => throw compatibilityException());
648648
}
649649

650650
if (oldNumerators.isNotEmpty || oldDenominators.isNotEmpty) {
651-
throw _compatibilityException();
651+
throw compatibilityException();
652652
}
653653

654654
return value;

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ dependencies:
3232
http: ^0.13.3
3333

3434
dev_dependencies:
35-
analyzer: ^3.0.0
35+
analyzer: ^4.7.0
3636
archive: ^3.1.2
3737
cli_pkg: ^2.1.4
3838
crypto: ^3.0.0
3939
dart_style: ^2.0.0
40-
dartdoc: ^5.0.0
40+
dartdoc: ^6.0.0
4141
grinder: ^0.9.0
4242
node_preamble: ^2.0.0
43-
lints: ^1.0.0
43+
lints: ^2.0.0
4444
pub_api_client: ^2.1.1
4545
pub_semver: ^2.0.0
4646
pubspec_parse: ^1.0.0

tool/grind/synchronize.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class _Visitor extends RecursiveAstVisitor<void> {
128128
}
129129

130130
void visitClassDeclaration(ClassDeclaration node) {
131-
if (_sharedClasses.contains(node.name.name)) {
131+
if (_sharedClasses.contains(node.name2.lexeme)) {
132132
_skipNode(node);
133133
} else {
134134
super.visitClassDeclaration(node);
@@ -141,7 +141,7 @@ class _Visitor extends RecursiveAstVisitor<void> {
141141
}
142142

143143
void visitMethodDeclaration(MethodDeclaration node) {
144-
if (_synchronizeName(node.name.name) != node.name.name) {
144+
if (_synchronizeName(node.name2.lexeme) != node.name2.lexeme) {
145145
// If the file defines any asynchronous versions of synchronous functions,
146146
// remove them.
147147
_skipNode(node);

0 commit comments

Comments
 (0)