Skip to content

Add publish test for avoiding function constructors in non-gl(2d|3d) partial bundles #5383

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

Merged
merged 5 commits into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
at: ~/
- run:
name: Build dist/
command: npm run build
command: npm run build && npm run no-new-func
- store_artifacts:
path: dist
destination: dist
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"watch": "node tasks/watch.js",
"lint": "eslint --version && eslint .",
"lint-fix": "eslint . --fix || true",
"no-new-func": "eslint --no-ignore --no-eslintrc --rule '{no-new-func: error}' dist/plotly-finance.js dist/plotly-basic.js dist/plotly-cartesian.js dist/plotly-geo.js dist/plotly-mapbox.js",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice simple command 🌟 I wonder though, is it possible to express this as a list of bundles to exclude - ie "test everything in dist/*js except *.min.js and plotly.js and plotly-gl3d.js and ..." that way over time we simply remove exclusions from the list, and any new bundle we create is automatically included?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in c611031.

"docker": "node tasks/docker.js",
"pretest": "node tasks/pretest.js",
"test-jasmine": "karma start test/jasmine/karma.conf.js",
Expand Down