diff --git a/packages/background/package.json b/packages/background/package.json index ea8184f0..d0a8c92b 100644 --- a/packages/background/package.json +++ b/packages/background/package.json @@ -25,7 +25,7 @@ "build": "vite build", "types": "vue-tsc --declaration --emitDeclarationOnly && pnpm lint:dist", "lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix .", - "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix ./dist", + "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist", "test": "exit 0" }, "peerDependencies": { @@ -36,6 +36,7 @@ "devDependencies": { "@vue-flow/core": "workspace:*", "@vue-flow/eslint-config": "workspace:*", + "@vue-flow/tsconfig": "workspace:*", "@vitejs/plugin-vue": "^4.0.0", "unplugin-auto-import": "^0.14.4", "vite": "^4.1.3", diff --git a/packages/background/src/auto-imports.d.ts b/packages/background/src/auto-imports.d.ts index 05f84c95..8defdfb0 100644 --- a/packages/background/src/auto-imports.d.ts +++ b/packages/background/src/auto-imports.d.ts @@ -1,4 +1,7 @@ -// Generated by 'unplugin-auto-import' +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-auto-import export {} declare global { const $$: typeof import('vue/macros')['$$'] @@ -43,7 +46,6 @@ declare global { const readonly: typeof import('vue')['readonly'] const ref: typeof import('vue')['ref'] const resolveComponent: typeof import('vue')['resolveComponent'] - const resolveDirective: typeof import('vue')['resolveDirective'] const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowRef: typeof import('vue')['shallowRef'] @@ -61,3 +63,8 @@ declare global { const watchPostEffect: typeof import('vue')['watchPostEffect'] const watchSyncEffect: typeof import('vue')['watchSyncEffect'] } +// for type re-export +declare global { + // @ts-ignore + export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue' +} diff --git a/packages/background/tsconfig.json b/packages/background/tsconfig.json index e9fd0ac1..71c1c077 100644 --- a/packages/background/tsconfig.json +++ b/packages/background/tsconfig.json @@ -1,31 +1,14 @@ { + "extends": "@vue-flow/tsconfig/base", "compilerOptions": { "baseUrl": ".", - "module": "ESNext", - "target": "es2017", - "lib": [ - "DOM", - "ESNext" - ], - "strict": true, - "esModuleInterop": true, - "incremental": false, - "skipLibCheck": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "noUnusedLocals": false, - "strictNullChecks": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, "declarationDir": "./dist", - "emitDeclarationOnly": true, - "types": [], + "types": [ + "vite/client", + "vue/macros" + ] }, "include": [ - "./src", - ], - "exclude": [ - "node_modules", - "dist" + "./src" ] } diff --git a/packages/controls/package.json b/packages/controls/package.json index 3660b864..33aeb89b 100644 --- a/packages/controls/package.json +++ b/packages/controls/package.json @@ -25,7 +25,7 @@ "build": "vite build", "types": "vue-tsc --declaration --emitDeclarationOnly && pnpm lint:dist", "lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix .", - "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix ./dist", + "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist", "test": "exit 0" }, "peerDependencies": { @@ -36,6 +36,7 @@ "devDependencies": { "@vue-flow/core": "workspace:*", "@vue-flow/eslint-config": "workspace:*", + "@vue-flow/tsconfig": "workspace:*", "@vitejs/plugin-vue": "^4.0.0", "unplugin-auto-import": "^0.14.4", "vite": "^4.1.3", diff --git a/packages/controls/src/auto-imports.d.ts b/packages/controls/src/auto-imports.d.ts index 05f84c95..8defdfb0 100644 --- a/packages/controls/src/auto-imports.d.ts +++ b/packages/controls/src/auto-imports.d.ts @@ -1,4 +1,7 @@ -// Generated by 'unplugin-auto-import' +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-auto-import export {} declare global { const $$: typeof import('vue/macros')['$$'] @@ -43,7 +46,6 @@ declare global { const readonly: typeof import('vue')['readonly'] const ref: typeof import('vue')['ref'] const resolveComponent: typeof import('vue')['resolveComponent'] - const resolveDirective: typeof import('vue')['resolveDirective'] const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowRef: typeof import('vue')['shallowRef'] @@ -61,3 +63,8 @@ declare global { const watchPostEffect: typeof import('vue')['watchPostEffect'] const watchSyncEffect: typeof import('vue')['watchSyncEffect'] } +// for type re-export +declare global { + // @ts-ignore + export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue' +} diff --git a/packages/controls/tsconfig.json b/packages/controls/tsconfig.json index 06cb7996..71c1c077 100644 --- a/packages/controls/tsconfig.json +++ b/packages/controls/tsconfig.json @@ -1,31 +1,14 @@ { + "extends": "@vue-flow/tsconfig/base", "compilerOptions": { "baseUrl": ".", - "module": "ESNext", - "target": "es2017", - "lib": [ - "DOM", - "ESNext" - ], - "strict": true, - "esModuleInterop": true, - "incremental": false, - "skipLibCheck": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "noUnusedLocals": false, - "strictNullChecks": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, "declarationDir": "./dist", - "emitDeclarationOnly": true, - "types": ["vite/client", "vue/macros"] + "types": [ + "vite/client", + "vue/macros" + ] }, "include": [ - "./src", - ], - "exclude": [ - "node_modules", - "dist" + "./src" ] } diff --git a/packages/core/package.json b/packages/core/package.json index b7179572..c12293eb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -30,7 +30,7 @@ "patch": "node patch/slots.js", "theme": "postcss src/style.css -o dist/style.css && postcss src/theme-default.css -o dist/theme-default.css", "lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix .", - "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix ./dist", + "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist", "prepublishOnly": "shx cp ../../README.md .", "postpublish": "shx rm README.md && git commit -a -m \"chore: bump version\"", "test": "exit 0" @@ -48,6 +48,7 @@ "@rollup/plugin-replace": "^5.0.2", "@types/d3": "^7.4.0", "@vue-flow/eslint-config": "workspace:*", + "@vue-flow/tsconfig": "workspace:*", "@vitejs/plugin-vue": "^4.0.0", "autoprefixer": "^10.4.13", "postcss": "^8.4.21", diff --git a/packages/core/src/auto-imports.d.ts b/packages/core/src/auto-imports.d.ts index 5bd5f20f..f2f47d8a 100644 --- a/packages/core/src/auto-imports.d.ts +++ b/packages/core/src/auto-imports.d.ts @@ -1,4 +1,7 @@ -// Generated by 'unplugin-auto-import' +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-auto-import export {} declare global { const $$: typeof import('vue/macros')['$$'] @@ -165,7 +168,6 @@ declare global { const rendererPointToPoint: typeof import('./utils/graph')['rendererPointToPoint'] const resetRecentHandle: typeof import('./utils/handle')['resetRecentHandle'] const resolveComponent: typeof import('vue')['resolveComponent'] - const resolveDirective: typeof import('vue')['resolveDirective'] const resolveRef: typeof import('@vueuse/core')['resolveRef'] const resolveUnref: typeof import('@vueuse/core')['resolveUnref'] const shallowReactive: typeof import('vue')['shallowReactive'] @@ -197,6 +199,7 @@ declare global { const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter'] const useArrayFind: typeof import('@vueuse/core')['useArrayFind'] const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex'] + const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast'] const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin'] const useArrayMap: typeof import('@vueuse/core')['useArrayMap'] const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce'] @@ -301,6 +304,7 @@ declare global { const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark'] const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages'] const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion'] + const usePrevious: typeof import('@vueuse/core')['usePrevious'] const useRafFn: typeof import('@vueuse/core')['useRafFn'] const useRefHistory: typeof import('@vueuse/core')['useRefHistory'] const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver'] @@ -374,3 +378,8 @@ declare global { const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter'] const whenever: typeof import('@vueuse/core')['whenever'] } +// for type re-export +declare global { + // @ts-ignore + export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue' +} diff --git a/packages/core/tsconfig.build.json b/packages/core/tsconfig.build.json index ac297b36..eb754e60 100644 --- a/packages/core/tsconfig.build.json +++ b/packages/core/tsconfig.build.json @@ -1,32 +1,6 @@ { + "extends": "./tsconfig", "compilerOptions": { - "preserveSymlinks": true, - "outDir": "./tmp", - "baseUrl": ".", - "module": "ESNext", - "target": "es2017", - "lib": ["DOM", "ESNext"], - "declaration": true, - "declarationDir": "./dist", - "strict": true, - "esModuleInterop": true, - "incremental": false, - "skipLibCheck": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "noUnusedLocals": false, - "strictNullChecks": true, - "forceConsistentCasingInFileNames": true, - "types": ["vite/client", "vue/macros"], - "jsx": "preserve", - "paths": { - "~/*": ["src/*"] - }, - "plugins": [ - // Transform paths in output .d.ts files (Include this line if you output declarations files) - { "transform": "typescript-transform-paths", "afterDeclarations": true } - ] - }, - "include": ["src"], - "exclude": ["node_modules", "dist"] + "outDir": "./tmp" + } } diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 595bb2c5..c5496497 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,32 +1,27 @@ { + "extends": "@vue-flow/tsconfig/base", "compilerOptions": { - "preserveSymlinks": true, "baseUrl": ".", - "module": "ESNext", - "target": "es2017", - "lib": ["DOM", "ESNext"], - "strict": true, - "esModuleInterop": true, - "incremental": false, - "skipLibCheck": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "noUnusedLocals": false, - "strictNullChecks": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, "declarationDir": "./dist", - "types": ["vite", "vue/macros", "unplugin-vue-macros/macros-global"], - "jsx": "preserve", + "types": [ + "vite/client", + "vue/macros", + "unplugin-vue-macros/macros-global" + ], "paths": { - "~/*": ["src/*"] + "~/*": [ + "src/*" + ] }, "plugins": [ // Transform paths in output .d.ts files (Include this line if you output declarations files) - { "transform": "typescript-transform-paths", "afterDeclarations": true } + { + "transform": "typescript-transform-paths", + "afterDeclarations": true + } ] }, - "include": ["./src"], - "exclude": ["node_modules", "dist"], - "references": [{ "path": "./tsconfig.node.json" }] + "include": [ + "./src" + ] } diff --git a/packages/core/tsconfig.node.json b/packages/core/tsconfig.node.json deleted file mode 100644 index 6dacac71..00000000 --- a/packages/core/tsconfig.node.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"], - "files": ["package.json"] -} diff --git a/packages/minimap/package.json b/packages/minimap/package.json index e20be4e2..ee44d053 100644 --- a/packages/minimap/package.json +++ b/packages/minimap/package.json @@ -25,7 +25,7 @@ "build": "vite build", "types": "vue-tsc --declaration --emitDeclarationOnly && pnpm lint:dist", "lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix .", - "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix ./dist", + "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist", "test": "exit 0" }, "peerDependencies": { @@ -41,6 +41,7 @@ "@types/d3-zoom": "^3.0.1", "@vue-flow/core": "workspace:*", "@vue-flow/eslint-config": "workspace:*", + "@vue-flow/tsconfig": "workspace:*", "@vitejs/plugin-vue": "^4.0.0", "unplugin-auto-import": "^0.14.4", "vite": "^4.1.3", diff --git a/packages/minimap/src/auto-imports.d.ts b/packages/minimap/src/auto-imports.d.ts index 05f84c95..8defdfb0 100644 --- a/packages/minimap/src/auto-imports.d.ts +++ b/packages/minimap/src/auto-imports.d.ts @@ -1,4 +1,7 @@ -// Generated by 'unplugin-auto-import' +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-auto-import export {} declare global { const $$: typeof import('vue/macros')['$$'] @@ -43,7 +46,6 @@ declare global { const readonly: typeof import('vue')['readonly'] const ref: typeof import('vue')['ref'] const resolveComponent: typeof import('vue')['resolveComponent'] - const resolveDirective: typeof import('vue')['resolveDirective'] const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowRef: typeof import('vue')['shallowRef'] @@ -61,3 +63,8 @@ declare global { const watchPostEffect: typeof import('vue')['watchPostEffect'] const watchSyncEffect: typeof import('vue')['watchSyncEffect'] } +// for type re-export +declare global { + // @ts-ignore + export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue' +} diff --git a/packages/minimap/tsconfig.json b/packages/minimap/tsconfig.json index e9fd0ac1..71c1c077 100644 --- a/packages/minimap/tsconfig.json +++ b/packages/minimap/tsconfig.json @@ -1,31 +1,14 @@ { + "extends": "@vue-flow/tsconfig/base", "compilerOptions": { "baseUrl": ".", - "module": "ESNext", - "target": "es2017", - "lib": [ - "DOM", - "ESNext" - ], - "strict": true, - "esModuleInterop": true, - "incremental": false, - "skipLibCheck": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "noUnusedLocals": false, - "strictNullChecks": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, "declarationDir": "./dist", - "emitDeclarationOnly": true, - "types": [], + "types": [ + "vite/client", + "vue/macros" + ] }, "include": [ - "./src", - ], - "exclude": [ - "node_modules", - "dist" + "./src" ] } diff --git a/packages/node-resizer/package.json b/packages/node-resizer/package.json index d1593251..d49890a5 100644 --- a/packages/node-resizer/package.json +++ b/packages/node-resizer/package.json @@ -25,7 +25,7 @@ "build": "vite build", "types": "vue-tsc --declaration --emitDeclarationOnly && pnpm lint:dist", "lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix .", - "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix ./dist", + "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist", "test": "exit 0" }, "peerDependencies": { @@ -41,6 +41,7 @@ "@types/d3-selection": "^3.0.3", "@vue-flow/core": "workspace:*", "@vue-flow/eslint-config": "workspace:*", + "@vue-flow/tsconfig": "workspace:*", "@vitejs/plugin-vue": "^4.0.0", "unplugin-auto-import": "^0.14.4", "vite": "^4.1.3", diff --git a/packages/node-resizer/src/auto-imports.d.ts b/packages/node-resizer/src/auto-imports.d.ts index 05f84c95..8defdfb0 100644 --- a/packages/node-resizer/src/auto-imports.d.ts +++ b/packages/node-resizer/src/auto-imports.d.ts @@ -1,4 +1,7 @@ -// Generated by 'unplugin-auto-import' +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-auto-import export {} declare global { const $$: typeof import('vue/macros')['$$'] @@ -43,7 +46,6 @@ declare global { const readonly: typeof import('vue')['readonly'] const ref: typeof import('vue')['ref'] const resolveComponent: typeof import('vue')['resolveComponent'] - const resolveDirective: typeof import('vue')['resolveDirective'] const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowRef: typeof import('vue')['shallowRef'] @@ -61,3 +63,8 @@ declare global { const watchPostEffect: typeof import('vue')['watchPostEffect'] const watchSyncEffect: typeof import('vue')['watchSyncEffect'] } +// for type re-export +declare global { + // @ts-ignore + export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue' +} diff --git a/packages/node-resizer/tsconfig.json b/packages/node-resizer/tsconfig.json index e9fd0ac1..71c1c077 100644 --- a/packages/node-resizer/tsconfig.json +++ b/packages/node-resizer/tsconfig.json @@ -1,31 +1,14 @@ { + "extends": "@vue-flow/tsconfig/base", "compilerOptions": { "baseUrl": ".", - "module": "ESNext", - "target": "es2017", - "lib": [ - "DOM", - "ESNext" - ], - "strict": true, - "esModuleInterop": true, - "incremental": false, - "skipLibCheck": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "noUnusedLocals": false, - "strictNullChecks": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, "declarationDir": "./dist", - "emitDeclarationOnly": true, - "types": [], + "types": [ + "vite/client", + "vue/macros" + ] }, "include": [ - "./src", - ], - "exclude": [ - "node_modules", - "dist" + "./src" ] } diff --git a/packages/node-toolbar/package.json b/packages/node-toolbar/package.json index 8144e671..ef07ac3a 100644 --- a/packages/node-toolbar/package.json +++ b/packages/node-toolbar/package.json @@ -25,7 +25,7 @@ "build": "vite build", "types": "vue-tsc --declaration --emitDeclarationOnly && pnpm lint:dist", "lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix .", - "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix ./dist", + "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist", "test": "exit 0" }, "peerDependencies": { @@ -36,6 +36,7 @@ "devDependencies": { "@vue-flow/core": "workspace:*", "@vue-flow/eslint-config": "workspace:*", + "@vue-flow/tsconfig": "workspace:*", "@vitejs/plugin-vue": "^4.0.0", "unplugin-auto-import": "^0.14.4", "vite": "^4.1.3", diff --git a/packages/node-toolbar/src/auto-imports.d.ts b/packages/node-toolbar/src/auto-imports.d.ts index 05f84c95..8defdfb0 100644 --- a/packages/node-toolbar/src/auto-imports.d.ts +++ b/packages/node-toolbar/src/auto-imports.d.ts @@ -1,4 +1,7 @@ -// Generated by 'unplugin-auto-import' +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-auto-import export {} declare global { const $$: typeof import('vue/macros')['$$'] @@ -43,7 +46,6 @@ declare global { const readonly: typeof import('vue')['readonly'] const ref: typeof import('vue')['ref'] const resolveComponent: typeof import('vue')['resolveComponent'] - const resolveDirective: typeof import('vue')['resolveDirective'] const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowRef: typeof import('vue')['shallowRef'] @@ -61,3 +63,8 @@ declare global { const watchPostEffect: typeof import('vue')['watchPostEffect'] const watchSyncEffect: typeof import('vue')['watchSyncEffect'] } +// for type re-export +declare global { + // @ts-ignore + export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue' +} diff --git a/packages/node-toolbar/tsconfig.json b/packages/node-toolbar/tsconfig.json index e9fd0ac1..71c1c077 100644 --- a/packages/node-toolbar/tsconfig.json +++ b/packages/node-toolbar/tsconfig.json @@ -1,31 +1,14 @@ { + "extends": "@vue-flow/tsconfig/base", "compilerOptions": { "baseUrl": ".", - "module": "ESNext", - "target": "es2017", - "lib": [ - "DOM", - "ESNext" - ], - "strict": true, - "esModuleInterop": true, - "incremental": false, - "skipLibCheck": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "noUnusedLocals": false, - "strictNullChecks": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, "declarationDir": "./dist", - "emitDeclarationOnly": true, - "types": [], + "types": [ + "vite/client", + "vue/macros" + ] }, "include": [ - "./src", - ], - "exclude": [ - "node_modules", - "dist" + "./src" ] } diff --git a/packages/pathfinding-edge/package.json b/packages/pathfinding-edge/package.json index 35477cb1..2cf4819e 100644 --- a/packages/pathfinding-edge/package.json +++ b/packages/pathfinding-edge/package.json @@ -24,8 +24,7 @@ "types": "pnpm prepare && vue-tsc --declaration --emitDeclarationOnly && shx rm -rf tmp", "postbuild": "shx rm -rf tmp", "test": "exit 0;", - "lint:js": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix .", - "lint": "pnpm lint:js" + "lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix ." }, "dependencies": { "pathfinding": "^0.4.18", @@ -34,6 +33,7 @@ "devDependencies": { "@vue-flow/core": "workspace:*", "@vue-flow/eslint-config": "workspace:*", + "@vue-flow/tsconfig": "workspace:*", "@types/pathfinding": "^0.0.6", "@vitejs/plugin-vue": "^4.0.0", "ts-patch": "^2.1.0", diff --git a/packages/pathfinding-edge/src/auto-imports.d.ts b/packages/pathfinding-edge/src/auto-imports.d.ts index ba90363b..5adae20e 100644 --- a/packages/pathfinding-edge/src/auto-imports.d.ts +++ b/packages/pathfinding-edge/src/auto-imports.d.ts @@ -1,4 +1,7 @@ -// Generated by 'unplugin-auto-import' +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-auto-import export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] @@ -36,7 +39,6 @@ declare global { const readonly: typeof import('vue')['readonly'] const ref: typeof import('vue')['ref'] const resolveComponent: typeof import('vue')['resolveComponent'] - const resolveDirective: typeof import('vue')['resolveDirective'] const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowRef: typeof import('vue')['shallowRef'] @@ -54,3 +56,8 @@ declare global { const watchPostEffect: typeof import('vue')['watchPostEffect'] const watchSyncEffect: typeof import('vue')['watchSyncEffect'] } +// for type re-export +declare global { + // @ts-ignore + export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue' +} diff --git a/packages/pathfinding-edge/tsconfig.json b/packages/pathfinding-edge/tsconfig.json index a1b6ebe7..71c1c077 100644 --- a/packages/pathfinding-edge/tsconfig.json +++ b/packages/pathfinding-edge/tsconfig.json @@ -1,30 +1,14 @@ { + "extends": "@vue-flow/tsconfig/base", "compilerOptions": { "baseUrl": ".", - "module": "ESNext", - "target": "es2017", - "lib": ["DOM", "ESNext"], - "strict": true, - "esModuleInterop": true, - "incremental": false, - "skipLibCheck": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "noUnusedLocals": false, - "strictNullChecks": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, "declarationDir": "./dist", - "types": ["vite/client", "vue/macros"], - "paths": { - "~/*": ["src/*"] - }, - "plugins": [ - // Transform paths in output .d.ts files (Include this line if you output declarations files) - { "transform": "typescript-transform-paths", "afterDeclarations": true } + "types": [ + "vite/client", + "vue/macros" ] }, - "include": ["./src"], - "exclude": ["node_modules", "dist"], - "references": [{ "path": "./tsconfig.node.json" }] + "include": [ + "./src" + ] } diff --git a/packages/pathfinding-edge/tsconfig.node.json b/packages/pathfinding-edge/tsconfig.node.json deleted file mode 100644 index 6dacac71..00000000 --- a/packages/pathfinding-edge/tsconfig.node.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"], - "files": ["package.json"] -} diff --git a/packages/vue-flow/package.json b/packages/vue-flow/package.json index e82a899e..75694dcd 100644 --- a/packages/vue-flow/package.json +++ b/packages/vue-flow/package.json @@ -26,9 +26,7 @@ "types": "tsc && shx rm -rf tmp && pnpm lint:dist", "theme": "postcss src/style.css -o dist/style.css && postcss src/theme-default.css -o dist/theme-default.css", "lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix .", - "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix ./dist", - "prepublishOnly": "shx cp ../../README.md .", - "postpublish": "shx rm README.md && git commit -a -m \"chore: bump version\"", + "lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix --ignore-pattern !**/* ./dist", "test": "exit 0" }, "peerDependencies": { @@ -39,6 +37,7 @@ "@vue-flow/controls": "workspace:*", "@vue-flow/core": "workspace:*", "@vue-flow/eslint-config": "workspace:*", + "@vue-flow/tsconfig": "workspace:*", "@vue-flow/minimap": "workspace:*" }, "devDependencies": { @@ -51,9 +50,5 @@ "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" - }, - "np": { - "branch": "master", - "message": "v%s" } } diff --git a/packages/vue-flow/tsconfig.json b/packages/vue-flow/tsconfig.json index 5bca51d4..71c1c077 100644 --- a/packages/vue-flow/tsconfig.json +++ b/packages/vue-flow/tsconfig.json @@ -1,29 +1,14 @@ { + "extends": "@vue-flow/tsconfig/base", "compilerOptions": { - "preserveSymlinks": true, "baseUrl": ".", - "module": "ESNext", - "target": "es2017", - "lib": ["DOM", "ESNext"], - "strict": true, - "esModuleInterop": true, - "incremental": false, - "skipLibCheck": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "noUnusedLocals": false, - "strictNullChecks": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, "declarationDir": "./dist", - "emitDeclarationOnly": true, - "types": ["vite/client"], - "jsx": "preserve", - "paths": { - "~/*": ["src/*"] - } + "types": [ + "vite/client", + "vue/macros" + ] }, - "include": ["./src"], - "exclude": ["node_modules", "dist"], - "references": [{ "path": "./tsconfig.node.json" }] + "include": [ + "./src" + ] } diff --git a/packages/vue-flow/tsconfig.node.json b/packages/vue-flow/tsconfig.node.json deleted file mode 100644 index 6dacac71..00000000 --- a/packages/vue-flow/tsconfig.node.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"], - "files": ["package.json"] -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3ee5613f..53ca6014 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -179,6 +179,7 @@ importers: '@vitejs/plugin-vue': ^4.0.0 '@vue-flow/core': workspace:* '@vue-flow/eslint-config': workspace:* + '@vue-flow/tsconfig': workspace:* unplugin-auto-import: ^0.14.4 vite: ^4.1.3 vite-plugin-vue-type-imports: ^0.2.4 @@ -190,6 +191,7 @@ importers: '@vitejs/plugin-vue': 4.0.0_vite@4.1.3+vue@3.2.45 '@vue-flow/core': link:../core '@vue-flow/eslint-config': link:../../tooling/eslint-config + '@vue-flow/tsconfig': link:../../tooling/tsconfig unplugin-auto-import: 0.14.4 vite: 4.1.3 vite-plugin-vue-type-imports: 0.2.4_vite@4.1.3+vue@3.2.45 @@ -200,6 +202,7 @@ importers: '@vitejs/plugin-vue': ^4.0.0 '@vue-flow/core': workspace:* '@vue-flow/eslint-config': workspace:* + '@vue-flow/tsconfig': workspace:* unplugin-auto-import: ^0.14.4 vite: ^4.1.3 vite-plugin-vue-type-imports: ^0.2.4 @@ -212,6 +215,7 @@ importers: '@vitejs/plugin-vue': 4.0.0_vite@4.1.3+vue@3.2.45 '@vue-flow/core': link:../core '@vue-flow/eslint-config': link:../../tooling/eslint-config + '@vue-flow/tsconfig': link:../../tooling/tsconfig unplugin-auto-import: 0.14.4 vite: 4.1.3 vite-plugin-vue-type-imports: 0.2.4_vite@4.1.3+vue@3.2.45 @@ -224,6 +228,7 @@ importers: '@types/d3': ^7.4.0 '@vitejs/plugin-vue': ^4.0.0 '@vue-flow/eslint-config': workspace:* + '@vue-flow/tsconfig': workspace:* '@vueuse/core': ^9.13.0 autoprefixer: ^10.4.13 d3-drag: ^3.0.0 @@ -250,6 +255,7 @@ importers: '@types/d3': 7.4.0 '@vitejs/plugin-vue': 4.0.0_vite@4.1.3+vue@3.2.45 '@vue-flow/eslint-config': link:../../tooling/eslint-config + '@vue-flow/tsconfig': link:../../tooling/tsconfig autoprefixer: 10.4.13_postcss@8.4.21 postcss: 8.4.21 postcss-cli: 10.1.0_postcss@8.4.21 @@ -268,6 +274,7 @@ importers: '@vitejs/plugin-vue': ^4.0.0 '@vue-flow/core': workspace:* '@vue-flow/eslint-config': workspace:* + '@vue-flow/tsconfig': workspace:* d3-selection: ^3.0.0 d3-zoom: ^3.0.0 unplugin-auto-import: ^0.14.4 @@ -285,6 +292,7 @@ importers: '@vitejs/plugin-vue': 4.0.0_vite@4.1.3+vue@3.2.45 '@vue-flow/core': link:../core '@vue-flow/eslint-config': link:../../tooling/eslint-config + '@vue-flow/tsconfig': link:../../tooling/tsconfig unplugin-auto-import: 0.14.4 vite: 4.1.3 vite-plugin-vue-type-imports: 0.2.4_vite@4.1.3+vue@3.2.45 @@ -297,6 +305,7 @@ importers: '@vitejs/plugin-vue': ^4.0.0 '@vue-flow/core': workspace:* '@vue-flow/eslint-config': workspace:* + '@vue-flow/tsconfig': workspace:* d3-drag: ^3.0.0 d3-selection: ^3.0.0 unplugin-auto-import: ^0.14.4 @@ -314,6 +323,7 @@ importers: '@vitejs/plugin-vue': 4.0.0_vite@4.1.3+vue@3.2.45 '@vue-flow/core': link:../core '@vue-flow/eslint-config': link:../../tooling/eslint-config + '@vue-flow/tsconfig': link:../../tooling/tsconfig unplugin-auto-import: 0.14.4 vite: 4.1.3 vite-plugin-vue-type-imports: 0.2.4_vite@4.1.3+vue@3.2.45 @@ -324,6 +334,7 @@ importers: '@vitejs/plugin-vue': ^4.0.0 '@vue-flow/core': workspace:* '@vue-flow/eslint-config': workspace:* + '@vue-flow/tsconfig': workspace:* unplugin-auto-import: ^0.14.4 vite: ^4.1.3 vite-plugin-vue-type-imports: ^0.2.4 @@ -335,6 +346,7 @@ importers: '@vitejs/plugin-vue': 4.0.0_vite@4.1.3+vue@3.2.45 '@vue-flow/core': link:../core '@vue-flow/eslint-config': link:../../tooling/eslint-config + '@vue-flow/tsconfig': link:../../tooling/tsconfig unplugin-auto-import: 0.14.4 vite: 4.1.3 vite-plugin-vue-type-imports: 0.2.4_vite@4.1.3+vue@3.2.45 @@ -346,6 +358,7 @@ importers: '@vitejs/plugin-vue': ^4.0.0 '@vue-flow/core': workspace:* '@vue-flow/eslint-config': workspace:* + '@vue-flow/tsconfig': workspace:* pathfinding: ^0.4.18 perfect-arrows: ^0.3.7 ts-patch: ^2.1.0 @@ -364,6 +377,7 @@ importers: '@vitejs/plugin-vue': 4.0.0_vite@4.1.3+vue@3.2.45 '@vue-flow/core': link:../core '@vue-flow/eslint-config': link:../../tooling/eslint-config + '@vue-flow/tsconfig': link:../../tooling/tsconfig ts-patch: 2.1.0_typescript@4.9.5 typescript-transform-paths: 3.4.6_typescript@4.9.5 unplugin-auto-import: 0.14.4 @@ -378,6 +392,7 @@ importers: '@vue-flow/core': workspace:* '@vue-flow/eslint-config': workspace:* '@vue-flow/minimap': workspace:* + '@vue-flow/tsconfig': workspace:* autoprefixer: ^10.4.13 postcss: ^8.4.21 postcss-cli: ^10.1.0 @@ -390,6 +405,7 @@ importers: '@vue-flow/core': link:../core '@vue-flow/eslint-config': link:../../tooling/eslint-config '@vue-flow/minimap': link:../minimap + '@vue-flow/tsconfig': link:../../tooling/tsconfig vue: 3.2.45 devDependencies: autoprefixer: 10.4.13_postcss@8.4.21 @@ -433,6 +449,9 @@ importers: eslint-plugin-prettier: 4.2.1_u5wnrdwibbfomslmnramz52buy prettier: 2.8.4 + tooling/tsconfig: + specifiers: {} + packages: /@algolia/autocomplete-core/1.7.4: diff --git a/tooling/tsconfig/base.json b/tooling/tsconfig/base.json new file mode 100644 index 00000000..39f41720 --- /dev/null +++ b/tooling/tsconfig/base.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "ESNext", + "target": "es2017", + "lib": [ + "DOM", + "ESNext" + ], + "preserveSymlinks": true, + "strict": true, + "esModuleInterop": true, + "incremental": false, + "skipLibCheck": true, + "moduleResolution": "node", + "resolveJsonModule": true, + "noUnusedLocals": false, + "strictNullChecks": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "emitDeclarationOnly": true, + "jsx": "preserve", + "types": [] + }, + "exclude": [ + "node_modules", + "dist" + ] +} diff --git a/tooling/tsconfig/package.json b/tooling/tsconfig/package.json new file mode 100644 index 00000000..820a38f9 --- /dev/null +++ b/tooling/tsconfig/package.json @@ -0,0 +1,6 @@ +{ + "name": "@vue-flow/tsconfig", + "version": "0.0.0", + "private": true, + "license": "MIT" +}