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

Solve issue with url?.startsWith and various others #2380

Merged
merged 15 commits into from
Nov 18, 2024
Merged

Conversation

paales
Copy link
Member

@paales paales commented Oct 9, 2024

No description provided.

Copy link

vercel bot commented Oct 9, 2024

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

Name Status Preview Updated (UTC)
graphcommerce ✅ Ready (Inspect) Visit Preview Nov 18, 2024 8:00pm
graphcommerce-adobe-commerce ❌ Failed (Inspect) Nov 18, 2024 8:00pm
graphcommerce-hygraph-dynamic-rows-ui ✅ Ready (Inspect) Visit Preview Nov 18, 2024 8:00pm
magento-2.4.7 ✅ Ready (Inspect) Visit Preview Nov 18, 2024 8:00pm

Copy link

changeset-bot bot commented Oct 9, 2024

🦋 Changeset detected

Latest commit: 355a9ac

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

This PR includes changesets to release 81 packages
Name Type
@graphcommerce/magento-customer Major
@graphcommerce/next-config Major
@graphcommerce/graphql-mesh Major
@graphcommerce/magento-search Major
@graphcommerce/ecommerce-ui Major
@graphcommerce/next-ui Major
@graphcommerce/graphql Major
@graphcommerce/magento-graphcms Major
@graphcommerce/algolia-categories Major
@graphcommerce/algolia-insights Major
@graphcommerce/algolia-personalization Major
@graphcommerce/algolia-products Major
@graphcommerce/algolia-recommend Major
@graphcommerce/algolia-search Major
@graphcommerce/cli Major
@graphcommerce/googleanalytics Major
@graphcommerce/hygraph-cli Major
@graphcommerce/hygraph-dynamic-rows-ui Major
@graphcommerce/lingui-next Major
@graphcommerce/magento-graphql-rest Major
@graphcommerce/magento-recently-viewed-products Major
@graphcommerce/magento-wishlist Major
@graphcommerce/magento-cart-pickup Major
@graphcommerce/magento-cart-shipping-address Major
@graphcommerce/magento-customer-order Major
@graphcommerce/magento-payment-adyen Major
@graphcommerce/magento-payment-multisafepay Major
@graphcommerce/magento-product-configurable Major
@graphcommerce/magento-product Major
@graphcommerce/magento-review Major
@graphcommerce/magento-store Major
@graphcommerce/mollie-magento-payment Major
@graphcommerce/demo-magento-graphcommerce Major
@graphcommerce/magento-cart-billing-address Major
@graphcommerce/magento-cart-payment-method Major
@graphcommerce/magento-cart-shipping-method Major
@graphcommerce/magento-payment-braintree Major
@graphcommerce/magento-payment-included Major
@graphcommerce/address-fields-nl Major
@graphcommerce/magento-cart-checkout Major
@graphcommerce/magento-cart-email Major
@graphcommerce/magento-cart-items Major
@graphcommerce/magento-cart Major
@graphcommerce/magento-customer-account Major
@graphcommerce/magento-newsletter Major
@graphcommerce/google-datalayer Major
@graphcommerce/magento-compare Major
@graphcommerce/magento-pagebuilder Major
@graphcommerce/magento-product-bundle Major
@graphcommerce/magento-product-downloadable Major
@graphcommerce/magento-product-grouped Major
@graphcommerce/magento-product-simple Major
@graphcommerce/magento-product-virtual Major
@graphcommerce/magento-cart-coupon Major
@graphcommerce/magento-category Major
@graphcommerce/magento-cms Major
@graphcommerce/magento-payment-klarna Major
@graphcommerce/magento-payment-paypal Major
@graphcommerce/googletagmanager Major
@graphcommerce/docs Major
@graphcommerce/browserslist-config-pwa Major
@graphcommerce/changeset-changelog Major
@graphcommerce/eslint-config-pwa Major
@graphcommerce/graphql-codegen-markdown-docs Major
@graphcommerce/graphql-codegen-near-operation-file Major
@graphcommerce/graphql-codegen-relay-optimizer-plugin Major
@graphcommerce/prettier-config-pwa Major
@graphcommerce/typescript-config-pwa Major
@graphcommerce/framer-next-pages Major
@graphcommerce/framer-scroller Major
@graphcommerce/framer-utils Major
@graphcommerce/googlerecaptcha Major
@graphcommerce/hygraph-dynamic-rows Major
@graphcommerce/graphcms-ui Major
@graphcommerce/image Major
@graphcommerce/lighthouse Major
@graphcommerce/magento-graphql Major
@graphcommerce/react-hook-form Major
@graphcommerce/framer-next-pages-example Major
@graphcommerce/framer-scroller-example Major
@graphcommerce/image-example Major

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

