Skip to content

Commit

Permalink
Merge branch 'main' into tokens/v2
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/tokens/tokensstudio-generated/tokens.json
  • Loading branch information
oliverschuerch committed Aug 13, 2024
2 parents 438d9e7 + be80b68 commit a5d08f9
Show file tree
Hide file tree
Showing 137 changed files with 4,639 additions and 7,403 deletions.
6 changes: 6 additions & 0 deletions .changeset/2024-08-04-update-icons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@swisspost/design-system-icons': minor
---

Added icon number 2612.

5 changes: 5 additions & 0 deletions .changeset/fair-suns-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-components': patch
---

Fixed the `post-card-control` component to use the correct color scheme when placed on nested colored backgrounds.
10 changes: 10 additions & 0 deletions .changeset/large-weeks-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@swisspost/design-system-styles': minor
---

Added four new entry files that enable working with Design Tokens:

- post-external.(s)css: For portal and other external pages
- post-internal.(s)css: For applications and other internal pages
- post-tokens-external.(s)css: External tokens only
- post-tokens-internal.(s)css: Internal tokens only
8 changes: 0 additions & 8 deletions .changeset/loud-boxes-stare.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/orange-pens-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-documentation': patch
---

Fixed the font in the full page previews.
5 changes: 0 additions & 5 deletions .changeset/slow-buttons-provide.md

This file was deleted.

8 changes: 8 additions & 0 deletions .changeset/swift-geckos-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@swisspost/design-system-documentation': minor
'@swisspost/design-system-components': minor
'@swisspost/design-system-components-angular': minor
'@swisspost/design-system-components-react': minor
---

Added the post-logo component, which enables displaying the Post's logo either as a clickable link or as a simple image.
5 changes: 5 additions & 0 deletions .changeset/twenty-cobras-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-documentation': patch
---

Marked the card button and the carousel as deprecated (will be removed in a future version).
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: pnpm e2e:ci

- name: Upload screenshots
uses: actions/[email protected].3
uses: actions/[email protected].4
if: failure()
with:
name: cypress-snapshots
Expand Down
88 changes: 63 additions & 25 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,46 +84,54 @@ jobs:
- name: Install Dependencies
run: pnpm i

# Create Status Files
- name: Create Status Files
run: |
pnpm m ls --depth=0 --json > monorepo.json
pnpm changeset status --output=changesets.json
# Read the status Files and collect release data on the @swisspost/design-system-styles package
- name: Collect Release Data
id: release-data
- name: Prepare Release Data
id: release-data-pre
uses: actions/github-script@v7
with:
script: |
const fs = require('fs')
const monorepo = JSON.parse(fs.readFileSync('monorepo.json', 'utf8'))
const styles = JSON.parse(fs.readFileSync('./packages/styles/package.json', 'utf8'))
const changesets = JSON.parse(fs.readFileSync('changesets.json', 'utf8'))
const release = changesets.releases.find(r => r.name === '@swisspost/design-system-styles')
const monorepo = JSON.parse(fs.readFileSync('monorepo.json', 'utf8'))
const styles = JSON.parse(fs.readFileSync('./packages/styles/package.json', 'utf8'))
fs.unlinkSync('changesets.json')
fs.unlinkSync('monorepo.json')
if (!release) return null
const oldMajor = release.oldVersion.split('.')[0];
const newMajor = release.newVersion.split('.')[0];
const updatedVersions = changesets.releases.reduce((deps, r) => ({ ...deps, [r.name]: r.newVersion }), {})
const dependencies = monorepo
.filter(pkg => pkg.private === false && pkg.version !== undefined)
.reduce((packages, pkg) => ({ ...packages, [pkg.name]: pkg.version }), { ...(styles.peerDependencies ?? {}) })
.filter(pkg => pkg.version !== undefined)
.reduce((packages, pkg) => ({ ...packages, [pkg.name]: updatedVersions[pkg.name] ?? pkg.version }), { ...(styles.peerDependencies ?? {}) })
return {
isMajor: release.type === 'major',
old: {
version: release.oldVersion,
major: oldMajor,
siteUrl: `design-system-version-${oldMajor}`,
dependencies
dependencies: {}
},
new: {
version: release.newVersion,
major: newMajor,
siteUrl: 'design-system'
siteUrl: 'design-system',
dependencies
},
branchName: `release/v${oldMajor}`
branchName: `release/v${oldMajor}`,
tagName: `@swisspost/design-system-styles@${release.oldVersion}`,
tagPattern: `@swisspost/design-system-styles@${oldMajor}.*`
}
- name: Check if changset-release/main Branch exists
Expand All @@ -136,13 +144,52 @@ jobs:
id: release-branch-exists
uses: GuillaumeFalourd/branch-exists@v1
with:
branch: ${{ fromJSON(steps.release-data.outputs.result).branchName }}
branch: ${{ fromJSON(steps.release-data-pre.outputs.result).branchName }}

