cli-argv-util 1.2.6 → 1.3.0

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.
package/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022-2024 Individual contributors to cli-argv-util
3
+ Copyright (c) 2022-2025 Individual contributors to cli-argv-util
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -70,7 +70,7 @@ export type Result = {
70
70
  params: string[], //array of parameter values supplied by the user
71
71
  };
72
72
  ```
73
- See the **TypeScript Declarations** at the top of [cli-argv-util.ts](cli-argv-util.ts) for documentation.
73
+ See the **TypeScript Declarations** at the top of [cli-argv-util.ts](src/cli-argv-util.ts) for documentation.
74
74
 
75
75
  <br>
76
76
 
@@ -1,4 +1,4 @@
1
- //! cli-argv-util v1.2.6 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License
1
+ //! cli-argv-util v1.3.0 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License
2
2
 
3
3
  export type StringFlagMap = {
4
4
  [flag: string]: string | undefined;
@@ -18,8 +18,9 @@ declare const cliArgvUtil: {
18
18
  parse(validFlags: string[]): Result;
19
19
  run(packageJson: {
20
20
  [key: string]: unknown;
21
- }, posix: string): Buffer;
21
+ }, posix: string): Buffer<ArrayBufferLike>;
22
22
  readFolder(folder: string): string[];
23
+ cleanPath(name: string): string;
23
24
  unquoteArgs(args: string[]): string[];
24
25
  };
25
26
  export { cliArgvUtil };
@@ -1,7 +1,8 @@
1
- //! cli-argv-util v1.2.6 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License
1
+ //! cli-argv-util v1.3.0 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License
2
2
 
3
3
  import { execSync } from 'node:child_process';
4
4
  import fs from 'fs';
5
+ import path from 'path';
5
6
  import slash from 'slash';
6
7
  const cliArgvUtil = {
7
8
  parse(validFlags) {
@@ -33,6 +34,9 @@ const cliArgvUtil = {
33
34
  readFolder(folder) {
34
35
  return fs.readdirSync(folder, { recursive: true }).map(file => slash(String(file))).sort();
35
36
  },
37
+ cleanPath(name) {
38
+ return slash(path.normalize(name)).trim().replace(/\/$/, '');
39
+ },
36
40
  unquoteArgs(args) {
37
41
  const unquote = (builder, nextArg) => {
38
42
  const arg = nextArg.replace(/^'/, '').replace(/'$/, '');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-argv-util",
3
- "version": "1.2.6",
3
+ "version": "1.3.0",
4
4
  "description": "Simple utility to parse command line parameters and flags (arguments vector)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -55,17 +55,17 @@
55
55
  "slash": "~5.1"
56
56
  },
57
57
  "devDependencies": {
58
- "@eslint/js": "~9.9",
59
- "@types/node": "~22.3",
58
+ "@eslint/js": "~9.30",
59
+ "@types/node": "~24.0",
60
60
  "add-dist-header": "~1.4",
61
61
  "assert-deep-strict-equal": "~1.2",
62
62
  "copy-file-util": "~1.2",
63
- "eslint": "~9.9",
63
+ "eslint": "~9.30",
64
64
  "jshint": "~2.13",
65
- "mocha": "~10.7",
65
+ "mocha": "~11.7",
66
66
  "rimraf": "~6.0",
67
67
  "run-scripts-util": "~1.3",
68
- "typescript": "~5.5",
69
- "typescript-eslint": "~8.1"
68
+ "typescript": "~5.8",
69
+ "typescript-eslint": "~8.35"
70
70
  }
71
71
  }