Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch unexpected chars at build time #5424

Merged
merged 1 commit into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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