elrh-cosca 0.3.4 → 0.3.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.
@@ -1,9 +1,10 @@
1
1
  /**
2
- * Checks if a text file contains specified row.
2
+ * Checks if a text file contains specified text.
3
3
  *
4
4
  * @param {string} targetFile - The path to the text file to be checked (relative to CWD).
5
- * @param {string} row - The text row to be checked for existence.
6
- * @returns {boolean} True if the row exists in target file, false otherwise. Row must be matched completely, but surrounding whitespaces are ignored.
5
+ * @param {string | RegExp} pattern - The text or regular expression pattern to search for.
6
+ * @param {boolean} exact - If true, requires exact line match (default: false for partial matching).
7
+ * @returns {boolean} True if the pattern is found in target file, false otherwise.
7
8
  * @throws Will throw an error if the path is invalid or the file does not exist.
8
9
  */
9
- export declare function hasText(targetFile: string, row: string): boolean;
10
+ export declare function hasText(targetFile: string, pattern: string | RegExp, exact?: boolean): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elrh-cosca",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -18,12 +18,12 @@
18
18
  "module": "./dist/elrh-cosca.mjs",
19
19
  "types": "./dist/types/index.d.ts",
20
20
  "devDependencies": {
21
- "@types/node": "^24.6.0",
22
- "magicast": "^0.3.5",
21
+ "@types/node": "^24.9.0",
22
+ "magicast": "^0.5.0",
23
23
  "typescript": "^5.9.3",
24
- "vite": "^7.1.8",
24
+ "vite": "^7.1.12",
25
25
  "vite-plugin-dts": "^4.5.4",
26
- "vitest": "^3.2.4"
26
+ "vitest": "^4.0.4"
27
27
  },
28
28
  "scripts": {
29
29
  "dev": "vite",