- name: Check if changeset-release/release/v* Branch exists
id: release-changeset-branch-exists
uses: GuillaumeFalourd/branch-exists@v1
with:
branch: changeset-release/${{ fromJSON(steps.release-data.outputs.result).branchName }}
branch: changeset-release/${{ fromJSON(steps.release-data-pre.outputs.result).branchName }}

- name: Get previous Major Version Tag Name
id: previous-major-version
run: |
tagNameList=$(git tag --list ${{ fromJSON(steps.release-data-pre.outputs.result).tagPattern }} --sort="-refname")
set -- $tagNameList
echo "tagName=$1" >> $GITHUB_OUTPUT
- name: Checkout previous Major Version
if: fromJSON(steps.release-data-pre.outputs.result).isMajor == true
uses: actions/checkout@v4
with:
ref: ${{ steps.release-branch-exists.outputs.exists == 'true' && fromJSON(steps.release-data-pre.outputs.result).branchName || steps.previous-major-version.outputs.tagName }}

- name: Create Status Files
if: fromJSON(steps.release-data-pre.outputs.result).isMajor == true
run: pnpm m ls --depth=0 --json > monorepo.json

- name: Finalize Release Data
id: release-data
uses: actions/github-script@v7
with:
script: |
const fs = require('fs')
const releaseData = ${{ steps.release-data-pre.outputs.result }}
if (!releaseData) return null
if (releaseData.isMajor) {
const monorepo = JSON.parse(fs.readFileSync('monorepo.json', 'utf8'))
const styles = JSON.parse(fs.readFileSync('./packages/styles/package.json', 'utf8'))
releaseData.old.dependencies = monorepo
.filter(pkg => pkg.version !== undefined)
.reduce((packages, pkg) => ({ ...packages, [pkg.name]: pkg.version }), { ...(styles.peerDependencies ?? {}) })
}
return releaseData
- name: Create Summary
id: summary
Expand Down Expand Up @@ -185,16 +232,13 @@ jobs:
uses: actions/checkout@v4
with:
token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }}
ref: changeset-release/${{ github.ref_name }}
ref: changeset-release/main

- name: Setup Node & pnpm
uses: ./.github/actions/setup-pnpm
with:
use_cache: false # do not use the pnpm cache if you do not install any dependencies

- name: Output Status Files
run: pnpm m ls --depth=0 --json > monorepo.json

# Only run this Step if a major release was detected
- name: Update or create Documentation _redirects
id: update-redirects
Expand Down Expand Up @@ -229,16 +273,10 @@ jobs:
const versionsPath = './packages/documentation/public/assets/versions.json'
const versions = JSON.parse(fs.readFileSync(versionsPath, 'utf8'))
const monorepo = JSON.parse(fs.readFileSync('monorepo.json', 'utf8'))
const styles = JSON.parse(fs.readFileSync('./packages/styles/package.json', 'utf8'))
const dependencies = monorepo
.filter(pkg => pkg.private === false && pkg.version !== undefined)
.reduce((packages, pkg) => ({ ...packages, [pkg.name]: pkg.version }), { ...(styles.peerDependencies ?? {}) })
const currentVersion = versions.find(version => version.version.startsWith(release.old.major))
currentVersion.version = release.new.version
currentVersion.dependencies = dependencies
currentVersion.dependencies = release.new.dependencies
if (release.isMajor) {
currentVersion.version = release.old.version
Expand All @@ -250,7 +288,7 @@ jobs:
version: release.new.version,
description: 'Pattern documentation, code snippets and implementation guidelines for the Design System Styles.',
url: `https://${release.new.siteUrl}.post.ch`,
dependencies
dependencies: release.new.dependencies
})
}
Expand Down Expand Up @@ -304,7 +342,7 @@ jobs:
uses: actions/checkout@v4
with:
token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }}
ref: '@swisspost/design-system-styles@${{ fromJSON(needs.collect-release-data.outputs.release-data).old.version }}'
ref: ${{ fromJSON(needs.collect-release-data.outputs.release-data).tagName }}

