Release Notes
Release Notes for the Autonomy SDK package

v3.0.0

This major release of this Gatsby theme moves Gatsby and all related Gatsby plugins and transformers from direct dependencies to peerDependencies so that consumers of this package can upgrade Gatsby without any intervention from Chord. This will require you to do more than just bump this version in the package.json.
First, edit your package.json to drop @chordcommerce/gatsby-theme-autonomy and any of the listed peerDependencies in the theme's peerDependencies from your dependencies block. We will be reinstalling them in the next section.
Then, you should run the following command in your shell:
1
# If you are using npm
2
$ npx install-peerdeps @chordcommerce/gatsby-theme-autonomy
3
# If you are using yarn
4
$ npx install-peerdeps --yarn @chordcommerce/gatsby-theme-autonomy
Copied!
There is a chance that this command with fail with a very unhelpful error message. If that happens, the program will output an npm install/yarn add command that you can copy and run manually.
For more information and caveats around this, please read the installation instructions for this package.

v2.2.2

This release fixes an issue where incorrect routes were being rendered to the sitemap. Routes should be rendered to the sitemap without the localization, for example: https://example.com/products/t-shirt, however only routes with the en-US localization were being rendered, for example: https://example.com/en-US/products/t-shirt. It is recommended that you upgrade to this version and then re-crawl your site via the Google Search Console.

v2.1.0

This release adds modifyLineItem to the useCart hook providing more flexibility to modifying line items such as updating quantity and line item options. See here for accepted parameters.

v2.0.6

This release updates @chordcommerce/chord-magic to v1.1.1 is using the lates magic-sdk version 8.

v2.0.4

Fix one issue with Square Checkout's finalizeCheckout: the SDK was calling forgetOrder before the actual call to finalize the checkout using the API. This was producing requests without any auth token, because the current order token was already lost when the request is sent. On Stripe there is another auth mechanism and it works with or without that token. To fix the issue, on Square `forgetOrder is called only after a successful finalize.

v2.0.3

Added ACS-Anonymous-Id header to all requests to track the Segment AnonymousId server side. This is internal and will not impact customer development.

v2.0.2

Change the existing finalizeCheckout() so that it is compatible with the Square checkout. In fact, this is the last step of the Square Checkout, which allows finalizing the order and allows the user to start a new one, and unlike Stripe, it can be called without a checkout_session_id. This method has been made available via the useSquareCheckout hook, even if it does exactly the same as the one provided in the useCart hook.

v2.0.1

Adds a new step of the Square checkout, that allows entering payment information, called updateOrderPayment(). To work, it should pass along a token retrieved on the client-side using the Square Web Payments APIs.

v2.0.0

This release adds support for Gatsby 4! Please see the v1.2.7 to v2.0.0 Migration Guide for instructions for upgrading. There are no additional features, but be sure to check out release notes below if migrating from a version below v1.2.7.
Key highlights of this release:

Troubleshooting

See troubleshooting in the v1.2.7 to v2.0.0 Migration Guide for all troubleshooting related to upgrading.

Upgrading from a version below v1.2.7

Please read the release notes for previous releases to find out what changed, but important breaking changes to highlight include:
Segment Consent Manager (breaking change in v1.2.0)
See the change to the Segment Consent Manager in v1.2.0 release notes and ensure you have the segmentConfig set in gatsby-config.js.
Product Merchant feed (breaking change in v1.0.6)
This theme no longer provides a Merchant feed. See the change in v1.0.6 release notes and implement a feed in your website code.

Other Breaking Changes

AuthError and AuthErrorCodes no longer exported from @chordcommerce/gatsby-theme-autonomy

AuthError and AuthErrorCodes are no longer exported from @chordcommerce/gatsby-theme-autonomy. This is because they were directly related to the @chordcommerce/chord-magic package. If you are importing these, you will now have to update to import from @chordcommerce/chord-magic.
Before
1
import { AuthError, AuthErrorCodes } from '@chordcommerce/gatsby-theme-autonomy'
Copied!
After
1
import { AuthError, AuthErrorCodes } from '@chordcommerce/chord-magic'
Copied!

