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

fix(deps): обновление зависимостей #207

Merged
merged 3 commits into from
Dec 24, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
changelog:
uses: Pacific-Agency/workflows/.github/workflows/changelog.yml@v0.6.0
uses: Pacific-Agency/workflows/.github/workflows/changelog.yml@v0.6.1
with:
version: ${{ inputs.version }}
secrets:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ on:

jobs:
lint:
uses: Pacific-Agency/workflows/.github/workflows/frontend-lint.yml@v0.6.0
uses: Pacific-Agency/workflows/.github/workflows/frontend-lint.yml@v0.6.1
test:
uses: Pacific-Agency/workflows/.github/workflows/frontend-test.yml@v0.6.0
uses: Pacific-Agency/workflows/.github/workflows/frontend-test.yml@v0.6.1
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
pnpm docs:build

- name: Деплой
uses: JamesIves/github-pages-deploy-action@v4.6.3
uses: JamesIves/github-pages-deploy-action@v4.7.2
with:
branch: gh-pages
folder: docs/.vitepress/dist
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,32 @@
"prettier": "@exer7um/prettier-config",
"dependencies": {
"@nuxt/kit": "^3.12.4",
"@vuepic/vue-datepicker": "^9.0.2",
"@vueuse/core": "^11.0.0",
"@vuepic/vue-datepicker": "^10.0.0",
"@vueuse/core": "^12.0.0",
"consola": "^3.2.3",
"isomorphic-dompurify": "^2.14.0",
"maska": "^3.0.0",
"ohash": "^1.1.3"
},
"devDependencies": {
"@exer7um/eslint-config": "1.4.2",
"@exer7um/prettier-config": "0.4.5",
"@nuxt/eslint-config": "0.5.0",
"@nuxt/module-builder": "0.8.3",
"@nuxt/schema": "3.12.4",
"@nuxt/test-utils": "3.14.1",
"@exer7um/eslint-config": "1.4.7",
"@exer7um/prettier-config": "0.5.0",
"@nuxt/eslint-config": "0.7.4",
"@nuxt/module-builder": "0.8.4",
"@nuxt/schema": "3.14.1592",
"@nuxt/test-utils": "3.15.1",
"@vue/test-utils": "2.4.6",
"happy-dom": "^12.10.3",
"husky": "9.1.4",
"lint-staged": "15.2.9",
"nuxt": "3.12.4",
"typescript": "5.5.4",
"vitepress": "1.3.2",
"husky": "9.1.7",
"lint-staged": "15.2.11",
"nuxt": "3.14.1592",
"typescript": "5.7.2",
"vitepress": "1.5.0",
"vitest": "^1.6.0"
},
"peerDependencies": {
"@nuxt/icon": "^1.3.1",
"vue": "^3.4.34"
},
"packageManager": "pnpm@9.7.1"
"packageManager": "pnpm@9.15.1"
}
5,600 changes: 3,720 additions & 1,880 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default defineNuxtModule<ModuleOptions>({
addPlugin(resolve("./runtime/plugins/openFetch"))
} else {
consola.warn(
"Плагин `nuxt-open-fetch` не установлен. Для работы данной функции необходимо установить и настроить плагин `nuxt-open-fetch`."
"Плагин `nuxt-open-fetch` не установлен. Для работы данной функции необходимо установить и настроить плагин `nuxt-open-fetch`.",
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/api/sitemap-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ export default eventHandler(async () => {
return Object.entries(data).flatMap(([entity, slugsArray]) =>
slugsArray.map((item) => {
return { _i18nTransform: true, loc: `${entity}/${item.slug}` }
})
}),
)
})
2 changes: 1 addition & 1 deletion src/runtime/components/UtilsDate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ withDefaults(
id: "date",
placeholder: "Выберите дату",
required: true,
}
},
)

/** Текущий текст поля */
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/UtilsInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ withDefaults(
{
required: true,
type: "text",
}
},
)

/** Текущий текст поля */
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/UtilsInputMasked.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ withDefaults(
{
required: true,
type: "text",
}
},
)

/** Текущий текст поля */
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/UtilsMapWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ watch(
},
{
immediate: true,
}
},
)

// Выставляем параметр z
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/UtilsPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ withDefaults(
id: "password",
minlength: 4,
required: true,
}
},
)

/** Текущий текст поля */
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/UtilsPhone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ withDefaults(
id: "phone",
placeholder: "+7 999 888-77-66",
required: true,
}
},
)

/** Текущий текст поля */
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/UtilsTextArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ withDefaults(
{
required: true,
rows: 3,
}
},
)

/** Текущий текст поля */
Expand Down
15 changes: 10 additions & 5 deletions src/runtime/composables/useFetchAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import authHeaders from "../utils/authHeaders"

/** Параметры useFetch */
type FetchParams = Parameters<typeof useFetch>
/** Тип ответа от useFetch */
/**
* Тип ответа от useFetch
*
* @template TResponse Тип данных, возвращаемых сервером.
*/
type FetchReturn<TResponse> = Promise<ReturnType<typeof useFetch<TResponse>>>

/**
Expand All @@ -18,9 +22,10 @@ type FetchReturn<TResponse> = Promise<ReturnType<typeof useFetch<TResponse>>>
* - Добавляет заголовок `X-CSRFToken` со значением из `cookie` `csrftoken`
* - В `dev`-режиме добавляет заголовок `Authorization` со значением из `.env`.
*
* @param url - `URL` для запроса
* @param options - параметры запроса
* @returns Ответ от API, формат как у useFetch
* @template TResponse Тип данных, возвращаемых сервером.
* @param url - `URL` для запроса.
* @param options - параметры запроса.
* @returns Ответ от API, формат как у useFetch.
* @see https://pacific-agency.github.io/nuxt-utils/composables/use-fetch-auth.html
* @example
* ```ts
Expand All @@ -31,7 +36,7 @@ type FetchReturn<TResponse> = Promise<ReturnType<typeof useFetch<TResponse>>>
*/
export default async function <TResponse>(
url: FetchParams[0],
options: UseFetchOptions<TResponse> = {}
options: UseFetchOptions<TResponse> = {},
): FetchReturn<TResponse> {
/** Параметры для функции */
const params = authHeaders(options)
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/composables/useHighlightedText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export default function (text: string, query: string) {

/** Строка с добавленными тегами `<mark>` */
return text.replace(regex, (match) =>
match ? "<mark>" + match + "</mark>" : match
match ? "<mark>" + match + "</mark>" : match,
)
}
14 changes: 11 additions & 3 deletions src/runtime/composables/usePagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import { hash } from "ohash"
/** Параметры useFetch */
type FetchParams = Parameters<typeof useFetch>

/** Ответ от API с пагинацией */
/**
*
* @template TResponse Тип данных, возвращаемых сервером.
* Ответ от API с пагинацией
*/
interface Pagination<TResponse> {
/** Количество результатов */
count: number
Expand All @@ -22,7 +26,10 @@ interface Pagination<TResponse> {
results: TResponse
}

/** Параметры пагинации */
/**
* @template TResponse Тип данных, возвращаемых сервером.
* Параметры пагинации
*/
interface PaginationOptions<TResponse>
extends UseFetchOptions<Pagination<TResponse[]>> {
/** Использовать ли авторизацию */
Expand All @@ -32,6 +39,7 @@ interface PaginationOptions<TResponse>
/**
* Данная функция возвращает объект с методами для работы с пагинацией.
*
* @template TResponse Тип данных, возвращаемых сервером.
* @param url - `URL` для запроса
* @param options - параметры запроса
* @returns Объект с методами для работы с пагинацией
Expand All @@ -43,7 +51,7 @@ interface PaginationOptions<TResponse>
*/
export default async function <TResponse>(
url: FetchParams[0],
options: PaginationOptions<TResponse> = {}
options: PaginationOptions<TResponse> = {},
) {
/** Выбранная страница пагинации */
const selectedPage = ref<number>(1)
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/composables/useScrollSlider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { computed, onMounted, onUnmounted, ref } from "#imports"
* @see https://pacific-agency.github.io/nuxt-utils/composables/use-scroll-slider.html
*/
export default function useScrollSlider(
sliderRef: Ref<HTMLElement | undefined>
sliderRef: Ref<HTMLElement | undefined>,
): {
isLeftCorner: ComputedRef<boolean>
isRightCorner: ComputedRef<boolean>
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/composables/useSubmitForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ interface SubmitFormOptions extends UseFetchOptions<void> {
*/
export default function useSubmitForm(
url: FetchParams[0],
options?: MaybeRef<Partial<SubmitFormOptions>>
options?: MaybeRef<Partial<SubmitFormOptions>>,
): {
isLoading: Ref<boolean>
isSent: Ref<boolean>
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/plugins/openFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default defineNuxtPlugin({
const params = authHeaders(options)

return [name, createOpenFetch(params, localFetch)]
})
}),
),
}
},
Expand Down
1 change: 1 addition & 0 deletions src/runtime/utils/authHeaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { defu } from "defu"
* - Добавляет заголовок `X-CSRFToken` со значением из `cookie` `csrftoken`
* - В `dev`-режиме добавляет заголовок `Authorization` со значением из `.env`.
*
* @template TResponse - ответ сервера
* @param options - параметры запроса
* @returns параметры запроса с добавленными заголовками
*/
Expand Down
1 change: 0 additions & 1 deletion tests/api/sitemap-routes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { describe, expect, test } from "vitest"

// @vitest-environment node

// eslint-disable-next-line vitest/valid-describe-callback
describe("Эндпоинт Sitemap", async () => {
await setup({
rootDir: fileURLToPath(new URL("../fixtures/basic", import.meta.url)),
Expand Down
2 changes: 1 addition & 1 deletion tests/components/UtilsInputMasked.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ describe("Компонент UtilsInputMasked", () => {

// Проверка атрибута `pattern`
expect(input.attributes("pattern")).toBe(
String.raw`\+\d \d{3} \d{3}-\d{2}-\d{2}`
String.raw`\+\d \d{3} \d{3}-\d{2}-\d{2}`,
)
})

Expand Down
2 changes: 1 addition & 1 deletion tests/components/UtilsMapWidget.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe.sequential("Компонент UtilsMapWidget", () => {

// Ожидается правильный src карты
expect(widgetURL.href).toBe(
`https://yandex.ru/map-widget/v1/-/${widgetId}?z=16`
`https://yandex.ru/map-widget/v1/-/${widgetId}?z=16`,
)
})

Expand Down
2 changes: 1 addition & 1 deletion tests/components/UtilsPhone.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe("Компонент UtilsPhone", () => {
expect(input.attributes("maxlength")).toBe("16")
// Проверка атрибута `pattern`
expect(input.attributes("pattern")).toBe(
String.raw`\+\d \d{3} \d{3}-\d{2}-\d{2}`
String.raw`\+\d \d{3} \d{3}-\d{2}-\d{2}`,
)
// Проверка атрибута `placeholder`
expect(input.attributes("placeholder")).toBe("+7 999 888-77-66")
Expand Down
Loading