Skip to content

Releases: neon-bindings/neon

v1.0.0

23 Feb 17:16
50c74c0
Compare
Choose a tag to compare

Commitment to Compatibility

The release of Neon 1.0 marks our commitment to backwards-compatibility: starting with 1.0.0, Neon users can be confident that future upgrades to Neon 1.x versions should never require code changes (with the possible exception of safety bugfixes, which we expect to be rare). We also do not anticipate releasing new major versions often and do not have any plans to do so for now.

Breaking Changes

  • Remove the generic parameter from JsFunction (#989)
  • JsArray::new takes a usize instead of a u32 (#988)
  • Made Context::global read a key and added Context::global_object (#987)
  • Deprecated feature flags were removed

Bug fixes

  • Fix unhandledRejection with JsPromise::to_future (#1008)
  • Typo in cargo-cp-artifact help (#998)
  • Typo in README (#1012)

Other

#1010

  • Relaxed error behavior on missing Node-API symbols. Neon will panic on first use instead of aborting the process at module load time.
  • Bumped dependency versions
  • Changed to edition 2021
  • Updated support matrix to Node 18, 20, and 21

v1.0.0-alpha.4

14 Apr 18:44
69e70ef
Compare
Choose a tag to compare
v1.0.0-alpha.4 Pre-release
Pre-release

Patch to enable new feature flags in docs.rs.

v1.0.0-alpha.3

14 Apr 17:40
32802cc
Compare
Choose a tag to compare
v1.0.0-alpha.3 Pre-release
Pre-release

Breaking Changes

  • Removed Managed trait

Improvements

  • Added JsBigInt (#963).
  • Added UTF-16 functions to JsString (#944).
  • Relaxed Send constraints (#979)
  • Lifecycle support for 32-bit (#977)
  • Added sys feature (#970)

Bug Fixes

  • Fix a scope leak in release builds (#952).

Docs

  • Examples added for many types ((#942)).

cargo-cp-artifact

0.1.8 fixes sending additional arguments on Windows (#972).

v1.0.0-alpha.2

11 Nov 18:44
0c59300
Compare
Choose a tag to compare
v1.0.0-alpha.2 Pre-release
Pre-release

Breaking Changes

neon::object::This

#918

Trait neon::object::This has been removed. This was primarily added for use with the declare_types! macro to generate classes. The macro was removed and This is no longer needed. Additionally, the This argument on JsFunction was found to be invalid because it asserted at compile time a type for this that could change at runtime. (Note that this was not unsound because the type would be checked by Node-API and result in a panic.)

JsFunction::this

#918

JsFunction::this was changed to perform a downcast and be fallible. This is in line with similar APIs (e.g., Object::get). Additionally, an infallible version, JsValue::this_value was added that does not perform a downcast.

Added Feature flag for external buffers

#937

Electron began using pointer compression on JavaScript values that is incompatible with external buffers. As a preventative measure, JsArrayBuffer::external and JsBuffer::external have been placed behind a feature flag that warns of Electron incompatibility.

Improvements

  • Lifetimes were relaxed on execute_scoped to allow valid code to compile. (#919)
  • Added a from_slice helper on TypedArray (#925)
  • JsTypedArray construction and type aliases (#909)

Bug Fixes

  • Fixed a panic on VM shutdown when using Channel (#934)
  • Type tags were added to JsBox to prevent undefined behavior when multiple native add-ons are used (#907)

Docs

  • Significantly improved documentation of TypedArray (#909)
  • Removed unused values in Channel docs (#925)

cargo-cp-artifact

0.1.7 includes a fix to unlink .node files before copying to address common code signing errors on macOS (#921).

v1.0.0-alpha.1

11 Jul 20:03
ee475a3
Compare
Choose a tag to compare
v1.0.0-alpha.1 Pre-release
Pre-release

Pre-release of a major milestone for Neon. 1.0.

Breaking Changes

Major

  • Removed the legacy backend; only Node-API is supported going forward (#881)
  • Removed neon::result::JsResultExt in favor of more general neon::result::ResultExt (#904)

Minor

  • Length APIs (argument, argument_ops, len) use usize instead of i32 (#889)
  • Deprecate feature flags for accepted RFCs (#872)
  • neon::meta::version returns semver@1 version instead of 0.9 (#912)

Features

  • Add Object.freeze and Object.seal (#891)
  • Futures RFC (#872) Implementation (#874)
    • Await JoinHandle from sending an event on a Channel
    • Adapt JsPromise to JsFuture
  • API for thread-local data (i.e., instance data) (#902)
  • Add Object::call_with() convenience method to call a method on an object (#879)

Bug Fixes

  • Relax the lifetime constraints on TypedArray borrows (#877)
  • Allowing missing symbols at load time to support bun (#914)
  • Prevent a panic when an async event is called after the JavaScript runtime has stopped (#913)
  • Fix a soundness hole in JsArrayBuffer::external and JsBuffer::external (#897)

Docs

  • Fixed mistake in Object::get docs (#903)
  • Fixed link in README to migration guide (#895)

Internal

  • Moved cargo-cp-artirfact into the monorepo (#905)
  • Decreased the size of the Neon build matrix (#893)
  • Removed scope abstraction from legacy backend (#888)
  • Improved the monorepo structure of neon (#884)

v0.10.1

23 May 21:28
c17014e
Compare
Choose a tag to compare

Fix a soundness hole in JsArrayBuffer::external
and JsBuffer::external (#897).

Thanks to @Cassy343 for finding the issue!

In previous versions of Neon, it was possible to create a JsArrayBuffer or JsBuffer that references data without the 'static lifetime.

pub fn soundness_hole(mut cx: FunctionContext) -> JsResult<JsArrayBuffer> {
    let mut data = vec![0u8, 1, 2, 3];

    // Creating an external from `&mut [u8]` instead of `Vec<u8>` since there is a blanket impl
    // of `AsMut<T> for &mut T`
    let buf = JsArrayBuffer::external(&mut cx, data.as_mut_slice());

    // `buf` is still holding a reference to `data`!
    drop(data);

    Ok(buf)
}

v0.10.0

07 Mar 19:25
779f733
Compare
Choose a tag to compare

See the Neon 0.10 Migration Guide for more details about new features and breaking changes.

Features

Minor Improvements

Fixes

Internal Improvements

v0.10.0-alpha.2

17 Sep 19:49
8a4ca10
Compare
Choose a tag to compare
v0.10.0-alpha.2 Pre-release
Pre-release

v0.10.0-alpha.1

30 Aug 20:34
24e7d6f
Compare
Choose a tag to compare
v0.10.0-alpha.1 Pre-release
Pre-release

Implements the Borrow RFC.

v0.9.1

26 Aug 17:38
78b7376
Compare
Choose a tag to compare
  • Expose the Finalize trait as neon::types::Finalize so that docs are visible
  • Improved docs and build scripts in create-neon to make release builds more
    discoverable (#771)
  • Update nan to fix an Electron 13 incompatibility (#778)