@ember-template-lint/todo-utils
Advanced tools
Comparing version 8.0.0-beta.2 to 8.0.0-beta.3
@@ -0,1 +1,13 @@ | ||
## v8.0.0-beta.3 (2021-02-04) | ||
#### :rocket: Enhancement | ||
* [#88](https://github.com/ember-template-lint/ember-template-lint-todo-utils/pull/88) Returning defaults for todoConfig when none exist ([@scalvert](https://github.com/scalvert)) | ||
#### :house: Internal | ||
* [#90](https://github.com/ember-template-lint/ember-template-lint-todo-utils/pull/90) Adding test to ensure engine scoped removal works using shouldRemove ([@scalvert](https://github.com/scalvert)) | ||
#### Committers: 1 | ||
- Steve Calvert ([@scalvert](https://github.com/scalvert)) | ||
## v8.0.0-beta.2 (2021-02-02) | ||
@@ -2,0 +14,0 @@ |
@@ -39,3 +39,11 @@ "use strict"; | ||
const daysToDecayEnvVars = getFromEnvVars(); | ||
const mergedConfig = Object.assign({}, daysToDecayPackageConfig, daysToDecayEnvVars, todoConfig); | ||
let mergedConfig = Object.assign({}, daysToDecayPackageConfig, daysToDecayEnvVars, todoConfig); | ||
// we set a default config if the mergedConfig is an empty object, meaning either or both warn and error aren't | ||
// defined and the package.json doesn't explicitly define an empty config (they're opting out of defining a todoConfig) | ||
if (Object.keys(mergedConfig).length === 0 && typeof daysToDecayPackageConfig === 'undefined') { | ||
mergedConfig = { | ||
warn: 30, | ||
error: 60, | ||
}; | ||
} | ||
if (typeof mergedConfig.warn === 'number' && | ||
@@ -100,3 +108,3 @@ typeof mergedConfig.error === 'number' && | ||
catch (_b) { } | ||
return ((_a = pkg === null || pkg === void 0 ? void 0 : pkg.lintTodo) === null || _a === void 0 ? void 0 : _a.daysToDecay) || {}; | ||
return (_a = pkg === null || pkg === void 0 ? void 0 : pkg.lintTodo) === null || _a === void 0 ? void 0 : _a.daysToDecay; | ||
} | ||
@@ -103,0 +111,0 @@ function getFromEnvVars() { |
{ | ||
"name": "@ember-template-lint/todo-utils", | ||
"version": "8.0.0-beta.2", | ||
"version": "8.0.0-beta.3", | ||
"repository": "https://github.com/ember-template-lint/ember-template-lint-todo-utils.git", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
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
106351
1031