Skip to content

Commit

Permalink
fix(types): add missing shared types (#3212)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin authored Nov 13, 2024
1 parent aaa3fe4 commit ff95738
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Setup development
run: pnpm dev:prepare
- name: Building
run: pnpm build

- name: Linting
run: pnpm lint
Expand Down
5 changes: 5 additions & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({
entries: [
'src/module',
// Chunking
'src/types'
],
externals: ['node:fs', 'node:url', 'webpack', '@babel/parser', 'unplugin-vue-router', 'unplugin-vue-router/options']
})
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"exports": {
".": {
"types": "./dist/types.d.mts",
"import": "./dist/module.mjs"
"default": "./dist/module.mjs"
},
"./package.json": "./package.json"
},
Expand Down Expand Up @@ -72,7 +72,7 @@
"lint": "run-p \"lint:* {@}\" --",
"lint:prettier": "prettier . --check",
"lint:eslint": "eslint .",
"test": "pnpm dev:prepare && run-s test:types test:unit test:spec",
"test": "pnpm build && run-s test:types test:unit test:spec",
"test:types": "tsc --noEmit",
"test:unit": "vitest run test",
"test:spec": "vitest run specs"
Expand Down
4 changes: 2 additions & 2 deletions specs/fixtures/issues/2590/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const { locale, locales, setLocale } = useI18n()
const head = useLocaleHead()
useHead(() => {
useHead(() => ({
htmlAttrs: head.value.htmlAttrs
})
}))
console.log(head.value.htmlAttrs)
Expand Down
4 changes: 2 additions & 2 deletions specs/fixtures/restructure/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ watchEffect(() => {
refresh()
})
useHead(() => {
useHead(() => ({
title: t('home'),
htmlAttrs: {
lang: i18nHead.value.htmlAttrs!.lang
},
link: [...(i18nHead.value.link || [])],
meta: [...(i18nHead.value.meta || [])]
})
}))
</script>

<template>
Expand Down
1 change: 0 additions & 1 deletion src/runtime/composables/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */
import { useRequestHeaders, useCookie as useNuxtCookie } from '#imports'
import { ref, computed, watch, onUnmounted, unref } from 'vue'
import { parseAcceptLanguage, wrapComposable, runtimeDetectBrowserLanguage } from '../internal'
Expand Down

0 comments on commit ff95738

Please sign in to comment.