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

chore(medusa, utils): rename buildLegacyFieldsListFrom to objectToStringPath #3738

Merged
merged 4 commits into from
Apr 7, 2023

Conversation

riqwan
Copy link
Contributor

@riqwan riqwan commented Apr 5, 2023

RESOLVES CORE-1317

@riqwan riqwan requested a review from a team as a code owner April 5, 2023 15:40
@changeset-bot
Copy link

changeset-bot bot commented Apr 5, 2023

🦋 Changeset detected

Latest commit: 53193c2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 21 packages
Name Type
@medusajs/medusa Patch
@medusajs/utils Patch
@medusajs/admin-ui Patch
@medusajs/admin Patch
@medusajs/medusa-js Patch
medusa-payment-paypal Patch
medusa-payment-stripe Patch
medusa-plugin-meilisearch Patch
medusa-plugin-restock-notification Patch
medusa-react Patch
@medusajs/medusa-oas-cli Patch
@medusajs/event-bus-local Patch
@medusajs/event-bus-redis Patch
@medusajs/inventory Patch
@medusajs/medusa-cli Patch
medusa-plugin-algolia Patch
@medusajs/modules-sdk Patch
@medusajs/stock-location Patch
@medusajs/oas-github-ci Patch
@medusajs/cache-inmemory Patch
@medusajs/cache-redis Patch

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

@vercel
Copy link

vercel bot commented Apr 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 6, 2023 11:57am

Copy link
Member

@adrien2p adrien2p left a 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?

@adrien2p
Copy link
Member

adrien2p commented Apr 5, 2023

don't forget the changeset

@@ -13,7 +13,7 @@ import {
queryEntityWithIds,
queryEntityWithoutRelations,
} from "../utils/repository"
import { buildLegacyFieldsListFrom } from "../utils"
import { objectToStringPath } from "../utils"
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

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,
Copy link
Contributor

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"
Copy link
Contributor

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>(
Copy link
Contributor

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

@riqwan riqwan force-pushed the chore/rename-function branch from d86d60f to c2914d5 Compare April 6, 2023 08:52
@riqwan riqwan changed the title chore(medusa): rename buildLegacyFieldsListFrom to objectToStringPath chore(medusa, utils): rename buildLegacyFieldsListFrom to objectToStringPath Apr 6, 2023
@riqwan riqwan requested review from olivermrbl and adrien2p April 6, 2023 08:53
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@olivermrbl olivermrbl merged commit abdb74d into develop Apr 7, 2023
@olivermrbl olivermrbl deleted the chore/rename-function branch April 7, 2023 08:27
This was referenced Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants