Skip to content

Route serialization to support Shopper SEO URL mapping integration#2300

Merged
hajinsuha1 merged 172 commits intofeature/extensibility-v2from
route-serialization-to-support-shopper-seo-integration
Apr 11, 2025
Merged

Route serialization to support Shopper SEO URL mapping integration#2300
hajinsuha1 merged 172 commits intofeature/extensibility-v2from
route-serialization-to-support-shopper-seo-integration

Conversation

@hajinsuha1
Copy link
Collaborator

@hajinsuha1 hajinsuha1 commented Mar 5, 2025

Description

Implemented dynamic routes by introducing a RoutesContext/RoutesProvider to the Switch component.
Additionally implemented serialization of routes from server to client when getRoutesAsync is implemented.

jLN1Rjim3BthAuZkaWHeUizXQ59aHO6r0veTTXXGg1QJQ90fJvARTLy_MOwrk5Kj64LriMJpKUHx97rf7JUkBXMh_5CMikBauEnAIIJtaoQFHXyicekIIvh_ijCpu1RQhtt41iqJ6e-mONDXa1Vkt209D99s4TlQzR7hFmx9Iat18fxwHikgKhBWpd-85h3Y5dqutDe0JTamnjfuuVppyVO5tEFl6grZR6TqNS6dhtAtTojL

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

  • update Switch component to load routes from RoutesProvider and RoutesContext
  • Server: update react-rendering.js to serialize extensions that have getRoutesAsync implemented and save it under window.__EXTENSIONS__ global variable
  • update ApplicationExtension to:
    • cache results from getRoutesAsync to _cachedRoutes property
    • deserialize routes from window.__EXTENSIONS__ when on the client and save it under _cachedRoutes

How to Test-Drive This PR

  • First of all, temporarily bring back the changes to extension-url-mapping, typescript-minimal, and debug logs by reverting the commit 26a60d6
    git revert 26a60d644671b387736d3554d9a8a6af29d1b888
    
  • npm ci at the monorepo root
  • Then cd to the typescript-minimal directory and run npm start (OR npm run start:inspect to see the server logs more easily)
  • cd into the template-typescript-minimal and start the server npm start
  • verify http://localhost:3000/__pwa-kit/getting-started displays the SamplePage component (this route is added via extension-url-mapping which is added for testing purposes)
  • verify in the terminal logs (server-side) only the UrlMapping extension routes are serialized
  • verify in the browser logs (client-side) only the UrlMapping extension routes are deserialized and added to all routes

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)

Comment on lines +417 to +422
// Prefix each component displayName with the extension name so it can later be deserialized
routes.forEach((route) => {
// Skip if component is already prefixed with an application extension name
if (route.component.displayName.includes(".") && route.component.displayName.match(/^[^.]+/)[0]) return
route.component.displayName = `${extensionName}.${route.component.displayName}`
})
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because extendRoutes modifies the original routes array, here I prefix the component displayName only when it doesn't have a prefix already. So any new routes added via an applicationExtension extendRoutes call will get the extension prefix added

Comment on lines +139 to +144
const componentMap = {
[PWA_KIT_REACT_SDK]: {
[Refresh.displayName]: Refresh,
[Throw404.displayName]: Throw404,
}
}
Copy link
Collaborator Author

@hajinsuha1 hajinsuha1 Mar 7, 2025

Choose a reason for hiding this comment

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

initialize the component map with the universal components added to routes in pwa-kit-react-sdk

Comment on lines +120 to +127
async getComponentMap() {
const modules = await import('./pages')
const componentMap = Object.keys(modules).reduce((acc, key) => {
acc[modules[key].displayName] = modules[key]
return acc
}, {})
return componentMap
}
Copy link
Collaborator Author

@hajinsuha1 hajinsuha1 Mar 7, 2025

Choose a reason for hiding this comment

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

I was finding when I had this logic in ApplicationExtension.getComponentMap() it would error that it can't find ./pages.
Screenshot 2025-03-07 at 12 34 44 PM

Will continue to look for a solution that makes it so this function doesn't need to be implemented by every extension. Looking at making a protected method getComponentMapByPath that does the importing and have the default implementation call that method with the ./pages path to workaround this


// Serialize the routes and add them to the config. We'll use this on the client-side later.
// TODO: we should not serialize the localized routes to reduce byte size
config.app.routes = routes.map((route) => {
Copy link
Collaborator Author

@hajinsuha1 hajinsuha1 Mar 10, 2025

Choose a reason for hiding this comment

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

  • consider only serializing one route from extendRoutes
  • move serialization logic to extension instead of base react-sdk
  • force customers to create a new extension to use an async extendRoutes that includes warnings to make sure the customer uses fast functions in the impl. This will prevent customers from creating slow functions with bad practices

@hajinsuha1 hajinsuha1 changed the base branch from feature/extensibility-v2 to vm/async-extendRoutes March 11, 2025 20:03
Comment on lines +121 to +124
async getComponentMap() {
const modules = await import('./pages')
return this.generateComponentMapFromModules(modules)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

extension classes will need to implement the getComponentMap function as putting this logic in ApplicationExtension.getComponentMap gives errors when attempting to import from ./pages since this folder only exists in extensions

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remind me again why this is async?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point this does not have to be async!

Comment on lines +86 to +87
// TODO: do we need to serialize props?
//componentProps: route.props
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it looks like route.props is not a field of RouteProps however the serialization/deserialzation seems to still work!

})
}

