Skip to content

Commit

Permalink
updating to 6.12.2, 8.9.3, 9.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Dec 18, 2017
1 parent a8b6783 commit e7bd5f9
Show file tree
Hide file tree
Showing 48 changed files with 41 additions and 41 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ os:
dist: trusty

node_js:
- "6.11.5"
- "6.12.2"
- "7.10.1"
- "8.9.0"
- "9.0.0"
- "8.9.3"
- "9.3.0"

install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF ; fi
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ To build one of the versions of Node.js officially released by [Node.js](http://

```
cd tools
build.bat release 8.9.0
build.bat release 8.9.3
```

Note: the Node.js version number you provide must be version number corresponding to one of the subdirectories of http://nodejs.org/dist. The command will build both x32 and x64 architectures (assuming you use x64 machine). The command will also copy the edge\_\*.node executables to appropriate locations under lib\native directory where they are looked up from at runtime. The `npm install` step copies the C standard library shared DLL to the location of the edge\_\*.node files for the component to be ready to go.
Expand Down Expand Up @@ -1393,7 +1393,7 @@ You need Windows with:
* [Edge.js NuGet package](https://www.nuget.org/packages/Edge.js)
* [Node.js](http://nodejs.org) (optional, if you want to use additional NPM packages)

Edge.js support for scripting Node.js ships as a NuGet Package called `Edge.js`. It comes with everything you need to get started writing applications for x86 and x64 architectures. However, if you want to use additional Node.js packages from NPM, you must separately install Node.js runtime to access the NPM package manager. The latest Edge.js NuGet package has been developed and tested with Node.js v8.9.0. Older Edge.js packages exist for prior versions of Node.js. If you choose a different version of Node.js to install NPM packages, your mileage can vary.
Edge.js support for scripting Node.js ships as a NuGet Package called `Edge.js`. It comes with everything you need to get started writing applications for x86 and x64 architectures. However, if you want to use additional Node.js packages from NPM, you must separately install Node.js runtime to access the NPM package manager. The latest Edge.js NuGet package has been developed and tested with Node.js v8.9.3. Older Edge.js packages exist for prior versions of Node.js. If you choose a different version of Node.js to install NPM packages, your mileage can vary.

**NOTE** you cannot use native Node.js extensions when scripting Node.js from CLR using Edge.

Expand Down Expand Up @@ -1708,14 +1708,14 @@ These are unstructions for building the Edge.js NuGet package on Windows. The pa
Preprequisties:

* Visual Studio 2015
* Node.js (tested with v8.9.0)
* Node.js (tested with v8.9.3)
* Python 2.7.x
* node-gyp (tested with 3.6.1)

To buid the NuGet package, open the Visual Studio 2013 Developer Command Prompt and call:

```
tools\build_double.bat 8.9.0
tools\build_double.bat 8.9.3
```

(you can substitite another version of Node.js).
Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ image:
environment:
matrix:
# node.js
- nodejs_version: "6.11.5"
- nodejs_version: "6.12.2"
- nodejs_version: "7.10.1"
- nodejs_version: "8.9.0"
- nodejs_version: "9.0.0"
- nodejs_version: "8.9.3"
- nodejs_version: "9.3.0"

install:
- ps: Install-Product node $env:nodejs_version
Expand Down
6 changes: 3 additions & 3 deletions lib/edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ var fs = require('fs')
, edge;

var versionMap = [
[ /^6\./, '6.11.5' ],
[ /^6\./, '6.12.2' ],
[ /^7\./, '7.10.1' ],
[ /^8\./, '8.9.0' ],
[ /^9\./, '9.0.0' ],
[ /^8\./, '8.9.3' ],
[ /^9\./, '9.3.0' ],
];

function determineVersion() {
Expand Down
Binary file removed lib/native/win32/ia32/6.11.5/edge_coreclr.node
Binary file not shown.
Binary file removed lib/native/win32/ia32/6.11.5/edge_nativeclr.node
Binary file not shown.
File renamed without changes.
Binary file added lib/native/win32/ia32/6.12.2/edge_coreclr.node
Binary file not shown.
Binary file not shown.
Binary file modified lib/native/win32/ia32/7.10.1/edge_coreclr.node
Binary file not shown.
Binary file modified lib/native/win32/ia32/7.10.1/edge_nativeclr.node
Binary file not shown.
Binary file removed lib/native/win32/ia32/8.9.0/edge_coreclr.node
Binary file not shown.
Binary file removed lib/native/win32/ia32/8.9.0/edge_nativeclr.node
Binary file not shown.
File renamed without changes.
Binary file added lib/native/win32/ia32/8.9.3/edge_coreclr.node
Binary file not shown.
Binary file not shown.
Binary file removed lib/native/win32/ia32/9.0.0/edge_coreclr.node
Binary file not shown.
Binary file removed lib/native/win32/ia32/9.0.0/edge_nativeclr.node
Binary file not shown.
File renamed without changes.
Binary file added lib/native/win32/ia32/9.3.0/edge_coreclr.node
Binary file not shown.
Binary file added lib/native/win32/ia32/9.3.0/edge_nativeclr.node
Binary file not shown.
Binary file removed lib/native/win32/x64/6.11.5/edge_coreclr.node
Binary file not shown.
Binary file removed lib/native/win32/x64/6.11.5/edge_nativeclr.node
Binary file not shown.
File renamed without changes.
Binary file added lib/native/win32/x64/6.12.2/edge_coreclr.node
Binary file not shown.
Binary file added lib/native/win32/x64/6.12.2/edge_nativeclr.node
Binary file not shown.
Binary file modified lib/native/win32/x64/7.10.1/edge_coreclr.node
Binary file not shown.
Binary file modified lib/native/win32/x64/7.10.1/edge_nativeclr.node
Binary file not shown.
Binary file removed lib/native/win32/x64/8.9.0/edge_coreclr.node
Binary file not shown.
Binary file removed lib/native/win32/x64/8.9.0/edge_nativeclr.node
Binary file not shown.
File renamed without changes.
Binary file added lib/native/win32/x64/8.9.3/edge_coreclr.node
Binary file not shown.
Binary file added lib/native/win32/x64/8.9.3/edge_nativeclr.node
Binary file not shown.
Binary file removed lib/native/win32/x64/9.0.0/edge_coreclr.node
Binary file not shown.
Binary file removed lib/native/win32/x64/9.0.0/edge_nativeclr.node
Binary file not shown.
File renamed without changes.
Binary file added lib/native/win32/x64/9.3.0/edge_coreclr.node
Binary file not shown.
Binary file added lib/native/win32/x64/9.3.0/edge_nativeclr.node
Binary file not shown.
22 changes: 11 additions & 11 deletions src/dotnet/clrfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static Nan::Persistent<v8::Function> proxyFactory;
static Nan::Persistent<v8::Function> proxyFunction;
#pragma managed(push, pop)

v8::Local<v8::Function> ClrFunc::Initialize(System::Func<System::Object^,Task<System::Object^>^>^ func)
v8::Local<v8::Function> ClrFunc::Initialize(System::Func<System::Object^,System::Threading::Tasks::Task<System::Object^>^>^ func)
{
DBG("ClrFunc::Initialize Func<object,Task<object>> wrapper");

Expand Down Expand Up @@ -94,7 +94,7 @@ NAN_METHOD(ClrFunc::Initialize)

ClrFuncReflectionWrap^ wrap = ClrFuncReflectionWrap::Create(assembly, typeName, methodName);
result = ClrFunc::Initialize(
gcnew System::Func<System::Object^,Task<System::Object^>^>(
gcnew System::Func<System::Object^,System::Threading::Tasks::Task<System::Object^>^>(
wrap, &ClrFuncReflectionWrap::Call));
}
else {
Expand All @@ -117,8 +117,8 @@ NAN_METHOD(ClrFunc::Initialize)
}

System::Object^ parameters = ClrFunc::MarshalV8ToCLR(options);
System::Func<System::Object^,Task<System::Object^>^>^ func =
(System::Func<System::Object^,Task<System::Object^>^>^)compileFunc->Invoke(
System::Func<System::Object^,System::Threading::Tasks::Task<System::Object^>^>^ func =
(System::Func<System::Object^,System::Threading::Tasks::Task<System::Object^>^>^)compileFunc->Invoke(
compilerInstance, gcnew array<System::Object^> { parameters });
result = ClrFunc::Initialize(func);
}
Expand All @@ -131,7 +131,7 @@ NAN_METHOD(ClrFunc::Initialize)
}
}

void edgeAppCompletedOnCLRThread(Task<System::Object^>^ task, System::Object^ state)
void edgeAppCompletedOnCLRThread(System::Threading::Tasks::Task<System::Object^>^ task, System::Object^ state)
{
DBG("edgeAppCompletedOnCLRThread");
ClrFuncInvokeContext^ context = (ClrFuncInvokeContext^)state;
Expand Down Expand Up @@ -303,9 +303,9 @@ v8::Local<v8::Value> ClrFunc::MarshalCLRToV8(System::Object^ netdata)

jsdata = result;
}
else if (type == System::Func<System::Object^,Task<System::Object^>^>::typeid)
else if (type == System::Func<System::Object^,System::Threading::Tasks::Task<System::Object^>^>::typeid)
{
jsdata = ClrFunc::Initialize((System::Func<System::Object^,Task<System::Object^>^>^)netdata);
jsdata = ClrFunc::Initialize((System::Func<System::Object^,System::Threading::Tasks::Task<System::Object^>^>^)netdata);
}
else if (System::Exception::typeid->IsAssignableFrom(type))
{
Expand Down Expand Up @@ -423,8 +423,8 @@ System::Object^ ClrFunc::MarshalV8ToCLR(v8::Local<v8::Value> jsdata)
if (jsdata->IsFunction())
{
NodejsFunc^ functionContext = gcnew NodejsFunc(v8::Local<v8::Function>::Cast(jsdata));
System::Func<System::Object^,Task<System::Object^>^>^ netfunc =
gcnew System::Func<System::Object^,Task<System::Object^>^>(
System::Func<System::Object^,System::Threading::Tasks::Task<System::Object^>^>^ netfunc =
gcnew System::Func<System::Object^,System::Threading::Tasks::Task<System::Object^>^>(
functionContext, &NodejsFunc::FunctionWrapper);

return netfunc;
Expand Down Expand Up @@ -515,7 +515,7 @@ v8::Local<v8::Value> ClrFunc::Call(v8::Local<v8::Value> payload, v8::Local<v8::V
{
ClrFuncInvokeContext^ context = gcnew ClrFuncInvokeContext(callback);
context->Payload = ClrFunc::MarshalV8ToCLR(payload);
Task<System::Object^>^ task = this->func(context->Payload);
System::Threading::Tasks::Task<System::Object^>^ task = this->func(context->Payload);
if (task->IsCompleted)
{
// Completed synchronously. Return a value or invoke callback based on call pattern.
Expand All @@ -536,7 +536,7 @@ v8::Local<v8::Value> ClrFunc::Call(v8::Local<v8::Value> payload, v8::Local<v8::V
context->InitializeAsyncOperation();

// Will complete asynchronously. Schedule continuation to finish processing.
task->ContinueWith(gcnew System::Action<Task<System::Object^>^,System::Object^>(
task->ContinueWith(gcnew System::Action<System::Threading::Tasks::Task<System::Object^>^,System::Object^>(
edgeAppCompletedOnCLRThread), context);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/dotnet/clrfuncreflectionwrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ ClrFuncReflectionWrap^ ClrFuncReflectionWrap::Create(
return wrap;
}

Task<System::Object^>^ ClrFuncReflectionWrap::Call(System::Object^ payload)
System::Threading::Tasks::Task<System::Object^>^ ClrFuncReflectionWrap::Call(System::Object^ payload)
{
return (Task<System::Object^>^)this->invokeMethod->Invoke(
return (System::Threading::Tasks::Task<System::Object^>^)this->invokeMethod->Invoke(
this->instance, gcnew array<System::Object^> { payload });
}
12 changes: 6 additions & 6 deletions src/dotnet/edge.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ref class ClrFuncInvokeContext {
public:

property System::Object^ Payload;
property Task<System::Object^>^ Task;
property System::Threading::Tasks::Task<System::Object^>^ Task;
property bool Sync;

ClrFuncInvokeContext(v8::Local<v8::Value> callbackOrSync);
Expand All @@ -70,7 +70,7 @@ ref class NodejsFunc {
~NodejsFunc();
!NodejsFunc();

Task<System::Object^>^ FunctionWrapper(System::Object^ payload);
System::Threading::Tasks::Task<System::Object^>^ FunctionWrapper(System::Object^ payload);
};

ref class PersistentDisposeContext {
Expand Down Expand Up @@ -99,7 +99,7 @@ ref class NodejsFuncInvokeContext {

public:

property TaskCompletionSource<System::Object^>^ TaskCompletionSource;
property System::Threading::Tasks::TaskCompletionSource<System::Object^>^ TaskCompletionSource;

NodejsFuncInvokeContext(
NodejsFunc^ functionContext, System::Object^ payload);
Expand All @@ -121,20 +121,20 @@ ref class ClrFuncReflectionWrap {
public:

static ClrFuncReflectionWrap^ Create(Assembly^ assembly, System::String^ typeName, System::String^ methodName);
Task<System::Object^>^ Call(System::Object^ payload);
System::Threading::Tasks::Task<System::Object^>^ Call(System::Object^ payload);
};

ref class ClrFunc {
private:
System::Func<System::Object^,Task<System::Object^>^>^ func;
System::Func<System::Object^,System::Threading::Tasks::Task<System::Object^>^>^ func;

ClrFunc();

static v8::Local<v8::Object> MarshalCLRObjectToV8(System::Object^ netdata);

public:
static NAN_METHOD(Initialize);
static v8::Local<v8::Function> Initialize(System::Func<System::Object^,Task<System::Object^>^>^ func);
static v8::Local<v8::Function> Initialize(System::Func<System::Object^,System::Threading::Tasks::Task<System::Object^>^>^ func);
v8::Local<v8::Value> Call(v8::Local<v8::Value> payload, v8::Local<v8::Value> callback);
static v8::Local<v8::Value> MarshalCLRToV8(System::Object^ netdata);
static v8::Local<v8::Value> MarshalCLRExceptionToV8(System::Exception^ exception);
Expand Down
2 changes: 1 addition & 1 deletion src/dotnet/nodejsfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ NodejsFunc::!NodejsFunc()
V8SynchronizationContext::ExecuteAction(uv_edge_async);
}

Task<System::Object^>^ NodejsFunc::FunctionWrapper(System::Object^ payload)
System::Threading::Tasks::Task<System::Object^>^ NodejsFunc::FunctionWrapper(System::Object^ payload)
{
DBG("NodejsFunc::FunctionWrapper");
NodejsFuncInvokeContext^ context = gcnew NodejsFuncInvokeContext(this, payload);
Expand Down
4 changes: 2 additions & 2 deletions src/dotnet/nodejsfuncinvokecontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void NodejsFuncInvokeContext::CompleteWithError(System::Exception^ exception)
{
DBG("NodejsFuncInvokeContext::CompleteWithError");
this->exception = exception;
Task::Run(gcnew System::Action(this, &NodejsFuncInvokeContext::Complete));
System::Threading::Tasks::Task::Run(gcnew System::Action(this, &NodejsFuncInvokeContext::Complete));
}

void NodejsFuncInvokeContext::CompleteWithResult(v8::Local<v8::Value> result)
Expand All @@ -148,7 +148,7 @@ void NodejsFuncInvokeContext::CompleteWithResult(v8::Local<v8::Value> result)
try
{
this->result = ClrFunc::MarshalV8ToCLR(result);
Task::Run(gcnew System::Action(this, &NodejsFuncInvokeContext::Complete));
System::Threading::Tasks::Task::Run(gcnew System::Action(this, &NodejsFuncInvokeContext::Complete));
}
catch (System::Exception^ e)
{
Expand Down
2 changes: 1 addition & 1 deletion src/double/Edge.js/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "9.0.0",
"version": "9.3.0",
"description": "With Edge.js you can script Node.js in a .NET application. Edge.js allows you to run Node.js and .NET code in one process. You can call Node.js functions from .NET and .NET functions from Node.js. Edge.js takes care of marshalling data between CLR and V8. Edge.js also reconciles threading models of single threaded V8 and multi-threaded CLR. Edge.js ensures correct lifetime of objects on V8 and CLR heaps. This Edge.js NuGet package supports scripting Node.js v9.0.0.",
"copyright": "Copyright 2017 Tomasz Janczuk",
"packOptions": {
Expand Down
2 changes: 1 addition & 1 deletion test/double/double_test/DoubleEdge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void SucceedsCheckingNodeVersion()
")(".NET").Result;

System.Console.WriteLine(result);
Assert.AreEqual(result, "v9.0.0");
Assert.AreEqual(result, "v9.3.0");
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion test/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"type": "platform",
"version": "1.0.0"
},
"Edge.js": "9.0.0",
"Edge.js": "9.3.0",
"Edge.js.CSharp": "1.2.0",
"System.Xml.XmlSerializer": "4.0.11",
"System.Xml.ReaderWriter": "4.0.11"
Expand Down
4 changes: 2 additions & 2 deletions test/testall.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ if "%run32%"=="Y" (
call "%SELF%\test.bat" ia32 9.0.0
call "%SELF%\test.bat" ia32 8.9.0
call "%SELF%\test.bat" ia32 7.10.1
call "%SELF%\test.bat" ia32 6.11.5
call "%SELF%\test.bat" ia32 6.12.2
)

if "%run64%"=="Y" (
call "%SELF%\test.bat" x64 9.0.0
call "%SELF%\test.bat" x64 8.9.0
call "%SELF%\test.bat" x64 7.10.1
call "%SELF%\test.bat" x64 6.11.5
call "%SELF%\test.bat" x64 6.12.2
)
2 changes: 1 addition & 1 deletion tools/buildall.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
"%~dp0\build.bat" release 6.11.5 7.10.1 8.9.0 9.0.0
"%~dp0\build.bat" release 6.12.2 7.10.1 8.9.3 9.3.0

0 comments on commit e7bd5f9

Please sign in to comment.