Skip to content

Commit

Permalink
Merge pull request #5424 from plotly/guard-unexpected-chars-in-bundles
Browse files Browse the repository at this point in the history
Catch unexpected chars at build time
  • Loading branch information
archmoj authored Jan 20, 2021
2 parents 78140c9 + 81e6ef1 commit 5f51450
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,11 @@ jobs:
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json
- run:
name: Test bundles
name: Test certain bundles against function constructors
command: npm run no-new-func
- run:
name: Test plotly bundles againt unexpected characters
command: npm run no-bad-char

workflows:
version: 2
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"lint": "eslint --version && eslint .",
"lint-fix": "eslint . --fix || true",
"no-new-func": "eslint --no-ignore --no-eslintrc --no-inline-config --rule '{no-new-func: error}' $(find dist -type f -iname '*.js' | grep -v plotly-gl* | grep -v plotly-with-meta.* | grep -v plotly.js | grep -v plotly.min.js | grep -v MathJax.js)",
"no-bad-char": "eslint --no-ignore --no-eslintrc --no-inline-config --rule '{no-misleading-character-class: error}' $(find dist -type f -iname '*.js' | grep plotly)",
"docker": "node tasks/docker.js",
"pretest": "node tasks/pretest.js",
"test-jasmine": "karma start test/jasmine/karma.conf.js",
Expand All @@ -45,7 +46,7 @@
"start": "npm run start-test_dashboard",
"baseline": "node tasks/baseline.js",
"preversion": "check-node-version --node 12 --npm 6.14 && npm-link-check && npm ls --prod",
"version": "npm run build && git add -A dist src build",
"version": "npm run build && npm run no-bad-char && git add -A dist src build",
"postversion": "node -e \"console.log('Version bumped and committed. If ok, run: git push && git push --tags')\"",
"postpublish": "node tasks/sync_packages.js",
"postshrinkwrap": "chttps ."
Expand Down

0 comments on commit 5f51450

Please sign in to comment.