Skip to content

Latest commit

 

History

History
290 lines (215 loc) · 13.2 KB

CHANGELOG.md

File metadata and controls

290 lines (215 loc) · 13.2 KB

Changelog

All notable changes to this project will be documented in this file.

The format is inspired by Keep a Changelog.

The versions follow the rules of Semantic Versioning 2.0.0.

[Unreleased]

Full Changes

v0.7.0 (2024-09-06 21:38:01 +08:00)

Full Changes

New Features

  • add module l.array_size (2b4f2a1)
  • add module l.parse_args. And l.parse_params is deprecated. (b506bf5)

    User should use l.parse_args instead of l.parse_params. The l.parse_params has some limitations on use. So it is deprecated and will be removed in soon.

  • add module l.array_has_key (00013b0)
  • add module: is_associative_array (80f3153)
  • add modules: var_attrs (b5455e4)

Document Changes

v0.6.0 (2022-12-15 02:35:30 +08:00)

Full Changes

Breaking Changes

Have 1 breaking changes. Check below logs with ⚠️ .

New Features

  • add l.head (24f2dad)
  • add l.seq (06bb8f3)
  • add l.echo.p (331b97b)
  • add l.extract (5a0f7fb)
  • l.last support "<count>" parameter, which defaults to 1 (4be3317)
  • l.first support "<count>" parameter, which defaults to 1 (ded7bb8)
  • add l.term_size (9d2518a)
  • add l.each.p (afbed00)
  • add l.sedi (46b7910)
  • add l.each (d3338cc)
  • add l.is_empty_dir (cfa1474)
  • add l.array_reverse (dee8361)
  • add l.read_array (2ac330b)
  • l.cursor_pos: support variable parameter (019aa5c)

    now it supports l.cursor_pos <array_name>

  • l.split: support "l.split <string> -" for subshell (3852be5)

    l.split <string> <output_array_name> not works in subshell. So use l.split <string> - to print results to stdout in subshell.

Bug Fixes

  • l.first and l.last, when array is emtpy, do not echo '' (7d4874e)
  • If refer array name outside function, the local variable names should prevent duplicates (37c38fe)
  • variables defined in "for" and "while" should be local (0b5c1de)

    Fix modules: benchmark, compose, keys, parse_params, trace_stack

  • ⚠️ l.cursor_pos: Change the output format of l.cursor_pos (9ed1ae5)

    Breaking Change:

    Change the output format of l.cursor_pos from row;column to $row\n$column\n

Document Changes

  • update module descriptions for l.hex_to_rgb and l.rgb_to_hex (6e3983b)
  • add how to write test case (96b6ac2)
  • fix dead and wrong links (28ae283 #6)
    • add "make check-links" to check daed links
    • Remove non-existed Test Cases links

    Fix #6

  • update git-message rules (133f9a3)
  • l.date: update description (3668155)

v0.5.1 (2022-11-26 00:30:46 +08:00)

Full Changes

Bug Fixes

  • is_array: exported array should be true
    • Only with bash 4.3, this function return 1 when the variable declared without initialization. Because declare -p a shows declare: a: not found when declare -a a. It's a bug in bash 4.3.
  • is_exported: it should be false if local variable is associate array but its name contains x
    • In bash 4.0~4.3, when export <var> without initialization, is_exported will return false. Because declare -p <var> will print "not found". It's a bug in Bash.
    • ([-a-z]+) not matches attribution -A, so the sed will print whole line. If the variable name contains "x", the [[ $s == *x* ]] will be true. That will cause a bug. See the last test case.

Document Changes

  • update module usages
  • improve documents
  • add Chinese documents

v0.5.0 (2022-11-24 00:56:00 +0800)

Full Changes

New Features

Bug Fixes

  • build: Add options "-h", "-y" and "-p". env PREFIX and OVERWRITE are still compatible, but should not used any more.
  • build: add git commit into built verion annotation && fix version in doc
  • build: support symbol link to ./build file
  • build: failed with linux sed
  • build: OVERWRITE should be false by default
  • build: remove public method wrappers && internal variables should be replaced when building
  • ci: mkdir ./dist when test-in-docker
  • ci: test-in-docker should have tty
  • ci: load_module should load dist/lobash.bash
  • l.ask: no longer return "Invalid Answer"
  • l.str_include: with empty string should return true
  • l.keys: test failed in linux
  • l.is_array: uninitialized (declare -a arr) should be an array
  • l.random: l.random hangs up in Github Action
  • l.sleep: do not create _L_SLEEP_TEMP when loading lobash
  • l.with_ifs: eval "$@" -> eval "$*"
  • l.is_array: it should return true when test associative array && it returns false with uninitialized array in bash 4.3

Document Changes

  • update module usages && add Notice
  • rename /doc to /docs for github issue template
  • improve documents && remove TOC to use the Github builtin TOC
  • fix metadata since && update changelog
  • l.sort: update description && add examples

BREAKING CHANGE

  • l.ask:
    • no longer return "Invalid Answer"
    • default value of l.ask use "" instead of "Y"
  • l.is_array
    • There is a bug in bash 4.3 with declare -p. It may be a breaking change.
    • With associative array, it returns true now. But it returns false in previous version.

v0.4.0 - 2019-07-12 21:36:00 +0800

Now most modules support bash 4.0+!

Full Changes

Add

Fix

  • union_array: each value of return array should be unique && union_array only accept one or two parameters
  • Use eval instead of nameref. All commands using nameref feature now support 4.0+. Effect commands:
    • array_include
    • array_include.s
    • echo_array
    • first
    • inc
    • join
    • last
    • match_list
    • parse_params
    • sort
    • sub
    • union_array

Change

  • refactor: reduce exported internal codes in built file.
  • refactor: remove comments in built file

Doc

  • Modules usages document shows what modules not compatible with Bash 4.0.

v0.3.1 - 2019-07-08 02:22:00 +0800

Full Changes

Add

  • add l.array_include.s, l.str_include.s, l.end_with.s, l.start_with.s

Breaking Change

  • l.str_include return 0/1 instead of echo true/false
  • l.end_with return 0/1 instead of echo true/false
  • l.start_with return 0/1 instead of echo true/false
  • l.array_include return 0/1 instead of echo true/false
  • str_include, end_with, start_with move to Condition Category

v0.3.0 - 2019-07-08 01:16:00 +0800

Full Changes

Breaking Change

All Condition modules should provide two implements. Like is_file and is_file.s, '.s' suffix means "strict mode".

  • All Condition functions renamed from l.xxx to l.xxx.s.
  • Current Condition functions l.xxx return 0/1 instead of echo true/false
  • rename l.is_writeable => l.is_writable.s
  • rename l.true => l.is_truthy.s
  • rename l.false => l.is_falsy.s
  • l.has not support l.has not , use l.has_not instead
  • rename l.strict_has => l.has.s
  • rename l.strict_has_not => l.has_not.s
  • rename l.not => l.not.s
  • rename l.not.p => l.not.s.p

v0.2.0 - 2019-07-07 15:26:01 +0800

Full Changes

Fix

  • l.array_include should return false when get empty array.
  • l.split 'abc' target 'abc' not work as expected.
  • l.cur_function_name: wrong function name in dist.
  • l.trace_stack should not show self function in stack in dist.
  • Only active inherit_errexit when it is supported in Bash.
  • l.count_files: wrong counts when spaces in file paths

Add

  • Add new modules: ask_input, echo_screen, with_ifs
  • bin/lobash add new sub-commands: mods, meta, help, github
  • Add colored output and interactive prompts for build script

Change

  • Support Bash 4.0+. The shell option inherit_errexit is not required. Some modules are not supported in lower version Bash.

Doc

  • Change file structure of "module usages" and show more metadatas. Now you can see what Bash version each module supported.

v0.1.0 - 2019-07-01 23:46:15 +0800

First release! It works in Bash 4.4+.

Full Changes