Skip to content

Commit

Permalink
chore: bump dependencies (#318)
Browse files Browse the repository at this point in the history
* chore: bump dependencies
* fix: docs
* fix: pages & rive

---------

Signed-off-by: Neko Ayaka <[email protected]>
  • Loading branch information
nekomeowww authored Oct 9, 2024
1 parent 5a0b740 commit 3acdf61
Show file tree
Hide file tree
Showing 104 changed files with 4,007 additions and 3,582 deletions.
14 changes: 7 additions & 7 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { argv, cwd, env } from 'node:process'

import { gray } from 'colorette'
import { type DefaultTheme, defineConfig } from 'vitepress'
import MarkdownItFootnote from 'markdown-it-footnote'
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'

import { BiDirectionalLinks } from '@nolebase/markdown-it-bi-directional-links'
import { InlineLinkPreviewElementTransform } from '@nolebase/vitepress-plugin-inline-link-preview/markdown-it'
import { buildEndGenerateOpenGraphImages } from '@nolebase/vitepress-plugin-og-image/vitepress'
import { UnlazyImages } from '@nolebase/markdown-it-unlazy-img'
import { InlineLinkPreviewElementTransform } from '@nolebase/vitepress-plugin-inline-link-preview/markdown-it'
import { transformHeadMeta } from '@nolebase/vitepress-plugin-meta/vitepress'

import { buildEndGenerateOpenGraphImages } from '@nolebase/vitepress-plugin-og-image/vitepress'
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
import { gray } from 'colorette'
import MarkdownItFootnote from 'markdown-it-footnote'
import { type DefaultTheme, defineConfig } from 'vitepress'

import packageJSON from '../../package.json'
import { compilerOptions } from './twoslashConfig'

Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/components/IntegrationCard.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { useData } from 'vitepress'
import VitePressLogo from '../assets/vitepress-logo-large.webp'
import ObsidianLogo from '../assets/obsidian-logo.svg'
import VitePressLogo from '../assets/vitepress-logo-large.webp'
const props = withDefaults(defineProps<{
type: IntegrationType
Expand Down
10 changes: 5 additions & 5 deletions docs/.vitepress/theme/components/ThumbhashPreview.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import { computed, onMounted, ref, watch } from 'vue'
import { useClipboard } from '@vueuse/core'
import { rgbaToThumbHash } from 'thumbhash'
import { createPngDataUri } from 'unlazy/thumbhash'
import { useClipboard } from '@vueuse/core'
import { computed, onMounted, ref, watch } from 'vue'
const props = withDefaults(defineProps<{
thumbhashText: string
Expand All @@ -12,7 +12,7 @@ const props = withDefaults(defineProps<{
clearInputThumbhashText: string
inputThumbhashPlaceholder: string
previewThumbhashText: string
demoImageUrl: string
demoImageUrl?: string
}>(), {
thumbhashText: 'Select image to generate thumbhash',
applyThumbhashText: 'Apply Thumbhash',
Expand All @@ -21,7 +21,7 @@ const props = withDefaults(defineProps<{
clearInputThumbhashText: 'Clear thumbhash',
inputThumbhashPlaceholder: 'Input Thumbhash base64...',
previewThumbhashText: 'Input Thumbhash to preview',
demoImageBase64Url: '',
demoImageUrl: '',
})
const thumbhash = ref('')
Expand All @@ -45,7 +45,7 @@ watch(() => thumbhash.value, async (val) => {
dataUri.value = createPngDataUri(val)
thumbhashErrored.value = false
}
catch (err) {
catch {
thumbhashErrored.value = true
return ''
}
Expand Down
14 changes: 7 additions & 7 deletions docs/.vitepress/theme/components/VPHeroImageLogo.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script setup lang="ts">
import { ref } from 'vue'
import { useMediaQuery } from '@vueuse/core'
import { useMotion } from '@vueuse/motion'
import { useMediaQuery } from '@vueuse/core'
import VitePressLogo from '../assets/vitepress-logo-large.webp'
import { ref } from 'vue'
import ObsidianLogo from '../assets/obsidian-logo.svg'
import VitePressLogo from '../assets/vitepress-logo-large.webp'
import VPHeroImageLayer from './VPHeroImageLogoLayer.vue'
const layer1Ref = ref<HTMLDivElement>()
Expand Down Expand Up @@ -97,7 +97,8 @@ refs.forEach((ref, index) => {
initial: {
scale: 1,
y: ref[key].initial.y,
transform: 'rotateX(50deg) rotateZ(-45deg)',
rotateX: '50deg',
rotateZ: '-45deg',
},
enter: {
y: ref[key].enter.y,
Expand Down Expand Up @@ -125,15 +126,14 @@ refs.forEach((ref, index) => {
</script>

<template>
<div relative h="60 <lg:55 <md:50 <sm:45" w="60 <lg:55 <md:50 <sm:45" m-auto>
<div relative class="h-60 w-60 <lg:h-55 <lg:w-55 <md:h-50 <md:w-50 <sm:h-45 <sm:w-45" m-auto>
<ClientOnly>
<VPHeroImageLayer ref="layer1Ref" class="layer-1" z="4" shadow-md>
<div
left="8 <md:7 <sm:7"
top="<md:7 <sm:6"
absolute
h="44 <lg:40 <md:36 <sm:32"
w="44 <lg:40 <md:36 <sm:32"
class="h-44 w-44 <lg:h-40 <lg:w-40 <md:h-36 <md:w-36 <sm:h-32 <sm:w-32"
z="1"
>
<div i-fluent-emoji:notebook-with-decorative-cover h-full w-full />
Expand Down
16 changes: 8 additions & 8 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { type Plugin, h } from 'vue'

import { MotionPlugin } from '@vueuse/motion'
import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'

import { NuLazyTeleportRiveCanvas } from '@nolebase/ui-rive-canvas'

import { defineThemeUnconfig } from '@nolebase/unconfig-vitepress'
import { NolebasePluginPreset } from '@nolebase/unconfig-vitepress/plugins'

import VPHeroImageLogo from './components/VPHeroImageLogo.vue'
import IntegrationCard from './components/IntegrationCard.vue'
import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
import { MotionPlugin } from '@vueuse/motion'
import { h, type Plugin } from 'vue'

import HomeContent from './components/HomeContent.vue'
import ThumbhashPreview from './components/ThumbhashPreview.vue'
import IntegrationCard from './components/IntegrationCard.vue'
import NavHeader from './components/NavHeader.vue'
import ThumbhashPreview from './components/ThumbhashPreview.vue'
import VPHeroImageLogo from './components/VPHeroImageLogo.vue'

import 'virtual:uno.css'

Expand Down
22 changes: 11 additions & 11 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"docs:preview": "vitepress preview"
},
"devDependencies": {
"@iconify-json/carbon": "^1.1.36",
"@iconify-json/fluent-emoji": "^1.1.18",
"@iconify-json/icon-park-outline": "^1.1.15",
"@iconify-json/octicon": "^1.1.56",
"@iconify-json/svg-spinners": "^1.1.2",
"@iconify-json/carbon": "^1.2.2",
"@iconify-json/fluent-emoji": "^1.2.1",
"@iconify-json/icon-park-outline": "^1.2.1",
"@iconify-json/octicon": "^1.2.1",
"@iconify-json/svg-spinners": "^1.2.1",
"@nolebase/markdown-it-bi-directional-links": "workspace:^",
"@nolebase/markdown-it-element-transform": "workspace:^",
"@nolebase/markdown-it-unlazy-img": "workspace:^",
Expand All @@ -33,19 +33,19 @@
"@nolebase/vitepress-plugin-og-image": "workspace:^",
"@nolebase/vitepress-plugin-page-properties": "workspace:^",
"@nolebase/vitepress-plugin-thumbnail-hash": "workspace:^",
"@rive-app/canvas": "^2.19.6",
"@rive-app/canvas": "^2.21.5",
"@rollup/plugin-yaml": "^4.1.2",
"@shikijs/vitepress-twoslash": "^1.12.0",
"@types/markdown-it": "^14.1.1",
"@shikijs/vitepress-twoslash": "^1.22.0",
"@types/markdown-it": "^14.1.2",
"@types/markdown-it-footnote": "^3.0.4",
"@vueuse/motion": "^2.2.3",
"asciinema-player": "^3.8.0",
"@vueuse/motion": "^2.2.5",
"asciinema-player": "^3.8.1",
"colorette": "^2.0.20",
"markdown-it": "^14.1.0",
"markdown-it-footnote": "^4.0.0",
"motion": "^10.18.0",
"thumbhash": "^0.1.1",
"unlazy": "^0.11.3",
"vite-plugin-vue-devtools": "^7.3.7"
"vite-plugin-vue-devtools": "^7.4.6"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ It is ok to replace to your image, or try to edit the thumbhash base64.
clear-input-thumbhash-text="Clear thumbhash"
input-thumbhash-placeholder="Input Thumbhash base64..."
preview-thumbhash-text="Input Thumbhash to preview"
demo-image-url="/foxtail field.jpg"
demo-image-url="/thumbhash-test-image.jpg"
/>

The generated thumbhash base64 will be like this:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import packageJSON from '~/packages/vitepress-plugin-thumbnail-hash/package.json
clear-input-thumbhash-text="清空已输入的 Thumbhash"
input-thumbhash-placeholder="输入 base64 编码的 Thumbhash..."
preview-thumbhash-text="输入 Thumbhash 以预览"
demo-image-url="/foxtail field.jpg"
demo-image-url="/thumbhash-test-image.jpg"
/>

生成的 Thumbhash base64 将如下所示:
Expand Down
File renamed without changes
16 changes: 8 additions & 8 deletions docs/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import type { Plugin } from 'vite'
import { dirname, join, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { env } from 'node:process'

import { defineConfig } from 'vite'
import type { Plugin } from 'vite'
import UnoCSS from 'unocss/vite'
import Inspect from 'vite-plugin-inspect'
import Yaml from '@rollup/plugin-yaml'
import VueDevTools from 'vite-plugin-vue-devtools'

import { fileURLToPath } from 'node:url'
import { GitChangelog, GitChangelogMarkdownSection } from '@nolebase/vitepress-plugin-git-changelog/vite'
import { PageProperties, PagePropertiesMarkdownSection } from '@nolebase/vitepress-plugin-page-properties/vite'
import { ThumbnailHashImages } from '@nolebase/vitepress-plugin-thumbnail-hash/vite'
import Yaml from '@rollup/plugin-yaml'
import UnoCSS from 'unocss/vite'

import { defineConfig } from 'vite'
import Inspect from 'vite-plugin-inspect'
import VueDevTools from 'vite-plugin-vue-devtools'

function getVueProdHydrationMismatchDetailsFlag() {
if (!env) {
Expand Down
47 changes: 24 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@nolebase/integrations",
"type": "module",
"version": "2.5.0",
"packageManager": "pnpm@9.6.0",
"packageManager": "pnpm@9.12.1",
"description": "A collection of diverse documentation engineering tools.",
"author": {
"name": "Nólëbase",
Expand All @@ -20,6 +20,7 @@
"scripts": {
"stub": "pnpm -r --filter=./packages/* --parallel run stub",
"lint": "eslint --cache .",
"lint:fix": "eslint --cache --fix .",
"dev": "pnpm run packages:stub && pnpm run docs:dev",
"build": "pnpm run packages:build && pnpm run docs:build",
"preview": "pnpm run docs:preview",
Expand All @@ -37,32 +38,32 @@
"test:run": "vitest run"
},
"devDependencies": {
"@antfu/eslint-config": "^2.21.1",
"@antfu/ni": "^0.21.12",
"@antfu/eslint-config": "^3.7.3",
"@antfu/ni": "^0.23.0",
"@cspell/dict-ru_ru": "^2.2.1",
"@types/node": "^20.14.10",
"@unocss/cli": "^0.59.4",
"@unocss/eslint-config": "^0.58.9",
"@unocss/eslint-plugin": "^0.58.9",
"@vitejs/plugin-vue": "^5.0.5",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/ui": "^1.6.0",
"@vueuse/core": "^10.11.0",
"@types/node": "^22.7.5",
"@unocss/cli": "^0.63.4",
"@unocss/eslint-config": "^0.63.4",
"@unocss/eslint-plugin": "^0.63.4",
"@vitejs/plugin-vue": "^5.1.4",
"@vitest/coverage-v8": "^2.1.2",
"@vitest/ui": "^2.1.2",
"@vueuse/core": "^11.1.0",
"bumpp": "^9.5.2",
"concurrently": "^8.2.2",
"eslint": "^8.57.0",
"concurrently": "^9.0.1",
"eslint": "^9.12.0",
"less": "^4.2.0",
"rimraf": "^5.0.9",
"typescript": "^5.5.2",
"rimraf": "^6.0.1",
"typescript": "^5.6.3",
"unbuild": "^2.0.0",
"unocss": "^0.57.7",
"unplugin-vue-macros": "^2.10.0",
"vite": "^5.3.1",
"vite-plugin-inspect": "^0.8.5",
"vitepress": "^1.3.1",
"vitest": "^1.6.0",
"vue": "^3.4.34",
"vue-tsc": "^1.8.27"
"unocss": "^0.63.4",
"unplugin-vue-macros": "^2.12.3",
"vite": "^5.4.8",
"vite-plugin-inspect": "^0.8.7",
"vitepress": "^1.4.0",
"vitest": "^2.1.2",
"vue": "^3.5.11",
"vue-tsc": "^2.1.6"
},
"workspaces": [
"packages/*",
Expand Down
6 changes: 3 additions & 3 deletions packages/markdown-it-bi-directional-links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
},
"dependencies": {
"colorette": "^2.0.20",
"debug": "^4.3.6",
"glob": "^10.4.5"
"debug": "^4.3.7",
"glob": "^11.0.0"
},
"devDependencies": {
"@types/debug": "^4.1.12",
"@types/markdown-it": "^14.1.1"
"@types/markdown-it": "^14.1.2"
}
}
4 changes: 2 additions & 2 deletions packages/markdown-it-bi-directional-links/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fileURLToPath } from 'node:url'
import { dirname, join } from 'node:path'
import { describe, expect, it } from 'vitest'
import { fileURLToPath } from 'node:url'
import MarkdownIt from 'markdown-it'
import { describe, expect, it } from 'vitest'

import { BiDirectionalLinks } from '.'

Expand Down
23 changes: 12 additions & 11 deletions packages/markdown-it-bi-directional-links/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { PluginSimple } from 'markdown-it'
import { basename, extname, posix, relative, sep } from 'node:path'
import { cwd } from 'node:process'
import { globSync } from 'glob'
import type { PluginSimple } from 'markdown-it'
import { cyan, gray, yellow } from 'colorette'
import _debug from 'debug'
import { globSync } from 'glob'

import packageJSON from '../package.json'
import { findBiDirectionalLinks, genAudio, genImage, genLink, genVideo } from './utils'
Expand Down Expand Up @@ -118,7 +118,7 @@ Things to check:
1. Was it renamed during the build process?
2. Does it exist in the file system with the correct path?
3. Does it have the correct extension? (Either .md for Markdown files or image extensions)
4. Does it have any special characters in the file name? (e.g. back slashes, quotes, illegal characters, etc.
4. Does it have any special characters in the file name? (e.g. back slashes, quotes, illegal characters, etc.)
2. If <N/A> was shown, it means no relevant path was found. In such cases:
1. Check the file system for the file if you expect it to get matched.
2. Check whether mis-spelling or incorrect path was used in the markup.
Expand Down Expand Up @@ -318,21 +318,22 @@ export const BiDirectionalLinks: (options?: BiDirectionalLinksOptions) => Plugin
if (!isImageRef && !isAudioRef && !isVideoRef && (extname(osSpecificHref) === '' || extname(osSpecificHref) !== '.md'))
osSpecificHref += '.md'

const matchedHrefs = findBiDirectionalLinks(possibleBiDirectionalLinksInCleanBaseNameOfFilePaths, possibleBiDirectionalLinksInFullFilePaths, osSpecificHref)
if (matchedHrefs === null || (Array.isArray(matchedHrefs) && matchedHrefs.length === 0)) {
const matchedHrefSingleOrArray = findBiDirectionalLinks(possibleBiDirectionalLinksInCleanBaseNameOfFilePaths, possibleBiDirectionalLinksInFullFilePaths, osSpecificHref)
if (matchedHrefSingleOrArray === null || (Array.isArray(matchedHrefSingleOrArray) && matchedHrefSingleOrArray.length === 0)) {
const relevantPath = findTheMostRelevantOne(possibleBiDirectionalLinksInCleanBaseNameOfFilePaths, possibleBiDirectionalLinksInFullFilePaths, osSpecificHref)
logNoMatchedFileWarning(rootDir, inputContent, markupTextContent, href, osSpecificHref, state.env.path, !noNoMatchedFileWarning, relevantPath)

return false
}
let matchedHref
if (Array.isArray(matchedHrefs)) {
matchedHref = matchedHrefs[0]
if (matchedHrefs.length > 1)
logMultipleCaseInsensitiveMatchedFilesWarning(rootDir, debugOn, osSpecificHref, matchedHrefs)

let matchedHref: string | undefined
if (Array.isArray(matchedHrefSingleOrArray)) {
matchedHref = matchedHrefSingleOrArray[0]
if (matchedHrefSingleOrArray.length > 1)
logMultipleCaseInsensitiveMatchedFilesWarning(rootDir, debugOn, osSpecificHref, matchedHrefSingleOrArray)
}
else {
matchedHref = matchedHrefs
matchedHref = matchedHrefSingleOrArray
}

let resolvedNewHref = posix.join(
Expand Down
6 changes: 3 additions & 3 deletions packages/markdown-it-bi-directional-links/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type MarkdownIt from 'markdown-it'
import type StateInline from 'markdown-it/lib/rules_inline/state_inline.mjs'
import { sep } from 'node:path'
import Token from 'markdown-it/lib/token.mjs'
import type StateInline from 'markdown-it/lib/rules_inline/state_inline.mjs'
import type MarkdownIt from 'markdown-it'

const caseInsensitiveCompare = new Intl.Collator(undefined, { sensitivity: 'accent' }).compare

Expand All @@ -15,7 +15,7 @@ export function findBiDirectionalLinks(
possibleBiDirectionalLinksInFilePaths: Record<string, string>,
possibleBiDirectionalLinksInFullFilePaths: Record<string, string>,
href: string,
) {
): string[] | string | null {
if (!href)
return null

Expand Down
Loading

0 comments on commit 3acdf61

Please sign in to comment.