Skip to content

Drop AMD support from bundle header #7229

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 3 commits into from
Oct 17, 2024
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
6 changes: 0 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,6 @@ jobs:
- run:
name: Test plot-schema.json diff - If failed, after (npm start) you could run (npm run schema && git add test/plot-schema.json && git commit -m "update plot-schema diff")
command: diff --unified --color dist/plot-schema.json test/plot-schema.json
- run:
name: Test plotly.min.js import using amdefine
command: npm run test-amdefine
- run:
name: Test plotly.min.js import using requirejs
command: npm run test-requirejs

test-stackgl-bundle:
docker:
Expand Down
1 change: 1 addition & 0 deletions draftlogs/7229_remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Drop AMD support from bundle header [[#7229](https://github.com/plotly/plotly.js/pull/7229)]
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
"test-export": "node test/image/export_test.js",
"test-syntax": "node tasks/test_syntax.js && npm run find-strings -- --no-output",
"test-bundle": "node tasks/test_bundle.js",
"test-amdefine": "node tasks/test_amdefine.js",
"test-requirejs": "node tasks/test_requirejs.js",
"test-plain-obj": "node tasks/test_plain_obj.mjs",
"test": "npm run test-jasmine -- --nowatch && npm run test-bundle && npm run test-image && npm run test-export && npm run test-syntax && npm run lint",
"b64": "python3 test/image/generate_b64_mocks.py && node devtools/test_dashboard/server.mjs",
Expand Down
28 changes: 0 additions & 28 deletions tasks/test_amdefine.js

This file was deleted.

26 changes: 0 additions & 26 deletions tasks/test_requirejs.js

This file was deleted.

8 changes: 2 additions & 6 deletions tasks/util/bundle_wrapper.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ function addWrapper(path){
[
'(',
' function(root, factory) {',
' if (typeof define === "function" && define.amd) {',
' define(factory);',
' } else if (typeof module === "object" && module.exports) {',
' if (typeof module === "object" && module.exports) {',
' module.exports = factory();',
' } else {',
' root.moduleName = factory();',
Expand All @@ -73,9 +71,7 @@ function addWrapper(path){
path,
[
'',
'if (!(typeof define === "function" && define.amd)) {',
' window.Plotly = Plotly;',
'}',
'window.Plotly = Plotly;',
'return Plotly;',
'}));',
].join('\n'),
Expand Down