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

Upgrade inflection to v3 #9804

Merged
merged 5 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 1 addition & 2 deletions examples/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"@apollo/client": "^3.3.19",
"@mui/icons-material": "^5.15.15",
"@mui/material": "^5.15.15",
"@types/inflection": "^1.5.28",
"@types/recharts": "^1.8.10",
"@vitejs/plugin-react": "^2.2.0",
"clsx": "^1.1.1",
Expand All @@ -17,7 +16,7 @@
"fetch-mock": "~9.11.0",
"graphql": "^15.6.0",
"graphql-tag": "^2.12.6",
"inflection": "~1.12.0",
"inflection": "^3.0.0",
"json-graphql-server": "~3.0.1",
"prop-types": "^15.8.1",
"query-string": "^7.1.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/src/categories/CategoryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
RecordContextProvider,
useListContext,
} from 'react-admin';
import inflection from 'inflection';
import * as inflection from 'inflection';
MohammedFaragallah marked this conversation as resolved.
Show resolved Hide resolved
import {
Grid,
Card,
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/src/products/Aside.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import inflection from 'inflection';
import * as inflection from 'inflection';
import { Card, CardContent } from '@mui/material';
import LocalOfferIcon from '@mui/icons-material/LocalOfferOutlined';
import BarChartIcon from '@mui/icons-material/BarChart';
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"date-fns": "^3.6.0",
"eventemitter3": "^4.0.7",
"hotscript": "^1.0.12",
"inflection": "~1.12.0",
"inflection": "^3.0.0",
"jsonexport": "^3.2.0",
"lodash": "~4.17.5",
"prop-types": "^15.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/core/useGetResourceLabel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import inflection from 'inflection';
import * as inflection from 'inflection';

import { useResourceDefinitions } from './useResourceDefinitions';
import { useTranslate } from '../i18n';
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/inference/inferElementFromValues.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import inflection from 'inflection';
import * as inflection from 'inflection';

import getValuesFromRecords from './getValuesFromRecords';
import InferredElement from './InferredElement';
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/inference/inferTypeFromValues.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import inflection from 'inflection';
import * as inflection from 'inflection';

import getValuesFromRecords from './getValuesFromRecords';

Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/util/getFieldLabelTranslationArgs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import inflection from 'inflection';
import * as inflection from 'inflection';

interface Args {
label?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-no-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@tanstack/react-query": "^5.8.4",
"clsx": "^1.1.1",
"date-fns": "^3.6.0",
"inflection": "~1.12.0",
"inflection": "^3.0.0",
"lodash": "~4.17.5",
"papaparse": "^5.3.0",
"prop-types": "^15.8.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"css-mediaquery": "^0.1.2",
"dompurify": "^2.4.3",
"hotscript": "^1.0.12",
"inflection": "~1.12.0",
"inflection": "^3.0.0",
"jsonexport": "^3.2.0",
"lodash": "~4.17.5",
"prop-types": "^15.8.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { Fragment, ReactElement } from 'react';
import PropTypes from 'prop-types';
import ActionDelete from '@mui/icons-material/Delete';
import inflection from 'inflection';
import * as inflection from 'inflection';
import { alpha, styled } from '@mui/material/styles';
import {
MutationMode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { Fragment, useState, ReactElement } from 'react';
import PropTypes from 'prop-types';
import ActionUpdate from '@mui/icons-material/Update';
import inflection from 'inflection';
import * as inflection from 'inflection';
import { alpha, styled } from '@mui/material/styles';
import {
useListContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Fragment, ReactEventHandler, ReactElement } from 'react';
import PropTypes from 'prop-types';
import ActionDelete from '@mui/icons-material/Delete';
import clsx from 'clsx';
import inflection from 'inflection';
import * as inflection from 'inflection';
import { UseMutationOptions } from '@tanstack/react-query';
import {
MutationMode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { Fragment, useState, ReactElement } from 'react';
import PropTypes from 'prop-types';
import ActionUpdate from '@mui/icons-material/Update';
import inflection from 'inflection';
import * as inflection from 'inflection';
import { alpha, styled } from '@mui/material/styles';
import {
useTranslate,
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/detail/EditGuesser.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { useEffect, useState } from 'react';
import inflection from 'inflection';
import * as inflection from 'inflection';
import {
EditBase,
InferredElement,
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/detail/ShowGuesser.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { useEffect, useState } from 'react';
import inflection from 'inflection';
import * as inflection from 'inflection';
import {
ShowBase,
InferredElement,
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/list/ListGuesser.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { useState, useEffect } from 'react';
import inflection from 'inflection';
import * as inflection from 'inflection';
import {
ListBase,
getElementsFromRecords,
Expand Down
23 changes: 4 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6557,13 +6557,6 @@ __metadata:
languageName: node
linkType: hard

"@types/inflection@npm:^1.5.28":
version: 1.13.0
resolution: "@types/inflection@npm:1.13.0"
checksum: c9f6f3af1a95588c83904f922bf9ef5cceab5318df8b5d711ef5ea0b6b1fd133fdc7b03693d957f26c5ab6a08f30f7e82c72eb6e82ba820565fd7daafadbddb6
languageName: node
linkType: hard

"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1":
version: 2.0.4
resolution: "@types/istanbul-lib-coverage@npm:2.0.4"
Expand Down Expand Up @@ -10440,7 +10433,6 @@ __metadata:
"@mui/icons-material": "npm:^5.15.15"
"@mui/material": "npm:^5.15.15"
"@types/fetch-mock": "npm:^7.3.2"
"@types/inflection": "npm:^1.5.28"
"@types/jest": "npm:^29.5.2"
"@types/node": "npm:^20.10.7"
"@types/prop-types": "npm:^15.7.11"
Expand All @@ -10455,7 +10447,7 @@ __metadata:
fetch-mock: "npm:~9.11.0"
graphql: "npm:^15.6.0"
graphql-tag: "npm:^2.12.6"
inflection: "npm:~1.12.0"
inflection: "npm:^3.0.0"
json-graphql-server: "npm:~3.0.1"
prop-types: "npm:^15.8.1"
query-string: "npm:^7.1.1"
Expand Down Expand Up @@ -13787,13 +13779,6 @@ __metadata:
languageName: node
linkType: hard

"inflection@npm:~1.12.0":
version: 1.12.0
resolution: "inflection@npm:1.12.0"
checksum: a5e92f4399f879a4cd92f30c13af6a8a0f4e793073f0e82599d12d9e4200c011348c3cd4e8b1894c774f896e697db78fa04babe754492d2cb00c2d27b3edaa2b
languageName: node
linkType: hard

"inflight@npm:^1.0.4":
version: 1.0.6
resolution: "inflight@npm:1.0.6"
Expand Down Expand Up @@ -18696,7 +18681,7 @@ __metadata:
expect: "npm:^27.4.6"
hotscript: "npm:^1.0.12"
ignore-styles: "npm:~5.0.1"
inflection: "npm:~1.12.0"
inflection: "npm:^3.0.0"
jscodeshift: "npm:^0.15.2"
jsonexport: "npm:^3.2.0"
lodash: "npm:~4.17.5"
Expand Down Expand Up @@ -18928,7 +18913,7 @@ __metadata:
clsx: "npm:^1.1.1"
cross-env: "npm:^5.2.0"
date-fns: "npm:^3.6.0"
inflection: "npm:~1.12.0"
inflection: "npm:^3.0.0"
lodash: "npm:~4.17.5"
papaparse: "npm:^5.3.0"
prop-types: "npm:^15.8.1"
Expand Down Expand Up @@ -18971,7 +18956,7 @@ __metadata:
file-api: "npm:~0.10.4"
hotscript: "npm:^1.0.12"
ignore-styles: "npm:~5.0.1"
inflection: "npm:~1.12.0"
inflection: "npm:^3.0.0"
jsonexport: "npm:^3.2.0"
lodash: "npm:~4.17.5"
prop-types: "npm:^15.8.1"
Expand Down
Loading