Up to [cvs.NetBSD.org] / pkgsrc / devel / lua-penlight
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.21 / (download) - annotate - [select for diffs], Fri Mar 31 00:22:11 2023 UTC (8 months ago) by joerg
CVS Tags: pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2, HEAD
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)
lua-penlight 1.13.1: fix: warn unquoted argument fix: xml.parse returned nonsense when given a file name feat: app.require_here now follows symlink'd main modules to their directory fix: pretty.write invalid order function for sorting fix: compat.warn raised write guard warning in OpenResty feat: utils.enum now accepts hash tables, to enable better error handling feat: utils.kpairs new iterator over all non-integer keys fix: warn use rawget to not trigger strict-checkers fix: lapp provides the file name when using the default argument fix: lapp positional arguments now allow digits after the first character fix: path.isdir windows root directories (including drive letter) were not considered valid
Revision 1.20 / (download) - annotate - [select for diffs], Sun Feb 13 11:39:39 2022 UTC (21 months, 2 weeks ago) by nia
CVS Tags: pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)
lua-penlight: update to 1.12.0 ## 1.12.0 (2022-Jan-10) - deprecate: module `pl.text` the contents have moved to `pl.stringx` (removal later) [#407](https://github.com/lunarmodules/Penlight/pull/407) - deprecate: module `pl.xml`, please switch to a more specialized library (removal later) [#409](https://github.com/lunarmodules/Penlight/pull/409) - feat: `utils.npairs` added. An iterator with a range that honours the `n` field [#387](https://github.com/lunarmodules/Penlight/pull/387) - fix: `xml.maptags` would hang if it encountered text-nodes [#396](https://github.com/lunarmodules/Penlight/pull/396) - fix: `text.dedent` didn't handle declining indents nor empty lines [#402](https://github.com/lunarmodules/Penlight/pull/402) - fix: `dir.getfiles`, `dir.getdirectories`, and `dir.getallfiles` now have the directory optional, as was already documented [#405](https://github.com/lunarmodules/Penlight/pull/405) - feat: `array2d.default_range` now also takes a spreadsheet range, which means also other functions now take a range. [#404](https://github.com/lunarmodules/Penlight/pull/404) - fix: `lapp` enums allow [patterns magic characters](https://www.lua.org/pil/20.2.html) [#393](https://github.com/lunarmodules/Penlight/pull/393) - fix: `text.wrap` and `text.fill` numerous fixes for handling whitespace, accented characters, honouring width, etc. [#400](https://github.com/lunarmodules/Penlight/pull/400) - feat: `text.wrap` and `text.fill` have a new parameter to forcefully break words longer than the width given. [#400](https://github.com/lunarmodules/Penlight/pull/400) - fix: `stringx.expandtabs` could error out on Lua 5.3+ [#406](https://github.com/lunarmodules/Penlight/pull/406) - fix: `pl` the module would not properly forward the `newindex` metamethod on the global table. [#395](https://github.com/lunarmodules/Penlight/pull/395) - feat: `utils.enum` added to create enums and prevent magic strings [#408](https://github.com/lunarmodules/Penlight/pull/408) - change: `xml.new` added some sanity checks on input [#397](https://github.com/lunarmodules/Penlight/pull/397) - added: `xml.xml_escape` and `xml.xml_unescape` functions (previously private) [#397](https://github.com/lunarmodules/Penlight/pull/397) - feat: `xml.tostring` now also takes numeric indents (previously only strings) [#397](https://github.com/lunarmodules/Penlight/pull/397) - fix: `xml.walk` now detects recursion (errors out) [#397](https://github.com/lunarmodules/Penlight/pull/397) - fix: `xml.clone` now detects recursion (errors out) [#397](https://github.com/lunarmodules/Penlight/pull/397) - fix: `xml.compare` now detects recursion (errors out) [#397](https://github.com/lunarmodules/Penlight/pull/397) - fix: `xml.compare` text compares now work [#397](https://github.com/lunarmodules/Penlight/pull/397) - fix: `xml.compare` attribute order compares now only compare if both inputs provide an order [#397](https://github.com/lunarmodules/Penlight/pull/397) - fix: `xml.compare` child comparisons failing now report proper error [#397](https://github.com/lunarmodules/Penlight/pull/397)
Revision 1.19 / (download) - annotate - [select for diffs], Fri Dec 10 13:16:20 2021 UTC (23 months, 3 weeks ago) by nia
CVS Tags: pkgsrc-2021Q4-base, pkgsrc-2021Q4
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)
lua-penlight: update to 1.11.0 ## 1.11.0 (2021-08-18) - fix: `stringx.strip` behaved badly with string lengths > 200 - fix: `path.currentdir` now takes no arguments and calls `lfs.currentdir` without argument - feat: `utils.raise_deprecation` now has an option to NOT include a stack-trace
Revision 1.18 / (download) - annotate - [select for diffs], Thu May 13 10:19:09 2021 UTC (2 years, 6 months ago) by nia
CVS Tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)
lua-penlight: update to 1.10.0 ## 1.10.0 (2021-04-27) - deprecate: `permute.iter`, renamed to `permute.order_iter` (removal later) [#360](https://github.com/lunarmodules/Penlight/pull/360) - deprecate: `permute.table`, renamed to `permute.order_table` (removal later) [#360](https://github.com/lunarmodules/Penlight/pull/360) - deprecate: `Date` module (removal later) [#367](https://github.com/lunarmodules/Penlight/pull/367) - feat: `permute.list_iter` to iterate over different sets of values [#360](https://github.com/lunarmodules/Penlight/pull/360) - feat: `permute.list_table` generate table with different sets of values [#360](https://github.com/lunarmodules/Penlight/pull/360) - feat: Lua 5.4 'warn' compatibility function [#366](https://github.com/lunarmodules/Penlight/pull/366) - feat: deprecation functionality `utils.raise_deprecation` [#361](https://github.com/lunarmodules/Penlight/pull/361) - feat: `utils.splitv` now takes same args as `split` [#373](https://github.com/lunarmodules/Penlight/pull/373) - fix: `dir.rmtree` failed to remove symlinks to directories [#365](https://github.com/lunarmodules/Penlight/pull/365) - fix: `pretty.write` could error out on failing metamethods (Lua 5.3+) [#368](https://github.com/lunarmodules/Penlight/pull/368) - fix: `app.parse` now correctly parses values containing '=' or ':' [#373](https://github.com/lunarmodules/Penlight/pull/373) - fix: `dir.makepath` failed to create top-level directories [#372](https://github.com/lunarmodules/Penlight/pull/372) - overhaul: `array2d` module was updated, got additional tests and several documentation updates [#377](https://github.com/lunarmodules/Penlight/pull/377) - feat: `aray2d` now accepts negative indices - feat: `array2d.row` added to align with `column` - fix: bad error message in `array2d.map` - fix: `array2d.flatten` now ensures to deliver a 'square' result if `nil` is encountered - feat: `array2d.transpose` added - feat: `array2d.swap_rows` and `array2d.swap_cols` now return the array - fix: `aray2d.range` correctly recognizes `R` column in spreadsheet format, was mistaken for `R1C1` format. - fix: `aray2d.range` correctly recognizes 2 char column in spreadsheet format - feat: `array2d.default_range` added (previously private) - feat: `array2d.set` if used with a function now passes `i,j` to the function in line with the `new` implementation. - fix: `array2d.iter` didn't properly iterate the indices [#376](https://github.com/lunarmodules/Penlight/issues/376) - feat: `array2d.columns` now returns a second value; the column index - feat: `array2d.rows` added to be in line with `columns` ## 1.9.2 (2020-09-27) - fix: dir.walk [#350](https://github.com/lunarmodules/Penlight/pull/350) ## 1.9.1 (2020-09-24) - released to superseed the 1.9.0 version which was retagged in git after some distro's already had picked it up. This version is identical to 1.8.1. ## 1.8.1 (2020-09-24) (replacing a briefly released but broken 1.9.0 version) ## Fixes - In `pl.class`, `_init` can now be inherited from grandparent (or older ancestor) classes. [#289](https://github.com/lunarmodules/Penlight/pull/289) - Fixes `dir`, `lexer`, and `permute` to no longer use coroutines. [#344](https://github.com/lunarmodules/Penlight/pull/344)
Revision 1.17 / (download) - annotate - [select for diffs], Mon Nov 23 20:06:46 2020 UTC (3 years ago) by nia
CVS Tags: pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4
Changes since 1.16: +9 -7 lines
Diff to previous 1.16 (colored)
lua-penlight: Update to 1.9.1 ## 1.9.1 (2020-09-27) - fix: dir.walk [#350](https://github.com/lunarmodules/Penlight/pull/350) ## 1.9.1 (2020-09-24) - released to superseed the 1.9.0 version which was retagged in git after some distro's already had picked it up. This version is identical to 1.8.1. ## 1.8.1 (2020-09-24) (replacing a briefly released but broken 1.9.0 version) ## Fixes - In `pl.class`, `_init` can now be inherited from grandparent (or older ancestor) classes. [#289](https://github.com/lunarmodules/Penlight/pull/289) - Fixes `dir`, `lexer`, and `permute` to no longer use coroutines. [#344](https://github.com/lunarmodules/Penlight/pull/344) ## 1.8.0 (2020-08-05) ### New features - `pretty.debug` quickly dumps a set of values to stdout for debug purposes ### Changes - `pretty.write`: now also sorts non-string keys [#319](https://github.com/lunarmodules/Penlight/pull/319) - `stringx.count` has an extra option to allow overlapping matches [#326](https://github.com/lunarmodules/Penlight/pull/326) - added an extra changelog entry for `types.is_empty` on the 1.6.0 changelog, due to additional fixed behaviour not called out appropriately [#313](https://github.com/lunarmodules/Penlight/pull/313) - `path.packagepath` now returns a proper error message with names tried if it fails ### Fixes - Fix: `stringx.rfind` now properly works with overlapping matches [#314](https://github.com/lunarmodules/Penlight/pull/314) - Fix: `package.searchpath` (in module `pl.compat`) [#328](https://github.com/lunarmodules/Penlight/pull/328) - Fix: `path.isabs` now reports drive + relative-path as `false`, eg. "c:some/path" (Windows only) - Fix: OpenResty coroutines, used by `dir.dirtree`, `pl.lexer`, `pl.permute`. If available the original coroutine functions are now used [#329](https://github.com/lunarmodules/Penlight/pull/329) - Fix: in `pl.strict` also predefine global `_PROMPT2` - Fix: in `pl.strict` apply `tostring` to the given name, in case it is not a string. - Fix: the lexer would not recognize numbers without leading zero; "-.123". See [#315](https://github.com/lunarmodules/Penlight/issues/315)
Revision 1.16 / (download) - annotate - [select for diffs], Thu Jul 2 10:26:17 2020 UTC (3 years, 5 months ago) by nia
CVS Tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)
Add 'lua' category to Lua modules. While here, normalize some packages with strange variable order.
Revision 1.15 / (download) - annotate - [select for diffs], Sat Feb 15 05:50:37 2020 UTC (3 years, 9 months ago) by mef
CVS Tags: pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)
(devel/lua-penlight) Updated 1.5.4 to 1.7.0 ## 1.7.0 (2019-10-14) ### New features - `utils.quote_arg` will now optionally take an array of arguments and escape them all into a single string. - `app.parse_args` now accepts a 3rd parameter with a list of valid flags and aliasses - `app.script_name` returns the name of the current script (previously a private function) ### Changes - Documentation updates - `utils.quit`: exit message is no longer required, and closes the Lua state (on 5.2+). - `utils.assert_arg` and `utils.assert_string`: now return the validated value - `pl.compat`: now exports the `jit` and `jit52` flags - `pretty.write`: now sorts the output for easier diffs [#293](https://github.com/Tieske/Penlight/pull/293) ### Fixes - `utils.raise` changed the global `on_error`-level when passing in bad arguments - `utils.writefile` now checks and returns errors when writing - `compat.execute` now handles the Windows exitcode -1 properly - `types.is_empty` would return true on spaces always, indepedent of the parameter - `types.to_bool` will now compare case-insensitive for the extra passed strings - `app.require_here` will now properly handle an absolute base path - `stringx.split` will no longer append an empty match if the number of requested elements has already been reached [#295](https://github.com/Tieske/Penlight/pull/295) - `path.common_prefix` and `path.relpath` return the result in the original casing (only impacted Windows) [#297](https://github.com/Tieske/Penlight/pull/297) - `dir.copyfile`, `dir.movefile`, and `dir.makepath` create the new file/path with the requested casing, and no longer force lowercase (only impacted Windows) [#297](https://github.com/Tieske/Penlight/pull/297) - added a missing assertion on `path.getmtime` [#291](https://github.com/Tieske/Penlight/pull/291) - `stringx.rpartition` returned bad results on a not-found [#299](https://github.com/Tieske/Penlight/pull/299) ## 1.6.0 (2018-11-23) ### New features - `pl.compat` now provides `unpack` as `table.unpack` on Lua 5.1 ### Changes - `utils.unpack` is now documented and respects `.n` field of its argument. - `tablex.deepcopy` and `tablex.deepcompare` are now cycle aware (#262) - Installing through LuaRocks will now include the full rendered documentation ### Fixes - Fixed `seq.last` returning `nil` instead of an empty list when given an empty iterator (#253). - `pl.template` now applies `tostring` when substituting values in templates, avoiding errors when they are not strings or numbers (#256). - Fixed `pl.import_into` not importing some Penlight modules (#268). - Fixed version number stuck at 1.5.2 (#260). - Fixed `types.is_empty` returning `true` on tables containing `false` key (#267). - Fixed `test.assertraise` throwing an error when passed an array with a function to call plus its arguments (#272). - Fixed `test.assertraise` not throwing an error when given function does not error but instead returns a string matching given error pattern. - Fixed placeholder expressions being evaluated with wrong precedence of binary and unary negation. - Fixed placeholder expressions being evaluated assuming wrong binary operator associativity (e.g. `_1-(_2+_3)` was evaluated as `(_1-_2)+_3`. - Fixed placeholder expressions being evaluated as if unary operators take precedence over power operator (e.g. `(-_1)^_2`) was evaluated as `-(_1^2)`). - Fixed vulnerable backtracking pattern in `pl.stringx.strip` (#275)
Revision 1.14 / (download) - annotate - [select for diffs], Sat Jan 18 23:30:33 2020 UTC (3 years, 10 months ago) by rillig
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)
all: migrate several HOMEPAGEs to https pkglint --only "https instead of http" -r -F With manual adjustments afterwards since pkglint 19.4.4 fixed a few indentations in unrelated lines. This mainly affects projects hosted at SourceForce, as well as freedesktop.org, CTAN and GNU.
Revision 1.13 / (download) - annotate - [select for diffs], Sat Sep 16 19:53:50 2017 UTC (6 years, 2 months ago) by alnsn
CVS Tags: pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)
Revision 1.12 / (download) - annotate - [select for diffs], Sun Sep 10 15:25:14 2017 UTC (6 years, 2 months ago) by alnsn
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)
Update devel/lua-penlight to version 1.5.4. Commits between 1.5.2 and 1.5.4: * change compat.execute to behave similarly on Lua 5.1 and Lua > 5.1. * Issue #246: bad/misleading code in examples * Issue #245 document 'optional' * split the templating engine in a compile and render step backward compatible. Minor caveat is that it introduces 2 local variables in the template, but chances of name collissions are very low. Additionally: reduced the string concatenation. Only one concat call is left. * Merge pull request #249 from Tieske/feat/reuse-template split the templating engine in a compile and render step * updated template module - added the newline option (for single line output) - merged test files: test-template and test-substitute - changed compile signature to take a table of options - improved error reporting: syntax errors report error + code * Fix global success variable in lapp. * Added more tests for seq.last * Minor refactor of seq.last and fixes corner case of an empty source stream as outlined in issue #252. * Added tests for List.put, remove, len, clear and contains. * Added tests for List.split. * Added tests for List.partition. * Added missing tests for List.range, reduce and foreach. * feat(template): handle special case of a constant string A common scenario is an 'option' for templates, where most of the use is without it. This change optimizes the render function in case of constant strings * Fix error in 'pl.lapp.process_options_string' Fix error "attempt to concatenate a nil value (local 'vtype')" by checking making sure vtype is not nil. * Merge pull request #250 from Tieske/feat/improve-template feat(template) newline option, better error reporting, cleanup * Merge pull request #255 from doronbehar/patch-1 Fix error in 'pl.lapp.process_options_string' * bump version to 1.5.3 * Merge pull request #244 from bungle/master change compat.execute to behave similarly on Lua 5.1 and Lua > 5.1. * Merge pull request #251 from IoriBranford/master Fix global success variable in lapp process_default. * Merge pull request #254 from greatwolf/list_coverage List coverage
Revision 1.11 / (download) - annotate - [select for diffs], Thu Apr 27 21:52:09 2017 UTC (6 years, 7 months ago) by alnsn
CVS Tags: pkgsrc-2017Q2-base, pkgsrc-2017Q2
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)
Update devel/lua-penlight to 1.5.2. Changes between 1.5.2 and 1.4.1: lapp: print left in code issue #228: bug in file matching for dir.getfiles issue #243 broken lapp default: little fix to c222e422274c testclone example assumed global lfs update changes and version number issue #226: can use either = or : to separate flag/value issue #241: little hack to handle no-trailing-comment case Merge pull request #193 from jvprat/class_tostring Setup __tostring on class creation instead of per instance. Merge pull request #240 from urzds/fix/lapp-convert-defaults lapp: Convert default values using the associated converter function Merge pull request #242 from tjachmann/workaround-for-pretty.load-error Workaround for error in pretty.load with a C hook pretty.load errors out, if a C hook function is installed (Lua 5.1). Reason: debug.gethook() returns a string as first return value in this case. Then debug.sethook complains about the first argument being a string not a function. lapp: Convert default values using the associated converter function Also uses quite some hack to catch errors during conversion of default values. This prevents the application from quitting, if the value provided as default would be invalid in the current context, while the value provided on the command line is valid. Also handles -h and --help early, before parsing command line arguments Otherwise it would be impossible to show the help, if conversion of the default value of some argument fails. Merge pull request #239 from kulla/rename-arg-pattern dir.lua: Rename arg "pattern" to "shell_pattern" Fix a test to pass under LuaJIT with Lua 5.2 compat Merge pull request #237 from Tieske/fix/execute fix os.execute Merge branch 'master' of https://github.com/stevedonovan/Penlight into fix/execute fix os.execute to return proper results when LuaJIT is being used with 52 compatibility enabled Tweak local declaration in pl.compat Avoid duplicated variable. Fix a typo in pl.seq docs [ci skip] Merge pull request #233 from greatwolf/seq_coverage Added more test coverage for pl.seq Added test for seq.printall. Minor refactor of existing test. Added missing test case for equal_to and random. Added tests for seq.random, minmax, enum and copy_tuples. seq coverage Merge pull request #231 from greatwolf/bugfix_refactor Redid PR #230 as a separate branch. Added more tests for seq.reduce. Fixed seq.reduce to handle empty case. Allow passing initial value when calling reduce through seq object. naming consistency. redundant checks. Update version number in docs Fix typos in pl.lapp docs Added tests for seq.take. Just use n as counter. Added tests for seq.skip. Fixed bug when skipping past list. More concise code. Initial value argument for `tablex.reduce` is going to be added in 1.5.0, not 1.3.2 Merge pull request #213 from gpleiss/reduce-memo tablex.reduce can take an optional initial memo tablex.reduce can take an optional initial memo Add "in progress" changes [ci skip] Merge pull request #221 from mpeterv/fix-stringx-splitlines Fix stringx.splitlines Fix coverage reporting on travis Tests are now run from project root. pl.seq() constructor can take an iterator which returns a function _and_ an object issue #226 lapp respects ':' as well as '=' Merge pull request #225 from kulla/dir-some-fixes Little fixes in dir.lua dir.lua: Replace tab with whitespace in docstring. The tab characters create a strange format in documentatio (cf. https://stevedonovan.github.io/Penlight/api/libraries/pl.dir.html#getallfiles ) dir.lua: Remove file execution permission. Merge pull request #224 from kulla/utils-doctring-fix Fix usage example of string_lambda(). utils.lua: Fix usage example of string_lambda(). Update docs for template.substitute Merge pull request #222 from urzds/feature/template-customisable-filename pl.template: Support customising the chunk "filename" (default: TMP) pl.template: Support customising the chunk name (default: "TMP") This can be used to aid debugging, e.g. when the template resides in an actual file. Fix handling of __index returning false in pl.strict Ref #223. Add a test for tablex.count_map Merge pull request #214 from urzds/feat/customisable-inline-escape pl.template: Support customising the inline escape character (defaultăŕ pl.data: faster delimiter guessing Don't count occurrences of potential delims, just use string.find. Fix error in tablex.count_map Regression introduced in @6123f9e. Remove unused localizations, update dependency lists Don't use globals in 'pl.data' tests Fix stringx.splitlines Make stringx.splitlines more compliant with its Python analogue: * Recognize "\r\n" as a single line end. * Return an empty list for an empty string. * Implement `keep_ends` argument.
Revision 1.10 / (download) - annotate - [select for diffs], Sun Nov 20 10:37:50 2016 UTC (7 years ago) by alnsn
CVS Tags: pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)
Update devel/lua-penlight to version 1.4.1. Prompted by beta.repology.org. ## 1.4.1 ### Changes - All functions that return instances of `pl.List`, `pl.Map` and `pl.Set` now require corresponding modules, so that their methods always work right away. ### Fixes - Fixed `dir.getallfiles` returning an empty array when called without `pattern` argument. ## 1.4.0 ### Changes ### Fixes - `pl.path` covers edge cases better (e.g 'path.normpath` was broken) - `p.dir` shell patterns fixed - `os.tmpname` broken on modern Windows/MSVC14 - (likewise for `utils.executeex` which depends on it) - `pretty.write` more robust and does not lose floating-point precision; saves and restores debug hooks when loading. - `pl.lexer` fixes: `cpp` lexer now filters space by default - `tablex.sortv` no longer assumes that the values are all unique - `stringx.center` is now consistent with Python; `stringx.rfind` and `string.quote_string` fixed. - `data.write` had a problem with default delimiter, properly returns error now. - `pl.Set` `+` and `-` now have correct semantics ### Features - `pl.tablex` has `union` and `merge` convenience functions - `pl.lapp` understands '--' meaning end of parsed arguments - `utils.quote_arg` quotes command arguments for `os.execute`, correctly handling all special characters. - `utils.writefile` has optional `is_bin` argument - 'pl.lexer' supports line numbers with string argument - `stringx.endswith` may be passed an array of possible suffixes. - `data.read` - in CSV mode, assume empty fields are numerical zero
Revision 1.9 / (download) - annotate - [select for diffs], Sat Jan 30 10:52:43 2016 UTC (7 years, 10 months ago) by alnsn
CVS Tags: pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1
Changes since 1.8: +3 -1 lines
Diff to previous 1.8 (colored)
Add devel/lua-filesystem dependency.
Revision 1.8 / (download) - annotate - [select for diffs], Tue Oct 27 21:32:03 2015 UTC (8 years, 1 month ago) by alnsn
CVS Tags: pkgsrc-2015Q4-base, pkgsrc-2015Q4
Changes since 1.7: +7 -5 lines
Diff to previous 1.7 (colored)
Switch to GITHUB_PROJECT and update HOMEPAGE. No version update. Thanks to Greg Troxel for pointing out a dead HOMEPAGE link.
Revision 1.7 / (download) - annotate - [select for diffs], Sat Jun 13 17:22:53 2015 UTC (8 years, 5 months ago) by alnsn
CVS Tags: pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2
Changes since 1.6: +2 -3 lines
Diff to previous 1.6 (colored)
Update devel/lua-penlight to 1.3.2. ## 1.3.2 ### Changes - now works and passes tests with Lua 5.3 - utils.import will NOT override global symbols (import 'math' caused global type() to be clobbered) - Updated pl.dir.file_op to return true on success and false on failure... - workaround for issues with pl.lapp with amalg.lua - will look at global LAPP_SCRIPT if arg is nil ### Fixes - func was broken: do NOT use ipairs to iterate if __index is overriden! - issue #133 pretty.read (naively) confused by unbalanced brackets - xml attribute underscore fix for simple parser - Fix path.normpath - lexer: fix parsing block comments/string. fix hang on empty string. - Fixed utils.execute returning different values for Lua 5.1 and Lua 5.2 - Issue #97; fixed attempt to put a month into a day - problem with tablex.count_map with custom comparison ### Features - Add Python style url module for quote and unquote. - stringx.quote_string, which scans for embedded long-string quote matches and escapes them by creating a long-string quote. - issue #117: tablex.range now works with decreasing numbers, consistent with numerical for loop - utils.import will NOT override global symbols (import 'math' caused global type() to be clobbered) - issue #125: DOCTYPE ignored in xml documents as well - Allow XML tostring() function to customize the default prefacing with <?xml...> - More Robust Quoted Strings - lapp: improved detection of unsupported short flags ## 1.3.0 ### Changes - class: RIP base method - not possible to implement correctly - lapp: short flags can now always be followed directly by their value, for instance, `-I/usr/include/lua/5.1` - Date: new explicit `Date.Interval` class; `toUTC/toLocal` return new object; `Date.__tostring` always returns ISO 8601 times for exact serialization. `+/-` explicit operators. Date objects are explicitly flagged as being UTC or not. ### Fixes - class: super method fixed. - Date: DST is now accounted for properly. - Date: weekday calculation borked. ### Features - All tests pass with no-5.1-compatible Lua 5.2; now always uses `utils.load` and `utils.unpack` is always available. - types: new module containing `utils.is_xxx` methods plus new `to_bool`. - class: can be passed methods in a table (see `test=klass.lua`). This is particularly convenient for using from Moonscript. - general documentation improvements, e.g `class` ## 1.2.1 ### Changes - utils.set(get)fenv always defined (_not_ set as globals for 5.2 anymore!). These are defined in new module pl.compat, but still available through utils. - class.Frodo now puts 'Frodo' in _current environment_ ### Fixes - lapp.add_type was broken (Pete Kazmier) - class broke with classes that redefined __newindex - Set.isdisjoint was broken because of misspelling; default ctor Set() now works as expected - tablex.transform was broken; result now has same keys as original (CoolistheName007) - xml match not handling empty matches (royalbee) - pl.strict: assigning nil to global declares it, as God intended. (Pierre Chapuis) - tests all work with pl.strict - 5.2 compatible load now respects mode - tablex.difference thought that a value of `false` meant 'not present' (Andrew Starke) ### Features - tablex.sort(t) iterates over sorted keys, tablex.sortv(t) iterates over sorted values (Pete Kazmier) - tablex.readonly(t) creates a read-only proxy for a table (John Schember) - utils.is_empty(o) true if o==nil, o is an empty table, or o is an empty string (John Schember) - utils.executeex(cmd,bin) returns true if successful, return code, plus stdout and stderr output as strings. (tieske) - class method base for calling inherited methods (theypsilon) - class supports pre-constructor _create for making a custom self (used in pl.List) - xml HTML mode improvements - can parse non-trivial well-formed HTML documents. xml.parsehtml is a parse function, no longer a flag - if a LOM document has ordered attributes, use these when stringifying - xml.tostring has yet another extra parm to force prefacing with <?xml...> - lapp boolean flags may have `true` default - lapp slack mode where 'short' flags can be multi-char - test.asserteq etc take extra arg, which is extra level where error must be reported at - path.currentdir,chdir,rmdir,mkdir and dir as alias to lfs are exported; no dependencies on luafilesystem outside pl.path, making it easier to plug in different implementations.
Revision 1.6 / (download) - annotate - [select for diffs], Sun Oct 19 22:27:44 2014 UTC (9 years, 1 month ago) by alnsn
CVS Tags: pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)
Revbump after lang/lua51 update.
Revision 1.5 / (download) - annotate - [select for diffs], Sat May 3 13:14:37 2014 UTC (9 years, 7 months ago) by alnsn
CVS Tags: pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)
Revbump for Lua multiversion support.
Revision 1.4 / (download) - annotate - [select for diffs], Wed Oct 30 06:03:37 2013 UTC (10 years, 1 month ago) by dholland
CVS Tags: pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)
Use LUA_PKGPREFIX. Many Lua packages already do, but not these.
Revision 1.3 / (download) - annotate - [select for diffs], Sun Jul 14 20:28:19 2013 UTC (10 years, 4 months ago) by alnsn
CVS Tags: pkgsrc-2013Q3-base, pkgsrc-2013Q3
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)
Update to 1.1.1. Changes since 1.1.0 (from git log): issue #70: boolean flags may have true default Merge pull request #69 from Tieske/master general updates, mainly added CONTRIBUTING.md Merge pull request #1 from mark-otaris/patch-1 Caught red handed, after a shameless copy :smile:. Thx for the fix This is Penlight, not Busted added - a shameless copy of busted - CONTRIBUTING.md file renamed docs to doc, to fix luarocks warning updated readme to md format changed .txt to .md files added rockspec, fixed typo in filename Merge pull request #67 from Tieske/add_executeex added utils.executeex, which also returns output of stdout and stderr updated, using readfile now, remove obsolete os.remove commands Merge pull request #66 from Tieske/fix_temp windows environment variable TMP is deprecated, use TEMP mode binary mode optional (binary would require platform specific line endings to be converted which is not very portable, and mostly just text will do) update: read files in binary mode added utils.executeex, which also returns output of stdout and stderr windows environment variable TMP is deprecated, use TEMP HTML mode skips DOCTYPE; no globals harmed outside pl.utils Merge pull request #64 from Tieske/fix_dir fixed makepath creation, added/updated some documentation fixed dirpath creation, added/updated some documentation basic parser handles comments, and HTML mode is working nicely with real-world HTML use LOM ordered attributes when stringifying if present (Danny). manual merge of John Schember's readonly table support Merge pull request #61 from user-none/isempty Thanks, John! Merge pull request #62 from CoolisTheName007/patch-2 Transform using values as keys. missing locals Set.issempty mispelling; default ctor borked; more tests Transform using values as keys. Merge remote-tracking branch 'upstream/master' into empty Add function to check if an object is empty. Merge pull request #53 from pkazmier/master Added iterators to allow traversing tables in a sorted manner Merge pull request #60 from theypsilon/master base class methods invocation possible not only in method constructor _init Adding new class method 'base' which can be used for calling base class methods easily pl.class broke with classes that redefined __newindex; OrderedMap can now use normal indexing to assign keys in order Merge pull request #54 from CoolisTheName007/patch-1 Typo fixed, libarary->library Typo fixed. Added tablex.sort and tablex.sortv to iterate over sorted elements There are times when it would be convenient to iterate over a table either by sorted keys or values. There is an example of this in the PIL book. I added the two functions to tablex module, added two test cases, and updated the PL manual. Merge pull request #51 from pkazmier/master Thanks! lapp.add_type was broken due to uninitialized table variable. The variable `types` was not initialized preventing `add_type` from appending custom types to the variable. I also added a new test to cover this test case in the future.
Revision 1.2 / (download) - annotate - [select for diffs], Sat May 11 22:24:46 2013 UTC (10 years, 6 months ago) by alnsn
CVS Tags: pkgsrc-2013Q2-base, pkgsrc-2013Q2
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)
File named 1.1.0.tar.gz should be in $DISTDIR/lua-penlight directory.
Revision 220.127.116.11 / (download) - annotate - [select for diffs] (vendor branch), Sat May 11 21:51:18 2013 UTC (10 years, 6 months ago) by alnsn
CVS Tags: pkgsrc-base
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)
Initial import of lua-penlight, version 1.1.0. Penlight is a set of pure Lua libraries focusing on input data handling (such as reading configuration files), functional programming (such as map, reduce, placeholder expressions,etc), and OS path management. Much of the functionality is inspired by the Python standard libraries.
Revision 1.1 / (download) - annotate - [select for diffs], Sat May 11 21:51:18 2013 UTC (10 years, 6 months ago) by alnsn
This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.