From f49fe68b5519d12c519854ce6c5113d2d9229317 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Wed, 15 Oct 2025 14:54:32 -0700 Subject: [PATCH 1/2] Initial commit of package:js_interop 0.1.0-beta Making a breaking change to avoid breaking any existing users of package:js_interop. Also modifies the monorepo's README to detail the packages within rather than being a symlink to web's README. --- README.md | 12 +++++++++++- js_interop/CHANGELOG.md | 3 +++ js_interop/LICENSE | 26 ++++++++++++++++++++++++++ js_interop/README.md | 4 ++++ js_interop/pubspec.yaml | 7 +++++++ web_generator/README.md | 2 +- 6 files changed, 52 insertions(+), 2 deletions(-) mode change 120000 => 100644 README.md create mode 100644 js_interop/CHANGELOG.md create mode 100644 js_interop/LICENSE create mode 100644 js_interop/README.md create mode 100644 js_interop/pubspec.yaml diff --git a/README.md b/README.md deleted file mode 120000 index 84abb5c6..00000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -web/README.md \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..4847e1ee --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +{% comment %} +TODO(srujzs): Add links to CI once we have a badge that doesn't say "package:web" and is more generic. +{% endcomment %} + +## Packages + +| Package | Description | Version | +| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | +| [web](web/) | Lightweight browser API bindings built around [JS interop](https://dart.dev/interop/js-interop). | [![pub package](https://img.shields.io/pub/v/web.svg)](https://pub.dev/packages/web) | +| [js_interop](js_interop/) | Utility functions and types for [`dart:js_interop`](https://api.dart.dev/dart-js_interop/) and [`dart:js_interop_unsafe`](https://api.dart.dev/dart-js_interop_unsafe/). | [![pub package](https://img.shields.io/pub/v/js_interop.svg)](https://pub.dev/packages/js_interop) | +| [web_generator](web_generator/) | Tools to generate Dart interfaces from TypeScript declaration files and Web IDL definitions. | N/A | diff --git a/js_interop/CHANGELOG.md b/js_interop/CHANGELOG.md new file mode 100644 index 00000000..869e5688 --- /dev/null +++ b/js_interop/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.1.0-beta + +- Initial release. diff --git a/js_interop/LICENSE b/js_interop/LICENSE new file mode 100644 index 00000000..83269870 --- /dev/null +++ b/js_interop/LICENSE @@ -0,0 +1,26 @@ +Copyright 2025, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/js_interop/README.md b/js_interop/README.md new file mode 100644 index 00000000..22a25d6d --- /dev/null +++ b/js_interop/README.md @@ -0,0 +1,4 @@ +[![pub package](https://img.shields.io/pub/v/js_interop.svg)](https://pub.dev/packages/js_interop) +[![package publisher](https://img.shields.io/pub/publisher/js_interop.svg)](https://pub.dev/packages/js_interop/publisher) + +Utility functions and types for [`dart:js_interop`](https://api.dart.dev/dart-js_interop/) and [`dart:js_interop_unsafe`](https://api.dart.dev/dart-js_interop_unsafe/). \ No newline at end of file diff --git a/js_interop/pubspec.yaml b/js_interop/pubspec.yaml new file mode 100644 index 00000000..8207a36e --- /dev/null +++ b/js_interop/pubspec.yaml @@ -0,0 +1,7 @@ +name: js_interop +version: 0.1.0-beta +description: Utility APIs for dart:js_interop and dart:js_interop_unsafe. +repository: https://github.com/dart-lang/web + +environment: + sdk: ^3.9.0 diff --git a/web_generator/README.md b/web_generator/README.md index 19213346..0c1e3e1f 100644 --- a/web_generator/README.md +++ b/web_generator/README.md @@ -1,6 +1,6 @@ ## What's this? -This package contains tools to generate Dart interfaces from TypeScript Declaration code and Web IDL definitions. +Tools to generate Dart interfaces from TypeScript declaration files and Web IDL definitions. This package is used to generate [`web`](https://github.com/dart-lang/web/tree/main/web) from Web IDL definitions From aa2764141efee870933ec24fbf4830e1ff1b5c35 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Wed, 15 Oct 2025 15:11:43 -0700 Subject: [PATCH 2/2] Use markdown comment and not the Dart website comment --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 4847e1ee..3f73e21c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -{% comment %} -TODO(srujzs): Add links to CI once we have a badge that doesn't say "package:web" and is more generic. -{% endcomment %} + ## Packages