public deserialize(serializedRoutes: SerializedRoute[], componentMap: Modules): any[] {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Currently I pass in the componentMap, I'll look to refactor this code to call the this.getComponentMap directly

Comment on lines +153 to +161
// TODO: How do we create a new field in config.app called serializedExtensions to store the routes?
config.app.routes = Object.fromEntries(
await Promise.all(
applicationExtensions.map(async (extension) => {
const serializedData = await extension.serialize()
return [extension.constructor.name, serializedData]
})
)
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bendvc where in the code can I add a field to config.app?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we'll be serializing this under the CONFIG. We might come up with an alternative.

return routes
}

public async serialize(): Promise<SerializedRoute[]> {
Copy link
Contributor

Choose a reason for hiding this comment

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

This method being async is also suspicious. The flow that I was anticipating was to have the ssr flow load the routes and those routes get "cached" in a private variable that the serializer can use.

Comment on lines +410 to +423
if (isServerSide){
extensionRoutes = (
await Promise.all(applicationExtensions.map((extension) => extension.getRoutes()))
).flat()
} else {
// Deserialize the routes from the server
const serializedRoutes = window.__CONFIG__.app.routes
for (const applicationExtension of applicationExtensions) {
const extensionName = applicationExtension.constructor.name
const componentMap = await applicationExtension.getComponentMap()
const deserializedRoutes = applicationExtension.deserialize(serializedRoutes[extensionName], componentMap)
extensionRoutes = [...extensionRoutes, ...deserializedRoutes]
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a huge fan of this conditional logic here. We should investigate how we can have a single called to each getRoutes.

We might be able to accomplish this by moving some of the deserialization logic either into the constructor of the extension, or somewhere else like that handlebar template so during the instantiation process we also deserialize. I'm not sure which one is the best just yet.

* @returns null if there's no asynchronous state that needs to be serialized
* @throws Error if the routes have not been loaded.
*/
public serializeAsyncRoutes(): SerializedRouteProps[] | null {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would there be any downside to just returning an empty array if the getRoutesAsync is not defined? Or are we using that null value somewhere as an indicator that getRoutesAsync isn't defined?

A possible alternative is to throw if you try to serialize and getRoutesAsync is not defined or has not ran?

Copy link
Collaborator Author

@hajinsuha1 hajinsuha1 Apr 10, 2025

Choose a reason for hiding this comment

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

Updated it to return an empty array. The effect is that during serialization in react-rendering we filter out serialized routes that are an empty array before saving it to the global window variable

Comment on lines +106 to +110
if (typeof this.getRoutesAsync === 'undefined') return null

if (this._cachedRoutes === null) {
throw new Error(`Routes have not been loaded. Call getRoutesAsync() before serializing`)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you touch on this a little bit here with regards to my above comments. I'm still wondering if we need to have 3 states, throw, null and valid value. Seems like it might be more difficult to understand.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've returned an empty array whenever possible however I feel we still need to have the null case for the initial cachedRoutes value.

The reason is the cacheMethodResults only caches the value when the property is null or undefined. And since this is a general function I don't think caching when the property is an empty array would be a good idea. But open to suggestions.

Here are the changes: 3d5febc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

use private variable for cachedRoutesInvoked!

vmarta and others added 8 commits April 10, 2025 12:24
…-18128633@) (#2345)

* Show DNT banner

* Make default DNT state configurable
…-18120857@) (#2349)

* Bring back the data-cloud tests

For some reason, jest cannot mock js-cookie. It crashed with out-of-memory error.

So I decided to avoid mocking it. Calling `Cookie.get` would return either a string or undefined (if not found). So I adjusted our mocks to allow for undefined value as well.

* Fix header tests

My Account icon actually gets rendered with 'My account' label (note that it's a small-case "a").

* Revert "Bring back the data-cloud tests"

This reverts commit 16978e1.

* Mock js-cookie in a different way

Such that we won't run into the out-of-memory error.
// Some application extensions need to be serialized because they have asynchronous state
const serializedExtensions = Object.fromEntries(
applicationExtensions
.map((extension) => [extension.getName(), {routes: extension.serializeAsyncRoutes()}])
Copy link
Contributor

Choose a reason for hiding this comment

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

Is name guaranteed to be unique?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is nothing stopping 2 extensions having the same name. e.g., 2 extensions can have the same class name defined in setup-app.js.

I guess we could either

  1. throw an error stating that 2 extensions cannot have the same name
  2. use a unique name like the package name in package.json
const path = require('path')
const fs = require('fs')

function getPackageNameFromInstance(instance) {
    const filename = getClassFilePath(instance)
    if (!filename) return null

    let dir = path.dirname(filename)
    while (dir !== path.dirname(dir)) {
        const pkgPath = path.join(dir, 'package.json')
        if (fs.existsSync(pkgPath)) {
            return JSON.parse(fs.readFileSync(pkgPath, 'utf8')).name
        }
        dir = path.dirname(dir)
    }

    return null
}

function getClassFilePath(instance) {
    const constructor = instance.constructor
    for (const mod of Object.values(require.cache)) {
        if (
            mod.exports === constructor ||
            mod.exports?.default === constructor ||
            Object.values(mod.exports).includes(constructor)
        ) {
            return mod.filename
        }
    }
    return null
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Put note above TODO to use getId() ticket

const serializedExtensions = Object.fromEntries(
applicationExtensions
.map((extension) => [extension.getName(), {routes: extension.serializeAsyncRoutes()}])
.filter(([, value]) => Array.isArray(value.routes) && value.routes.length > 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of filtering after running the serialize, why now only serialize the extensions that should be serialized? ... in the jsdoc comment above you say "some" .. maybe that is a good indicator to use the some() function on the application extensions array.

* when deserializing an extension.
*/
export type ComponentMap = {
[key: string]: React.ComponentType<any>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is you want to get super specific about this type you might want to do something like this:

type ComponentMap = {
  [key in ReturnType<ApplicationExtension['getName']>]: React.ComponentType<any>
};

@hajinsuha1 hajinsuha1 requested a review from bendvc April 11, 2025 14:20
@hajinsuha1 hajinsuha1 merged commit 52be6f3 into feature/extensibility-v2 Apr 11, 2025
33 checks passed
@hajinsuha1 hajinsuha1 deleted the route-serialization-to-support-shopper-seo-integration branch April 11, 2025 20:20
adamraya added a commit that referenced this pull request May 6, 2025
…5@) (#2402)

* @W-17589798@ Bump develop to v3.10.0-dev (#2278)

* Update changelog files

* Bump to the preview versions

* Bump up preview versions

* @W-17589798@ Release preview version 3.9.0-preview.2 (#2264)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* @W-17589798@ Release preview version 3.9.0-preview.3 (#2268)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* @W-17589798@ Release preview version 3.9.0-preview.4 (#2272)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* @W-17589798@ Release preview version 3.9.0-preview.5 (#2274)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

* Add missing `_app-config` template changes (#2273)

* @W-17589798@ Release preview version 3.9.0-preview.4 (#2272)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* add missing app config template changes

* update both app config templates

---------

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Bump version to 3.9.0-preview.5

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>

* @W-17589798@ PWA Kit v3.9.0, commerce-sdk-react 3.2.0, retail-react-app 6.0.0 Release (#2277)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

* Add missing `_app-config` template changes (#2273)

* @W-17589798@ Release preview version 3.9.0-preview.4 (#2272)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* add missing app config template changes

* update both app config templates

---------

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Bump version to 3.9.0-preview.5

* Update CHANGELOG.md

* Bump versions

* Update changelogs

* Update CHANGELOG.md

* Update peer dep in package-lock

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>

* Bump version to 3.10.0-dev

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>

* Undo change

not sure whats going on this this new line issue.

* Clean up storefront extension dependencies

* Added missing commerce-react dep

* Re-order package.json

* More dependency cleanup

* Revert changes to storefront package.json

* More dep clean up

* Remove some unused deps

* Re lock projects

* @W-17643479@ Add page meta data to search results and product pages (#2282)

* Add page meta data to search results and product pages

* Changelog

* Apply suggestions

---------

Signed-off-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Don't use dependencies in extensions

* [App Extensibility ⚙️] Fix Issues with Pushing Bundles to MRT (@W-17779391@) (#2281)

* Remove core-polyfill

* Fix commerce-sdk-react peerDependency version

* Update package-lock.json

* Update bump-version script

* PR Feedback

* Add more docs

* Revert "Add more docs"

This reverts commit 59715d2.

* Revert "PR Feedback"

This reverts commit 42b10d6.

* Revert "Update bump-version script"

This reverts commit 7387793.

* Move deps to peer deps

* Fix merge conflicts and re-lock packages

* Forgot to commit lock files

* @W-17286066 Remove forced garbage collection per invocation (#2285)

* Remove forced garbage collection on each invocation.
* Allow FORCE_GC env-var to enable old behavior.
* Added /memtest endpoint to mrt reference app.
* updated CHANGELOG.md with link to PR.

* Update TUTORIAL.md

Signed-off-by: Kevin He <kevin.he@salesforce.com>

* Fix tests

Recent changes to "@testing-library/user-event" broke our tests.

* Make same change for template

* Enable Social & Passwordless Login in Demo Storefront (#2284)

* Increas max size for vendor

* Use `^` in starter extension

* [App Extensibility ⚙️] Fix Slow Dev Server start on Windows (@W-17792667@) (#2289)

* Use thread-loader

* Replace event-emitter with EventTarget

* Clean up

* Fix test

* Add evt.detail to tests

* Update thread-loader config

* Remove extensions from typescript-minimal & Update changelogs

* Solve merge conflicts

* Increase build/main.js maxSize

* Revert social and passwordless login in develop (#2292)

* use . for server timing delimiter

* add changelog

* update react query performance delimiter

* update getProps performance header delimiter

* Update TUTORIAL.md

Signed-off-by: Kevin He <kevin.he@salesforce.com>

* @W-17760517@ Automatically update bug bounty instance on new release (#2291)

* Add new preset

* New workflow for bug bounty deploy

* Fix indent

* Add runs-on

* Install deps

* temp remove step conditions

* set credentials file to default

* Test version check

* Trigger on Github release

* Test

* Test2

* test 3

* test 4

* test5

* test6

* test7

* test8

* test9

* test10

* test11

* test12

* test13

* test 14

* test 15

* test16

* test17

* test18

* test19

* test20

* test21

* test22

* test23

* test24

* test25

* test26

* Restore actual changes

* Test by reversing condition

* Revert conditional to what we want

* apply suggestions + refactor

* flip condition for testing

* Fix file structure

* Add checkout

* Specify shell

* Set token as input

* Checkout before node setup

* Use correct condition

* Allow custom bundle message on deploy

* Add quotes

* Set tag name

* Remove bracket

* Update condition

* [App Extensibility ⚙️] Polish Project Generator (@W-17910008@) (#2293)

* Remove Do you want to use Extensibility question & Fix outputDir

* Remove debug logs

* Remove Choose a project preset to get started question

* Clean up extensionName redundancy

* Update TUTORIAL.md

* lint

* Bump core to 3.9.1 and point versions for independent packages

* Cherry pick PR2285

* Update readmes

* Update package-lock.json

* Bad merge

* Fix bad merge again

* Lint fix

* update cloudwatch sender maxRetries to 0

* add comment

* add changelog

* bump version to v3.9.2

* empty commit

* @W-17900760@ Deploy Demo Storefront with SLAS Private Client (#2297)

* WIP

* Use zzrf-001 stg

* Set output

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* Add logging

* fix conditional

* Add brackets

* fix

* fix

* adjust

* test

* test

* test

* flip condition for testing

* Update handlebars for RefArchGlobal locales

* Add US locale + currency to RefArchGlobal and set as default

* Add site alias

* Enable passwordless and social login

* Adjust comment since handlebars don't add a newline

* Apply aliases

* Adjust newline

* Comment

* Add siteid and locale to demo path

* Enable site setting

* Re-add handlebar helper

* showDefaults: true

* Use translatable title for demo store

* Fix lint

* Deploy to production demo site

* Re-enable bug bounty deploy

* Use Salesforce Cloud as default logo for extensible projects

* Change condition so we run a deploy

* Restore latest release condition

* Revert "Use Salesforce Cloud as default logo for extensible projects"

This reverts commit 6ec6c7b.

* Use a non-extensible template for demo site

* Deploy demo site

* Revert deployment condition

* Apply suggestions

* Fallback name if no release tag name

* test

* test

* New step for bundle name

* fix else

* Use new step with everything else

* redeploy demo site

* Fix conditions after release

* Test matrix

* Handle secrets outside of matrix

* test

* Fix api key name

* Set flags and don't fail-fast

* Reapply on release condition

* fix server timing header delimiter

* skip changelog

* add tests

* remove comment

* lint

* resolve conflict

* @W-17405592 - DataCloud Events in PWA (#2229) (#2318)

Send analytics events from the PWA Kit to Data Cloud

---------

Signed-off-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Co-authored-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com>

* [App Extensibility ⚙️] Add script to display all files in an extension that can be overridden (@W-17555422@) (#2299)

* Init list-overridables script

* Support loadable overridables import

* Look for overridable imports in the configured extensions

* Split command into two

* Reuse helpers getConfiguredExtensions

* lint

* Fix tests

* Clean up

* Fix check-overrides using findOverrideFiles

* Fix duplicate imports

* Reuse resolver getPackageName

* clean up

* lint

* Fix tests

* Update hasCorrespondingOverridableImport path matching

* Include the file list that match overridable imports

* Simplify hasCorrespondingOverridableImport

* lint

* Extract utils from webpack overrride-resolver loader

* Add js docs

* Add tests

* Fix Windows tests

* Use path.sep to normalize paths

* Clean up use webpack plugin alternative approach

* OverrideStatsPlugin Webpack plugin

* Fix list-overrides on Windows

* Update pwa-kit-extension-sdk lock files

* Add sourceExtension to override stats

* PR Feedback

* Add OverrideStatsPlugin tests

* Add types to OverrideStatsPlugin tests

* Add more types

* PR Feedback

* Update test to use virtual filesystem

* lint

* Add docs

* Add more tests to overrides-resolver-loader

* PR Feedback docs

* Bypass test on Windows

* Update lock files

* Lint Fixes

* Fix chakra imports

* Lint

* Use Act in test, and port network mocks

* Add global mock for cc-datacloud-typescript lib

Because this was a module we couldn't use jest without having to either use an experimental flag on jest.

* Bump bundle max sizes

* Enable ssh to test workflow failures

* Undo e2e

* Add action to display content of .bin for debugging

* Fix workflow

* Update test.yml

* Relock packages in an attempt to fix ci errors

* Remove debugging

* more debugging

* Update test.yml

* Add debugging logs

* more debugging

* more debugging

* more logging

* Fix for node 22

Node 22 doesn't like using npm pack without a version, might be a bug with verdaccio

* Remove debug logs and add latest when using npm pack

* Remove more debug logs

* Move move storefront to storefront-old

* Move retail template to extension folder

* '/app' becomes '/src'

* Move the README

* Copy setup files

* Fix location of setup files

* These files aren't required in an extension

* Remove old config and replace with new config

* Move types

* Move meta data file

* Migrate router to extension with changes.

* Update jest-setup

* Migrate jest.config.

* Migrate package.json

* Remove special components and add their replacements

* Migrate changes to useAddressFields component

* Migrate changes for header component

* Migrate associated tests

* Migrate tests for link component

* Migrate changes for product-tile component

* Migrate search component

* Migrate search partial component

* Migrate seo component

* Migrate constants file

* Migrate hooks index

* Migrate use-active-data hook and tests

* Migrate various hook changes and test fixes

* Migrate mock data

Note: Unsure about whether mockedRegisteredCustomerWithNoNumber should have been re-added

* Migrate account pages.

* Migrade checkout page changes

* Migrate checkout partial changes

* Migrate product-list components

* Migrate theme colors

* Migrate utils

* migrate project files/configs

* Remove unused files in extension projects

* Move static folder

* Update eslint ignore

* Remove some more unused scripts/folders

* Fix lint warnings

* Fix import paths for hooks

* Migrate theme index

* Replace `@salesforce/template-retail-react-app` imports with relative ones

* Linting

* Migrate page-designer assets

* Migrate page-designer layouts

* Migrate page-designer misc

* Migrate utils

* Migrate theme base and project folders

* Migrate theme foundations

* Update imports for account pages

* Update cart page imports

* Migrate home page

* Migrate login page

* Migrate login-redirect page

* Migrate page-not-found page

* Migrate the product-details page

* Migrate product-list page

* Migrate registration page

* Migrate reset password

* Migrate checkout page

* Migrate cart pages

* Migrate account pages

* Lint

* Chane aliased imports to relative imports for new code

* Remove `template-retail-react-app` from generator

* Migrate mocks folder

* Migrate search component partials folder

* Migrate svg assets

* Migrate contexts file

* Delete chakra storefront old project

* Re-generate lock files across mono repo

* Add data cloud types and update code to work with as an extension

* Fix login page

* Lint

* W-17908517 - Fix basket loading after logging out (#2323)

* fix basket loading after logging out

* Fix some tests, rework others

Re-worked the data cloud tests, still a work in progress.

* Fix some failing tests

Skip header tests
Skip datacloud tests

* Remove references to old template

Remove ci bundle analyzer action

* Remove smoke and lighthouse tests for defunct retail template

* Remove other instance of smoke test script runner

* Update test.yml

* Remove code that was added back via a merge

* Remove code that was added as a result of a bad merge

* Update peer deps for storefront extension

* Remove mobify object from extensions package.json files (#2336)

* [App Extensibility] replace `extendRoutes` with `getRoutes` and `getRoutesAsync` @W-17916765@ (#2308)

* Convert extendRoutes to an async method

* Add todos

* Temporarily modify the typescript-minimal project

* Minor refactoring

* Call every extension's route function in parallel

For a simpler implementation, replaced extendRoutes with getRoutes. Probably safer too, since we think there's no need to have access to the existing/previous routes.

* Pass in the request path

* Explore passing in locals and how to manage access token

* Remove extendRoutes from the API

* Allow configuring of the auth property name in locals

* Rename the property in locals

* Create a new extension for a better example

* Add some console logs

* Experiment with having partial route

Partial route in the getRoutes, and then completing it during beforeRouteMatch.

* Experiment with correct way to get app origin

* Add todo

* Some cleanup

* Fix the partial route with correct path

* Remove no longer necessary code

* Combine params into a single object

* Remove some console logs

* Add comment to clarify

* Implement getRoutes and getRoutesAsync

Co-Authored-By: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-Authored-By: Ben Chypak <bchypak@salesforce.com>

* Add comment

* Add comment

* Add type to allow for `componentName` property

* Remove params for `getRoutes`

Only `getRoutesAsync` who needs the params.

* Remove params for getRoutes

* Revert "Remove params for `getRoutes`"

This reverts commit 38e352f.

* Revert "Remove params for getRoutes"

This reverts commit 4119cda.

* Update comments

* Update tests

* Update tests

* Revert changes to typescript-minimal

* Update package-lock.json

* Update changelog files

* Update readme files

* Add jsdoc to some types

* Rename test to make it clearer

* Empty commit

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Ben Chypak <bchypak@salesforce.com>

* Initial refactor of ssr into setup-server

* Refactor some of the utils and create middleware

* Remove wishlist from configurate list of pages for now

* Fix some lint errors

* [App Extensibility ⚙️] Pin Specific Versions for Extensions in Generated Project (@W-17779226@) (#2339)

* Use npm view to get the latest version

* Update available-app-extensions.json

* lint

* Prepend caret (^) to the version number

* [Snyk] Dependency updates (#2338)

* Update nanoid dependency

* Override path-to-regexp version

* Update CHANGELOG.md

* Apply snyk version bumps

* Update changelogs

* Update CHANGELOG.md

* Update changelogs

* Fix jwks path and replace constants with configurable values

* Empty commit

* Fix regression and fix some tests config

* Fix mock config

* Don't send undefined redirect urls

* Use extension config not app config in checkout

* Fix idps destructure

* Fix test and pr feedback

* Initial commit

* Remove debugging logs

* Removed unused error handler middleware

* Adding flex value as this component is used in display flex

* Better fix, still not great

* Fix issue with null pointer

* Lint

* Update with-layout.tsx

* Lint

* [App Extensibility] make sure DNT feature still works as expected (@W-18128633@) (#2345)

* Show DNT banner

* Make default DNT state configurable

* Add `build:watch` script, like what other packages have (#2346)

* [App Extensibility] Bring back and fix the recently-skipped tests (@W-18120857@) (#2349)

* Bring back the data-cloud tests

For some reason, jest cannot mock js-cookie. It crashed with out-of-memory error.

So I decided to avoid mocking it. Calling `Cookie.get` would return either a string or undefined (if not found). So I adjusted our mocks to allow for undefined value as well.

* Fix header tests

My Account icon actually gets rendered with 'My account' label (note that it's a small-case "a").

* Revert "Bring back the data-cloud tests"

This reverts commit 16978e1.

* Mock js-cookie in a different way

Such that we won't run into the out-of-memory error.

* Route serialization to support Shopper SEO URL mapping integration (#2300)

* update Switch component to load routes from RoutesProvider and RoutesContext
* Server: update react-rendering.js to serialize extensions that have getRoutesAsync implemented and save it under window.__EXTENSIONS__ global variable
* update ApplicationExtension to cache results from getRoutesAsync to _cachedRoutes property
* update ApplicationExtension to deserialize routes from window.__EXTENSIONS__ when on the client and save it under _cachedRoutes

* [App Extensibility] Bring back recently-commented-out Github actions (@W-18219092@) (#2351)

* Actions: bundle size and npm scripts

* Tweak condition

* Lighthouse test

* Fix test workflow

* Try different way to set env variable

* Aargh, forgot to close the quote

* Comment out lighthouse test for now

* Move to separate job those that don't test code correctness

* Refactor the MRT's node version

* Try fixing error

* Try fixing error

* Experiment with `bundlesize`

* Check bundle sizes

* Simplify code with github.action_path

* Debugging

* Workaround for bug with bundlesize

bundlesize cannot handle absolute path to the config file. See siddharthkp/bundlesize#326

* Lighthouse test now accepts config filename to be more reusable

* Experiment with passing in json config

* Experiment with passing in json config

* For the other jobs, run the npm-scripts test

* Add comment to clarify

* Remove duplicate test

It's already run in the generated and generated-windows jobs.

* Revert "Remove duplicate test"

This reverts commit 74116b7.

* Smoke testing npm scripts now run in all nodes and OSes

* Delete no-longer-needed code

* Test running an invalid command

* Test running an invalid command

* Move more things to setup_ubuntu and setup_windows

* Move more things to setup_ubuntu and setup_windows

* Move more things to setup_ubuntu and setup_windows

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* New step to verify Node and NPM versions

* Debugging windows

* Some refactoring

* Prints clearer message

* Clean up code

* A bit of reordering

* Add comments

* Add comments

* Add error handling for jq

* Extract the app generation into its own action

* Fix the error handling

* Fix action

* The timeout-minutes cannot be used inside an action

* Remove console log

* Sync with latest develop branch

* Initial implementation

* Update package lock files

* @W-13747172 Fix a11y (#2375)

* fix a11y

* @W-17830285@ Add custom parameters to SLAS authorize calls (#2358)

* Allow custom parameters to SLAS authorize calls

* Update CHANGELOG.md

* Move extractCustomParameters to utils

* Use options and body instead of parameters for consistency

* Ensure only custom parameters are set from register to login

* Don't send custom params to shopperCustomer register

* Allow custom params to be set via login.mutateAsync

* Update tests using ShopperCustomers

* Apply feedback

* Add comments

* Lint

* Pin to previous version of cc-datacloud-typescript

Their latest 1.1.0 release that's out today was causing an error with building our pwa-kit project.

* Revert "Pin to previous version of cc-datacloud-typescript"

This reverts commit e558f52.

* Make constants file, clean up, remove logs

* Update CHANGELOG.md

* Add tests for utilities.

* Committing temp version bump

* Revert "Committing temp version bump"

This reverts commit 398cfce.

* Fix failing tests

* Update package lock files

* Try replacing `sh.cat` with native file reading

See if such replacement works well on a Windows machine.

* Debug: see what gets generated

* Fix regression in getAsseturl

* Debugging

* Refactor file copying logic

* Clean up

* Revert "Try replacing `sh.cat` with native file reading"

This reverts commit dc26b6e.

* Remove debug code

* Add changelog for the chakra-storefront

* Update CHANGELOG.md

* [App Extensibility ⚙️] Remove `extension-` prefix requirement (@W-18131976@) (#2390)

* Remove extension prefix

* Clean changes in template-typescript-minimal

* Optimize detecting extensions logic

* WIP Fix tests

* Fix tests

* Fix tests

* Move import constant

* Refactor packagePath ternary

* Condensed fullPackagePath into one line

* Update package namespace and name extract logic

* Use validate-npm-package-name in generator

* lint

* Adjust generator copy

* Update packages/pwa-kit-create-app/scripts/create-mobify-app.js

Co-authored-by: Kevin He <kevin.he@salesforce.com>
Signed-off-by: Adam Raya <adamraya@users.noreply.github.com>

* PR Feedback detectExtensions args

---------

Signed-off-by: Adam Raya <adamraya@users.noreply.github.com>
Co-authored-by: Kevin He <kevin.he@salesforce.com>

* Update packages/pwa-kit-react-sdk/src/ssr/universal/utils.ts

Co-authored-by: Adam Raya <adamraya@users.noreply.github.com>
Signed-off-by: Ben Chypak <bchypak@mobify.com>

* PR feedback round 1

* Remove test configuration

* Remove sample override for testing

* Fix lint error

* Revert override

* Regenerate lock files

---------

Signed-off-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Signed-off-by: Kevin He <kevin.he@salesforce.com>
Signed-off-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Signed-off-by: Adam Raya <adamraya@users.noreply.github.com>
Signed-off-by: Ben Chypak <bchypak@mobify.com>
Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Co-authored-by: Ben Chypak <bchypak@salesforce.com>
Co-authored-by: Ben Chypak <bchypak@mobify.com>
Co-authored-by: mitesh-patel-crm <85328777+mitesh-patel-crm@users.noreply.github.com>
Co-authored-by: Kevin He <kevin.he@salesforce.com>
Co-authored-by: mitesh.patel <mitesh.patel@salesforce.com>
Co-authored-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com>
Co-authored-by: Alex Vuong <alex.vuong@salesforce.com>
Co-authored-by: Jainam Sheth <j.sheth@salesforce.com>
adamraya added a commit that referenced this pull request May 7, 2025
…w.5` (#2404)

* [App Extensibility ⚙️] Deploy `-extensibility-preview.04` (@W-17910075@)  (#2402)

* @W-17589798@ Bump develop to v3.10.0-dev (#2278)

* Update changelog files

* Bump to the preview versions

* Bump up preview versions

* @W-17589798@ Release preview version 3.9.0-preview.2 (#2264)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* @W-17589798@ Release preview version 3.9.0-preview.3 (#2268)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* @W-17589798@ Release preview version 3.9.0-preview.4 (#2272)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* @W-17589798@ Release preview version 3.9.0-preview.5 (#2274)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

* Add missing `_app-config` template changes (#2273)

* @W-17589798@ Release preview version 3.9.0-preview.4 (#2272)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* add missing app config template changes

* update both app config templates

---------

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Bump version to 3.9.0-preview.5

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>

* @W-17589798@ PWA Kit v3.9.0, commerce-sdk-react 3.2.0, retail-react-app 6.0.0 Release (#2277)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

* Add missing `_app-config` template changes (#2273)

* @W-17589798@ Release preview version 3.9.0-preview.4 (#2272)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* add missing app config template changes

* update both app config templates

---------

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Bump version to 3.9.0-preview.5

* Update CHANGELOG.md

* Bump versions

* Update changelogs

* Update CHANGELOG.md

* Update peer dep in package-lock

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>

* Bump version to 3.10.0-dev

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>

* Undo change

not sure whats going on this this new line issue.

* Clean up storefront extension dependencies

* Added missing commerce-react dep

* Re-order package.json

* More dependency cleanup

* Revert changes to storefront package.json

* More dep clean up

* Remove some unused deps

* Re lock projects

* @W-17643479@ Add page meta data to search results and product pages (#2282)

* Add page meta data to search results and product pages

* Changelog

* Apply suggestions

---------

Signed-off-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Don't use dependencies in extensions

* [App Extensibility ⚙️] Fix Issues with Pushing Bundles to MRT (@W-17779391@) (#2281)

* Remove core-polyfill

* Fix commerce-sdk-react peerDependency version

* Update package-lock.json

* Update bump-version script

* PR Feedback

* Add more docs

* Revert "Add more docs"

This reverts commit 59715d2.

* Revert "PR Feedback"

This reverts commit 42b10d6.

* Revert "Update bump-version script"

This reverts commit 7387793.

* Move deps to peer deps

* Fix merge conflicts and re-lock packages

* Forgot to commit lock files

* @W-17286066 Remove forced garbage collection per invocation (#2285)

* Remove forced garbage collection on each invocation.
* Allow FORCE_GC env-var to enable old behavior.
* Added /memtest endpoint to mrt reference app.
* updated CHANGELOG.md with link to PR.

* Update TUTORIAL.md

Signed-off-by: Kevin He <kevin.he@salesforce.com>

* Fix tests

Recent changes to "@testing-library/user-event" broke our tests.

* Make same change for template

* Enable Social & Passwordless Login in Demo Storefront (#2284)

* Increas max size for vendor

* Use `^` in starter extension

* [App Extensibility ⚙️] Fix Slow Dev Server start on Windows (@W-17792667@) (#2289)

* Use thread-loader

* Replace event-emitter with EventTarget

* Clean up

* Fix test

* Add evt.detail to tests

* Update thread-loader config

* Remove extensions from typescript-minimal & Update changelogs

* Solve merge conflicts

* Increase build/main.js maxSize

* Revert social and passwordless login in develop (#2292)

* use . for server timing delimiter

* add changelog

* update react query performance delimiter

* update getProps performance header delimiter

* Update TUTORIAL.md

Signed-off-by: Kevin He <kevin.he@salesforce.com>

* @W-17760517@ Automatically update bug bounty instance on new release (#2291)

* Add new preset

* New workflow for bug bounty deploy

* Fix indent

* Add runs-on

* Install deps

* temp remove step conditions

* set credentials file to default

* Test version check

* Trigger on Github release

* Test

* Test2

* test 3

* test 4

* test5

* test6

* test7

* test8

* test9

* test10

* test11

* test12

* test13

* test 14

* test 15

* test16

* test17

* test18

* test19

* test20

* test21

* test22

* test23

* test24

* test25

* test26

* Restore actual changes

* Test by reversing condition

* Revert conditional to what we want

* apply suggestions + refactor

* flip condition for testing

* Fix file structure

* Add checkout

* Specify shell

* Set token as input

* Checkout before node setup

* Use correct condition

* Allow custom bundle message on deploy

* Add quotes

* Set tag name

* Remove bracket

* Update condition

* [App Extensibility ⚙️] Polish Project Generator (@W-17910008@) (#2293)

* Remove Do you want to use Extensibility question & Fix outputDir

* Remove debug logs

* Remove Choose a project preset to get started question

* Clean up extensionName redundancy

* Update TUTORIAL.md

* lint

* Bump core to 3.9.1 and point versions for independent packages

* Cherry pick PR2285

* Update readmes

* Update package-lock.json

* Bad merge

* Fix bad merge again

* Lint fix

* update cloudwatch sender maxRetries to 0

* add comment

* add changelog

* bump version to v3.9.2

* empty commit

* @W-17900760@ Deploy Demo Storefront with SLAS Private Client (#2297)

* WIP

* Use zzrf-001 stg

* Set output

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* Add logging

* fix conditional

* Add brackets

* fix

* fix

* adjust

* test

* test

* test

* flip condition for testing

* Update handlebars for RefArchGlobal locales

* Add US locale + currency to RefArchGlobal and set as default

* Add site alias

* Enable passwordless and social login

* Adjust comment since handlebars don't add a newline

* Apply aliases

* Adjust newline

* Comment

* Add siteid and locale to demo path

* Enable site setting

* Re-add handlebar helper

* showDefaults: true

* Use translatable title for demo store

* Fix lint

* Deploy to production demo site

* Re-enable bug bounty deploy

* Use Salesforce Cloud as default logo for extensible projects

* Change condition so we run a deploy

* Restore latest release condition

* Revert "Use Salesforce Cloud as default logo for extensible projects"

This reverts commit 6ec6c7b.

* Use a non-extensible template for demo site

* Deploy demo site

* Revert deployment condition

* Apply suggestions

* Fallback name if no release tag name

* test

* test

* New step for bundle name

* fix else

* Use new step with everything else

* redeploy demo site

* Fix conditions after release

* Test matrix

* Handle secrets outside of matrix

* test

* Fix api key name

* Set flags and don't fail-fast

* Reapply on release condition

* fix server timing header delimiter

* skip changelog

* add tests

* remove comment

* lint

* resolve conflict

* @W-17405592 - DataCloud Events in PWA (#2229) (#2318)

Send analytics events from the PWA Kit to Data Cloud

---------

Signed-off-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Co-authored-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com>

* [App Extensibility ⚙️] Add script to display all files in an extension that can be overridden (@W-17555422@) (#2299)

* Init list-overridables script

* Support loadable overridables import

* Look for overridable imports in the configured extensions

* Split command into two

* Reuse helpers getConfiguredExtensions

* lint

* Fix tests

* Clean up

* Fix check-overrides using findOverrideFiles

* Fix duplicate imports

* Reuse resolver getPackageName

* clean up

* lint

* Fix tests

* Update hasCorrespondingOverridableImport path matching

* Include the file list that match overridable imports

* Simplify hasCorrespondingOverridableImport

* lint

* Extract utils from webpack overrride-resolver loader

* Add js docs

* Add tests

* Fix Windows tests

* Use path.sep to normalize paths

* Clean up use webpack plugin alternative approach

* OverrideStatsPlugin Webpack plugin

* Fix list-overrides on Windows

* Update pwa-kit-extension-sdk lock files

* Add sourceExtension to override stats

* PR Feedback

* Add OverrideStatsPlugin tests

* Add types to OverrideStatsPlugin tests

* Add more types

* PR Feedback

* Update test to use virtual filesystem

* lint

* Add docs

* Add more tests to overrides-resolver-loader

* PR Feedback docs

* Bypass test on Windows

* Update lock files

* Lint Fixes

* Fix chakra imports

* Lint

* Use Act in test, and port network mocks

* Add global mock for cc-datacloud-typescript lib

Because this was a module we couldn't use jest without having to either use an experimental flag on jest.

* Bump bundle max sizes

* Enable ssh to test workflow failures

* Undo e2e

* Add action to display content of .bin for debugging

* Fix workflow

* Update test.yml

* Relock packages in an attempt to fix ci errors

* Remove debugging

* more debugging

* Update test.yml

* Add debugging logs

* more debugging

* more debugging

* more logging

* Fix for node 22

Node 22 doesn't like using npm pack without a version, might be a bug with verdaccio

* Remove debug logs and add latest when using npm pack

* Remove more debug logs

* Move move storefront to storefront-old

* Move retail template to extension folder

* '/app' becomes '/src'

* Move the README

* Copy setup files

* Fix location of setup files

* These files aren't required in an extension

* Remove old config and replace with new config

* Move types

* Move meta data file

* Migrate router to extension with changes.

* Update jest-setup

* Migrate jest.config.

* Migrate package.json

* Remove special components and add their replacements

* Migrate changes to useAddressFields component

* Migrate changes for header component

* Migrate associated tests

* Migrate tests for link component

* Migrate changes for product-tile component

* Migrate search component

* Migrate search partial component

* Migrate seo component

* Migrate constants file

* Migrate hooks index

* Migrate use-active-data hook and tests

* Migrate various hook changes and test fixes

* Migrate mock data

Note: Unsure about whether mockedRegisteredCustomerWithNoNumber should have been re-added

* Migrate account pages.

* Migrade checkout page changes

* Migrate checkout partial changes

* Migrate product-list components

* Migrate theme colors

* Migrate utils

* migrate project files/configs

* Remove unused files in extension projects

* Move static folder

* Update eslint ignore

* Remove some more unused scripts/folders

* Fix lint warnings

* Fix import paths for hooks

* Migrate theme index

* Replace `@salesforce/template-retail-react-app` imports with relative ones

* Linting

* Migrate page-designer assets

* Migrate page-designer layouts

* Migrate page-designer misc

* Migrate utils

* Migrate theme base and project folders

* Migrate theme foundations

* Update imports for account pages

* Update cart page imports

* Migrate home page

* Migrate login page

* Migrate login-redirect page

* Migrate page-not-found page

* Migrate the product-details page

* Migrate product-list page

* Migrate registration page

* Migrate reset password

* Migrate checkout page

* Migrate cart pages

* Migrate account pages

* Lint

* Chane aliased imports to relative imports for new code

* Remove `template-retail-react-app` from generator

* Migrate mocks folder

* Migrate search component partials folder

* Migrate svg assets

* Migrate contexts file

* Delete chakra storefront old project

* Re-generate lock files across mono repo

* Add data cloud types and update code to work with as an extension

* Fix login page

* Lint

* W-17908517 - Fix basket loading after logging out (#2323)

* fix basket loading after logging out

* Fix some tests, rework others

Re-worked the data cloud tests, still a work in progress.

* Fix some failing tests

Skip header tests
Skip datacloud tests

* Remove references to old template

Remove ci bundle analyzer action

* Remove smoke and lighthouse tests for defunct retail template

* Remove other instance of smoke test script runner

* Update test.yml

* Remove code that was added back via a merge

* Remove code that was added as a result of a bad merge

* Update peer deps for storefront extension

* Remove mobify object from extensions package.json files (#2336)

* [App Extensibility] replace `extendRoutes` with `getRoutes` and `getRoutesAsync` @W-17916765@ (#2308)

* Convert extendRoutes to an async method

* Add todos

* Temporarily modify the typescript-minimal project

* Minor refactoring

* Call every extension's route function in parallel

For a simpler implementation, replaced extendRoutes with getRoutes. Probably safer too, since we think there's no need to have access to the existing/previous routes.

* Pass in the request path

* Explore passing in locals and how to manage access token

* Remove extendRoutes from the API

* Allow configuring of the auth property name in locals

* Rename the property in locals

* Create a new extension for a better example

* Add some console logs

* Experiment with having partial route

Partial route in the getRoutes, and then completing it during beforeRouteMatch.

* Experiment with correct way to get app origin

* Add todo

* Some cleanup

* Fix the partial route with correct path

* Remove no longer necessary code

* Combine params into a single object

* Remove some console logs

* Add comment to clarify

* Implement getRoutes and getRoutesAsync

Co-Authored-By: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-Authored-By: Ben Chypak <bchypak@salesforce.com>

* Add comment

* Add comment

* Add type to allow for `componentName` property

* Remove params for `getRoutes`

Only `getRoutesAsync` who needs the params.

* Remove params for getRoutes

* Revert "Remove params for `getRoutes`"

This reverts commit 38e352f.

* Revert "Remove params for getRoutes"

This reverts commit 4119cda.

* Update comments

* Update tests

* Update tests

* Revert changes to typescript-minimal

* Update package-lock.json

* Update changelog files

* Update readme files

* Add jsdoc to some types

* Rename test to make it clearer

* Empty commit

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Ben Chypak <bchypak@salesforce.com>

* Initial refactor of ssr into setup-server

* Refactor some of the utils and create middleware

* Remove wishlist from configurate list of pages for now

* Fix some lint errors

* [App Extensibility ⚙️] Pin Specific Versions for Extensions in Generated Project (@W-17779226@) (#2339)

* Use npm view to get the latest version

* Update available-app-extensions.json

* lint

* Prepend caret (^) to the version number

* [Snyk] Dependency updates (#2338)

* Update nanoid dependency

* Override path-to-regexp version

* Update CHANGELOG.md

* Apply snyk version bumps

* Update changelogs

* Update CHANGELOG.md

* Update changelogs

* Fix jwks path and replace constants with configurable values

* Empty commit

* Fix regression and fix some tests config

* Fix mock config

* Don't send undefined redirect urls

* Use extension config not app config in checkout

* Fix idps destructure

* Fix test and pr feedback

* Initial commit

* Remove debugging logs

* Removed unused error handler middleware

* Adding flex value as this component is used in display flex

* Better fix, still not great

* Fix issue with null pointer

* Lint

* Update with-layout.tsx

* Lint

* [App Extensibility] make sure DNT feature still works as expected (@W-18128633@) (#2345)

* Show DNT banner

* Make default DNT state configurable

* Add `build:watch` script, like what other packages have (#2346)

* [App Extensibility] Bring back and fix the recently-skipped tests (@W-18120857@) (#2349)

* Bring back the data-cloud tests

For some reason, jest cannot mock js-cookie. It crashed with out-of-memory error.

So I decided to avoid mocking it. Calling `Cookie.get` would return either a string or undefined (if not found). So I adjusted our mocks to allow for undefined value as well.

* Fix header tests

My Account icon actually gets rendered with 'My account' label (note that it's a small-case "a").

* Revert "Bring back the data-cloud tests"

This reverts commit 16978e1.

* Mock js-cookie in a different way

Such that we won't run into the out-of-memory error.

* Route serialization to support Shopper SEO URL mapping integration (#2300)

* update Switch component to load routes from RoutesProvider and RoutesContext
* Server: update react-rendering.js to serialize extensions that have getRoutesAsync implemented and save it under window.__EXTENSIONS__ global variable
* update ApplicationExtension to cache results from getRoutesAsync to _cachedRoutes property
* update ApplicationExtension to deserialize routes from window.__EXTENSIONS__ when on the client and save it under _cachedRoutes

* [App Extensibility] Bring back recently-commented-out Github actions (@W-18219092@) (#2351)

* Actions: bundle size and npm scripts

* Tweak condition

* Lighthouse test

* Fix test workflow

* Try different way to set env variable

* Aargh, forgot to close the quote

* Comment out lighthouse test for now

* Move to separate job those that don't test code correctness

* Refactor the MRT's node version

* Try fixing error

* Try fixing error

* Experiment with `bundlesize`

* Check bundle sizes

* Simplify code with github.action_path

* Debugging

* Workaround for bug with bundlesize

bundlesize cannot handle absolute path to the config file. See siddharthkp/bundlesize#326

* Lighthouse test now accepts config filename to be more reusable

* Experiment with passing in json config

* Experiment with passing in json config

* For the other jobs, run the npm-scripts test

* Add comment to clarify

* Remove duplicate test

It's already run in the generated and generated-windows jobs.

* Revert "Remove duplicate test"

This reverts commit 74116b7.

* Smoke testing npm scripts now run in all nodes and OSes

* Delete no-longer-needed code

* Test running an invalid command

* Test running an invalid command

* Move more things to setup_ubuntu and setup_windows

* Move more things to setup_ubuntu and setup_windows

* Move more things to setup_ubuntu and setup_windows

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* New step to verify Node and NPM versions

* Debugging windows

* Some refactoring

* Prints clearer message

* Clean up code

* A bit of reordering

* Add comments

* Add comments

* Add error handling for jq

* Extract the app generation into its own action

* Fix the error handling

* Fix action

* The timeout-minutes cannot be used inside an action

* Remove console log

* Sync with latest develop branch

* Initial implementation

* Update package lock files

* @W-13747172 Fix a11y (#2375)

* fix a11y

* @W-17830285@ Add custom parameters to SLAS authorize calls (#2358)

* Allow custom parameters to SLAS authorize calls

* Update CHANGELOG.md

* Move extractCustomParameters to utils

* Use options and body instead of parameters for consistency

* Ensure only custom parameters are set from register to login

* Don't send custom params to shopperCustomer register

* Allow custom params to be set via login.mutateAsync

* Update tests using ShopperCustomers

* Apply feedback

* Add comments

* Lint

* Pin to previous version of cc-datacloud-typescript

Their latest 1.1.0 release that's out today was causing an error with building our pwa-kit project.

* Revert "Pin to previous version of cc-datacloud-typescript"

This reverts commit e558f52.

* Make constants file, clean up, remove logs

* Update CHANGELOG.md

* Add tests for utilities.

* Committing temp version bump

* Revert "Committing temp version bump"

This reverts commit 398cfce.

* Fix failing tests

* Update package lock files

* Try replacing `sh.cat` with native file reading

See if such replacement works well on a Windows machine.

* Debug: see what gets generated

* Fix regression in getAsseturl

* Debugging

* Refactor file copying logic

* Clean up

* Revert "Try replacing `sh.cat` with native file reading"

This reverts commit dc26b6e.

* Remove debug code

* Add changelog for the chakra-storefront

* Update CHANGELOG.md

* [App Extensibility ⚙️] Remove `extension-` prefix requirement (@W-18131976@) (#2390)

* Remove extension prefix

* Clean changes in template-typescript-minimal

* Optimize detecting extensions logic

* WIP Fix tests

* Fix tests

* Fix tests

* Move import constant

* Refactor packagePath ternary

* Condensed fullPackagePath into one line

* Update package namespace and name extract logic

* Use validate-npm-package-name in generator

* lint

* Adjust generator copy

* Update packages/pwa-kit-create-app/scripts/create-mobify-app.js

Co-authored-by: Kevin He <kevin.he@salesforce.com>
Signed-off-by: Adam Raya <adamraya@users.noreply.github.com>

* PR Feedback detectExtensions args

---------

Signed-off-by: Adam Raya <adamraya@users.noreply.github.com>
Co-authored-by: Kevin He <kevin.he@salesforce.com>

* Update packages/pwa-kit-react-sdk/src/ssr/universal/utils.ts

Co-authored-by: Adam Raya <adamraya@users.noreply.github.com>
Signed-off-by: Ben Chypak <bchypak@mobify.com>

* PR feedback round 1

* Remove test configuration

* Remove sample override for testing

* Fix lint error

* Revert override

* Regenerate lock files

---------

Signed-off-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Signed-off-by: Kevin He <kevin.he@salesforce.com>
Signed-off-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Signed-off-by: Adam Raya <adamraya@users.noreply.github.com>
Signed-off-by: Ben Chypak <bchypak@mobify.com>
Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Co-authored-by: Ben Chypak <bchypak@salesforce.com>
Co-authored-by: Ben Chypak <bchypak@mobify.com>
Co-authored-by: mitesh-patel-crm <85328777+mitesh-patel-crm@users.noreply.github.com>
Co-authored-by: Kevin He <kevin.he@salesforce.com>
Co-authored-by: mitesh.patel <mitesh.patel@salesforce.com>
Co-authored-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com>
Co-authored-by: Alex Vuong <alex.vuong@salesforce.com>
Co-authored-by: Jainam Sheth <j.sheth@salesforce.com>

* [App Extensibility ⚙️] Update create_mrt GitHub Action for -extensibility-preview.04 release (@W-17910075@)(#2403)

* Bump versions to `-extensibility-preview.5`

* Update Changelogs

* Use caret on peerDependencies

---------

Signed-off-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Signed-off-by: Kevin He <kevin.he@salesforce.com>
Signed-off-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Signed-off-by: Adam Raya <adamraya@users.noreply.github.com>
Signed-off-by: Ben Chypak <bchypak@mobify.com>
Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Co-authored-by: Ben Chypak <bchypak@salesforce.com>
Co-authored-by: Ben Chypak <bchypak@mobify.com>
Co-authored-by: mitesh-patel-crm <85328777+mitesh-patel-crm@users.noreply.github.com>
Co-authored-by: Kevin He <kevin.he@salesforce.com>
Co-authored-by: mitesh.patel <mitesh.patel@salesforce.com>
Co-authored-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com>
Co-authored-by: Alex Vuong <alex.vuong@salesforce.com>
Co-authored-by: Jainam Sheth <j.sheth@salesforce.com>
vmarta added a commit that referenced this pull request Jul 2, 2025
vmarta added a commit that referenced this pull request Jul 3, 2025
alexvuong added a commit that referenced this pull request Jul 16, 2025
…w.5` (#2404)

* [App Extensibility ⚙️] Deploy `-extensibility-preview.04` (@W-17910075@)  (#2402)

* @W-17589798@ Bump develop to v3.10.0-dev (#2278)

* Update changelog files

* Bump to the preview versions

* Bump up preview versions

* @W-17589798@ Release preview version 3.9.0-preview.2 (#2264)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* @W-17589798@ Release preview version 3.9.0-preview.3 (#2268)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* @W-17589798@ Release preview version 3.9.0-preview.4 (#2272)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* @W-17589798@ Release preview version 3.9.0-preview.5 (#2274)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

* Add missing `_app-config` template changes (#2273)

* @W-17589798@ Release preview version 3.9.0-preview.4 (#2272)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* add missing app config template changes

* update both app config templates

---------

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Bump version to 3.9.0-preview.5

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>

* @W-17589798@ PWA Kit v3.9.0, commerce-sdk-react 3.2.0, retail-react-app 6.0.0 Release (#2277)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

* Add missing `_app-config` template changes (#2273)

* @W-17589798@ Release preview version 3.9.0-preview.4 (#2272)

* Update default.js.hbs and ssr.js.hbs templates to support new login flows (#2263)

* update bootstrap default.js.hbs to include login options
* update ssr.js templates

* Revert/page meta data tags 3.9.x (#2259)

* Revert page-meta-data changes

* Update CHANGELOG.md

* Fix changelog

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>

* Bump to version 3.9.0-preview.2

* Fix lint errors in default.js templates (#2265)

* fix lint errors

* rerun ci jobs

* Update app config templates (#2267)

* lint default.js in templates folder (#2266)

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Bump to version 3.9.0-preview.3

* Update CHANGELOG.md

* Fix import error template retail react app (#2270)

* revert babel.config.js workaround

* move everything out of utils into ssr.js or default.js

* update default.js templates

* update ssr.js templates

* rerun ci jobs

* rerun ci jobs

* Bump versions

---------

Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Update CHANGELOG.md

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* add missing app config template changes

* update both app config templates

---------

Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>

* Bump version to 3.9.0-preview.5

* Update CHANGELOG.md

* Bump versions

* Update changelogs

* Update CHANGELOG.md

* Update peer dep in package-lock

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>

* Bump version to 3.10.0-dev

---------

Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>

* Undo change

not sure whats going on this this new line issue.

* Clean up storefront extension dependencies

* Added missing commerce-react dep

* Re-order package.json

* More dependency cleanup

* Revert changes to storefront package.json

* More dep clean up

* Remove some unused deps

* Re lock projects

* @W-17643479@ Add page meta data to search results and product pages (#2282)

* Add page meta data to search results and product pages

* Changelog

* Apply suggestions

---------

Signed-off-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>

* Don't use dependencies in extensions

* [App Extensibility ⚙️] Fix Issues with Pushing Bundles to MRT (@W-17779391@) (#2281)

* Remove core-polyfill

* Fix commerce-sdk-react peerDependency version

* Update package-lock.json

* Update bump-version script

* PR Feedback

* Add more docs

* Revert "Add more docs"

This reverts commit 59715d2.

* Revert "PR Feedback"

This reverts commit 42b10d6.

* Revert "Update bump-version script"

This reverts commit 7387793.

* Move deps to peer deps

* Fix merge conflicts and re-lock packages

* Forgot to commit lock files

* @W-17286066 Remove forced garbage collection per invocation (#2285)

* Remove forced garbage collection on each invocation.
* Allow FORCE_GC env-var to enable old behavior.
* Added /memtest endpoint to mrt reference app.
* updated CHANGELOG.md with link to PR.

* Update TUTORIAL.md

Signed-off-by: Kevin He <kevin.he@salesforce.com>

* Fix tests

Recent changes to "@testing-library/user-event" broke our tests.

* Make same change for template

* Enable Social & Passwordless Login in Demo Storefront (#2284)

* Increas max size for vendor

* Use `^` in starter extension

* [App Extensibility ⚙️] Fix Slow Dev Server start on Windows (@W-17792667@) (#2289)

* Use thread-loader

* Replace event-emitter with EventTarget

* Clean up

* Fix test

* Add evt.detail to tests

* Update thread-loader config

* Remove extensions from typescript-minimal & Update changelogs

* Solve merge conflicts

* Increase build/main.js maxSize

* Revert social and passwordless login in develop (#2292)

* use . for server timing delimiter

* add changelog

* update react query performance delimiter

* update getProps performance header delimiter

* Update TUTORIAL.md

Signed-off-by: Kevin He <kevin.he@salesforce.com>

* @W-17760517@ Automatically update bug bounty instance on new release (#2291)

* Add new preset

* New workflow for bug bounty deploy

* Fix indent

* Add runs-on

* Install deps

* temp remove step conditions

* set credentials file to default

* Test version check

* Trigger on Github release

* Test

* Test2

* test 3

* test 4

* test5

* test6

* test7

* test8

* test9

* test10

* test11

* test12

* test13

* test 14

* test 15

* test16

* test17

* test18

* test19

* test20

* test21

* test22

* test23

* test24

* test25

* test26

* Restore actual changes

* Test by reversing condition

* Revert conditional to what we want

* apply suggestions + refactor

* flip condition for testing

* Fix file structure

* Add checkout

* Specify shell

* Set token as input

* Checkout before node setup

* Use correct condition

* Allow custom bundle message on deploy

* Add quotes

* Set tag name

* Remove bracket

* Update condition

* [App Extensibility ⚙️] Polish Project Generator (@W-17910008@) (#2293)

* Remove Do you want to use Extensibility question & Fix outputDir

* Remove debug logs

* Remove Choose a project preset to get started question

* Clean up extensionName redundancy

* Update TUTORIAL.md

* lint

* Bump core to 3.9.1 and point versions for independent packages

* Cherry pick PR2285

* Update readmes

* Update package-lock.json

* Bad merge

* Fix bad merge again

* Lint fix

* update cloudwatch sender maxRetries to 0

* add comment

* add changelog

* bump version to v3.9.2

* empty commit

* @W-17900760@ Deploy Demo Storefront with SLAS Private Client (#2297)

* WIP

* Use zzrf-001 stg

* Set output

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* Add logging

* fix conditional

* Add brackets

* fix

* fix

* adjust

* test

* test

* test

* flip condition for testing

* Update handlebars for RefArchGlobal locales

* Add US locale + currency to RefArchGlobal and set as default

* Add site alias

* Enable passwordless and social login

* Adjust comment since handlebars don't add a newline

* Apply aliases

* Adjust newline

* Comment

* Add siteid and locale to demo path

* Enable site setting

* Re-add handlebar helper

* showDefaults: true

* Use translatable title for demo store

* Fix lint

* Deploy to production demo site

* Re-enable bug bounty deploy

* Use Salesforce Cloud as default logo for extensible projects

* Change condition so we run a deploy

* Restore latest release condition

* Revert "Use Salesforce Cloud as default logo for extensible projects"

This reverts commit 6ec6c7b.

* Use a non-extensible template for demo site

* Deploy demo site

* Revert deployment condition

* Apply suggestions

* Fallback name if no release tag name

* test

* test

* New step for bundle name

* fix else

* Use new step with everything else

* redeploy demo site

* Fix conditions after release

* Test matrix

* Handle secrets outside of matrix

* test

* Fix api key name

* Set flags and don't fail-fast

* Reapply on release condition

* fix server timing header delimiter

* skip changelog

* add tests

* remove comment

* lint

* resolve conflict

* @W-17405592 - DataCloud Events in PWA (#2229) (#2318)

Send analytics events from the PWA Kit to Data Cloud

---------

Signed-off-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Co-authored-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com>

* [App Extensibility ⚙️] Add script to display all files in an extension that can be overridden (@W-17555422@) (#2299)

* Init list-overridables script

* Support loadable overridables import

* Look for overridable imports in the configured extensions

* Split command into two

* Reuse helpers getConfiguredExtensions

* lint

* Fix tests

* Clean up

* Fix check-overrides using findOverrideFiles

* Fix duplicate imports

* Reuse resolver getPackageName

* clean up

* lint

* Fix tests

* Update hasCorrespondingOverridableImport path matching

* Include the file list that match overridable imports

* Simplify hasCorrespondingOverridableImport

* lint

* Extract utils from webpack overrride-resolver loader

* Add js docs

* Add tests

* Fix Windows tests

* Use path.sep to normalize paths

* Clean up use webpack plugin alternative approach

* OverrideStatsPlugin Webpack plugin

* Fix list-overrides on Windows

* Update pwa-kit-extension-sdk lock files

* Add sourceExtension to override stats

* PR Feedback

* Add OverrideStatsPlugin tests

* Add types to OverrideStatsPlugin tests

* Add more types

* PR Feedback

* Update test to use virtual filesystem

* lint

* Add docs

* Add more tests to overrides-resolver-loader

* PR Feedback docs

* Bypass test on Windows

* Update lock files

* Lint Fixes

* Fix chakra imports

* Lint

* Use Act in test, and port network mocks

* Add global mock for cc-datacloud-typescript lib

Because this was a module we couldn't use jest without having to either use an experimental flag on jest.

* Bump bundle max sizes

* Enable ssh to test workflow failures

* Undo e2e

* Add action to display content of .bin for debugging

* Fix workflow

* Update test.yml

* Relock packages in an attempt to fix ci errors

* Remove debugging

* more debugging

* Update test.yml

* Add debugging logs

* more debugging

* more debugging

* more logging

* Fix for node 22

Node 22 doesn't like using npm pack without a version, might be a bug with verdaccio

* Remove debug logs and add latest when using npm pack

* Remove more debug logs

* Move move storefront to storefront-old

* Move retail template to extension folder

* '/app' becomes '/src'

* Move the README

* Copy setup files

* Fix location of setup files

* These files aren't required in an extension

* Remove old config and replace with new config

* Move types

* Move meta data file

* Migrate router to extension with changes.

* Update jest-setup

* Migrate jest.config.

* Migrate package.json

* Remove special components and add their replacements

* Migrate changes to useAddressFields component

* Migrate changes for header component

* Migrate associated tests

* Migrate tests for link component

* Migrate changes for product-tile component

* Migrate search component

* Migrate search partial component

* Migrate seo component

* Migrate constants file

* Migrate hooks index

* Migrate use-active-data hook and tests

* Migrate various hook changes and test fixes

* Migrate mock data

Note: Unsure about whether mockedRegisteredCustomerWithNoNumber should have been re-added

* Migrate account pages.

* Migrade checkout page changes

* Migrate checkout partial changes

* Migrate product-list components

* Migrate theme colors

* Migrate utils

* migrate project files/configs

* Remove unused files in extension projects

* Move static folder

* Update eslint ignore

* Remove some more unused scripts/folders

* Fix lint warnings

* Fix import paths for hooks

* Migrate theme index

* Replace `@salesforce/template-retail-react-app` imports with relative ones

* Linting

* Migrate page-designer assets

* Migrate page-designer layouts

* Migrate page-designer misc

* Migrate utils

* Migrate theme base and project folders

* Migrate theme foundations

* Update imports for account pages

* Update cart page imports

* Migrate home page

* Migrate login page

* Migrate login-redirect page

* Migrate page-not-found page

* Migrate the product-details page

* Migrate product-list page

* Migrate registration page

* Migrate reset password

* Migrate checkout page

* Migrate cart pages

* Migrate account pages

* Lint

* Chane aliased imports to relative imports for new code

* Remove `template-retail-react-app` from generator

* Migrate mocks folder

* Migrate search component partials folder

* Migrate svg assets

* Migrate contexts file

* Delete chakra storefront old project

* Re-generate lock files across mono repo

* Add data cloud types and update code to work with as an extension

* Fix login page

* Lint

* W-17908517 - Fix basket loading after logging out (#2323)

* fix basket loading after logging out

* Fix some tests, rework others

Re-worked the data cloud tests, still a work in progress.

* Fix some failing tests

Skip header tests
Skip datacloud tests

* Remove references to old template

Remove ci bundle analyzer action

* Remove smoke and lighthouse tests for defunct retail template

* Remove other instance of smoke test script runner

* Update test.yml

* Remove code that was added back via a merge

* Remove code that was added as a result of a bad merge

* Update peer deps for storefront extension

* Remove mobify object from extensions package.json files (#2336)

* [App Extensibility] replace `extendRoutes` with `getRoutes` and `getRoutesAsync` @W-17916765@ (#2308)

* Convert extendRoutes to an async method

* Add todos

* Temporarily modify the typescript-minimal project

* Minor refactoring

* Call every extension's route function in parallel

For a simpler implementation, replaced extendRoutes with getRoutes. Probably safer too, since we think there's no need to have access to the existing/previous routes.

* Pass in the request path

* Explore passing in locals and how to manage access token

* Remove extendRoutes from the API

* Allow configuring of the auth property name in locals

* Rename the property in locals

* Create a new extension for a better example

* Add some console logs

* Experiment with having partial route

Partial route in the getRoutes, and then completing it during beforeRouteMatch.

* Experiment with correct way to get app origin

* Add todo

* Some cleanup

* Fix the partial route with correct path

* Remove no longer necessary code

* Combine params into a single object

* Remove some console logs

* Add comment to clarify

* Implement getRoutes and getRoutesAsync

Co-Authored-By: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-Authored-By: Ben Chypak <bchypak@salesforce.com>

* Add comment

* Add comment

* Add type to allow for `componentName` property

* Remove params for `getRoutes`

Only `getRoutesAsync` who needs the params.

* Remove params for getRoutes

* Revert "Remove params for `getRoutes`"

This reverts commit 38e352f.

* Revert "Remove params for getRoutes"

This reverts commit 4119cda.

* Update comments

* Update tests

* Update tests

* Revert changes to typescript-minimal

* Update package-lock.json

* Update changelog files

* Update readme files

* Add jsdoc to some types

* Rename test to make it clearer

* Empty commit

---------

Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Ben Chypak <bchypak@salesforce.com>

* Initial refactor of ssr into setup-server

* Refactor some of the utils and create middleware

* Remove wishlist from configurate list of pages for now

* Fix some lint errors

* [App Extensibility ⚙️] Pin Specific Versions for Extensions in Generated Project (@W-17779226@) (#2339)

* Use npm view to get the latest version

* Update available-app-extensions.json

* lint

* Prepend caret (^) to the version number

* [Snyk] Dependency updates (#2338)

* Update nanoid dependency

* Override path-to-regexp version

* Update CHANGELOG.md

* Apply snyk version bumps

* Update changelogs

* Update CHANGELOG.md

* Update changelogs

* Fix jwks path and replace constants with configurable values

* Empty commit

* Fix regression and fix some tests config

* Fix mock config

* Don't send undefined redirect urls

* Use extension config not app config in checkout

* Fix idps destructure

* Fix test and pr feedback

* Initial commit

* Remove debugging logs

* Removed unused error handler middleware

* Adding flex value as this component is used in display flex

* Better fix, still not great

* Fix issue with null pointer

* Lint

* Update with-layout.tsx

* Lint

* [App Extensibility] make sure DNT feature still works as expected (@W-18128633@) (#2345)

* Show DNT banner

* Make default DNT state configurable

* Add `build:watch` script, like what other packages have (#2346)

* [App Extensibility] Bring back and fix the recently-skipped tests (@W-18120857@) (#2349)

* Bring back the data-cloud tests

For some reason, jest cannot mock js-cookie. It crashed with out-of-memory error.

So I decided to avoid mocking it. Calling `Cookie.get` would return either a string or undefined (if not found). So I adjusted our mocks to allow for undefined value as well.

* Fix header tests

My Account icon actually gets rendered with 'My account' label (note that it's a small-case "a").

* Revert "Bring back the data-cloud tests"

This reverts commit 16978e1.

* Mock js-cookie in a different way

Such that we won't run into the out-of-memory error.

* Route serialization to support Shopper SEO URL mapping integration (#2300)

* update Switch component to load routes from RoutesProvider and RoutesContext
* Server: update react-rendering.js to serialize extensions that have getRoutesAsync implemented and save it under window.__EXTENSIONS__ global variable
* update ApplicationExtension to cache results from getRoutesAsync to _cachedRoutes property
* update ApplicationExtension to deserialize routes from window.__EXTENSIONS__ when on the client and save it under _cachedRoutes

* [App Extensibility] Bring back recently-commented-out Github actions (@W-18219092@) (#2351)

* Actions: bundle size and npm scripts

* Tweak condition

* Lighthouse test

* Fix test workflow

* Try different way to set env variable

* Aargh, forgot to close the quote

* Comment out lighthouse test for now

* Move to separate job those that don't test code correctness

* Refactor the MRT's node version

* Try fixing error

* Try fixing error

* Experiment with `bundlesize`

* Check bundle sizes

* Simplify code with github.action_path

* Debugging

* Workaround for bug with bundlesize

bundlesize cannot handle absolute path to the config file. See siddharthkp/bundlesize#326

* Lighthouse test now accepts config filename to be more reusable

* Experiment with passing in json config

* Experiment with passing in json config

* For the other jobs, run the npm-scripts test

* Add comment to clarify

* Remove duplicate test

It's already run in the generated and generated-windows jobs.

* Revert "Remove duplicate test"

This reverts commit 74116b7.

* Smoke testing npm scripts now run in all nodes and OSes

* Delete no-longer-needed code

* Test running an invalid command

* Test running an invalid command

* Move more things to setup_ubuntu and setup_windows

* Move more things to setup_ubuntu and setup_windows

* Move more things to setup_ubuntu and setup_windows

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* New step to verify Node and NPM versions

* Debugging windows

* Some refactoring

* Prints clearer message

* Clean up code

* A bit of reordering

* Add comments

* Add comments

* Add error handling for jq

* Extract the app generation into its own action

* Fix the error handling

* Fix action

* The timeout-minutes cannot be used inside an action

* Remove console log

* Sync with latest develop branch

* Initial implementation

* Update package lock files

* @W-13747172 Fix a11y (#2375)

* fix a11y

* @W-17830285@ Add custom parameters to SLAS authorize calls (#2358)

* Allow custom parameters to SLAS authorize calls

* Update CHANGELOG.md

* Move extractCustomParameters to utils

* Use options and body instead of parameters for consistency

* Ensure only custom parameters are set from register to login

* Don't send custom params to shopperCustomer register

* Allow custom params to be set via login.mutateAsync

* Update tests using ShopperCustomers

* Apply feedback

* Add comments

* Lint

* Pin to previous version of cc-datacloud-typescript

Their latest 1.1.0 release that's out today was causing an error with building our pwa-kit project.

* Revert "Pin to previous version of cc-datacloud-typescript"

This reverts commit e558f52.

* Make constants file, clean up, remove logs

* Update CHANGELOG.md

* Add tests for utilities.

* Committing temp version bump

* Revert "Committing temp version bump"

This reverts commit 398cfce.

* Fix failing tests

* Update package lock files

* Try replacing `sh.cat` with native file reading

See if such replacement works well on a Windows machine.

* Debug: see what gets generated

* Fix regression in getAsseturl

* Debugging

* Refactor file copying logic

* Clean up

* Revert "Try replacing `sh.cat` with native file reading"

This reverts commit dc26b6e.

* Remove debug code

* Add changelog for the chakra-storefront

* Update CHANGELOG.md

* [App Extensibility ⚙️] Remove `extension-` prefix requirement (@W-18131976@) (#2390)

* Remove extension prefix

* Clean changes in template-typescript-minimal

* Optimize detecting extensions logic

* WIP Fix tests

* Fix tests

* Fix tests

* Move import constant

* Refactor packagePath ternary

* Condensed fullPackagePath into one line

* Update package namespace and name extract logic

* Use validate-npm-package-name in generator

* lint

* Adjust generator copy

* Update packages/pwa-kit-create-app/scripts/create-mobify-app.js

Co-authored-by: Kevin He <kevin.he@salesforce.com>
Signed-off-by: Adam Raya <adamraya@users.noreply.github.com>

* PR Feedback detectExtensions args

---------

Signed-off-by: Adam Raya <adamraya@users.noreply.github.com>
Co-authored-by: Kevin He <kevin.he@salesforce.com>

* Update packages/pwa-kit-react-sdk/src/ssr/universal/utils.ts

Co-authored-by: Adam Raya <adamraya@users.noreply.github.com>
Signed-off-by: Ben Chypak <bchypak@mobify.com>

* PR feedback round 1

* Remove test configuration

* Remove sample override for testing

* Fix lint error

* Revert override

* Regenerate lock files

---------

Signed-off-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Signed-off-by: Kevin He <kevin.he@salesforce.com>
Signed-off-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Signed-off-by: Adam Raya <adamraya@users.noreply.github.com>
Signed-off-by: Ben Chypak <bchypak@mobify.com>
Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Co-authored-by: Ben Chypak <bchypak@salesforce.com>
Co-authored-by: Ben Chypak <bchypak@mobify.com>
Co-authored-by: mitesh-patel-crm <85328777+mitesh-patel-crm@users.noreply.github.com>
Co-authored-by: Kevin He <kevin.he@salesforce.com>
Co-authored-by: mitesh.patel <mitesh.patel@salesforce.com>
Co-authored-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com>
Co-authored-by: Alex Vuong <alex.vuong@salesforce.com>
Co-authored-by: Jainam Sheth <j.sheth@salesforce.com>

* [App Extensibility ⚙️] Update create_mrt GitHub Action for -extensibility-preview.04 release (@W-17910075@)(#2403)

* Bump versions to `-extensibility-preview.5`

* Update Changelogs

* Use caret on peerDependencies

---------

Signed-off-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Signed-off-by: Kevin He <kevin.he@salesforce.com>
Signed-off-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Signed-off-by: Adam Raya <adamraya@users.noreply.github.com>
Signed-off-by: Ben Chypak <bchypak@mobify.com>
Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>
Co-authored-by: Vincent Marta <vmarta@salesforce.com>
Co-authored-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Co-authored-by: Ben Chypak <bchypak@salesforce.com>
Co-authored-by: Ben Chypak <bchypak@mobify.com>
Co-authored-by: mitesh-patel-crm <85328777+mitesh-patel-crm@users.noreply.github.com>
Co-authored-by: Kevin He <kevin.he@salesforce.com>
Co-authored-by: mitesh.patel <mitesh.patel@salesforce.com>
Co-authored-by: Carson Campbell <170666418+carson-campbell@users.noreply.github.com>
Co-authored-by: Alex Vuong <alex.vuong@salesforce.com>
Co-authored-by: Jainam Sheth <j.sheth@salesforce.com>
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.

4 participants