Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating vue/vite deps #3080

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions app/auth-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@
"less": "^4.1.3",
"local-storage-fallback": "^4.1.2",
"lodash-es": "^4.17.21",
"pinia": "^2.1.3",
"pinia": "^2.1.7",
"posthog-js": "^1.76.0",
"vite-ssg": "^0.22.1",
"vue": "^3.3.4",
"vue-router": "^4.1.6"
"vite-ssg": "^0.23.5",
"vue": "^3.3.12",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@si/eslint-config": "workspace:*",
"@si/tsconfig": "workspace:*",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.15.11",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue": "^4.5.2",
"eslint": "^8.36.0",
"netlify-cli": "^13.2.2",
"rollup-plugin-visualizer": "^5.9.0",
"rollup-plugin-visualizer": "^5.11.0",
"typescript": "^4.9.5",
"unplugin-icons": "^0.17.1",
"vite": "^4.1.4",
"vite-plugin-checker": "^0.5.6",
"vite": "^5.0.10",
"vite-plugin-checker": "^0.6.2",
"vite-plugin-markdown": "^2.2.0-2",
"vite-svg-loader": "^3.4.0",
"vue-tsc": "^1.1.7"
Expand Down
3 changes: 2 additions & 1 deletion app/auth-portal/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
variant="transparent"
tone="shade"
@mousedown.prevent
@click.prevent="profileMenuRef?.open"
@click.prevent="profileMenuRef?.open || _.noop"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

shouldnt really need this but it was causing a vue internals bug... I expect it to be fixed pretty quickly.

vuejs/core#9865

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like the issue itself is resolved but we'll need to wait for a few dependencies to update to the latest vue (not just us)

>
<div class="mr-xs">Hi {{ authStore.bestUserLabel }}!</div>
<template #iconRight>
Expand Down Expand Up @@ -203,6 +203,7 @@
</template>

<script setup lang="ts">
import * as _ from "lodash-es";
import { tw } from "@si/vue-lib";
import {
Icon,
Expand Down
2 changes: 1 addition & 1 deletion app/auth-portal/src/lib/posthog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if (!import.meta.env.SSR && import.meta.env.VITE_POSTHOG_PUBLIC_KEY) {
});

// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (window) (window as any).posthog = posthog;
if (typeof window !== "undefined") (window as any).posthog = posthog;
}

// small wrapper makes it easier to swap things later,
Expand Down
2 changes: 1 addition & 1 deletion app/auth-portal/src/store/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const api = Axios.create({
});

// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (window) (window as any).api = api;
if (typeof window !== "undefined") (window as any).api = api;

// // add axios interceptors to add auth headers, handle logout errors, etc...
// api.interceptors.request.use((config) => {
Expand Down
3 changes: 3 additions & 0 deletions app/auth-portal/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export default defineConfig({
},
}),

// https://github.com/btd/rollup-plugin-visualizer/issues/176
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
!!process.env.RUN_BUILD_ANALYZER &&
VisualizerPlugin({
open: true,
Expand Down
12 changes: 6 additions & 6 deletions app/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@
"local-storage-fallback": "^4.1.2",
"lodash-es": "^4.17.21",
"mitt": "^3.0.1",
"pinia": "^2.1.3",
"pinia": "^2.1.7",
"plur": "^5.1.0",
"posthog-js": "^1.76.0",
"reconnecting-websocket": "^4.4.0",
"tinycolor2": "^1.4.2",
"typescript": "^4.9.5",
"validator": "^13.7.0",
"vanilla-picker": "^2.12.1",
"vue": "^3.3.4",
"vue": "^3.3.12",
"vue-konva": "^3.0.1",
"vue-router": "^4.1.6",
"vue-router": "^4.2.5",
"vue-safe-teleport": "^0.1.2",
"vue-toastification": "2.0.0-rc.5",
"yjs-codemirror-plugin": "workspace:*",
Expand All @@ -97,13 +97,13 @@
"@types/node": "^18.15.11",
"@types/tinycolor2": "^1.4.3",
"@types/validator": "^13.7.2",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue": "^4.5.2",
"cypress": "^9.6.0",
"eslint": "^8.36.0",
"faker": "^6.6.6",
"unplugin-icons": "^0.17.1",
"vite": "^4.4.9",
"vite-plugin-checker": "^0.6.1",
"vite": "^5.0.10",
"vite-plugin-checker": "^0.6.2",
"vite-svg-loader": "^3.4.0",
"vue-tsc": "^1.8.8"
},
Expand Down
2 changes: 1 addition & 1 deletion app/web/src/store/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function handleProxyTimeouts(response: AxiosResponse) {
trackEvent("api_404_timeout");
// redirect to oops page after short timeout so we give tracker a chance to send event
setTimeout(() => {
if (window) window.location.href = "/oops";
if (typeof window !== "undefined") window.location.href = "/oops";
}, 500);
}
return response;
Expand Down
2 changes: 1 addition & 1 deletion app/web/src/utils/posthog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if (import.meta.env.VITE_POSTHOG_PUBLIC_KEY) {
api_host: import.meta.env.VITE_POSTHOG_API_HOST,
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (window) (window as any).posthog = posthog;
if (typeof window !== "undefined") (window as any).posthog = posthog;
}

export { posthog };
4 changes: 2 additions & 2 deletions lib/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-exports": "1.0.0-beta.5",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.4.3",
"eslint-plugin-no-autofix": "^1.2.3",
Expand All @@ -29,4 +29,4 @@
"prettier": "~2.8.4",
"typescript": "^4.9.5"
}
}
}
8 changes: 4 additions & 4 deletions lib/vue-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@
"local-storage-fallback": "^4.1.2",
"lodash-es": "^4.17.21",
"mitt": "^3.0.1",
"pinia": "^2.1.3",
"pinia": "^2.1.7",
"posthog-js": "^1.51.4",
"tailwindcss-capsize": "^3.0.3",
"vue": "^3.3.4",
"vue-router": "^4.1.6",
"vue": "^3.3.12",
"vue-router": "^4.2.5",
"vue-safe-teleport": "^0.1.2"
},
"devDependencies": {
Expand All @@ -75,7 +75,7 @@
"tailwindcss": "^3.2.2",
"typescript": "^4.9.5",
"unplugin-icons": "^0.17.1",
"vite": "^4.1.4",
"vite": "^5.0.10",
"vite-svg-loader": "^3.4.0",
"vue-tsc": "^1.1.7"
}
Expand Down
3 changes: 3 additions & 0 deletions lib/vue-lib/src/pinia/pinia_hooks_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export const piniaHooksPlugin: PiniaPlugin = ({
store._trackedStoreUsersCount = computed(
() => Object.keys(store._trackedStoreUsers).length,
);

// TODO: handle reset logic - see https://pinia.vuejs.org/core-concepts/plugins.html#Resetting-state-added-in-plugins

// expose this info to devtools
// TODO: determine the best way to safely check in both vite and webpack setups
if (import.meta.env.DEV /* || process.env.NODE_ENV === "development" */) {
Expand Down
Loading