Skip to content

Commit

Permalink
pkg/js: mark discontinued/deprecated
Browse files Browse the repository at this point in the history
Towards #59716

Change-Id: Iaea45a8fccf5c3e2fb52ef34420ddbcd5b92a13f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401201
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
  • Loading branch information
kevmoo authored and Commit Queue committed Dec 17, 2024
1 parent ed32d24 commit 0512bab
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions pkg/dev_compiler/web/stack_trace_mapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 4 additions & 0 deletions pkg/js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 4 additions & 2 deletions pkg/js/README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 3 additions & 0 deletions pkg/js/lib/js.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions pkg/js/lib/js_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
7 changes: 1 addition & 6 deletions pkg/js/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 0512bab

Please sign in to comment.