Reaction Commerce v3.0.0 Release Notes

Release Date: 2020-02-06 // about 4 years ago
  • v3.0.0

    ๐Ÿ“ฆ We're excited to introduce version 3.0.0 (v3.0.0) of the Reaction Commerce GraphQL API (hereby referred to as "The Reaction API"). In this version, we've expanded the existing GraphQL API to include administrative and operator functionality, eliminated the Meteor framework from the Reaction API, split the Reaction Admin UI and the identity provider into separate services, added support for plugins as NPM packages, and improved automated integration testing for the Reaction API.

    Notable Changes

    Reaction API is now fully headless

    ๐Ÿ’ป The reactioncommerce/reaction repo exclusively hosts the Reaction API in v3.0.0. This Reaction API now has full GraphQL coverage of the functionality that was previously provided by Meteor. In v2 we introduced GraphQL into the Reaction API for storefronts. Now the Reaction API includes GraphQL coverage for administrative and operator functionality. This enables the creation of custom UI for operating a shop using Reaction Commerce.

    ๐Ÿ”Œ Plugins as NPM Packages

    โšก๏ธ The Reaction API plugin system has changed a lot - primarily because the Reaction API runs as a Node.js application instead of a Meteor application. It's now possible and recommended to write plugins as NPM packages. See our docs on plugins in Reaction 3.x for details.

    Permissions system overhaul

    Permissions of a Reaction Account are now exclusively determined by the permissions of the Group (or Groups) the Account belongs to.

    โšก๏ธ Previously, roles (renamed permissions) were attached to a user by querying the single Group a user belonged to, and copying the group permissions over to the user account. Permissions were then checked against the user.roles object. If there was ever an update to the permissions a group was allowed, every user in the group needed to be updated.

    โšก๏ธ In v3.0.0, Accounts are now allowed to be added to more than one group, and permissions are checked by querying the Groups the user belongs too, aggregating all permissions all of these groups, and then checking against this list of permissions. If a group is ever updated, each individual account no longer needs to be updated.

    ๐Ÿ‘Œ Improved Integration Test Coverage

    ๐Ÿ‘€ We've written many integration tests for our Reaction API. See this GitHub ticket for a full list of new integration tests. While we've made huge strides here to improve test coverage, there is still room for improvement here. We'd welcome contributions that improve our test coverage!

    โœ‚ Removed Meteor from the Reaction API

    Improving developer experience has been high on the list of priorities for quite a while. We've made significant improvements to startup, restart, and build times for the reaction project by removing Meteor. In doing this we've also updated to version 12 of Node.js, which is in Active LTS status.

    Reaction Admin has a new home

    ๐Ÿš€ With this release, we are also introducing a beta of Reaction Admin, now a standalone application. We've moved the codebase for the Admin UI into a separate repository - reactioncommerce/reaction-admin.
    ๐Ÿš€ It's important to note that while this is the official v3.0.0 release of the Reaction API, we're keeping the beta tag on Reaction Admin for now.

    ๐Ÿš€ Our focus and effort for this release has primarily been on readying our full GraphQL Reaction API. We're keeping Reaction Admin in beta because it uses Meteor under the hood for builds and there are still a few Meteor APIs left in the codebase. The future Reaction Admin UI will use the Reaction API exclusively.
    ๐Ÿš€ The Reaction Admin project will be in beta beyond the v3.0.0 release of Reaction API. We suggest careful consideration before copying any patterns found in the Reaction Admin project while it still has the beta tag. There are sections where it consumes the Reaction API and other sections that still use patterns from when the Admin UI was part of the monolithic Meteor application.

    ๐Ÿ†• New identity provider service: Reaction Identity

    ๐Ÿš€ This release moves the identity provider for Reaction into a separate service - reactioncommerce/reaction-identity. Reaction Identity is the user interface and server for identity management, including user registration, login, logout, and password change. It works together with reaction-hydra to enable OAuth2 flows.

    ๐Ÿš€ Independent Releases

    ๐Ÿš€ v3.0.0 is a coordinated release across all of Reaction's open source projects. Following this release, we will release Reaction Commerce projects independently. For example, if there are fixes or improvements made to the Example Storefront or to the API, they can be released without bumping the version of every other project. Reaction Development Platform will continue to be bumped with each release of a Reaction Commerce project.

    Mongo 4

    ๐Ÿ”Œ Mongo version 4.0+ is now required. Mongo 4 introduces multi-document transactions. Requiring Mongo 4+ means that services and plugins can start using transactions where necessary to ensure better data integrity.

    ๐Ÿณ Default to running public docker images

    ๐Ÿ— The docker-compose.yml file in each project now uses public images rather than building an image. This drastically speeds up the initial startup time in development, and makes the application run smoother in development. When you're ready to start developing, you'll need to switch over to using the docker-compose.dev.yml file in the project you're wanting to develop - see for example: reaction/docker-compose.dev.yml).

    Migrations

    ๐Ÿ— The migration tool in Reaction v2.x depended on Meteor and was built into the Reaction monolith. For v3.0.0, we've moved to a new CLI migration tool for MongoDB. We weren't planning to write Migrator, but we couldn't find anything that met all of our MongoDB migration needs. Although we built Migrator for Reaction Commerce, it is a general purpose MongoDB data migration tool that you can use for any project. See the project page for details on why we decided to build our own and to learn how to use the new migration tool.
    ๐Ÿ“ฆ We've got an example project that you can use to get started. There's also an npm package that can ensure your database has migrated to the correct version before running any commands.

    How to get started with Reaction v3.0.0

    Our (recently renamed) reactioncommerce/reaction-development-platform project is still the best place to start if you want to check out what Reaction has to offer or start developing for Reaction.
    โšก๏ธ If you're experienced with Reaction already check-out our Upgrade Guide. If you've got a plugin you'd like to upgrade, read our guide for updating a 2.x API plugin to work with Reaction API 3.x.

    ๐Ÿ”‹ Features

    • feat: Add Accounts GraphQL query to find non-admin accounts (#5848)
    • feat: add addAccountEmailRecord mutation and corresponding integration (#5813)
    • โœ… feat: Add Babel config to make Jest tests work (#5728)
    • feat: add checkPermissions function (#5727)
    • โœ… feat: Add createNavigationTree mutation & its tests (#6023)
    • feat: add delete action to account managers policy (#6024)
    • feat: add email templates query (#5811)
    • feat: add graphql equivalent of create group (#5850)
    • โšก๏ธ feat: Add updateAccountGroup mutation (#6016)
    • โšก๏ธ feat: add updateProduct and updateProductVariant mutations for 3.0 (#5768)
    • โšก๏ธ feat: add updateProductVariantPrices mutation to API (#5910)
    • feat: addCartItems mutation (#5814)
    • โœ… feat: adds integration test for generateSitemaps mutation (#5995)
    • feat: Allow remoteURL in MediaRecordInfo schema (#6074)
    • ๐Ÿ”Œ feat: authentication plugin; drop support for meteor-login-token header (#5999)
    • ๐Ÿ”Œ feat: authorization plugin & checkPermissions functionality (#5724)
    • ๐Ÿ‘ feat: Better internal context design (#6020)
    • feat: change graphql route (#6027)
    • โšก๏ธ feat: Create updateAccount GraphQL mutation (#6067)
    • ๐Ÿ”Œ feat: GQL discount & discount codes plugins (#5800)
    • feat: GQL Email (core/email) (#5793)
    • feat: GQL products & product query (#5818)
    • feat: GQL Tags (core/tags) (#5786)
    • feat: GQL tax rates (#5774)
    • feat: GQL Templates (core/templates) (#5792)
    • ๐Ÿ›  feat: Product/Variant GQL fixes (#6079)
    • ๐ŸŒ feat: pt-BR translation for reaction-orders. (#6004)
    • ๐ŸŒ feat: pt-BR translation for reaction-tags. (#5997)
    • feat: retry initial MongoDB connections (#5807)
    • feat: Shipping (flatRateFulfillmentMethods) query (#5844)
    • feat: Tag query improvements (#5783)
    • โšก๏ธ feat: Update brand assets and parcel size on shop (GQL) (#5846)
    • โšก๏ธ feat: update groups permission with migration (#6086)
    • โšก๏ธ feat: update updateShop mutation to set all necessary settings (#5804)
    • feat: Use api-utils for currency definitions (#5823)
    • feat: Warn about non-unique names of functionsByType functions (#6001)
    • feat(simple-pricing): Compute displayPrice as resolver as needed (#6025)

    ๐Ÿ›  Fixes

    • ๐Ÿ›  fix: a few 3.0 bugs (#5824)
    • ๐Ÿ›  fix: account invite flow and account email data (#5799)
    • ๐Ÿ›  fix: add missing permissions check to (#6040)
    • ๐Ÿ›  fix: addAccountToGroup (#6071)
    • ๐Ÿ›  fix: Adjust the sharp syntax (#5881)
    • ๐Ÿ›  fix: canBackorder has lowercase o throughout codebase (#5990)
    • ๐Ÿ›  fix: check if the url is already absolute (#6032)
    • ๐Ÿ›  fix: comment out auth checks that aren't valid until new permissions are finished (#5900)
    • ๐Ÿ›  fix: Don't use Packages for tax settings, and tax rates GQL fixes (#5852)
    • ๐Ÿ›  fix: fix adding shop creator to owner group (#6072)
    • ๐Ÿ›  fix: fix default public password reset URL (#5991)
    • ๐Ÿ›  fix: Invisible Tags do not show on Admin tags list (#6028)
    • ๐Ÿ›  fix: parse complicated MONGO_URL properly (#5827)
    • ๐Ÿ›  fix: partialProductPublish for products without Catalog (#6059)
    • ๐Ÿ›  fix: Polish translations (#6069)
    • ๐Ÿ›  fix: problems with accounts queries (#6060)
    • ๐Ÿ›  fix: Proper sitemap last modify date (#6078)
    • ๐Ÿ›  fix: remove check for shopId where not needed (#5895)
    • ๐Ÿ›  fix: respect allowGuestCheckout setting (#5815)
    • ๐Ÿ›  fix: Return fulfillment quotes without a shipping address (#5934)
    • ๐Ÿ›  fix: Some minor 3.0 fixes (#5977)
    • ๐Ÿ›  fix: user roles and owner permission checks (#6008)
    • ๐Ÿ›  fix: Various 3.0.0 fixes (#5722)
    • ๐Ÿ›  fix: Various product GQL fixes (#6053)

    ๐Ÿ”จ Refactors

    • ๐Ÿ”จ refactor: add product media resolver & update translations for new DataTable products view (#6036)
    • ๐Ÿ”จ refactor: kieckhafer remove deprecations (#5718)
    • ๐Ÿ”จ refactor: add legacy system name to permission resource structure (#6019)
    • ๐Ÿ”จ refactor: cart token param name consistent to cartToken (#5820)
    • ๐Ÿ”จ refactor: clean up ENV/envalid code (#5922)
    • ๐Ÿ”จ refactor: clean up translations for products view (#5746)
    • ๐Ÿš€ refactor: fix failing integration tests in release-3.0.0 (#5862)
    • ๐Ÿ”จ refactor: get roles / permissions directly from group(s), not user object (#6031)
    • ๐Ÿ”จ refactor: move xforms into plugins (#5713)
    • ๐Ÿ”จ refactor: No more Packages collection, implement AddressValidationRules GQL, other 3.0 stuff (#5888)
    • ๐Ÿ”จ refactor: only allow provides: default for one email address (#6062)
    • ๐Ÿ”จ refactor: pass cart down to calculateOrderTaxes fn (#6000)
    • ๐Ÿ”จ refactor: remove "owner" and other default permissions / groups (#6063)
    • ๐Ÿ”จ refactor: remove legacyRoles from authorization (#6021)
    • ๐Ÿ”จ refactor: Remove most remaining uses of users collection (#6056)
    • ๐Ÿ”จ refactor: remove restriction that limits account to one group per shop (#6035)
    • ๐Ÿ”จ refactor: rename simple-authorization to legacy-authorization, change function footprint (#5772)
    • ๐Ÿ”จ refactor: Replace context.queries.primaryShopId shopId with client shopId (#5802)
    • ๐Ÿ”จ refactor: source SMTP email configuation from ENV vars instead of DB (#5788)
    • ๐Ÿ”จ refactor: source Stripe API keys from ENV vars (#5771)
    • ๐Ÿ”จ refactor: use functionsOfType to register multiple auth permissions functions (#6009)
    • ๐Ÿ”จ refactor: use new URL instead of url.parse (#5717)

    Chores

    • ๐ŸŒ chore: [3.0.0] Consolidate translation plugins (#5920)
    • โœ… chore: add integration test for anonymousCartByCartId query (#5859)
    • โœ… chore: add integration test for getFlatRateFulfillmentRestriction (#5869)
    • โœ… chore: add integration test for getFlatRateFulfillmentRestrictions (#5866)
    • โœ… chore: add integration test for globalSettings query (#5879)
    • โœ… chore: add integration test for shopSettings query (#5873)
    • chore: Check Node version (#5734)
    • โœ… chore: copy over integration test from v2.x (#5854)
    • ๐Ÿ‘• chore: fix up eslintignore (#6026)
    • ๐Ÿ”’ chore: lock api-utils version number (#5851)
    • chore: Node debugger config (#5993)
    • ๐Ÿณ chore: reconfigure docker-compose networks (#6068)
    • โšก๏ธ chore: update Babel (#6065)
    • โฌ†๏ธ chore: Upgrade mongodb and jest-mongodb (#5904)
    • ๐Ÿณ chore: use published image for docker-compose (#5992)

    ๐Ÿ“„ Docs

    • ๐Ÿ“„ docs: update links to use trunk branch of docs (#6050)

    โœ… Tests

    • โšก๏ธ test: add create/update/delete navigation item integration tests (#5890)
    • โœ… test: add integration tes for recalculateReservedSimpleInventory mutation (#6010)
    • โœ… test: add integration test available payment methods (#5864)
    • โœ… test: add integration test for addressValidationServices query (#5930)
    • โœ… test: add integration test for accountCartByAccountId query (#5857)
    • โšก๏ธ test: add integration test for create, update & delete FlatRateFulfillmentMethod (#5964)
    • โšก๏ธ test: add integration test for create, update & delete FlatRateFulfillmentRestriction mutations (#5981)
    • โœ… test: add integration test for echo (#5942)
    • โœ… test: add integration test for enablePaymentMethodForShop (#5944)
    • โœ… test: add integration test for inviteShopMember mutation (#5984)
    • โœ… test: add integration test for payment methods (#5883)
    • โœ… test: add integration test for publishNavigationChanges mutation (#5969)
    • ๐Ÿšš test: add integration test for removeAccountAddressBookEntry (#5961)
    • ๐Ÿšš test: add integration test for removeAccountEmailRecord mutation (#5965)
    • โœ… test: add integration test for setAccountProfileCurrency mutation (#5958)
    • โœ… test: add integration test for setAccountProfileLanguage mutation (#5960)
    • โœ… test: add integration test for taxCodes query (#5911)
    • โšก๏ธ test: add integration test for updateAccountAddressBookEntry (#5962)
    • โœ… test: Add integration tests for surcharge (#5938)
    • โœ… test: add navigation query integration tests (#5856)
    • โœ… test: add Tag query integration test (#5874)
    • โšก๏ธ test: add updateTag mutation integration test (#5876)
    • โœ… test: adds addressValidation query integration test (#5917)
    • โœ… test: adds integration test for captureOrderPayments mutation (#6015)
    • โœ… test: adds integration test for roles query (#5885)
    • โœ… test: adds integration test for taxServices query (#5912)
    • โšก๏ธ test: adds integration test for updateShopSettings mutation (#5974)
    • โœ… test: adds integration test sitemap (#5889)
    • โœ… test: adds integration test subrchargeById query (#5896)
    • โœ… test: adds integration test surcharges (#5902)
    • โšก๏ธ test: adds integration test updateGlobalSettings mutation (#5970)
    • โœ… test: adds systemInformation query integration test (#5907)
    • โœ… test: delete unused documents in afterAll (#5903)
    • โœ… test: Eliminate factory mocks for catalogItemProduct (#5892)
    • โœ… test: fix out-of-memory issues in tests (#5918)
    • โœ… test: full cart/checkout integration test (#5976)
    • โœ… test: integration test approve order payments mutation (#6013)
    • โšก๏ธ test: integration test for update navigation tree (#5914)
    • โœ… test: integration test set tag hero media (#6007)
    • ๐Ÿ‘ท test: split query and mutation integration tests in CI config (#5919)
    • โœ… test: Use Factory to mock FulfillmentMethod (#5988)
    • โœ… test: Working integration tests (#5732)

    Contributors

    ๐Ÿš€ We couldn't have done this without the incredible people contributing to Reaction. From writing PRs and docs to creating bug reports, every contribution matters. Thanks to the over 60 people, involved in 8+ repos who have contributed in some way to the v3.0.0 release. We appreciate each of you! ๐ŸŽ‰

    @janus-reith
    @loan-laux
    @trojanh
    @HarisSpahijaPon

    @adilsaeed31
    @agustif
    @akakak1
    @aktywnitu
    @albertstartup
    @alex-haproff
    @Arthur236
    @ashwinsoni
    @Badyl1g
    @bjanssen-pon
    @BunnyMan1
    @chriscamplin
    @cmbirk
    @CristianCucunuba
    @curmudgeonation
    @daniel-rosiak
    @deividaspetraitis
    @delagroove
    @DennisWanjiru
    @derBretti
    @desktp
    @dominik-myszkowski
    @Escalion
    @eusebiu-andrei9
    @gddabe
    @hamxabaig
    @hems
    โœ… @ichtestemalwieder
    @ikabudimir
    @jackson-sandland
    @jdonor
    @jhonsfran1165
    @jm18457
    @jmav
    @joshreeves
    @juanzjck
    @karaarda
    @karbal
    @kmyn
    @manzettidenis
    @MarcMagnin
    @mauber91
    @michaelstanton
    @moeghashim
    @monarkatfactly
    @Niko0918
    @octoxan
    @okazdal
    @paales
    @preminfy
    @rogersoares
    @RoytenBerge
    @sagargupta
    @samkelleher
    @tccack
    @TilenKreca
    @vigyano
    @volanar
    @yashutanna
    @YuuwakU
    @Zachary-work

    Notes

    ๐Ÿš€ These changes were originally tested and released in our alpha and beta releases

    ๐Ÿš€ The following Reaction projects are being released one time in coordination as v3.0.0

    ๐Ÿš€ After this release, Reaction releases will no longer be coordinated across all projects - we'll release each project independently, as needed. Version numbers will no longer be kept in sync. The newest versions of each project will work together.