Skip to content

Commit 15657bd

Browse files
authored
chore: convert project to a pnpm workspace (#26)
1 parent d4a0040 commit 15657bd

33 files changed

+1011
-71
lines changed

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/setup-node@v4
2020
with:
2121
node-version: 20
22-
cache: "pnpm"
22+
cache: pnpm
2323

2424
- name: 📦 Install dependencies
2525
run: pnpm install

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Note the URL under `Forwarding`. It should look something like `https://<GUID>.n
5858
- **GitHub App name**: Pick any name at all. I normally add `[dev]` at the end of any apps I'm using in development only.
5959
- **Homepage URL**: Doesn't matter; just pick a URL: `https://unsight.dev` would be fine.
6060
- **Setup URL**: `http://localhost:3000`. Tick the 'Redirect on update' checkbox underneath.
61-
- **Webhook URL**: Put the URL you got when starting ngrok, plus `/github/webhook`: `https://<GUID>.ngrok-free.app/github/webhook`. For the 'Secret' field underneath the URL, create a random GUID or password and make a note of it.
61+
- **Webhook URL**: Put the URL you got when starting ngrok, plus `/github/webhook`: `https://<GUID>.ngrok-free.app/github/webhook`. For the 'Secret' field underneath the URL, create a random GUID or password and make a note of it.
6262
- **Repository permissions**: Select 'Issues': 'Read-only'.
6363
- **Subscribe to events**: Select 'Installation target', 'Issues', 'Meta' and 'Repository'.
6464

app/composables/repos.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

eslint.config.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
// @ts-check
2-
import withNuxt from './.nuxt/eslint.config.mjs'
2+
import antfu from '@antfu/eslint-config'
3+
import withNuxt from './packages/web/.nuxt/eslint.config.mjs'
34

4-
export default withNuxt()
5+
export default withNuxt(antfu()).append(
6+
{
7+
rules: {
8+
'no-console': 'off',
9+
},
10+
},
11+
{
12+
files: ['**/*.yml'],
13+
rules: {
14+
'@stylistic/spaced-comment': 'off',
15+
},
16+
},
17+
)

package.json

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,19 @@
11
{
2-
"name": "nuxt-app",
3-
"private": true,
2+
"name": "unsight-dev",
43
"type": "module",
4+
"private": true,
5+
"packageManager": "[email protected]",
56
"scripts": {
6-
"build": "nuxt build",
7-
"dev": "nuxt dev",
8-
"generate": "nuxt generate",
9-
"preview": "nuxt preview",
10-
"postinstall": "nuxt prepare && simple-git-hooks",
117
"lint": "eslint .",
12-
"test:types": "vue-tsc --noEmit"
13-
},
14-
"dependencies": {
15-
"@iconify-json/ri": "1.2.3",
16-
"@iconify-json/tabler": "1.2.11",
17-
"@nuxthub/core": "^0.8.7",
18-
"@nuxtjs/html-validator": "1.8.2",
19-
"@octokit/auth-app": "^7.1.3",
20-
"@octokit/rest": "^21.0.2",
21-
"@octokit/webhooks-types": "^7.6.1",
22-
"@unocss/nuxt": "^0.65.1",
23-
"@unocss/reset": "^0.65.1",
24-
"hex-rgb": "^5.0.0",
25-
"ml-distance": "^4.0.1",
26-
"ml-kmeans": "^6.0.0",
27-
"nuxt": "latest",
28-
"nuxt-time": "1.0.3",
29-
"nuxt-webhook-validators": "0.1.5",
30-
"ohash": "^1.1.4",
31-
"rgb-to-hsl": "^0.0.3",
32-
"universal-github-app-jwt": "^2.2.0",
33-
"unocss": "^0.65.1",
34-
"unplugin-vue-router": "^0.10.9"
8+
"test:types": "pnpm -r test:types",
9+
"postinstall": "simple-git-hooks"
3510
},
3611
"devDependencies": {
37-
"@nuxt/eslint": "0.7.3",
12+
"@antfu/eslint-config": "^3.12.0",
13+
"eslint": "^9.17.0",
3814
"lint-staged": "15.2.11",
3915
"simple-git-hooks": "2.11.1",
40-
"typescript": "5.6.3",
41-
"vue-tsc": "2.1.10",
42-
"wrangler": "3.95.0"
16+
"typescript": "~5.6"
4317
},
4418
"simple-git-hooks": {
4519
"pre-commit": "npx lint-staged"
@@ -48,6 +22,5 @@
4822
"*.{js,ts,mjs,cjs,json,.*rc}": [
4923
"npx eslint --fix"
5024
]
51-
},
52-
"packageManager": "[email protected]"
25+
}
5326
}
File renamed without changes.
File renamed without changes.

packages/web/app/composables/repos.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export function useRepos() {
2+
return useFetch('/api/repos', {
3+
baseURL: useRuntimeConfig().public.remote,
4+
getCachedData: (key, nuxtApp) => nuxtApp.payload.data[key] || nuxtApp.static.data[key],
5+
default: () => [],
6+
})
7+
}

0 commit comments

Comments
 (0)