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

Upgrades code-mirror, browsermob-proxy and mouse-trap #6940

Merged
merged 33 commits into from
Jun 29, 2019
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
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
7 changes: 4 additions & 3 deletions core/templates/dev/head/tests/form_builder_test_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ <h5><[form.name]></h5>

{% block footer_js %}
<script src="/third_party/static/ckeditor-4.9.2/ckeditor.js"></script>
<script src="/third_party/static/code-mirror-3.19.0/lib/codemirror.js"></script>
<script src="/third_party/static/code-mirror-3.19.0/mode/python/python.js"></script>
<script src="/third_party/static/ui-codemirror-0.1.2/src/ui-codemirror.js"></script>
<script src="/third_party/static/code-mirror-5.17.0/lib/codemirror.js"></script>
<script src="/third_party/static/code-mirror-5.17.0/mode/python/python.js"></script>
<script src="/third_party/static/ui-codemirror-0.3.0/src/ui-codemirror.js"></script>

NishealJ marked this conversation as resolved.
Show resolved Hide resolved
{{ super() }}
<script src="/templates/dev/head/components/forms/ConvertUnicodeWithParamsToHtmlFilter.js"></script>
<script src="/templates/dev/head/components/forms/ConvertHtmlToUnicodeFilter.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion core/tests/gae_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
os.path.join(
OPPIA_TOOLS_DIR, 'google_appengine_1.9.67', 'google_appengine',
'lib', 'webob_0_9'),
os.path.join(OPPIA_TOOLS_DIR, 'browsermob-proxy-0.7.1'),
os.path.join(OPPIA_TOOLS_DIR, 'browsermob-proxy-0.8.0'),
os.path.join(OPPIA_TOOLS_DIR, 'selenium-3.13.0'),
os.path.join(OPPIA_TOOLS_DIR, 'Pillow-6.0.0'),
CURR_DIR,
Expand Down
22 changes: 11 additions & 11 deletions extensions/dependencies/codemirror.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script src="/third_party/static/code-mirror-3.19.0/lib/codemirror.js"></script>
<script src="/third_party/static/code-mirror-3.19.0/mode/coffeescript/coffeescript.js"></script>
<script src="/third_party/static/code-mirror-3.19.0/mode/javascript/javascript.js"></script>
<script src="/third_party/static/code-mirror-3.19.0/mode/lua/lua.js"></script>
<script src="/third_party/static/code-mirror-3.19.0/mode/python/python.js"></script>
<script src="/third_party/static/code-mirror-3.19.0/mode/ruby/ruby.js"></script>
<script src="/third_party/static/code-mirror-3.19.0/mode/scheme/scheme.js"></script>
<script src="/third_party/static/code-mirror-3.19.0/mode/yaml/yaml.js"></script>
<script src="/third_party/static/ui-codemirror-0.1.2/src/ui-codemirror.js"></script>
<script src="/third_party/static/code-mirror-5.17.0/lib/codemirror.js"></script>
<script src="/third_party/static/code-mirror-5.17.0/mode/coffeescript/coffeescript.js"></script>
<script src="/third_party/static/code-mirror-5.17.0/mode/javascript/javascript.js"></script>
<script src="/third_party/static/code-mirror-5.17.0/mode/lua/lua.js"></script>
<script src="/third_party/static/code-mirror-5.17.0/mode/python/python.js"></script>
<script src="/third_party/static/code-mirror-5.17.0/mode/ruby/ruby.js"></script>
<script src="/third_party/static/code-mirror-5.17.0/mode/scheme/scheme.js"></script>
<script src="/third_party/static/code-mirror-5.17.0/mode/yaml/yaml.js"></script>
<script src="/third_party/static/ui-codemirror-0.3.0/src/ui-codemirror.js"></script>

<script src="/third_party/static/code-mirror-3.19.0/addon/merge/dep/diff_match_patch.js"></script>
<script src="/third_party/static/code-mirror-3.19.0/addon/merge/merge.js"></script>
<script src="/third_party/static/diff-match-patch-1.0.0/diff_match_patch.js"></script>
<script src="/third_party/static/code-mirror-5.17.0/addon/merge/merge.js"></script>
15 changes: 11 additions & 4 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@
}
},
"codemirror": {
"version": "3.19.0",
"version": "5.17.0",
"downloadFormat": "zip",
"url": "https://github.com/marijnh/CodeMirror/archive/3.19.0.zip",
"url": "https://github.com/codemirror/CodeMirror/archive/5.17.0.zip",
"rootDirPrefix": "CodeMirror-",
"targetDirPrefix": "code-mirror-",
"bundle": {
Expand All @@ -301,6 +301,13 @@
"js": ["d3.min.js"]
}
},
"diff-match-patch": {
NishealJ marked this conversation as resolved.
Show resolved Hide resolved
"version": "1.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

Optional: would it be better, for consistency, to download a file from https://github.com/google/diff-match-patch using the "commit hash" method?

Copy link
Member

@seanlip seanlip Jun 23, 2019

Choose a reason for hiding this comment

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

Oh hm, seems you did that last time. What went wrong when you did that? Seems like we do similar things already here:

"bowerMaterial": {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for the delay in response, the JS file in GitHub repository has the function through a variable which is not used by codemirror and i've used the same link to download the library which is used in the codemirror files with <script src.
Please take a look at the below picture
Screenshot 2019-06-25 at 3 10 45 PM

"downloadFormat": "files",
"url": "https://cdnjs.cloudflare.com/ajax/libs/diff_match_patch/20121119",
"targetDirPrefix": "diff-match-patch-",
"files": ["diff_match_patch.js"]
},
"fontAwesome": {
"version": "4.7.0",
"downloadFormat": "zip",
Expand Down Expand Up @@ -502,9 +509,9 @@
}
},
"uiCodemirror": {
"version": "0.1.2",
"version": "0.3.0",
"downloadFormat": "zip",
"url": "https://github.com/angular-ui/ui-codemirror/archive/src0.1.2.zip",
"url": "https://github.com/angular-ui/ui-codemirror/archive/src0.3.0.zip",
"rootDirPrefix": "ui-codemirror-src",
"targetDirPrefix": "ui-codemirror-"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@types/leaflet": "^1.4.0",
"@types/mathjax": "0.0.35",
"@types/mathjs": "^5.0.0",
"@types/mousetrap": "^1.6.1",
"@types/mousetrap": "^1.6.2",
"@types/node": "^10.14.6",
"@types/q": "^1.5.1",
"@types/select2": "^4.0.48",
Expand Down
4 changes: 2 additions & 2 deletions scripts/install_third_party.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ fi

# Python API for browsermob-proxy.
echo Checking if browsermob-proxy is installed in $TOOLS_DIR
if [ ! -d "$TOOLS_DIR/browsermob-proxy-0.7.1" ]; then
if [ ! -d "$TOOLS_DIR/browsermob-proxy-0.8.0" ]; then
echo Installing browsermob-proxy

pip_install browsermob-proxy==0.7.1 --target="$TOOLS_DIR/browsermob-proxy-0.7.1"
pip_install browsermob-proxy==0.8.0 --target="$TOOLS_DIR/browsermob-proxy-0.8.0"
fi

echo Checking if selenium is installed in $TOOLS_DIR
Expand Down