@muzafferkilicaslan
Copy link

@paales Hi Paul, are you still working on it? As I see, deployments failed so i am waiting your fixes.

@paales
Copy link
Member Author

paales commented Oct 9, 2024

@muzafferkilicaslan Yeah, had a priority thing to do, just pushed the latest changes. Not very happy with the required changes... See commit message here: 1b7cd40

@muzafferkilicaslan
Copy link

Hi @paales, i was checking and copying your changes to my locale at that commit but i have some questions. Is this doc is updated https://www.graphcommerce.org/docs/getting-started/create cause i was copying file by file but when packages/cli/dist/bin/mesh.js looking this file changed file i mean original file isn't same my locale file. So i thought that doc might be outdated.

Also your last changes seems didn't fix all issues again. Could you help me to install and run Graphcommerce? I mean i can use old versions for now, if you advice me to another version of this i will be pre. I want to test GraphCommerce with my backend asap. Thanks :)

@paales
Copy link
Member Author

paales commented Oct 10, 2024

@muzafferkilicaslan I'll provide a patch for the current 8.0.6 installation. But I think you should be able to do the following:

  1. Remove your current yarn.lock and node_modules directory.
  2. Copy the yarn.lock from the main branch of this repo into your project directory.
  3. Make sure you are using yarn 4, else it wont work. (yarn set version berry)
  4. Run yarn install and the rest.

Can you test that out?

@muzafferkilicaslan
Copy link

@paales Hi Mr. Paul, thanks for your help but i couldn't run it. I'm probably continue with pwa-studio for now. But i will check graphcommerce again in a short time i hope.

@paales paales changed the title Solve issue with url?.startsWith Solve issue with url?.startsWith and various others Nov 18, 2024
…generated `.mesh/index.ts` would be generated as a requirejs module while next.js expects an esm module. In the end we properly generated the mesh correctly and now there is an `import.meta.url` instead of using `require('node:url')`. To solve this we needed to solve a chain of issues:

1. The generation of the mesh is based on the version of the mesh that is imported (esm or commonjs). See [source](https://github.com/ardatan/graphql-mesh/blob/bf588d372c0078378aaa24beea2da794af7949e6/scripts/replace-import-meta-url-in-cjs.ts#L9-L10) for the lines that need to be different. This meant that we needed to change the @graphcommerce/cli package to be of type:module instead of a commonjs module.

2) To properly convert the module to an esm module we've migrated the build of the cli package to use 'pkgroll' instead of tsc, because tsc is limited in what it outputs and can't really convert classic imports to esm.

3) To load possible mesh plugins we require additional .ts files to be loaded with [tsx](https://tsx.is/). To get the tsx loader to work properly in combination with esm modules, we need at least [node 18.19.0](https://nodejs.org/en/blog/release/v18.19.0#new-nodemodule-api-register-for-module-customization-hooks-new-initialize-hook). Minimal Node version upped to 18.19.0 and add support for node 22.
…s only included during development and not in production.
…) while rendering a different component (`ActionCardListForm`).
Copy link
Contributor

