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 npm deps #2251

Merged
merged 2 commits into from
Nov 29, 2021
Merged
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 plugins/base/frontend/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id("com.github.node-gradle.node") version "3.1.0"
id("com.github.node-gradle.node") version "3.1.1"
}

node {
version.set("12.18.2")
version.set("16.13.0")
download.set(true)
}

Expand Down
29,907 changes: 16,329 additions & 13,578 deletions plugins/base/frontend/package-lock.json

Large diffs are not rendered by default.

62 changes: 30 additions & 32 deletions plugins/base/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": "./dist"
},
"scripts": {
"build": "webpack --mode=production --devtool sourcemap",
"build": "webpack --mode=production --devtool source-map",
"lint": "eslint . && npm run stylelint",
"stylelint": "stylelint --ignore-path .gitignore ./src/main/**/*.scss",
"start": "webpack-dev-server -d --history-api-fallback --inline --hot --colors --port 9010"
Expand All @@ -23,41 +23,39 @@
]
},
"dependencies": {
"@babel/core": "^7.8.3",
"@jetbrains/babel-preset-jetbrains": "^2.1.4",
"@jetbrains/logos": "1.1.5",
"@jetbrains/ring-ui": "3.0.47",
"@types/node": "^12.12.36",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"@types/react-scrollspy": "^3.3.3",
"babel-loader": "^8.0.6",
"lodash": "^4.17.19",
"postcss-import": "^12.0.1",
"postcss-preset-env": "^6.7.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scrollspy": "^3.4.3",
"redbox-react": "^1.6.0",
"ts-loader": "^7.0.0",
"typescript": "^3.8.3",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.10.1"
"@babel/core": "^7.16.0",
"@jetbrains/babel-preset-jetbrains": "^2.3.1",
"@jetbrains/logos": "1.4.27",
"@jetbrains/ring-ui": "^4.1.3",
"@types/node": "^16.11.10",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"babel-loader": "^8.2.3",
"lodash": "^4.17.21",
"postcss-import": "^14.0.2",
"postcss-preset-env": "^7.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"ts-loader": "^9.2.6",
"typescript": "^4.5.2",
"webpack": "^5.64.4",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.6.0"
},
"devDependencies": {
"@jetbrains/stylelint-config": "^2.0.0",
"@types/lodash": "^4.14.158",
"babel-eslint": "^10.0.3",
"eslint": "^6.8.0",
"mini-css-extract-plugin": "^0.11.0",
"@babel/eslint-parser": "^7.16.3",
"@jetbrains/stylelint-config": "^3.0.2",
"@types/lodash": "^4.14.177",
"eslint": "^8.3.0",
"mini-css-extract-plugin": "^2.4.5",
"react-svg-loader": "^3.0.3",
"sass": "^1.26.3",
"sass-loader": "^10.0.5",
"stylelint": "^13.3.2",
"yo": "^3.1.1"
"sass": "^1.43.5",
"sass-loader": "^12.3.0",
"stylelint": "^14.1.0",
"svg-inline-loader": "^0.8.2",
"terser-webpack-plugin": "^5.2.5"
},
"engines": {
"node": ">=8.0.0"
"node": ">=16.0.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Select} from "@jetbrains/ring-ui";
import Select from '@jetbrains/ring-ui/components/select/select';
import {Option, OptionWithHighlightComponent, OptionWithSearchResult} from "./types";
import fuzzyHighlight from '@jetbrains/ring-ui/components/global/fuzzy-highlight.js'
import React from "react";
Expand Down
5 changes: 3 additions & 2 deletions plugins/base/frontend/src/main/components/search/search.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useCallback, useEffect, useState } from 'react';
import { Select, List } from '@jetbrains/ring-ui';
import '@jetbrains/ring-ui/components/input-size/input-size.scss';
import List from '@jetbrains/ring-ui/components/list/list';
import Select from '@jetbrains/ring-ui/components/select/select';
import '@jetbrains/ring-ui/components/input-size/input-size.css';
import './search.scss';
import { IWindow, Option, Props } from "./types";
import { DokkaSearchAnchor } from "./dokkaSearchAnchor";
Expand Down
21 changes: 14 additions & 7 deletions plugins/base/frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@ const {join, resolve} = require('path');

const ringUiWebpackConfig = require('@jetbrains/ring-ui/webpack.config');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require("terser-webpack-plugin");

const pkgConfig = require('./package.json').config;

const componentsPath = join(__dirname, pkgConfig.components);

// Patch @jetbrains/ring-ui svg-sprite-loader config
ringUiWebpackConfig.loaders.svgInlineLoader.include.push(
require('@jetbrains/logos'),
require('@jetbrains/icons')
);

const webpackConfig = () => ({
entry: `${componentsPath}/root.tsx`,
resolve: {
Expand Down Expand Up @@ -53,6 +48,12 @@ const webpackConfig = () => ({
}
}
]
},
{
test: /\.svg$/,
loader: require.resolve('svg-inline-loader'),
options: {removeSVGTagAttrs: false},
include: [require('@jetbrains/icons')]
}
]
},
Expand All @@ -64,9 +65,15 @@ const webpackConfig = () => ({
chunkFilename: '[id].css',
}),
],
optimization: {
minimize: true,
minimizer: [new TerserPlugin({
extractComments: false,
})],
},
output: {
path: __dirname + '/dist/'
}
});

module.exports = webpackConfig;
module.exports = webpackConfig;
8 changes: 4 additions & 4 deletions plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,10 @@ open class HtmlRenderer(
type = ScriptType.textJavaScript,
src = "###$it"
) {
async = true
if (it == "scripts/main.js")
defer = true
else
async = true
}
}
it.isImage() -> if (it.isAbsolute) link(href = it)
Expand Down Expand Up @@ -832,9 +835,6 @@ open class HtmlRenderer(
}
div {
id = "main"
templateCommand(PathToRootSubstitutionCommand("###", default = pathToRoot)) {
script(type = ScriptType.textJavaScript, src = "###scripts/main.js") {}
}
content()
div(classes = "footer") {
span("go-to-top-icon") {
Expand Down