Skip to content

Commit

Permalink
Integrate hydrogen-react into the hydrogen monorepo (Shopify#605)
Browse files Browse the repository at this point in the history
* Initial commit from Create Turborepo

* Save progress on migration

* Get storefront api schema and graphql generation working

* Update deps, add changeset, fix types with new version

* Add turbo ci checks

Add github workflows

* create the 2022-7 branch

* Change naming, update docs, move readme and contributing

* Config alex and get checks passing

* Add cla github action

* Update actions versions, and run checks before build

* Fix branch references to main

* test to see if alex is breaking ci stuff (#1)

* test to see if alex is breaking ci stuff

* add alex back, and check changeset checker

* downgrade alex, and add better words/docs on changeset reminder

* revert alex downgrade

* see if we can figure out where this is coming from

* remove testing as it didn't find anything

* remove diff command on alex

* remove comment that tests changeset checker

* add publish config

* Fix readmes (#2)

* Fix readmes

* update terminology

* Add CoC and update package description

* Fix docs

* Simplify the logic for external video urls (#3)

* Remove unnecessary tsconfig items (#4)

Add the variant source header for SFAPI calls.

* Update README.md

* Fix issues with formatting and filename

* update dependencies (#5)

* README updates for content type and pkg name (Shopify#6)

* provide guidance on setting the header content type

* language lint

* change pkg name

* Update README (Shopify#7)

* update readme

* fix links

Co-authored-by: Elise Yang <[email protected]>

* CI action for publishing the next version automatically (Shopify#8)

* CI action for publishing the next version automatically

* remove output to file

* Publish next2 (Shopify#9)

* CI action for publishing the next version automatically

* remove output to file

* Don't use the action to run these commands

* Try manually doing the publish now (Shopify#10)

* Go into dir so script can find package.json (Shopify#11)

* Try this configs

* Change ts moduleresolution (#13)

* Change TS's module resolution to 'node' instead of nodenext

* Include stories in TS checking now, and fix issues

* Feat/cart provider (#12)

* Copy CartProvider from hydrogen repo

* Add worktop lib to use the cookies package for CartProvider

* Modify CartProvider to fit hydrogen-ui

* Add CartProvider story

* add changeset

* Cart provider updates (#14)

* Change ts moduleresolution (#13)

* Change TS's module resolution to 'node' instead of nodenext

* Include stories in TS checking now, and fix issues

* Starting work on simplifying the cart code in hui

* Simply more cart-related files and remove a bunch of them

* All CI checks are passing, and types are improved.

* Better file names

* Fix mock import filename

* Remove any type

* Improve release notes, update type names, fix typo

* Correct alex config file and allow hooks

Co-authored-by: Anthony Frehner <[email protected]>

* udpate readmes (#18)

* udpate readmes

* format

* update

* Fix issue with file output not being correct (#16)

* Fix issue with file output not being correct

Also update deps, and move npmrc.

* downgrade happy-dom to pass tests

* fix publishing?

* cleanup script

* update naming for workflow

* remove from npmrc and add to script

* show an error when next publish doesn't work

* fix cd script

* Make the URLs a little more permanent. (Shopify#19)

* Fix TS typings on moduleResolution: node (Shopify#20)

* [ci] release 2022-7 (Shopify#15)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update to 2022-10

Also, add documentation for next time.

* Update package.json version

* Fix output bundles, maybe. (Shopify#22)

* Convert project to CJS with ESM files ending in .mjs (Shopify#23)

* Convert project to CJS with ESM files ending in .mjs

Helps fix issues with the build output + dependencies processed by Vite.

* fix small typo in message

* move script to .mjs

* And update reference to mjs script

* Initial release of 2022-10 (Shopify#24)

* [ci] release 2022-10 (Shopify#25)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* externalize the deps (Shopify#29)

* externalize the deps

* Add changelog

* wrap comments

* Revert package updates as it causes issues still in nextjs (#31)

* metafieldParser() (Shopify#45)

* Save progress on a new metafield parser

* Fix type issue, and get some generics passed in

* Fix tests and add additional TS docs to the types

* handle no 'type' field, and prep for list metafields

* Save progress on metafield parser and tests

* Finished the tests and docs

* Deprecate parseMetafield; add changelog; export functions

* fix bad variable name

* Update packages/react/src/metafield-parser.test.ts

Co-authored-by: Daniel Rios <[email protected]>

* Clarify wording around naming and deprecation

* remove todo

Co-authored-by: Daniel Rios <[email protected]>

* Create CartCost (Shopify#46)

* Create CartCost

* Add changeset

* Update packages/react/src/CartCost.tsx

Co-authored-by: Anthony Frehner <[email protected]>

* Update packages/react/src/CartCost.tsx

Co-authored-by: Anthony Frehner <[email protected]>

* Fix lint

* Fix lint

Co-authored-by: Anthony Frehner <[email protected]>

* Adding NextJS as an e2e testing point / app (Shopify#49)

* save progress

* Save progress and updates

* Saving prettier output

* Cleanup the repo and get dev scripts working across packages

* Build before typecheck as nextjs relies on the output

* fix linting setup for nextjs

* add a todo note

* Fix build issues with outputting a node_modules folder

Always remove the dist folder as part of dev (and prod) to make sure that the dist folder looks accurate across starts

Move unneeded ts-expect in sourcecode and move to test

Fix some tsconfig issues with included files

* Update issue templates

* Update issue templates

* format fixing :)

* Update the types for MediaFile to allow className (Shopify#57)

* Add <AddToCartButton /> component (Shopify#58)

* Add component

* Add tests

* add changeset

* fix typo

* Update AddToCartButton.tsx

* Move base button (Shopify#59)

* Cart checkout button (Shopify#60)

* Add CartCheckoutButton

* Create curly-turtles-itch.md

* use basebutton on checkoutbutton (Shopify#61)

* Buy now button (Shopify#62)

* buy now button

* minor fixusps and change set

* include xstate in builds (Shopify#64)

* include xstate in builds

* Fix NextJS issues by including files with sideeffects

See vitejs/vite#10866 for more details

* [ci] release 2022-10 (Shopify#47)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add node-specific builds using Vite's --ssr flag (Shopify#66)

* Add node-specific builds using Vite's --ssr flag

Should help use the correct code for each environment in places where that's important, e.g. using node-specific stuff when in node.

* add changeset

* Fix additional issues with node builds (Shopify#68)

* Fix additional issues with node builds

Tested in the standalone nextjs app for sanity's sake, and this is working

* comment update

* Cart line provider (Shopify#48)

* Initial thing

* Make old tests pass

* Adding stories

* fix up test/stories more

* remove unneeded fixtures

* Update sharp-squids-accept.md

* Update CartLineProvider.test.tsx

* remove cartlines component

* Add additional functions to ShopifyProvider (Shopify#71)

* Added new functions to shopify provider

* Update cart to use the new methods

Add changeset

* feedback updates

* Add our scalars to the package for other developers (Shopify#69)

* Add our scalars to the package for other developers

* Update .changeset/swift-olives-beam.md

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update .changeset/swift-olives-beam.md

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update apps/nextjs/codegen.ts

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update apps/nextjs/codegen.ts

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update apps/nextjs/codegen.ts

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update packages/react/codegen.ts

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update packages/react/codegen.ts

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update packages/react/README.md

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update packages/react/README.md

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update packages/react/codegen.ts

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update packages/react/codegen.ts

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update packages/react/codegen.ts

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update packages/react/codegen.ts

Co-authored-by: Ren Chaturvedi <[email protected]>

* Update packages/react/src/codegen.helpers.ts

Co-authored-by: Ren Chaturvedi <[email protected]>

Co-authored-by: Ren Chaturvedi <[email protected]>

* Add a new utility helper for getting the myshopify domain for the site (Shopify#70)

* [ci] release 2022-10 (Shopify#67)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update all deps except Vitest and ModelViewer (#74)

Not vitest because of an issue with the latest version causing us to fail our tests.

* Update MediaFile types (Shopify#76)

* Update MediaFile types

* Update packages/react/src/MediaFile.tsx

Co-authored-by: Matt Seccafien <[email protected]>

* Update packages/react/src/MediaFile.test.tsx

Co-authored-by: Ren Chaturvedi <[email protected]>

Co-authored-by: Matt Seccafien <[email protected]>
Co-authored-by: Ren Chaturvedi <[email protected]>

* Add stackblitz links and info to issue template (Shopify#72)

* Add stackblitz links and info to issue template

* Update .github/ISSUE_TEMPLATE/bug_report.md

Co-authored-by: Matt Seccafien <[email protected]>

* feedback

Co-authored-by: Matt Seccafien <[email protected]>

* Update ShopifyProvider to have storeDomain match (Shopify#78)

Add tests, and add some small notes to the upgrade guide.

* `CartLinePrice` component (Shopify#50)

* Improve fixture mocks merging

* Migrate `CartLineImage` component

* Migrate `CartLinePrice` component

* changesets

* fix typescript

* Update `CartLinePrice` to be consistent with `ProductPrice`

* Revert "Migrate `CartLineImage` component"

This reverts commit 096f6e57752d8bdfc1571c53856c0817dcc7d2e8.

* Update changeset

* [ci] release 2022-10 (Shopify#77)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update the types for <Money/> (Shopify#80)

* Update the types for <Money/>

* fix test

* Show development warnings only once (Shopify#85)

* Show client warnings only once

* Changeset

* Double space

* Fix main / module fields in package.json (#87)

* update workflow files to not used deprecated apis (#88)

* Saving progress (Shopify#90)

* [ci] release 2022-10 (Shopify#81)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* remove file that prevents publishing

* Fix/cart optimistic (Shopify#93)

* fix optimistic UI for CartProvider

* Add changeset

* add graphql comments, remove duplicated query, add new field names (Shopify#94)

* Fixes issues with require() calls in non-node envs (Shopify#99)

Also remove unnecessary "production" conditions as it'll just use the default condition which is the same.

* [ci] release 2022-10 (Shopify#96)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add final changelog (Shopify#109)

* [ci] release 2022-10 (Shopify#110)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Final for reals, but with readme updates now (Shopify#112)

* [ci] release 2022-10 (Shopify#113)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Start work on 2023-01

* Update instances in code of 2022-10

* Update the schema and types

* Update to shopifyDomain to only provide exactly what is passed in

* Deprecated the old metafield parser and updated it to the new way

* Update package.json version

* Update readmes

* Get flattenConnection return types better. (Shopify#118)

* Readme cleanup a bit

* Update all possible deps

* [React Storefront Kit]: Rename product, `npm` package, and GitHub repo references (Shopify#98)

* rename product and package

* link

* prettier

* Update package.json

Co-authored-by: Ren Chaturvedi <[email protected]>

* Cleanup some naming things, and fix build names and repo names

* Remove unneeded note

Co-authored-by: Ren Chaturvedi <[email protected]>
Co-authored-by: Anthony Frehner <[email protected]>

* Documentation setup (Shopify#101)

* npm script for new system and some test .doc.ts files

* updated to v 0.2.7 generate-docs

* New docs system (Shopify#75)

* add ProductPrice doc

* add ProductPrice example

* add MediaFile doc

* add MediaFile example

* add Image example

* Metafield and update to MediaFile

* Add ModelViewer

* Add Money

* fix metafield and money

* fix generation error

* add ProductProvider and ShopifyProvider

* ShopPayButton

* fix ShopifyProvider

* update ShopPayButton type and add Video

* generate data

* some cleanup

* update data

* Static page docs (Shopify#82)

* use new folder structure for docs

* move doc file

* updated some types for landing pages

* update to newer version of generate-docs and update content to React Storefront Kit

* update to newer version of generate-docs and update content to React Storefront Kit

* update to newer version of generate-docs and update content to React Storefront Kit

* Update examples to have their own extension

Config TS and ESLint so that there aren't any issues with some checks that will always fail in the example files

* Update to latest and fix various issues

* Updated docs with better names, types, and examples

* Cleanup shoppaybutton

Co-authored-by: John Collett <[email protected]>
Co-authored-by: Ren Chaturvedi <[email protected]>
Co-authored-by: John Collett <[email protected]>
Co-authored-by: Alex Harvey <[email protected]>

* Get publishing back on

* update changelog name

* Remove migration text

* [ci] release 2023-01 (Shopify#123)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Small changelog updates

* add additional note to contributing

* Shopify analytics (Shopify#108)

* working shopify analytics

* add to cart analytics

* workign all events

* file renames

* file paths

* lint

* lint

* fix nextjs app lint

* fix nextjs app lint

* test for schemas

* lint test

* fix nextjs app

* add analytic-utils tests and refactor (Shopify#117)

* add analytic-utils tests and refactor

* fix name

* fix test

* add test for coverage

* fix no product payload test

* @juanpprieto/fix-failing-tests (Shopify#120)

* add support for parsing complex gids and fix failing test

* shorten cond checks

* remove incorrect complex id parsing

* fix typo

* sendShopifyAnalytics tests

* better test naming

* lint

* some PR feedbacks

* more PR feedbacks

* lint

* more test

* more test

* better name test

* @juanpprieto/cookie util test (Shopify#121)

* fix lint complains

* fix weird ts complain

* fix format

* clean up constants

* convert ShopifyCookie to a hook

* ts clean up

* ts clean up

* more ts clean up

* more feedback

* update ShopPayButton

* make sure monorail endpoint can be updated to the shop domain alternative

* mock failed response

* add doc

* prettier

* ci browser different?

* return explicit type

* see if this works

* fix type prettier

* fix package path

* full cookie test

* prettier

* move shopify cookie constants back into cart constant

* missed a return type

* Update .changeset/plenty-moles-listen.md

Co-authored-by: Anthony Frehner <[email protected]>

* remove console log

* update exposed methods, constants, and types

* prettier

* fix file name

* fix file name again

* Small updates

Co-authored-by: Juan P. Prieto <[email protected]>
Co-authored-by: Anthony Frehner <[email protected]>

* [ci] release 2023-01 (Shopify#124)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update README.md

* Update README.md

* Fix bug in storefront client. (Shopify#125)

Update the nextjs app to reflect that

Fix issue with latest graphql codegen needing ts-node

Add tests

* [ci] release 2023-01 (Shopify#126)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update docs and cleanup references (Shopify#127)

* update(packages): Updated Generate-docs package to solve errors from existing docs (Shopify#129)

* Updating the docs links to work (Shopify#131)

Cleaning up naming and editorial stuff.

* Adding docs for AddToCart and BuyNow buttons (Shopify#132)

* generate docs

Cleanup package.json

Update contributing.md

* AddToCartButton

* Add BuyNowButton

* Update README.md

* Adds CartLinePrice and CartCost components to index.ts (Shopify#134)

* Add cart checkout docs and rearrange index.ts

* Add cartcost component

* Add CartLinePrice

* format readme

* Update README.md

* Adding docs for cartlineprovider (Shopify#141)

* getting cartprovider docs up (Shopify#142)

* getting cartprovider docs up

* update name

* Graphql ts docs (Shopify#143)

* Add some graphql and TypeScript related docs for utilities

* Delete generated_docs_data.json

* Add docs for flatten connection (Shopify#144)

* Enforce alphabetical exports only in index.ts (Shopify#145)

* Add parse-metafield docs (Shopify#149)

* Add parse-metafield docs

* Add storefront-client docs as well

* fix ci for now

* Adding analytics docs (Shopify#138)

* Adding analytics docs basic setup

* Fix doc typing to use the magic generated one

* clean up eslint errors and ts errors

* break functions into each own files for documentation

* move fn back to analytics file and fix up doc

* fix up test

* add more docs

* create doc for constants

* more updates

* add changeset

* fix types

* format

* lint

* rename to shopify constants

* fix type again

* add related docs

* fix type in test

* fix types

* add type for other const

* One more fix

---------

Co-authored-by: Helen Lin <[email protected]>

* Update the SFAPI docs to use satisfies (Shopify#151)

* Add useMoney docs (Shopify#152)

* Add useMoney docs

* Revert Money.doc changes

* remove ts error in jsx file

* Update README.md

* update reference landing page (Shopify#146)

* update landing page (Shopify#153)

* update landing page

* edits

* update examples

* fix example

* format

* Update packages/react/docs/staticPages/hook.example.jsx

Co-authored-by: Anthony Frehner <[email protected]>

* Update packages/react/docs/staticPages/hydrogenReact.doc.ts

---------

Co-authored-by: Anthony Frehner <[email protected]>

* Fix some documentation issues (Shopify#154)

* Cleanup some docs and how they're presented (Shopify#155)

* Update ShopifyProvider with flattened props (Shopify#156)

* Renaming it again to hydrogen-react (Shopify#157)

Hopefully the last time... :)

* [ci] release 2023-01 (Shopify#135)

* [ci] release 2023-01

* [ci] release 2023-01

* Add release notes documentation

* fix link text

* Update packages/react/CHANGELOG.md

Co-authored-by: Bret Little <[email protected]>

* Update packages/react/CHANGELOG.md

Co-authored-by: Bret Little <[email protected]>

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Anthony Frehner <[email protected]>
Co-authored-by: Bret Little <[email protected]>

* remove duplicated info

* Update the umd global variable name (Shopify#159)

* Update the umd global variable name

* add changeset

* Tweak docs (Shopify#161)

* Make better button docs (Shopify#164)

* Tweak docs 2 (Shopify#163)

* Update the docs for any Money-related components (Shopify#165)

* Last bit of small cleanup (Shopify#166)

* Fix flattenConnection doc (Shopify#168)

* Landing page fixes (#167)

* new landing page for react hydrogen

* more changes to the landing page

* undo changes to generated_docs_data

* updated generated content with new version

* fixed some rogue commas

* updated generation

* fix links to storefront schema (Shopify#169)

* fix links to storefront schema

* update generated file

* storefront-api-types link

* landing page typo (Shopify#170)

* Update README.md

* Deprecate CartLinePrice (Shopify#173)

* Deprecate CartLinePrice

* cleanup changelog

* Fix some docs (Shopify#175)

* Lint updates (Shopify#174)

* migrate to just be in the package alone

* Ignore or fix lint errors

* Add explicit return types on functions only for source code

* Configure turbo to run eslint in each package

* Get linting working on the react package

* Get tests to pass by preserving the act behavior as it was before

* Migrate cartlinequantityadjustbutton (Shopify#180)

* Start migration of CartLineQuantityAdjustButton

Co-Authored-By: Jason Kurian <[email protected]>

* Get CartLineQuantity typescript tests passing

* Update tests for CartLineQuantityAdjustButton to use RTL

Fix a couple instances of unnecessary "data-testId" camel casing.

Update BuyNowButton tests to use a shared utility

Co-Authored-By: Jason Kurian <[email protected]>

* Add attributes to linesUpdate() so that they're not lost

When adjusting the quantity.

* Add documentation for the components

* Update docs icons

* Small update to PR template

* Allow dev to disable manually if they want.

* Make the typing DX better for these keys

---------

Co-authored-by: Jason Kurian <[email protected]>

* [ci] release 2023-01 (Shopify#160)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Updating the readmes to use the official docs more (Shopify#182)

* Fix two small docs issues (Shopify#183)

* Fix two small docs issues

* fix the source and run the build-docs command

* Fix UMD builds by defining process.env.NODE_ENV (Shopify#188)

* Fix bug in storefront-client checking on the server (Shopify#195)

* Fix issue with props on cartlinequantityadjustbutton (Shopify#196)

* Update all the deps besides model-viewer (Shopify#199)

* Update all the deps besides model-viewer

* Create lazy-dolphins-develop.md

* Npm migration (Shopify#201)

* use package-lock

* Migrate tooling to use npm

* Fix some commands to use npx; add changelog

* [ci] release 2023-01 (Shopify#197)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* prep for migration and renaming to hydrogen-react

* step 1: migrated hydrogen-react source code

Updated package.json

Verified that most of the package scripts in hydrogen-react work.

* Get the dev command working from monorepo root

* dev scripts working with reloads

* CI checks are passing locally for the most part

Waiting on Matt's updates to the hydrogen tests to work in other timezones before this is 100% done.

* Get ci:checks script working

* Update docs and readme for new repo location

* Update issue templates to better include hydrogen-react

And other tools, too!

* Update Hydrogen readme to make room for multiple packages

Graham did most of the work here 😄

Co-Authored-By: Graham F. Scott <[email protected]>

* Add a versioning section

* update entry.server.tsx based on new remix template

* Revert "update entry.server.tsx based on new remix template"

This reverts commit 7ef939e2988344ecc29df07ff8d371d07acdd339.

* Update README.md

Co-authored-by: Daniel Rios <[email protected]>

* PR feedback

* remove npm version

* triggering a revalidation maybe?

* Revert "triggering a revalidation maybe?"

This reverts commit d85ba015b88873b2b8563270570731796d57835e.

* try with turbo platform workaround?

---------

Co-authored-by: Ren Chaturvedi <[email protected]>
Co-authored-by: Elise Yang <[email protected]>
Co-authored-by: Elise Yang <[email protected]>
Co-authored-by: Daniel Rios <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Elise Yang <[email protected]>
Co-authored-by: Matt Seccafien <[email protected]>
Co-authored-by: Bret Little <[email protected]>
Co-authored-by: Daniel Rios <[email protected]>
Co-authored-by: Fran Dios <[email protected]>
Co-authored-by: Michelle Vinci <[email protected]>
Co-authored-by: John Collett <[email protected]>
Co-authored-by: John Collett <[email protected]>
Co-authored-by: Alex Harvey <[email protected]>
Co-authored-by: Helen Lin <[email protected]>
Co-authored-by: Juan P. Prieto <[email protected]>
Co-authored-by: Jason Kurian <[email protected]>
Co-authored-by: Graham F. Scott <[email protected]>
  • Loading branch information
20 people authored Mar 3, 2023
1 parent bceddb4 commit a215152
Show file tree
Hide file tree
Showing 235 changed files with 48,818 additions and 27,343 deletions.
7 changes: 6 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
build
node_modules
bin
*.d.ts
*.d.ts
dist
coverage
packages/hydrogen-react/codegen.ts
packages/hydrogen-react/vite.config.ts
packages/hydrogen-react/vitest.setup.ts
15 changes: 14 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,22 @@ body:
label: What is the location of your example repository?
validations:
required: false
- type: dropdown
attributes:
label: Which package or tool is having this issue?
description: Which package or tool is having this issue?
options:
- Hydrogen
- CLI
- hydrogen-react
- Oxygen
- Storefront API
- Other / I don't know
validations:
required: true
- type: input
attributes:
label: What version of Hydrogen are you using?
label: What version of that package or tool are you using?
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ contact_links:
use the Discussions for this instead of the issues tab 🙂.
- name: 💬 Hydrogen Discord Channel
url: https://discord.gg/shopifydevs
about: Interact with other people using Hydrogen
about: Interact with other people using Hydrogen.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Fixes #0000 <!-- link to issue if one exists -->
- [ ] I've considered possible cross-platform impacts (Mac, Linux, Windows)
- [ ] I've added a [changeset](CONTRIBUTING.md#changesets) if this PR contains user-facing or noteworthy changes
- [ ] I've added [tests](CONTRIBUTING.md#testing) to cover my changes
- [ ] I've added or updated the documentation

<!--
THANK YOU for your pull request! Members from the Hydrogen team will review these changes and provide feedback as soon as they are available.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: 📥 Install dependencies
run: npm ci

- name: 🔬 Lint
- name: 🔬 Check Formatting
run: npm run format:check

typecheck:
Expand Down
125 changes: 125 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,128 @@ node_modules
.turbo
.cache
**/dist
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

.env.test
!**/playground/**/.env

# parcel-bundler cache (https://parceljs.org/)
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# VSCode launch configs
.vscode/
!examples/*/.vscode/
!templates/*/.vscode/

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# User localdev package
packages/localdev

.DS_Store

temp
snow-devil
artifacts

yarn.lock
!/yarn.lock
2 changes: 1 addition & 1 deletion .graphqlrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This file should be part of the demo-store template, but the GraphQL VSCode plugin doesn't actually look at folders when searching for this file, so it has to live at the root.
# There is a duplicated file in templates/demo-store/ , and it's kept there so that if someone were to spin up the demo-store on their own then it would be included and "just work"
schema: node_modules/@shopify/hydrogen-react/storefront.schema.json
schema: packages/hydrogen-react/storefront.schema.json
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
build
packages/cli/oclif.manifest.json
dist
packages/hydrogen-react/storefront.schema.json
coverage
74 changes: 35 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<p align="center">
<a href="https://hydrogen.shopify.dev"><img src="./.github/images/hydrogen-logo.svg" alt="Hydrogen Logo"/></a>
</p>
<p align="center">
<a href="https://www.npmjs.com/package/@shopify/hydrogen"><img src="https://img.shields.io/npm/v/@shopify/hydrogen.svg?sanitize=true" alt="Version"></a>
<a href="https://github.com/Shopify/hydrogen/blob/main/LICENSE.md"><img src="https://img.shields.io/npm/l/@shopify/hydrogen.svg?sanitize=true" alt="License"></a>
<a href="https://npmcharts.com/compare/@shopify/hydrogen?minimal=true"><img src="https://img.shields.io/npm/dm/@shopify/hydrogen.svg?sanitize=true" alt="Downloads"></a>
</p>
<div style="text-align: center;">

[![MIT License](https://img.shields.io/github/license/shopify/hydrogen)](LICENSE.md)
[![npm downloads](https://img.shields.io/npm/dm/@shopify/hydrogen.svg?sanitize=true)](https://npmcharts.com/compare/@shopify/hydrogen?minimal=true)

</div>
<div align="center">

📚 [Docs](https://shopify.dev/custom-storefronts/hydrogen) | 🗣 [Discord](https://discord.gg/Hefq6w5c5d) | 💬 [Discussions](https://github.com/Shopify/hydrogen/discussions) | 📝 [Changelog](./packages/hydrogen/CHANGELOG.md)
Expand All @@ -17,49 +17,51 @@ Hydrogen is a set of tools, utilities, and best-in-class examples for building a

Hydrogen legacy v1, which is not built on Remix, is available here: https://github.com/Shopify/hydrogen-v1

Get started with Hydrogen with the instructions below ⬇️

## Getting Started
## Getting started with Hydrogen

**Requirements:**

- Node.js version 16.14.0 or higher
- `npm`, `yarn` or `pnpm`
- `npm` (or your package manager of choice, such as `yarn` or `pnpm`)

1. Install the latest version of Hydrogen:

**Installation:**
```bash
npm create @shopify/hydrogen@latest
```

```bash
# Using `npm`
npm create @shopify/hydrogen@latest
1. Run the local development server:

# Using `yarn`
yarn create @shopify/hydrogen@latest
```bash
npm install
npm run dev
```

# Using `pnpm`
pnpm create @shopify/hydrogen@latest
```
1. Open your new Hydrogen app running at http://localhost:3000.

**Running locally:**
See the complete [Hydrogen docs](https://shopify.dev/custom-storefronts/hydrogen).

1. Start a development server
## Packages in this repo

```bash
# Using `npm`
npm install
npm run dev
Hydrogen is organized as a [monorepo](https://monorepo.tools/), which includes multiple packages that can be used together.

# Using `yarn`
yarn install
yarn dev
| Package | Latest version | Description | Readme |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
| [`@shopify/hydrogen`](/packages/hydrogen/) | [![Latest badge](https://img.shields.io/npm/v/@shopify/hydrogen/latest.svg)](https://www.npmjs.com/package/@shopify/hydrogen) | Opinionated tools, utilities, and best-in-class examples for building a commerce application with Remix. | [Readme](/packages/hydrogen#readme) |
| [`@shopify/hydrogen-react`](/packages/hydrogen-react/) | [![Latest badge](https://img.shields.io/npm/v/@shopify/hydrogen-react/latest.svg)](https://www.npmjs.com/package/@shopify/hydrogen-react) | Unopionated and performant library of Shopify-specific commerce components, hooks, and utilities. | [Readme](/packages/hydrogen-react#readme) |
| [`@shopify/cli-hydrogen`](/packages/cli/) | [![Latest badge](https://img.shields.io/npm/v/@shopify/cli-hydrogen/latest.svg)](https://www.npmjs.com/package/@shopify/cli-hydrogen) | Hydrogen extension for [Shopify CLI](https://shopify.dev/docs/custom-storefronts/hydrogen/cli). | [Readme](/packages/cli#readme) |
| [`@shopify/create-hydrogen`](/packages/create-hydrogen/) | [![Latest badge](https://img.shields.io/npm/v/@shopify/create-hydrogen/latest.svg)](https://www.npmjs.com/package/@shopify/create-hydrogen) | Generate a new Hydrogen project from the command line. | [Readme](/packages/create-hydrogen#readme) |
| [`@shopify/remix-oxygen`](/packages/remix-oxygen/) | [![Latest badge](https://img.shields.io/npm/v/@shopify/remix-oxygen/latest.svg)](https://www.npmjs.com/package/@shopify/remix-oxygen) | Remix adapter enabling Hydrogen to run on the [Oxygen](https://shopify.dev/custom-storefronts/oxygen) runtime. | [Readme](/packages/remix-oxygen#readme) |

# Using `pnpm`
pnpm install
pnpm dev
```
## Versioning

2. Visit the development environment running at http://localhost:3000.
Hydrogen and hydrogen-react are tied to specific versions of the [Shopify Storefront API](https://shopify.dev/api/storefront), which follows [calver](https://calver.org/).

Learn more about [getting started with Hydrogen](https://shopify.dev/custom-storefronts/hydrogen).
For example, if you're using Storefront API version `2023-01`, then Hydrogen and hydrogen-react versions `2022.1.x` are fully compatible.

If the Storefront API version update includes breaking changes, then Hydrogen and hydrogen-react may also include breaking changes. Because the API version is updated every three months, breaking changes could occur every three months.

Learn more about API [release schedules](https://shopify.dev/api/usage/versioning#release-schedule) at Shopify.

## Contributing to Hydrogen

Expand All @@ -68,9 +70,3 @@ Learn more about [getting started with Hydrogen](https://shopify.dev/custom-stor
## Other handy links

[Learn more about Hydrogen](https://shopify.dev/hydrogen).

👷‍♀️ Add `npm` packages to your project:

- [`@shopify/hydrogen`](https://www.npmjs.com/package/@shopify/hydrogen)
- [`@shopify/cli-hydrogen`](https://www.npmjs.com/package/@shopify/cli-hydrogen)
- [`@shopify/remix-oxygen`](https://www.npmjs.com/package/@shopify/remix-oxygen)
Loading

0 comments on commit a215152

Please sign in to comment.