diff --git a/pkg/dev_compiler/web/stack_trace_mapper.dart b/pkg/dev_compiler/web/stack_trace_mapper.dart index ab3048b78d32..5c7f0e50dc2d 100644 --- a/pkg/dev_compiler/web/stack_trace_mapper.dart +++ b/pkg/dev_compiler/web/stack_trace_mapper.dart @@ -21,6 +21,7 @@ @JS() library; +// ignore: deprecated_member_use import 'package:js/js.dart'; import 'package:path/path.dart' as p; import 'package:source_maps/source_maps.dart'; diff --git a/pkg/js/CHANGELOG.md b/pkg/js/CHANGELOG.md index 7dcfbe15cc9e..384d9dadb5a5 100644 --- a/pkg/js/CHANGELOG.md +++ b/pkg/js/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.7.2 + +- Mark libraries as `@Deprecated`. + ## 0.7.1 - README update to indicate that `dart:js_interop` should be preferred. diff --git a/pkg/js/README.md b/pkg/js/README.md index 7810585241bc..d645444d07ee 100644 --- a/pkg/js/README.md +++ b/pkg/js/README.md @@ -1,8 +1,10 @@ [![pub package](https://img.shields.io/pub/v/js.svg)](https://pub.dev/packages/js) [![package publisher](https://img.shields.io/pub/publisher/js.svg)](https://pub.dev/packages/js/publisher) -**Important:** Prefer using `dart:js_interop` instead of this package for JS -interop. See the [JS interop documentation] for more details. +> [!CAUTION] +> This package is discontinued. +> Prefer using `dart:js_interop` instead of this package for JS +> interop. See the [JS interop documentation] for more details. Use this package when you want to call JavaScript APIs from Dart code, or vice versa. diff --git a/pkg/js/lib/js.dart b/pkg/js/lib/js.dart index e25ce144632e..268fcf3f340f 100644 --- a/pkg/js/lib/js.dart +++ b/pkg/js/lib/js.dart @@ -2,6 +2,9 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +@Deprecated('Use dart:js_interop instead') +library; + // ignore: EXPORT_INTERNAL_LIBRARY export 'dart:_js_annotations' show JS, anonymous, staticInterop, trustTypes, JSExport; diff --git a/pkg/js/lib/js_util.dart b/pkg/js/lib/js_util.dart index 3d18fa04cc6b..32ea5c11ae92 100644 --- a/pkg/js/lib/js_util.dart +++ b/pkg/js/lib/js_util.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Utilities for interoperating with JavaScript. +@Deprecated('Use dart:js_interop instead') library; export 'dart:js_util'; diff --git a/pkg/js/pubspec.yaml b/pkg/js/pubspec.yaml index dbdc600805f3..aea29ffb49c5 100644 --- a/pkg/js/pubspec.yaml +++ b/pkg/js/pubspec.yaml @@ -1,13 +1,8 @@ name: js -version: 0.7.1 +version: 0.7.2 description: Annotations to create static Dart interfaces for JavaScript APIs. repository: https://github.com/dart-lang/sdk/tree/main/pkg/js -# We export `dart:_js_annotations` in this library. -analyzer: - errors: - export_internal_library: ignore - topics: - interop