Skip to content

Commit

Permalink
Merge pull request #1520 from nextstrain/victorlin/update-versions
Browse files Browse the repository at this point in the history
Upgrade webpack v4 → v5
  • Loading branch information
jameshadfield authored Dec 7, 2022
2 parents ad5a1b3 + 783e467 commit 1895c92
Show file tree
Hide file tree
Showing 8 changed files with 19,304 additions and 1,838 deletions.
28 changes: 28 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,34 @@ rules:
jsx-quotes: off
no-use-before-define: ["error", { "functions": false }]
no-return-await: off
# <<< These were enabled by extension and plugin upgrades in https://github.com/nextstrain/auspice/pull/1602. Disabling for now.
function-paren-newline: off
import/no-cycle: off
import/no-useless-path-segments: off
import/order: off
jsx-a11y/anchor-is-valid: off
jsx-a11y/click-events-have-key-events: off
lines-between-class-members: off
max-classes-per-file: off
no-compare-neg-zero: off
no-else-return: off
no-multiple-empty-lines: off
no-restricted-globals: off
no-unused-vars: off
prefer-object-spread: off
react/button-has-type: off
react/default-props-match-prop-types: off
react/jsx-closing-tag-location: off
react/jsx-curly-brace-presence: off
react/jsx-curly-newline: off
react/jsx-one-expression-per-line: off
react/jsx-props-no-spreading: off
react/jsx-wrap-multilines: off
react/no-access-state-in-setstate: off
react/no-deprecated: off
react/no-unused-state: off
react/static-property-placement: off
# >>>
parserOptions:
ecmaVersion: 6
sourceType: module
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = function babelConfig(api) {
"lodash"
];
if (api.env("development")) {
plugins.push("react-hot-loader/babel");
plugins.push(["react-hot-loader/babel", { safetyNet: false }]);
}
if (process.env.BABEL_INCLUDE_TIMING_FUNCTIONS === "false") {
plugins.push(["strip-function-call", {strip: ["timerStart", "timerEnd"]}]);
Expand Down
12 changes: 6 additions & 6 deletions bundlesize.config.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"files": [
{
"path": "./dist/auspice.bundle.*.js",
"maxSize": "2 kB"
"path": "./dist/auspice.main.bundle.*.js",
"maxSize": "3 kB"
},
{
"path": "./dist/auspice.chunk.+([0-9]).bundle.*.js",
"path": "./dist/auspice.?(chunk.)+([0-9]).bundle.*.js",
"maxSize": "100 kB"
},
{
"path": "./dist/auspice.chunk.core-vendors.bundle.*.js",
"path": "./dist/auspice.?(chunk.)core-vendors.bundle.*.js",
"maxSize": "220 kB"
},
{
"path": "./dist/auspice.chunk.other-vendors.bundle.*.js",
"path": "./dist/auspice.?(chunk.)other-vendors.bundle.*.js",
"maxSize": "150 kB"
},
{
"path": "./dist/auspice.chunk.locales.bundle.*.js",
"path": "./dist/auspice.?(chunk.)locales.bundle.*.js",
"maxSize": "100 kB"
}
]
Expand Down
2 changes: 1 addition & 1 deletion cli/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const getAuspiceBuild = () => {
cwd !== sourceDir &&
fs.existsSync(path.join(cwd, "index.html")) &&
fs.existsSync(path.join(cwd, "dist")) &&
fs.readdirSync(path.join(cwd, "dist")).filter((fn) => fn.match(/^auspice.bundle.[a-z0-9]+.js$/)).length === 1
fs.readdirSync(path.join(cwd, "dist")).filter((fn) => fn.match(/^auspice.main.bundle.[a-z0-9]+.js$/)).length === 1
) {
return {
message: "Serving the auspice build which exists in this directory.",
Expand Down
Loading

0 comments on commit 1895c92

Please sign in to comment.