Skip to content

Releases: Sv443-Network/SvCoreLib

Version 1.18.2

20 Feb 12:47
95415fb
Compare
Choose a tag to compare

Fixes:

  • Made system.inDebugger() no longer dependant on V8's inspector module which errored in environments like pkg
  • Corrected wrong color code for colors.fat
  • Fixed docs in a few places

Version 1.18.1

11 Oct 15:16
a042edb
Compare
Choose a tag to compare

Fixes:

  • Fix some TS typings

Version 1.18.0

11 Oct 13:05
c838a05
Compare
Choose a tag to compare
  • Additions
    • splitIntoParts() function to split an array into n parts
    • splitIntoPartsOfLength() function to split an array into parts of n length
  • Fixes
    • Reverted dynamic imports issue #51
    • Support Error options issue #52

Version 1.17.0

13 Aug 10:56
b6bc946
Compare
Choose a tag to compare
  • Additions
    • Added function allInstanceOf() to check if all items in an array are an instance of a class
    • Added function isClass() to check if a value is a reference to a class
    • Added function randomItemIndex() to get a random item and its index from an array
    • Added function takeRandomItem() to delete a random item from an array and return it
    • colors
      • Added colors.fgb and colors.bgb for bright colors
      • Added dim, underscore, reverse and hidden
  • Breaking changes
    • Changed state fulfilled to resolved in StatePromise
    • colors
      • Removed brightness modifier from colors.fg and colors.bg
      • Renamed colors.fat to colors.bright
  • Fixes
    • Added missing documentation for allOfType()
    • Fixed docs in various places

Version 1.16.0

29 Jun 20:24
64c6650
Compare
Choose a tag to compare
  • Additions
    • Added clamp() to ensure a number is between a min and max limit
  • Fixes
    • randRange() now doesn't depend on the performance module anymore
    • Updated deps

Version 1.15.0

15 Jun 13:38
1d7065b
Compare
Choose a tag to compare
  • Breaking changes
    • Shortened namespace names:
      • generateUUID -> uuid
      • filesystem -> files
    • Renamed functions:
      • seededRNG.generateRandomSeed() -> seededRNG.randomSeed()
      • seededRNG.generateRandomNumbers() -> seededRNG.generateNumbers()
      • pause() -> system.pause()
  • Additions
    • Added function halves() to get the two halves of an array
    • Added function parseDuration() to parse out time units from a passed duration in milliseconds
    • Added function formatDuration() to convert a duration in milliseconds to a string with custom format
    • Added function files.existsSync() as a synchronous counterpart to files.exists()
    • SelectionMenu now supports EventEmitter's .on("submit") method
  • Fixes
    • reserialize() now keeps the type of the passed object (#38)
    • seededRNG.validateSeed() now returns false when a seed starts with 0 (#34)
    • Fixed missing argument in system.inDebugger() (#37)
    • Updated dependencies

Version 1.14.2

08 Aug 15:24
45c0fef
Compare
Choose a tag to compare
  • Fixes
    • Fixed .d.ts type declarations (#27)
    • Fixed system.inDebugger() not detecting debugger (#30)
    • Set mysql as a peer dependency (#29)
    • Improved documentation a little bit
  • Internal stuff
    • Added CodeQL analysis workflow

Hotfix 1.14.1

07 Jun 19:52
a7b512c
Compare
Choose a tag to compare

Fixed bug where filesystem.exists() wasn't exported (see #25)

Release 1.14.0

11 May 22:25
10cbca6
Compare
Choose a tag to compare
  • Additions
    • Added class StatePromise that keeps track of the state of a promise
    • Added single-parameter overload to randRange()
    • Added string array overload to generateUUID.custom(), deprecated older overload
    • softShutdown() now accepts a Promise for async code execution before shutdown
  • Changes
    • Moved repository to @Sv443-Network
    • Improved type declaration file (.d.ts) by a lot
  • Security
    • Audited dependencies

Release 1.13.0

17 Mar 15:59
e1d688d
Compare
Choose a tag to compare

Migration warnings:

  • You will need to modify all occurrences of FolderDaemon with the new syntax shown in the docs
  • The namespace of a few functions has changed (see changes)



Added functions:

  • filesystem.exists() to provide a reimplementation to fs' deprecated exists() function (#14)
  • filesystem.ensureDirs() to ensure a set of directories exists (#18)
  • filesystem.ensureDirsSync() as a synchronous counterpart to ensureDirs() (#18)
  • system.usedHeap() to get the current heap usage in percent (#19)

Changes:

  • Replaced FolderDaemon's configuration parameters with a single settings object (#13)
  • Added base class SCLError to all errors to implement the date property (#17)
  • Moved a few functions to the new system namespace:
    • noShutdown() - moved to system
    • yesShutdown() - moved to system
    • softShutdown() - moved to system
    • inDebugger() - moved to system
    • setWindowTitle() - moved to system

Fixed bugs:

  • isEmpty() with value null threw a TypeError (#15)
  • Package mysql isn't included in the dependencies (#21)
  • Definition of system.softShutdown()'s callback function was wrong (#20)