- name: Remove Documentation versions.json
run: rm -f ./packages/documentation/public/assets/versions.json
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@
},
"devDependencies": {
"@changesets/cli": "2.27.7",
"start-server-and-test": "2.0.4"
"start-server-and-test": "2.0.5"
},
"optionalDependencies": {
"@web-types/lit": "2.0.0-3"
},
"engines": {
"node": "20"
},
"packageManager": "pnpm@9.3.0",
"packageManager": "pnpm@9.6.0",
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": {},
Expand Down
2 changes: 1 addition & 1 deletion packages/changelog-github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
},
"devDependencies": {
"@changesets/parse": "*",
"typescript": "4.9.5"
"typescript": "5.5.4"
}
}
16 changes: 16 additions & 0 deletions packages/components-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @swisspost/design-system-components-angular-workspace

## 1.1.8

### Patch Changes

- Updated dependencies:
- @swisspost/design-system-styles@8.1.0
- @swisspost/design-system-components@8.1.0

## 1.1.7

### Patch Changes

- Updated dependencies:
- @swisspost/design-system-styles@8.0.0
- @swisspost/design-system-components@8.0.0

## 1.1.6

### Patch Changes
Expand Down
48 changes: 24 additions & 24 deletions packages/components-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swisspost/design-system-components-angular-workspace",
"version": "1.1.6",
"version": "1.1.8",
"scripts": {
"start": "ng serve --port 9210",
"build": "ng build components",
Expand All @@ -10,39 +10,39 @@
},
"private": true,
"dependencies": {
"@angular/animations": "18.1.0",
"@angular/common": "18.1.0",
"@angular/compiler": "18.1.0",
"@angular/core": "18.1.0",
"@angular/forms": "18.1.0",
"@angular/platform-browser": "18.1.0",
"@angular/platform-browser-dynamic": "18.1.0",
"@angular/router": "18.1.0",
"@swisspost/design-system-components": "workspace:7.4.0",
"@swisspost/design-system-styles": "workspace:7.4.0",
"@angular/animations": "18.1.3",
"@angular/common": "18.1.3",
"@angular/compiler": "18.1.3",
"@angular/core": "18.1.3",
"@angular/forms": "18.1.3",
"@angular/platform-browser": "18.1.3",
"@angular/platform-browser-dynamic": "18.1.3",
"@angular/router": "18.1.3",
"@swisspost/design-system-components": "workspace:8.1.0",
"@swisspost/design-system-styles": "workspace:8.1.0",
"rxjs": "7.8.1",
"tslib": "2.6.3",
"zone.js": "0.14.7"
"zone.js": "0.14.8"
},
"devDependencies": {
"@angular-devkit/build-angular": "18.0.7",
"@angular-eslint/builder": "18.1.0",
"@angular-eslint/eslint-plugin": "18.1.0",
"@angular-eslint/eslint-plugin-template": "18.1.0",
"@angular-eslint/template-parser": "18.1.0",
"@angular/cli": "18.0.7",
"@angular/compiler-cli": "18.1.0",
"@angular-devkit/build-angular": "18.1.3",
"@angular-eslint/builder": "18.2.0",
"@angular-eslint/eslint-plugin": "18.2.0",
"@angular-eslint/eslint-plugin-template": "18.2.0",
"@angular-eslint/template-parser": "18.2.0",
"@angular/cli": "18.1.3",
"@angular/compiler-cli": "18.1.3",
"@cypress/schematic": "2.5.2",
"@typescript-eslint/eslint-plugin": "7.15.0",
"@typescript-eslint/parser": "7.15.0",
"cypress": "13.13.0",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"cypress": "13.13.2",
"eslint": "8.57.0",
"karma": "6.4.3",
"karma": "6.4.4",
"karma-chrome-launcher": "3.2.0",
"karma-coverage": "2.2.1",
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.1.0",
"ng-packagr": "18.1.0",
"typescript": "5.4.5"
"typescript": "5.5.4"
}
}
18 changes: 18 additions & 0 deletions packages/components-angular/projects/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @swisspost/design-system-components-angular

## 8.1.0

### Patch Changes

- Updated dependencies:
- @swisspost/design-system-components@8.1.0

## 8.0.0

### Major Changes

- Upgraded to Angular 18 (by [@gfellerph](https://github.com/gfellerph) with [#3243](https://github.com/swisspost/design-system/pull/3243))

### Patch Changes

- Updated dependencies:
- @swisspost/design-system-components@8.0.0

## 7.4.0

### Patch Changes
Expand Down
Loading

0 comments on commit a5d08f9

Please sign in to comment.