Skip to content

Commit

Permalink
fix: prefer the baseDataPath option from arguments (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored Jan 17, 2020
1 parent 94e517b commit e236859
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 63 deletions.
107 changes: 50 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@babel/cli": "^7.8.3",
"@babel/core": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"@commitlint/cli": "^8.3.4",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@types/json-schema": "^7.0.4",
"@webpack-contrib/defaults": "^6.3.0",
Expand All @@ -63,14 +63,14 @@
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-import": "^2.20.0",
"husky": "^4.0.6",
"husky": "^4.0.10",
"jest": "^24.9.0",
"jest-junit": "^10.0.0",
"lint-staged": "^9.5.0",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
"standard-version": "^7.0.1",
"typescript": "^3.7.4"
"typescript": "^3.7.5"
},
"keywords": [
"webpack"
Expand Down
2 changes: 1 addition & 1 deletion src/ValidationError.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ class ValidationError extends Error {
[, headerNameFromSchema] = splittedTitleFromSchema;
}

if (!configuration.name) {
if (!configuration.baseDataPath) {
[, , baseDataPathFromSchema] = splittedTitleFromSchema;
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/api.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ exports[`api should get configuration from schema 1`] = `
`;
exports[`api should prefer configuration over "title" #1 1`] = `
"Invalid configuration object. NAME has been initialised using a configuration object that does not match the API schema.
- configuration has an unknown property 'foo'. These properties are valid:
"Invalid options object. NAME has been initialised using an options object that does not match the API schema.
- options has an unknown property 'foo'. These properties are valid:
object { name? }"
`;
Expand Down

0 comments on commit e236859

Please sign in to comment.