Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWA Kit 2.7.1-alpha.0 release #1181

Merged
merged 44 commits into from
May 11, 2023
Merged

PWA Kit 2.7.1-alpha.0 release #1181

merged 44 commits into from
May 11, 2023

Conversation

vcua-mobify
Copy link
Contributor

@vcua-mobify vcua-mobify commented May 9, 2023

This PR contains the prep work going into the PWA Kit 2.7.1 release

The rough changelist for v2.7.1 are:

bendvc and others added 30 commits March 3, 2023 17:00
* Starting release process for 2.7.0

* Update Create MRT credentials file (#1025)

* Release 2.7: fix order of hooks (#1027)

* Return early only after all of the hooks are called

* Bumper version

---------

Co-authored-by: Ben Chypak <bchypak@salesforce.com>

* Quick fix for einstein data (#1028)

* Quick fix for einstein data

* Bump Version

* Re-lock package-lock files with npm 8

* Update package-lock.json

* Update einstein.js

* Regenerate lock files (#1030)

* Regenerate lock files

* Bump version to 2.7.0-alpha.3

* Bump to 2.7.0 (#1032)

* Begin development on 2.8.0

---------

Co-authored-by: Adam Raya <adamraya@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
…oard on mobile devices - W-9871940 (#1016)

Co-authored-by: Ben Chypak <bchypak@mobify.com>
Co-authored-by: Richard Sexton <rsexton404@users.noreply.github.com>
* Remove unused util.

* Allow query hook parameters to be `null`.
* Fix addresses not having preferred address first.

* Include all addresses, not just preferred address twice.

* Correctly include preferred address.
* Update merge logic

* Update CHANGELOG.md

* Lint

* PR feedback

* Rename isNewlyRegisters to isNew for simplicity

* Lint
…torage (#1052)

* add test

* decode jwt data

* lint

* Update packages/commerce-sdk-react/src/auth/index.ts

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>

* rename parseSlasJWT

* Update packages/commerce-sdk-react/src/auth/index.test.ts

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>

* convert all .thens to await

* make fake token in tests more clear

* lint

---------

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>
* prevent modal to open when it fails to add an item to cart

* Update comment

---------

Co-authored-by: Alex Vuong <alex.vuong@salesforce.com>
* Initial Commit

* Update CHANGELOG.md

* Revert some testing code

* Get test coverage back up

* Test build directory folder before proceeding.
* fix(template-retail-react-app): product-list refinements

+ Ensure that the `selectedFilters` provided to the `Refinements` value components is always an array. And update said value components (checkbox, color, radio & size) to handle always receiving an array.
+ Apply some loose equality checks, catering for cases where a refinement URL param is parsed as a number but the refinement `.value` is a stringified number.
+ Fix bug where non-multiple filters could not be unchecked by selecting themselves (e.g. clicking an already checked checkbox).
+ Fix bug where a refinement URL param is parsed as a number, but was handled as a string (with `.split()`).
+ Fix bug where radio refinements would still appear as checked after clearing the value via `SelectedRefinements`.
+ Deprecate unused proptypes in `SizeRefinements`

* feat(retail-react-app): update `CheckboxRefinements`

+ Adjust the `onChange` logic so that multiple checkbox refinements can be selected

---------

Co-authored-by: Ben Chypak <bchypak@mobify.com>
* add docs for experience scope

* Add `merge_group` event to trigger GA builds

---------

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>
…1070)

* Refactor Shopper Basket cache following new pattern

* Fix types

* Update packages/commerce-sdk-react/src/hooks/ShopperBaskets/cache.ts

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>

* PR Feedback

* Clean up unused utils and types after refactor

* Add missing response basketId to queryKey

* Implement cache for the remaining mutations

* Tests WIP

* PR Feedback & Use query key path in `deleteBasket` cache

* Add tests for mutations returning void response

* PR Feedback

* Remove unused `and` hooks util

* Revert "Remove unused `and` hooks util"

This reverts commit c0a364a.

---------

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>
* Fix Shopper Basket empty response test cases

* lint
…974)

* feat(pwa-kit-dev): minor performance improvements and added comments

* docs(pwa-kit-dev): clean up comments

* refactor(pwa-kit-dev): update condition from PR feedback

---------

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>
* Remove internal packages to bypass lerna nonsense.

Include output.json to make restoring deps easier.

* Disable build scripts to make changing deps easier.

* Update root deps.

* Fix typescript issue.

* Create restore script to restore internal deps/scripts.

* Update commerce-sdk-react deps.

* Update test-commerce-sdk-react deps.

* Update template-typescript-minimal deps

* Improve restore script.

* Fix trailing comma.

* Update template-retail-react-app deps

* npm prune everything

* Update pwa-kit-runtime deps

* Update pwa-kit-react-sdk deps

* Update pwa-kit-create-app deps

* Update pwa-kit-dev deps (except eslint)

* Update pwa-kit-dev eslint deps

* Update internal-lib-build deps (except eslint)

* Update pwa-kit eslint deps

* Restore internal deps.

* Restore build scripts.

* Remove temporary helper files.

* Bump ua-parser-js to avoid vulnerable version.

* Anchor cross-env common dep to version used by internal-lib-build.

* Re-enable eslint.
…rs) (#1073)

* Initial commit

* Update packages/commerce-sdk-react/src/hooks/useAuthHelper.ts

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>

* Update packages/commerce-sdk-react/src/hooks/ShopperOrders/cache.ts

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>

* Update packages/commerce-sdk-react/src/hooks/ShopperOrders/cache.ts

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>

* Added root to all query keys, use remove over clear

* Remove previous impemented "clear" from utils

* Initial tests for shoppercontexts

* Update ShopperLogin tests

* Fix order tests

* Update packages/commerce-sdk-react/src/hooks/ShopperContexts/cache.ts

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>

* Update cache.ts

* Lint!

* Update Json.tsx

* Lint!

* Testing race condition in tests

* Re-add tests in other order.

* Update CHANGELOG.md

* Add todo to complete context cache work

* Update packages/commerce-sdk-react/src/hooks/ShopperBaskets/mutation.test.ts

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>

* Update packages/commerce-sdk-react/src/components/ShopperExperience/Page/index.tsx

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>

* Update useAuthHelper.ts

* Update packages/commerce-sdk-react/src/hooks/ShopperCustomers/cache.ts

Co-authored-by: Adam Raya <adamraya@users.noreply.github.com>

---------

Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>
Co-authored-by: Adam Raya <adamraya@users.noreply.github.com>
…1065)

* remove site alias and locale from location.state.directedFrom path

* moving call to removeSiteLocaleFromPath into use-navigation hook

* fixing failing test, added tests for removeSiteLocaleFromPath

* per code review, skipping failed test instead of using mocking
* Fix PD ImageWithText Link component by using Chakra UI Link

* Use isAbsoluteURL to use react-router Link or Chakra Link component

* PR Feedback

* Clean up

* Update packages/template-retail-react-app/app/page-designer/assets/image-with-text/index.jsx

Co-authored-by: Ben Chypak <bchypak@mobify.com>

* Remove temporal page-viewer page to facilitate review

---------

Co-authored-by: Ben Chypak <bchypak@mobify.com>
* Added session bridge call to login for phased launch

* Fix code smell for session-bridge in hybrid
* Fix multi-value query params being lost

* Update CHANGELOG.md
* Dependency updates

* Update runtime package lock

* Bump cosmiconfig version to latest
…en when a SFRA login state is changed (#1171)

* Implement mechanism to store refresh token copy and compare with sfra

* Update tests and mocks for util function to check SFRA login state

* Fix linting issues

* FIx param types for util functionn

* Rename old isTokenValid to isTokenExpired

* Remove expiry for refresh_token in localstorage

* Update packages/template-retail-react-app/app/commerce-api/utils.js

Co-authored-by: Kevin He <kevin.he@salesforce.com>

* fix test

* Fix linting on use-auth-modal.test.js

* Update hasSFRAStateChanged logic to compare keys and values

* Fix linting

---------

Co-authored-by: Kevin He <kevin.he@salesforce.com>
…1172)

* Add a redirect to login page after user signs out from checkout page

* Update CHANGELOG.md

* Remove history since navigate handles similarly
@vcua-mobify vcua-mobify requested a review from a team as a code owner May 9, 2023 18:23
@kevinxh
Copy link
Collaborator

kevinxh commented May 9, 2023

It would be nice to see a compiled list of changes! For QA and communication purposes

@vcua-mobify
Copy link
Contributor Author

The changelist for v2.7.1 are:

package-lock.json Outdated Show resolved Hide resolved
vcua-mobify and others added 7 commits May 9, 2023 17:54
* re-generate lock files and fix test

* Update packages/commerce-sdk-react/src/hooks/ShopperBaskets/index.test.ts

* Rebuild lockfiles using node 14 npm 8

* Revert "Rebuild lockfiles using node 14 npm 8"

This reverts commit 3d5c0cb.

* Use pwa-kit-dev for lint and format

* Revert "Use pwa-kit-dev for lint and format"

This reverts commit f46d83e.

* Add typescript to internal-lib-build and rebuild lock files

---------

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: vcua-mobify <vcua@salesforce.com>
* Move typescript to dev and peer dependency

* Update package lock file
@vcua-mobify vcua-mobify merged commit 46f56d8 into release-2.7.x May 11, 2023
21 checks passed
@vcua-mobify vcua-mobify changed the title [WIP] PWA Kit 2.7.1 release PWA Kit 2.7.1-alpha.0 release May 11, 2023
bfeister added a commit that referenced this pull request May 23, 2023
* develop: (37 commits)
  [Phased Launch] Call Session bridge after login (#1220)
  [v3] Add multi-site suffix to auth token keys (#1208)
  Footer: fix hydration error with the locale dropdown (#1210)
  remove unused peerDependency @chakra-ui/system (#1212)
  @W-12582733: Expose env vars endpoint for E2E smoke tests (#1207)
  Upgrade to React 18 (#1166)
  Remove v3 branch name related actions (#1206)
  add test to reach test coverage threshold
  remove commerce-api folder
  Feature: Extract einstein RefArch-specific values to constant (#1200)
  Bump version number to 2.7.1 and update changelogs (#1197)
  store usid in cookies (#1193)
  make sure static files are copied on dev environment (#1196)
  [WIP] PWA Kit 2.7.1 release (#1181)
  [V2] Internal lib build typescript dev dependency (#1194)
  [V2] Re-generate lock files and fix hook lib tests (#1186)
  [v3] Add Convenience Components (#1183)
  Update commerce-sdk-react README (#1176)
  Add additional properties to ShopperLogin test types (#1185)
  Fix missing commerce-sdk-react logout call (#1180)
  ...

# Conflicts:
#	package-lock.json
#	packages/commerce-sdk-react/CHANGELOG.md
#	packages/commerce-sdk-react/package-lock.json
#	packages/internal-lib-build/package-lock.json
#	packages/pwa-kit-create-app/package-lock.json
#	packages/pwa-kit-dev/package-lock.json
#	packages/pwa-kit-react-sdk/package-lock.json
#	packages/pwa-kit-runtime/package-lock.json
#	packages/template-mrt-reference-app/package-lock.json
#	packages/template-retail-react-app/package-lock.json
#	packages/template-typescript-minimal/package-lock.json
#	packages/test-commerce-sdk-react/package-lock.json
bfeister added a commit that referenced this pull request May 23, 2023
* develop: (34 commits)
  [Phased Launch] Call Session bridge after login (#1220)
  [v3] Add multi-site suffix to auth token keys (#1208)
  Footer: fix hydration error with the locale dropdown (#1210)
  remove unused peerDependency @chakra-ui/system (#1212)
  @W-12582733: Expose env vars endpoint for E2E smoke tests (#1207)
  Upgrade to React 18 (#1166)
  Remove v3 branch name related actions (#1206)
  add test to reach test coverage threshold
  remove commerce-api folder
  Feature: Extract einstein RefArch-specific values to constant (#1200)
  Bump version number to 2.7.1 and update changelogs (#1197)
  store usid in cookies (#1193)
  make sure static files are copied on dev environment (#1196)
  [WIP] PWA Kit 2.7.1 release (#1181)
  [V2] Internal lib build typescript dev dependency (#1194)
  [V2] Re-generate lock files and fix hook lib tests (#1186)
  Add additional properties to ShopperLogin test types (#1185)
  Revert 2.7.0 branch to prep for 2.7.1 changes (#1182)
  #1174 Replace invalid value for wrap property (#1179)
  Add a redirect to login page after user signs out from checkout page (#1172)
  ...

# Conflicts:
#	package-lock.json
#	packages/commerce-sdk-react/CHANGELOG.md
#	packages/commerce-sdk-react/package-lock.json
#	packages/internal-lib-build/package-lock.json
#	packages/pwa-kit-create-app/package-lock.json
#	packages/pwa-kit-dev/package-lock.json
#	packages/pwa-kit-dev/package.json
#	packages/pwa-kit-react-sdk/package-lock.json
#	packages/pwa-kit-runtime/package-lock.json
#	packages/template-mrt-reference-app/package-lock.json
#	packages/template-retail-react-app/app/components/confirmation-modal/index.test.js
#	packages/template-retail-react-app/app/components/footer/index.jsx
#	packages/template-retail-react-app/app/components/header/index.jsx
#	packages/template-retail-react-app/app/components/list-menu/index.test.js
#	packages/template-retail-react-app/app/components/product-scroller/index.test.js
#	packages/template-retail-react-app/app/components/product-view-modal/index.test.js
#	packages/template-retail-react-app/app/components/search/index.test.js
#	packages/template-retail-react-app/app/hoc/with-registration/index.test.js
#	packages/template-retail-react-app/app/hooks/use-add-to-cart-modal.js
#	packages/template-retail-react-app/app/hooks/use-auth-modal.test.js
#	packages/template-retail-react-app/app/hooks/use-currency.test.js
#	packages/template-retail-react-app/app/hooks/use-multi-site.test.js
#	packages/template-retail-react-app/app/hooks/use-navigation.test.js
#	packages/template-retail-react-app/app/pages/account/addresses.test.js
#	packages/template-retail-react-app/app/pages/account/index.jsx
#	packages/template-retail-react-app/app/pages/account/wishlist/partials/wishlist-primary-action.test.js
#	packages/template-retail-react-app/app/pages/cart/index.test.js
#	packages/template-retail-react-app/app/pages/cart/partials/cart-secondary-button-group.test.js
#	packages/template-retail-react-app/app/pages/checkout/index.test.js
#	packages/template-retail-react-app/app/pages/checkout/partials/contact-info.jsx
#	packages/template-retail-react-app/app/pages/checkout/partials/contact-info.test.js
#	packages/template-retail-react-app/app/pages/home/index.test.js
#	packages/template-retail-react-app/app/pages/product-list/partials/empty-results.jsx
#	packages/template-retail-react-app/app/pages/product-list/partials/page-header.jsx
#	packages/template-retail-react-app/app/pages/registration/index.test.jsx
#	packages/template-retail-react-app/app/utils/site-utils.js
#	packages/template-retail-react-app/package-lock.json
#	packages/template-typescript-minimal/package-lock.json
#	packages/test-commerce-sdk-react/package-lock.json
bfeister added a commit that referenced this pull request May 24, 2023
…react-app

* feature/template-extensibility: (38 commits)
  support windows file paths
  Feature/template extensibility (#1162)
  lockfiles from reaact18 / chakra2
  remove demo extensible app in light of soon-to-be-merged PR from @bendvc
  [Phased Launch] Call Session bridge after login (#1220)
  [v3] Add multi-site suffix to auth token keys (#1208)
  Footer: fix hydration error with the locale dropdown (#1210)
  remove unused peerDependency @chakra-ui/system (#1212)
  @W-12582733: Expose env vars endpoint for E2E smoke tests (#1207)
  Upgrade to React 18 (#1166)
  Remove v3 branch name related actions (#1206)
  add test to reach test coverage threshold
  remove commerce-api folder
  Feature: Extract einstein RefArch-specific values to constant (#1200)
  Bump version number to 2.7.1 and update changelogs (#1197)
  store usid in cookies (#1193)
  make sure static files are copied on dev environment (#1196)
  [WIP] PWA Kit 2.7.1 release (#1181)
  [V2] Internal lib build typescript dev dependency (#1194)
  [V2] Re-generate lock files and fix hook lib tests (#1186)
  ...

# Conflicts:
#	packages/my-extended-retail-app/config/default.js
#	packages/my-extended-retail-app/config/sites.js
#	packages/my-extended-retail-app/package-lock.json
#	packages/my-extended-retail-app/package.json
#	packages/my-extended-retail-app/pwa-kit-overrides/app/assets/svg/brand-logo.svg
#	packages/my-extended-retail-app/pwa-kit-overrides/app/components/_app-config/index.jsx
#	packages/my-extended-retail-app/pwa-kit-overrides/app/components/_app/index.jsx
#	packages/my-extended-retail-app/pwa-kit-overrides/app/pages/home/index.jsx
#	packages/my-extended-retail-app/pwa-kit-overrides/app/routes.jsx
#	packages/my-extended-retail-app/pwa-kit-overrides/app/ssr.js
#	packages/my-extended-retail-app/pwa-kit-overrides/app/static/ico/favicon.ico
#	packages/my-extended-retail-app/pwa-kit-overrides/app/static/img/global/app-icon-192.png
#	packages/my-extended-retail-app/pwa-kit-overrides/app/static/img/global/app-icon-512.png
#	packages/my-extended-retail-app/pwa-kit-overrides/app/static/img/global/apple-touch-icon.png
#	packages/pwa-kit-dev/bin/pwa-kit-dev.js
#	packages/pwa-kit-dev/package-lock.json
#	packages/pwa-kit-dev/package.json
#	packages/pwa-kit-dev/src/configs/webpack/config.js
#	packages/template-retail-react-app/app/components/confirmation-modal/index.test.js
#	packages/template-retail-react-app/app/components/footer/index.jsx
#	packages/template-retail-react-app/app/components/header/index.jsx
#	packages/template-retail-react-app/app/components/list-menu/index.test.js
#	packages/template-retail-react-app/app/components/product-scroller/index.test.js
#	packages/template-retail-react-app/app/components/product-view-modal/index.test.js
#	packages/template-retail-react-app/app/components/search/index.test.js
#	packages/template-retail-react-app/app/hoc/with-registration/index.test.js
#	packages/template-retail-react-app/app/hooks/use-add-to-cart-modal.js
#	packages/template-retail-react-app/app/hooks/use-auth-modal.test.js
#	packages/template-retail-react-app/app/hooks/use-currency.test.js
#	packages/template-retail-react-app/app/hooks/use-multi-site.test.js
#	packages/template-retail-react-app/app/hooks/use-navigation.test.js
#	packages/template-retail-react-app/app/pages/account/addresses.test.js
#	packages/template-retail-react-app/app/pages/account/index.jsx
#	packages/template-retail-react-app/app/pages/account/wishlist/index.test.js
#	packages/template-retail-react-app/app/pages/account/wishlist/partials/wishlist-primary-action.test.js
#	packages/template-retail-react-app/app/pages/cart/index.test.js
#	packages/template-retail-react-app/app/pages/cart/partials/cart-secondary-button-group.test.js
#	packages/template-retail-react-app/app/pages/checkout/index.test.js
#	packages/template-retail-react-app/app/pages/checkout/partials/contact-info.jsx
#	packages/template-retail-react-app/app/pages/checkout/partials/contact-info.test.js
#	packages/template-retail-react-app/app/pages/home/index.test.js
#	packages/template-retail-react-app/app/pages/product-list/partials/empty-results.jsx
#	packages/template-retail-react-app/app/pages/product-list/partials/page-header.jsx
#	packages/template-retail-react-app/app/pages/registration/index.test.jsx
#	packages/template-retail-react-app/app/utils/site-utils.js
#	packages/template-retail-react-app/package-lock.json
#	packages/template-retail-react-app/package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet