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

Introduce Javy.JSON builtins #16

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Conversation

saulecabrera
Copy link
Member

@saulecabrera saulecabrera commented Sep 12, 2024

This commit introduces Javy.JSON builtins and bumps the package version to 1.0.0.

It's important to note that this is a breaking change because it introduces new JavaScript builtins for faster JSON parsing and stringifying from stdin and to stdout.

In order to use v1.0.0 of this package, users need the latest shopify cli, which contains javy v3.1.0

🎩

  • Create a new extension with this branch of Shopify's CLI [Functions] Bump javy to 3.1.0 cli#4444
  • Manually substitute the @shopify/shopify_functionv0.1.0 in the package.json, with a GitHub dependency ("@shopify/shopify_function": "saulecabrera/shopify-function-javascript#javy-json-v1") or a local dependency (by cloning my repo and switching to this branch)
  • Build and run the extension

This commit introduces `Javy.JSON` builtins and bumps the package
version to 1.0.0.

It's important to note that this is a breaking change because it
introduces new JavaScript builtins for faster JSON parsing and
stringifying from stdin and to stdout.

In order to use v1.0.0 of this package, users need the latest shopify
cli, which contains `javy` v3.1.0
Comment on lines -20 to -21
"peerDependencies": {
"javy": "^0.1.0"

Choose a reason for hiding this comment

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

Why did we drop the peer dependency? 👀

Copy link
Member Author

Choose a reason for hiding this comment

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

The javy npm dependency is what brings the fs namespace, which is no longer used (fs.{readSync, writeSync}).

Copy link

@DuncanUszkay1 DuncanUszkay1 left a comment

Choose a reason for hiding this comment

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

Currently unable to build extensions on the linked CLI branch- will circle back to this once that's resolved: Shopify/cli#4444 (comment)

Copy link

@DuncanUszkay1 DuncanUszkay1 left a comment

Choose a reason for hiding this comment

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

Tophatted 👍

@saulecabrera saulecabrera merged commit 14b4166 into Shopify:main Sep 13, 2024
1 check passed
@saulecabrera saulecabrera deleted the javy-json-v1 branch September 13, 2024 15:41
saulecabrera added a commit to Shopify/cli that referenced this pull request Sep 13, 2024
This commit ensures that new functions are bootstrapped with version
1.0.0 of the `@shopify/function_javascript` package, which includes the
  changes in Shopify/shopify-function-javascript#16

To 🎩

* Create a new app and JavaScript extension.
* Build the app
* Run the app
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