dependencies: Upgrade JavaScript dependencies.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-07-17 18:14:20 -07:00 committed by Tim Abbott
parent b5f7008728
commit aa16208fd8
6 changed files with 1129 additions and 1621 deletions

View File

@ -27,7 +27,7 @@
"emoji-datasource-google-blob": "npm:emoji-datasource-google@^3.0.0",
"emoji-datasource-twitter": "^5.0.1",
"error-stack-parser": "^2.0.2",
"expose-loader": "^0.7.5",
"expose-loader": "^1.0.0",
"file-loader": "^6.0.0",
"flatpickr": "^4.5.7",
"font-awesome": "^4.7.0",
@ -40,11 +40,11 @@
"jquery-caret-plugin": "^1.5.2",
"jquery-validation": "^1.19.0",
"js-yaml": "^3.13.1",
"katex": "^0.11.1",
"katex": "^0.12.0",
"mini-css-extract-plugin": "^0.9.0",
"moment": "^2.24.0",
"moment-timezone": "^0.5.25",
"openapi-examples-validator": "^3.0.2",
"openapi-examples-validator": "^4.0.0",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"plotly.js": "^1.48.1",
"postcss-calc": "^7.0.1",
@ -77,7 +77,7 @@
"zxcvbn": "^4.4.2"
},
"devDependencies": {
"@types/html-minifier": "^3.5.3",
"@types/clean-css": "^4.2.2",
"@types/jquery": "^3.3.31",
"@types/mini-css-extract-plugin": "^0.9.0",
"@types/node": "^14.0.11",
@ -98,11 +98,11 @@
"nyc": "^15.0.0",
"phantomjs-prebuilt": "^2.1.16",
"prettier": "^2.0.5",
"puppeteer": "^3.0.0",
"puppeteer": "^5.2.0",
"source-map": "^0.6.1",
"stylelint": "^13.0.0",
"svgo": "^1.2.2",
"swagger-parser": "^9.0.1",
"swagger-parser": "^10.0.0",
"typescript": "^3.5.1",
"vnu-jar": "^20.1.2",
"webpack-dev-server": "^3.5.1",

View File

@ -25,32 +25,19 @@ interface ExportLoaderOptions {
path: string;
name?: string | string[];
}
function getExposeLoaders(optionsArr: ExportLoaderOptions[]): RuleSetRule[] {
const exposeLoaders = [];
for (const loaderEntry of optionsArr) {
const path = loaderEntry.path;
let name = "";
const useArr = [cacheLoader];
// If no name is provided, infer it
if (!loaderEntry.name) {
name = basename(path, ".js");
useArr.push({loader: "expose-loader", options: name});
} else {
// If name is an array
if (Array.isArray(loaderEntry.name)) {
for (const exposeName of loaderEntry.name) {
useArr.push({loader: "expose-loader", options: exposeName});
}
// If name is a string
} else {
useArr.push({loader: "expose-loader", options: loaderEntry.name});
}
}
exposeLoaders.push({
test: require.resolve(path),
use: useArr,
});
}
return exposeLoaders;
export function getExposeLoaders(optionsArr: ExportLoaderOptions[]): RuleSetRule[] {
return optionsArr.map(({path, name}) => ({
test: require.resolve(path),
use: [
cacheLoader,
{
loader: "expose-loader",
options: {
// If no name is provided, infer it
exposes: name ?? basename(path, ".js"),
},
},
],
}));
}
export {getExposeLoaders};

View File

@ -247,8 +247,6 @@ export default (env?: string): webpack.Configuration[] => {
{path: "xdate/src/xdate.js", name: "XDate"},
{path: "../static/third/marked/lib/marked.js"},
{path: "../static/js/debug.js"},
{path: "../static/js/blueslip.js"},
{path: "../static/js/common.js"},
{path: "jquery/dist/jquery.js", name: ["$", "jQuery"]},
{path: "underscore/underscore.js", name: "_"},
{path: "handlebars/dist/cjs/handlebars.runtime.js", name: "Handlebars"},

View File

@ -44,4 +44,4 @@ API_FEATURE_LEVEL = 27
# historical commits sharing the same major version, in which case a
# minor version bump suffices.
PROVISION_VERSION = '89.5'
PROVISION_VERSION = '90.0'

2673
yarn.lock

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long