Skip to content

Commit

Permalink
Update develop with v2.3.0 and Bump version to v2.4.0-dev (#804)
Browse files Browse the repository at this point in the history
* Starting release process for 2.3.0

* Add guards to result sent to Einstein (#756)

* Add result guards to Einstein and PLP sendViewCategory Einstein

* Bump alpha version

* Update changelog

* 🚢 `2.3.0-alpha.2` (#800)

* [commerce-sdk-react] Add mutation hooks and refactor query hooks (#726)

* add mutation hook and refactor query hook

* lint

* fix eslint

* fix ts types

* fix ts type for usequery

* fix lint

* fix test

* lint

* add mutation example

* fix typo

* DRY useAuthenticated

* fix object.keys type

* use better name

* change mutation signature

* fix types

* rename mutations

* fix typos

* fix shopper login types

* fix test

* remove unused vars

* refactor mutation types

* allow useMutation to pass thru options

* remove comment

Co-authored-by: Alex Vuong <[email protected]>

* Dynamic footer Copyright date (#741)

* Update checkout-footer.jsx

* whitespace to bump CLA check

* Add translation and alternate footer changes (force push is to remove unsigned commits from git history)

* Shopper promotions hooks (#759)

* usePromotions and usePromotionsForCampaign hooks

* Footer copyright: remove the remaining hardcoded year (#760)

* Revert "Remove custom options for react query hoc (#755)" (#775)

This reverts commit 9e0f596.

* `<ImageGallery >` uses `image.link` when DIS is not set (#786)

* Fix global context pollution coming from nock (#785)

* Fix global context pollution coming from nock

* remove nock debug env var

* npm run lint:fix

* remove IDE-inserted import

* Use default locale as target if none is specified (#788)

* Use default locale as target if none is specified

* Update CHANGELOG.md

* [commerce-sdk-react] Multisite support (#769)

* add multisite support

* add test

* update comment

* pr feedback

* add locale

* add locale props to queries

* add cookie expire

* attempt to address test issues

* attempt to resolve test issue

* fix test

* fix test again

Co-authored-by: Brian Feister <[email protected]>

* ShopperOrders hooks & mutations (#766)

* Implement useOrder and usePaymentMethodsForOrder hooks

* Add useOrder shopper hook to test

* Add usePaymentMethods hook to test

* Added valid order # to test

* Updating demo

* Completed demo of useOrder and usePaymentMethods

* Added tests

* working on tests

* Fix tests

* remove custom mode

* record mock

* mock oauths/login endpoint

* added more tests

* Updating demos

* add mock response

* add mock response

* Implement hooks in test-commerce

* Began writing tests for mutation, implemented useTaxes hook, cleaned up test-commerce demo

* Passing parameters and body to mutate function

* Mutation test, tax hook, lint

* mocked response

* added removePaymentMethodForOrder hook test

* lint

* Remove mutation tests for now

* remove mutation mocks

* lint

* remove nock for mutation

* createOrder hook in test project

Co-authored-by: Alex Vuong <[email protected]>

* ShopperCustomer hooks and mutations (#762)

* `useCustomer` hook

* `useCustomerAddress` hook

* `useCustomerOrders` hook

* Solve merge conflicts

* Refactor `useCustomer` test page

* Add `useCustomerOrders` hook to test page

* Add `useCustomerBaskets` hook

* Add `useShopperCustomerProductList` hook

* Clean up

* Add ShopperCustomer mutations to test page

* Solve merge conflicts

* Wait to add test file until completed

* Add initial `useCustomer` tests

* add useRegisteredUser HOC

* clean up

* clean up

* Add query hooks tests

* Revert "Add use registered user HOC" (#783)

* Add mutation test

* Update query key structure & Invalidate cache onSuccess mutations

* lint

* Add `useQueryClient`

* Update mock responses

* Update usecustomer-returns-data.json

* PR Feedback

* Remove failing mutation test

* update mock responses

* try fix flaky test

* restore test-utils

* Solve merge conflict

Co-authored-by: Alex Vuong <[email protected]>

* [commerce-sdk-react] Implement shopper baskets hooks (#768)

* Implement queries for shopperBasket hooks

* Added UseShopperBasket page to test-commerce-sdk-react app

* Added unit tests for ShopperBasket Queries

* Added test integrations for ShopperBasket queries

* Added test integrations for shopperbasket queries

* wip

* set cache keys

* multiple refactors

* bug fixes

* lint

* revert unnecessary changes

* remove the bad test examples

* revert temp shopper customer changes

* fix test

Co-authored-by: Jainam Tushar Sheth <[email protected]>
Co-authored-by: Brian Feister <[email protected]>
Co-authored-by: Adam Raya <[email protected]>

* ApiClient config needs to  be updated when cid is changed (#790)

* Add Support policy to all SDKs (#764)

* add Support policy to all SDKs

* Additional default options for React Query (#791)

* Explore having react-query config be on user land

* PR feedback, and simplifying the default options

* Revert to making this option applied server side only

* Fix `useServerContext` returning `isServerSide=false` when on server. (#782)

* Revert contraint on prepass JSX

* PR feedback

* Nock: clean up the list of mocks after each test (#792)

* Update `instanceUrl` on `retail-react-app-demo` preset (#799)

* Update changelog files

* Bump alpha version

* Upgrade minimatch (#793)

* remove minimatch from sdk and update version in pwa-kit-dev

* update lock files

* update lock files

* add more tests

* add comment

* lint

* revert packge-lock file changes

* update pwa-kit-dev package-lock.json

* fix lockfile again

Co-authored-by: Kevin He <[email protected]>
Co-authored-by: Alex Vuong <[email protected]>
Co-authored-by: Brian Feister <[email protected]>
Co-authored-by: Alex Vuong <[email protected]>
Co-authored-by: Vincent Marta <[email protected]>
Co-authored-by: Charles Lavery <[email protected]>
Co-authored-by: Ben Chypak <[email protected]>
Co-authored-by: yunakim714 <[email protected]>
Co-authored-by: Jainam Tushar Sheth <[email protected]>

* 🚢 Version 2.3.0 (#802)

* Version 2.3.0

* Update changelog files

* Begin development on 2.4.0

Co-authored-by: Kevin He <[email protected]>
Co-authored-by: Alex Vuong <[email protected]>
Co-authored-by: Brian Feister <[email protected]>
Co-authored-by: Alex Vuong <[email protected]>
Co-authored-by: Vincent Marta <[email protected]>
Co-authored-by: Charles Lavery <[email protected]>
Co-authored-by: Ben Chypak <[email protected]>
Co-authored-by: yunakim714 <[email protected]>
Co-authored-by: Jainam Tushar Sheth <[email protected]>
  • Loading branch information
10 people authored Oct 27, 2022
1 parent 5f537e2 commit a19e1fa
Show file tree
Hide file tree
Showing 31 changed files with 83 additions and 61 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
"packages/*"
],
"version": "2.3.0-dev",
"version": "2.4.0-dev",
"publish": {
"allowBranch": [
"master"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pwa-kit",
"version": "2.3.0-dev",
"version": "2.4.0-dev",
"engines": {
"node": "^14.0.0",
"npm": "^6.14.4 || ^7.0.0 || ^8.0.0"
Expand All @@ -23,4 +23,4 @@
"format": "lerna run --parallel --stream format",
"bump-version": "node ./scripts/bump-version.js"
}
}
}
3 changes: 1 addition & 2 deletions packages/commerce-sdk-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
## v2.3.0-dev (Aug 25, 2022)
## v2.2.0 (Aug 25, 2022)
## v2.4.0-dev (Oct 27, 2022)
2 changes: 1 addition & 1 deletion packages/commerce-sdk-react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/commerce-sdk-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "commerce-sdk-react",
"version": "2.3.0-dev",
"version": "2.4.0-dev",
"description": "A library that provides react hooks for fetching data from Commerce Cloud",
"author": "[email protected]",
"license": "See license in LICENSE",
Expand Down Expand Up @@ -52,7 +52,7 @@
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"cross-env": "^5.2.0",
"internal-lib-build": "^2.3.0-dev",
"internal-lib-build": "^2.4.0-dev",
"jsonwebtoken": "^8.5.1",
"nock": "^13.2.9",
"react": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/internal-lib-build/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/internal-lib-build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "internal-lib-build",
"version": "2.3.0-dev",
"version": "2.4.0-dev",
"engines": {
"node": "^14.0.0",
"npm": "^6.14.4 || ^7.0.0 || ^8.0.0"
Expand Down
5 changes: 4 additions & 1 deletion packages/pwa-kit-create-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## v2.3.0-dev (Aug 25, 2022)
## v2.3.0 (Oct 27, 2022)
- Fix generated projects missing required fields in the `manifest.json` file. [#729](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/729)
- Update ODS instance URL for the `retail-react-app-demo` preset. [#799](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/799)

## v2.2.0 (Aug 25, 2022)

## v2.1.0 (Jul 05, 2022)
Expand Down
2 changes: 1 addition & 1 deletion packages/pwa-kit-create-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/pwa-kit-create-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pwa-kit-create-app",
"version": "2.3.0-dev",
"version": "2.4.0-dev",
"description": "Salesforce's project generator tool",
"author": "[email protected]",
"license": "See license in LICENSE",
Expand Down Expand Up @@ -40,7 +40,7 @@
"tar": "^6.1.11"
},
"devDependencies": {
"internal-lib-build": "^2.3.0-dev",
"internal-lib-build": "^2.4.0-dev",
"verdaccio": "^5.9.0"
}
}
4 changes: 3 additions & 1 deletion packages/pwa-kit-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## v2.3.0-dev (Aug 25, 2022)
## v2.4.0-dev (Oct 27, 2022)
## v2.3.0 (Oct 27, 2022)
- Minimize "Module not found" error during webpack rebuild, whenever a package dependency is being updated/built [#722](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/722)
- Update minimatch [#793](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/793)

## v2.2.0 (Aug 25, 2022)
- Added option to specify where/from the credentials can be saved/read [#647](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/647)
Expand Down
2 changes: 1 addition & 1 deletion packages/pwa-kit-dev/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/pwa-kit-dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pwa-kit-dev",
"version": "2.3.0-dev",
"version": "2.4.0-dev",
"description": "Build tools for pwa-kit",
"repository": {
"type": "git",
Expand Down Expand Up @@ -89,7 +89,7 @@
"morgan": "1.9.1",
"open": "^8.4.0",
"prettier": "^1.18.2",
"pwa-kit-runtime": "^2.3.0-dev",
"pwa-kit-runtime": "^2.4.0-dev",
"react-refresh": "^0.13.0",
"replace-in-file": "^6.2.0",
"request": "^2.88.0",
Expand All @@ -109,7 +109,7 @@
},
"devDependencies": {
"@loadable/component": "^5.15.0",
"internal-lib-build": "^2.3.0-dev",
"internal-lib-build": "^2.4.0-dev",
"nock": "^13.1.1",
"superagent": "^6.1.0",
"supertest": "^4.0.2"
Expand Down
11 changes: 9 additions & 2 deletions packages/pwa-kit-react-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
## v2.3.0-dev (Aug 25, 2022)
## v2.4.0-dev (Oct 27, 2022)
## v2.3.0 (Oct 27, 2022)
- Support `react-query` server-side data fetching. [#724](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/724)
- Add server-safe default configuration for `queryClientConfig` option.. [#734](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/734)
- Add server-safe default configuration for `queryClientConfig` option. [#734](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/734)
- Add `useServerContext` hook with the `res` response object and the `isServerSide` flag. [#737](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/737)
- Handle `react-query` server-side errors. [#735](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/735)
- Fix internal build script. [#706](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/706)
- Add Correlation ID to SCAPI requests. [#728](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/728)

## v2.2.0 (Aug 25, 2022)

## v2.1.0 (Jul 05, 2022)
- Remove console logs from route component. [#651](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/651)

Expand Down
2 changes: 1 addition & 1 deletion packages/pwa-kit-react-sdk/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/pwa-kit-react-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pwa-kit-react-sdk",
"version": "2.3.0-dev",
"version": "2.4.0-dev",
"description": "A library that supports the isomorphic React rendering pipeline for Commerce Cloud Managed Runtime apps",
"engines": {
"node": "^14.0.0",
Expand Down Expand Up @@ -50,7 +50,7 @@
"hoist-non-react-statics": "^3.3.1",
"mkdirp": "^1.0.4",
"prop-types": "^15.6.0",
"pwa-kit-runtime": "^2.3.0-dev",
"pwa-kit-runtime": "^2.4.0-dev",
"react-ssr-prepass": "^1.5.0",
"react-uid": "^2.2.0",
"serialize-javascript": "^6.0.0",
Expand All @@ -63,7 +63,7 @@
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.6",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "1.15.2",
"internal-lib-build": "^2.3.0-dev",
"internal-lib-build": "^2.4.0-dev",
"node-html-parser": "^3.3.4",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
5 changes: 4 additions & 1 deletion packages/pwa-kit-runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## v2.3.0-dev (Aug 25, 2022)
## v2.4.0-dev (Oct 27, 2022)
## v2.3.0 (Oct 27, 2022)
- Performance: Skip retries when flushing CloudWatch metrics, prioritize returning a response instead. [720](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/720)
- Add Correlation ID to SCAPI requests. [#728](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/728)

## v2.2.0 (Aug 25, 2022)
## v2.1.0 (Jul 05, 2022)

Expand Down
2 changes: 1 addition & 1 deletion packages/pwa-kit-runtime/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/pwa-kit-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pwa-kit-runtime",
"version": "2.3.0-dev",
"version": "2.4.0-dev",
"description": "The PWAKit Runtime",
"repository": {
"type": "git",
Expand Down Expand Up @@ -51,7 +51,7 @@
"@serverless/event-mocks": "^1.1.1",
"aws-lambda-mock-context": "^3.2.1",
"fs-extra": "^10.1.0",
"internal-lib-build": "^2.3.0-dev",
"internal-lib-build": "^2.4.0-dev",
"nock": "^13.1.1",
"node-fetch": "^2.6.7",
"s3rver": "^3.1.0",
Expand All @@ -61,7 +61,7 @@
"watch": "1.0.1"
},
"peerDependencies": {
"pwa-kit-dev": "^2.3.0-dev"
"pwa-kit-dev": "^2.4.0-dev"
},
"peerDependenciesMeta": {
"pwa-kit-dev": {
Expand All @@ -75,4 +75,4 @@
"publishConfig": {
"directory": "dist"
}
}
}
2 changes: 1 addition & 1 deletion packages/template-express-minimal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/template-express-minimal/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "template-express-minimal",
"version": "2.3.0-dev",
"version": "2.4.0-dev",
"license": "See license in LICENSE",
"private": true,
"devDependencies": {
"pwa-kit-dev": "^2.3.0-dev",
"pwa-kit-runtime": "^2.3.0-dev",
"pwa-kit-dev": "^2.4.0-dev",
"pwa-kit-runtime": "^2.4.0-dev",
"supertest": "^4.0.2"
},
"scripts": {
Expand Down
10 changes: 9 additions & 1 deletion packages/template-retail-react-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## v2.3.0-dev (Aug 25, 2022)
## v2.3.0 (Oct 27, 2022)
- Fix locale `alias` by including `locale` object inside the MultiSite Context. [#716](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/716)
- Updated translations. [#725](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/725)
- Add new Einstein API activities. [#714](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/714)
- Fix search field to recognize `“&”` character. [#736](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/736)
- Fix filters on search results page. [#742](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/742)
- Dynamic footer copyright date. [#741](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/741)
- Bugfix: image gallery thumbnails not working without DIS [#786](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/786)
- Ensure that a valid target locale is use if none is provided [#788](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/788)

## v2.2.0 (Aug 25, 2022)
- Update zzrf-001 url [#694](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/694)
- Optimize Server-side performance [#667](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/667)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class EinsteinAPI {
const endpoint = `/activities/${this.config.siteId}/viewSearch`
const method = 'POST'

const products = searchResults.hits.map((product) => {
const products = searchResults?.hits?.map((product) => {
const {productId, sku = '', altId = '', altIdType = ''} = product
return {
id: productId,
Expand Down Expand Up @@ -149,7 +149,7 @@ class EinsteinAPI {
const endpoint = `/activities/${this.config.siteId}/viewCategory`
const method = 'POST'

const products = searchResults.hits.map((product) => {
const products = searchResults?.hits?.map((product) => {
const {productId, sku = '', altId = '', altIdType = ''} = product
return {
id: productId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ const ProductList = (props) => {

/**************** Einstein ****************/
useEffect(() => {
if (searchQuery) {
einstein.sendViewSearch(searchQuery, productSearchResult)
} else {
einstein.sendViewCategory(category, productSearchResult)
if (productSearchResult) {
searchQuery
? einstein.sendViewSearch(searchQuery, productSearchResult)
: einstein.sendViewCategory(category, productSearchResult)
}
}, [productSearchResult])

Expand Down
2 changes: 1 addition & 1 deletion packages/template-retail-react-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/template-retail-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "retail-react-app",
"version": "2.3.0-dev",
"version": "2.4.0-dev",
"license": "See license in LICENSE",
"private": true,
"engines": {
Expand Down Expand Up @@ -43,9 +43,9 @@
"njwt": "^1.2.0",
"node-fetch": "^2.6.7",
"prop-types": "^15.6.0",
"pwa-kit-dev": "^2.3.0-dev",
"pwa-kit-react-sdk": "^2.3.0-dev",
"pwa-kit-runtime": "^2.3.0-dev",
"pwa-kit-dev": "^2.4.0-dev",
"pwa-kit-react-sdk": "^2.4.0-dev",
"pwa-kit-runtime": "^2.4.0-dev",
"query-string": "^7.0.1",
"raf": "^3.4.0",
"randomstring": "^1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/template-typescript-minimal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/template-typescript-minimal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript-minimal",
"version": "2.3.0-dev",
"version": "2.4.0-dev",
"engines": {
"node": "^14.0.0",
"npm": "^6.14.4 || ^7.0.0 || ^8.0.0"
Expand All @@ -13,9 +13,9 @@
"@types/react-dom": "^17.0.2",
"cross-env": "^5.2.0",
"cross-fetch": "^3.1.5",
"pwa-kit-dev": "^2.3.0-dev",
"pwa-kit-react-sdk": "^2.3.0-dev",
"pwa-kit-runtime": "^2.3.0-dev",
"pwa-kit-dev": "^2.4.0-dev",
"pwa-kit-react-sdk": "^2.4.0-dev",
"pwa-kit-runtime": "^2.4.0-dev",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-helmet": "^6.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/test-commerce-sdk-react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a19e1fa

Please sign in to comment.