Commit e070ac5
🌟 [Release]: PowerShell-Lua data conversion now available via ConvertTo-Lua and ConvertFrom-Lua (#3)
* Add Lua conversion functions and corresponding tests
- Implemented ConvertTo-Lua and ConvertFrom-Lua functions for converting PowerShell objects to Lua table strings and vice versa.
- Added helper functions ConvertTo-LuaTable and Format-LuaKey for internal processing.
- Created comprehensive tests for both conversion functions, covering various data types including primitives, strings, arrays, and tables.
- Included test data files for validation of string and array conversions.
- Ensured proper handling of comments and special characters in Lua syntax.
* Add ConvertTo-Lua and ConvertFrom-Lua with tests and test data
* Bump PSModule/Process-PSModule/.github/workflows/workflow.yml (#1)
Bumps [PSModule/Process-PSModule/.github/workflows/workflow.yml](https://github.com/psmodule/process-psmodule) from 5.4.3 to 5.4.7.
- [Release notes](https://github.com/psmodule/process-psmodule/releases)
- [Commits](PSModule/Process-PSModule@60bdf8a...1111791)
---
updated-dependencies:
- dependency-name: PSModule/Process-PSModule/.github/workflows/workflow.yml
dependency-version: 5.4.7
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Refactor Lua conversion functions and add new parsing capabilities
- Improved string escaping in ConvertTo-LuaTable for better handling of special characters.
- Enhanced depth warning messages for better clarity.
- Simplified parameter passing in ConvertTo-LuaTable calls.
- Updated ConvertFrom-Lua to use array syntax for output.
- Refactored ConvertTo-Lua to improve readability and maintainability.
- Removed obsolete header and manifest files.
- Updated tests for better clarity and consistency.
- Added new Lua parsing functions: Read-LuaHexFloat, Read-LuaMultiLineString, Read-LuaNumber, Read-LuaString, Read-LuaTable, Read-LuaValue, and Skip-LuaWhitespace for comprehensive Lua support.
- Adjusted data files to conform to new structure and formatting.
* Fix negative value handling in Read-LuaHexFloat and Read-LuaNumber; improve formatting in Lua.Tests
* Improve formatting in complex deep structure round-trip tests
* Refactor Lua conversion functions and improve error handling; update examples for ConvertFrom-Lua
* Add support for parsing assignment statements in ConvertFrom-Lua; enhance tests for various assignment scenarios
* Format JSON files for improved readability in Assignments.json and WoWSavedVariables.json
* Enhance type handling in ConvertTo-LuaTable; improve parsing logic in Read-LuaTable and update output types in ConvertFrom-LuaTable
* Add .luacheckrc configuration to allow defined top for Lua test files
* Update .luacheckrc to ignore test data files and clarify their purpose
* Enhance error handling in Read-LuaString and Read-LuaTable; validate escape sequences and ensure table keys are not nil
* Address PR review feedback
* Fix string quotation for error message in Skip-LuaWhitespace function
* Address PR review feedback
* Address PR review feedback
* Address PR review feedback
* Address PR review feedback
* Address PR review feedback
- Assignment parser now accepts semicolons between statements (A = 1; B = 2)
- Assignment-detection lookahead uses Skip-LuaWhitespace to handle comments between identifier and '='
- Added tests for both scenarios
* Address PR review feedback: throw on unexpected end of input in Read-LuaValue
* Address PR review feedback: update help text for long-bracket support, optimize comment skipping
* Address PR review feedback: use strict null assertions for nil tests
* Bump PSModule/Process-PSModule/.github/workflows/workflow.yml (#4)
Bumps [PSModule/Process-PSModule/.github/workflows/workflow.yml](https://github.com/psmodule/process-psmodule) from 5.4.3 to 5.4.7.
- [Release notes](https://github.com/psmodule/process-psmodule/releases)
- [Commits](PSModule/Process-PSModule@60bdf8a...1111791)
---
updated-dependencies:
- dependency-name: PSModule/Process-PSModule/.github/workflows/workflow.yml
dependency-version: 5.4.7
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>1 parent 7d3b05e commit e070ac5
60 files changed
Lines changed: 3429 additions & 658 deletions
File tree
- .github
- linters
- workflows
- examples
- src
- assemblies
- classes
- private
- public
- data
- formats
- functions
- private
- public
- Lua
- PSModule
- SomethingElse
- init
- modules
- scripts
- types
- variables
- private
- public
- tests
- data
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
22 | 46 | | |
23 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
24 | 52 | | |
25 | | - | |
| 53 | + | |
26 | 54 | | |
27 | 55 | | |
28 | | - | |
29 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
30 | 59 | | |
31 | 60 | | |
32 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
33 | 68 | | |
34 | | - | |
| 69 | + | |
35 | 70 | | |
36 | 71 | | |
37 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
38 | 75 | | |
39 | 76 | | |
40 | 77 | | |
41 | 78 | | |
42 | 79 | | |
43 | 80 | | |
44 | | - | |
45 | | - | |
| 81 | + | |
| 82 | + | |
46 | 83 | | |
47 | 84 | | |
48 | 85 | | |
49 | | - | |
50 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
51 | 92 | | |
52 | 93 | | |
53 | 94 | | |
54 | 95 | | |
55 | 96 | | |
56 | | - | |
| 97 | + | |
57 | 98 | | |
58 | 99 | | |
59 | 100 | | |
60 | 101 | | |
61 | 102 | | |
62 | | - | |
| 103 | + | |
63 | 104 | | |
64 | 105 | | |
65 | 106 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
11 | 19 | | |
12 | | - | |
13 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
14 | 35 | | |
15 | | - | |
16 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
17 | 43 | | |
18 | | - | |
19 | | - | |
| |||
This file was deleted.
Binary file not shown.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments