Skip to content

Commit

Permalink
fix(deps): update dependency inflection to v3 (#8835)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com>
  • Loading branch information
renovate[bot] and dcousens authored Sep 26, 2023
1 parent 5e92dc6 commit cf0bd47
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/fields/types/multiselect/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import inflection from 'inflection';
import { classify } from 'inflection';
import { humanize } from '../../../lib/utils';
import {
BaseListTypeInfo,
Expand Down Expand Up @@ -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)),
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/fields/types/select/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import inflection from 'inflection';
import { classify } from 'inflection';
import { humanize } from '../../../lib/utils';
import {
BaseListTypeInfo,
Expand Down Expand Up @@ -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)),
Expand Down
17 changes: 5 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf0bd47

Please sign in to comment.