Skip to content

Commit

Permalink
Drop IE11 support and remove unmaintained depends
Browse files Browse the repository at this point in the history
Aside from letting us drop the legacy build it also
let's us drop the jquery-deparam dependency replacing
with built-in urlSearchParams
  • Loading branch information
BryanQuigley committed Sep 14, 2023
1 parent 1758cab commit 2470abb
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 101 deletions.
3 changes: 1 addition & 2 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!-- general behavior -->
<script type="module" src="{{ site.baseurl }}/scripts/dist/modern/index.js"></script>
<script nomodule src="{{ site.baseurl }}/scripts/dist/legacy/index.js"></script>
<script type="module" src="{{ site.baseurl }}/scripts/dist/index.js"></script>

<footer></footer>
11 changes: 0 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
"engines": {
"browsers": "defaults"
}
},
"legacy": {
"engines": {
"browsers": "ie 11"
}
}
},
"license": "MIT",
Expand All @@ -31,7 +26,6 @@
"dependencies": {
"bootstrap": "^5.0.2",
"jquery": "^3.4.1",
"jquery-deparam": "^0.5.3",
"lodash": "^4.17.11"
}
}
53 changes: 26 additions & 27 deletions scripts/dist/modern/index.js → scripts/dist/index.js

Large diffs are not rendered by default.

53 changes: 0 additions & 53 deletions scripts/dist/legacy/index.js

This file was deleted.

7 changes: 5 additions & 2 deletions scripts/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* global settings */
import 'core-js/actual'
import $ from 'jquery'
import 'jquery-deparam'
import 'bootstrap/js/dist/collapse'

import DatasetsList from './components/datasets-list'
Expand All @@ -10,7 +9,11 @@ import OrganizationsFilter from './components/organizations-filter'
import DatasetDisplay from './components/dataset-display'
import {queryByComponent} from './util'

const params = $.deparam(window.location.search.substr(1))
const urlSearchParams = new URLSearchParams(window.location.search)
const params = {}
urlSearchParams.forEach((value, key) => {
params[key] = value
})

// Helper function to ensure datasets.json is only fetched once per page
let datasetsCache
Expand Down

0 comments on commit 2470abb

Please sign in to comment.