Skip to content

Commit

Permalink
Merge branch 'develop' into feature/GH-8499
Browse files Browse the repository at this point in the history
  • Loading branch information
plabadie committed Oct 16, 2020
2 parents 6e3a6c6 + 1718652 commit 694e7d7
Show file tree
Hide file tree
Showing 811 changed files with 3,193 additions and 2,172 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/new-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ assignees: ''
- [ ] `npm run release:styles:with-changelog`
- [ ] `npm run release:schematics:with-changelog`
- [ ] `npm run release:setup:with-changelog` (needed since `3.0.0-next.1`)
- [ ] `npm run release:my-account:with-changelog` (needed since `3.0.0-next.1`)
- [ ] `npm run release:organization:with-changelog` (needed since `3.0.0-next.1`)
- [ ] `npm run release:cdc:with-changelog` (since 2.1.0-next.0 - publish under `0.<packages-version>.0` eg. `0.201.0-next.0` for first `2.1.0-next.0` release)
- [ ] before the script set the spartacus peerDependencies manually (as we publish it under 0.201.0-next.0 version)
- [ ] Check that the release notes are populated on github (if they are not, update them)
Expand Down
6 changes: 3 additions & 3 deletions .github/api-extractor-action/api-extractor-for-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ cp "$CONFIG_PATH" ./dist/cds/api-extractor.json
api-extractor run --local --verbose
)

# @spartacus/my-account
cp "$CONFIG_PATH" ./dist/my-account/api-extractor.json
# @spartacus/organization
cp "$CONFIG_PATH" ./dist/organization/api-extractor.json
(
cd ./dist/my-account && \
cd ./dist/organization && \
api-extractor run --local --verbose
)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud. Spartacus talks to SAP Commerce Cloud exclusively through the Commerce REST API.

