Skip to content

Commit

Permalink
chore: upgrade (#16)
Browse files Browse the repository at this point in the history
* chore: upgrade

* fix: lint
  • Loading branch information
productdevbook authored Oct 1, 2023
1 parent ebfa394 commit 5c185a2
Show file tree
Hide file tree
Showing 13 changed files with 937 additions and 1,307 deletions.
6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

49 changes: 19 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write

on:
push:
branches:
Expand All @@ -23,48 +27,33 @@ jobs:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: pnpm/[email protected]
- uses: actions/checkout@v4

- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: '18'
cache: pnpm

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: 📦 Install dependencies
run: pnpm install --frozen-lockfile

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-main-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-main-
- name: 📦 Install deps (with cache)
run: pnpm install --child-concurrency 3
- name: 👀 Lint
run: pnpm lint

- name: 🚀 Build
run: pnpm build

- name: 👀 Lint
run: pnpm lint

# - name: 🧪 Test
# run: pnpm test
# env:
# VITE_TEST_DB_URL: ${{ secrets.VITE_TEST_DB_URL }}

# - name: 🧪 Test with coverage
# run: pnpm coverage
# env:
# VITE_TEST_DB_URL: ${{ secrets.VITE_TEST_DB_URL }}
- name: 🧪 Test with coverage
run: pnpm coverage
env:
VITE_TEST_DB_URL: ${{ secrets.VITE_TEST_DB_URL }}

# - name: 📝 Upload coverage
# if: always()
# uses: davelosert/vitest-coverage-report-action@v1
- name: 📝 Upload coverage
if: always()
uses: davelosert/vitest-coverage-report-action@v2
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
"references.preferredLocation": "peek"
}
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import antfu from '@antfu/eslint-config'

export default antfu()
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,29 +62,30 @@
"vue": ">=3.3.0"
},
"dependencies": {
"@nuxt/kit": "^3.7.1",
"@nuxt/kit": "^3.7.4",
"defu": "^6.1.2",
"plausible-tracker": "^0.3.8"
},
"devDependencies": {
"@antfu/eslint-config": "^0.40.3",
"@nuxt/module-builder": "^0.4.0",
"@nuxt/schema": "^3.7.1",
"@nuxt/test-utils": "^3.7.1",
"@antfu/eslint-config": "1.0.0-beta.18",
"@nuxt/module-builder": "^0.5.2",
"@nuxt/schema": "^3.7.4",
"@nuxt/test-utils": "^3.7.4",
"@vitejs/plugin-vue": "^4.3.4",
"@vitest/coverage-v8": "^0.34.3",
"@vue-macros/volar": "^0.13.8",
"@vitest/coverage-v8": "^0.34.6",
"@vue-macros/volar": "^0.16.0",
"@vue/test-utils": "^2.4.1",
"bumpp": "^9.2.0",
"eslint": "8.47.0",
"eslint": "8.50.0",
"happy-dom": "^12.4.0",
"jsdom": "^22.1.0",
"typescript": "^5.2.2",
"unbuild": "^1.2.1",
"unbuild": "^2.0.0",
"unconfig": "^0.3.10",
"unplugin-vue-macros": "^2.4.14",
"unplugin-vue-macros": "^2.6.1",
"vite": "^4.4.9",
"vite-plugin-dts": "^2.3.0",
"vitest": "^0.34.3",
"vite-plugin-dts": "^3.6.0",
"vitest": "^0.34.6",
"vue": "^3.3.4"
},
"publishConfig": {
Expand Down
14 changes: 7 additions & 7 deletions playground-vue/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"compilerOptions": {
"target": "ES2020",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"jsx": "preserve",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
"isolatedModules": true,

/* Linting */
"strict": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"skipLibCheck": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
"references": [{ "path": "./tsconfig.node.json" }],
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}
4 changes: 2 additions & 2 deletions playground-vue/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"skipLibCheck": true
},
"include": ["vite.config.ts"]
}
Loading

0 comments on commit 5c185a2

Please sign in to comment.