Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Schematics - update mechanism to support "wrapper" modules #15380

Closed
17 tasks done
znikola opened this issue Mar 15, 2022 · 0 comments · Fixed by #15431 or #15459
Closed
17 tasks done

Schematics - update mechanism to support "wrapper" modules #15380

znikola opened this issue Mar 15, 2022 · 0 comments · Fixed by #15431 or #15459

Comments

@znikola
Copy link
Contributor

znikola commented Mar 15, 2022

Introduction

With "wrapper" modules soon becoming a standard in Spartacus extensibility mechanism, we have to update installation schematics in order to support it.

Why do we have to do it

Before we answer that, we have to first explain the following: before "wrapper" modules, we didn't have a case of cross-feature dependencies, where FeatureA was extending FeatureB (e.g. Digital Payments now extends the Checkout). Therefore, the schematics were able to install features in a non-deterministic manner, where the order of installation didn't matter.
Now, we face a challenge where we have to take care of the order in which features are installed, as well as imported to spartacus-features.module.ts.

Changes and algorithm

The accommodate the "wrapper" modules, the following needs to be changed:

  • Improve how the graph is created, and take into an account the sub-features cross dependencies - e.g. B2B checkout depends on the Checkout, and therefore it must be ordered after it.

  • When running ng add @spartacus/schematics, we need to do a deep dependency analysis as the very first step (it will be explained later why it should be the first step) in the whole process, in order to figure out which libraries need to installed as dependency of the library which is currently being installed. This includes figuring out transitive dependencies as well.

  • As a reminder, we have two types of dependencies:

    • peer dependencies, which are required have to be installed using our package manager. One example is if we import e.g. a cart model interface from the cart library. This requires the cart library to be installed, but it doesn't require the cart feature to be configured (i.e. doesn't require "cart-base-feature.module.ts" to exist).
    • on the other hand, some features require other features to already be set up in order to work properly. E.g. Checkout must ensure the Cart and Order are installed and configured.
  • The problematic part of the dependency analysis is the fact we have to run the installation task to install a library, before we can actually trigger its schematics (which are responsible for configuring the feature).

    • The installation task is async, and can't be ran in the middle of the current process). --> TO BE DOUBLE CHECKED, but it seems to be the case. Update - we pulled the feature configs to projects/schematics.
    • One solution could be to pull all the feature configs from the feature libraries to the @spartacus/schematics, which then eliminates the need to install the feature library before running its schematics. This means we will first generate the feature library, and then run the installation task to actually install the package to node_modules.
  • As part of the analysis step, we should also verify if the required features are already installed and / or configured. Let's call this check isFeatureSafeToConfigure()), and the verification is as follows:

    • If the feature is already configured, we can safely proceed with the process. But how to determine if the feature is configured? We will use the same check as described below (look for recognizeFeature().
    • If the feature is not configured, we can not proceed, and will abort the process with an appropriate message which explains why we can not proceed. The reason why we don't want to install and configure the potentially missing features is a case when customers might've dismantled the required feature's module - in this case we would install the "missing" feature again, which is a wrong behavior.
    • The only exceptions to the above case are the following cases:
      • when Spartacus is being added for the very first time. Perhaps there is an already coded check which we can use to determine if Spartacus is already configured, and we can set this to a nested internal object in the schematics options (to be checked if this is possible). For this to work, we have to perform the analysis as the very first step in the process, before we actually scaffold the Spartacus file structure.
      • In case we're doing a "dirty" installation in the application which already has Spartacus configured, and we need to install e.g. Checkout feature: we can check if the app's package.json contains the @spartacus/checkout dependency. If it doesn't, it means the Checkout wasn't even installed before, and we can safely proceed to generate the default configuration as if it was a clean installation
    • What can be used to analyze if the feature is configured? We will use a so called "markers", which are just module import identifiers. E.g. when installing Digital Payments feature, we need to check if any Checkout feature is configured (Base, B2B or Scheduled Replenishment) by looking for the CheckoutModule import. Let's call this process recognizeFeature(). We will iterate through the list of feature modules, and look for the marker. For each feature module, we will:
      • Look for the marker in the dynamic imports
      • Fall back to looking in the NgModule's import[] array
  • once the deep analysis is done, the list of features to be installed will also include the set of features which were selected by the customer in the prompt, and we can start installing and configuring features.

  • once the process of installing features begins, we must not repeat the deep dependency analysis, as everything was already analyzed. For this to work, we have to propagate some kind of a flag, as we're invoking another schematic which doesn't have a notion of the previous analysis. The flag's name should indicate the flag is intended for a private usage, and that it shouldn't be passed by external users.

  • Wrapper module schematic

    • it will generate the "wrapper" modules for the given "marker" name. E.g. ng g @spartacus/schematics:wrapper --name=CheckoutModule
    • The schematic is private
    • We need to expand the FeatureConfig's options by adding a new config option called wrappers (the name is TBD):
      /**
       * Configuration for generating the wrapper modules.
       *
       * The key is the feature name for which wrapper module is being generated.
       * The value is the feature module configuration which will be
       * used to determine if the wrapper module is already created.
       *
       * E.g., the B2B Checkout's configuration is:
       *
       *
       * wrappers: {
       *  [CLI_CHECKOUT_BASE_FEATURE]: {
       *  importPath: '@spartacus/checkout/base',
       *  name: 'CheckoutModule',
       * }
       *
       * // TODO:#schematics - adjust the import paths
       * While the CDC's configuration is a bit more complex:
       * wrappers: {
       *  [CLI_USER_ACCOUNT_FEATURE]: {
       *  importPath: '@spartacus/cdc/account',
       *  name: 'CdcAccountModule',
       *  },
       *  [CLI_USER_PROFILE_FEATURE]: {
       *    importPath: '@spartacus/cdc/profile',
       *    name: 'CdcProfileModule',
       *   },
       *  },
       */
      wrappers?: Record<string, Module>;
    • The schematic will be invoked on the fly, during the installation of features. E.g. when installing Scheduled Replenishment Checkout, the installer will:
      • figure out the Repl's feature dependencies and order them
      • start installing the features
      • when it reaches the installation of B2B Checkout, it will invoke the wrapper schematic for it. But how would the installer know it needs to invoke the schematic? It will know by looking at the .wrappers schematic config of the B2B Checkout feature. It will use it to generate the arguments for the wrapper schematics: --feature=CheckoutModule --import=@spartacus/checkout/base
      • [schematic] will look use the given "marker" name and iterate through the installed feature modules. Once it finds a module which contains the identifier of CheckoutModule, it will start examining it.
      • [schematic] will first check if the CheckoutModule is statically imported from the given import path. If so, the wrapper module is already created, and we've just found it.
      • [schematic] if the static import was not found, we need to confirm if CheckoutModule is being dynamically imported. If so, we found a vanilla feature configuration module, and we need to:
        • create the wrapper module
        • switch the dynamic import from vanilla's feature configuration module to point to the newly created wrapper module
      • [installer] Once the wrapper module has been created, the installation of B2B Checkout assumes the existence of wrapper module, and continues to eagerly (set the lazy flag to false) install the CheckoutB2BModule by statically importing it to the wrapper module, which looks like this now:
      import { NgModule } from '@angular/core';
      import { CheckoutB2BModule } from '@spartacus/checkout/b2b';
      import { CheckoutModule } from '@spartacus/checkout/base';
      @NgModule({
        imports: [CheckoutModule, CheckoutB2BModule],
      })
      export class CheckoutWrapperModule {}
      • [installer] when it reaches the installation of Repl Checkout, it will invoke the wrapper schematic for it, and repeat the process. The generated schematic arguments will be --feature=CheckoutB2BModule --import=@spartacus/checkout/b2b (note the B2B module this time).
      • [installer] the order of the feature modules imports will be sorted according to the cross-feature graph. In case the NgModule's imports[] contains any import which is not from @spartacus, we won't perform the ordering. Instead we will import the feature module at the end of the imports array, and will generate a comment in the code above it saying "please make sure this import is ordered correctly".
      • [installer] if Digital Payments is also to be installed, the process is repeated. At the end, the checkout wrapper module will look like this:
      import { NgModule } from '@angular/core';
      import { CheckoutB2BModule } from '@spartacus/checkout/b2b';
      import { CheckoutModule } from '@spartacus/checkout/base';
      import { CheckoutScheduledReplenishmentModule } from '@spartacus/checkout/scheduled-replenishment';
      import { DigitalPaymentsModule } from '@spartacus/digital-payments';
      @NgModule({
        imports: [
          CheckoutModule,
          CheckoutB2BModule,
          CheckoutScheduledReplenishmentModule,
          DigitalPaymentsModule,
        ],
      })
      export class CheckoutWrapperModule {}
      while the checkout feature module looks like:
      import { NgModule } from '@angular/core';
      import {
        checkoutB2BTranslationChunksConfig,
        checkoutB2BTranslations,
      } from '@spartacus/checkout/b2b/assets';
      import { CheckoutB2BRootModule } from '@spartacus/checkout/b2b/root';
      import {
        checkoutTranslationChunksConfig,
        checkoutTranslations,
      } from '@spartacus/checkout/base/assets';
      import {
        CheckoutRootModule,
        CHECKOUT_FEATURE,
      } from '@spartacus/checkout/base/root';
      import {
        checkoutScheduledReplenishmentTranslationChunksConfig,
        checkoutScheduledReplenishmentTranslations,
      } from '@spartacus/checkout/scheduled-replenishment/assets';
      import { CheckoutScheduledReplenishmentRootModule } from '@spartacus/checkout/scheduled-replenishment/root';
      import { provideConfig } from '@spartacus/core';
      @NgModule({
        imports: [
          CheckoutRootModule,
          CheckoutB2BRootModule,
          CheckoutScheduledReplenishmentRootModule,
        ],
        providers: [
          provideConfig({
            featureModules: {
              [CHECKOUT_FEATURE]: {
                module: () =>
                  import('./checkout-wrapper.module').then(
                    (m) => m.CheckoutWrapperModule
                  ),
              },
            },
          }),
          provideConfig({
            i18n: {
              resources: checkoutTranslations,
              chunks: checkoutTranslationChunksConfig,
            },
          }),
          provideConfig({
            i18n: {
              resources: checkoutB2BTranslations,
              chunks: checkoutB2BTranslationChunksConfig,
            },
          }),
          provideConfig({
            i18n: {
              resources: checkoutScheduledReplenishmentTranslations,
              chunks: checkoutScheduledReplenishmentTranslationChunksConfig,
            },
          }),
        ],
      })
      export class CheckoutFeatureModule {}
      and digital payments feature module looks like (no dynamic import, and no root module import).
      import { NgModule } from '@angular/core';
      import { I18nConfig, provideConfig } from '@spartacus/core';
      import {
        dpTranslationChunksConfig,
        dpTranslations,
      } from '@spartacus/digital-payments/assets';
      @NgModule({
        imports: [],
        providers: [
          provideConfig(<I18nConfig>{
            i18n: {
              resources: dpTranslations,
              chunks: dpTranslationChunksConfig,
              fallbackLang: 'en',
            },
          }),
        ],
      })
      export class DigitalPaymentsFeatureModule {}

Additional tasks

Additional tasks that we can do are:

  • Introduce a new prompt which will users if they're using B2C or B2b features.
    • The result of this prompt will be used later to install the B2B variant of some of the features (e.g. we can immediately install B2B checkout)
@znikola znikola self-assigned this Mar 15, 2022
@znikola znikola added this to To Do in Architecture (Blamed) via automation Mar 15, 2022
@znikola znikola moved this from To Do to In Progress in Architecture (Blamed) Mar 24, 2022
@Xymmer Xymmer added this to the 5.0 milestone Apr 21, 2022
znikola added a commit that referenced this issue Jun 8, 2022
@Xymmer Xymmer moved this from In Progress to Merge to Epic in Architecture (Blamed) Jun 8, 2022
@Xymmer Xymmer moved this from Merge to Epic to QA from Server After Merge in Architecture (Blamed) Jun 8, 2022
surya-prakash-singh1 added a commit that referenced this issue Jul 7, 2022
* refactor: Enable strict mode for storefrontlib (#15770)

* feature/CXSPA-390 (#15796)

fixed my company drop down arrow

* fix: minimum width and height adjustment to buttons and links on mobile (#15784)

* feature/CXSPA-440
Added min height at mobile screen size for elements that were not passing light house seo test

* feature/CXSPA-440
added more changes for link and button min height and width

* feature/CXSPA-440
prettier clean up

Co-authored-by: Miguel Estrada <15113219+developpeurweb@users.noreply.github.com>

* feat: add child component to productDetailsTab (#15808)

A child component is injected within ProductDetails tab, below the product details text. 
This change has been made to allow PDF component to be displayed below product details.

* style: fix product listing buttons (#15659)

* feature/CXSPA-233
updated button sizes

* feature/CXSPA-233
fixed button sizes

* Trigger Build

* Trigger Build

* Fixed width issue of buttons

* Fixed failing test cases

* Trigger Build

* Trigger Build

Co-authored-by: Miguel Estrada <15113219+developpeurweb@users.noreply.github.com>
Co-authored-by: Giancarlo Cordero Ortiz <46171897+giancorderoortiz@users.noreply.github.com>
Co-authored-by: Dalvir Singh <dalvir.singh@sap.com>

* fix: Lock CI jobs to use angular 13 instead of the latest tag (#15821)

context:

- the ci workflow contained some jobs that needed angular to be installed such as lighthouse, unit test lib, and unit core. However, they downloaded the angular/cli with the @latest tag. Reason being, we wanted the pipeline to run with the latest angular and not a specific angular 13 minor/patch.
- 5 days ago the latest tag was set to 14.0.0, therefore causing issues to our pipeline.

closes https://jira.tools.sap/browse/CXSPA-565

* test: fix strict mode issues in attribute related tests (#15819)

closes #15818

* feat: New schematics installer mechanism (#15459)



closes #15380

* feat: support attribute types with additional values (#15699)

 4 additional attribute types: Dropdown and radio group with additional alphanumeric or numeric values
Closes #15688

* feat: Add to cart from order history and saved cart (#15736)

Add Buy It Again from order history
Add Add to Current Cart from saved cart

closes https://jira.tools.sap/browse/CXSPA-308

* chore: Re-wire the events in checkout for better readability and tracing (#15789)

closes https://jira.tools.sap/browse/CXSPA-519

* feat: integrate with store finder service (#15820)

feat: integrate with store finder service

CXSPA-544

* chore: migration schematics and documentation for new configurator attribute types

closes #15689

* feat: Merchant can customize Product Carousels with inner components ex. Add To Cart  (#15817)

* Add add-to-cart to product carousel

* Cannot use absolute path outside of spec files - exporting ProductCarouselComponent sub-component

* Using mock ProductCarouselItem for product-carousel tests and moving UI tests to product-carousel-item
Providing type for Product
Removing unnecessary config in product-carousel module as it goes unseen by the customer anyway
SCSS for showing multiple CMS components in product-carousel-item

* E2E test for customizing Product Carousel component with Add to Cart button

* Setting the ChangeDetectionStrategy for ProductCarouselItemComponent to OnPush

* Adding documentation for breaking change for ProductCarouselComponent

Updating migration docs to have selector of new CarouselItemComponent

* Provide empty string for the Carousel Item's image if the product has no name

Co-authored-by: i822892 <arkadiy.sukharenko@sap.com>
Co-authored-by: Giancarlo Cordero Ortiz <46171897+giancorderoortiz@users.noreply.github.com>

* fix: Move cart core code out of the 'main' chunk (#15816)

closes https://jira.tools.sap/browse/CXSPA-542

* add password visibility test (#15812)

* add password visibility test

* password visibility test

* changes requested for pwd visibility

* removed duplicated clear from password test

Co-authored-by: Brian Gamboc-Javiniar <brian_javiniar@hotmail.com>

* test: Password visibility e2e changes

* chore: Adjust CPQ user (#15829)

Adjust CPQ user and its credentials for cypress tests

Closes #15828

* doc: Update schematics readme (#15841)

This PR updates the internal schematics README.md file.

* fix: wait with bootstraping the app until OAuth params are checked in the URL (#15831)

### Context
When OAuth implicit or code flow is configured, on page start (especially when returing from the external auth server to Spartacus), we attempt to retrieve the access token from the URL, with the method `authService.checkOAuthParamsInUrl()`. During the execution of this method, the long OAuth authorization_code handshake can happen. Therefore the access token might be retireved with a delay.

### Before fix
Previously we didn’t wait until the access token is retireved, but started bootstrapping the application right away, including running of the route guards. Especially it was possible to run the AuthGuard, before we retireved the access token by the method `authService.checkOAuthParamsInUrl()`. This could result in AuthGuard blocking the navigaiton becasue the user was **not yet** logged in (however awaiting the access token in the background).

### After fix
Now we wait for `authService.checkOAuthParamsInUrl()` to resolve, and only then we proceed with bootstrapping the application and running the guards, including `AuthGuard`.

fixes #13622
fixes CXSPA-405

* feature/CXSPA-524 (#15815)

updated styling for mobile viewport of table header

* test: fix flaky VC e2e tests

Closes #15827

* feature/CXSPA-298 (#15810)

Fixed tablet size input check box alignment

Co-authored-by: Miguel Estrada <15113219+developpeurweb@users.noreply.github.com>

* chore: install VC configurator by default in the internal installation script (#15844)

Previously the Variant Configurator was not installed by default in our internal installation script `/install/run.sh`. It was installed implicitly only in case when installing CPQ extension (with `ADD_CPQ` flag).

Since the the PR #15459 was merged, the CPQ installation is aborted if VC was not installed explicitly before.

In this PR we update the installation script to: install the Variant Configurator first explicitly (by default), and only then conditionally (with `ADD_CPQ` flag) install CPQ extension on top of it.

fixes https://jira.tools.sap/browse/CXSPA-588

* CXSPA-545 BOPIS Store List (#15852)

Add store list components.

CXSPA-545

Co-authored-by: Christopher Michael <chris.michael@sap.com>
Co-authored-by: mechris3 <mechris3@hotmail.com>
Co-authored-by: cawmichae <cawmichae@users.noreply.github.com>
Co-authored-by: I554698 <surya.singh@sap.com>

* refactor: Enable strict mode for core lib  (#15807)

* refactor: Remove media component deprecations from 4.2 (#14236)

Deprecation removals for #13172

* feat: CXSPA-600 Remove deprecated errors$ field (#15867)

* feat: Enhance overview normalizer to display value price (#15866)

Enable displaying value prices on the overview page for VC products

Closes: #15840

* fix: Spinner in guest checkout after event refactoring (#15870)

fixes guest checkout infinite loop in delivery address after checkout event refactoring

https://jira.tools.sap/browse/CXSPA-603

* feature/CXSPA-591 (#15859)

fixed import products modal button

* chore: lint integration libs with i18n-lint (#15877)

`i18n-lint` checks if no hardcoded texts appear in the HTML templates

Previously integration-libs were not linted, but only feature-libs and the storefrontlib. Now integration libs are also linted.

Btw. removed the `--exclude` of node_modules folder, as being redundant - node_modules don't overlap with any allowlisted files.

fixes https://jira.tools.sap/browse/CXSPA-627

* chore: AuthRedirectService methods deprecation cleanup and migration (#14481)

Closes: #14459

* chore: skip flaky B2B saved cart E2E test for now

* chore: improve guest checkout e2e tests (#15876)

* Changed font-weight and size to fix the amp button contrast

Co-authored-by: Miguel Estrada <15113219+developpeurweb@users.noreply.github.com>

* style: change order replenish table styling to match my company table

* style: Added padding to the order date

Co-authored-by: Miguel Estrada <15113219+developpeurweb@users.noreply.github.com>

* chore: Remove deprecated notices for vouchers. (#15864)

* chore: Remove deprecated styling class for quick order form component

* chore: Protect deprecated cmfRef in ComponentWrapperDirective (#15878)

* refactor: Enable strict mode for organization lib

* chore: remove deprecated code from OccEndpoints model

closes https://jira.tools.sap/browse/CXSPA-597

* chore: User service deprecation

* chore: Remove deprecated keyboard focus config and on navigate focus … (#15871)

* fix: Site freezes after agent logs out of ASM (#15880)

* Revert "Site freezes when logging out of ASM (#14914) (#15375)"

* Explicitly set logout process back to false after the operation has completed

* Create e2e and unit tests to verify new logout behavior

* Create duplicate e2e util functions for waitForPage and waitForCategory in central navigation.ts. To be consolidated in future ticket.

* Improving billing address e2e tests (#15891)

* Removing it blocks

* Asserting on registration is not in scope for this test

* No need to enter this addres again

* Using a shortcut to register and login test user

* Trigger Build

* Trigger Build

Co-authored-by: KateChuen <45409515+KateChuen@users.noreply.github.com>
Co-authored-by: KateChuen <kate.chuen.cheong@sap.com>

* fix: Allow to place order during midnight time (#15901)

- remove date bug, where 24h time for midnight translates to 24:xx instead of 00:xx. Basically, backend for the replenishment endpoint does not accept 24 for midnight, but 00 / reference to fix conversion https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle

* test: Enhance checkout replenishment e2e (#15887)

included fixtures for the checkout replenishment e2e and testing with premium delivery instead of standard delivery like all our other checkout e2e does

closes https://jira.tools.sap/browse/CXSPA-530

* test: Fix anonymous consent config e2e (#15902)

Change the user journey in the e2es by making user anonymous consents gets loaded before creating the user and navigating to the consent page.

closes https://jira.tools.sap/browse/CXSPA-653

* feat: Fetching products in carousel with stock information (#15838)

* Fetching products in carousel with stock information

* As PRODUCT_SCOPE in ProductCarouselComponent has been changed into a list, using other scopes when fetching products is redundant

* Rewriting unit test for ProductCarouselComponent to use done() callback for assertions in subscription

* Trigger Build

* Adding new ProductScope for stock information only - using this scope instead of DETAILS for ProductCarousel

Co-authored-by: pla <plabadie@users.noreply.github.com>

* chore: improve clear cart core e2e tests (#15886)

* CXSPA-554 Integrate store stock level (#15912)

Integrate pickup in store with the stock level API.

Co-authored-by: I554698 <surya.singh@sap.com>
Co-authored-by: mechris3 <mechris3@hotmail.com>
Co-authored-by: cawmichae <cawmichae@users.noreply.github.com>

* fix: Lint issue

* test: Improve currency checkout page core e2e (#15909)

closes https://jira.tools.sap/browse/CXSPA-656

* chore: fix "Public API Changes" bot (#15883)

### Improvements
- make the "Public API changes" bot back working in CI (get rid of all the errors in the script)
  - side effect: reduce the time of executing "Public API changes" bot from 2h back to ~30min (see [test PR](https://github.com/SAP/spartacus/actions/runs/2580268027))
- reduced the warnings noise in logs:
  - disabled API-extractor warnings not relevant in our project, e.g. [warning for missing release tags like alpha/beta/internal/public in our TSDocs](https://api-extractor.com/pages/messages/ae-missing-release-tag/),
  - disabled API-extractor warnings about missing exports, because sometimes caused false-positive warnings e.g. when an interface is exported, but from a different library
  - disabled all warnings from TSDocs parser (checking the syntax of TSDocs is not in scope of our breaking changes detection bot; generated ~30k warnings per script execution before)
- reduced the warnings noise in the report comment:
  - API Extractor warnings are not printed to the report comment, but only in the console of the script - to avoid fake reports because of a different file path, for example:
     ```diff
     -// /github/workspace/branch-clone/dist/<...file path> - <warning message>
     +// /github/workspace/dist/<...file path> - <warning message>
    ```

### Changes
- analyze d.ts instead of TS files in dependent libraries (e.g. when finding `import {X} from '@spartacus/core'`, analyze `dist/core/.../.d.ts` instead of `/projects/core/.../.ts`)
- disable api-extractor warning of type `ae-missing-release-tag` and `ae-forgotten-export`
- disable all TSDoc warnings (of type `tsdocMessageReporting`)
- disable reporting warnings in the markdown report, but leave them in the script console output
- add explicit return type for `APP_INITIALIZER`s that returned `()=>Promise<Config>` - to avoid api-extractor error `ERROR: Failed to fetch entity for import() type node: import("@spartacus/core").Config`
  - by the way, I added also missing return types for other `APP_INITIALIZER`s, which was not essential for this PR
- by the way, removed some redundant JSDoc notices `@member` from `occ-models.ts` - which caused warnings in api-extractor and were redundant

### Implementation notes
Previously for API Extractor tool we used the tsconfig with path mappings to source code (e.g. for resolving an import from `@spartacus/core` it looked up the source code TS files in `projects/core/*`).

According to https://api-extractor.com/pages/messages/ae-wrong-input-file-type/ , it seems that we were using the api-extractor tool not in a way that the tool's authors assumed. We analyzed TS files (only in dependency packages), but api-extractor expects to analyze d.ts

Moreover, since API Extractor v7.24.0 (released 2022-05-14), analyzing TS files throws an error (see [changelog](https://github.com/microsoft/rushstack/blob/main/apps/api-extractor/CHANGELOG.md#7240) and [troubleshooting page](https://api-extractor.com/pages/messages/ae-wrong-input-file-type/)), which caused our CI script for api-extractor to fail since 2022-05-14.

In this PR, we start using the "production" version of `tsconfig` (`tsconfig.app.prod.json` instead of `tsconfig.json`), which uses `"paths"` mapping to the `/dist` folder, which contains d.ts files.

* doc: define the max version of Angular version per Spartacus version (#15001)

* chore: fix flaky cart e2e test (#15916)

* chore: add important note in GH release template to avoid unnecessary commits and tags

* chore: add important notes for new releases

* Adding instructions for core tag

* refactor: make anchors compliant with checkmarx (#15932)

Anchors tags have been refactored to be compliant with the new pipeline security check.
Attribute 'rel' has been added to anchors that are using _blank as target.

* test: Improve asm flaky e2es (#15929)

Notes:

- removed redundant registration that happens twice at the beginning and other duplicate tasks
- make sure to wait for asm input box to no longer be disabled before typing
- removed unused functions
- removed duplicates and reuse the intended function for customer emulation tests
- instead of visiting a page by using cy.visit, we use the my-account dropdown instead. Visiting pages is not a user journey on how a user would navigate the page. Also, visiting a page is like a refresh as it's changing the url and going to that route through the browser instead of making it a user journey (an end to end test).
- in addition, the visit caused most of the customer agent session timeout because of some existing bug in the feature

---

important:

- reproducible asm agent session timeout as shown in videos by just waiting ~6 mins in a page. Needs fix in feature for token expiration instead, however, the videos in the issue shows that flakiness as well (not related to session timeout), which should be fixed by this PR

closes https://jira.tools.sap/browse/CXSPA-661

* chore: Spinner on use my location, pick up in store button etc

* fix: remove cart with invalid products (#14228) (#15548)

* changes to addEntries

* added test case

* delete cart test update

* updated test

* test refactor

* account for UNKNOWN_ERROR as well

* add test for UNKNOWN_ERROR

* chore: Changes for New Schematics and otherminor changes

* fix: yarn config updates

* fix: add .scss suffix in schematic

* fix: Schematics and Test Cases

* fix: Schematics Test for pick up in store

* fix: Schematics Test for pick up in store Snapshot updates

* chore: fix sementic test case

* fix: test case

* feat: remove storefinder dependency

* fix: Test Case

Co-authored-by: Weizheng Gao <44440575+WeizhengSap@users.noreply.github.com>
Co-authored-by: morganm58 <mikel.morgan@sap.com>
Co-authored-by: Miguel Estrada <15113219+developpeurweb@users.noreply.github.com>
Co-authored-by: Florent Letendre <florent.letendre01@sap.com>
Co-authored-by: Giancarlo Cordero Ortiz <46171897+giancorderoortiz@users.noreply.github.com>
Co-authored-by: Dalvir Singh <dalvir.singh@sap.com>
Co-authored-by: Brian Gamboc-Javiniar <brian_javiniar@hotmail.com>
Co-authored-by: Christoph Hinssen <33626130+ChristophHi@users.noreply.github.com>
Co-authored-by: Nikola Zarić <nikola.zaric.ns@gmail.com>
Co-authored-by: Parthlakhani <parth.lakhani@sap.com>
Co-authored-by: justinlee01 <47992455+justinlee01@users.noreply.github.com>
Co-authored-by: i822892 <arkadiy.sukharenko@sap.com>
Co-authored-by: KateChuen <45409515+KateChuen@users.noreply.github.com>
Co-authored-by: Gilberto Alvarado <gilberto.alvarado.jimenez@sap.com>
Co-authored-by: LarisaStar <61147963+Larisa-Staroverova@users.noreply.github.com>
Co-authored-by: Krzysztof Platis <platonn.git@gmail.com>
Co-authored-by: Christopher Michael <chris.michael@sap.com>
Co-authored-by: mechris3 <mechris3@hotmail.com>
Co-authored-by: cawmichae <cawmichae@users.noreply.github.com>
Co-authored-by: I554698 <surya.singh@sap.com>
Co-authored-by: Caine Rotherham <rotherham.c@gmail.com>
Co-authored-by: pawelfras <fras.pawel@yahoo.com>
Co-authored-by: Patryk Smul <psmul@divante.pl>
Co-authored-by: Radhep Sabapathipillai <34665674+RadhepS@users.noreply.github.com>
Co-authored-by: pla <plabadie@users.noreply.github.com>
Co-authored-by: Mateusz Kolasa <mateusz.kolasa@sap.com>
Co-authored-by: Jeremy Laverdiere <88747151+bullfroggy-sap@users.noreply.github.com>
Co-authored-by: KateChuen <kate.chuen.cheong@sap.com>
Co-authored-by: Andi Braimllari <101869667+I539321@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment