From cf0bd47146b9e219801bd40488cae03b906251e7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 09:39:06 +1000 Subject: [PATCH] fix(deps): update dependency inflection to v3 (#8835) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com> --- packages/core/package.json | 3 +-- .../core/src/fields/types/multiselect/index.ts | 4 ++-- packages/core/src/fields/types/select/index.ts | 4 ++-- pnpm-lock.yaml | 17 +++++------------ 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 1815ab6dd5e..091478898f9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -233,7 +233,7 @@ "graphql": "^16.8.1", "graphql-upload": "^15.0.2", "image-size": "^1.0.0", - "inflection": "^1.13.1", + "inflection": "^3.0.0", "intersection-observer": "^0.12.0", "meow": "^9.0.0", "next": "^13.3.0", @@ -257,7 +257,6 @@ "@types/cors": "^2.8.13", "@types/express": "^4.17.14", "@types/fs-extra": "^11.0.0", - "@types/inflection": "^1.13.0", "@types/pluralize": "^0.0.31", "@types/prompts": "^2.0.14", "@types/react": "^18.0.9", diff --git a/packages/core/src/fields/types/multiselect/index.ts b/packages/core/src/fields/types/multiselect/index.ts index d138827ff0e..0bc5540474b 100644 --- a/packages/core/src/fields/types/multiselect/index.ts +++ b/packages/core/src/fields/types/multiselect/index.ts @@ -1,4 +1,4 @@ -import inflection from 'inflection'; +import { classify } from 'inflection'; import { humanize } from '../../../lib/utils'; import { BaseListTypeInfo, @@ -170,7 +170,7 @@ function configToOptionsAndGraphQLType( }); if (config.type === 'enum') { - const enumName = `${meta.listKey}${inflection.classify(meta.fieldKey)}Type`; + const enumName = `${meta.listKey}${classify(meta.fieldKey)}Type`; const graphqlType = graphql.enum({ name: enumName, values: graphql.enumValues(options.map(x => x.value)), diff --git a/packages/core/src/fields/types/select/index.ts b/packages/core/src/fields/types/select/index.ts index 25e1beda28f..a28dfd400ba 100644 --- a/packages/core/src/fields/types/select/index.ts +++ b/packages/core/src/fields/types/select/index.ts @@ -1,4 +1,4 @@ -import inflection from 'inflection'; +import { classify } from 'inflection'; import { humanize } from '../../../lib/utils'; import { BaseListTypeInfo, @@ -176,7 +176,7 @@ export const select = }); if (config.type === 'enum') { - const enumName = `${meta.listKey}${inflection.classify(meta.fieldKey)}Type`; + const enumName = `${meta.listKey}${classify(meta.fieldKey)}Type`; const graphQLType = graphql.enum({ name: enumName, values: graphql.enumValues(options.map(x => x.value)), diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4c0f38087ec..18ac4c5a7d8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2060,8 +2060,8 @@ importers: specifier: ^1.0.0 version: 1.0.0 inflection: - specifier: ^1.13.1 - version: 1.13.1 + specifier: ^3.0.0 + version: 3.0.0 intersection-observer: specifier: ^0.12.0 version: 0.12.0 @@ -2126,9 +2126,6 @@ importers: '@types/fs-extra': specifier: ^11.0.0 version: 11.0.1 - '@types/inflection': - specifier: ^1.13.0 - version: 1.13.0 '@types/pluralize': specifier: ^0.0.31 version: 0.0.31 @@ -10920,10 +10917,6 @@ packages: /@types/http-errors@2.0.1: resolution: {integrity: sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==} - /@types/inflection@1.13.0: - resolution: {integrity: sha512-kZSETqAVS74XC/K3mPX/tbMEi/Zy1KP0Wc59dB1i5P72AHz4eSW+UIpzWxmQnDxipoKSX5eRgUXy+wUr+bY73g==} - dev: true - /@types/invariant@2.2.35: resolution: {integrity: sha512-DxX1V9P8zdJPYQat1gHyY0xj3efl8gnMVjiM9iCY6y27lj+PoQWkgjt8jDqmovPqULkKVpKRg8J36iQiA+EtEg==} dev: false @@ -16497,9 +16490,9 @@ packages: resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} dev: true - /inflection@1.13.1: - resolution: {integrity: sha512-dldYtl2WlN0QDkIDtg8+xFwOS2Tbmp12t1cHa5/YClU6ZQjTFm7B66UcVbh9NQB+HvT5BAd2t5+yKsBkw5pcqA==} - engines: {'0': node >= 0.4.0} + /inflection@3.0.0: + resolution: {integrity: sha512-1zEJU1l19SgJlmwqsEyFTbScw/tkMHFenUo//Y0i+XEP83gDFdMvPizAD/WGcE+l1ku12PcTVHQhO6g5E0UCMw==} + engines: {node: '>=18.0.0'} dev: false /inflight@1.0.6: