Skip to content

[feature] Rename V4 app dir to => src @W-18895152@#2693

Merged
bfeister merged 14 commits intofeature/extensibility-v2from
feature/@W-18895152@/update-next-with-v4
Jul 1, 2025
Merged

[feature] Rename V4 app dir to => src @W-18895152@#2693
bfeister merged 14 commits intofeature/extensibility-v2from
feature/@W-18895152@/update-next-with-v4

Conversation

@bfeister
Copy link
Contributor

@bfeister bfeister commented Jun 28, 2025

Description

This PR migrates the SDKs from app/* to src/* for consistency. Special / "magic" files like app/components/_app-config/index.jsx and similar are distinguishable by their _ prefix as in _app/index

Files affected:

  • src/components/_app/index.jsx
  • src/components/_app-config/index.jsx
  • src/main.jsx
  • src/routes.jsx
  • src/ssr.js
  • packages/template-retail-react-app

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

  • (change1)

How to Test-Drive This PR

  • (step1)

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)

@bfeister bfeister requested a review from a team as a code owner June 28, 2025 17:30
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jun 28, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@bfeister bfeister changed the base branch from develop to feature/extensibility-v2 June 28, 2025 17:30
@bfeister bfeister merged commit ac01d16 into feature/extensibility-v2 Jul 1, 2025
33 checks passed
bfeister added a commit that referenced this pull request Jul 3, 2025
…W-18895152@ (#2712)

* Add template version to generator script for E2E tests

* Update generator script to use templateVersion

* Make templateVersion optional

* make template version optional in validator script

* Fix passing in template version as option

* Don't pass in template version if undefined

* Don't pass in templateVersion if undefined

* Include full version string

* Pin cc-datacloud version

* Fix destructuring error in use-datacloud hook

* Remove fallback to fix datacloud error

* Bump versions for monorepo and packages

* Update changelog

* Update changelog

* pin "@salesforce/cc-datacloud-typescript": "1.0.10"

* Fix incorrect changelog version

* Bump cc-datacloud-typescript version to 1.1.2

* Fix changelog

* W-13747172 - E2e a11y integration (#2381)

* set up a11y tests in e2e

* @W-17466740 - Add Confirm New Password input field (#2395)

* add confirm new password field

* add tests

* add translations

* update changelog

* lint

* add translation file

* revert eslint delete

* fix account page tests

* lint

* add test case for error state

* Fix a11y e2e (#2398)

* fix a11y flow
----

Co-authored-by: Jainam Sheth <j.sheth@salesforce.com>

* @W-18348131: Fix inconsistency between dwsid and access token when hybrid authentication is enabled. (#2397)

* clear sfra access token before storing token response

* Fix a11y e2e flaky tests (#2424)

* fix a11y e2e flaky tests

* [App Extensibility ⚙️] Fix Override Regression (@W-18485954@) (#2418)

* Add missing fileExtensions & Use SRC_FOLDER to get project's path

* Support overrides in generated project

* Undo test config

* Clean up

* PR Feedback

* More clean up removing SRC_FOLDER to get project's path

* PR Feedback

* PR Feedback

* PR Feedback

* Remove `template-retail-react-app` again, accidentally re-added

* Initial removal of upgradeability, targets only `pwa-kit-extension-sdk` for deletion, cleanup of connected references to come later

* Remove references to `pwa-kit-extension-sdk` in `package.json` files

* Remove some missed `package.json` files

* remove all `setup-app.ts` and `setup-server.ts` files, along with `pwa-kit-dev/src/ssr/server/test_fixtures/extensions/*` code

* Remove upgradeability from `extension-chakra-store-locator`

* Remove upgradeability: `useExtensionConfig` => `useConfig()` / `utils/get-extension-config` => `utils/get-config` / `ApplicationExtensionConfig` => `Config`

* Prune references to: `ApplicationExtensionsProvider`, `setup-app`, `buildBabelExtensibilityArgs`, `getConfiguredExtensions`, `validateExtensionDependencies`, `validateAppConfiguration`, `applyApplicationExtensions`, `useApplicationExtensions`

* Remove `overridable` directive / strings

* remove more `setup-server` bits

* fix bad merge

* `extension-chakra-storefront` => `template-chakra-storefront`

* `extension-chakra-storefront` => `template-chakra-storefront`

* Revert "`extension-chakra-storefront` => `template-chakra-storefront`"

This reverts commit 03675db.

* `extension-chakra-storefront` => `template-chakra-storefront`

* more cleanup, fixing plumbing / wiring in internals

* More wire up / cleanup migrating extensibility

* WIP (broken) mostly working `_app/index` and `_app-config/index` but loading `appConfig` (now derived from `default.json` instead of `constants.js`) is causing an infinite re-render loop

* WIP (still broken) infinite render re-loop, seems some props passed to a provider are unstable between SSR and client-side pass

* Working now (server side pass), fixed infinite loop, root cause ended up being lack of `mobify.proxyConfigs` in `default.json`, plus bad prop drilling in `ssr.js`

* `import {useConfig} from '../hooks'` => `import {getConfig} from '@salesforce/pwa-kit-runtime/utils/ssr-config'`

* Add gitignore (basic for now)

* cleanup

* cleanup

* Cleanup upgradeability extensions code, `pages` / `pages.Home.path` was a config used by `setup-app.ts`

* fix `getConfig` circular reference

* Fix legacy references to page-based config related to extensibility

* More cleanup

* Fix references to missing configuration, add missing to `default.json` change casing

* Restructure: `/src/assets` => `/assets`

* Fix inconsistent `withCommerceSdkReact` hook. We are using V3 code in `components/_app/index` and the `with-commerce-sdk-react` hook was on the V4 (extensions) version

* Fix `config.homeHref` => `config.pages.home.path`

* cleanup

* tree shake and integration with create-mobify-app

* fixed typo

* tree shake tests

* removed unused import

* Move `src/constants.js` => `config/constants.js`

* re-structure folders `/src/*` => `/**`

* Cleanup (remove `above-header` template hook) remove unused `with-layout.tsx`

* checksum

* dependencies

* removed command line code

* added missing export

* update lockfile

* fixed plugins length check

* Add back missing translation compile scripts + remove V3 extensibility

* Cleaning up V3 `ccExtensibility` + V4 extensions

* Remove unused scripts

* Remove more upgradeability code

* more upgradeability removal

* Add default chakra-storefront answers

* back out debugging code

* Introduce fallback value pattern and differentiation between `interactive` an `non-interactive` versions of template presets

* default to non-interactive mode

* Add to CHANGELOG

* make typescript template --preset interactive by default

* lint fix

* fixed linting errors

* lint fix

* more lint fixes

* remove unused HOCs

* more unused legacy upgradeability cleanup

* remove test for `cc_overrides`

* delete upgradeability test cases

* Rollback `useServerContext` hook added to `commerce-sdk-react` for upgradeability

* Revert "Rollback `useServerContext` hook added to `commerce-sdk-react` for upgradeability"

This reverts commit 4975fef.

* attempting to fix `commerce-sdk-react` test failures

* Refactor store locator to no longer use `useExtensionStore` hook

* fix broken test in `extension-chakra-store-locator`

* bump threshold down to pass tests because this will all fold into the template in V4 anyway

* this is not actually mocking `getConfig`, it was mocking `get-extension-config` and got renamed at commit b5d5a9d when it should have been deleted

* remove upgradeability code changes failing CI

* attempt to fix unmocked file read

* fix lint error pwa-kit-dev jest config

* lint fix jest config

* fix outdated references to `@salesforce/retail-react-app`

* fixed renderWithProviders import

* mock file read

* added error handling

* fixed for path mismatch in Windows

* fix for windows path

* fixed linter

* more fix for Windows

* fixed mockConfig for stores-list test

* test fixes

* lint

* fixed iport path for locale jsons

* fixed url test

* fixed breadcrumb test

* fixed store locator modal test

* mock config fixes

* more mock config fixes

* mock config fixes

* fixed mock config once and for all

* fixed remaining tests

* updated coverage collection list

* renamed tree-shake to trim-extension

* fixed linter

* rename tree-shake.js in package.json

* renamed retail-react-app to chakra-storefront and adjusted configs accordingly

* keep preset ids as retail-react-app

* revert the project name back to retail-react-app

* moved source folders to under src/ and updated all references

* fixed lint error

* updated jest config

* more mock data path fixes

* @W-18670301 set default context preset, error handling in trim-extensions

* move `app/components/_index` and other files in `app` dir to `src` dir

* Remove references to outdated `template-retail-react-app`

* update dir structure for non template-chakra-storefront` templates

* fix bad pwa-kit-dev reference to `app/main` and `app/ssr` (now `src/main` / `src/ssr`)

* @W-18670301 - added prettier and tuned tests

* fixed lint errors

* straggler rename `app/...` => `src/...`

* change log

* Add to CHANGELOGs

* add missing CHANGELOG

* Fix inconsistencies: `app/static` => `src/static` and `/static` => `src/static`

* Move `app/static` => `src/static` for `pwa-kit-dev` and `test-commerce-sdk-react`

* don't run tests on temporarily broken `extension-chakra-storefront`

* fix path typo

* fixed windows path

* pull latest label from PR for skip changelog action

* updated name for get_pr

* fix translation pathing and associated failing tests

* [feature] Rename V4 `app` dir to => `src` @W-18895152@ (#2693)

* move `app/components/_index` and other files in `app` dir to `src` dir

* Remove references to outdated `template-retail-react-app`

* update dir structure for non template-chakra-storefront` templates

* fix bad pwa-kit-dev reference to `app/main` and `app/ssr` (now `src/main` / `src/ssr`)

* straggler rename `app/...` => `src/...`

* Add to CHANGELOGs

* add missing CHANGELOG

* Fix inconsistencies: `app/static` => `src/static` and `/static` => `src/static`

* Move `app/static` => `src/static` for `pwa-kit-dev` and `test-commerce-sdk-react`

* don't run tests on temporarily broken `extension-chakra-storefront`

* fix path typo

* fix translation pathing and associated failing tests

* Refactor `pwa-kit-create-app` handlebars template files to new dir structure

* drop `@salesforce` from template namespace since we're not publishing to NPM, update var name to reflect

* Remove remaining references to `@salesforce/chakra-storefront`

* fix naming to remove `@salesforce/chakra-storefront`

* remove `@salesforce` folder name

* Revert "remove `@salesforce` folder name"

This reverts commit 34877b1.

* remove `@salesforce` move files instead of rename

* Migrate a bunch of `retail-react-app` strings to `chakra-storefront`

* delete *-ext and `*-no-ext` CI runs and generator variants because we no longer have extensibility

* * Fix bad merge conflict, force everything to `4.0.0-extensibility-preview.5`
* Fix `routes.tsx` and `routes.tsx.hbs`

* fix failing test

---------

Co-authored-by: Jainam Sheth <j.sheth@salesforce.com>
Co-authored-by: Jainam Sheth <99490559+shethj@users.noreply.github.com>
Co-authored-by: Alex Vuong <alex.vuong@salesforce.com>
Co-authored-by: Yuna Kim <84923642+yunakim714@users.noreply.github.com>
Co-authored-by: Ujwala <59447810+unandyala@users.noreply.github.com>
Co-authored-by: Adam Raya <adamraya@users.noreply.github.com>
Co-authored-by: kzheng <kzheng@salesforce.com>
Co-authored-by: Ken Zheng <33469941+kzheng-sfdc@users.noreply.github.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.

3 participants