Monorepo missing features (#1273)

* fix tauri config

* fix package patch

* regen pnpm lock

* use new workflow

* New GH actions

* Update lockfile

* update scripts

* Fix build script

* Fix missing deps

* Fix assets eslint

* Update libraries lint

* Fix all lint configs

* update lockfile

* add fmt + clippy fails

* Separate App Tauri portion

* fix app features

* Fix lints

* install tauri cli

* update lockfile

* corepack, fix lints

* add store path

* fix unused import

* Fix tests

* Issue templates + port over tauri release

* fix actions

* fix before build command

* Add X86 target

* Update build matrix

* finalize actions

* make debug build smaller

* Use debug build to make cache smaller

* dummy commit

* change proj name

* update file name

* Use release builds for less space use

* Remove rust cache

* Readd for app build

* add merge queue trigger
This commit is contained in:
Geometrically
2024-07-09 15:17:38 -07:00
committed by GitHub
parent dab284f339
commit d1bc65c266
265 changed files with 1810 additions and 1871 deletions

View File

@@ -1,4 +1,7 @@
module.exports = {
root: true,
extends: ['custom/library'],
env: {
node: true,
},
}

View File

@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck
import { insertNewlineAndIndent } from '@codemirror/commands'
@@ -20,7 +21,7 @@ const toggleStrikethrough: Command = ({ state, dispatch }) => {
const toggleCodeBlock: Command = ({ state, dispatch }) => {
const lineBreak = state.lineBreak
const codeBlockMark = `${lineBreak }\`\`\`${ lineBreak}`
const codeBlockMark = `${lineBreak}\`\`\`${lineBreak}`
return toggleAround(state, dispatch, codeBlockMark, codeBlockMark)
}
@@ -87,7 +88,7 @@ type Dispatch = (tr: Transaction) => void
const surroundedByText = (
state: EditorState,
open: string,
close: string
close: string,
): 'inclusive' | 'exclusive' | 'none' => {
const { from, to } = state.selection.main
@@ -113,7 +114,7 @@ const toggleAround = (
state: EditorState,
dispatch: Dispatch,
open: string,
close: string
close: string,
): boolean => {
const { from, to } = state.selection.main
@@ -258,7 +259,7 @@ const insertNewlineContinueMark: Command = (view): boolean => {
const listMark = lastNode.getChild('ListMark')
if (listMark) {
cancelPatterns.push(`${state.doc.sliceString(listMark.from, listMark.to) } `)
cancelPatterns.push(`${state.doc.sliceString(listMark.from, listMark.to)} `)
}
// Skip if current line matches any of the cancel patterns
@@ -340,7 +341,7 @@ const incrementMark = (mark: string): string => {
const match = numberedListRegex.exec(mark)
if (match) {
const number = parseInt(match[1])
return `${(number + 1).toString() }.`
return `${(number + 1).toString()}.`
}
return mark
}

View File

@@ -50,7 +50,7 @@ hljs.registerAliases(['html', 'htm', 'xhtml', 'mcui', 'fxml'], { languageName: '
export const renderHighlightedString = (string) =>
configuredXss.process(
md({
highlight (str, lang) {
highlight(str, lang) {
if (lang && hljs.getLanguage(lang)) {
try {
return hljs.highlight(str, { language: lang }).value
@@ -61,5 +61,5 @@ export const renderHighlightedString = (string) =>
return ''
},
}).render(string)
}).render(string),
)

View File

@@ -5,9 +5,11 @@
"main": "./index.ts",
"types": "./index.ts",
"scripts": {
"lint": "eslint *.*"
"lint": "eslint . && prettier --check .",
"fix": "eslint . --fix && prettier --write ."
},
"devDependencies": {
"eslint": "^8.57.0",
"eslint-config-custom": "workspace:*",
"tsconfig": "workspace:*"
},

View File

@@ -50,7 +50,7 @@ export const configuredXss = new xss.FilterXSS({
for (const remove of source.remove) {
value = value.replace(remove, '')
}
return `${name }="${ xss.escapeAttrValue(value) }"`
return `${name}="${xss.escapeAttrValue(value)}"`
}
}
}
@@ -63,7 +63,7 @@ export const configuredXss = new xss.FilterXSS({
allowedClasses.push(className)
}
}
return `${name }="${ xss.escapeAttrValue(allowedClasses.join(' ')) }"`
return `${name}="${xss.escapeAttrValue(allowedClasses.join(' '))}"`
}
},
safeAttrValue(tag, name, value, cssFilter) {
@@ -96,13 +96,12 @@ export const configuredXss = new xss.FilterXSS({
tag,
name,
`https://wsrv.nl/?url=${encodeURIComponent(
url.toString().replaceAll('&', '&')
url.toString().replaceAll('&', '&'),
)}&n=-1`,
cssFilter
cssFilter,
)
}
return xss.safeAttrValue(tag, name, url.toString(), cssFilter)
}
return xss.safeAttrValue(tag, name, url.toString(), cssFilter)
} catch (err) {
/* empty */
}

View File

@@ -50,12 +50,10 @@ export const getProjectTypeForUrl = (type, loaders, tags) => {
return 'plugin'
} else if (isMod) {
return 'mod'
}
return 'mod'
}
return type
}
return 'mod'
}
return type
}
export const getProjectLink = (project) => {
@@ -66,10 +64,9 @@ export const getProjectLink = (project) => {
export const getVersionLink = (project, version) => {
if (version) {
return `${getProjectLink(project) }/version/${ version.id}`
}
return getProjectLink(project)
return `${getProjectLink(project)}/version/${version.id}`
}
return getProjectLink(project)
}
export const isApproved = (project) => {

View File

@@ -1,6 +1,6 @@
{
"extends": "tsconfig/base.json",
"include": ["."],
"include": [".", ".eslintrc.js"],
"exclude": ["dist", "build", "node_modules"],
"compilerOptions": {
"lib": ["esnext", "dom"],

View File

@@ -1,4 +1,5 @@
// noinspection JSUnusedGlobalSymbols
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck
import dayjs from 'dayjs'