Commit graph

39 commits

Author SHA1 Message Date
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
Alexandre Ardhuin 447b287d04 Update chart.js with @anonymous 2015-11-02 22:44:14 +01:00
Jacob Richman e0d2263bb3 Add @anonymous annotation and restrict object literal constructors to only anonymous classes. This frees up defining factory constructors that do not correspond to object literals on JS interop classes.
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org/1409033005 .
2015-10-29 19:18:19 -07:00
Jacob Richman eab2ef5d82 Rev pkg js version
BUG=
R=ochafik@google.com

Review URL: https://codereview.chromium.org/1425823003 .
2015-10-29 10:33:16 -07:00
Olivier Chafik 90f9686c01 Move varargs.dart to lib/src (not ready for external publicity yet). 2015-10-23 16:00:14 +01:00
Olivier Chafik f25a970187 Declarations for rest params / spread operator support in DDC (issue #24623). 2015-10-22 20:25:55 +01:00
Kevin Moore b74ce18b0c pkg/js: update version, example, and SDK constraint for annotation change
R=jacobr@google.com

Review URL: https://codereview.chromium.org/1417963002 .
2015-10-21 09:58:30 -07:00
Jacob Richman be1fcb9441 Switch Js to JS
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1410403003 .
2015-10-19 17:32:10 -07:00
Kevin Moore e32d7d7029 pkg/js: add link to example
Review URL: https://codereview.chromium.org/1406093002 .
2015-10-15 16:33:05 -07:00
Kevin Moore 045325b32e pkg/js: improved readme, added example
R=jacobr@google.com

Review URL: https://codereview.chromium.org/1411503002 .
2015-10-15 14:51:35 -07:00
Kevin Moore 9e8c868c3b Big cleanup to README. Added CHANGELOG.
R=jacobr@google.com

Review URL: https://codereview.chromium.org/1404873004 .
2015-10-15 10:46:58 -07:00
Jacob Richman 6dd851e2a4 Update version number in pkg/js pubspec in preparation for publishing the package.
BUG=
R=kevmoo@google.com

Review URL: https://codereview.chromium.org/1405653002 .
2015-10-15 09:40:50 -07:00
Jacob Richman ff3309993c Fix version constraint so that package:js is fine to use with prerelease versions of the SDK
BUG=
R=nweiz@google.com

Review URL: https://codereview.chromium.org/1398973006 .
2015-10-13 14:32:15 -07:00
Jacob Richman cd2752431e Support user generated custom native JS classes.
BUG=
R=jmesserly@google.com, sra@google.com

Review URL: https://codereview.chromium.org//1318043005 .
2015-10-13 13:15:28 -07:00