Skip to content

Commit b61cb82

Browse files
authored
Merge pull request #2474 from plotly/fix-2220
Fix some build errors not failing build.
2 parents 833f72d + e433f52 commit b61cb82

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

Diff for: components/dash-core-components/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"private::format.black": "black dash_core_components_base/ tests/ setup.py",
1616
"private::format.eslint": "eslint src --fix",
1717
"private::format.prettier": "prettier --config .prettierrc --write src/**/*.js",
18-
"private::lint.black": "if [[ ${PYVERSION:-python39} != python36 ]]; then black --check dash_core_components_base/ tests/ setup.py; fi",
18+
"private::lint.black": "node -e \"if ((process.env.PYVERSION || 'python39') !== 'python36'){process.exit(1)} \" || black --check dash_core_components_base/ tests/ setup.py",
1919
"private::lint.eslint": "eslint src",
2020
"private::lint.flake8": "flake8 --exclude=dash_core_components,node_modules,venv",
2121
"private::lint.prettier": "prettier --config .prettierrc src/**/*.js --list-different",

Diff for: components/dash-html-components/scripts/extract-elements.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ function extractElements($) {
6161

6262
request(refUrl, (error, response, html) => {
6363
if (error) {
64-
throw error;
64+
console.error(error);
65+
process.exit(-1);
6566
}
6667
const $ = cheerio.load(html);
6768
const elements = extractElements($);
@@ -79,11 +80,12 @@ request(refUrl, (error, response, html) => {
7980
catch(e) {
8081
console.log('no previous elements found');
8182
}
82-
throw new Error(
83+
console.error(
8384
'Unexpected number of elements extracted from ' + refUrl +
8485
' - Found ' + elements.length + ' but expected ' + expectedElCount +
8586
' Check the output and edit expectedElCount if this is intended.'
8687
);
88+
process.exit(-1);
8789
}
8890
const out = elements.join('\n');
8991

Diff for: components/dash-table/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"private::format.black": "black dash_table_base tests",
2424
"private::lint.ts": "eslint ./src ./tests",
2525
"private::lint.flake": "flake8 dash_table_base tests",
26-
"private::lint.black": "if [[ ${PYVERSION:-python39} != python36 ]]; then black --check dash_table_base tests; fi",
26+
"private::lint.black": "node -e \"if ((process.env.PYVERSION || 'python39') !== 'python36'){process.exit(1)} \" || black --check dash_table_base tests",
2727
"private::lint.prettier": "prettier --config .prettierrc \"{src,tests,demo}/**/*.{js,ts,tsx}\" --list-different",
2828
"private::test.python": "python -m unittest tests/unit/format_test.py",
2929
"private::test.unit": "karma start karma.conf.js --single-run",

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"private::build.components": "python dash/development/update_components.py 'all'",
1111
"private::cibuild.renderer": "cd dash/dash-renderer && renderer build",
1212
"private::build.renderer": "cd dash/dash-renderer && renderer build",
13-
"private::lint.black": "if [[ ${PYVERSION:-python39} != python36 ]]; then black dash tests --exclude metadata_test.py --check; fi",
13+
"private::lint.black": "node -e \"if ((process.env.PYVERSION || 'python39') !== 'python36'){process.exit(1)} \" || black dash tests --exclude metadata_test.py --check",
1414
"private::lint.flake8": "flake8 --exclude=metadata_test.py dash tests",
1515
"private::lint.pylint-dash": "PYLINTRC=${PYLINTRC:=.pylintrc39} && pylint dash setup.py --rcfile=$PYLINTRC",
1616
"private::lint.pylint-tests": "PYLINTRC=${PYLINTRC:=.pylintrc39} && pylint tests/unit tests/integration -d all --rcfile=$PYLINTRC",

0 commit comments

Comments
 (0)