- Documentation is hosted on our dedicated [Spartacus Documentation site](https://sap.github.io/spartacus-docs/).
- Try out a [sample Spartacus storefront](https://spartacus-training.eastus.cloudapp.azure.com/) on our public demo site.
- Try out a [sample Spartacus storefront](https://spartacus-demo.eastus.cloudapp.azure.com/) on our public demo site.
- Technical questions? Get in touch with us on [Stack Overflow](https://stackoverflow.com/questions/tagged/spartacus-storefront).
- Non-technical questions? Join our [Slack workspace](https://join.slack.com/t/spartacus-storefront/shared_invite/zt-i36rvrqe-kNA9RutaT0W17A_jh0Hygg).
- For details on the 2.0 launch, see the [Release Information page](https://sap.github.io/spartacus-docs/release-information/) on our Spartacus documentation site.
Expand Down
22 changes: 11 additions & 11 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -397,38 +397,38 @@
}
}
},
"my-account": {
"organization": {
"projectType": "library",
"root": "feature-libs/my-account",
"sourceRoot": "feature-libs/my-account",
"root": "feature-libs/organization",
"sourceRoot": "feature-libs/organization",
"prefix": "cx",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "feature-libs/my-account/tsconfig.lib.json",
"project": "feature-libs/my-account/ng-package.json"
"tsConfig": "feature-libs/organization/tsconfig.lib.json",
"project": "feature-libs/organization/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "feature-libs/my-account/tsconfig.lib.prod.json"
"tsConfig": "feature-libs/organization/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "feature-libs/my-account/test.ts",
"tsConfig": "feature-libs/my-account/tsconfig.spec.json",
"karmaConfig": "feature-libs/my-account/karma.conf.js"
"main": "feature-libs/organization/test.ts",
"tsConfig": "feature-libs/organization/tsconfig.spec.json",
"karmaConfig": "feature-libs/organization/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"feature-libs/my-account/tsconfig.lib.json",
"feature-libs/my-account/tsconfig.spec.json"
"feature-libs/organization/tsconfig.lib.json",
"feature-libs/organization/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/build-for-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ yarn build:core:lib:cds

echo "-----"
echo "Building SPA app"
cross-env SPARTACUS_BASE_URL=https://spartacus-training.eastus.cloudapp.azure.com ng build storefrontapp
cross-env SPARTACUS_BASE_URL=https://spartacus-demo.eastus.cloudapp.azure.com:8443 ng build storefrontapp
8 changes: 4 additions & 4 deletions ci-scripts/unit-tests-sonar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ if [[ -n "$coverage" ]]; then
exit 1
fi

echo "Running unit tests and code coverage for my-account library"
echo "Running unit tests and code coverage for organization library"
exec 5>&1
output=$(ng test my-account --sourceMap --watch=false --code-coverage --browsers=ChromeHeadless | tee /dev/fd/5)
output=$(ng test organization --sourceMap --watch=false --code-coverage --browsers=ChromeHeadless | tee /dev/fd/5)
coverage=$(echo $output | grep -i "does not meet global threshold" || true)
if [[ -n "$coverage" ]]; then
echo "Error: Tests did not meet coverage expectations"
Expand All @@ -63,8 +63,8 @@ cd projects/schematics
yarn
yarn test
cd ../..
echo "Running unit tests for my-account schematics"
cd feature-libs/my-account
echo "Running unit tests for organization schematics"
cd feature-libs/organization
yarn
yarn test:schematics
cd ../../
Expand Down
3 changes: 1 addition & 2 deletions core-libs/setup/.release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"file": "package.json",
"path": [
"peerDependencies.@spartacus/core",
"peerDependencies.@spartacus/storefront",
"peerDependencies.@spartacus/my-account"
"peerDependencies.@spartacus/storefront"
]
}
]
Expand Down
6 changes: 3 additions & 3 deletions core-libs/setup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@spartacus/setup",
"version": "3.0.0-next.3",
"version": "3.0.0-next.4",
"description": "Includes features that makes Spartacus and it's setup easier and streamlined.",
"homepage": "https://github.com/SAP/spartacus",
"keywords": [
Expand All @@ -19,7 +19,7 @@
"@angular/common": "^10.1.0",
"@angular/core": "^10.1.0",
"rxjs": "^6.6.0",
"@spartacus/core": "3.0.0-next.3",
"@spartacus/storefront": "3.0.0-next.3"
"@spartacus/core": "3.0.0-next.4",
"@spartacus/storefront": "3.0.0-next.4"
}
}
11 changes: 4 additions & 7 deletions core-libs/setup/recipes/b2b/b2b-storefront.module.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
import { ModuleWithProviders, NgModule } from '@angular/core';
import {
CostCenterModule,
provideConfig,
provideDefaultConfig,
provideDefaultConfigFactory,
} from '@spartacus/core';
import { CostCenterModule, provideConfig, provideDefaultConfig, provideDefaultConfigFactory } from '@spartacus/core';
import {
CmsLibModule,
defaultCmsContentConfig,
layoutConfig,
mediaConfig,
StorefrontConfig,
StorefrontModule,
StorefrontModule
} from '@spartacus/storefront';
import { defaultB2bCheckoutConfig } from './config/default-b2b-checkout-config';
import { defaultB2bOccConfig } from './config/default-b2b-occ-config';
import { HttpClientModule } from '@angular/common/http';

@NgModule({
imports: [
HttpClientModule,
StorefrontModule,

// the cms lib module contains all components that added in the bundle
Expand Down
2 changes: 1 addition & 1 deletion core-libs/setup/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import '@angular/localize/init';
import { getTestBed } from '@angular/core/testing';
import '@angular/localize/init';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
Expand Down
31 changes: 30 additions & 1 deletion docs/migration/3_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,33 @@ providers: [
]
```

There's no automation (schematics) planned for this change.
There's no automation (schematics) planned for this change.

### Page Layout
With version 2.1 we've started to add the page layout based style class to the root element of the application (`cx-storefront`). This is done in addition to the style class added by the `PageLayoutComponent`. The style class on the `PageLayoutComponent` was considered to be too limited, as it would not affect selectors outside the page template component.

The implementation of the page layout based style class has moved from the `PageLayoutComponent` to the `PageTemplateDirective`. This results in a cleaner `PageLayoutComponent` with a constructor that no longer requires the lower level `renderer2` service and `ElementRef`. The constructor reduces to the following signature:
```ts
constructor(protected pageLayoutService: PageLayoutService) {}
```

We've also made the `PageLayoutService` a _protected_ argument, so that it is extensible.

There's no automation (schematics) planned to migrate constructors automatically.

### HttpClientModule is not imported in feature libraries

In most cases **HttpClientModule** should only be imported in the root app module, as importing it in lazy-loaded modules can
cause unexpected side effects regarding the visibility of HTTP_INTERCEPTORS, etc. To fix this, we removed all **HttpClientModule** imports from all our
feature libraries and moved them to recipes.

There's no automation (schematics) planned for this change.

### PageMetaService lazy-loading related changes

- Protected method `PageMetaService.getMetaResolver` changed its return type from `PageMateResolver` to `Observable<PageMetaResolver>` so it can take into account page meta resolvers from lazy loaded features.
- PageMetaService's constructor is now using `UnifiedInjector` instead of injecting `PageMetaResolver` token directly.

### ConverterService lazy-loading related changes

- ConverterService constructor is now using `UnifiedInjector` instead of standard `Injector`
5 changes: 0 additions & 5 deletions feature-libs/my-account/README.md

This file was deleted.

1 change: 0 additions & 1 deletion feature-libs/my-account/_index.scss

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 694e7d7

Please sign in to comment.