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

Remove the with keyword #1769

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KevinGrandon
Copy link
Contributor

WHY are these changes introduced?

This repository currently uses the with keyword when importing JSON. This keyword is deprecated and causes problems on the latest LTS node versions in strict mode.

WHAT is this pull request doing?

Remove the with keyword as it is not needed.

Type of change

  • [x ] Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have used pnpm changeset to create a draft changelog entry (do NOT update the CHANGELOG.md files manually)
  • I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (for public APIs)

The with keyword is deprecated and causes problems on the latest LTS node versions in strict mode. We can remove the with keyword here and original functionality should continue to work.
@KevinGrandon KevinGrandon requested a review from a team as a code owner November 18, 2024 07:04
@matteodepalo
Copy link
Contributor

matteodepalo commented Nov 18, 2024

Hi @KevinGrandon, thank you for opening this PR. Have you considered what @lizkenyon described here? Does it not apply anymore?

@KevinGrandon
Copy link
Contributor Author

Thanks for the comment @matteodepalo and the previous fix @lizkenyon. I am having issues updating my Shopify app to node 20 due to this statement. I'm guessing this is not an issue here because there are no remix tests that run on node 20 in CI? As far as I can tell dropping it should be fine. Here's a comparison of the built file in main vs this PR:

Main:
image

With this PR:
image

@matteodepalo
Copy link
Contributor

I've just tried it in a new app and it seems to be broken.

Screenshot 2024-11-20 at 14 37 02

@matteodepalo
Copy link
Contributor

You have to use one of the following node versions: ^18.20 || ^20.10 || >=21.0.0

@KevinGrandon
Copy link
Contributor Author

@matteodepalo Thank you - could you give me steps on the best way to reproduce this failure? I'm happy to work through it.

@matteodepalo
Copy link
Contributor

matteodepalo commented Nov 26, 2024

@KevinGrandon sure, I:

  • Cloned the shopify-app-js repo
  • Checked out your PR
  • Run pnpm build
  • Created a new app
  • Run pnpm add "file:/<your-path>/shopify-app-js/packages/apps/shopify-app-remix" -w"
  • Run pnpm shopify app dev

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