Node.js interoperability for Dart.
If you plan to play with the sources, you will also need the latest Grinder version.
In order to run the tests, you must install the Node.js test dependencies by running the following command:
$ npm install
Then, you can launch the test runner from the command prompt:
$ pub run test
Node.js Interop for Dart is distributed under the MIT License.
This file contains highlights of what changes on each version of the Node.js Interop for Dart library.
Platform.operatingSystemVersion
property.throwDeprecation
and traceDeprecation
properties to the Process
class.ProcessSignal
class.nodejs_interop.js
library (JSObject
, Json
, Reflect
, TypedArray
and Uint8Array
).Buffer
class, as this class is casted to the Uint8List
class by the Dart runtime.convertToFuture()
function to asFuture()
.convertToStream()
function to asStream()
.DeleteOptions
class to DelOptions
.NodeProcess
class to Process
.NodeRelease
class to Release
.ReadStream
class to FSReadStream
.WriteStream
class to FSWriteStream
.FileStat.fromStats()
constructor is now private.tty
module.Future
(e.g. fn1cb0ToFuture()
, fn3cb2ToFuture()
, ...).RandomAccessFile
and SystemEncoding
classes.asPromise()
, deleteProperty()
and getProperties()
functions.Promise.JS$catch()
method.FileStat
class.nodejs_interop.js
library exports the functions from the dart:js_util
library.convertToDart()
function to dartify()
.ReaddirEnhancedModule
class to ReaddirModule
.nodejs_interop.io
, nodejs_interop.js
, nodejs_interop.node
and nodejs_interop.npm
libraries are no longer exported individually.exit()
and sleep()
functions.exitCode
and pid
properties.Buffer.BYTES_PER_ELEMENT
static property.InternetAddress
, InternetAddressType
, JSObject
, NetworkInterface
, ProcessInfo
and Reflect
classes.minify
option to the Pub transformer.Console
and Uint8Array
classes.dns
module.Path
class to PathObject
.ReadOptions
class to ReadFileOptions
.ResolveOptions
class to ResolveFunctionOptions
.WarningOptions
class to EmitWarningOptions
.WriteOptions
class to WriteFileOptions
.@anonymous
classes.dns
module.querystring
module.string_decoder
module.url
module.util
module.FileStat.toJson()
method.Process
class to NodeProcess
.child_process
module.cluster
module.stream
module.vm
module.BufferEncoding.fromEncoding()
method.current
and systemTemp
static properties to the Directory
class.fs
module.Js
prefix to JS
for JavaScript errors.NodejsPlatform
class to Platform
.buffer
module.console
module.convertToStream()
and loadLibrary()
functions.Json
, Module
and Writable
classes.fs
module.util
module.Process
class.require()
function.io
, js
, node
and npm
.os
module.convertToDart()
and convertToFuture()
functions.CpuUsage
, NodejsPlatform
and Promise
classes.Process
class.PathObject
class to Path
.assert
module.errors
module.events
module.require()
function and the path
module.Add this to your package's pubspec.yaml file:
dependencies:
nodejs_interop: ^0.9.0
You can install packages from the command line:
with pub:
$ pub get
Alternatively, your editor might support pub get
.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:nodejs_interop/io.dart';
import 'package:nodejs_interop/js.dart';
import 'package:nodejs_interop/node.dart';
import 'package:nodejs_interop/npm.dart';
import 'package:nodejs_interop/transformer.dart';
Version | Uploaded | Documentation | Archive |
---|---|---|---|
0.9.0 | Mar 5, 2018 |
|
|
0.8.0 | Jan 6, 2018 |
|
|
0.7.0 | Dec 17, 2017 |
|
|
0.6.0 | Dec 5, 2017 |
|
|
0.5.0 | Nov 23, 2017 |
|
|
0.4.0 | Nov 21, 2017 |
|
|
0.3.0 | Nov 14, 2017 |
|
|
0.2.0 | Nov 13, 2017 |
|
|
0.1.0 | Nov 10, 2017 |
|
|
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
21
|
Health:
Code health derived from static analysis.
[more]
|
--
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
--
|
Overall:
Weighted score of the above.
[more]
|
10
|
The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.
Support Dart 2 in pubspec.yaml
.
The SDK constraint in pubspec.yaml
doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.
Make sure dartdoc
successfully runs on your package's source files. (-10 points)
Dependencies were not resolved.
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.0.0-dev <2.0.0 |