Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Update yarn, vite.
Browse files Browse the repository at this point in the history
Fixed vuex type error.
  • Loading branch information
logue committed Dec 13, 2023
1 parent e2be69a commit dd8d98d
Show file tree
Hide file tree
Showing 9 changed files with 897 additions and 698 deletions.
670 changes: 335 additions & 335 deletions .yarn/releases/yarn-4.0.1.cjs → .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.1.cjs
yarnPath: .yarn/releases/yarn-4.0.2.cjs
42 changes: 20 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/package.json",
"name": "vite-vue2-vuetify-ts-starter",
"description": "Vue2 Vuetify TypeScript Startar project for Vite.",
"version": "1.6.1",
"version": "1.8.0",
"license": "MIT",
"type": "module",
"private": true,
Expand All @@ -23,7 +23,7 @@
"node": ">=18.12.5",
"yarn": ">=1.22.19"
},
"packageManager": "yarn@4.0.1",
"packageManager": "yarn@4.0.2",
"scripts": {
"dev": "vite",
"clean": "rimraf ./node_modules/.vite",
Expand All @@ -37,11 +37,13 @@
"test:coverage": "vitest run --coverage",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"postinstall": "patch-package",
"prepare": "husky install"
},
"dependencies": {
"@logue/vue2-helpers": "^2.2.0",
"@logue/vue2-helpers": "^2.2.1",
"@mdi/font": "^7.3.67",
"patch-package": "^8.0.0",
"vue": "^2.7.15",
"vue-router": "^3.6.5",
"vuetify": "^2.7.1",
Expand All @@ -50,24 +52,24 @@
"webfontloader": "^1.6.28"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.5.1",
"@rushstack/eslint-patch": "^1.6.0",
"@tsconfig/node-lts": "^18.12.5",
"@types/jsdom": "^21.1.4",
"@types/node": "^20.8.10",
"@types/webfontloader": "^1.6.36",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@vitejs/plugin-vue2": "^2.2.0",
"@types/jsdom": "^21.1.6",
"@types/node": "^20.10.0",
"@types/webfontloader": "^1.6.38",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@vitejs/plugin-vue2": "^2.3.1",
"@vitest/coverage-c8": "^0.33.0",
"@vue/eslint-config-prettier": "^8.0.0",
"@vue/test-utils": "^1.3.5",
"@vue/tsconfig": "^0.4.0",
"eslint": "^8.53.0",
"eslint-config-standard-with-typescript": "^39.1.1",
"eslint": "^8.54.0",
"eslint-config-standard-with-typescript": "^40.0.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-n": "^16.3.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-tsdoc": "^0.2.17",
Expand All @@ -76,23 +78,23 @@
"eslint-plugin-vuetify": "^1.1.0",
"eslint-plugin-yaml": "^0.5.0",
"husky": "^8.0.3",
"jsdom": "^22.1.0",
"lint-staged": "^15.0.2",
"jsdom": "^23.0.0",
"lint-staged": "^15.1.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.31",
"postcss-html": "^1.5.0",
"postcss-scss": "^4.0.9",
"prettier": "^3.0.3",
"prettier": "^3.1.0",
"rimraf": "^5.0.5",
"rollup-plugin-visualizer": "^5.9.2",
"rollup-plugin-visualizer": "^5.9.3",
"sass": "1.32.12",
"stylelint": "^15.11.0",
"stylelint-config-recommended-scss": "^13.1.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-order": "^6.0.3",
"typescript": "latest",
"unplugin-vue-components": "^0.25.2",
"vite": "^4.5.0",
"vite": "^5.0.2",
"vite-plugin-checker": "^0.6.2",
"vitest": "^0.34.6",
"vue-eslint-parser": "^9.3.2",
Expand All @@ -111,13 +113,9 @@
"*": "prettier -w -u"
},
"resolutions": {
"http-cache-semantics": "^4.1.1",
"json5": "^2.2.3",
"postcss": "^8.4.31",
"semver": "^7.5.2",
"tough-cookie": "^4.1.3",
"vite": "^4.3.9",
"word-wrap": "^1.2.4",
"semver": "^7.5.3",
"yaml": "^2.3.2"
},
"stackblitz": {
Expand Down
14 changes: 14 additions & 0 deletions patches/vuex+3.6.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/node_modules/vuex/package.json b/node_modules/vuex/package.json
index e8a851e..4cd1fce 100644
--- a/node_modules/vuex/package.json
+++ b/node_modules/vuex/package.json
@@ -7,7 +7,8 @@
".": {
"module": "./dist/vuex.esm.js",
"require": "./dist/vuex.common.js",
- "import": "./dist/vuex.mjs"
+ "import": "./dist/vuex.mjs",
+ "types": "./types/index.d.ts"
},
"./": "./"
},
8 changes: 4 additions & 4 deletions src/store/ConfigModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ const state: ConfigState = {

/** Getters */
const getters: GetterTree<ConfigState, RootState> = {
themeDark: (s): boolean => s.themeDark,
locale: (s): string => s.locale,
themeDark: (s: ConfigState): boolean => s.themeDark,
locale: (s: ConfigState): string => s.locale,
};

/** Mutations */
const mutations: MutationTree<ConfigState> = {
storeThemeDark(s) {
storeThemeDark(s: ConfigState) {
s.themeDark = !s.themeDark;
},
storeLocale(s, locale: string) {
storeLocale(s: ConfigState, locale: string) {
s.locale = locale;
},
};
Expand Down
18 changes: 9 additions & 9 deletions src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ const state: RootState = {

/** Getters */
const getters: GetterTree<RootState, RootState> = {
loading: (s): boolean => s.loading,
progress: (s): number | null => s.progress,
message: (s): string => s.message,
error: (s): string => s.error,
loading: (s: RootState): boolean => s.loading,
progress: (s: RootState): number | null => s.progress,
message: (s: RootState): string => s.message,
error: (s: RootState): string => s.error,
};

/** Mutations */
Expand All @@ -48,7 +48,7 @@ const mutations: MutationTree<RootState> = {
* @param s - Vuex state
* @param display - Payload
*/
storeLoading(s, display: boolean) {
storeLoading(s: RootState, display: boolean) {
s.loading = display;
if (!display) {
s.progress = 0;
Expand All @@ -60,7 +60,7 @@ const mutations: MutationTree<RootState> = {
* @param s - Vuex state
* @param progress - Payload
*/
storeProgress(s, progress: number | null) {
storeProgress(s: RootState, progress: number | null) {
s.progress = progress;
s.loading = true;
},
Expand All @@ -70,7 +70,7 @@ const mutations: MutationTree<RootState> = {
* @param s - Vuex state
* @param message - Payload
*/
storeMessage(s, message: string) {
storeMessage(s: RootState, message: string) {
s.message = message;
},
/**
Expand All @@ -79,7 +79,7 @@ const mutations: MutationTree<RootState> = {
* @param s - Vuex state
* @param error - Payload
*/
storeError(s, error: string) {
storeError(s: RootState, error: string) {
s.error = error;
},
};
Expand Down Expand Up @@ -128,7 +128,7 @@ const actions: ActionTree<RootState, RootState> = {
* @param context - Vuex Context
* @param error - Error message etc.
*/
setError(context: ActionContext<RootState, RootState>, error) {
setError(context: ActionContext<RootState, RootState>, error: any) {
context.commit('storeError', error);
},
};
Expand Down
2 changes: 0 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ export default defineConfig(({ command, mode }) => {
plugins: [
// Vue2
// https://github.com/vitejs/vite-plugin-vue2
// @ts-expect-error
vue(),
// unplugin-vue-components
// https://github.com/antfu/unplugin-vue-components
// @ts-expect-error
Components({
// generate `components.d.ts` global declarations
// https://github.com/antfu/unplugin-vue-components#typescript
Expand Down
2 changes: 0 additions & 2 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ export default defineConfig({
plugins: [
// Vue2
// https://github.com/vitejs/vite-plugin-vue2
// @ts-expect-error
vue(),
// unplugin-vue-components
// https://github.com/antfu/unplugin-vue-components
// @ts-expect-error
Components({
// generate `components.d.ts` global declarations
// https://github.com/antfu/unplugin-vue-components#typescript
Expand Down
Loading

0 comments on commit dd8d98d

Please sign in to comment.