Skip to content

Commit

Permalink
Update dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Dianliang233 committed Jul 27, 2023
1 parent 2e74175 commit 217dc5c
Show file tree
Hide file tree
Showing 25 changed files with 3,578 additions and 3,960 deletions.
11 changes: 6 additions & 5 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
// eslint-disable-next-line no-undef
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json', './tsconfig.node.json'],
project: ['./tsconfig.json', './tsconfig.node.json', './tsconfig.eslint.json'],
},
plugins: ['@typescript-eslint', 'react-hooks'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/strict',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
Expand All @@ -25,4 +23,7 @@ module.exports = {
version: 'detect',
},
},
env: {
node: true,
}
}
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ jobs:
BUCKET: frontend-wdljt
LOCAL_PATH: ./dist/
REMOTE_PREFIX: meme/
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ stats.html
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Sentry Auth Token
.env.sentry-build-plugin
541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

876 changes: 0 additions & 876 deletions .yarn/releases/yarn-4.0.0-rc.43.cjs

This file was deleted.

881 changes: 881 additions & 0 deletions .yarn/releases/yarn-4.0.0-rc.48.cjs

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
nodeLinker: pnp
compressionLevel: mixed

enableGlobalCache: false

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
nodeLinker: pnp

yarnPath: .yarn/releases/yarn-4.0.0-rc.43.cjs
yarnPath: .yarn/releases/yarn-4.0.0-rc.48.cjs
13 changes: 11 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@
as="font"
fetchPriority="high"
href="/src/assets/Inter.var.woff2"
crossorigin
/>
<link
rel="preload"
type="application/wasm"
as="fetch"
fetchPriority="high"
href="/node_modules/brotli-wasm/pkg.bundler/brotli_wasm_bg.wasm"
/>
<link
rel="preload"
Expand All @@ -83,7 +89,10 @@
as="font"
fetchPriority="low"
href="/src/assets/JetBrainsMono.var.woff2"
crossorigin
/>
<link
rel="preconnect"
href="https://fe.wd-ljt.com"
/>
</head>
<body>
Expand Down
66 changes: 34 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,56 +7,58 @@
"lint": "eslint ."
},
"dependencies": {
"@emotion/react": "^11.11.0",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mdi/js": "^7.2.96",
"@mui/lab": "^5.0.0-alpha.129",
"@mui/material": "^5.13.0",
"@sentry/react": "^7.51.2",
"@sentry/tracing": "^7.51.2",
"@mui/lab": "^5.0.0-alpha.137",
"@mui/material": "^5.14.1",
"@sentry/react": "^7.60.0",
"@sentry/tracing": "^7.60.0",
"@teahouse-studios/mdi-material-ui": "^0.0.0",
"brotli-wasm": "^1.3.1",
"i18next": "^22.4.15",
"i18next-browser-languagedetector": "^7.0.1",
"markdown-to-jsx": "^7.2.0",
"mui-markdown": "^1.0.0",
"brotli-wasm": "^2.0.0",
"i18next": "^23.2.11",
"i18next-browser-languagedetector": "^7.1.0",
"markdown-to-jsx": "^7.2.1",
"mui-markdown": "^1.1.4",
"notistack": "^3.0.1",
"prism-react-renderer": "^2.0.4",
"prism-react-renderer": "^2.0.6",
"react": "^18.2.0",
"react-aspect-ratio": "^1.1.6",
"react-dom": "^18.2.0",
"react-highlight-words": "^0.20.0",
"react-i18next": "^12.2.2",
"react-i18next": "^13.0.2",
"react-transition-group": "^4.4.5",
"swiper": "^9.3.1",
"swiper": "^10.0.4",
"usehooks-ts": "^2.9.1",
"web-vitals": "^3.3.1",
"web-vitals": "^3.4.0",
"zod": "^3.21.4"
},
"devDependencies": {
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@babel/core": "^7.22.9",
"@babel/preset-env": "^7.22.9",
"@emotion/babel-plugin": "^11.11.0",
"@sentry/vite-plugin": "^2.4.0",
"@types/gtag.js": "^0.0.12",
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"@types/node": "^20.4.4",
"@types/react": "^18.2.16",
"@types/react-dom": "^18.2.7",
"@types/react-highlight-words": "^0.16.4",
"@types/react-transition-group": "^4.4.6",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"@vitejs/plugin-legacy": "^4.0.3",
"@vitejs/plugin-react": "^4.0.0",
"eslint": "^8.40.0",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"@vitejs/plugin-legacy": "^4.1.1",
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.8.8",
"rollup-plugin-visualizer": "^5.9.0",
"terser": "^5.17.3",
"typescript": "^5.0.4",
"vite": "^4.3.5",
"vite-plugin-pwa": "^0.14.7",
"workbox-window": "^6.5.4"
"prettier": "^3.0.0",
"rollup-plugin-visualizer": "^5.9.2",
"terser": "^5.19.2",
"typescript": "^5.1.6",
"vite": "^4.4.7",
"vite-plugin-pwa": "^0.16.4",
"workbox-window": "^7.0.0"
},
"packageManager": "[email protected].43"
"packageManager": "[email protected].48"
}
12 changes: 8 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ function App() {
font-weight: 300 900;
font-display: swap;
font-style: normal;
src: url(${InterVar}) format('woff2-variations'),
src:
url(${InterVar}) format('woff2-variations'),
url(${InterVar}) format('woff2');
src: url(${InterVar}) format('woff2') tech('variations');
}
Expand All @@ -136,7 +137,8 @@ function App() {
font-weight: 300 900;
font-display: swap;
font-style: italic;
src: url(${InterVarItalic}) format('woff2-variations'),
src:
url(${InterVarItalic}) format('woff2-variations'),
url(${InterVarItalic}) format('woff2');
src: url(${InterVarItalic}) format('woff2') tech('variations');
}
Expand All @@ -145,7 +147,8 @@ function App() {
font-weight: 300 900;
font-display: swap;
font-style: normal;
src: url(${JetBrainsMonoVar}) format('woff2-variations'),
src:
url(${JetBrainsMonoVar}) format('woff2-variations'),
url(${JetBrainsMonoVar}) format('woff2');
src: url(${JetBrainsMonoVar}) format('woff2')
tech('variations');
Expand All @@ -155,7 +158,8 @@ function App() {
font-weight: 300 900;
font-display: swap;
font-style: italic;
src: url(${JetBrainsMonoVarItalic}) format('woff2-variations'),
src:
url(${JetBrainsMonoVarItalic}) format('woff2-variations'),
url(${JetBrainsMonoVarItalic}) format('woff2');
src: url(${JetBrainsMonoVarItalic}) format('woff2')
tech('variations');
Expand Down
4 changes: 3 additions & 1 deletion src/components/form/BedrockForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ export default function BedrockForm({
control={
<M3Switch
checked={useCompatible}
onChange={(e, c) => setUseCompatible(c)}
onChange={(e, c) => {
setUseCompatible(c)
}}
/>
}
label={t('form.compatible.label')}
Expand Down
15 changes: 12 additions & 3 deletions src/components/form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ export default function Form(props: { shouldCensor: boolean }) {
sx={{
display: 'flex',
justifyContent: 'center',
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
alignItems: apiError || !api ? 'center' : 'start',
flexWrap: 'wrap',
}}
Expand Down Expand Up @@ -302,8 +303,9 @@ export default function Form(props: { shouldCensor: boolean }) {
autoHeight={true}
allowTouchMove={false}
defaultValue={tab}
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
onSlideChange={(index) => slideChange(index.activeIndex)}
onSlideChange={(index) => {
slideChange(index.activeIndex)
}}
onSwiper={(swiper) => {
setSwiper(swiper)
}}
Expand Down Expand Up @@ -616,7 +618,14 @@ function BuildLogs({
知识共享 署名-相同方式共享 4.0 国际(CC BY-SA 4.0)
</Link>
许可协议发布。若您想要重新发布本资源包或在本资源包的基础上二次创作,烦请阅读此
<Link onClick={() => setOpenLicenseDialog(true)}>版权指南</Link>
<Link
onClick={() => {
setOpenLicenseDialog(true)
}}
>
版权指南
</Link>
</Trans>
</Alert>
</Box>
Expand Down
26 changes: 16 additions & 10 deletions src/components/form/JavaForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ export default function JavaForm({
const getModulesInCollection = useCallback(
(predicate: ArrayFilterPredicate) => {
return [...enabledCollections, ...fixedCollections]
.flatMap((m) =>
api.je_modules.collection
.find((c) => c.name === m)
?.contains?.filter(predicate),
.flatMap(
(m) =>
api.je_modules.collection
.find((c) => c.name === m)
?.contains?.filter(predicate),
)
.filter(undefinedPredicate) as string[]
},
Expand All @@ -152,10 +153,11 @@ export default function JavaForm({
return api.je_modules.resource
.filter((resourceModules) =>
[...enabledCollections, ...fixedCollections]
.flatMap((enabledCollection) =>
api.je_modules.collection
.find((collection) => collection.name === enabledCollection)
?.contains?.filter(predicate),
.flatMap(
(enabledCollection) =>
api.je_modules.collection
.find((collection) => collection.name === enabledCollection)
?.contains?.filter(predicate),
)
.filter(undefinedPredicate)
.includes(resourceModules.name),
Expand Down Expand Up @@ -408,7 +410,9 @@ export default function JavaForm({
<Box>
<MenuItem
disabled={enabledMods.length === 0}
onClick={() => setEnabledMods([])}
onClick={() => {
setEnabledMods([])
}}
>
{t('form.clearSelected')}
</MenuItem>
Expand Down Expand Up @@ -502,7 +506,9 @@ export default function JavaForm({
<M3Switch
checked={useCompatible || forceUseCompatible}
disabled={forceUseCompatible}
onChange={(e, c) => setUseCompatible(c)}
onChange={(e, c) => {
setUseCompatible(c)
}}
/>
}
label={t('form.compatible.label')}
Expand Down
16 changes: 9 additions & 7 deletions src/components/form/ResourceSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ export default function ResourceSelect(props: ResourceSelectProps) {
value={selected}
multiple
onClick={handleClick}
onClose={() => setSearchText('')}
onClose={() => {
setSearchText('')
}}
disabled={props.disabled}
renderValue={(selected) =>
selected
Expand Down Expand Up @@ -234,14 +236,14 @@ export default function ResourceSelect(props: ResourceSelectProps) {
<ToggleButton
value="alphabetical"
selected={true}
onClick={() =>
onClick={() => {
setSortingMode({
...sortingMode,
alphabetical: { asc: 'desc', desc: 'asc' }[
sortingMode.alphabetical
] as 'asc' | 'desc',
})
}
}}
>
{sortingMode.alphabetical === 'asc' ? (
<SortAlphabeticalAscending />
Expand All @@ -258,7 +260,7 @@ export default function ResourceSelect(props: ResourceSelectProps) {
sortingMode.selected
]
}
onClick={() =>
onClick={() => {
setSortingMode({
...sortingMode,
selected: {
Expand All @@ -267,7 +269,7 @@ export default function ResourceSelect(props: ResourceSelectProps) {
ignore: 'asc',
}[sortingMode.selected] as 'asc' | 'desc' | 'ignore',
})
}
}}
>
{
{
Expand All @@ -282,15 +284,15 @@ export default function ResourceSelect(props: ResourceSelectProps) {
<ToggleButton
value="incompatible"
selected={sortingMode.incompatible !== 'ignore'}
onClick={() =>
onClick={() => {
setSortingMode({
...sortingMode,
incompatible: {
asc: 'ignore',
ignore: 'asc',
}[sortingMode.incompatible] as 'asc' | 'ignore',
})
}
}}
>
<SortVariantRemove />
</ToggleButton>
Expand Down
5 changes: 4 additions & 1 deletion src/components/form/submit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,8 @@ export default async function submit(
})
}
}
navigator.vibrate(300)
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (navigator.vibrate) {
navigator.vibrate(300)
}
}
Loading

0 comments on commit 217dc5c

Please sign in to comment.