chore: bump deps (#810)

* bump prettier/eslint-plugin

* bump nuxt pwa

* use typed imports

* set vue version to fix layout errors

* disable import
This commit is contained in:
Hayden 2024-03-01 12:08:14 -06:00 committed by GitHub
parent be2910e0df
commit b77c9be36f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
56 changed files with 6562 additions and 320 deletions

View File

@ -25,6 +25,7 @@ module.exports = {
"vue/no-setup-props-destructure": 0,
"vue/no-multiple-template-root": 0,
"vue/no-v-model-argument": 0,
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-unused-vars": [
"error",

View File

@ -22,7 +22,7 @@
</template>
<script setup lang="ts">
import { ItemAttachment } from "~~/lib/api/types/data-contracts";
import type { ItemAttachment } from "~~/lib/api/types/data-contracts";
import MdiPaperclip from "~icons/mdi/paperclip";
import MdiDownload from "~icons/mdi/download";
import MdiOpenInNew from "~icons/mdi/open-in-new";

View File

@ -34,7 +34,7 @@
</template>
<script setup lang="ts">
import { ItemOut, ItemSummary } from "~~/lib/api/types/data-contracts";
import type { ItemOut, ItemSummary } from "~~/lib/api/types/data-contracts";
import MdiShieldCheck from "~icons/mdi/shield-check";
const api = useUserApi();

View File

@ -35,7 +35,7 @@
</template>
<script setup lang="ts">
import { ItemCreate, LabelOut, LocationOut } from "~~/lib/api/types/data-contracts";
import type { ItemCreate, LabelOut, LocationOut } from "~~/lib/api/types/data-contracts";
import { useLabelStore } from "~~/stores/labels";
import { useLocationStore } from "~~/stores/locations";
import MdiPackageVariant from "~icons/mdi/package-variant";

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { ViewType } from "~~/composables/use-preferences";
import { ItemSummary } from "~~/lib/api/types/data-contracts";
import type { ViewType } from "~~/composables/use-preferences";
import type { ItemSummary } from "~~/lib/api/types/data-contracts";
import MdiDotsVertical from "~icons/mdi/dots-vertical";
import MdiCardTextOutline from "~icons/mdi/card-text-outline";
import MdiTable from "~icons/mdi/table";

View File

@ -1,4 +1,4 @@
import { ItemSummary } from "~~/lib/api/types/data-contracts";
import type { ItemSummary } from "~~/lib/api/types/data-contracts";
export type TableHeader = {
text: string;

View File

@ -74,8 +74,8 @@
</template>
<script setup lang="ts">
import { TableData, TableHeader } from "./Table.types";
import { ItemSummary } from "~~/lib/api/types/data-contracts";
import type { TableData, TableHeader } from "./Table.types";
import type { ItemSummary } from "~~/lib/api/types/data-contracts";
import MdiArrowDown from "~icons/mdi/arrow-down";
import MdiArrowUp from "~icons/mdi/arrow-up";
import MdiCheck from "~icons/mdi/check";

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { LabelOut, LabelSummary } from "~~/lib/api/types/data-contracts";
import type { LabelOut, LabelSummary } from "~~/lib/api/types/data-contracts";
import MdiArrowRight from "~icons/mdi/arrow-right";
import MdiTagOutline from "~icons/mdi/tag-outline";

View File

@ -28,7 +28,7 @@
</template>
<script lang="ts" setup>
import { LocationOut, LocationOutCount, LocationSummary } from "~~/lib/api/types/data-contracts";
import type { LocationOut, LocationOutCount, LocationSummary } from "~~/lib/api/types/data-contracts";
import MdiArrowRight from "~icons/mdi/arrow-right";
import MdiMapMarkerOutline from "~icons/mdi/map-marker-outline";

View File

@ -34,7 +34,7 @@
</template>
<script setup lang="ts">
import { LocationSummary } from "~~/lib/api/types/data-contracts";
import type { LocationSummary } from "~~/lib/api/types/data-contracts";
import MdiChevronDown from "~icons/mdi/chevron-down";
const props = defineProps({
modelValue: {

View File

@ -20,8 +20,9 @@
</template>
<script lang="ts" setup>
import { FlatTreeItem, useFlatLocations } from "~~/composables/use-location-helpers";
import { LocationSummary } from "~~/lib/api/types/data-contracts";
import type { FlatTreeItem } from "~~/composables/use-location-helpers";
import { useFlatLocations } from "~~/composables/use-location-helpers";
import type { LocationSummary } from "~~/lib/api/types/data-contracts";
import MdiCheck from "~icons/mdi/check";
type Props = {

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { useTreeState } from "./tree-state";
import { TreeItem } from "~~/lib/api/types/data-contracts";
import type { TreeItem } from "~~/lib/api/types/data-contracts";
import MdiChevronDown from "~icons/mdi/chevron-down";
import MdiChevronRight from "~icons/mdi/chevron-right";
import MdiMapMarker from "~icons/mdi/map-marker";

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { TreeItem } from "~~/lib/api/types/data-contracts";
import type { TreeItem } from "~~/lib/api/types/data-contracts";
type Props = {
locs: TreeItem[];

View File

@ -3,7 +3,7 @@
</template>
<script setup lang="ts">
import { DateTimeFormat, DateTimeType } from "~~/composables/use-formatters";
import type { DateTimeFormat, DateTimeType } from "~~/composables/use-formatters";
type Props = {
date?: Date | string;

View File

@ -12,7 +12,7 @@
</template>
<script setup lang="ts">
import { StatsFormat } from "./types";
import type { StatsFormat } from "./types";
type Props = {
title: string;

View File

@ -42,7 +42,7 @@
</template>
<script setup lang="ts">
import { TableData, TableHeader } from "./Table.types";
import type { TableData, TableHeader } from "./Table.types";
type Props = {
headers: TableHeader[];

View File

@ -1,7 +1,7 @@
import { CookieRef } from "nuxt/app";
import { PublicApi } from "~~/lib/api/public";
import { UserOut } from "~~/lib/api/types/data-contracts";
import { UserClient } from "~~/lib/api/user";
import type { CookieRef } from "nuxt/app";
import type { PublicApi } from "~~/lib/api/public";
import type { UserOut } from "~~/lib/api/types/data-contracts";
import type { UserClient } from "~~/lib/api/user";
export interface IAuthContext {
get token(): boolean | null;

View File

@ -1,5 +1,5 @@
import { UseConfirmDialogRevealResult, UseConfirmDialogReturn } from "@vueuse/core";
import { Ref } from "vue";
import type { UseConfirmDialogRevealResult, UseConfirmDialogReturn } from "@vueuse/core";
import type { Ref } from "vue";
type Store = UseConfirmDialogReturn<any, boolean, boolean> & {
text: Ref<string>;

View File

@ -1,5 +1,5 @@
import { ItemSummary, LabelSummary, LocationSummary } from "~~/lib/api/types/data-contracts";
import { UserClient } from "~~/lib/api/user";
import type { ItemSummary, LabelSummary, LocationSummary } from "~~/lib/api/types/data-contracts";
import type { UserClient } from "~~/lib/api/user";
type SearchOptions = {
immediate?: boolean;

View File

@ -1,5 +1,5 @@
import { Ref } from "vue";
import { TreeItem } from "~~/lib/api/types/data-contracts";
import type { Ref } from "vue";
import type { TreeItem } from "~~/lib/api/types/data-contracts";
export interface FlatTreeItem {
id: string;

View File

@ -1,4 +1,4 @@
import { WritableComputedRef } from "vue";
import type { WritableComputedRef } from "vue";
export function useMinLoader(ms = 500): WritableComputedRef<boolean> {
const loading = ref(false);

View File

@ -1,5 +1,5 @@
import { Ref } from "vue";
import { DaisyTheme } from "~~/lib/data/themes";
import type { Ref } from "vue";
import type { DaisyTheme } from "~~/lib/data/themes";
export type ViewType = "table" | "card" | "tree";

View File

@ -1,7 +1,7 @@
import { useRouteQuery as useRouteQueryBase } from "@vueuse/router";
/* eslint no-redeclare: 0 */
import { WritableComputedRef } from "vue";
import type { WritableComputedRef } from "vue";
export function useRouteQuery(q: string, def: string[]): WritableComputedRef<string[]>;
export function useRouteQuery(q: string, def: string): WritableComputedRef<string>;

View File

@ -1,5 +1,5 @@
import { ComputedRef } from "vue";
import { DaisyTheme } from "~~/lib/data/themes";
import type { ComputedRef } from "vue";
import type { DaisyTheme } from "~~/lib/data/themes";
export interface UseTheme {
theme: ComputedRef<DaisyTheme>;

View File

@ -2,7 +2,7 @@ import { faker } from "@faker-js/faker";
import { expect } from "vitest";
import { overrideParts } from "../../base/urls";
import { PublicApi } from "../../public";
import { ItemField, LabelCreate, LocationCreate, UserRegistration } from "../../types/data-contracts";
import type { ItemField, LabelCreate, LocationCreate, UserRegistration } from "../../types/data-contracts";
import * as config from "../../../../test/config";
import { UserClient } from "../../user";
import { Requests } from "../../../requests";

View File

@ -1,6 +1,6 @@
import { beforeAll, expect } from "vitest";
import { faker } from "@faker-js/faker";
import { UserClient } from "../user";
import type { UserClient } from "../user";
import { factories } from "./factories";
const cache = {

View File

@ -1,8 +1,8 @@
import { faker } from "@faker-js/faker";
import { describe, test, expect } from "vitest";
import { ItemField, ItemUpdate, LocationOut } from "../../types/data-contracts";
import type { ItemField, ItemUpdate, LocationOut } from "../../types/data-contracts";
import { AttachmentTypes } from "../../types/non-generated";
import { UserClient } from "../../user";
import type { UserClient } from "../../user";
import { factories } from "../factories";
import { sharedUserClient } from "../test-utils";

View File

@ -1,6 +1,6 @@
import { describe, expect, test } from "vitest";
import { LabelOut } from "../../types/data-contracts";
import { UserClient } from "../../user";
import type { LabelOut } from "../../types/data-contracts";
import type { UserClient } from "../../user";
import { factories } from "../factories";
import { sharedUserClient } from "../test-utils";

View File

@ -1,6 +1,6 @@
import { describe, expect, test } from "vitest";
import { LocationOut } from "../../types/data-contracts";
import { UserClient } from "../../user";
import type { LocationOut } from "../../types/data-contracts";
import type { UserClient } from "../../user";
import { factories } from "../factories";
import { sharedUserClient } from "../test-utils";

View File

@ -1,6 +1,6 @@
import { faker } from "@faker-js/faker";
import { beforeAll, describe, expect, test } from "vitest";
import { UserClient } from "../../user";
import type { UserClient } from "../../user";
import { factories } from "../factories";
type ImportObj = {

View File

@ -1,4 +1,4 @@
import { Requests } from "../../requests";
import type { Requests } from "../../requests";
import { route } from ".";
const ZERO_DATE = "0001-01-01T00:00:00Z";

View File

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base";
import { ActionAmountResult } from "../types/data-contracts";
import type { ActionAmountResult } from "../types/data-contracts";
export class ActionsAPI extends BaseAPI {
ensureAssetIDs() {

View File

@ -1,6 +1,6 @@
import { BaseAPI, route } from "../base";
import { ItemSummary } from "../types/data-contracts";
import { PaginationResult } from "../types/non-generated";
import type { ItemSummary } from "../types/data-contracts";
import type { PaginationResult } from "../types/non-generated";
export class AssetsApi extends BaseAPI {
async get(id: string, page = 1, pageSize = 50) {

View File

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base";
import {
import type {
CurrenciesCurrency,
Group,
GroupInvitation,

View File

@ -1,6 +1,6 @@
import { BaseAPI, route } from "../base";
import { parseDate } from "../base/base-api";
import {
import type {
ItemAttachmentUpdate,
ItemCreate,
ItemOut,
@ -13,8 +13,8 @@ import {
MaintenanceEntryUpdate,
MaintenanceLog,
} from "../types/data-contracts";
import { AttachmentTypes, PaginationResult } from "../types/non-generated";
import { Requests } from "~~/lib/requests";
import type { AttachmentTypes, PaginationResult } from "../types/non-generated";
import type { Requests } from "~~/lib/requests";
export type ItemsQuery = {
orderBy?: string;

View File

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base";
import { LabelCreate, LabelOut } from "../types/data-contracts";
import type { LabelCreate, LabelOut } from "../types/data-contracts";
export class LabelsApi extends BaseAPI {
getAll() {

View File

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base";
import { LocationOutCount, LocationCreate, LocationOut, LocationUpdate, TreeItem } from "../types/data-contracts";
import type { LocationOutCount, LocationCreate, LocationOut, LocationUpdate, TreeItem } from "../types/data-contracts";
export type LocationsQuery = {
filterChildren: boolean;

View File

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base";
import { NotifierCreate, NotifierOut, NotifierUpdate } from "../types/data-contracts";
import type { NotifierCreate, NotifierOut, NotifierUpdate } from "../types/data-contracts";
export class NotifiersAPI extends BaseAPI {
getAll() {

View File

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base";
import { GroupStatistics, TotalsByOrganizer, ValueOverTime } from "../types/data-contracts";
import type { GroupStatistics, TotalsByOrganizer, ValueOverTime } from "../types/data-contracts";
function YYYY_MM_DD(date?: Date): string {
if (!date) {

View File

@ -1,6 +1,6 @@
import { BaseAPI, route } from "../base";
import { ChangePassword, UserOut } from "../types/data-contracts";
import { Result } from "../types/non-generated";
import type { ChangePassword, UserOut } from "../types/data-contracts";
import type { Result } from "../types/non-generated";
export class UserApi extends BaseAPI {
public self() {

View File

@ -1,5 +1,5 @@
import { BaseAPI, route } from "./base";
import { APISummary, LoginForm, TokenResponse, UserRegistration } from "./types/data-contracts";
import type { APISummary, LoginForm, TokenResponse, UserRegistration } from "./types/data-contracts";
export type StatusResult = {
health: boolean;

View File

@ -9,7 +9,7 @@ import { StatsAPI } from "./classes/stats";
import { AssetsApi } from "./classes/assets";
import { ReportsAPI } from "./classes/reports";
import { NotifiersAPI } from "./classes/notifiers";
import { Requests } from "~~/lib/requests";
import type { Requests } from "~~/lib/requests";
export class UserClient extends BaseAPI {
locations: LocationsApi;

View File

@ -1,6 +1,6 @@
// https://gist.github.com/ucw/67f7291c64777fb24341e8eae72bcd24
import { IncomingMessage } from "http";
import internal from "stream";
import type { IncomingMessage } from "http";
import type internal from "stream";
import { defineNuxtModule, logger } from "@nuxt/kit";
// Related To
// - https://github.com/nuxt/nuxt/issues/15417
@ -8,7 +8,8 @@ import { defineNuxtModule, logger } from "@nuxt/kit";
//
// fix from
// - https://gist.github.com/ucw/67f7291c64777fb24341e8eae72bcd24
import { createProxyServer } from "http-proxy"; // eslint-disable-line import/named
// eslint-disable-next-line
import { createProxyServer } from "http-proxy";
export default defineNuxtModule({
defaults: {

View File

@ -21,15 +21,15 @@
"@types/markdown-it": "^13.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vite-pwa/nuxt": "^0.2.0",
"@vite-pwa/nuxt": "^0.5.0",
"eslint": "^8.23.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vue": "^9.4.0",
"h3": "^1.7.1",
"isomorphic-fetch": "^3.0.0",
"nuxt": "3.6.5",
"prettier": "^2.7.1",
"prettier": "^3.2.5",
"typescript": "^5.0.0",
"unplugin-icons": "^0.18.5",
"vite-plugin-eslint": "^1.8.1",
@ -57,7 +57,7 @@
"pinia": "^2.0.21",
"postcss": "^8.4.16",
"tailwindcss": "^3.1.8",
"vue": "^3.3.1",
"vue": "v3.4.8",
"vue-router": "4"
}
}

View File

@ -1,4 +1,4 @@
import { UserClient } from "~~/lib/api/user";
import type { UserClient } from "~~/lib/api/user";
type StatCard = {
label: string;

View File

@ -1,4 +1,4 @@
import { UserClient } from "~~/lib/api/user";
import type { UserClient } from "~~/lib/api/user";
export function itemsTable(api: UserClient) {
const { data: items, refresh } = useAsyncData(async () => {

View File

@ -1,6 +1,7 @@
<script setup lang="ts">
import { AnyDetail, Detail, Details, filterZeroValues } from "~~/components/global/DetailsSection/types";
import { ItemAttachment } from "~~/lib/api/types/data-contracts";
import type { AnyDetail, Detail, Details } from "~~/components/global/DetailsSection/types";
import { filterZeroValues } from "~~/components/global/DetailsSection/types";
import type { ItemAttachment } from "~~/lib/api/types/data-contracts";
import MdiClose from "~icons/mdi/close";
import MdiPackageVariant from "~icons/mdi/package-variant";
import MdiPlus from "~icons/mdi/plus";

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ItemAttachment, ItemField, ItemOut, ItemUpdate } from "~~/lib/api/types/data-contracts";
import type { ItemAttachment, ItemField, ItemOut, ItemUpdate } from "~~/lib/api/types/data-contracts";
import { AttachmentTypes } from "~~/lib/api/types/non-generated";
import { useLabelStore } from "~~/stores/labels";
import { useLocationStore } from "~~/stores/locations";

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import DatePicker from "~~/components/Form/DatePicker.vue";
import { StatsFormat } from "~~/components/global/StatCard/types";
import { ItemOut, MaintenanceEntry } from "~~/lib/api/types/data-contracts";
import type { StatsFormat } from "~~/components/global/StatCard/types";
import type { ItemOut, MaintenanceEntry } from "~~/lib/api/types/data-contracts";
import MdiPost from "~icons/mdi/post";
import MdiPlus from "~icons/mdi/plus";
import MdiCheck from "~icons/mdi/check";

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ItemSummary, LabelSummary, LocationOutCount } from "~~/lib/api/types/data-contracts";
import type { ItemSummary, LabelSummary, LocationOutCount } from "~~/lib/api/types/data-contracts";
import { useLabelStore } from "~~/stores/labels";
import { useLocationStore } from "~~/stores/locations";
import MdiLoading from "~icons/mdi/loading";

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { LocationSummary, LocationUpdate } from "~~/lib/api/types/data-contracts";
import type { LocationSummary, LocationUpdate } from "~~/lib/api/types/data-contracts";
import { useLocationStore } from "~~/stores/locations";
import MdiPackageVariant from "~icons/mdi/package-variant";
import MdiPencil from "~icons/mdi/pencil";

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { Detail } from "~~/components/global/DetailsSection/types";
import type { Detail } from "~~/components/global/DetailsSection/types";
import { themes } from "~~/lib/data/themes";
import { CurrenciesCurrency, NotifierCreate, NotifierOut } from "~~/lib/api/types/data-contracts";
import type { CurrenciesCurrency, NotifierCreate, NotifierOut } from "~~/lib/api/types/data-contracts";
import MdiAccount from "~icons/mdi/account";
import MdiMegaphone from "~icons/mdi/megaphone";
import MdiDelete from "~icons/mdi/delete";

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
import { defineStore } from "pinia";
import { LabelOut } from "~~/lib/api/types/data-contracts";
import type { LabelOut } from "~~/lib/api/types/data-contracts";
export const useLabelStore = defineStore("labels", {
state: () => ({

View File

@ -1,6 +1,6 @@
import { defineStore } from "pinia";
import { LocationsApi } from "~~/lib/api/classes/locations";
import { LocationOutCount, TreeItem } from "~~/lib/api/types/data-contracts";
import type { LocationsApi } from "~~/lib/api/classes/locations";
import type { LocationOutCount, TreeItem } from "~~/lib/api/types/data-contracts";
export const useLocationStore = defineStore("locations", {
state: () => ({

6162
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff