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

chore: Bump the nuxt group with 14 updates #2237

Merged
merged 8 commits into from
Sep 16, 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
31 changes: 0 additions & 31 deletions .yarn/patches/@apollo-client-npm-3.7.3-99f37cd27e.patch

This file was deleted.

23 changes: 0 additions & 23 deletions .yarn/patches/@bg-dev-nuxt-naiveui-npm-1.2.1-69980da2af.patch

This file was deleted.

66 changes: 0 additions & 66 deletions .yarn/patches/@nuxt-content-npm-2.7.0-425d472cf3.patch

This file was deleted.

16 changes: 0 additions & 16 deletions .yarn/patches/nitropack-npm-2.5.2-65c39b23d1.patch

This file was deleted.

807 changes: 0 additions & 807 deletions .yarn/releases/yarn-3.3.0.cjs

This file was deleted.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.3.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-3.3.0.cjs
yarnPath: .yarn/releases/yarn-3.6.3.cjs
19 changes: 18 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,18 @@ export default defineNuxtConfig({
alias: {
// Support `import 'global'` used by storybook
// TODO: Remove this workaround once nuxt provides a proper polyfill for globals https://github.com/nuxt/framework/issues/1922
global: 'global.ts',
global: './global.ts',
},

nitro: {
azure: {
config: {
globalHeaders: {
'X-Robots-Tag':
'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1',
},
},
},
// Prevent 'reflect-metadata' and 'json-bigint-patch' from being treeshaked (since we don't explicitly use the import it would otherwise be removed)
moduleSideEffects: ['reflect-metadata', 'json-bigint-patch'],
prerender: {
Expand Down Expand Up @@ -46,6 +54,15 @@ export default defineNuxtConfig({
runtimeCompiler: true,
},

// Workaround for https://github.com/nuxt/nuxt/issues/22933
hooks: {
close: (nuxt) => {
if (!nuxt.options._prepare) {
process.exit()
}
},
},

/*
** Headers of the page
** See https://v3.nuxtjs.org/getting-started/seo-meta
Expand Down
40 changes: 19 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@prisma/client": "^5.3.1",
"@variantjs/core": "^0.0.90",
"@variantjs/vue": "^0.0.22",
"@vee-validate/zod": "^4.10.5",
"@vee-validate/zod": "^4.11.6",
"@vue/apollo-composable": "4.0.0-beta.11",
"@vue/apollo-util": "^4.0.0-beta.6",
"@vueuse/core": "^10.4.1",
Expand All @@ -77,12 +77,12 @@
"ts-node": "^10.9.1",
"tsyringe": "^4.8.0",
"typescript": "^5.2.2",
"vee-validate": "^4.10.5",
"zod": "^3.21.4"
"vee-validate": "^4.11.6",
"zod": "^3.22.2"
},
"devDependencies": {
"@azure/static-web-apps-cli": "^1.1.4",
"@bg-dev/nuxt-naiveui": "^1.2.1",
"@bg-dev/nuxt-naiveui": "^1.4.6",
"@graphql-codegen/add": "^5.0.0",
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/fragment-matcher": "^5.0.0",
Expand All @@ -92,11 +92,11 @@
"@graphql-eslint/eslint-plugin": "^3.20.1",
"@graphql-inspector/cli": "^4.0.2",
"@graphql-typed-document-node/core": "^3.2.0",
"@nuxt/content": "^2.7.0",
"@nuxt/devtools": "^0.6.7",
"@nuxt/content": "^2.8.2",
"@nuxt/devtools": "^0.8.3",
"@nuxtjs/eslint-config": "^12.0.0",
"@nuxtjs/eslint-config-typescript": "^12.0.0",
"@nuxtjs/tailwindcss": "6.8.0",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"@nuxtjs/tailwindcss": "^6.8.0",
"@storybook/core-server": "^7.0.26",
"@storybook/vue3": "^7.0.26",
"@storybook/vue3-vite": "7.0.26",
Expand All @@ -115,7 +115,7 @@
"@types/yaireo__tagify": "^4.17.2",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"@vee-validate/nuxt": "^4.10.5",
"@vee-validate/nuxt": "^4.11.6",
"@vitest/coverage-v8": "^0.34.3",
"@volar/vue-typescript": "^1.6.5",
"@vue/compiler-sfc": "^3.3.4",
Expand All @@ -135,11 +135,11 @@
"graphql-codegen-typescript-validation-schema": "^0.12.0",
"mount-vue-component": "^0.10.2",
"naive-ui": "^2.34.4",
"nuxt": "^3.6.2",
"nuxt-graphql-server": "2.0.1",
"nuxt-icon": "^0.4.2",
"nuxt-seo-kit": "^1.3.9",
"nuxt-vitest": "^0.9.0",
"nuxt": "^3.7.3",
"nuxt-graphql-server": "3.0.0",
"nuxt-icon": "^0.5.0",
"nuxt-seo-kit": "^1.3.13",
"nuxt-vitest": "^0.10.5",
"postinstall-postinstall": "^2.1.0",
"prettier": "^3.0.3",
"prettier-plugin-organize-imports": "^3.2.3",
Expand All @@ -149,7 +149,7 @@
"storybook-vue-addon": "^0.4.0",
"supertest": "^6.3.3",
"supertest-graphql": "^1.1.4",
"ufo": "^1.1.1",
"ufo": "^1.3.0",
"unplugin-vue-components": "^0.25.2",
"vitest": "^0.34.3",
"vitest-github-actions-reporter": "^0.10.0",
Expand All @@ -168,20 +168,18 @@
"@graphql-tools/schema": "^10.0.0",
"vue-demi": "^0.14.5",
"@wry/trie": "^0.4.3",
"unified": "^11.0.3",
"@vue/apollo-util": "patch:@vue/apollo-util@npm%3A4.0.0-beta.6#./.yarn/patches/@vue-apollo-util-npm-4.0.0-beta.6-7e26e14eb7.patch",
"@nuxt/content": "patch:@nuxt/content@npm%3A2.7.0#./.yarn/patches/@nuxt-content-npm-2.7.0-425d472cf3.patch",
"nitropack": "patch:nitropack@npm%3A2.5.2#./.yarn/patches/nitropack-npm-2.5.2-65c39b23d1.patch",
"redis-mock@^0.56.3": "patch:redis-mock@npm%3A0.56.3#./.yarn/patches/redis-mock-npm-0.56.3-967bd7c6ea.patch",
"@bg-dev/nuxt-naiveui@^1.2.1": "patch:@bg-dev/nuxt-naiveui@npm%3A1.2.1#./.yarn/patches/@bg-dev-nuxt-naiveui-npm-1.2.1-69980da2af.patch"
"redis-mock@^0.56.3": "patch:redis-mock@npm%3A0.56.3#./.yarn/patches/redis-mock-npm-0.56.3-967bd7c6ea.patch"
},
"resolutionsComments": {
"@types/react": "Otherwise these types interfere with the types from vite: https://github.com/johnsoncodehk/volar/discussions/592#discussioncomment-1580518",
"tslib": "some libraries still pull-in v1 of tslib, which is incompatible with the other libraries that use tslib v2 features",
"uuid/node-fetch-native/destr/schema/vue-demi/trie": "nitro still has problems when multiple versions of packages are used"
"uuid/node-fetch-native/destr/schema/vue-demi/trie/unified": "nitro still has problems when multiple versions of packages are used"
},
"prisma": {
"schema": "server/database/schema.prisma",
"seed": "node --experimental-specifier-resolution=node --loader ts-node/esm ./server/database/runSeed.ts"
},
"packageManager": "yarn@3.3.0"
"packageManager": "yarn@3.6.3"
}
2 changes: 1 addition & 1 deletion server/groups/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class Mutation {
): Promise<Group | null> {
return await this.groupService.updateGroup({
id: group.id,
name: group.name || undefined,
name: group.name ?? undefined,
// TODO: Remaining properties
})
}
Expand Down
2 changes: 1 addition & 1 deletion server/user/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { v4 as generateToken } from 'uuid'
import { hash, verifyHash } from '../utils/crypto'
import { resetPasswordTemplate } from '../utils/resetPasswordTemplate'
import { sendEmail } from '../utils/sendEmail'
import { RedisClient } from '../utils/services.factory'
import type { RedisClient } from '../utils/services.factory'
import { inject, injectable } from './../tsyringe'

export type { InfoArgument as AuthenticationMessage } from 'graphql-passport'
Expand Down
2 changes: 1 addition & 1 deletion server/user/passport-initializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import session from 'express-session'
import { EventHandler } from 'h3'
import passport from 'passport'
import { Environment } from '~/config'
import { RedisClient } from '../utils/services.factory'
import type { RedisClient } from '../utils/services.factory'
import { inject, injectable } from './../tsyringe'
import EmailStrategy from './auth.email.strategy'
import { AuthService } from './auth.service'
Expand Down
5 changes: 2 additions & 3 deletions server/user/resolvers.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { MutationLoginArgs, MutationSignupArgs } from '#graphql/resolver'
import {
ForgotPasswordPayload,
MutationChangePasswordArgs,
MutationForgotPasswordArgs,
MutationLoginArgs,
MutationSignupArgs,
QueryUserArgs,
Resolvers,
UserChangesArgs,
Expand All @@ -13,7 +12,7 @@ import {
} from '#graphql/resolver'
import { User } from '@prisma/client'
import { LoginInputSchema, SignupInputSchema } from '~/apollo/validation'
import { Context } from '../context'
import type { Context } from '../context'
import {
UserDocument,
UserDocumentService,
Expand Down
2 changes: 2 additions & 0 deletions server/utils/services.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export async function createRedisClient(config: Config): Promise<RedisClient> {
// Workaround for redis-mock being not compatible with redis@4
// TODO: Remove this workaround once https://github.com/yeahoffline/redis-mock/issues/195 is fixed
return {
// eslint-disable-next-line @typescript-eslint/no-misused-promises
get: promisify(mockRedis.get).bind(mockRedis),
// eslint-disable-next-line @typescript-eslint/no-misused-promises
quit: promisify(mockRedis.quit).bind(mockRedis),
/*
delete: promisify(mockRedis.del).bind(mockRedis),
Expand Down
2 changes: 1 addition & 1 deletion server/utils/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function validateInput<T extends AnyZodObject>(
const result = schema.safeParse(input)

if (result.success) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return originalMethod.call(
this,
root,
Expand Down
8 changes: 8 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ import { defineVitestConfig } from 'nuxt-vitest/config'
import GithubActionsReporter from 'vitest-github-actions-reporter'

export default defineVitestConfig({
esbuild: {
tsconfigRaw: {
compilerOptions: {
// Enable decorators, workaround for https://github.com/unjs/nitro/issues/1380
experimentalDecorators: true,
},
},
},
test: {
// Provide global API
// https://vitest.dev/config/#globals
Expand Down
Loading
Loading