Skip to content

Commit

Permalink
fix: pluralize use
Browse files Browse the repository at this point in the history
  • Loading branch information
julrich committed Oct 11, 2024
1 parent aacab1e commit f4bf548
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@kickstartds/jsonschema2stackbit",
"comment": "fix pluralize function",
"type": "patch"
}
],
"packageName": "@kickstartds/jsonschema2stackbit"
}
11 changes: 7 additions & 4 deletions common/config/rush/pnpm-lock.yaml

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

3 changes: 1 addition & 2 deletions tools/jsonschema2stackbit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@kickstartds/jsonschema-utils": "workspace:*",
"ajv": "^8.12.0",
"object-traversal": "^1.0.1",
"pluralize": "^8.0.0"
"pluralize-esm": "~9.0.5"
},
"devDependencies": {
"@rushstack/eslint-config": "^3.2.0",
Expand All @@ -32,7 +32,6 @@
"@types/common-tags": "^1.8.4",
"@types/heft-jest": "1.0.3",
"@types/node": "^18.16.4",
"@types/pluralize": "^0.0.33",
"@types/ramda": "^0.28.20",
"@types/uuid": "~9.0.2",
"@typescript-eslint/parser": "~5.59.2",
Expand Down
4 changes: 3 additions & 1 deletion tools/jsonschema2stackbit/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ import {
} from '@stackbit/types';
import { type JSONSchema, TypeName } from 'json-schema-typed/draft-07';
import { traverse } from 'object-traversal';
import { singular } from 'pluralize';
import pluralize from 'pluralize-esm';

import { GenericType, ITypeMapping } from './@types/index.js';
export * from './@types/index.js';

const { singular } = pluralize;

const typeResolutionField: string = 'type';

export function configuration(
Expand Down

0 comments on commit f4bf548

Please sign in to comment.