Skip to content

Commit 5f51450

Browse files
authored
Merge pull request #5424 from plotly/guard-unexpected-chars-in-bundles
Catch unexpected chars at build time
2 parents 78140c9 + 81e6ef1 commit 5f51450

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: .circleci/config.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,11 @@ jobs:
167167
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js
168168
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json
169169
- run:
170-
name: Test bundles
170+
name: Test certain bundles against function constructors
171171
command: npm run no-new-func
172+
- run:
173+
name: Test plotly bundles againt unexpected characters
174+
command: npm run no-bad-char
172175

173176
workflows:
174177
version: 2

Diff for: package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"lint": "eslint --version && eslint .",
3333
"lint-fix": "eslint . --fix || true",
3434
"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)",
35+
"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)",
3536
"docker": "node tasks/docker.js",
3637
"pretest": "node tasks/pretest.js",
3738
"test-jasmine": "karma start test/jasmine/karma.conf.js",
@@ -45,7 +46,7 @@
4546
"start": "npm run start-test_dashboard",
4647
"baseline": "node tasks/baseline.js",
4748
"preversion": "check-node-version --node 12 --npm 6.14 && npm-link-check && npm ls --prod",
48-
"version": "npm run build && git add -A dist src build",
49+
"version": "npm run build && npm run no-bad-char && git add -A dist src build",
4950
"postversion": "node -e \"console.log('Version bumped and committed. If ok, run: git push && git push --tags')\"",
5051
"postpublish": "node tasks/sync_packages.js",
5152
"postshrinkwrap": "chttps ."

0 commit comments

Comments
 (0)