Skip to content

Commit d5aca97

Browse files
authored
Merge pull request #765 from integer32llc/dep-updates
UI dependency maintenance
2 parents 2a04e17 + 306fdf2 commit d5aca97

14 files changed

+1938
-2257
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ jobs:
221221
- name: Configure node
222222
uses: actions/setup-node@v1
223223
with:
224-
node-version: 14.15
224+
node-version: 14.18
225225
- name: Install dependencies
226226
run: yarn --cwd ui/frontend/
227227
- name: Run tests

ci/workflows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ workflows:
334334
- name: "Configure node"
335335
uses: actions/setup-node@v1
336336
with:
337-
node-version: 14.15
337+
node-version: 14.18
338338

339339
- name: "Install dependencies"
340340
run: >-

ui/frontend/.stylelintrc.json

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
"stylelint-config-prettier"
77
],
88
"rules": {
9+
"selector-class-pattern": [
10+
"^[a-z-][a-zA-Z0-9]+$", {
11+
"message": "Expected class selector to be lowerCamelCase"
12+
}],
913
"value-keyword-case": ["lower", {
1014
"ignoreProperties": [
1115
"composes"

ui/frontend/ConfigElement.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
}
4949

5050
&:hover {
51-
background: hsla(208, 100%, 43%, 0.1);
51+
background: hsl(208deg 100% 43% / 10%);
5252
}
5353
}
5454

ui/frontend/HelpExample.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
top: 0;
88
right: 0;
99
border: none;
10-
background: rgba(255, 255, 255, 0.8);
10+
background: rgb(255 255 255 / 80%);
1111
border-bottom-left-radius: 0.5em;
1212
cursor: pointer;
1313
opacity: 0;

ui/frontend/MenuAside.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.aside {
2-
margin: 0.25em 0 0 0;
2+
margin: 0.25em 0 0;
33
color: #888;
44
}

ui/frontend/MenuGroup.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.container {
22
width: 27em;
3-
padding: 0.75em 1em 0 1em;
3+
padding: 0.75em 1em 0;
44
line-height: normal;
55

66
&:last-child {

ui/frontend/PopButton.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ $vertical-border-color: #cacaca;
3535
margin: $arrow-size;
3636
background: $bg-color;
3737
border-radius: var(--header-border-radius);
38-
box-shadow: 0 1px 4px -2px rgba(0, 0, 0, 0.6), inset 0 1px 0 white;
38+
box-shadow: 0 1px 4px -2px rgb(0 0 0 / 60%), inset 0 1px 0 white;
3939
color: $fg-color;
4040
}

ui/frontend/SegmentedButton.module.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ $bg-dark: #f9f9f9;
55
display: flex;
66
align-items: center;
77
border-radius: var(--header-border-radius);
8-
box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.4), inset 0 1px 0 white;
8+
box-shadow: 0 2px 4px -2px rgb(0 0 0 / 40%), inset 0 1px 0 white;
99
}
1010

1111
.button {
@@ -42,13 +42,13 @@ $bg-dark: #f9f9f9;
4242
border-top-color: #bababa;
4343
border-bottom-color: #d6d6d6;
4444
background: linear-gradient($bg-dark, #ededed);
45-
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
45+
box-shadow: inset 0 1px 1px rgb(0 0 0 / 20%);
4646
}
4747
}
4848

4949
.buttonBuild {
5050
composes: button;
51-
border-color: hsl(15, 66.7%, 32%);
51+
border-color: hsl(15deg 66.7% 32%);
5252
background: var(--rust);
5353
color: white;
5454

ui/frontend/index.module.css

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ body {
3636
font-family: var(--primary-font);
3737
}
3838

39+
/* stylelint-disable-next-line selector-class-pattern */
3940
:global(.language-rust_errors) {
4041
& :global(.warning) {
4142
color: #f79a06;

ui/frontend/package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@
4141
"@types/react": "^17.0.2",
4242
"@types/react-dom": "^17.0.1",
4343
"@types/react-redux": "^7.1.2",
44-
"@typescript-eslint/eslint-plugin": "^4.16.1",
45-
"@typescript-eslint/parser": "^4.16.1",
44+
"@typescript-eslint/eslint-plugin": "^5.9.0",
45+
"@typescript-eslint/parser": "^5.9.0",
4646
"autoprefixer": "^10.2.4",
4747
"babel-loader": "^8.0.0",
4848
"babel-plugin-lodash": "^3.3.4",
4949
"basename": "^0.1.2",
5050
"compression-webpack-plugin": "^9.0.0",
51-
"copy-webpack-plugin": "^9.0.0",
51+
"copy-webpack-plugin": "^10.0.0",
5252
"css-loader": "^6.0.0",
53-
"eslint": "^7.4.0",
53+
"eslint": "^8.6.0",
5454
"eslint-plugin-react": "^7.14.3",
5555
"eslint-plugin-react-hooks": "^4.0.0",
5656
"glob": "^7.0.5",
@@ -61,14 +61,15 @@
6161
"normalize.css": "^8.0.0",
6262
"postcss": "^8.2.7",
6363
"postcss-loader": "^6.1.0",
64-
"postcss-nesting": "^8.0.1",
64+
"postcss-nesting": "^10.1.1",
6565
"postcss-simple-vars": "^6.0.3",
6666
"prettier": "^2.2.1",
67-
"stylelint": "^13.12.0",
67+
"stylelint": "^14.2.0",
6868
"stylelint-config-css-modules": "^2.2.0",
6969
"stylelint-config-idiomatic-order": "^8.1.0",
7070
"stylelint-config-prettier": "^9.0.3",
71-
"stylelint-config-standard": "^22.0.0",
71+
"stylelint-config-standard": "^24.0.0",
72+
"ts-essentials": "^9.0.0",
7273
"ts-jest": "^27.0.0",
7374
"ts-loader": "^9.2.3",
7475
"typescript": "^4.2.2",
@@ -77,7 +78,7 @@
7778
"webpack-cli": "^4.5.0"
7879
},
7980
"engines": {
80-
"node": "^14.15.1"
81+
"node": "^14.18.2"
8182
},
8283
"scripts": {
8384
"test": "jest",

ui/frontend/storage.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { merge } from 'lodash';
22
import { StoreEnhancer, StoreEnhancerStoreCreator } from 'redux';
3+
import { DeepPartial } from 'ts-essentials';
34

45
type SimpleStorage = Pick<Storage, 'getItem' | 'setItem'>;
56

67
interface Config<S> {
78
storageFactory: () => SimpleStorage;
89
serialize: (state: S) => string;
9-
deserialize: (state: string) => S;
10+
deserialize: (state: string) => DeepPartial<S>;
1011
}
1112

1213
export class InMemoryStorage {

ui/frontend/webpack.config.js

+11-4
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,22 @@ const allKeybindings = allKeybindingNames.concat(['ace']).sort();
2525
const allThemes = allThemeNames;
2626

2727
// The name is nicer to debug with, but changing names breaks long-term-caching
28-
const developmentFilenameTemplate = '[name]-[chunkhash]';
29-
const productionFilenameTemplate = '[chunkhash]';
28+
const developmentFilenameTemplate = '[name]-[contenthash]';
29+
const developmentChunkFilenameTemplate = '[name]-[chunkhash]';
30+
31+
const productionFilenameTemplate = '[contenthash]';
32+
const productionChunkFilenameTemplate = '[chunkhash]';
3033

3134
module.exports = function(_, argv) {
3235
const isProduction = argv.mode === 'production';
3336
const filenameTemplate =
3437
isProduction ?
3538
productionFilenameTemplate :
3639
developmentFilenameTemplate;
40+
const chunkFilenameTemplate =
41+
isProduction ?
42+
productionChunkFilenameTemplate :
43+
developmentChunkFilenameTemplate;
3744

3845
const devtool =
3946
isProduction ?
@@ -61,7 +68,7 @@ module.exports = function(_, argv) {
6168
publicPath: 'assets/',
6269
path: `${__dirname}/build/assets`,
6370
filename: `${filenameTemplate}.js`,
64-
chunkFilename: `${filenameTemplate}.js`,
71+
chunkFilename: `${chunkFilenameTemplate}.js`,
6572
},
6673

6774
resolve: {
@@ -137,7 +144,7 @@ module.exports = function(_, argv) {
137144
}),
138145
new MiniCssExtractPlugin({
139146
filename: `${filenameTemplate}.css`,
140-
chunkFilename: `${filenameTemplate}.css`,
147+
chunkFilename: `${chunkFilenameTemplate}.css`,
141148
}),
142149
...(isProduction ? [new CompressionPlugin()] : []),
143150
],

0 commit comments

Comments
 (0)