Skip to content

Releases: jessedoyle/duktape.cr

0.10.0

23 Nov 01:30
Compare
Choose a tag to compare
  • Update for Crystal 0.20.0. As shards now copies
    the entire shard directory into libs, we can
    move the ext directory to the shard root directory
    for simplicity.
  • Update makefile output paths to match new structure.
  • Resolve #25
    by allowing a developer to pass a Duktape::Context instance when
    initializing a Dukatape::Runtime. This allows the runtime to
    use the internal Duktape global object.

0.9.1

22 Sep 04:10
Compare
Choose a tag to compare

0.9.0

27 May 00:05
Compare
Choose a tag to compare
  • Update Duktape to v1.5.0. See release info.
  • Update to Crystal 0.17.4 syntax.
  • Format code using Crystal 0.17.4 formatter.
  • Add NamedTuple as a type that is allowed as parameter to call on a Duktape::Runtime instance. NamedTuples will be translated to a hash.
  • Optimize for speed (-O2) instead of size (-0s) when building the duktape library.
  • Use -pedantic as the compiler flag for warnings.

0.8.2

05 May 23:52
Compare
Choose a tag to compare
  • Update to Crystal 0.16 syntax

0.8.1

24 Mar 03:32
Compare
Choose a tag to compare
  • Update to Crystal 0.14.2 syntax.
  • Refactor API::Eval code for readability.

0.8.0

05 Feb 06:51
Compare
Choose a tag to compare
  • (breaking change) JS errors are now mapped to their proper Crystal exceptions. i.e. JS SyntaxError becomes Duktape::SyntaxError.
  • (breaking change) Make all exception classes more consistent. Instances of Duktape::Error are all recoverable exceptions that are thrown by the engine at runtime (eg. Duktape::TypeError). Instances of Duktape::InternalError are generally non-recoverable for a given context (eg. Duktape::HeapError).
  • Added call_success, call_failure and return_undefined convenience methods that provide the appropriate integer status codes when returning from a native function call.
  • Added the push_global_proc method that simplifies pushing a named native function to the stack.
  • Duktape::Runtime instances may now accept a execution timeout value in milliseconds upon creation. [#15, @raydf].
  • Changed the name in the shard.yml from duktape.cr to duktape. This should have no effect on the installation process.

0.7.0

18 Jan 21:22
Compare
Choose a tag to compare
  • (breaking change) A monkeypatch to the Crystal Logger class was temporarily added to master to fix a bug in core Crystal (#1982). This patch has now been removed from the codebase. Crystal v0.10.1 or higher is a requirement for this library.
  • Duktape::Runtime instances now return Crystal arrays and hashes for corresponding JS arrays and objects.
  • Duktape::Runtime can now accept hashes and arrays as arguments for call. These will be translated into Javascript objects and pushed to the stack.
  • Updated Duktape version to v1.4.0. See release info.

0.6.4

03 Jan 04:26
Compare
Choose a tag to compare

Fix a few issues:

  • Add the src/runtime.cr file so you can now properly require "./duktape/runtime" once shards does its thing.
  • Actually update the version in shard.yml (my mistake - sorry!).

Changes:

  • Rework the internal require order and duktape/base.
  • Add a Duktape::Runtime class that lessens the need for low-level API calls for many use-cases. This must be required using require "duktape/runtime".

0.6.2

30 Nov 21:42
Compare
Choose a tag to compare
  • Update Duktape version to v1.3.1. See release info.
  • More consistent exception classes in error.cr.
  • Removed a few unecessary method calls from spec files.
  • Adopt Crystal 0.9.1 code formatting.

0.6.1

21 Sep 20:49
Compare
Choose a tag to compare
  • Update to Crystal v0.8.0 syntax/compatibility.
  • Fix a potential use-after-free scenario that may occur when Context or Sandbox instances were garbage-collected by Crystal.
  • The Duktape heap is no longer destroyed when a Duktape::InternalError is thrown in Crystal. Instead, the heap will be destroyed automatically upon finalization.