Commit graph

63 commits

Author SHA1 Message Date
Devon Carew
62bb4b76d5 [pkg] normalize the headers of the pkg/ readmes
Change-Id: Ida2006d0dd2bbb7d441f15e494fd8c929f15a765
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246680
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-05-31 21:00:13 +00:00
Devon Carew
f7c46f145c [pkg] prefer 'any' deps for package dev dependencies
Tested: CI validation
Change-Id: If65cc156130a65ffe00c6f1660ac320e2921afae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246053
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-05-27 01:34:59 +00:00
Joshua Litt
84497e41ca [package:js] Add @trustTypes annotation.
Adds an experimental `@trustTypes` annotation which can be used during
migration to static interop to preserve the older semantics for JS interop.

Change-Id: Ic00a6c968b15f8c8f5d0840b82db5a6670eaf0eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241362
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-20 15:24:18 +00:00
Devon Carew
2a20d4be24 [pkg] ensure each publishable package has a repository pubspec field
Change-Id: I06c0d10c87c3f329098352a7abe9ef9fa0b1532e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241504
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-04-19 22:13:51 +00:00
Devon Carew
3d5e62ed2e Move pkg/js to package:lints.
Change-Id: Idf85d4f5ece3725dbd806b064ff8b34b91181205
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240918
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-04-15 20:15:15 +00:00
Alexander Thomas
30beab0f43 [infra] Add OWNERS to the Dart SDK
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.

For additional background information see go/dart-sdk-owners.

TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-02-14 14:06:34 +00:00
Srujan Gaddam
7701bfb3e9 [pkg:js] Update CHANGELOG, README, and WORKAROUNDS
Updates documentation now that static interop features are
available. This should be the last component before the new
`package:js` version is published.

Change-Id: I9ddb494a5723036ca699bdcf10a000f7670cdfd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224401
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2021-12-16 03:11:57 +00:00
Srujan Gaddam
0d66f87747 [pkg:js] Roll 0.6.4 to include static interop changes
Roll the version number and constrain the sdk version with this
new roll. Next beta will be 2.16, so use that as the minimum.

Change-Id: I50ac1309255f9553ec2faa21958759e15e7712cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222940
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2021-12-13 22:13:16 +00:00
Srujan Gaddam
2494a1bdba [pkg:js] Enable staticInterop annotations
With erasure and small changes to RTI, these can be uncommented.

Change-Id: I3fb29cd9984b60a8fde74eb47849436b6cb6dd44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216273
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2021-12-10 18:36:00 +00:00
Sam Rawlins
976cffc4c2 Use strict-casts in js and dev_complier
strict-casts is mostly a drop-in replacement for the deprecated
`implicit-casts: false` option. One big difference, seen in this CL, is that
strict-casts will report a non-Iterable (or non-Stream) in a for-each loop.

Change-Id: Ibc463ae9c870b6a795483c5dea0d2b856e7fd883
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221546
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-11-29 23:22:44 +00:00
Ahmed Ashour
d041cf0478 Remove extra the, be and of
Fixes #https://github.com/dart-lang/sdk/issues/47504

TEST=No tests needed, only comments affected.

Change-Id: Ie096307b5ce314d328fea6780f396aaa226ad3b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216182
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-10-20 09:29:01 +00:00
Srujan Gaddam
7990144bad [pkg:js] Disable @staticInterop until ready
Erasure and subtyping need to be handled before we're ready to
expose static interop classes.

Change-Id: Idf939ef196845e4e068276c326d3bfbec54fdd38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215012
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-10-06 19:04:02 +00:00
Srujan Gaddam
67be663490 [pkg:js] Add @staticInterop annotation to package:js
Adds @staticInterop annotation to allow users to declare static interop
classes. Also adds errors for erroneous usage of static interop
classes, like including instance members or using a non-static
supertype.

Change-Id: I21abafbf6ea6c2eb7cd0425f0a54c1ba35d6ec6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215010
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-10-06 19:04:02 +00:00
Jeffrey Swan
fed6cadf77 fix(docs): corrects common typos in project documentation
Scope of changes is restricted to markdown docs only. Changes made in agreement with Standard American English.

