Skip to content

Commit 632168c

Browse files
committed
Version 3.0.0
1 parent c687263 commit 632168c

File tree

12 files changed

+92
-32
lines changed

12 files changed

+92
-32
lines changed

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
Change log
22
==========
33

4+
## v3.0.0 - December 24, 2018
5+
* Format of the error messages was unified
6+
* Created a new exception classes: `JsCompilationException`, `JsEngineException`, `JsFatalException`, `JsInterruptedException`, `JsScriptException` and `JsUsageException`. These exceptions are responsible for handling errors, some of which were previously handled by the `JsRuntimeException` class.
7+
* In the `JsException` class was added two new properties: `Category` and `Description`
8+
* From the `JsRuntimeException` class was removed one property - `ErrorCode`
9+
* In the `JsRuntimeException` class was added three new properties: `Type`, `DocumentName` and `CallStack`
10+
* `JsEngineLoadException` class now is inherited from the `JsEngineException` class
11+
* `Format` method of the `JsErrorHelpers` class was renamed to the `GenerateErrorDetails`
12+
* One part of the auxiliary code was removed, and other part moved to an external library - [AdvancedStringBuilder](https://github.com/Taritsyn/AdvancedStringBuilder)
13+
* Added a ability to interrupt execution of the script
14+
* In JsRT modes added a ability to pre-compile scripts
15+
* In `MsieJsEngine` class was added `SupportsScriptPrecompilation` property and four new methods: `Interrupt`, `Precompile`, `PrecompileFile` and `PrecompileResource`
16+
* In JavaScript engine settings was added one new property - `MaxStackSize` (default `492` or `984` KB)
17+
* Added support of .NET Standard 2.0 (only supported `ChakraIeJsRt` and `ChakraEdgeJsRt` modes)
18+
419
## v3.0.0 RC 2 - December 4, 2018
520
* Improved performance of debugging in ActiveScript modes
621
* `GetSourceFragmentFromLine` method of `JsErrorHelpers` class has been replaced by the `GetTextFragmentFromLine` method of `TextHelpers` class
7-
* One part of the auxiliary code was removed, and other part moved to an external library - AdvancedStringBuilder
22+
* One part of the auxiliary code was removed, and other part moved to an external library - [AdvancedStringBuilder](https://github.com/Taritsyn/AdvancedStringBuilder)
823
* In the `IeNativeMethods` and `EdgeNativeMethods` classes for the `netstandard` targets was changed a calling convention from `StdCall` to `Cdecl`
924

1025
## v3.0.0 RC 1 - September 18, 2018

README.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ This library can be installed through NuGet - [http://nuget.org/packages/MsieJav
2929
Consider a simple example of usage of the MSIE JavaScript Engine:
3030

3131
```csharp
32-
namespace MsieJavaScriptEngine.Example.Console
33-
{
34-
using System;
32+
using System;
3533

36-
using MsieJavaScriptEngine;
37-
using MsieJavaScriptEngine.Helpers;
34+
using MsieJavaScriptEngine;
35+
using MsieJavaScriptEngine.Helpers;
3836

37+
namespace MsieJavaScriptEngine.Example.Console
38+
{
3939
class Program
4040
{
4141
static void Main(string[] args)
@@ -56,9 +56,15 @@ namespace MsieJavaScriptEngine.Example.Console
5656
Console.WriteLine();
5757
Console.WriteLine(JsErrorHelpers.GenerateErrorDetails(e));
5858
}
59-
catch (JsRuntimeException e)
59+
catch (JsScriptException e)
60+
{
61+
Console.WriteLine("During processing of JavaScript code an error occurred.");
62+
Console.WriteLine();
63+
Console.WriteLine(JsErrorHelpers.GenerateErrorDetails(e));
64+
}
65+
catch (JsException e)
6066
{
61-
Console.WriteLine("During execution of JavaScript code an error occurred.");
67+
Console.WriteLine("During working of JavaScript engine an unknown error occurred.");
6268
Console.WriteLine();
6369
Console.WriteLine(JsErrorHelpers.GenerateErrorDetails(e));
6470
}
@@ -71,7 +77,18 @@ namespace MsieJavaScriptEngine.Example.Console
7177

7278
First we create an instance of the <code title="MsieJavaScriptEngine.MsieJsEngine">MsieJsEngine</code> class.
7379
Then we evaluate a JavaScript expression by using of the `Evaluate` method and output its result to the console.
74-
In addition, we provide handling of the following exception types: <code title="MsieJavaScriptEngine.JsEngineLoadException">JsEngineLoadException</code> and <code title="MsieJavaScriptEngine.JsRuntimeException">JsRuntimeException</code>.
80+
In addition, we provide handling of the following exception types: <code title="MsieJavaScriptEngine.JsEngineLoadException">JsEngineLoadException</code>, <code title="MsieJavaScriptEngine.JsScriptException">JsScriptException</code> and <code title="MsieJavaScriptEngine.JsException">JsException</code>.
81+
In the MSIE JavaScript Engine, exceptions have the following hierarchy:
82+
83+
* <code title="MsieJavaScriptEngine.JsException">JsException</code>
84+
* <code title="MsieJavaScriptEngine.JsEngineException">JsEngineException</code>
85+
* <code title="MsieJavaScriptEngine.JsEngineLoadException">JsEngineLoadException</code>
86+
* <code title="MsieJavaScriptEngine.JsFatalException">JsFatalException</code>
87+
* <code title="MsieJavaScriptEngine.JsScriptException">JsScriptException</code>
88+
* <code title="MsieJavaScriptEngine.JsCompilationException">JsCompilationException</code>
89+
* <code title="MsieJavaScriptEngine.JsRuntimeException">JsRuntimeException</code>
90+
* <code title="MsieJavaScriptEngine.JsInterruptedException">JsInterruptedException</code>
91+
* <code title="MsieJavaScriptEngine.JsUsageException">JsUsageException</code>
7592

7693
Also, when you create an instance of the <code title="MsieJavaScriptEngine.MsieJsEngine">MsieJsEngine</code> class, then you can pass the JavaScript engine settings via the constructor.
7794
Consider in detail properties of the <code title="MsieJavaScriptEngine.JsEngineSettings">JsEngineSettings</code> class:
@@ -98,6 +115,15 @@ Consider in detail properties of the <code title="MsieJavaScriptEngine.JsEngineS
98115
<td><code>Auto</code></td>
99116
<td>JavaScript engine mode.</td>
100117
</tr>
118+
<tr valign="top">
119+
<td><code>MaxStackSize</code></td>
120+
<td><code title="System.Int32">Int32</code></td>
121+
<td><code>503 808</code> or <code>1 007 616</code></td>
122+
<td>
123+
<p>Maximum stack size in bytes.</p>
124+
<p>Set a <code>0</code> to use the default maximum stack size specified in the header for the executable.</p>
125+
</td>
126+
</tr>
101127
<tr valign="top">
102128
<td><code>UseEcmaScript5Polyfill</code></td>
103129
<td><code title="System.Boolean">Boolean</code></td>
@@ -138,4 +164,4 @@ If you use the MSIE JavaScript Engine in some project, please send me a message
138164
* [PowerShell.JS](http://github.com/klumsy/powershellJS) by Karl Prosser
139165
* [Serenity Application Platform](http://github.com/volkanceylan/Serenity) by Volkan Ceylan
140166
* [SquishIt](http://github.com/jetheredge/SquishIt) by Justin Etheredge and Alex Ullrich
141-
* [Strike](http://github.com/SimonCropp/Strike) by Simon Cropp
167+
* [Strike](http://github.com/SimonCropp/Strike) by Simon Cropp

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "2.1.500"
3+
"version": "2.2.101"
44
}
55
}

src/MsieJavaScriptEngine/MsieJavaScriptEngine.csproj

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<Product>MSIE JavaScript Engine for .NET</Product>
55
<VersionPrefix>3.0.0</VersionPrefix>
6-
<VersionSuffix>rc2</VersionSuffix>
76
<TargetFrameworks>net40-client;net45;netstandard1.3;netstandard2.0</TargetFrameworks>
87
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.3' ">1.6.0</NetStandardImplicitPackageVersion>
98
<OutputType>Library</OutputType>
@@ -21,10 +20,19 @@
2120
<RepositoryUrl>https://github.com/Taritsyn/MsieJavaScriptEngine</RepositoryUrl>
2221
<RepositoryType>git</RepositoryType>
2322
<PackageTags>JavaScript;ECMAScript;MSIE;IE;Edge;Chakra</PackageTags>
24-
<PackageReleaseNotes>1. Improved performance of debugging in ActiveScript modes;
25-
2. `GetSourceFragmentFromLine` method of `JsErrorHelpers` class has been replaced by the `GetTextFragmentFromLine` method of `TextHelpers` class;
26-
3. One part of the auxiliary code was removed, and other part moved to an external library - AdvancedStringBuilder;
27-
4. In the `IeNativeMethods` and `EdgeNativeMethods` classes for the `netstandard` targets was changed a calling convention from `StdCall` to `Cdecl`.</PackageReleaseNotes>
23+
<PackageReleaseNotes>1. Format of the error messages was unified;
24+
2. Created a new exception classes: `JsCompilationException`, `JsEngineException`, `JsFatalException`, `JsInterruptedException`, `JsScriptException` and `JsUsageException`. These exceptions are responsible for handling errors, some of which were previously handled by the `JsRuntimeException` class;
25+
3. In the `JsException` class was added two new properties: `Category` and `Description`;
26+
4. From the `JsRuntimeException` class was removed one property - `ErrorCode`;
27+
5. In the `JsRuntimeException` class was added three new properties: `Type`, `DocumentName` and `CallStack`;
28+
6. `JsEngineLoadException` class now is inherited from the `JsEngineException` class;
29+
7. `Format` method of the `JsErrorHelpers` class was renamed to the `GenerateErrorDetails`;
30+
8. One part of the auxiliary code was removed, and other part moved to an external library - [AdvancedStringBuilder](https://github.com/Taritsyn/AdvancedStringBuilder);
31+
9. Added a ability to interrupt execution of the script;
32+
10. In JsRT modes added a ability to pre-compile scripts;
33+
11. In `MsieJsEngine` class was added `SupportsScriptPrecompilation` property and four new methods: `Interrupt`, `Precompile`, `PrecompileFile` and `PrecompileResource`;
34+
12. In JavaScript engine settings was added one new property - `MaxStackSize` (default `492` or `984` KB);
35+
13. Added support of .NET Standard 2.0 (only supported `ChakraIeJsRt` and `ChakraEdgeJsRt` modes).</PackageReleaseNotes>
2836
<NeutralLanguage>en-US</NeutralLanguage>
2937
<PackageOutputPath>../../nuget</PackageOutputPath>
3038
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

src/MsieJavaScriptEngine/readme.txt

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
--------------------------------------------------------------------------------
4-
README file for MSIE JavaScript Engine for .NET v3.0.0 RC 2
4+
README file for MSIE JavaScript Engine for .NET v3.0.0
55

66
--------------------------------------------------------------------------------
77

@@ -21,14 +21,32 @@
2121
=============
2222
RELEASE NOTES
2323
=============
24-
1. Improved performance of debugging in ActiveScript modes;
25-
2. `GetSourceFragmentFromLine` method of `JsErrorHelpers` class has been
26-
replaced by the `GetTextFragmentFromLine` method of `TextHelpers` class;
27-
3. One part of the auxiliary code was removed, and other part moved to an
28-
external library - AdvancedStringBuilder;
29-
4. In the `IeNativeMethods` and `EdgeNativeMethods` classes for the
30-
`netstandard` targets was changed a calling convention from `StdCall` to
31-
`Cdecl`.
24+
1. Format of the error messages was unified;
25+
2. Created a new exception classes: `JsCompilationException`,
26+
`JsEngineException`, `JsFatalException`, `JsInterruptedException`,
27+
`JsScriptException` and `JsUsageException`. These exceptions are responsible
28+
for handling errors, some of which were previously handled by the
29+
`JsRuntimeException` class;
30+
3. In the `JsException` class was added two new properties: `Category` and
31+
`Description`;
32+
4. From the `JsRuntimeException` class was removed one property - `ErrorCode`;
33+
5. In the `JsRuntimeException` class was added three new properties: `Type`,
34+
`DocumentName` and `CallStack`;
35+
6. `JsEngineLoadException` class now is inherited from the `JsEngineException`
36+
class;
37+
7. `Format` method of the `JsErrorHelpers` class was renamed to the
38+
`GenerateErrorDetails`;
39+
8. One part of the auxiliary code was removed, and other part moved to an
40+
external library - AdvancedStringBuilder;
41+
9. Added a ability to interrupt execution of the script;
42+
10. In JsRT modes added a ability to pre-compile scripts;
43+
11. In `MsieJsEngine` class was added `SupportsScriptPrecompilation` property
44+
and four new methods: `Interrupt`, `Precompile`, `PrecompileFile` and
45+
`PrecompileResource`;
46+
12. In JavaScript engine settings was added one new property - `MaxStackSize`
47+
(default `492` or `984` KB);
48+
13. Added support of .NET Standard 2.0 (only supported `ChakraIeJsRt` and
49+
`ChakraEdgeJsRt` modes).
3250

3351
============
3452
PROJECT SITE

test/MsieJavaScriptEngine.Benchmarks/MsieJavaScriptEngine.Benchmarks.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<Product>MSIE JavaScript Engine: Benchmarks</Product>
55
<VersionPrefix>3.0.0</VersionPrefix>
6-
<VersionSuffix>rc2</VersionSuffix>
76
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
87
<OutputType>Exe</OutputType>
98
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

test/MsieJavaScriptEngine.Test.Auto/MsieJavaScriptEngine.Test.Auto.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<Product>MSIE JavaScript Engine: Tests for Auto Mode</Product>
55
<VersionPrefix>3.0.0</VersionPrefix>
6-
<VersionSuffix>rc2</VersionSuffix>
76
<TargetFrameworks>net40;net451;netcoreapp1.0;netcoreapp2.0</TargetFrameworks>
87
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.13</RuntimeFrameworkVersion>
98
<OutputType>Library</OutputType>

test/MsieJavaScriptEngine.Test.ChakraActiveScript/MsieJavaScriptEngine.Test.ChakraActiveScript.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<Product>MSIE JavaScript Engine: Tests for Chakra ActiveScript Mode</Product>
55
<VersionPrefix>3.0.0</VersionPrefix>
6-
<VersionSuffix>rc2</VersionSuffix>
76
<TargetFrameworks>net40;net451</TargetFrameworks>
87
<OutputType>Library</OutputType>
98
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

test/MsieJavaScriptEngine.Test.ChakraEdgeJsRt/MsieJavaScriptEngine.Test.ChakraEdgeJsRt.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<Product>MSIE JavaScript Engine: Tests for Chakra Edge JsRT Mode</Product>
55
<VersionPrefix>3.0.0</VersionPrefix>
6-
<VersionSuffix>rc2</VersionSuffix>
76
<TargetFrameworks>net40;net451;netcoreapp1.0;netcoreapp2.0</TargetFrameworks>
87
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.13</RuntimeFrameworkVersion>
98
<OutputType>Library</OutputType>

test/MsieJavaScriptEngine.Test.ChakraIeJsRt/MsieJavaScriptEngine.Test.ChakraIeJsRt.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<Product>MSIE JavaScript Engine: Tests for Chakra IE JsRT Mode</Product>
55
<VersionPrefix>3.0.0</VersionPrefix>
6-
<VersionSuffix>rc2</VersionSuffix>
76
<TargetFrameworks>net40;net451;netcoreapp1.0;netcoreapp2.0</TargetFrameworks>
87
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.13</RuntimeFrameworkVersion>
98
<OutputType>Library</OutputType>

0 commit comments

Comments
 (0)