babel-plugin-tester
Advanced tools
Comparing version 11.0.2 to 11.0.3
@@ -13,10 +13,10 @@ "use strict"; | ||
const configDirectoryCache = Object.create(null); | ||
const getCachedConfig = directory => { | ||
if (!(directory in configDirectoryCache)) { | ||
debug(`caching prettier configuration resolved from ${directory}: %O`, configDirectoryCache[directory]); | ||
configDirectoryCache[directory] = _prettier.resolveConfig.sync(directory); | ||
const getCachedConfig = filepath => { | ||
if (!(filepath in configDirectoryCache)) { | ||
configDirectoryCache[filepath] = _prettier.resolveConfig.sync(filepath); | ||
debug(`caching prettier configuration resolved from ${filepath}: %O`, configDirectoryCache[filepath]); | ||
} else { | ||
debug(`using cached prettier configuration resolved from ${directory}`); | ||
debug(`using cached prettier configuration resolved from ${filepath}`); | ||
} | ||
return configDirectoryCache[directory]; | ||
return configDirectoryCache[filepath]; | ||
}; | ||
@@ -28,3 +28,3 @@ const prettierFormatter = (code, { | ||
config, | ||
prettierOptions = config || getCachedConfig(cwd) | ||
prettierOptions = config || getCachedConfig(filepath) | ||
} = {}) => { | ||
@@ -31,0 +31,0 @@ const finalPrettierOptions = { |
{ | ||
"name": "babel-plugin-tester", | ||
"version": "11.0.2", | ||
"version": "11.0.3", | ||
"description": "Utilities for testing babel plugins", | ||
@@ -97,5 +97,6 @@ "keywords": [ | ||
"all-contributors-cli": "^6.24.0", | ||
"babel-jest": "^29.3.1", | ||
"babel-jest": "^29.4.0", | ||
"babel-loader": "^9.1.2", | ||
"babel-plugin-explicit-exports-references": "^1.0.2", | ||
"browserslist": "^4.21.4", | ||
"conventional-changelog-cli": "https://xunn.at/conventional-changelog-cli", | ||
@@ -112,4 +113,4 @@ "doctoc": "^2.2.1", | ||
"husky": "^8.0.3", | ||
"jest": "^29.3.1", | ||
"jest-circus": "^29.3.1", | ||
"jest": "^29.4.0", | ||
"jest-circus": "^29.4.0", | ||
"jest-extended": "^3.2.3", | ||
@@ -116,0 +117,0 @@ "lint-staged": "^13.1.0", |
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
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
192026
92