Closes https://github.com/dart-lang/sdk/pull/45818
https://github.com/dart-lang/sdk/pull/45818

TEST=Manual review of the changed markdown files.

GitOrigin-RevId: 6df9128b46e4e51e634baf534c0169f62bc6a67e
Change-Id: I7b67dcb5a6e0a03db2b6eea24ace8dee207c4a11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196742
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-05-18 15:48:18 +00:00
Franklin Yow
03101c0c2b Update LICENSE
Changes to comply to internal review

Closes https://github.com/dart-lang/sdk/pull/45568
https://github.com/dart-lang/sdk/pull/45568

TEST=CL contains no code changes.

No-Try: true
GitOrigin-RevId: 65796784e5fdfddaa021b5c55ad435b1db419700
Change-Id: I085a948f16dc9a0de128ed0bd456ae69adf6c124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193888
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-04-07 10:28:38 +00:00
Nate Bosch
d82e2b2e44 Prepare to publish js and meta for null safety
Change-Id: Iecbe288b989e6053d1a1bd9372795b70e6ba05d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182360
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2021-02-02 21:33:17 +00:00
Srujan Gaddam
8e663541c9 [ddc] Change is checks for JS types
Changes 'is' checks for JS types such that it no longer does an
instance of check and instead only checks to see if the object
in question is a JS object or appropriate subtype. This means that
any two @JS objects will pass an is check and therefore can be
casted as one another. This makes it consistent with expected
behavior and dart2js.

Also amends the README to reflect the unified behavior.

Change-Id: I11aa105d6cafbbafde482b27dcc1182c0960cce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173140
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-12-10 01:38:26 +00:00
pq
bbafd3b69d remove redundant experiment
Since opted in, this experiment is redundant.



Change-Id: I528bd726e655cae4c3f4943ed4f3e713edb9921d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171740
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2020-11-12 17:59:37 +00:00
Nate Bosch
7784843910 Bump SDK constraints in js for pub
Use a 2.12.0 lower bound since pub does not understand allowed
experiments for earlier versions.

Use a 3.0.0 upper bound to avoid a warning in pub and to give some
flexibility in publishing for stable.

Change-Id: I482e89becc7aa9f1a36298701ade70cbcc39702c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170204
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-11-03 21:28:47 +00:00
Jacob MacDonald
af5501c232 allow 2.12 prerelease sdks for meta and js
Change-Id: I4406a3c95993e2c8db4df3932a989f24f6a6ac05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169020
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2020-10-23 17:49:24 +00:00
Nate Bosch
ccbde0c211 Prepare package:js for the 2.11 dev SDKs
Bump the upper bound to allow 2.10 stable and 2.11.0 dev SDK versions.

Change-Id: I6494e862bde9ce253144b0f82bd121604ab49f94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163730
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-09-22 01:17:27 +00:00
Jacob MacDonald
146ad014d9 update js/meta for the 2.10 dev sdk
- bumps the meta version so it can be published
- updates sdk constraints to be consistent with all other packages (should have been equivalent anyways)

Change-Id: I83520d291625f13b0029e28aecb9714f365a75b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155460
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2020-07-22 15:28:34 +00:00
William Hesse
f88ce7aef5 Increase Dart version to 2.10
Change-Id: Ic6b556f935602834564aca24690608aa624efa43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155440
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-22 13:22:07 +00:00
Jacob MacDonald
e780b31f73 prep package:js for null safety release
Change-Id: Ie4ce3d83d4dfc60ff5728152e9b391a84c50e6b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153824
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2020-07-09 19:29:03 +00:00
Kevin Moore
073cbcc5a4 [pkg:js] Enable pedantic lints
Change-Id: Ia03a68431d3e62f2b5db45d3c38fb99f5ab07ca6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151540
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2020-06-17 16:35:56 +00:00
Jacob MacDonald
e7218354a8 add all flutter/flutter_test/test isolate deps to the allow list
I also had to migrate package:js to nnbd as a part of this

