Skip to content

Commit 6f86d39

Browse files
committed
workflow: integrate license-checker, attw and publint
1 parent 3c4a034 commit 6f86d39

File tree

8 files changed

+1880
-917
lines changed

8 files changed

+1880
-917
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ stats.html
1313
*.local
1414
*.log
1515
*.zip
16+
*.tgz

auto-imports.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// @ts-nocheck
44
// noinspection JSUnusedGlobalSymbols
55
// Generated by unplugin-auto-import
6+
// biome-ignore lint: disable
67
export {}
78
declare global {
89
const EffectScope: typeof import('vue')['EffectScope']
@@ -35,6 +36,7 @@ declare global {
3536
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
3637
const onUnmounted: typeof import('vue')['onUnmounted']
3738
const onUpdated: typeof import('vue')['onUpdated']
39+
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
3840
const provide: typeof import('vue')['provide']
3941
const reactive: typeof import('vue')['reactive']
4042
const readonly: typeof import('vue')['readonly']
@@ -53,7 +55,10 @@ declare global {
5355
const useAttrs: typeof import('vue')['useAttrs']
5456
const useCssModule: typeof import('vue')['useCssModule']
5557
const useCssVars: typeof import('vue')['useCssVars']
58+
const useId: typeof import('vue')['useId']
59+
const useModel: typeof import('vue')['useModel']
5660
const useSlots: typeof import('vue')['useSlots']
61+
const useTemplateRef: typeof import('vue')['useTemplateRef']
5762
const watch: typeof import('vue')['watch']
5863
const watchEffect: typeof import('vue')['watchEffect']
5964
const watchPostEffect: typeof import('vue')['watchPostEffect']
@@ -62,6 +67,6 @@ declare global {
6267
// for type re-export
6368
declare global {
6469
// @ts-ignore
65-
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
70+
export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
6671
import('vue')
6772
}

depencency-licenses.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
├─ MIT: 321
2+
├─ ISC: 149
3+
├─ Apache-2.0: 16
4+
├─ BSD-2-Clause: 11
5+
├─ BSD-3-Clause: 5
6+
├─ BlueOak-1.0.0: 4
7+
├─ CC0-1.0: 2
8+
├─ Artistic-2.0: 1
9+
├─ MIT,Apache2: 1
10+
├─ Apache 2.0: 1
11+
├─ (BSD-2-Clause OR MIT OR Apache-2.0): 1
12+
├─ CC-BY-3.0: 1
13+
└─ (MIT OR CC0-1.0): 1

package.json

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "vue-global-config",
33
"PascalCasedName": "VueGlobalConfig",
4+
"type": "commonjs",
45
"version": "0.6.2",
56
"private": false,
67
"description": "Configure your Vue 2/3 components globally.",
@@ -9,7 +10,10 @@
910
"url": "https://github.com/cloydlau"
1011
},
1112
"license": "MIT",
12-
"repository": "https://github.com/cloydlau/vue-global-config",
13+
"repository": {
14+
"type": "git",
15+
"url": "git+https://github.com/cloydlau/vue-global-config.git"
16+
},
1317
"keywords": [
1418
"config",
1519
"configuration",
@@ -23,9 +27,14 @@
2327
],
2428
"exports": {
2529
".": {
26-
"types": "./dist/vue-global-config.d.ts",
27-
"import": "./dist/vue-global-config.mjs",
28-
"require": "./dist/vue-global-config.umd.js"
30+
"import": {
31+
"types": "./dist/vue-global-config.d.mts",
32+
"default": "./dist/vue-global-config.mjs"
33+
},
34+
"require": {
35+
"types": "./dist/vue-global-config.d.ts",
36+
"default": "./dist/vue-global-config.umd.js"
37+
}
2938
},
3039
"./*": "./*"
3140
},
@@ -45,13 +54,16 @@
4554
"test:watch": "vitest",
4655
"test:coverage": "vitest run --coverage",
4756
"test:ui": "vitest --ui",
48-
"build": "vite build",
57+
"typegen": "npx tsup --entry.vue-global-config src/index.ts --format esm,cjs --cjsInterop --clean --dts-only",
58+
"build": "vite build && pnpm typegen",
59+
"license-scan": "license-checker --summary --out ./depencency-licenses.txt",
4960
"serve": "vite preview",
5061
"release": "esno ./scripts/release.mts",
62+
"sync-to-cnpm": "npx cnpm sync && curl -L https://npmmirror.com/sync/vue-global-config",
5163
"lint": "eslint \"**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,json,md,html,css,scss,sass}\" --ignore-pattern stats.html",
5264
"lint:fix": "eslint \"**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,json,md,html,css,scss,sass}\" --ignore-pattern stats.html --fix",
5365
"preinstall": "node -e \"if (process.env.INIT_CWD === process.cwd()) { process.exit(1) }\" || npx only-allow pnpm",
54-
"postinstall": "node -e \"if (process.env.INIT_CWD === process.cwd()) { process.exit(1) }\" || npx simple-git-hooks"
66+
"postinstall": "node -e \"if (process.env.INIT_CWD === process.cwd()) { process.exit(1) }\" || (npx simple-git-hooks && pnpm license-scan)"
5567
},
5668
"peerDependencies": {
5769
"@vue/composition-api": ">=1",
@@ -70,40 +82,44 @@
7082
"vue-demi": "^0.14.10"
7183
},
7284
"devDependencies": {
73-
"@antfu/eslint-config": "^3.5.1",
85+
"@antfu/eslint-config": "^3.7.3",
86+
"@arethetypeswrong/cli": "^0.16.4",
7487
"@commitlint/cli": "^19.5.0",
7588
"@commitlint/config-conventional": "^19.5.0",
7689
"@element-plus/icons-vue": "latest",
7790
"@types/lodash-es": "^4.17.12",
78-
"@types/node": "^22.5.4",
91+
"@types/node": "^22.7.5",
7992
"@vitejs/plugin-vue": "latest",
8093
"@vue/compiler-sfc": "latest",
8194
"@vue/test-utils": "latest",
8295
"case-police": "^0.7.0",
8396
"change-case": "^5.4.4",
97+
"cnpm": "^9.4.0",
8498
"cross-spawn": "^7.0.3",
85-
"del": "^7.1.0",
99+
"del": "^8.0.0",
86100
"element-plus": "latest",
87101
"eslint-plugin-format": "^0.1.2",
88-
"esno": "^4.7.0",
89-
"faim": "^0.9.7",
102+
"esno": "^4.8.0",
103+
"faim": "^0.10.0",
90104
"kolorist": "^1.8.0",
105+
"license-checker": "^25.0.1",
91106
"lint-staged": "^15.2.10",
92107
"lodash-es": "^4.17.21",
93108
"magicast": "^0.3.5",
94109
"only-allow": "^1.2.1",
95110
"open": "^10.1.0",
96111
"prompts": "^2.4.2",
112+
"publint": "^0.2.11",
97113
"rollup-plugin-visualizer": "^5.12.0",
98114
"semver": "^7.6.3",
99115
"simple-git-hooks": "^2.11.1",
100-
"typescript": "^5.6.2",
101-
"unplugin-auto-import": "^0.18.2",
116+
"tsup": "^8.3.0",
117+
"typescript": "^5.6.3",
118+
"unplugin-auto-import": "^0.18.3",
102119
"unplugin-vue-components": "^0.27.4",
103-
"vite": "^5.4.4",
104-
"vite-plugin-dts": "^4.2.1",
105-
"vitepress": "^1.3.4",
106-
"vitest": "^2.0.5",
120+
"vite": "^5.4.8",
121+
"vitepress": "^1.4.0",
122+
"vitest": "^2.1.2",
107123
"vue": "latest",
108124
"vue-global-config": "workspace:*"
109125
},

0 commit comments

Comments
 (0)