mirror of https://github.com/YunYouJun/valaxy
chore: upgrade deps & add __DEV__ to valaxy shim & use fs-extra instead of node:fs/promises
This commit is contained in:
parent
b811f76420
commit
f2e9c387c1
|
@ -25,6 +25,6 @@
|
|||
"devDependencies": {
|
||||
"nodemon": "^2.0.22",
|
||||
"vite-plugin-inspect": "^0.7.28",
|
||||
"vite-plugin-pwa": "^0.15.1"
|
||||
"vite-plugin-pwa": "^0.16.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
"valaxy-theme-press": "link:../packages/valaxy-theme-press"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nodemon": "^2.0.19"
|
||||
"nodemon": "^2.0.22"
|
||||
}
|
||||
}
|
||||
|
|
12
package.json
12
package.json
|
@ -2,7 +2,7 @@
|
|||
"name": "@valaxyjs/monorepo",
|
||||
"version": "0.14.30",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@8.1.0",
|
||||
"packageManager": "pnpm@8.6.0",
|
||||
"description": "📄 Vite & Vue powered static blog generator.",
|
||||
"author": {
|
||||
"email": "me@yunyoujun.cn",
|
||||
|
@ -43,8 +43,8 @@
|
|||
"prepare": "husky install"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^0.39.3",
|
||||
"@microsoft/api-extractor": "^7.35.0",
|
||||
"@antfu/eslint-config": "^0.39.4",
|
||||
"@microsoft/api-extractor": "^7.35.1",
|
||||
"@types/debug": "^4.1.8",
|
||||
"@types/node": "^20.2.5",
|
||||
"@types/prompts": "^2.4.4",
|
||||
|
@ -52,7 +52,7 @@
|
|||
"@types/semver": "^7.5.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"cypress": "^12.13.0",
|
||||
"eslint": "^8.41.0",
|
||||
"eslint": "^8.42.0",
|
||||
"eslint-plugin-cypress": "^2.13.3",
|
||||
"https-localhost": "^4.7.1",
|
||||
"husky": "^8.0.3",
|
||||
|
@ -61,7 +61,7 @@
|
|||
"rimraf": "^5.0.1",
|
||||
"tsup": "^6.7.0",
|
||||
"tsx": "^3.12.7",
|
||||
"typescript": "^5.0.4",
|
||||
"typescript": "^5.1.3",
|
||||
"valaxy": "workspace:*",
|
||||
"valaxy-addon-algolia": "workspace:*",
|
||||
"valaxy-addon-components": "workspace:*",
|
||||
|
@ -70,7 +70,7 @@
|
|||
"valaxy-addon-waline": "workspace:*",
|
||||
"valaxy-theme-press": "workspace:*",
|
||||
"valaxy-theme-yun": "workspace:*",
|
||||
"vitest": "^0.31.1",
|
||||
"vitest": "^0.31.4",
|
||||
"vue-tsc": "1.4.4",
|
||||
"zx": "^7.2.2"
|
||||
},
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"node": "^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"execa": "5",
|
||||
"execa": "5.1.1",
|
||||
"kolorist": "^1.8.0",
|
||||
"minimist": "^1.2.8",
|
||||
"prompts": "^2.4.2"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"node": "^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"execa": "5",
|
||||
"execa": "5.1.1",
|
||||
"kolorist": "^1.8.0",
|
||||
"minimist": "^1.2.8",
|
||||
"prompts": "^2.4.2"
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
"valaxy-theme-yun": "0.14.30"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^4.8.4"
|
||||
"typescript": "^4.9.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"types": "types/index.d.ts",
|
||||
"dependencies": {
|
||||
"@iconify-json/ant-design": "^1.1.5",
|
||||
"@iconify-json/simple-icons": "^1.1.54",
|
||||
"@iconify-json/simple-icons": "^1.1.55",
|
||||
"animejs": "^3.2.1",
|
||||
"valaxy-addon-waline": "workspace:*"
|
||||
},
|
||||
|
|
|
@ -4,7 +4,6 @@ import fs from 'fs-extra'
|
|||
import yargs from 'yargs'
|
||||
import type { InlineConfig, LogLevel } from 'vite'
|
||||
import { mergeConfig } from 'vite'
|
||||
import openBrowser from 'open'
|
||||
|
||||
import consola from 'consola'
|
||||
|
||||
|
@ -104,7 +103,8 @@ cli.command(
|
|||
{
|
||||
name: 'o',
|
||||
fullName: 'open',
|
||||
action() {
|
||||
async action() {
|
||||
const { default: openBrowser } = await import('open')
|
||||
openBrowser(`http://localhost:${port}`)
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { access } from 'node:fs/promises'
|
||||
import { type PathLike } from 'node:fs'
|
||||
import { access } from 'fs-extra'
|
||||
|
||||
export async function exists(path: PathLike) {
|
||||
try {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { writeFile } from 'node:fs/promises'
|
||||
import { join, resolve } from 'node:path'
|
||||
import { writeFile } from 'fs-extra'
|
||||
import { render } from 'ejs'
|
||||
import dayjs from 'dayjs'
|
||||
import { ensureSuffix } from '@antfu/utils'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import path from 'node:path'
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import { readFile } from 'fs-extra'
|
||||
import { resolveOptions } from '../../options'
|
||||
import { exists } from './fs'
|
||||
import { userRoot } from './constants'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// copy from vitepress
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import fs from 'fs-extra'
|
||||
import c from 'picocolors'
|
||||
import { LRUCache } from 'lru-cache'
|
||||
import _debug from 'debug'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import fs from 'node:fs'
|
||||
import fs from 'fs-extra'
|
||||
import type { PluginOption } from 'vite'
|
||||
import { splitVendorChunkPlugin } from 'vite'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { existsSync, readFileSync } from 'node:fs'
|
||||
import { existsSync, readFileSync } from 'fs-extra'
|
||||
import type { SiteConfig } from 'valaxy/types'
|
||||
import type { ValaxyExtendConfig } from '../../types'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { resolve } from 'node:path'
|
||||
import { existsSync } from 'node:fs'
|
||||
import { existsSync } from 'fs-extra'
|
||||
import type { VitePluginConfig as UnoCSSConfig, VitePluginConfig } from 'unocss/vite'
|
||||
import jiti from 'jiti'
|
||||
import defu from 'defu'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { dirname, resolve } from 'node:path'
|
||||
import fs from 'node:fs'
|
||||
import fs from 'fs-extra'
|
||||
import { isPath, resolveImportPath } from '../utils'
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
"types": "index.d.ts",
|
||||
"bin": {
|
||||
"vala": "./bin/valaxy.cjs",
|
||||
"valac": "./bin/valaxy.cjs",
|
||||
"valam": "./bin/valaxy.mjs",
|
||||
"valaxy": "./bin/valaxy.cjs"
|
||||
},
|
||||
|
@ -58,9 +59,9 @@
|
|||
"preview-https": "serve dist"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antfu/utils": "^0.7.2",
|
||||
"@antfu/utils": "^0.7.4",
|
||||
"@ctrl/tinycolor": "^3.6.0",
|
||||
"@iconify-json/carbon": "^1.1.16",
|
||||
"@iconify-json/carbon": "^1.1.17",
|
||||
"@iconify-json/ri": "^1.1.9",
|
||||
"@intlify/unplugin-vue-i18n": "^0.11.0",
|
||||
"@types/body-scroll-lock": "^3.1.0",
|
||||
|
@ -71,9 +72,9 @@
|
|||
"@vueuse/schema-org": "^2.2.0",
|
||||
"body-scroll-lock": "4.0.0-beta.0",
|
||||
"consola": "^3.1.0",
|
||||
"critters": "^0.0.17",
|
||||
"critters": "^0.0.18",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"dayjs": "^1.11.7",
|
||||
"dayjs": "^1.11.8",
|
||||
"ejs": "^3.1.9",
|
||||
"escape-html": "^1.0.3",
|
||||
"feed": "^4.2.2",
|
||||
|
@ -85,7 +86,7 @@
|
|||
"jiti": "^1.18.2",
|
||||
"katex": "^0.16.7",
|
||||
"kolorist": "^1.8.0",
|
||||
"lru-cache": "^9.1.1",
|
||||
"lru-cache": "^9.1.2",
|
||||
"markdown-it": "^13.0.1",
|
||||
"markdown-it-anchor": "^8.6.7",
|
||||
"markdown-it-attrs": "^4.1.6",
|
||||
|
@ -95,15 +96,15 @@
|
|||
"markdown-it-task-lists": "^2.1.1",
|
||||
"medium-zoom": "^1.0.8",
|
||||
"nprogress": "^0.2.0",
|
||||
"open": "^8.4.2",
|
||||
"open": "8",
|
||||
"pascal-case": "^3.1.2",
|
||||
"pinia": "^2.1.3",
|
||||
"sass": "^1.62.1",
|
||||
"shiki": "^0.14.2",
|
||||
"star-markdown-css": "^0.4.2",
|
||||
"unconfig": "^0.3.9",
|
||||
"unocss": "^0.52.4",
|
||||
"unplugin-vue-components": "^0.24.1",
|
||||
"unocss": "^0.52.7",
|
||||
"unplugin-vue-components": "^0.25.0",
|
||||
"vite": "^4.3.9",
|
||||
"vite-plugin-pages": "^0.30.1",
|
||||
"vite-plugin-vue-layouts": "^0.8.0",
|
||||
|
@ -111,7 +112,7 @@
|
|||
"vite-ssg-sitemap": "0.5.1",
|
||||
"vue": "^3.3.4",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-router": "^4.2.1",
|
||||
"vue-router": "^4.2.2",
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -3,6 +3,8 @@ import 'vue-router'
|
|||
import type { Post } from './types'
|
||||
import type { Header } from './node/markdown'
|
||||
|
||||
declare const __DEV__: boolean
|
||||
|
||||
declare interface Window {
|
||||
// algolia
|
||||
instantsearch: any
|
||||
|
|
|
@ -18,6 +18,7 @@ export default defineConfig((options) => {
|
|||
external: [
|
||||
'/@valaxyjs/config',
|
||||
'/@valaxyjs/context',
|
||||
'open',
|
||||
],
|
||||
outExtension({ format }) {
|
||||
return {
|
||||
|
|
1033
pnpm-lock.yaml
1033
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
import { readFileSync, writeFileSync } from 'node:fs'
|
||||
import { join } from 'node:path'
|
||||
import { readFileSync, writeFileSync } from 'fs-extra'
|
||||
import type { ReleaseType } from 'semver'
|
||||
import semver from 'semver'
|
||||
import consola from 'consola'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// import { resolve } from 'path'
|
||||
// import fs from 'fs'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { createMarkdownRenderer } from '../packages/valaxy/node/markdown'
|
||||
|
||||
|
|
Loading…
Reference in New Issue