v1.2.7

Fixes a bug where an expired user session continues to be retried instead of being cleared from the app state.

v1.2.6

Adds a new step of the Square checkout, this time to update the order's delivery options, with updateOrderDelivery() For now, it just works when a single delivery option is available, and it is only used to move the order to the payment state.

v1.2.5

This version fixes a bug where, when an order is completed, the completed order is still momentarily still available from the useCart hook. Now the order is cleared as soon as finalizeCheckout() is called. No changes to React components are required for this fix.
This version also includes a new forgetCart() method that can be used in similar situations if necessary.

v1.2.4

This version includes the first functions to start a checkout with Square. It is still experimental and we will release a new major version when the whole checkout flow will be available. This version only adds:
  • updateOrderAddresses() to update an existing order with a shipping address.
  • getStates() to retrieve the list of states in a specific country. Their ids will be used in the body of the request when updating an order's address.

v1.2.0

Key highlights of this release:
  • This release adds support to manually load our Segment plugin, in order to implement Segment's Consent Manager in our starters. It introduces a change in the way you would normally configure Segment in your theme. Please see below.
Starting from v1.2.0, it is now the responsibility of the starter to pass a proper Segment configuration to the theme, via the starter's gatsby-config.js file, as follow:
1
plugins: [
2
{
3
resolve: '@chordcommerce/gatsby-theme-autonomy',
4
options: {
5
....
6
7
segmentConfig: {
8
prodKey: process.env.GATSBY_SEGMENT_PRODUCTION_WRITE_KEY,
9
devKey: process.env.GATSBY_SEGMENT_DEV_WRITE_KEY,
10
trackPage: true,
11
host: 'https://cdn.segment.com',
12
delayLoad: false,
13
delayLoadTime: 1000,
14
manualLoad: false
15
}
16
17
...
18
}
19
}
20
]
Copied!
Please read this to learn more details about those settings.
Note: manualLoad is an advanced feature. It is set to true by default in our Gatsby starters so that Segment's Consent Manager can work properly. Alternatively, you can use it if you are calling analytics.load({writeKey}) manually elsewhere in your code.
Use manualLoad false if you do not use, or have removed, the Consent Manager implementation (see below).
Gatsby starter v2.3.0+ (Autonomy) ships with a new Consent Manager component. You can find it at: /src/components/Segment/ConsentManager/index.jsx.
This component is an analytics.js add-on with support for consent management. At its core, the Consent Manager empowers visitors to control and customize their tracking preferences on the website. They can opt out entirely of being tracked, or selectively opt out of tools in which they don’t want their information stored.
The Consent Manager banner is shown automatically for visitors from the EU. You can also decide to show it by default by configuring the GATSBY_SEGMENT_SHOULD_REQUIRE_CONSENT new environment variable to true in your .env file.
We have also integrated a way to manage your Consent Manager preferences from the Starter's footer component:
Integrations
In order for the Consent Manager to work, you must setup Segment integrations in your target Segment workspace.
You can verify that your integrations (Google Analytics, Amplitude, etc) are accessible for the Consent Manager component by visiting the URL below. It should not return an empty array if you have properly configured them.
1
https://cdn.segment.com/v1/projects/add-your-segment-api-key-here/integrations
Copied!

Troubleshooting

There is a known Gatsby issue that might occurred, where a blank page is rendered all over the site.
This issue only occurs if you build and serve the site (as opposed to simply yarn dev). When/if that happens, edit your /src/components/Segment/ConsentManager/index.jsx and move the {children} coming from the wrapRootElement before the <ConsentManager />
Rebuild and serve (yarn build && yarn serve), or use your Netlify/Gatsby Cloud review apps and verify the results.

v1.0.6

This release introduces a breaking change: the Product Merchant feed generator has been removed from this theme. It is now the responsibility of the website code to enable it. You can find an implementation example in the following pull request.
Last modified 1mo ago