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

fix: remove device-context and detect-device-type #1168

Merged
merged 4 commits into from
May 5, 2023

Conversation

joeluong-sfcc
Copy link
Collaborator

@joeluong-sfcc joeluong-sfcc commented May 3, 2023

Description

With the deprecation of the user agent, device type will no longer be able to be determined using the UA string. This PR removes code that uses the client device type from the user agent string.

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • removal of packages/pwa-kit-react-sdk/src/ssr/universal/device-context.js and corresponding references to this file
  • removal of packages/pwa-kit-runtime/src/utils/ssr-server/detect-device-type.js and corresponding references to this file
  • removal of the ua-parser-js dependency in packages/pwa-kit-runtime as it is no longer being used

How to Test-Drive This PR

  • npm run test at the root level

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@joeluong-sfcc joeluong-sfcc marked this pull request as ready for review May 3, 2023 19:56
@joeluong-sfcc joeluong-sfcc requested a review from a team as a code owner May 3, 2023 19:56
kevinxh
kevinxh previously approved these changes May 3, 2023
Copy link
Collaborator

@kevinxh kevinxh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change! Do you wanna update the CHANGELOG so we don't forget about it in comms?

@joeluong-sfcc joeluong-sfcc merged commit 9e4f23d into v3 May 5, 2023
bfeister added a commit that referenced this pull request May 9, 2023
* v3:
  fix: remove device-context and detect-device-type (#1168)
  Dependency updates (#1170)
  [Snyk] Security upgrade cosmiconfig from 7.1.0 to 8.0.0 (#1145)
  [V3] Remove `cross-fetch` from `template-retail-react-app` (#1160)
  [v3] Add suffix to ssr build files (#1158)
  Consume new version of the commerce-sdk-isomorphic to enable Phased Launches support HTTP Basic Auth (#1153)

# Conflicts:
#	packages/commerce-sdk-react/package-lock.json
#	packages/internal-lib-build/package-lock.json
#	packages/pwa-kit-runtime/package-lock.json
#	packages/template-retail-react-app/package-lock.json
bfeister added a commit that referenced this pull request May 9, 2023
…xtensibility-algo-refactor + regen lockfiles

* feature/template-extensibility:
  regen package lockfiles
  fix: remove device-context and detect-device-type (#1168)
  Dependency updates (#1170)
  [Snyk] Security upgrade cosmiconfig from 7.1.0 to 8.0.0 (#1145)
  [V3] Remove `cross-fetch` from `template-retail-react-app` (#1160)
  [v3] Add suffix to ssr build files (#1158)
  Consume new version of the commerce-sdk-isomorphic to enable Phased Launches support HTTP Basic Auth (#1153)

# Conflicts:
#	package-lock.json
#	packages/commerce-sdk-react/package-lock.json
#	packages/internal-lib-build/package-lock.json
#	packages/my-extended-retail-app/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-retail-react-app/app/hooks/use-einstein.test.js
#	packages/template-retail-react-app/package-lock.json
#	packages/template-typescript-minimal/package-lock.json
#	packages/test-commerce-sdk-react/package-lock.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants