@sa11y/common
Advanced tools
Comparing version 6.3.1 to 6.3.2
export declare function log(...args: unknown[]): void; | ||
export declare function useFilesToBeExempted(): string[]; | ||
export declare function useCustomRules(): Promise<string[]>; | ||
export declare function useCustomRules(): string[]; | ||
//# sourceMappingURL=helpers.d.ts.map |
@@ -37,3 +37,3 @@ "use strict"; | ||
*/ | ||
const fs = __importStar(require("fs/promises")); | ||
const fs = __importStar(require("fs")); | ||
function log(...args) { | ||
@@ -63,3 +63,3 @@ // Probably not worth it to mock and test console logging for this helper util | ||
exports.useFilesToBeExempted = useFilesToBeExempted; | ||
async function useCustomRules() { | ||
function useCustomRules() { | ||
const filePath = process.env.SA11Y_CUSTOM_RULES ?? ''; | ||
@@ -69,3 +69,3 @@ if (filePath !== '') { | ||
// Read the file asynchronously | ||
const data = await fs.readFile(filePath, 'utf-8'); | ||
const data = fs.readFileSync(filePath, 'utf-8'); | ||
const { rules } = JSON.parse(data); | ||
@@ -72,0 +72,0 @@ // Access the rules array |
{ | ||
"name": "@sa11y/common", | ||
"version": "6.3.1", | ||
"version": "6.3.2", | ||
"description": "Common utilities, constants, error messages for @sa11y", | ||
@@ -30,3 +30,3 @@ "license": "BSD-3-Clause", | ||
}, | ||
"gitHead": "73d09cc81395587a1a8f705cf9720774fe44913e" | ||
"gitHead": "53758a577c22a68d92f4b7da19d03fe59be41769" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
15409