nodejs_interop 0.6.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

Node.js Interop for Dart

Dart Node.js Release License Coverage Build

This package provides Node.js interoperability for Dart.

Requirements

If you plan to play with the sources, you will also need the latest Grinder version.

Installing via Pub

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  nodejs_interop: *

2. Install it

Install this package and its dependencies from a command prompt:

$ pub get

3. Import it

Now in your Dart code, you can use:

import 'dart:js';
import 'package:nodejs_interop/nodejs_interop.dart';

Usage

Unit tests

In order to run the tests, you must install the Node.js test dependencies by running the following command:

$ NODE_ENV=development npm install

Then, you must tell the test runtime where are located the newly installed npm packages by setting the NODE_PATH environment variable to the path of the local node_modules folder:

$ export NODE_PATH="$PWD/node_modules"

Finally, you can launch the test runner from the command prompt:

$ pub run test

See also

License

Node.js Interop for Dart is distributed under the MIT License.

Changelog

This file contains highlights of what changes on each version of the Node.js Interop for Dart library.

Version 0.6.0

  • Breaking change: renamed the Path class to PathObject.
  • Breaking change: renamed the ReadOptions class to ReadFileOptions.
  • Breaking change: renamed the ResolveOptions class to ResolveFunctionOptions.
  • Breaking change: renamed the WarningOptions class to EmitWarningOptions.
  • Breaking change: renamed the WriteOptions class to WriteFileOptions.
  • Added setters to properties of all @anonymous classes.
  • Added the dns module.
  • Added the querystring module.
  • Added the string_decoder module.
  • Added the url module.
  • Added a partial implementation of the process manager API.
  • Added a Pub transformer.
  • Finished the implementation of the util module.

Version 0.5.0

  • Breaking change: removed the FileStat.toJson() method.
  • Breaking change: renamed the Process class to NodeProcess.
  • Added the child_process module.
  • Added the cluster module.
  • Added the stream module.
  • Added the vm module.
  • Added the BufferEncoding.fromEncoding() method.
  • Added the current and systemTemp static properties to the Directory class.
  • Finished the implementation of the fs module.

Version 0.4.0

  • Breaking change: renamed the Js prefix to JS for JavaScript errors.
  • Breaking change: renamed the NodejsPlatform class to Platform.
  • Added bindings for a predefined set of npm packages.
  • Added the buffer module.
  • Added the console module.
  • Added the convertToStream() and loadLibrary() functions.
  • Added the Json, Module and Writable classes.
  • Added a partial implementation of the fs module.
  • Added a partial implementation of the util module.
  • Added a partial implementation of the file system API.
  • Finished the implementation of the Process class.
  • Finished the implementation of the require() function.
  • Splitted the library in modules: io, js, node and npm.

Version 0.3.0

  • Added the os module.
  • Added the convertToDart() and convertToFuture() functions.
  • Added the CpuUsage, NodejsPlatform and Promise classes.
  • Added a partial implementation of the Process class.

Version 0.2.0

  • Breaking change: renamed the PathObject class to Path.
  • Added the assert module.
  • Added the errors module.
  • Added the events module.

Version 0.1.0

  • Initial release: provides the require() function and the path module.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  nodejs_interop: ^0.6.0

2. Install it

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.

3. Import it

Now in your Dart code, you can use:


import 'package:nodejs_interop/nodejs_interop.dart';
  
Version Uploaded Documentation Archive
0.9.0 Mar 5, 2018 Go to the documentation of nodejs_interop 0.9.0 Download nodejs_interop 0.9.0 archive
0.8.0 Jan 6, 2018 Go to the documentation of nodejs_interop 0.8.0 Download nodejs_interop 0.8.0 archive
0.7.0 Dec 17, 2017 Go to the documentation of nodejs_interop 0.7.0 Download nodejs_interop 0.7.0 archive
0.6.0 Dec 5, 2017 Go to the documentation of nodejs_interop 0.6.0 Download nodejs_interop 0.6.0 archive
0.5.0 Nov 23, 2017 Go to the documentation of nodejs_interop 0.5.0 Download nodejs_interop 0.5.0 archive
0.4.0 Nov 21, 2017 Go to the documentation of nodejs_interop 0.4.0 Download nodejs_interop 0.4.0 archive
0.3.0 Nov 14, 2017 Go to the documentation of nodejs_interop 0.3.0 Download nodejs_interop 0.3.0 archive
0.2.0 Nov 13, 2017 Go to the documentation of nodejs_interop 0.2.0 Download nodejs_interop 0.2.0 archive
0.1.0 Nov 10, 2017 Go to the documentation of nodejs_interop 0.1.0 Download nodejs_interop 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

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.

Analysis issues and suggestions

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.0 <2.0.0