Bug:https://github.com/dart-lang/sdk/issues/42274
Change-Id: Ia0223e013d2afb464c05eba71783827cf1fb4781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151400
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-06-17 04:58:30 +00:00
Nate Bosch
6a1113d864 Prepare to publish package:js
Make some improvements to bump up the pana score on the pub site.

- Make the package description a bit longer.
- Remove some unnecessary `new` and `const`.

Remove the reference to null safety. Drop the min SDK back to 2.0.0
After publish I will restore this. The SDK package config is unchanged
so this shouldn't impact whether tests can run with strong null safety.

Change-Id: I29d41914b1d9c4273fc6334d700be450d22616ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150468
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-06-08 22:24:54 +00:00
Nate Bosch
3b6ca27b41 Collapse package:js changelog
We haven't published any of the recent changes to `package:js`, revert
back to the version just after the latest published.

Remove the changelog entry referring to `promiseToFuture`. This was a change in
the SDK libraries and is not associated with any single version of `package:js`.

Remove the author field from the pubspec, it is unused.

Expand the pubspec description.

Change-Id: Id2a37a7c947656a6f5ff4dd577d0e7d32e8e0b61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148188
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2020-05-16 01:53:22 +00:00
Robert Nystrom
554f03a52e Opt package:js in to null safety.
This fixes the dart2js strong tests that are currently failing because
any test importing this library was treated as a mixed mode test.

Change-Id: Id856c9d96dd4253601facdb5db3926dbe636c209
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148280
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-05-16 00:41:22 +00:00
Nate Bosch
97cf54c58e Remove some stale JS interop known differences
Remove sections describing differences between dart2js and ddc that
have since been resolved.

Both ddc and dart2js will require use of `allowInterop` in all but
unlikely edge cases. Both will be strict about argument types and count
as long as `allowInterop` is used.

Other fixes:
- Fix spelling of "supersedes".
- Use `List.from` over `list.cast().toList()` in example.

Change-Id: If4ce0926a4460ed41ddea2714ee3324c60770d62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136844
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-02-26 00:52:43 +00:00
Kevin Moore
8342ec2c71 Fix pub.dev URLs throughout SDK repo
Change-Id: I5bcb7c40be12ee1dc887620281b4807469d67bbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125729
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-11-20 11:30:48 +00:00
Derek Xu
6d28f59c54 Added promiseToFuture function to js_util.dart
Change-Id: I1bfd3fadb0a212ec0ff150cad02bdf285e2e7edb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122240
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2019-11-04 22:56:45 +00:00
Kathy Walrath
0f109da0d1 Updating the package:js README
Closes #37883
https://github.com/dart-lang/sdk/pull/37883

GitOrigin-RevId: e14be88991f39db80422e98399fab26c8e9c038e
Change-Id: Ic4e45420dcf6fe71b5c215c435cd72ffb6e665f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113265
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Kathy Walrath <kathyw@google.com>
2019-08-19 17:52:57 +00:00
Nate Bosch
60e474bf7a Add section on known bugs
For now stage this in the package:js README - that might not be the best
place for it long term since the details may change...

- Add a note that makes it explicit we expect all interop to use
  `package:js` instead of `dart:js`.
- Add notes about known limitations and differences between dart2js and
  DDC.

Change-Id: Ib4c967ea1435dd85f41f56646140352b125cee4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107560
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-06-27 23:38:43 +00:00
Nate Bosch
ec160b74dc Start cleaning up docs in package:js
- Remove some unnecessary details in the README. The SDK constraint
  duplicates the pubspec, the dependencies section duplicates automatic
  info on the pub site, and the contributing section duplicates generate
  Dart/SDK contributing information. The issue link is still useful
  since it fills in a template, but we should update it to include a
  label by default.
- Use "JavaScript" consistently in docs.
- Rephrase some doc comments for clarity.
- Drop `new` from examples.
- Use consistent single quotes in examples.
- Always show the `@JS()` annotation on `library` in examples.
- Move the note about factory constructors for anonymous classes to the
  annotation from the README.
