bare-script 3.7.3 → 3.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -185,8 +185,11 @@ endfunction
185
185
 
186
186
  # $function: argsHelp
187
187
  # $group: args.bare
188
- # $doc: Output the [arguments model's](includeModel.html#var.vName='ArgsArguments') help
188
+ # $doc: Generate the [arguments model's](includeModel.html#var.vName='ArgsArguments') help content
189
+ # $doc:
190
+ # $doc: **NOTE:** Calling this function requires `include <dataTable.bare>`
189
191
  # $arg arguments: The [arguments model](includeModel.html#var.vName='ArgsArguments')
192
+ # $return: The array of help Markdown line strings
190
193
  function argsHelp(arguments):
191
194
  # Create the help data
192
195
  helpData = []
@@ -225,7 +228,7 @@ function argsHelp(arguments):
225
228
  if anyDescription:
226
229
  arrayPush(helpFields, 'Description')
227
230
  endif
228
- dataTable(helpData, {'fields': helpFields})
231
+ return dataTableMarkdown(helpData, {'fields': helpFields})
229
232
  endfunction
230
233
 
231
234
 
package/lib/model.js CHANGED
@@ -500,16 +500,9 @@ export function lintScript(script) {
500
500
 
501
501
  // Helper to format static analysis warnings
502
502
  function lintScriptWarning(warnings, script, statement, message) {
503
- let warning;
504
- if (script && statement) {
505
- const [statementKey] = Object.keys(statement);
506
- const scriptName = script.scriptName ?? '';
507
- const lineno = statement[statementKey].lineNumber ?? '';
508
- warning = (scriptName || lineno) ? `${scriptName}:${lineno}: ${message}` : message;
509
- } else {
510
- warning = message;
511
- }
512
- warnings.push(warning);
503
+ const scriptName = script.scriptName ?? '';
504
+ const lineno = (statement !== null ? (statement[Object.keys(statement)[0]].lineNumber ?? 1) : 1);
505
+ warnings.push(`${scriptName}:${lineno}: ${message}`);
513
506
  }
514
507
 
515
508
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "bare-script",
4
- "version": "3.7.3",
4
+ "version": "3.7.5",
5
5
  "description": "BareScript; a lightweight scripting and expression language",
6
6
  "keywords": [
7
7
  "expression",