From 09bbf33bdc2b750849346cf3662e70281859bd07 Mon Sep 17 00:00:00 2001 From: Maximo Mussini Date: Tue, 10 Oct 2023 16:42:51 -0300 Subject: [PATCH 01/19] chore: manually bump dependencies --- package.json | 4 +-- packages/excerpt/package.json | 12 ++++---- packages/feed/package.json | 2 +- packages/headings/package.json | 12 ++++---- packages/hydration/package.json | 6 ++-- packages/icons/package.json | 2 +- packages/iles/package.json | 50 ++++++++++++++++---------------- packages/iles/src/node/config.ts | 2 +- packages/images/package.json | 6 ++-- packages/mdx/package.json | 20 ++++++------- packages/pages/package.json | 8 ++--- packages/prerender/package.json | 6 ++-- packages/prism/package.json | 10 +++---- 13 files changed, 70 insertions(+), 70 deletions(-) diff --git a/package.json b/package.json index c0dc0d93..476ae5be 100644 --- a/package.json +++ b/package.json @@ -35,12 +35,12 @@ "minimist": "^1.2.5", "pkg-dir": "^6.0.1", "semver": "^7.3.5", - "typescript": "4.4.4", + "typescript": "5.2.2", "vitest": "^0.16.0" }, "resolutions": { "eslint-plugin-vue": "7.17.0", - "typescript": "4.4.4" + "typescript": "5.2.2" }, "eslintConfig": { "extends": "@mussi/eslint-config", diff --git a/packages/excerpt/package.json b/packages/excerpt/package.json index 7153ddf5..53da85b2 100644 --- a/packages/excerpt/package.json +++ b/packages/excerpt/package.json @@ -28,15 +28,15 @@ "homepage": "https://github.com/ElMassimo/iles", "bugs": "https://github.com/ElMassimo/iles/issues", "dependencies": { - "estree-walker": "^3.0.0", - "hast-util-to-string": "^2.0.0" + "estree-walker": "^3.0", + "hast-util-to-string": "^3.0.0" }, "devDependencies": { - "@types/estree": "^0.0.46", + "@types/estree": "^1.0.2", "@types/estree-jsx": "^0.0.1", "iles": "workspace:*", - "tsup": "6.1.2", - "typescript": "^4.4.4", - "unified": "^10.1.0" + "tsup": "7.2.0", + "typescript": "^5.2.2", + "unified": "^11.0.0" } } diff --git a/packages/feed/package.json b/packages/feed/package.json index 3b252856..a9bdd1b1 100644 --- a/packages/feed/package.json +++ b/packages/feed/package.json @@ -37,6 +37,6 @@ }, "dependencies": { "feed": "^4.2", - "pathe": "^0.2.0" + "pathe": "^1.1.1" } } diff --git a/packages/headings/package.json b/packages/headings/package.json index 3abfafa7..e2e080ee 100644 --- a/packages/headings/package.json +++ b/packages/headings/package.json @@ -28,15 +28,15 @@ "homepage": "https://github.com/ElMassimo/iles", "bugs": "https://github.com/ElMassimo/iles/issues", "dependencies": { - "hast-util-heading-rank": "^2.1.0", - "hast-util-to-string": "^2.0.0" + "hast-util-heading-rank": "^3.0.0", + "hast-util-to-string": "^3.0.0" }, "devDependencies": { - "@types/estree": "^0.0.46", + "@types/estree": "^1.0.2", "iles": "workspace:*", "slugo": "^0.4.0", - "tsup": "6.1.2", - "typescript": "^4.4.4", - "unified": "^10.1.0" + "tsup": "7.2.0", + "typescript": "^5.2.2", + "unified": "^11.0.0" } } diff --git a/packages/hydration/package.json b/packages/hydration/package.json index 1449e8d0..01299987 100644 --- a/packages/hydration/package.json +++ b/packages/hydration/package.json @@ -41,9 +41,9 @@ "preact-render-to-string": "^6.1.0", "solid-js": "^1.7.6", "svelte": "^4.0.0", - "tsup": "6.1.2", - "typescript": "^4.4.4", - "vite": "^4.4.0-beta.3", + "tsup": "7.2.0", + "typescript": "^5.2.2", + "vite": "^5.0.0-beta.6", "vue": "^3.3.4" } } diff --git a/packages/icons/package.json b/packages/icons/package.json index 549b1d6e..c0332d05 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -28,7 +28,7 @@ "homepage": "https://github.com/ElMassimo/iles", "bugs": "https://github.com/ElMassimo/iles/issues", "dependencies": { - "unplugin-icons": "^0.12.17" + "unplugin-icons": "^0.17.0" }, "devDependencies": { "iles": "workspace:*" diff --git a/packages/iles/package.json b/packages/iles/package.json index aff92e97..69e730ae 100644 --- a/packages/iles/package.json +++ b/packages/iles/package.json @@ -45,7 +45,7 @@ "lint": "eslint . --ext .ts,.js,.vue,.html" }, "engines": { - "node": "^14.18 || >= 16.0.0" + "node": "^18.0.0 || >=20.0.0" }, "keywords": [ "vite", @@ -65,30 +65,30 @@ "@islands/mdx": "workspace:^0.9.0", "@islands/pages": "workspace:^0.8.0", "@islands/prerender": "workspace:^0.8.0", - "@nuxt/devalue": "^2.0.0", - "@vitejs/plugin-vue": "^4.2.3", - "@vue/devtools-api": "^6.5.0", - "@vueuse/head": "^1.0.22", - "debug": "^4.3.2", - "deep-equal": "^2.0.5", - "es-module-lexer": "^1.3.0", - "fast-glob": "^3.2.11", - "local-pkg": "^0.4.0", + "@nuxt/devalue": "^2.0.2", + "@vitejs/plugin-vue": "^4.4.0", + "@vue/devtools-api": "^6.5.1", + "@unhead/vue": "^1.7.4", + "debug": "^4.3.4", + "deep-equal": "^2.2.2", + "es-module-lexer": "^1.3.1", + "fast-glob": "^3.3.1", + "local-pkg": "^0.5.0", "mico-spinner": "^1.4.0", "micromatch": "^4.0.5", - "minimist": "^1.2.5", - "pathe": "^0.2.0", + "minimist": "^1.2.8", + "pathe": "^1.1.1", "picocolors": "^1.0.0", "unist-util-visit": "^4.1.0", - "unplugin-vue-components": "^0.25.1", - "vite": "^4.4.0-beta.3", + "unplugin-vue-components": "^0.25.2", + "vite": "^5.0.0-beta.6", "vue": "^3.3.4", - "vue-router": "^4.2.2" + "vue-router": "^4.2.5" }, "devDependencies": { "@preact/preset-vite": "^2.5.0", - "@sveltejs/vite-plugin-svelte": "^2.4.2", - "@types/debug": "^4.1.7", + "@sveltejs/vite-plugin-svelte": "^2.4.6", + "@types/debug": "^4.1.9", "@types/fs-extra": "^9.0.12", "@types/micromatch": "^4.0.2", "@types/node": "^17.0.42", @@ -100,21 +100,21 @@ "find-up": "6.3.0", "fs-extra": "^10", "globby": "^11", - "mdast-util-mdx-jsx": "^1.1.0", - "mdast-util-mdxjs-esm": "^1.1.1", - "micromatch": "^4.0.4", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.1", + "micromatch": "^4.0.5", "npm-run-all": "^4.1.5", "rimraf": "^3.0.2", - "rollup": "^3.3.0", + "rollup": "^3.29.2", "semver": "^7.3.5", - "tsup": "6.1.2", - "typescript": "^4.4.4", - "vfile": "^5.2.0", + "tsup": "7.2.0", + "typescript": "^5.2.2", + "vfile": "^6.0.1", "vite-plugin-solid": "^2.7.0" }, "pnpm": { "overrides": { - "fast-glob": "^3.2.11", + "fast-glob": "^3.3.1", "find-up": "6.3.0", "micromatch": "^4.0.5" } diff --git a/packages/iles/src/node/config.ts b/packages/iles/src/node/config.ts index 495d1cca..183603b7 100644 --- a/packages/iles/src/node/config.ts +++ b/packages/iles/src/node/config.ts @@ -38,7 +38,7 @@ export type { AppConfig } export const IlesComponentResolver: ComponentResolverFunction = (name) => { if (name === 'Island') return { from: ISLAND_COMPONENT_PATH } - if (name === 'Head') return { name: 'Head', from: '@vueuse/head' } + if (name === 'Head') return { name: 'Head', from: '@unhead/vue/components' } } export function IlesLayoutResolver (config: AppConfig): ComponentResolverFunction { diff --git a/packages/images/package.json b/packages/images/package.json index a9f869c0..7545ab98 100644 --- a/packages/images/package.json +++ b/packages/images/package.json @@ -29,12 +29,12 @@ "homepage": "https://github.com/ElMassimo/iles", "bugs": "https://github.com/ElMassimo/iles/issues", "dependencies": { - "pathe": "^0.2.0", + "pathe": "^1.1.1", "vite-plugin-image-presets": "^0.3.1" }, "devDependencies": { "iles": "workspace:*", - "tsup": "6.1.2", - "typescript": "^4.4.4" + "tsup": "7.2.0", + "typescript": "^5.2.2" } } diff --git a/packages/mdx/package.json b/packages/mdx/package.json index 321a6373..53452b67 100644 --- a/packages/mdx/package.json +++ b/packages/mdx/package.json @@ -32,21 +32,21 @@ "@mdx-js/mdx": "2.3.0", "estree-walker": "^3.0", "hash-sum": "^2.0", - "hast-util-to-html": "^8.0.3", - "remark-frontmatter": "^4.0.1", + "hast-util-to-html": "^9.0.0", + "remark-frontmatter": "^5.0.0", "source-map": "^0.7.3", "unist-util-visit": "^4.1.0" }, "devDependencies": { - "@types/estree-jsx": "^0.0.1", + "@types/estree-jsx": "^1.0.1", "@types/hash-sum": "^1.0", "hast": "^1.0.0", - "hast-util-raw": "^7.2.1", - "mdast-util-mdx-expression": "^1.1.1", - "tsup": "6.1.2", - "typescript": "^4.4.4", - "unified": "^10.1", - "vfile": "^5.2.0", - "vite": "^4.4.0-beta.3" + "hast-util-raw": "^9.0.1", + "mdast-util-mdx-expression": "^2.0.0", + "tsup": "7.2.0", + "typescript": "^5.2.2", + "unified": "^11.0.0", + "vfile": "^6.0.1", + "vite": "^5.0.0-beta.6" } } diff --git a/packages/pages/package.json b/packages/pages/package.json index 4415863b..02e43fa8 100644 --- a/packages/pages/package.json +++ b/packages/pages/package.json @@ -33,7 +33,7 @@ "deep-equal": "^2.0.5", "fast-glob": "^3.2.11", "gray-matter": "^4.0.3", - "pathe": "^0.2.0" + "pathe": "^1.1.1" }, "peerDependencies": { "vue": "^3.3.4" @@ -41,9 +41,9 @@ "devDependencies": { "@types/deep-equal": "^1.0.1", "@types/js-yaml": "^4.0.0", - "tsup": "6.1.2", - "typescript": "^4.4.4", - "unified": "^10.1.0", + "tsup": "7.2.0", + "typescript": "^5.2.2", + "unified": "^11.0.0", "vue": "^3.3.4" } } diff --git a/packages/prerender/package.json b/packages/prerender/package.json index 62268864..565d9263 100644 --- a/packages/prerender/package.json +++ b/packages/prerender/package.json @@ -38,9 +38,9 @@ "preact-render-to-string": "^6.1.0", "solid-js": "^1.7.6", "svelte": "^4.0.0", - "tsup": "6.1.2", - "typescript": "^4.4.4", - "vite": "^4.4.0-beta.3", + "tsup": "7.2.0", + "typescript": "^5.2.2", + "vite": "^5.0.0-beta.6", "vue": "^3.3.4" } } diff --git a/packages/prism/package.json b/packages/prism/package.json index 1b5bd9d0..07aedc81 100644 --- a/packages/prism/package.json +++ b/packages/prism/package.json @@ -32,14 +32,14 @@ "unist-util-visit": "^4.1.0" }, "devDependencies": { - "@types/mdast": "^3.0.10", + "@types/mdast": "^4.0.0", "@types/prismjs": "^1.16.6", "iles": "workspace:*", - "tsup": "6.1.2", - "typescript": "^4.4.4", - "unified": "^10.1.0" + "tsup": "7.2.0", + "typescript": "^5.2.2", + "unified": "^11.0.0" }, "resolutions": { - "typescript": "4.4.4" + "typescript": "5.2.2" } } From 4173308aa2147185bb69c8a5d5d15e302070d3a0 Mon Sep 17 00:00:00 2001 From: Maximo Mussini Date: Tue, 10 Oct 2023 17:40:36 -0300 Subject: [PATCH 02/19] feat: replace @vueuse/head with @unhead/vue, bump target to node18 --- README.md | 4 +- docs/package.json | 10 +- docs/src/pages/config/index.mdx | 4 +- docs/src/pages/faqs/index.mdx | 4 +- docs/src/pages/guide/meta-tags.mdx | 8 +- package.json | 24 +- packages/excerpt/package.json | 1 + packages/excerpt/src/excerpt.ts | 5 +- packages/excerpt/src/rehype-plugin.ts | 6 +- packages/excerpt/src/types.ts | 2 +- packages/excerpt/tsup.config.ts | 2 +- packages/feed/tsup.config.ts | 2 +- packages/headings/src/headings.ts | 3 +- packages/headings/tsup.config.ts | 2 +- packages/hydration/package.json | 8 +- packages/icons/tsup.config.ts | 2 +- packages/iles/CHANGELOG.md | 6 +- packages/iles/package.json | 12 +- .../iles/src/client/app/components/App.vue | 2 +- packages/iles/src/client/app/index.ts | 6 +- packages/iles/src/client/index.ts | 2 +- packages/iles/src/node/alias.ts | 12 +- packages/iles/src/node/build/render.ts | 4 +- packages/iles/src/node/build/utils.ts | 5 +- packages/iles/src/node/config.ts | 11 +- .../iles/src/node/plugin/remarkWrapIslands.ts | 17 +- packages/iles/tests/resolvers.spec.ts | 2 +- packages/iles/tsup-cjs.config.ts | 2 +- packages/iles/tsup.config.ts | 2 +- packages/iles/types/shared.d.ts | 2 +- packages/images/tsup.config.ts | 2 +- packages/mdx/package.json | 2 +- packages/mdx/src/rehype-raw-expressions.ts | 9 +- packages/mdx/src/types.ts | 6 +- packages/mdx/tsup.config.ts | 2 +- packages/pages/tsup.config.ts | 2 +- packages/prerender/package.json | 8 +- packages/prerender/prerender.ts | 3 +- packages/prerender/tsup.config.ts | 2 +- packages/prism/package.json | 3 - packages/prism/tsup.config.ts | 2 +- packages/pwa/tsup.config.ts | 2 +- playground/the-vue-point/package.json | 2 +- pnpm-lock.yaml | 11459 +++++++--------- 44 files changed, 5418 insertions(+), 6258 deletions(-) diff --git a/README.md b/README.md index 97d2ddeb..83255c14 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Visit the [documentation website][docs] to check out the [guides][guide] and sea - [Vite] and [Vue]: for enabling an amazing development experience - [Astro](https://astro.build): for sharing a novel way to define islands - [MDX]: provides amazing flexibility when processing Markdown -- [vue-router], [@vueuse/head], and [vite-plugin-pages]: the backbone of this library +- [vue-router], [@unhead/vue], and [vite-plugin-pages]: the backbone of this library - [unplugin-vue-components]: allows you to avoid the boilerplate - [VitePress] and [vite-ssg]: for their different ideas on SSR @@ -96,5 +96,5 @@ Visit the [documentation website][docs] to check out the [guides][guide] and sea [VitePress]: https://vitepress.vuejs.org/ [vite-ssg]: https://github.com/antfu/vite-ssg [vue-router]: https://next.router.vuejs.org/ -[@vueuse/head]: https://github.com/vueuse/head +[@unhead/vue]: https://github.com/unjs/unhead diff --git a/docs/package.json b/docs/package.json index 700dd5af..5c4a086c 100644 --- a/docs/package.json +++ b/docs/package.json @@ -29,12 +29,12 @@ "cross-spawn": "^7.0.3", "iles": "workspace:*", "postcss-nesting": "^8.0.1", - "preact": "^10.11.2", - "preact-render-to-string": "^6.1.0", - "rehype-external-links": "^1.0.0", - "vite-plugin-inspect": "^0.7.29", + "preact": "^10.18.1", + "preact-render-to-string": "^6.2.2", + "rehype-external-links": "^3.0.0", + "vite-plugin-inspect": "^0.7.40", "vite-plugin-windicss": "^1.9.0", - "vue-tsc": "^0.29.8" + "vue-tsc": "^1.8.18" }, "dependencies": { "@docsearch/css": "^3.1.1", diff --git a/docs/src/pages/config/index.mdx b/docs/src/pages/config/index.mdx index 5c687456..aaabda19 100644 --- a/docs/src/pages/config/index.mdx +++ b/docs/src/pages/config/index.mdx @@ -191,7 +191,7 @@ export default defineApp({ - **Type:** `HeadObject | (context: AppContext) => HeadObject` -Set the page title, meta tags, additional CSS, or scripts using [`@vueuse/head`][@vueuse/head]. +Set the page title, meta tags, additional CSS, or scripts using [`@unhead/vue`][@unhead/vue]. ### `enhanceApp` @@ -266,5 +266,5 @@ export default defineConfig({ [vue-router]: https://next.router.vuejs.org/ -[@vueuse/head]: https://github.com/vueuse/head +[@unhead/vue]: https://github.com/@unhead/vue [site]: #the-site diff --git a/docs/src/pages/faqs/index.mdx b/docs/src/pages/faqs/index.mdx index ceee47fd..783c1414 100644 --- a/docs/src/pages/faqs/index.mdx +++ b/docs/src/pages/faqs/index.mdx @@ -94,11 +94,11 @@ Use Astro if you are not familiar with Vue, or don't like its template syntax. - [Vite.js] and [Vue]: for enabling an amazing development experience - [Astro](https://astro.build): for sharing a novel way to define islands - [MDX]: provides amazing flexibility when processing Markdown -- [vue-router], [@vueuse/head], and [vite-plugin-pages]: the backbone of this library +- [vue-router], [@unhead/vue], and [vite-plugin-pages]: the backbone of this library - [unplugin-vue-components]: allows you to avoid the boilerplate - [VitePress] and [vite-ssg]: for their different ideas on SSR [vue-router]: https://next.router.vuejs.org/ -[@vueuse/head]: https://github.com/vueuse/head +[@unhead/vue]: https://github.com/@unhead/vue diff --git a/docs/src/pages/guide/meta-tags.mdx b/docs/src/pages/guide/meta-tags.mdx index c05d8949..e33c48b5 100644 --- a/docs/src/pages/guide/meta-tags.mdx +++ b/docs/src/pages/guide/meta-tags.mdx @@ -1,6 +1,6 @@ -[@vueuse/head]: https://github.com/vueuse/head +[@unhead/vue]: https://github.com/@unhead/vue [app]: /config#your-app -[useHead]: https://github.com/vueuse/head#api +[useHead]: https://github.com/@unhead/vue#api [site]: /guide/development#site [frontmatter]: /guide/development#pages @@ -10,7 +10,7 @@ with page titles—specified in [frontmatter]—to set reasonable default values for commonly used meta tags. -There are several ways to customize `title` and `meta` tags in , powered by [@vueuse/head]. +There are several ways to customize `title` and `meta` tags in , powered by [@unhead/vue]. ## [`useHead` Composable][useHead] @@ -35,7 +35,7 @@ Notice that values can be static or computed. -## [`` Component](https://github.com/vueuse/head#head) +## [`` Component](https://github.com/@unhead/vue#head) Besides [useHead], you can also manipulate head tags using the `` component: diff --git a/package.json b/package.json index 476ae5be..6233781c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "root", "private": true, - "packageManager": "pnpm@7.1.3", + "packageManager": "pnpm@8.8.0", "type": "module", "scripts": { "build:all": "pnpm nx run-many --target=build --all --exclude docs --exclude vue-blog", @@ -22,19 +22,19 @@ "devDependencies": { "@mussi/eslint-config": "^0.5.1", "@mussi/stylelint-config": "^0.1.1", - "@nrwl/cli": "^13.8.1", - "@nrwl/nx-cloud": "^13.1.4", - "@nrwl/tao": "^13.8.1", - "@nrwl/workspace": "^13.8.1", - "iles": "*", - "concurrently": "^6.4.0", - "conventional-changelog-cli": "^2.1.1", - "enquirer": "^2.3.6", - "eslint": "^7.32.0", + "@nrwl/cli": "^13.10.6", + "@nrwl/nx-cloud": "^13.3.1", + "@nrwl/tao": "^13.10.6", + "@nrwl/workspace": "^13.10.6", + "concurrently": "^6.5.1", + "conventional-changelog-cli": "^2.2.2", + "enquirer": "^2.4.1", + "eslint": "^8.51.0", "execa": "^5.1.1", - "minimist": "^1.2.5", + "iles": "^0.9.5", + "minimist": "^1.2.8", "pkg-dir": "^6.0.1", - "semver": "^7.3.5", + "semver": "^7.5.4", "typescript": "5.2.2", "vitest": "^0.16.0" }, diff --git a/packages/excerpt/package.json b/packages/excerpt/package.json index 53da85b2..8b67ec23 100644 --- a/packages/excerpt/package.json +++ b/packages/excerpt/package.json @@ -34,6 +34,7 @@ "devDependencies": { "@types/estree": "^1.0.2", "@types/estree-jsx": "^0.0.1", + "@types/hast": "^3.0.0", "iles": "workspace:*", "tsup": "7.2.0", "typescript": "^5.2.2", diff --git a/packages/excerpt/src/excerpt.ts b/packages/excerpt/src/excerpt.ts index 45b489b7..8cae1524 100644 --- a/packages/excerpt/src/excerpt.ts +++ b/packages/excerpt/src/excerpt.ts @@ -1,5 +1,6 @@ import type { IlesModule } from 'iles' import type { ExcerptOptions, Options, SeparatorFn } from './types' +import type { Element, Comment } from 'hast' import { recmaPlugin } from './recma-plugin' import { rehypePlugin } from './rehype-plugin' @@ -42,10 +43,10 @@ function separatorFnFrom (separator: string | string[] | SeparatorFn): Separator const separators = new Set(Array.isArray(separator) ? separator : [separator]) return (node) => { - if (node.type === 'element') return separators.has(node.tagName) + if (node.type === 'element') return separators.has((node as Element).tagName) // @ts-ignore if (node.type === 'mdxJsxFlowElement') return separators.has(node.name) - if (node.type === 'comment') return separators.has(node.value.trim()) + if (node.type === 'comment') return separators.has((node as Comment).value.trim()) return false } } diff --git a/packages/excerpt/src/rehype-plugin.ts b/packages/excerpt/src/rehype-plugin.ts index d257b55f..77cbe898 100644 --- a/packages/excerpt/src/rehype-plugin.ts +++ b/packages/excerpt/src/rehype-plugin.ts @@ -1,7 +1,7 @@ import type { IlesModule } from 'iles' import type { Element } from 'hast' import type { Plugin } from 'unified' -import { Node, toString } from 'hast-util-to-string' +import { toString } from 'hast-util-to-string' import type { Options, SeparatorFn } from './types' /** @@ -31,14 +31,14 @@ export const rehypePlugin: Plugin<[Options], Element> = ({ extract, isSeparator, .filter(el => el.type !== 'element' || el.tagName !== 'h1') // Convert the elements of the excerpt to plain text. - excerpt = toString({ type: 'element', tagName: 'div', children: excerptElements }) + excerpt = toString({ type: 'element', tagName: 'div', children: excerptElements, properties: {} }) // Add marker for the recma plugin to split the excerpt and content. const separator = children[separatorIndex] children.splice(separatorIndex, // @ts-ignore replace with an `excerpt` HTML element separator?.type === 'mdxJsxFlowElement' ? 1 : 0, - { type: 'element', tagName: 'excerpt', children: [] }) + { type: 'element', tagName: 'excerpt', children: [], properties: {} }) } if (maxLength && excerpt.length > maxLength) diff --git a/packages/excerpt/src/types.ts b/packages/excerpt/src/types.ts index 8c96a393..8db64980 100644 --- a/packages/excerpt/src/types.ts +++ b/packages/excerpt/src/types.ts @@ -1,4 +1,4 @@ -import type { Node } from 'hast-util-to-string' +import type { Node } from 'hast' import type { VFile } from 'vfile' export type ExtractFn = (content: string, vfile: VFile) => string | undefined diff --git a/packages/excerpt/tsup.config.ts b/packages/excerpt/tsup.config.ts index f61d9e55..8b233802 100644 --- a/packages/excerpt/tsup.config.ts +++ b/packages/excerpt/tsup.config.ts @@ -2,7 +2,7 @@ import type { Options } from 'tsup' export const tsup: Options = { clean: true, dts: true, - target: 'node14', + target: 'node18', splitting: true, format: ['esm'], } diff --git a/packages/feed/tsup.config.ts b/packages/feed/tsup.config.ts index 60e2895d..cdb4a52e 100644 --- a/packages/feed/tsup.config.ts +++ b/packages/feed/tsup.config.ts @@ -2,7 +2,7 @@ import type { Options } from 'tsup' export const tsup: Options = { clean: true, dts: true, - target: 'node14', + target: 'node18', splitting: false, format: ['esm'], } diff --git a/packages/headings/src/headings.ts b/packages/headings/src/headings.ts index 26652613..6575c771 100644 --- a/packages/headings/src/headings.ts +++ b/packages/headings/src/headings.ts @@ -3,7 +3,8 @@ import type { Pluggable, Plugin } from 'unified' import type { Data, Parent } from 'unist' import type { IlesModule } from 'iles' -import { Node, toString } from 'hast-util-to-string' +import type { Node } from 'hast' +import { toString } from 'hast-util-to-string' import { headingRank } from 'hast-util-heading-rank' import slugo from 'slugo' diff --git a/packages/headings/tsup.config.ts b/packages/headings/tsup.config.ts index f61d9e55..8b233802 100644 --- a/packages/headings/tsup.config.ts +++ b/packages/headings/tsup.config.ts @@ -2,7 +2,7 @@ import type { Options } from 'tsup' export const tsup: Options = { clean: true, dts: true, - target: 'node14', + target: 'node18', splitting: true, format: ['esm'], } diff --git a/packages/hydration/package.json b/packages/hydration/package.json index 01299987..805ca569 100644 --- a/packages/hydration/package.json +++ b/packages/hydration/package.json @@ -37,10 +37,10 @@ "url": "https://github.com/ElMassimo/iles/issues" }, "devDependencies": { - "preact": "^10.15.1", - "preact-render-to-string": "^6.1.0", - "solid-js": "^1.7.6", - "svelte": "^4.0.0", + "preact": "^10.18.1", + "preact-render-to-string": "^6.2.2", + "solid-js": "^1.8.0", + "svelte": "^4.2.1", "tsup": "7.2.0", "typescript": "^5.2.2", "vite": "^5.0.0-beta.6", diff --git a/packages/icons/tsup.config.ts b/packages/icons/tsup.config.ts index de9ea659..0a7a57fe 100644 --- a/packages/icons/tsup.config.ts +++ b/packages/icons/tsup.config.ts @@ -2,7 +2,7 @@ import type { Options } from 'tsup' export const tsup: Options = { clean: true, dts: true, - target: 'node14', + target: 'node18', splitting: true, format: ['cjs'], } diff --git a/packages/iles/CHANGELOG.md b/packages/iles/CHANGELOG.md index 249dbbf0..e2325cf7 100644 --- a/packages/iles/CHANGELOG.md +++ b/packages/iles/CHANGELOG.md @@ -40,7 +40,7 @@ ### Features * bump vite-plugin-pwa dependency ([8346d11](https://github.com/ElMassimo/iles/commit/8346d11e5c188bfccae5fcce102b7834d1c513f1)) -* update version of @vueuse/head ([#219](https://github.com/ElMassimo/iles/issues/219)) ([353aa2f](https://github.com/ElMassimo/iles/commit/353aa2fc498797bdff3bfc19a8b60c2120c87082)), closes [#191](https://github.com/ElMassimo/iles/issues/191) +* update version of @unhead/vue ([#219](https://github.com/ElMassimo/iles/issues/219)) ([353aa2f](https://github.com/ElMassimo/iles/commit/353aa2fc498797bdff3bfc19a8b60c2120c87082)), closes [#191](https://github.com/ElMassimo/iles/issues/191) @@ -975,7 +975,7 @@ This release added support for Preact, SolidJS, and Svelte islands. * ensure iles dependencies are resolved without shamefully hoisting ([1cf863b](https://github.com/ElMassimo/iles/commit/1cf863b9d8310c89f4c289d07153e5720e84585d)) * explicitly import `performance` to support Node 14 (close [#7](https://github.com/ElMassimo/iles/issues/7)) ([66b22ff](https://github.com/ElMassimo/iles/commit/66b22ff43706d30550943d10a5d3b6224e5fbc95)) * frontmatter is always available and can be used to define head refs ([fad2eef](https://github.com/ElMassimo/iles/commit/fad2eef6aaec45689b820fdfe760cc0e6593e153)) -* import vueuse/head explicitly in App.vue ([47b50e3](https://github.com/ElMassimo/iles/commit/47b50e38f3eb2b7b6bdf34036fe63ee98a931ac8)) +* import @unhead/vue explicitly in App.vue ([47b50e3](https://github.com/ElMassimo/iles/commit/47b50e38f3eb2b7b6bdf34036fe63ee98a931ac8)) * inline JSX elements in MDX with client directives should be wrapped ([8f36e23](https://github.com/ElMassimo/iles/commit/8f36e23c93fca10721984f5133424d71c2191cd4)) * move esm dependencies to exclude ([9fd7e46](https://github.com/ElMassimo/iles/commit/9fd7e468fabac1d86b7a3fc98c69258bbc3e1500)) * prevent dep scan on layouts file ([170b79d](https://github.com/ElMassimo/iles/commit/170b79d7e9e75a2fa477433b60463e722a5c91b7)) @@ -1088,7 +1088,7 @@ This release added support for Preact, SolidJS, and Svelte islands. ### Bug Fixes -* import vueuse/head explicitly in App.vue ([47b50e3](https://github.com/ElMassimo/iles/commit/47b50e38f3eb2b7b6bdf34036fe63ee98a931ac8)) +* import @unhead/vue explicitly in App.vue ([47b50e3](https://github.com/ElMassimo/iles/commit/47b50e38f3eb2b7b6bdf34036fe63ee98a931ac8)) ### Features diff --git a/packages/iles/package.json b/packages/iles/package.json index 69e730ae..a99f5ee8 100644 --- a/packages/iles/package.json +++ b/packages/iles/package.json @@ -69,6 +69,7 @@ "@vitejs/plugin-vue": "^4.4.0", "@vue/devtools-api": "^6.5.1", "@unhead/vue": "^1.7.4", + "@unhead/ssr": "^1.7.4", "debug": "^4.3.4", "deep-equal": "^2.2.2", "es-module-lexer": "^1.3.1", @@ -91,8 +92,8 @@ "@types/debug": "^4.1.9", "@types/fs-extra": "^9.0.12", "@types/micromatch": "^4.0.2", - "@types/node": "^17.0.42", - "@types/unist": "^2.0.6", + "@types/node": "^18.0.0", + "@types/unist": "^3.0.0", "chokidar": "^3", "conventional-changelog-cli": "^2.1.1", "enquirer": "^2", @@ -111,12 +112,5 @@ "typescript": "^5.2.2", "vfile": "^6.0.1", "vite-plugin-solid": "^2.7.0" - }, - "pnpm": { - "overrides": { - "fast-glob": "^3.3.1", - "find-up": "6.3.0", - "micromatch": "^4.0.5" - } } } diff --git a/packages/iles/src/client/app/components/App.vue b/packages/iles/src/client/app/components/App.vue index 56e5916f..5a793f57 100644 --- a/packages/iles/src/client/app/components/App.vue +++ b/packages/iles/src/client/app/components/App.vue @@ -1,6 +1,6 @@