Skip to content

Commit

Permalink
Merge pull request #25 from CoreMedia/release-2304
Browse files Browse the repository at this point in the history
Changes for Release 2304.0.0
  • Loading branch information
pitgrap authored May 24, 2023
2 parents 08c1c0c + 1c57cbf commit 7c22146
Show file tree
Hide file tree
Showing 42 changed files with 5,187 additions and 6,161 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Use pnpm
uses: pnpm/action-setup@v2
with:
version: 7
version: 8

- name: Use Node.js
uses: actions/setup-node@v3
Expand Down
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## v2304.0.0

*Released 24.05.2023*

### Breaking Changes:

- Updated pnpm to version 8
- Updated `schema.json` to CoreMedia Content Cloud v11 - 2304.1 and to the latest CoreMedia Campaign Service changes


### Bugfixes and Changes:

- Mock data now works with all sites and locales, but kept aligned to calista.
- Updated minor versions of dependencies

---

## v2301.1.0

*Released 08.03.2023*
Expand All @@ -15,7 +32,6 @@
### Bugfixes and Changes:

- Updated minor versions of dependencies
- Optimized and made View Models more robust, if (commerce) properties are null

---

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM node:18
RUN npm install -g pnpm@7
RUN npm install -g pnpm@8
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![CoreMedia Labs Logo](https://documentation.coremedia.com/badges/banner_coremedia_labs_wide.png)

![CoreMedia Content Cloud Version](https://img.shields.io/static/v1?message=2301&label=CoreMedia%20Content%20Cloud&style=for-the-badge&labelColor=666666&color=672779
![CoreMedia Content Cloud Version](https://img.shields.io/static/v1?message=2304&label=CoreMedia%20Content%20Cloud&style=for-the-badge&labelColor=666666&color=672779
"This badge shows the CoreMedia version this project is compatible with.
Please read the versioning section of the project to see what other CoreMedia versions are supported and how to find them."
)
Expand All @@ -9,6 +9,9 @@ Please read the versioning section of the project to see what other CoreMedia ve
If a project is inactive it means that the development has been discontinued and won't support future CoreMedia versions."
)

![Build](https://github.com/CoreMedia/coremedia-headless-client-react-pwa/actions/workflows/ci.yml/badge.svg?branch=main)
![Audit](https://github.com/CoreMedia/coremedia-headless-client-react-pwa/actions/workflows/audit.yml/badge.svg?branch=main)

# Spark - The React Example Application

![Picture of Spark](docs/img/spark.jpg)
Expand Down
2 changes: 1 addition & 1 deletion apps/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:1.22-alpine
FROM nginx:1.24-alpine

COPY spark/dist /usr/share/nginx/html
COPY standalone-fragment/dist /usr/share/nginx/html/standalone
Expand Down
2 changes: 1 addition & 1 deletion apps/spark/docs/assets/main.js

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions apps/spark/docs/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,9 @@ blockquote {
.has-menu .col-menu {
visibility: visible;
transform: translate(0, 0);
display: grid;
align-items: center;
grid-template-rows: auto 1fr;
grid-gap: 1.5rem;
display: flex;
flex-direction: column;
gap: 1.5rem;
max-height: 100vh;
padding: 1rem 2rem;
}
Expand Down Expand Up @@ -911,7 +910,7 @@ a.tsd-index-link {
margin-right: 0.8rem;
}

@media (min-width: 1024px) {
@media (min-width: 1025px) {
.col-content {
margin: 2rem auto;
}
Expand Down
4 changes: 3 additions & 1 deletion apps/spark/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
<div class="tsd-page-title">
<h2>CoreMedia Headless Client App</h2></div>
<div class="tsd-panel tsd-typography"><p><img src="https://documentation.coremedia.com/badges/banner_coremedia_labs_wide.png" alt="CoreMedia Labs Logo"></p>
<p><img src="https://img.shields.io/static/v1?message=2301&label=CoreMedia%20Content%20Cloud&style=for-the-badge&labelColor=666666&color=672779" alt="CoreMedia Content Cloud Version" title="This badge shows the CoreMedia version this project is compatible with.
<p><img src="https://img.shields.io/static/v1?message=2304&label=CoreMedia%20Content%20Cloud&style=for-the-badge&labelColor=666666&color=672779" alt="CoreMedia Content Cloud Version" title="This badge shows the CoreMedia version this project is compatible with.
Please read the versioning section of the project to see what other CoreMedia versions are supported and how to find them.">
<img src="https://img.shields.io/static/v1?message=active&label=Status&style=for-the-badge&labelColor=666666&color=2FAC66" alt="Status" title="The status badge describes if the project is maintained. Possible values are active and inactive.
If a project is inactive it means that the development has been discontinued and won&#39;t support future CoreMedia versions."></p>
<p><img src="https://github.com/CoreMedia/coremedia-headless-client-react-pwa/actions/workflows/ci.yml/badge.svg?branch=main" alt="Build">
<img src="https://github.com/CoreMedia/coremedia-headless-client-react-pwa/actions/workflows/audit.yml/badge.svg?branch=main" alt="Audit"></p>

<a href="#spark---the-react-example-application" id="spark---the-react-example-application" style="color: inherit; text-decoration: none;">
<h1>Spark - The React Example Application</h1>
Expand Down
44 changes: 22 additions & 22 deletions apps/spark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"build-storybook": "build-storybook -o dist/storybook"
},
"dependencies": {
"@apollo/client": "^3.7.9",
"@coremedia-labs/graphql-layer": "workspace:^2.0.0",
"@coremedia-labs/preview-integration": "workspace:^1.0.0",
"@coremedia-labs/view-dispatcher": "workspace:^1.0.0",
"@js-joda/core": "^5.5.2",
"@js-joda/timezone": "^2.17.2",
"@apollo/client": "^3.7.14",
"@coremedia-labs/graphql-layer": "workspace:^",
"@coremedia-labs/preview-integration": "workspace:^",
"@coremedia-labs/view-dispatcher": "workspace:^",
"@js-joda/core": "^5.5.3",
"@js-joda/timezone": "^2.18.0",
"crypto-hash": "^2.0.1",
"graphql": "^16.6.0",
"loglevel": "^1.8.1",
Expand All @@ -31,12 +31,12 @@
"react-dom": "^17.0.2",
"react-helmet-async": "^1.3.0",
"react-is": "^18.2.0",
"react-player": "^2.11.2",
"react-player": "^2.12.0",
"react-router-dom": "^5.3.4",
"react-slick": "^0.29.0",
"require-from-string": "^2.0.2",
"slick-carousel": "^1.8.1",
"styled-components": "^5.3.6"
"styled-components": "^5.3.10"
},
"devDependencies": {
"@storybook/addon-actions": "^6.5.16",
Expand All @@ -51,28 +51,28 @@
"@storybook/client-logger": "^6.5.16",
"@storybook/node-logger": "^6.5.16",
"@storybook/react": "^6.5.16",
"@types/node": "^18.14.1",
"@types/react": "^17.0.53",
"@types/react-dom": "^17.0.19",
"@types/node": "^18.16.14",
"@types/react": "^17.0.59",
"@types/react-dom": "^17.0.20",
"@types/react-router-dom": "^5.3.3",
"@types/react-slick": "^0.23.10",
"@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
"@vitejs/plugin-react-swc": "^3.2.0",
"cross-fetch": "^3.1.5",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"@vitejs/plugin-react-swc": "^3.3.1",
"cross-fetch": "^3.1.6",
"dotenv": "^16.0.3",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-storybook": "^0.6.11",
"prettier": "^2.8.4",
"typedoc": "^0.23.25",
"eslint-plugin-storybook": "^0.6.12",
"prettier": "^2.8.8",
"typedoc": "^0.23.28",
"typescript": "^4.9.5",
"vite": "^4.1.4",
"vite": "^4.3.8",
"vitest": "^0.28.5"
},
"browserslist": {
Expand Down
2 changes: 1 addition & 1 deletion apps/spark/src/utils/Campaign/CampaignUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const addCampaignQueryVariables = (
if (campaignEnabled) {
const preview = isPreview();
variables.refinements = currentNavigation ? getRefinementData(currentNavigation, refinement) : [refinement];
variables.previewCampaign = previewCampaignId;
variables.previewCampaignId = previewCampaignId;
variables.modePreviewCampaign = campaignEnabled && preview && previewCampaignId !== undefined;
variables.modePreviewCampaignContent = campaignEnabled && preview && previewCampaignId === undefined;
variables.modeCampaignContent = campaignEnabled && !preview;
Expand Down
26 changes: 13 additions & 13 deletions apps/standalone-fragment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@
"lint:ci": "eslint \"src/**/*.+(ts|tsx)\""
},
"dependencies": {
"@apollo/client": "^3.7.9",
"@coremedia-labs/graphql-layer": "workspace:^2.0.0",
"@apollo/client": "^3.7.14",
"@coremedia-labs/graphql-layer": "workspace:^",
"graphql": "^16.6.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@babel/core": "^7.21.0",
"@types/react": "^17.0.53",
"@types/react-dom": "^17.0.19",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
"@babel/core": "^7.21.8",
"@types/react": "^17.0.59",
"@types/react-dom": "^17.0.20",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"babel-loader": "^9.1.2",
"babel-preset-react-app": "^10.0.1",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.7.3",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"css-loader": "^6.7.4",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"prettier": "^2.8.4",
"style-loader": "^3.3.1",
"prettier": "^2.8.8",
"style-loader": "^3.3.3",
"typescript": "^4.9.5",
"webpack": "^5.75.0",
"webpack": "^5.83.1",
"webpack-cli": "^4.10.0"
},
"browserslist": {
Expand Down
16 changes: 16 additions & 0 deletions bin/pnpm-check.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env node
const { rmSync, unlinkSync } = require("fs");

const isUsingPnpm = process.env.npm_config_user_agent?.startsWith('pnpm');
const isUsingNpm = process.env.npm_config_user_agent?.startsWith('npm');
const isUsingYarn = process.env.npm_config_user_agent?.startsWith('yarn');

if (!isUsingPnpm) {
console.error('\nUse "pnpm install" for installation in this workspace.\n\n' +
'If you don\'t have pnpm, install it via "npm i -g pnpm@8".\n' +
'For more details, go to https://pnpm.io/\n');
rmSync('node_modules', { recursive: true, force: true });
if (isUsingNpm) unlinkSync('package-lock.json');
if (isUsingYarn) unlinkSync('yarn.lock');
process.exit(1);
}
19 changes: 0 additions & 19 deletions bin/pnpm-check/index.js

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@coremedia-labs/headless-client-workspace",
"version": "2301.1.0",
"version": "2304.0.0",
"description": "Spark - The React client workspace for the CoreMedia Headless Server",
"private": true,
"license": "CoreMedia Open Source License",
"scripts": {
"prepare": "husky install",
"preinstall": "node ./bin/pnpm-check/index.js",
"preinstall": "node ./bin/pnpm-check.js",
"build": "pnpm -r build",
"test": "pnpm -r test",
"lint": "pnpm -r lint",
Expand All @@ -16,9 +16,9 @@
},
"engines": {
"node": "^18",
"pnpm": "^7"
"pnpm": "^8"
},
"packageManager": "pnpm@7.27.0",
"packageManager": "pnpm@8.2.0",
"repository": {
"type": "git",
"url": "https://github.com/CoreMedia/coremedia-headless-client-react.git"
Expand Down
16 changes: 8 additions & 8 deletions packages/graphql-layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"./dist/__downloaded__/schema.json": "./dist/__downloaded__/schema.json"
},
"dependencies": {
"@apollo/client": "^3.7.9",
"cross-fetch": "^3.1.5",
"@apollo/client": "^3.7.14",
"cross-fetch": "^3.1.6",
"dotenv": "^16.0.3",
"graphql": "^16.6.0",
"graphql-tag": "^2.12.6",
Expand All @@ -40,13 +40,13 @@
"@graphql-codegen/typescript": "^2.8.8",
"@graphql-codegen/typescript-operations": "^2.5.13",
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
"@types/node": "^18.14.1",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"@types/node": "^18.16.14",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.4",
"prettier": "^2.8.8",
"ts-node": "^10.9.1"
}
}
Loading

0 comments on commit 7c22146

Please sign in to comment.