Page Size old Size new Size diff First load old First load new First load diff
/ 3.4kB 3.3kB -0.1kB 306kB 307.0kB +1kB⚠️
/[...url] 2.2kB 2.2kB 332kB 333.0kB +1kB⚠️
/404 7.6kB 7.5kB -0.1kB 248kB 248.0kB
/account 8.2kB 8.2kB 255kB 256.0kB +1kB⚠️
/account/addresses 6.2kB 6.2kB 258kB 259.0kB +1kB⚠️
/account/addresses/add 9.8kB 9.9kB 0.1kB 280kB 281.0kB +1kB⚠️
/account/addresses/edit 4.2kB 4.1kB -0.1kB 282kB 283.0kB +1kB⚠️
/account/authentication 7.3kB 10.6kB +3.3kB⚠️ 275kB 275.0kB
/account/contact 7.3kB 8.0kB 0.7kB 275kB 275.0kB
/account/delete 4.8kB 4.8kB 277kB 278.0kB +1kB⚠️
/account/forgot-password 6.8kB 6.7kB -0.1kB 270kB 271.0kB +1kB⚠️
/account/name 7.7kB 11.0kB +3.3kB⚠️ 275kB 275.0kB
/account/orders 11.5kB 11.3kB -0.2kB 252kB 253.0kB +1kB⚠️
/account/orders/view 10.5kB 10.5kB 291kB 292.0kB +1kB⚠️
/account/reviews 9.1kB 9.0kB -0.1kB 246kB 247.0kB +1kB⚠️
/account/signin 9.4kB 10.2kB 0.8kB 291kB 292.0kB +1kB⚠️
/blog 2.6kB 2.6kB 310kB 311.0kB +1kB⚠️
/blog/[...url] 3.2kB 3.2kB 310kB 311.0kB +1kB⚠️
/blog/page/[page] 2.6kB 2.6kB 310kB 311.0kB +1kB⚠️
/blog/tagged/[url] 2.2kB 2.2kB 307kB 308.0kB +1kB⚠️
ƒ /c/[...url] 2.2kB 2.2kB 332kB 333.0kB +1kB⚠️
/checkout 12.5kB 12.8kB 0.3kB 294kB 295.0kB +1kB⚠️
/checkout/added 6.9kB 7.0kB 0.1kB 262kB 262.0kB
/checkout/customer/addresses/edit 4.4kB 4.4kB 282kB 283.0kB +1kB⚠️
/checkout/edit/billing-address 3.3kB 6.9kB +3.6kB⚠️ 280kB 280.0kB
ƒ /checkout/item/[url] 5.0kB 4.9kB -0.1kB 308kB 308.0kB
/checkout/success 6.6kB 6.6kB 295kB 296.0kB +1kB⚠️
/customer/account/confirm 6.6kB 6.6kB 270kB 271.0kB +1kB⚠️
/customer/account/createPassword 8.4kB 8.4kB 272kB 273.0kB +1kB⚠️
/guest/orderstatus 4.2kB 7.7kB +3.5kB⚠️ 279kB 279.0kB
/modal/[...url] 5.1kB 5.2kB 0.1kB 284kB 285.0kB +1kB⚠️
/p/[url] 12.9kB 12.9kB 359kB 360.0kB +1kB⚠️
ƒ /robots.txt 0.2kB 0.2kB 200kB 201.0kB +1kB⚠️
ƒ /search/[[...url]] 1.2kB 1.2kB 316kB 317.0kB +1kB⚠️
/service/[[...url]] 5.1kB 5.1kB 284kB 285.0kB +1kB⚠️
ƒ /sitemap/categories.xml 0.3kB 0.3kB 200kB 201.0kB +1kB⚠️
ƒ /sitemap/content.xml 0.3kB 0.3kB 200kB 201.0kB +1kB⚠️
ƒ /sitemap/products.xml 0.3kB 0.3kB 200kB 201.0kB +1kB⚠️
/test/[[...url]] 5.9kB 5.8kB -0.1kB 253kB 253.0kB
/test/buttons 3.4kB 3.4kB 224kB 225.0kB +1kB⚠️
/test/minimal-page-shell/[[...url]] 4.6kB 4.6kB 225kB 226.0kB +1kB⚠️
/test/number-inputs 4.7kB 4.7kB 260kB 261.0kB +1kB⚠️
/test/sheet 6.1kB 6.0kB -0.1kB 238kB 238.0kB
/test/slider 8.2kB 8.1kB -0.1kB 255kB 256.0kB +1kB⚠️
/test/typography 2.7kB 2.7kB 223kB 224.0kB +1kB⚠️
/wishlist 8.9kB 9.0kB 0.1kB 279kB 279.0kB

Copy link
Contributor

Page Size old Size new Size diff First load old First load new First load diff
/ 3.4kB 3.3kB -0.1kB 306kB 307.0kB +1kB⚠️
/[...url] 2.2kB 2.2kB 332kB 333.0kB +1kB⚠️
/404 7.6kB 7.5kB -0.1kB 248kB 248.0kB
/account 8.2kB 8.2kB 255kB 256.0kB +1kB⚠️
/account/addresses 6.2kB 6.2kB 258kB 259.0kB +1kB⚠️
/account/addresses/add 9.8kB 9.9kB 0.1kB 280kB 281.0kB +1kB⚠️
/account/addresses/edit 4.2kB 4.1kB -0.1kB 282kB 283.0kB +1kB⚠️
/account/authentication 7.3kB 10.6kB +3.3kB⚠️ 275kB 275.0kB
/account/contact 7.3kB 8.0kB 0.7kB 275kB 275.0kB
/account/delete 4.8kB 4.8kB 277kB 278.0kB +1kB⚠️
/account/forgot-password 6.8kB 6.7kB -0.1kB 270kB 271.0kB +1kB⚠️
/account/name 7.7kB 11.0kB +3.3kB⚠️ 275kB 275.0kB
/account/orders 11.5kB 11.3kB -0.2kB 252kB 253.0kB +1kB⚠️
/account/orders/view 10.5kB 10.5kB 291kB 292.0kB +1kB⚠️
/account/reviews 9.1kB 9.0kB -0.1kB 246kB 247.0kB +1kB⚠️
/account/signin 9.4kB 10.2kB 0.8kB 291kB 292.0kB +1kB⚠️
/blog 2.6kB 2.6kB 310kB 311.0kB +1kB⚠️
/blog/[...url] 3.2kB 3.2kB 310kB 311.0kB +1kB⚠️
/blog/page/[page] 2.6kB 2.6kB 310kB 311.0kB +1kB⚠️
/blog/tagged/[url] 2.2kB 2.2kB 307kB 308.0kB +1kB⚠️
ƒ /c/[...url] 2.2kB 2.2kB 332kB 333.0kB +1kB⚠️
/checkout 12.5kB 12.8kB 0.3kB 294kB 295.0kB +1kB⚠️
/checkout/added 6.9kB 7.0kB 0.1kB 262kB 262.0kB
/checkout/customer/addresses/edit 4.4kB 4.4kB 282kB 283.0kB +1kB⚠️
/checkout/edit/billing-address 3.3kB 6.9kB +3.6kB⚠️ 280kB 280.0kB
ƒ /checkout/item/[url] 5.0kB 4.9kB -0.1kB 308kB 308.0kB
/checkout/success 6.6kB 6.6kB 295kB 296.0kB +1kB⚠️
/customer/account/confirm 6.6kB 6.6kB 270kB 271.0kB +1kB⚠️
/customer/account/createPassword 8.4kB 8.4kB 272kB 273.0kB +1kB⚠️
/guest/orderstatus 4.2kB 7.7kB +3.5kB⚠️ 279kB 279.0kB
/modal/[...url] 5.1kB 5.2kB 0.1kB 284kB 285.0kB +1kB⚠️
/p/[url] 12.9kB 12.9kB 359kB 360.0kB +1kB⚠️
ƒ /robots.txt 0.2kB 0.2kB 200kB 201.0kB +1kB⚠️
ƒ /search/[[...url]] 1.2kB 1.2kB 316kB 317.0kB +1kB⚠️
/service/[[...url]] 5.1kB 5.1kB 284kB 285.0kB +1kB⚠️
ƒ /sitemap/categories.xml 0.3kB 0.3kB 200kB 201.0kB +1kB⚠️
ƒ /sitemap/content.xml 0.3kB 0.3kB 200kB 201.0kB +1kB⚠️
ƒ /sitemap/products.xml 0.3kB 0.3kB 200kB 201.0kB +1kB⚠️
/test/[[...url]] 5.9kB 5.8kB -0.1kB 253kB 253.0kB
/test/buttons 3.4kB 3.4kB 224kB 225.0kB +1kB⚠️
/test/minimal-page-shell/[[...url]] 4.6kB 4.6kB 225kB 226.0kB +1kB⚠️
/test/number-inputs 4.7kB 4.7kB 260kB 261.0kB +1kB⚠️
/test/sheet 6.1kB 6.0kB -0.1kB 238kB 238.0kB
/test/slider 8.2kB 8.1kB -0.1kB 255kB 256.0kB +1kB⚠️
/test/typography 2.7kB 2.7kB 223kB 224.0kB +1kB⚠️
/wishlist 8.9kB 9.0kB 0.1kB 279kB 279.0kB

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.

2 participants