Skip to content

Commit

Permalink
chore: fix old config not compatiable with latest tsc version error
Browse files Browse the repository at this point in the history
  • Loading branch information
preflower committed May 6, 2024
1 parent bc0635c commit f2daf5e
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/pink-walls-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@preflower/vue-use": patch
---

Fix old config not compatiable with latest tsc version error
4 changes: 2 additions & 2 deletions packages/react-use/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"types": "lib/index.d.ts",
"typings": "lib/index.d.ts",
"scripts": {
"build:cjs": "tsc",
"build:es": "tsc -m esNext --outDir esm",
"build:cjs": "tsc --outDir lib",
"build:es": "tsc -m esNext --moduleResolution bundler --outDir esm",
"build": "pnpm build:cjs && pnpm build:es",
"ci:version": "pnpm changeset version && pnpm install --lockfile-only",
"ci:publish": "pnpm build && pnpm changeset publish"
Expand Down
7 changes: 6 additions & 1 deletion packages/react-use/tsconfig.json
4 changes: 2 additions & 2 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"types": "lib/index.d.ts",
"typings": "lib/index.d.ts",
"scripts": {
"build:cjs": "tsc",
"build:es": "tsc -m esNext --outDir esm",
"build:cjs": "tsc --outDir lib",
"build:es": "tsc -m esNext --moduleResolution bundler --outDir esm",
"build": "pnpm build:cjs && pnpm build:es",
"ci:version": "pnpm changeset version && pnpm install --lockfile-only",
"ci:publish": "pnpm build && pnpm changeset publish"
Expand Down
7 changes: 6 additions & 1 deletion packages/utils/tsconfig.json
5 changes: 3 additions & 2 deletions packages/vue-use/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"name": "@preflower/vue-use",
"version": "1.1.0",
"description": "A vue use library for self",
"type": "module",
"main": "lib/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
"typings": "lib/index.d.ts",
"scripts": {
"build:cjs": "tsc",
"build:es": "tsc -m esNext --outDir esm",
"build:cjs": "tsc --outDir lib",
"build:es": "tsc -m esnext --moduleResolution bundler --outDir esm",
"build": "pnpm build:cjs && pnpm build:es",
"ci:version": "pnpm changeset version && pnpm install --lockfile-only",
"ci:publish": "pnpm build && pnpm changeset publish"
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-use/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { useKeyboardDetector } from './use-keyboard-detector'

export * from './typescript'
export type * from './typescript'
2 changes: 1 addition & 1 deletion packages/vue-use/src/typescript.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type AllowedComponentProps, type Component, type VNodeProps } from 'vue'
import type { AllowedComponentProps, Component, VNodeProps } from 'vue'

export type ComponentProps<C extends Component> = C extends new (...args: any) => any
? Omit<InstanceType<C>['$props'], keyof VNodeProps | keyof AllowedComponentProps>
Expand Down
7 changes: 6 additions & 1 deletion packages/vue-use/tsconfig.json
5 changes: 2 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */

/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
"module": "CommonJS", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
"moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
Expand Down Expand Up @@ -107,6 +106,6 @@
"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"include": [
"**/src/"
"**/src/",
]
}

0 comments on commit f2daf5e

Please sign in to comment.