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

Update jquery #2007

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions Guide/deployment.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ The files that are bundled together to get our `prod.css` and `prod.js` are conf
CSS_FILES += ${IHP}/static/vendor/bootstrap.min.css
CSS_FILES += ${IHP}/static/vendor/flatpickr.min.css

JS_FILES += ${IHP}/static/vendor/jquery-3.6.0.slim.min.js
JS_FILES += ${IHP}/static/vendor/jquery-3.7.1.slim.min.js
JS_FILES += ${IHP}/static/vendor/timeago.js
JS_FILES += ${IHP}/static/vendor/popper-2.11.6.min.js
JS_FILES += ${IHP}/static/vendor/bootstrap.min.js
Expand Down Expand Up @@ -655,7 +655,7 @@ scripts :: Html
scripts = do
when isDevelopment [hsx|
<script id="livereload-script" src="/livereload.js"></script>
<script src="/vendor/jquery-3.6.0.slim.min.js"></script>
<script src="/vendor/jquery-3.7.1.slim.min.js"></script>
<script src="/vendor/timeago.js"></script>
<script src="/vendor/popper-2.11.6.min.js"></script>
<script src="/vendor/bootstrap.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -942,9 +942,9 @@ Now you can start your project as usual with `./start`.

## Updating jQuery

The jQuery version used by IHP has changed. We're switching from `3.2.1` to `3.6.0`. jQuery `3.2.1` has some known security vulnerabilities, so it's recommended that you follow these update steps.
Copy link
Member

Choose a reason for hiding this comment

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

This refers to an older version of IHP. Ideally you could add a new entry for the next IHP release and add a note on the jquery upgrade

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, sorry, this line confused me, will fix it 🙂

The jQuery version used by IHP has changed. We're switching from `3.2.1` to `3.7.1`. jQuery `3.2.1` has some known security vulnerabilities, so it's recommended that you follow these update steps.

To update your application looks search for the string `/vendor/jquery-3.2.1.slim.min.js` in your code base and replace it with `/vendor/jquery-3.6.0.slim.min.js`. Likely the only mention is inside the `Web/View/Layout.hs`.
To update your application looks search for the string `/vendor/jquery-3.2.1.slim.min.js` in your code base and replace it with `/vendor/jquery-3.7.1.slim.min.js`. Likely the only mention is inside the `Web/View/Layout.hs`.

# Upgrade to Beta 0.11.0 from Beta 0.10.0

Expand Down
2 changes: 1 addition & 1 deletion ihp-ide/IHP/IDE/CodeGen/ApplicationGenerator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ generateGenericApplication applicationName =
<> "scripts :: Html\n"
<> "scripts = [hsx|\n"
<> " {when isDevelopment devScripts}\n"
<> " <script src={assetPath \"/vendor/jquery-3.6.0.slim.min.js\"}></script>\n"
<> " <script src={assetPath \"/vendor/jquery-3.7.1.slim.min.js\"}></script>\n"
<> " <script src={assetPath \"/vendor/timeago.js\"}></script>\n"
<> " <script src={assetPath \"/vendor/popper-2.11.6.min.js\"}></script>\n"
<> " <script src={assetPath \"/vendor/bootstrap-5.2.1/bootstrap.min.js\"}></script>\n"
Expand Down
2 changes: 1 addition & 1 deletion ihp-ide/IHP/IDE/ToolServer/Layout.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ toolServerLayout inner = [hsx|
<link rel="stylesheet" href={assetPath "/vendor/select2.min.css"}/>

<script src={assetPath "/vendor/morphdom-umd.min.js"}></script>
<script src={assetPath "/vendor/jquery-3.6.0.min.js"}></script>
<script src={assetPath "/vendor/jquery-3.7.1.min.js"}></script>
<script src={assetPath "/vendor/timeago.js"}></script>
<script src={assetPath "/vendor/popper.min.js"}></script>
<script src={assetPath "/vendor/bootstrap.min.js"}></script>
Expand Down
2 changes: 0 additions & 2 deletions lib/IHP/static/vendor/jquery-3.5.0.min.js
Copy link
Member

Choose a reason for hiding this comment

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

Deleting the old JS files will break existing IHP apps, so for now we sadly need to keep them :/

This file was deleted.

2 changes: 0 additions & 2 deletions lib/IHP/static/vendor/jquery-3.6.0.min.js

This file was deleted.

2 changes: 0 additions & 2 deletions lib/IHP/static/vendor/jquery-3.6.0.slim.min.js

This file was deleted.

2 changes: 2 additions & 0 deletions lib/IHP/static/vendor/jquery-3.7.1.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/IHP/static/vendor/jquery-3.7.1.slim.min.js

Large diffs are not rendered by default.