Socket
Socket
Sign inDemoInstall

nanolith

Package Overview
Dependencies
1
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1
46
10Next

0.3.2-beta3

Diff

mstephen19
published 0.3.2-beta2 •

mstephen19
published 0.3.2-beta1 •

mstephen19
published 0.3.1 •

Changelog

Source

0.3.1 - 2022-29-12

Fixed

  • Typos in README.
  • SharedMap.option only accessible statically and not on instances.

Changed

  • MessengerList.list() to be a getter method instead of a regular function. New syntax is MessengerList.list.
  • SharedMap.get() to use .subarray() instead of .slice() for a slight memory complexity improvement.
  • README logo image to new blue version.
  • Improve validation in SharedMap's constructor.
  • pool.option back to a regular getter property instead of a static one. Doesn't need to be static.

Added

  • New sections to README for properties & methods of Service, ServiceCluster, and pool.
  • Tests for streaming with Messenger + a test suite for SharedMap
mstephen19
published 0.3.0 •

Changelog

Source

[0.3.0] - 2022-29-12

Removed

  • __beforeServiceTask and __afterServiceTask hooks in favor of universal __beforeTask and __afterTask hooks with new context.

Changed

  • README streaming examples to use .shift() instead of .splice().
  • Context of TaskHooks to contain the name of the task being called and whether or not it's being called within a service.
  • ServiceCluster.launch to disallow negative or non-whole numbers.
  • Rename parent to MainThread, which makes much more sense anyways since the parent thread is always the main thread in Nanolith.
  • Rename messengers to MessengerList.
  • Rename MessengerList.seek() to MessengerList.list().
  • General overall refactor + minor performance improvements.
  • README revamp.

Fixed

  • __afterTask hook being called after the returned value was posted back to the main thread instead of before.
  • Weird exclusion of HookDefinitions keys in Tasks type.
  • Needing to close all SharedMap instances, otherwise the thread would hang even if nothing else is happening.
  • Errors when initializing SharedMap with an empty object.

Added

  • Functionality for setting new keys on SharedMap instances rather than throwing an error.
  • The ability to set new values on SharedMap based on the previous value. This is fantastic for high-concurrency parallel operations and eliminates all race conditions.
  • Nanolith.clusterize method for easy creation of a service cluster and launching services all at the same time.
mstephen19
published 0.3.0-beta4 •

mstephen19
published 0.3.0-beta3 •

mstephen19
published 0.3.0-beta2 •

mstephen19
published 0.2.5 •

Changelog

Source

[0.2.5] - 2022-24-12

Added

  • SharedMap implementation
  • New Bytes enum export to help users with calculating sizes for their SharedMaps
  • notifyAll() method to ServiceCluster to send messages to all services on the cluster with one function call.
  • Path aliases for all main features (for easy importing/exporting).
  • Support for NodeNext module resolution.
  • "LICENSE" file containing MIT license.
  • Docs for SharedMap.

Changed

  • Add timeoutSecs parameter to prepareWritableToPortStream() to configure how many seconds to wait for the stream to be accepted before rejecting the promise.
  • TaskWorkerOptions and ServiceWorkerOptions types to be exported as LaunchTaskOptions and LaunchServiceOptions instead.
  • Main file to export types SharedArrayPair and MessengerTransferData.
  • SharedArrayPair type name to SharedMapTransferData.
  • Messenger.transfer() to be a getter instead of a function.
  • Removed Data word from exports of SharedMapTransferData and MessengerTransferData.
  • pool.option to be a static property.
  • Moved constants that were in type files to their own dedicated files within the "constants" directory. Likely will do this with utilities in the future as well.
  • Switched tsconfig moduleResolution to NodeNext.
mstephen19
published 0.3.0-beta1 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc