Skip to content

Commit

Permalink
chore: set node versions and enable knip
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jan 8, 2025
1 parent 7309198 commit 1a17c0c
Show file tree
Hide file tree
Showing 6 changed files with 647 additions and 24 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
- name: 🔠 Lint project
run: pnpm lint

- name: ✂️ Knip project
run: pnpm test:knip

- name: ⚙️ Check package engines
run: pnpm test:engines

- name: 💪 Check published types
run: pnpm test:attw

Expand Down
8 changes: 3 additions & 5 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@
"dist"
],
"scripts": {
"prepack": "JITI_ESM_RESOLVE=1 jiti ../src/cli.ts build",
"prepack": "nuxt build-module build",
"dev": "nuxi dev playground",
"dev:build": "nuxi build playground",
"dev:prepare": "JITI_ESM_RESOLVE=1 jiti ../src/cli.ts build --stub && JITI_ESM_RESOLVE=1 jiti ../src/cli.ts prepare",
"dev:prepare": "nuxt build-module build --stub && nuxt build-module prepare",
"test:types": "vue-tsc --noEmit"
},
"dependencies": {
"@nuxt/kit": "^3.15.1"
},
"devDependencies": {
"@nuxt/module-builder": "workspace:*",
"@nuxt/schema": "^3.15.1",
"@types/node": "^22.10.5",
"@nuxt/module-builder": "latest",
"nuxt": "^3.15.1"
},
"build": {
Expand Down
30 changes: 30 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"ignore": [
"test/__snapshots__/**"
],
"workspaces": {
"example": {
"entry": [
"src/module.ts",
"src/utils.ts",
"src/runtime/**"
],
"ignoreDependencies": [
"@nuxt/module-builder"
]
},
"example/playground": {
"entry": [
"providers/custom/index.ts",
"{components,layouts,pages,plugins,server}/**",
"{app,error}.vue",
"layers/**",
"*.ts"
],
"ignoreDependencies": [
"my-module"
]
}
}
}
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
"test": "pnpm vitest --coverage",
"test:attw": "attw --pack example && attw --pack .",
"test:publint": "cd example && publint",
"test:engines": "installed-check -d --no-workspaces",
"test:knip": "knip --exclude unresolved",
"test:types": "vue-tsc --noEmit && pnpm -r test:types"
},
"packageManager": "[email protected]",
Expand Down Expand Up @@ -64,6 +66,8 @@
"@vitest/coverage-v8": "^2.1.8",
"changelogen": "^0.5.7",
"eslint": "^9.17.0",
"installed-check": "^9.3.0",
"knip": "^5.41.1",
"nuxi": "^3.18.2",
"nuxt": "^3.15.1",
"publint": "^0.3.0",
Expand All @@ -75,9 +79,13 @@
},
"resolutions": {
"@nuxt/kit": "^3.15.1",
"@nuxt/module-builder": "workspace:*",
"@nuxt/schema": "^3.15.1",
"typescript": "^5.7.2",
"vue": "^3.5.13",
"vue-tsc": "^2.2.0"
},
"engines": {
"node": "^18.0.0 || >=20.0.0"
}
}
Loading

0 comments on commit 1a17c0c

Please sign in to comment.