Skip to content

Commit 0512bab

Browse files
kevmooCommit Queue
authored andcommitted
pkg/js: mark discontinued/deprecated
Towards #59716 Change-Id: Iaea45a8fccf5c3e2fb52ef34420ddbcd5b92a13f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401201 Reviewed-by: Srujan Gaddam <[email protected]> Auto-Submit: Kevin Moore <[email protected]> Reviewed-by: Kevin Moore <[email protected]> Commit-Queue: Srujan Gaddam <[email protected]>
1 parent ed32d24 commit 0512bab

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

pkg/dev_compiler/web/stack_trace_mapper.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
@JS()
2222
library;
2323

24+
// ignore: deprecated_member_use
2425
import 'package:js/js.dart';
2526
import 'package:path/path.dart' as p;
2627
import 'package:source_maps/source_maps.dart';

pkg/js/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.7.2
2+
3+
- Mark libraries as `@Deprecated`.
4+
15
## 0.7.1
26

37
- README update to indicate that `dart:js_interop` should be preferred.

pkg/js/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[![pub package](https://img.shields.io/pub/v/js.svg)](https://pub.dev/packages/js)
22
[![package publisher](https://img.shields.io/pub/publisher/js.svg)](https://pub.dev/packages/js/publisher)
33

4-
**Important:** Prefer using `dart:js_interop` instead of this package for JS
5-
interop. See the [JS interop documentation] for more details.
4+
> [!CAUTION]
5+
> This package is discontinued.
6+
> Prefer using `dart:js_interop` instead of this package for JS
7+
> interop. See the [JS interop documentation] for more details.
68
79
Use this package when you want to call JavaScript APIs from Dart code, or vice
810
versa.

pkg/js/lib/js.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
@Deprecated('Use dart:js_interop instead')
6+
library;
7+
58
// ignore: EXPORT_INTERNAL_LIBRARY
69
export 'dart:_js_annotations'
710
show JS, anonymous, staticInterop, trustTypes, JSExport;

pkg/js/lib/js_util.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
/// Utilities for interoperating with JavaScript.
6+
@Deprecated('Use dart:js_interop instead')
67
library;
78

89
export 'dart:js_util';

pkg/js/pubspec.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
name: js
2-
version: 0.7.1
2+
version: 0.7.2
33
description: Annotations to create static Dart interfaces for JavaScript APIs.
44
repository: https://github.com/dart-lang/sdk/tree/main/pkg/js
55

6-
# We export `dart:_js_annotations` in this library.
7-
analyzer:
8-
errors:
9-
export_internal_library: ignore
10-
116
topics:
127
- interop
138

0 commit comments

Comments
 (0)