Skip to content

Commit

Permalink
upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
hojas committed Oct 31, 2023
1 parent aba3f96 commit 88baa46
Show file tree
Hide file tree
Showing 13 changed files with 1,979 additions and 1,322 deletions.
5 changes: 0 additions & 5 deletions .eslintrc.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy

on:
push:
branches: ['main']
branches: [main]

workflow_dispatch:

Expand All @@ -12,7 +12,7 @@ permissions:
id-token: write

concurrency:
group: 'pages'
group: pages
cancel-in-progress: true

jobs:
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@ import rehypeHighlight from 'rehype-highlight'
const md = ref(`
## Highlight
```js
\`\`\`js
console.log("hi")
```
\`\`\`
`)
</script>
<template>
<VueMdRender :rehype-plugins="[rehypeHighlight]">{{ md }}</VueMdRender>
<VueMdRender :rehype-plugins="[rehypeHighlight]">
{{ md }}
</VueMdRender>
</template>
````

Expand Down
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import antfu from '@antfu/eslint-config'

export default antfu()
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "vue-md-render",
"type": "module",
"version": "1.0.2",
"packageManager": "pnpm@8.6.6",
"version": "1.0.3",
"packageManager": "pnpm@8.10.0",
"license": "MIT",
"repository": "hojas/vue-md-render",
"bugs": "https://github.com/hojas/vue-md-render/issues",
Expand All @@ -20,8 +20,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/vue-md-render.umd.cjs",
"import": "./dist/vue-md-render.js"
"import": "./dist/vue-md-render.js",
"require": "./dist/vue-md-render.umd.cjs"
}
},
"main": "./dist/vue-md-render.umd.cjs",
Expand All @@ -35,20 +35,20 @@
"lint": "eslint ."
},
"dependencies": {
"rehype-stringify": "^9.0.3",
"remark-parse": "^10.0.2",
"remark-rehype": "^10.1.0",
"unified": "^10.1.2"
"rehype-stringify": "^10.0.0",
"remark-parse": "^11.0.0",
"remark-rehype": "^11.0.0",
"unified": "^11.0.4"
},
"devDependencies": {
"@antfu/eslint-config": "^0.39.7",
"@types/node": "^20.4.1",
"@vitejs/plugin-vue": "^4.2.3",
"eslint": "^8.44.0",
"@antfu/eslint-config": "^1.0.0-beta.29",
"@types/node": "^20.8.10",
"@vitejs/plugin-vue": "^4.4.0",
"eslint": "^8.52.0",
"shelljs": "^0.8.5",
"typescript": "^5.1.6",
"vite": "^4.4.2",
"vue": "^3.3.4",
"vue-tsc": "^1.8.4"
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vue": "^3.3.7",
"vue-tsc": "^1.8.22"
}
}
22 changes: 11 additions & 11 deletions packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
"build": "vite build"
},
"dependencies": {
"github-markdown-css": "^5.2.0",
"highlight.js": "^11.8.0",
"katex": "^0.16.8",
"mermaid": "^10.2.4",
"rehype-highlight": "^6.0.0",
"rehype-katex": "^6.0.3",
"rehype-raw": "^6.1.1",
"rehype-slug": "^5.1.0",
"remark-gfm": "^3.0.1",
"remark-math": "^5.1.1",
"remark-toc": "^8.0.1",
"github-markdown-css": "^5.3.0",
"highlight.js": "^11.9.0",
"katex": "^0.16.9",
"mermaid": "^10.6.0",
"rehype-highlight": "^7.0.0",
"rehype-katex": "^7.0.0",
"rehype-raw": "^7.0.0",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.0",
"remark-math": "^6.0.0",
"remark-toc": "^9.0.0",
"vue": "*",
"vue-md-render": "workspace:*"
},
Expand Down
22 changes: 9 additions & 13 deletions packages/demo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
{
"compilerOptions": {
"target": "ES2020",
"jsx": "preserve",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",

/* Linting */
"allowImportingTsExtensions": true,
"strict": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"noEmit": true,
"isolatedModules": true,
"skipLibCheck": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
"references": [{ "path": "./tsconfig.node.json" }],
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}
4 changes: 2 additions & 2 deletions packages/demo/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"skipLibCheck": true
},
"include": ["vite.config.ts"]
}
4 changes: 2 additions & 2 deletions packages/vue-md-render/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/vue-md-render.umd.cjs",
"import": "./dist/vue-md-render.js"
"import": "./dist/vue-md-render.js",
"require": "./dist/vue-md-render.umd.cjs"
}
},
"main": "./dist/vue-md-render.umd.cjs",
Expand Down
9 changes: 3 additions & 6 deletions packages/vue-md-render/src/ast-to-vnode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type { AST, Child, Components, Options } from './types'
* @param {Options} options Options
* @returns {VNode} VNode
*/
function renderElement(ast: AST & { type: 'element' },
options: Options): VNode {
function renderElement(ast: AST & { type: 'element' }, options: Options): VNode {
return h(
ast.tagName,
ast.properties,
Expand All @@ -24,8 +23,7 @@ function renderElement(ast: AST & { type: 'element' },
* @param {Options} options Options
* @returns {VNode} VNode
*/
function renderCustomComponent(ast: AST & { type: 'element' },
options: Options & { components: Components }): VNode {
function renderCustomComponent(ast: AST & { type: 'element' }, options: Options & { components: Components }): VNode {
const { components } = options
const component = components[ast.tagName]
const isFn = typeof component === 'function'
Expand All @@ -44,8 +42,7 @@ function renderCustomComponent(ast: AST & { type: 'element' },
* @param {Options} options Options
* @returns {VNode} VNode
*/
function renderLink(ast: AST & { type: 'element' },
options: Options): VNode {
function renderLink(ast: AST & { type: 'element' }, options: Options): VNode {
ast.properties = {
...ast.properties,
target: options.linkTarget,
Expand Down
24 changes: 10 additions & 14 deletions packages/vue-md-render/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
{
"compilerOptions": {
"target": "ES2020",
"jsx": "preserve",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
"outDir": "dist",

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": false,
"jsx": "preserve",

/* Linting */
"allowImportingTsExtensions": true,
"strict": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"noEmit": false,
"outDir": "dist",
"isolatedModules": true,
"skipLibCheck": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
"references": [{ "path": "./tsconfig.node.json" }],
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}
4 changes: 2 additions & 2 deletions packages/vue-md-render/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"skipLibCheck": true
},
"include": ["vite.config.ts"]
}
Loading

0 comments on commit 88baa46

Please sign in to comment.