Releases: SalesforceCommerceCloud/pwa-kit
v2.3.0
Featured Change: React Query Support 🎉
The pwa-kit-react-sdk now supports data fetching with React Query on the server side.
For details on how to migrate a v2.2 project to v2.3, see the Upgrade to v2.3 guide.
Changes
Full changelog: v2.2.0...v2.3.0
pwa-kit-react-sdk
- Support
react-queryserver-side data fetching. #724 - Add a server-safe default configuration for
queryClientConfigoption. #734 - Add
useServerContexthook with theresresponse object and theisServerSideflag. #737 - Handle
react-queryserver-side errors. #735 - Fix internal build script. #706
- Add Correlation ID to SCAPI requests. #728
template-retail-react-app
- Fix locale
aliasby includinglocaleobject inside the MultiSite Context. #716 - Updated translations. #725
- Add new Einstein API activities. #714
- Fix search field to recognize the
&character. #736 - Fix filters on search results page. #742
- Make copyright date in footer dynamic. #741
- Bugfix: image gallery thumbnails not working without DIS. #786
pwa-kit-create-app
- Fix missing required fields in the
manifest.jsonfile for generated projects. #729 - Update ODS instance URL for the
retail-react-app-demopreset. #799
pwa-kit-runtime
- Performance: Skip retries when flushing CloudWatch metrics and prioritize returning a response instead. #720
- Add
correlation-idto the header of SCAPI requests. #728
pwa-kit-dev
v2.2.0
Changes
Full changelog: v2.1.0...v2.2.0
template-retail-react-app
- Update zzrf-001 instance URL. #694
- Optimize server-side performance. #667
- Remove references to session bridging. #684
pwa-kit-dev
- Added option to specify where the credentials can be saved to or read from. #647
New Contributors
- @danechitoaie made their first contribution in #647
v2.1.0
Featured Change: Hot Reloading on Client Side 🔥
See your changes as soon as you make them! Hot reloading now works on the client side as well as the server side, thanks to hot module replacement.
A page reload is still required when:
- Adding syntactically invalid changes.
- Adding a new
loadablepage. - Updating a
getPropsfunction.
Changes
Full changelog: v2.0.0...v2.1.0
pwa-kit-dev
- Replace
Mobifyreferences/links with proper PWA Kit values. #619 - Add support for a custom build directory to
pwa-kit-dev build. #628 - Introduce client-side hot module replacement. #630
pwa-kit-react-sdk
- Remove console logs from route component. #651
v2.0.0
What’s New
We’ve added lots of new features to PWA Kit v2, including:
- 🥳 TypeScript support. The build tools now support TypeScript by default—without having to update the configuration files for Babel or Webpack.
- 🧰 An updated development server that supports hot reloading on the server side and makes it possible to support hot reloading on the client side in a future release.
- 🤓 An all-new command-line tool called pwa-kit-dev that bundles our recommended development tools like Webpack, Babel, and Jest to support zero-config project templates.
- 🖌️ Experimental support for non-React apps for those users interested in using Managed Runtime to host other Express-based apps (not just the Retail React App).
See our Upgrade to v2 guide for details on how to migrate your v1 site to v2.
Changes
Full changelog: v1.5.2...v2.0.0
pwa-kit-create-app
- Fix generator log #571
- Fix incorrect site related values when generating without use of a preset #470
- Support Multi-site implementation using dynamic config #469
- Add verbose flag to generator #463
- Environment Specific Configuration Support #477
pwa-kit-dev
- Make the createApp API idiomatic for Express, fix service-worker loading. #536
- Remove lodash and bluebird. #534
- Allow pass thru cli options for test command #537
- Ensure we copy the package.json file into the build folder. Also move logic for copying config files into the build script from the webpack config #524
- Loading page: avoid seeing infinite reloads #532
- Remove legacy remote proxy, which allowed remote environments to use proxy configs in package.json #425
- Fix source maps cannot be found when debugging the server #526
- Generate different reports for different bundles #508
- Allow custom webpack config in projects #462
- Hide webpack performance warnings #471
- Support Multi-site implementation using dynamic config #469
- Loading screen #473
- Service worker loading for dev server #464
- Environment Specific Configuration Support #477
- Remove Webpack PwaKitConfigPlugin #443
pwa-kit-react-sdk
- Remove lodash and bluebird. #534
- Support Multi-site implementation using dynamic config #469
- Support functions as default exports in the applications routes.jsx file. #447
- Serialize application configuration in the HTML during rendering process. #447
- Remove create-hash-manifest.js #425
- Fix upload bug with extending an options object #419
pwa-kit-runtime
- Make the createApp API idiomatic for Express, fix service-worker loading. #536
- Add environment specific configuration support via getConfig. #447
- Remove legacy remote proxy, which allowed remote environments to use proxy configs in package.json #425
- Remove default body-parser middleware from express server. #444
Templates
template-retail-react-app
- Multi-site, Fix the case when no site aliases is set #551
- Fix invalid refresh token #528
- Add valid token check before using refresh token on login #533
- Fix localization scripts to output to the correct default locale #539
- Merge guest cart and registered cart #540
- Move retail react app jest setup out from pwa-kit-dev #545
- Remove legacy remote proxy, which allowed remote environments to use proxy configs in package.json #425
- Rename ‘pwa’ directory into ‘template-retail-react-app’ #485
- Optimize visibility-off.svg #512
- Support Multi-site implementation using dynamic config #469
- Service worker loading for dev server #464
- Environment Specific Configuration Support #477
template-express-minimal
template-typescript-minimal
v1.5.2
v1.5.1
Changes
Full changelog: v1.5.0...v1.5.1
Bug Fixes
- Use Prompted SiteId in Generated Configuration Files #470 (Also removing api.config.js file)
- Fix proxy config for generated project #466
- Draft multi-site readme updates #457
v1.5.0
Full changelog: v1.4.0...v1.5.0
Base SDK
Featured Change: Enhanced Configuration Management
The base SDK now allows configurations based on your environments. For details, see the documentation on Configuration Files.
Related PRs: #421, #442, #451, #453
Bug Fixes
- Prevent accidental overwrite of default options in
upload.js. #419 - Fix the versioning of the SDK's peer dependencies. #432
- Fix generator failing on Windows using WSL. #385
Other Changes
- Enhancements to project generator questions. #374
- Make
enableBodyParserflag increateAppoptional. #446 - Remove unused packages (
url-parseandenzyme-adapter-react-16). #411, #424
Retail React App
Featured Change: Multi-Site Management
With v1.5, PWA Kit includes a reference implementation of multi-site management. For details, see the Multiple Sites guide in our documentation.
Related PRs: #391, #382, #452, #438, #445
Bug Fixes
- Fix for locale selector on Windows. #381
- Clean up the test mock server. #439, #441
- Add a fallback currency to the
<ProductTile />component. #450 - Warn when using incompatible versions of Node. #384, #410
- Fix the proxy config for a generated project. #454
Other Changes
- Support storing authentication tokens in a cookie to enable hybrid storefronts with user flows between SFRA and PWA Kit. #429
Community Contributions
@stm-dschulz made their first contribution by adding a forgot password flow to the Retail React App 🎉. #373
v1.4.0
Featured Change: Project Creation Presets
You can now create a PWA Kit project using presets. Presets let you specify a template for your project files and (optionally) use preconfigured settings for connecting to a B2C Commerce instance.
To create a project using the Retail React App template and connect it to our demo sandbox, run the following command in your terminal:
npx pwa-kit-create-app --preset retail-react-app-demo
With this new demo preset, anyone can try out PWA Kit in minutes!
To create a project with a different preset or use custom settings for connecting to your own B2C Commerce instance, run npx pwa-kit-create-app and follow the prompts.
To learn about all the available options for creating a project, run npx pwa-kit-create-app --help.
PRs: #285, #325, #322, #357, #358, #361
Changes
Full changelog: v1.3.0...v1.4.0
Bug Fixes
- Add constants for
<meta theme-color|apple-mobile-web-app-title>. #287 - Hide locale selector when there’s only a single locale. #262
- Add to Cart remains active unless the item is out of stock. #222
- Update error link. #303
- Deprecate
create-hash-manifestscript. #300 - Fix redirect after account creation. #360
Security Updates
- Don’t send the HSTS header in local development. #288
- [Snyk] Security upgrade
shelljsfrom 0.8.4 to 0.8.5. #307 - [Snyk] Security upgrade
nanoidfrom 3.1.30 to 3.1.31. #308 - [Snyk] Security upgrade
cross-fetchfrom 3.1.4 to 3.1.5. #351
Other Changes
v1.3.0
Changes
Bug Fixes
- Promotion codes appear in uppercase in order summary. #224
- Order summary prices on checkout page misaligned on mobile. #233
- Shipping method description overflows the price section. #232
- Stack trace data and SSR options are visible on error pages when viewing page source. #230 #249
- Incorrect prop warning for section subtitle. #282
- Incorrect repository URL in the NPM registry. #257
Security Updates
- Set common HTTP security headers in the Retail React App. #263
- Remove
upgrade-insecure-requestsfor local development. #270
Other Changes
- Locale-based URLs. You can include the locale in the URL path or as a query parameter using the new configuration in
pwa-kit-config.json. #228 #255 - All configuration options related to the Commerce API and the Einstein API that were previously in
commerce-api.config.jsandeinstein-api.config.jsare now in one file:api.config.js. #256 - The new
DynamicImagecan transform your images by mapping an array of widths to the correspondingsizesandsrcSetattributes. This component also makes it easier to use the Dynamic Imaging Service. #186 - The query parameters
mobify_server_onlyandmobify_prettyused for debugging are now called__server_onlyand__pretty_print. The old query parameters are deprecated but still work. #250 - New
idanddefaultMessageparameters to enable translation for the Retail React App. #195 #207 #239 #252 #260 - New example product scroller on the home page of the Retail React App. #218 #208 #216
- The
outputDiroption for thenpx pwa-kit-create-appscript defaults topwa-kit-starter-projectinstead ofgenerated-project. #268 - The
Seocomponent now fetches the default site title frompages/constants.js. #279 - The
createAppfunction takes a new option calledenableLegacyRemoteProxyingthat defaults totrue. When set tofalse, local development proxying is disabled when running remotely. In future, local development proxying will always be disabled when running remotely. #205 - More informative error output when the locale configured in PWA kit doesn’t match the one in Business Manager. #225
- Improvements to
README.mdandCONTRIBUTING.mdfiles for the repository. #241 #251 #271 #281 - Error messages point to the latest documentation and help topics. #268
- New and updated tests for search pages. #245
v1.2.0
🥳 This release focuses on a number of updates for localization and improvements related to SEO, performance, and shopper experience.
Changes
Full changelog: v1.1.0...v1.2.0
Retail React App: Localization
You can now build translation bundles using npm run build-translations as well as associate locale selectors with preferred currencies. Configurations are enabled so that you can keep all localization-related configurations in one place. For more information about localization, see the Localization README.
- Use the preferred currency when switching locales. #105
- When adding a new locale, minimize configuring the locale selector UI by having a list of commonly-used locales #175
- Rename the extract-messages and compile-messages commands to extract-default-translations and compile-translations #160
- For search engine crawlers, add
hreflanglinks to the current page's HTML #137 - Allow individual Commerce API calls to pass in a different locale/currency and override the global value. #177
- Enabling pseudo locale now affects only the loading of the translation messages. The rest of the app still knows about English and the other locales. #177
- Fix regression with loading the correct translation file #193
- Fix Missing Locale Param for Commerce API Calls #174
Retail React App: Performance & Usability
A new simplified homepage makes it easier to get started with developing your storefront. We also implemented a couple of other fixes for performance and usability.
Retail React App: Shopper Experience
Improvements in Einstein recommendation and wishlists enhance the shopper experience for the storefront.
- Ensure
cookieIdvalue is sent always for Einstein recommendations #179 - Integrate wishlist with Einstein recommended products. #131
- Enable favorite icons on product tiles for guest users #173
- Fix: Enable adding wishlist items to the cart. #158
- Rename
CartItemVarianttoItemVariantProviderto improve reuse. #155