- Bump the mimimum SDK to`2.0.0` since there isn't utility in claiming
  support for older SDKs.

There are stale docs remaining in the `varargs.dart` library that should
be handled separately by deleting that library.

Change-Id: Ida51d2ec3fd31210b55dc91042a0ac1cf77210b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107450
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-06-27 21:36:54 +00:00
Jenny Messerly
c6556dc1a3 [package:js] draft proposal to improve JS interop, see #35084
Change-Id: I77a01469113cdfe6c9c3533cfb398ab97d5cd3b0
Reviewed-on: https://dart-review.googlesource.com/c/89404
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-02-05 01:44:32 +00:00
Kevin Moore
fa629d83d8 pkg/js: fix pubspec author
Change-Id: I4ef5d232c5ca6e80f9df0f8a329d83a13aaa3be5
Reviewed-on: https://dart-review.googlesource.com/65603
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-07-18 21:36:10 +00:00
Kevin Moore
af613c7479 pkg/js: support Dart <3.0.0
Change-Id: Ifc625e6dd33e48e7f446b7d7f19b7c14febd0e52
Reviewed-on: https://dart-review.googlesource.com/65600
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2018-07-18 21:30:42 +00:00
Kevin Moore
6b91739cec Making license files consistent across all packages
Helps with internal license concatenation

Change-Id: I3042ba2ec0ef5fcd35937254827560f8a97c2f8a
Reviewed-on: https://dart-review.googlesource.com/9363
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2017-09-28 19:33:08 +00:00
Jacob Richman
4b0afdf5cb Run dartfmt on package:js
BUG=
R=alanknight@google.com

Review-Url: https://codereview.chromium.org/2750123003 .
2017-03-21 18:10:03 -07:00
Alexandre Ardhuin
3f1720069a Add a note on the README of js package (#27701) 2016-11-23 16:36:54 +01:00
Danny Tuppeny
984f5c928d Added js import to sample code. (#26985)
This import seems to be required for the sample code to pass the analyzer.
2016-08-22 09:20:06 -07:00
Jacob Richman
bacd980554 Fix sdk version constraint for pkg:js 0.6.1
BUG=
R=kevmoo@google.com

Review URL: https://codereview.chromium.org/2175423004 .
2016-07-25 14:49:13 -07:00
Jacob Richman
410cde6023 Fix analyzer warnings in js_util_test, skip js_util_test in csp mode and baseline expectations for analyze_library.status
Update pkg/js CHANGELOG.md to address comment from previous CL.

BUG=

Review URL: https://codereview.chromium.org/2179153002 .
2016-07-25 13:20:25 -07:00
Jacob Richman
96ca5db7e5 Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop objects in cases where the member name is not known statically. These methods would be extension methods on JSObject if Dart supported extension methods. Update package js to export these methods. Implement in Dart2JS. Implement JS$ in dart2js.
BUG=
R=alanknight@google.com, sra@google.com

Review URL: https://codereview.chromium.org/2150313003 .
2016-07-25 09:59:01 -07:00
Nathan Kerr
83d8f91397 Remove duplicate word 2015-11-19 14:06:01 -08:00
Kevin Moore
3d43d6d51c pkg/js: prepare for 0.6.0 release
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1456223002 .
2015-11-18 15:34:54 -08:00
Kevin Moore
87fc010974 pkg/js: moved example code to https://github.com/google/chartjs.dart/
R=jacobr@google.com

Review URL: https://codereview.chromium.org/1449053004 .
2015-11-17 11:11:07 -08:00
Kevin Moore
e7e012e386 fix readme for pkg/js and prepare another release
Update SDK changelog to mention improved JS interop

R=jacobr@google.com

Review URL: https://codereview.chromium.org/1438003002 .
2015-11-11 12:19:43 -08:00
Kevin Moore
928e30586e update pkg/js for changes is 1.13-dev.7.7
R=jacobr@google.com

Review URL: https://codereview.chromium.org/1421513006 .
2015-11-04 14:39:24 -08:00