-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from semantic-release/fix/ignore-file
Fixed ignore and exclude file naming and priority CLoses #165
- Loading branch information
Showing
5 changed files
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
import fs from 'fs-extra'; | ||
import path from 'node:path'; | ||
|
||
export function getFileArray(workDir: string, fileToRead: string): string[] { | ||
export function getFileArray( | ||
workDir: string, | ||
fileToRead: string, | ||
): null | string[] { | ||
try { | ||
const filesinFile = fs | ||
.readFileSync(path.resolve(path.join(workDir, fileToRead)), 'utf8') | ||
.split('\n') | ||
.filter((file) => file !== '') | ||
.map((file) => file.trim()); | ||
.readFileSync(path.resolve(path.join(workDir, fileToRead)), 'utf8') // Read the file from the workDir | ||
.split('\n') // Split the file into an array of lines | ||
.map((file) => file.trim()) // Trim each line | ||
.filter((file) => file !== '' && !file.startsWith('#')); // Remove empty lines and comments | ||
|
||
return [...new Set([...filesinFile])]; | ||
} catch (err) { | ||
return []; | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.