Comparing version 0.9.3 to 0.10.0
@@ -8,3 +8,4 @@ var fs = require('fs') | ||
[ /^0\.8\./, '0.8.22' ], | ||
[ /^0\.10\./, '0.10.0' ] | ||
[ /^0\.10\./, '0.10.0' ], | ||
[ /^0\.12\./, '0.12.0' ] | ||
]; | ||
@@ -11,0 +12,0 @@ |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.9.3", | ||
"version": "0.10.0", | ||
"description": "Edge.js: run .NET and Node.js in-process on Windows, Mac OS, and Linux", | ||
@@ -32,3 +32,4 @@ "tags": [ | ||
"dependencies": { | ||
"edge-cs": "0.2.7" | ||
"edge-cs": "0.2.7", | ||
"nan": "^1.6.2" | ||
}, | ||
@@ -48,3 +49,3 @@ "devDependencies": { | ||
"scripts": { | ||
"install": "node tools/install.js", | ||
"install": "node tools/install.js", | ||
"test": "node tools/test.js", | ||
@@ -51,0 +52,0 @@ "jshint": "node ./tools/runJsHint.js" |
@@ -1,2 +0,2 @@ | ||
Edge.js: .NET and Node.js in-process | ||
Edge.js: .NET and Node.js in-process [![Build Status](https://travis-ci.org/tjanczuk/edge.svg)](https://travis-ci.org/tjanczuk/edge) | ||
==== | ||
@@ -70,3 +70,3 @@ | ||
[Scripting CLR from Node.js](#scripting-clr-from-nodejs) | ||
[What you need](#what-you-need) | ||
[What you need (Windows, Linux, MacOS, Docker)](#what-you-need) | ||
[How to: C# hello, world](#how-to-c-hello-world) | ||
@@ -81,2 +81,3 @@ [How to: integrate C# code into Node.js code](#how-to-integrate-c-code-into-nodejs-code) | ||
[How to: script F# in a Node.js application](#how-to-script-f-in-a-nodejs-application) | ||
[How to: script Lisp in a Node.js application](#how-to-script-lisp-in-a-nodejs-application) | ||
[How to: script T-SQL in a Node.js application](#how-to-script-t-sql-in-a-nodejs-application) | ||
@@ -87,3 +88,3 @@ [How to: support for other CLR languages](#how-to-support-for-other-clr-languages) | ||
[How to: debugging](#how-to-debugging) | ||
[Performance](#performance) | ||
[Performance](#performance) | ||
[Building on Windows](#building-on-windows) | ||
@@ -160,2 +161,13 @@ [Building on OSX](#building-on-osx) | ||
#### Docker | ||
Edge.js is available as a Docker image on the [tjanczuk/edgejs repository on Docker Hub](https://registry.hub.docker.com/u/tjanczuk/edgejs/). The image is based on Ubuntu 14.04, and contains Node.js 0.10.30 x64, Mono 3.4.0 x64, and globally installed Edge.js: | ||
``` | ||
> docker run -it tjanczuk/edgejs:0.9.3 | ||
> cd samples | ||
> node 101_hello_lambda.js | ||
.NET welcomes Node.js | ||
``` | ||
### How to: C# hello, world | ||
@@ -782,2 +794,56 @@ | ||
### How to: script Lisp in a Node.js application | ||
**NOTE** This functionality has not been tested on non-Windows platforms. | ||
The [edge-lsharp](https://github.com/richorama/edge-lsharp) extension uses [LSharp](https://github.com/RobBlackwell/LSharp) to compile and run Lisp to .NET. | ||
Install edge and edge-lsharp modules: | ||
``` | ||
npm install edge | ||
npm install edge-lsharp | ||
``` | ||
In your server.js: | ||
```javascript | ||
var edge = require('edge'); | ||
var fact = edge.func('lsharp', function(){/* | ||
;; Factorial | ||
(def fact(n) | ||
(if (is n 0) 1 (* n (fact (- n 1))))) | ||
*/}); | ||
fact([5], function(err, answer){ | ||
console.log(answer); | ||
// = 120 | ||
}); | ||
``` | ||
An LSharp filename can be passed in instead of the Lisp string/comment: | ||
```js | ||
var edge = require('edge'); | ||
var lisp = edge.func('lsharp', 'lisp-func.ls'); | ||
lisp(['arg1', 'arg2'], function(err, result){ | ||
}); | ||
``` | ||
In Lisp you can specify either a function (as shown in the first example) or just return a value: | ||
```js | ||
var edge = require('edge'); | ||
var lisp = edge.func('lsharp', '(+ 2 3)'); | ||
lisp([], function(err, answer){ | ||
console.log(answer); | ||
// = 5 | ||
}); | ||
``` | ||
### How to: script T-SQL in a Node.js application | ||
@@ -1381,4 +1447,8 @@ | ||
You can use external Node.js modules, for example modules installed from NPM. To install modules from NPM, you must first [install Node.js](http://nodejs.org) on your machine and use the `npm` package manager that comes with the Node.js installation. NPM modules must be installed in the directory where your build system binplaces the Edge.js NuGet package (most likely the same location as the rest of your application binaries), or any ancestor directory. Alternatively, you can install NPM modules globally on the machine using `npm install -g`: | ||
You can use external Node.js modules, for example modules installed from NPM. | ||
Note: Most Node.js modules are written in JavaScript and will execute in Edge as-is. However, some Node.js external modules are native binary modules, rebuilt by NPM on module installation to suit your local execution environment. Native binary modules will not run in Edge unless they are rebuilt to link against the NodeJS dll that Edge uses. | ||
To install modules from NPM, you must first [install Node.js](http://nodejs.org) on your machine and use the `npm` package manager that comes with the Node.js installation. NPM modules must be installed in the directory where your build system places the Edge.js NuGet package (most likely the same location as the rest of your application binaries), or any ancestor directory. Alternatively, you can install NPM modules globally on the machine using `npm install -g`: | ||
``` | ||
@@ -1385,0 +1455,0 @@ C:\projects\websockets> npm install ws |
@@ -146,3 +146,4 @@ /** | ||
hello: function (result, callback) { | ||
process.nextTick(function () { | ||
var next = global.setImmediate || process.nextTick; | ||
next(function () { | ||
callback(new Error('Sample Node.js exception')); | ||
@@ -149,0 +150,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 10 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44316240
163
2879
1672
2
30
23
+ Addednan@^1.6.2
+ Addednan@1.9.0(transitive)