From 2d1e04d247e682152f04e3994e3f20346e6b537e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Wed, 11 Dec 2024 14:36:38 -0800 Subject: [PATCH] Fix static analysis issues for dart 3.6 --- lib/src/embedded/js/concurrency.dart | 2 -- lib/src/embedded/js/isolate_main.dart | 2 +- lib/src/embedded/js/js.dart | 2 -- pkg/sass_api/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/src/embedded/js/concurrency.dart b/lib/src/embedded/js/concurrency.dart index 828c4e9e7..57205479f 100644 --- a/lib/src/embedded/js/concurrency.dart +++ b/lib/src/embedded/js/concurrency.dart @@ -4,8 +4,6 @@ import 'dart:js_interop'; -import 'js.dart'; - @JS('os.cpus') external JSArray _cpus(); diff --git a/lib/src/embedded/js/isolate_main.dart b/lib/src/embedded/js/isolate_main.dart index 8dbea2a57..1224877fd 100644 --- a/lib/src/embedded/js/isolate_main.dart +++ b/lib/src/embedded/js/isolate_main.dart @@ -10,5 +10,5 @@ import 'js.dart'; external JSArray get _argv; (String, JSArray) isolateMain() { - return (_argv[1]! as String, _argv.slice(2) as JSArray); + return ((_argv[1]! as JSString).toDart, _argv.slice(2) as JSArray); } diff --git a/lib/src/embedded/js/js.dart b/lib/src/embedded/js/js.dart index 2e671674b..040cbf0b2 100644 --- a/lib/src/embedded/js/js.dart +++ b/lib/src/embedded/js/js.dart @@ -9,7 +9,5 @@ extension JSTypedArrayExtension on JSTypedArray { } extension JSArrayExtension on JSArray { - external int get length; - external T operator [](int index); external JSArray slice([int start, int end]); } diff --git a/pkg/sass_api/pubspec.yaml b/pkg/sass_api/pubspec.yaml index cd149d3a8..bb441939a 100644 --- a/pkg/sass_api/pubspec.yaml +++ b/pkg/sass_api/pubspec.yaml @@ -7,7 +7,7 @@ description: Additional APIs for Dart Sass. homepage: https://github.com/sass/dart-sass environment: - sdk: ">=3.3.0 <4.0.0" + sdk: ">=3.6.0 <4.0.0" dependencies: sass: 1.83.0 diff --git a/pubspec.yaml b/pubspec.yaml index 734cdfd72..7ab709223 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,7 +8,7 @@ executables: sass: sass environment: - sdk: ">=3.3.0 <4.0.0" + sdk: ">=3.6.0 <4.0.0" dependencies: args: ^2.0.0