Skip to content

Commit

Permalink
fix: types in templates (#226)
Browse files Browse the repository at this point in the history
* refactor: align tsconfig w/ create-vue

* fix: bring back types in templates

* fix type-check command

* chore: bump packages, replace coverage w/ v8

* fix: update GH actions

* docs: updated changelog, readme

* docs: updated changelog

* chore: cleanup deps
  • Loading branch information
Uninen committed Jun 14, 2023
1 parent b034ef0 commit d3441f5
Show file tree
Hide file tree
Showing 17 changed files with 1,195 additions and 1,241 deletions.
6 changes: 4 additions & 2 deletions .eslintrc-auto-import.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
"watch": true,
"watchEffect": true,
"watchPostEffect": true,
"watchSyncEffect": true
"watchSyncEffect": true,
"toValue": true,
"useSeoMeta": true
}
}
}
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,16 @@ jobs:
${{ runner.os }}-
- uses: pnpm/action-setup@v2
with:
version: 7
version: 8
run_install: true
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'pnpm'

- name: Type Check
run: pnpm type-check

- name: Run unit tests
run: pnpm test:ci

- name: Install Playwright browsers
run: npx playwright install --with-deps

Expand All @@ -58,8 +55,11 @@ jobs:
pnpm build
pnpm test:ci-e2e
- name: Run unit tests
run: pnpm test:ci

- name: Coverage
uses: davelosert/vitest-coverage-report-action@v1.4.0
uses: davelosert/vitest-coverage-report-action@v2.0.0
if: ${{ always() }}
# with:
# vite-config-path: ./vite.config.ts
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 4.1.0 (2023-06-14)

- Feat: added explicit `DEBUG=0` for dev command to [silence Tailwind JIT noise](https://til.unessa.net/tailwind/silence-tailwind-debug-output/).
- Fix: components types are again inferred correctly in templates.
- Refactor: updated TS configurations again to match better `create vue` defaults.
- Refactor: moved autogenerated `d.ts` files from root to `scr/`.
- Chore: changed vitest coverage to use `v8` instead of `c8`.
- Chore: updated GH action to use pnpm 8, Node 18 and coverage action v2.0.0.
- Chore: bumped all deps.

## 4.0.0 (2023-04-13)

- Feat: added coverage reporting to pull requests.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Please [check out the homepage](https://vite-ts-tailwind-starter.vercel.app/) fo
- Pinia store (fully typed Vuex store is available up to template version 1.13)
- Routing using [vue-router 4](https://router.vuejs.org/)
- TypeScript 5
- Fully typed components configured in templates as well
- Automatic package and component imports w/ [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import) and [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components)
- Tailwind CSS 3 w/ following plugins and configuration preinstalled:
- `@tailwindcss/aspect-ratio`
Expand All @@ -26,7 +27,7 @@ Please [check out the homepage](https://vite-ts-tailwind-starter.vercel.app/) fo
- Predefined and fully typed global variables:
- `VITE_APP_VERSION` is read from `package.json` version at build time
- `VITE_APP_BUILD_EPOCH` is populated as `new Date().getTime()` at build time
- Using newest `script setup` syntax w/ Ref sugar (see the official [Script Setup documentation](https://vuejs.org/api/sfc-script-setup.html) and [Ref Sugar RFC](https://github.com/vuejs/rfcs/discussions/369) discussion)
- Using newest `script setup` syntax (see the official [Script Setup documentation](https://vuejs.org/api/sfc-script-setup.html))
- Vitest unit + component tests
- GitHub workflows
- Renovatebot for keeping up with dependencies
Expand Down
82 changes: 0 additions & 82 deletions auto-imports.d.ts

This file was deleted.

61 changes: 30 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "vite-ts-tailwind-starter",
"version": "4.0.0",
"version": "4.1.0",
"scripts": {
"dev": "vite",
"dev": "DEBUG=0 vite",
"build": "vite build",
"preview": "vite build && vite preview",
"start": "pnpm dev & wait-on tcp:3000 -v",
Expand All @@ -11,55 +11,54 @@
"test-e2e": "playwright test --headed",
"test:ci": "vitest run --coverage",
"test:ci-e2e": "playwright test",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false"
"type-check": "vue-tsc --noEmit -p tsconfig.json --composite false"
},
"dependencies": {
"@vueuse/head": "1.1.23",
"pinia": "2.0.34",
"vue": "3.2.47",
"vue-router": "4.1.6"
"@vueuse/head": "1.1.26",
"pinia": "2.1.4",
"vue": "3.3.4",
"vue-router": "4.2.2"
},
"devDependencies": {
"@pinia/testing": "0.0.16",
"@playwright/experimental-ct-vue": "1.32.3",
"@playwright/test": "1.32.3",
"@rushstack/eslint-patch": "1.2.0",
"@pinia/testing": "0.1.2",
"@playwright/test": "1.35.0",
"@rushstack/eslint-patch": "1.3.1",
"@tailwindcss/aspect-ratio": "0.4.2",
"@tailwindcss/forms": "0.5.3",
"@tailwindcss/line-clamp": "0.4.4",
"@tailwindcss/typography": "0.5.9",
"@types/jsdom": "21.1.1",
"@types/lodash-es": "4.17.7",
"@types/node": "18.15.11",
"@typescript-eslint/eslint-plugin": "5.58.0",
"@typescript-eslint/parser": "5.58.0",
"@vitejs/plugin-vue": "4.1.0",
"@vitest/coverage-c8": "0.30.1",
"@types/node": "20.3.1",
"@typescript-eslint/eslint-plugin": "5.59.11",
"@typescript-eslint/parser": "5.59.11",
"@vitejs/plugin-vue": "4.2.3",
"@vitest/coverage-v8": "0.32.0",
"@vue/eslint-config-prettier": "7.1.0",
"@vue/eslint-config-typescript": "11.0.2",
"@vue/eslint-config-typescript": "11.0.3",
"@vue/test-utils": "2.3.2",
"@vue/tsconfig": "0.1.3",
"@vue/tsconfig": "0.4.0",
"autoprefixer": "10.4.14",
"c8": "7.13.0",
"cssnano": "6.0.0",
"eslint": "8.38.0",
"cssnano": "6.0.1",
"eslint": "8.42.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-security": "1.7.1",
"eslint-plugin-vue": "9.10.0",
"jsdom": "21.1.1",
"eslint-plugin-vue": "9.14.1",
"jsdom": "22.1.0",
"lodash-es": "4.17.21",
"postcss": "8.4.21",
"postcss": "8.4.24",
"postcss-import": "15.1.0",
"postcss-nesting": "11.2.2",
"tailwindcss": "3.3.1",
"typescript": "5.0.4",
"unplugin-auto-import": "0.15.2",
"vite": "4.2.1",
"vitest": "0.30.1",
"vue-tsc": "^1.2.0",
"postcss-nesting": "11.3.0",
"tailwindcss": "3.3.2",
"typescript": "5.1.3",
"unplugin-auto-import": "0.16.4",
"unplugin-vue-components": "0.25.1",
"vite": "4.3.9",
"vitest": "0.32.0",
"vue-tsc": "1.6.5",
"wait-on": "7.0.1"
}
}

1 comment on commit d3441f5

@vercel
Copy link

@vercel vercel bot commented on d3441f5 Jun 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.