Skip to content

Commit

Permalink
chore: add proper dependencies
Browse files Browse the repository at this point in the history
We were only declaring `devDependencies`, so this refactors the `package.json` to use `dependencies` and `peerDependencies` when it makes sense.
`@vue/runtime-core` was also used in some imports, where we could use `vue` directly, so this commit changes this as well.
  • Loading branch information
cexbrayat committed Jan 26, 2023
1 parent 1d76ebd commit cfdbe83
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 32 deletions.
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -21,6 +21,9 @@
"README.md",
"dist/index.d.ts"
],
"dependencies": {
"js-beautify": "1.14.6"
},
"devDependencies": {
"@rollup/plugin-commonjs": "24.0.0",
"@rollup/plugin-json": "6.0.0",
Expand All @@ -37,13 +40,11 @@
"@vue/compat": "3.2.45",
"@vue/compiler-dom": "3.2.45",
"@vue/compiler-sfc": "3.2.45",
"@vue/runtime-core": "3.2.45",
"c8": "7.12.0",
"eslint": "8.32.0",
"eslint-config-prettier": "8.6.0",
"eslint-plugin-prettier": "4.2.1",
"husky": "8.0.3",
"js-beautify": "1.14.6",
"jsdom": "21.0.0",
"jsdom-global": "3.0.2",
"lint-staged": "13.1.0",
Expand All @@ -63,6 +64,7 @@
"vuex": "4.1.0"
},
"peerDependencies": {
"@vue/compiler-dom": "^3.0.1",
"vue": "^3.0.1"
},
"author": {
Expand Down
41 changes: 16 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/utils/componentName.ts
@@ -1,5 +1,4 @@
import { ComponentInternalInstance } from '@vue/runtime-core'
import { VNodeTypes } from 'vue'
import { ComponentInternalInstance, VNodeTypes } from 'vue'
import { isFunctionalComponent, isObjectComponent } from '../utils'
import {
isLegacyExtendedComponent,
Expand Down
4 changes: 2 additions & 2 deletions src/vueWrapper.ts
Expand Up @@ -2,7 +2,8 @@ import {
nextTick,
App,
ComponentCustomProperties,
ComponentPublicInstance
ComponentPublicInstance,
VNode
} from 'vue'

import { config } from './config'
Expand All @@ -18,7 +19,6 @@ import {
registerFactory,
WrapperType
} from './wrapperFactory'
import { VNode } from '@vue/runtime-core'
import { ShapeFlags } from './utils/vueShared'

/**
Expand Down
2 changes: 1 addition & 1 deletion types/testing.d.ts
@@ -1,6 +1,6 @@
import type { Router } from 'vue-router'

declare module '@vue/runtime-core' {
declare module 'vue' {
interface ComponentCustomProperties {
$router: Router
$t: (key: string) => string
Expand Down

0 comments on commit cfdbe83

Please sign in to comment.