-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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(medusa, utils): rename buildLegacyFieldsListFrom to objectToStringPath #3738
Conversation
🦋 Changeset detectedLatest commit: 53193c2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, should we rename the other to stringPathToObject or keep it as it?
don't forget the changeset |
@@ -13,7 +13,7 @@ import { | |||
queryEntityWithIds, | |||
queryEntityWithoutRelations, | |||
} from "../utils/repository" | |||
import { buildLegacyFieldsListFrom } from "../utils" | |||
import { objectToStringPath } from "../utils" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: Import from @medusajs/utils
@@ -1,7 +1,7 @@ | |||
import { flatten, groupBy, map, merge } from "lodash" | |||
import { FindManyOptions, FindOptionsRelations, In } from "typeorm" | |||
import { Order } from "../models" | |||
import { buildLegacyFieldsListFrom } from "../utils" | |||
import { objectToStringPath } from "../utils" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: Import from @medusajs/utils
@@ -9,7 +9,7 @@ import { | |||
import { ProductCategory } from "../models/product-category" | |||
import { ExtendedFindConfig, QuerySelector } from "../types/common" | |||
import { dataSource } from "../loaders/database" | |||
import { buildLegacyFieldsListFrom } from "../utils" | |||
import { objectToStringPath } from "../utils" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: Import from @medusajs/utils
@@ -10,7 +10,7 @@ import { ExtendedFindConfig } from "../types/common" | |||
import { dataSource } from "../loaders/database" | |||
import { ProductFilterOptions } from "../types/product" | |||
import { | |||
buildLegacyFieldsListFrom, | |||
objectToStringPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: Import from @medusajs/utils
@@ -16,7 +16,7 @@ import { | |||
} from "../models" | |||
import { TaxRateListByConfig } from "../types/tax-rate" | |||
import { isDefined } from "medusa-core-utils" | |||
import { buildLegacyFieldsListFrom } from "../utils" | |||
import { objectToStringPath } from "../utils" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: Import from @medusajs/utils
@@ -153,7 +153,7 @@ function buildWhere<TWhereKeys extends object, TEntity>( | |||
* output: ['test.test1', 'test.test2', 'test.test3.test4', 'test2'] | |||
* @param input | |||
*/ | |||
export function buildLegacyFieldsListFrom<TEntity>( | |||
export function objectToStringPath<TEntity>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Keep this and deprecate it to stay backward compatible. And change all occurrences to import from @medusajs/utils
d86d60f
to
c2914d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
RESOLVES CORE-1317