This repository was archived by the owner on Oct 9, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Changelogs
Sven Fehler edited this page Apr 16, 2020
·
18 revisions
- 1.9: 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4
- 1.8: 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4
- 1.7: 1.7.0
- 1.6: 1.6.5, 1.6.6
- Improvements / Fixes:
- Fixed invalid usage of the "SIGKILL" signal in
jsl.softShutdown()
(GitHub issue #49) - Added function
jsl.randomItem()
that returns a random item of an array
- Fixed invalid usage of the "SIGKILL" signal in
- Improvements / Fixes:
- Decreased size of package by adding some files to the
.npmignore
(GitHub issue #45) - Fixed memory leak issues as all events in
jsl.pause()
are now correctly unregistered (GitHub issue #43) - Fixed the JSDoc documentation comments for
jsl.seededRNG.generateSeededNumbers()
and some other functions (GitHub issue #44) - Improved handling of the two separate
package.json
files, for NPM and GPR (GitHub issue #47) - Modified the
.editorconfig
a bit
- Decreased size of package by adding some files to the
- Improvements / Fixes:
- Fixed some minor docs issues
- Added Promise return to
jsl.downloadFile()
andjsl.readdirRecursive()
- Made "Exit" text localizable in
jsl.MenuPrompt
- Improvements / Fixes:
-
jsl.pause()
now correctly unregisters events, fixing memory leak issues
-
- New Features:
- Added function
jsl.removeDuplicates()
to remove duplicate entries in an array - Added function
jsl.pause()
to wait until user confirmation before continuing code execution - Added function
jsl.inDebugger()
to check if the process is currently running in a debugger
- Added function
- Improvements / Fixes:
-
jsl.unused()
now has a rest parameter instead of a single parameter - Added a localization property to
jsl.MenuPrompt
to enable it for being translated - Fixed a bug in
jsl.MenuPrompt
by ensuring that the raw mode of the stdin is always set to true - Massively improved unit tests
- Added a code coverage report
-
- improvements / fixes:
- improvements / fixes:
- fixed typo in the JSDoc comment for "jsl.randRange()"
- fixed JSDoc typedefs for MenuPrompt (#19)
- fixed "directory not found" error in the unit test script (#17)
- removed function "jsl.runUnitTests()"
- added GitHub actions scripts to automate building and publishing
- added option to automatically submit a menu in MenuPrompt after typing a single character
(unpublished due to version mismatch)
- new features:
- function
jsl.seededRNG.generateSeededNumbers(count, seed)
to generate "random" numbers based on a passed seed - function
jsl.seededRNG.generateRandomSeed(digitCount)
to generate a random seed to be used injsl.generateSeededNumbers()
- function
jsl.seededRNG.validateSeed(seed)
to check whether or not a seed is valid - function
jsl.mapRange(value, range_1_min, range_1_max, range_2_min, range_2_max)
to transform a value from one numerical range to another - function
jsl.downloadFile(url, destPath, options)
to download a file from a URL - function
jsl.unused(any_var)
to indicate an unused variable to a linter - function
jsl.replaceAt(input: str, index: number, replacement: str)
to replace a character at the specified index of a string with a replacement - function
jsl.randomizeArray(array: array)
to randomize the indexes of the items of an array - object
colors
to make it easier to add colors to the console output - this will replacejsl.consoleColor()
- class
MenuPrompt
for an interactive menu (directly in the CLI) - methods:-
open()
to open the prompt -
addMenu()
to add a new menu to the prompt -
validateMenu()
to check whether a menu is invalid -
currentMenu()
to get the current menu index -
close()
to prematurely close the prompt and get the results -
result()
to prematurely get the results of the prompt (without closing it)
-
- added unit tests for every function, class and object. They can be run with
npm test
ornode unittest
- function
- improvements / fixes:
- added support for ESLint (use
npm i --save-dev
and thennpm run lint
) - improved time measurement system for
jsl.ping()
- improved the background stuff in
jsl.ping()
to improve performance - added
contentType
property tojsl.ping()
's promise callback - edited a bunch of functions and methods to throw an error instead of returning it as a string, which could've caused unwanted and unpredictable behavior
- put the UUID generation inside an object, renamed it and added four new ones:
-
generateUUID.hexadecimal(format: str, upperCase: bool)
[0-9,a-f/A-F] -
generateUUID.alphanumerical(format: str, upperCase: bool)
[0-9,a-z/A-Z] -
generateUUID.decimal(format: str)
[0-9] -
generateUUID.binary(format: str)
[0-1] -
generateUUID.custom(format: str, possibleValues: str)
[Custom]
-
- added
contributors
anddocumentation
properties to thejsl.info
object - removed the signal
SIGKILL
from the shutdown prevention functions asSIGKILL
is intended as a signal that forces a process to be exited no matter what - rewrote the entire
README.md
- restructured the entire script to separate each function into its own file
- fixed
isEmpty()
's object-with-length-0-detection
- added support for ESLint (use
- fixed typo in
readme.md
- added
ProgressBar
class to create a dynamic progress bar - added function
jsl.readdirRecursive(folder, callback(err, result){})
to read a folder and its subfolders asynchronously - added function
jsl.readdirRecursiveSync(folder)
to read a folder and its subfolders synchronously - added function
jsl.readableArray(array, separators, lastSeparator)
to make an array more easily human-readable - split the package up into three separate files
- removed all dependencies because they are either included by default or their effect was easily recreatable in vanilla JS
- removed
jsl.settings
completely - updated documentation for
jsl.ping()
- changed dependency
perf_hooks
toexecution-time
because a feature was deprecated - completely deprecated the all-lowercase alias
jsl.isempty()
of the functionjsl.isEmpty()
- cleaned up the code a bit