Skip to content

Commit

Permalink
Merge branch 'tokens/v2' into tokens/release
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschuerch committed Jul 22, 2024
2 parents 9f7b083 + 2aaae90 commit 49fc7a6
Show file tree
Hide file tree
Showing 67 changed files with 1,585 additions and 1,210 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deploy-to-netlify/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runs:
steps:
- name: Install netlify-cli
shell: bash
run: pnpm i -g netlify-cli@17
run: pnpm i -g netlify-cli@16

- name: Deploy preview environment to netlify
id: netlify_deploy
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/deploy-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ jobs:
name: design-system-demo
folder: build-output

- run: ls -R

- name: Deploy demo app to netlify
uses: ./.github/actions/deploy-to-netlify
id: deploy
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/release-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ jobs:

- name: Install netlify cli
if: steps.check.outputs.changed == 'true'
run: pnpm -g i netlify-cli@17
run: pnpm -g i netlify-cli@16

# Publish demo only if changesets published any packages
- name: Publish demo app to netlify
id: netlify
if: steps.check.outputs.changed == 'true'
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: |
netlify link --id $NETLIFY_SITE_ID
netlify deploy --build false --dir packages/demo/dist/demo --prod
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
run: netlify deploy --filter @swisspost/design-system-demo --build false --dir packages/demo/dist/demo --prod
16 changes: 9 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ jobs:
old: {
version: release.oldVersion,
major: oldMajor,
siteUrl: `design-system-version-${oldMajor}`
siteUrl: `design-system-version-${oldMajor}`,
dependencies
},
new: {
version: release.newVersion,
major: newMajor,
siteUrl: 'design-system'
},
branchName: `release/v${oldMajor}`,
dependencies
branchName: `release/v${oldMajor}`
}
- name: Check if changset-release/main Branch exists
Expand Down Expand Up @@ -232,17 +232,19 @@ jobs:
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 = release.dependencies
currentVersion.dependencies = dependencies
if (release.isMajor) {
currentVersion.version = release.old.version
currentVersion.url = `https://${release.old.siteUrl}.netlify.app`
currentVersion.dependencies = release.old.dependencies
const dependencies = monorepo
.filter(pkg => pkg.private === false && pkg.version !== undefined)
.reduce((packages, pkg) => ({ ...packages, [pkg.name]: pkg.version }), { ...(styles.peerDependencies ?? {}) })
versions.unshift({
title: `Version ${release.new.major}`,
version: release.new.version,
Expand Down
21 changes: 1 addition & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,9 @@ These contribution guidelines apply to this repository in general and describe h
- [Design System Styles](./packages/styles/CONTRIBUTING.md)
- [Intranet Header Component](./packages/intranet-header-workspace/projects/intranet-header/CONTRIBUTING.md)

## Prerequisites

In order to be able to use `npm` commands, [node.js](https://nodejs.org/en/) v18+ needs to be installed on your machine.

We use [pnpm](https://pnpm.io/) to manage dependencies, so make sure you have it installed: `npm i -g pnpm`. To install dependencies for all packages in this repo, run `pnpm install` from the root. Adding a new dependency to a package is just a matter of running `pnpm add <PACKAGE_NAME>` in the current packages sub-folder.

## Setup

To set up the repository and install dependencies for all packages, run (at the root):

```bash
# If you haven't already
npm install -g pnpm

# Install dependencies, build local dependencies and finally link them correctly
pnpm run bootstrap

# Start the design-system-documentation
pnpm start
```

Other root scripts are available for convenience:
To set up the repo for local development, please follow the [Design System Local Setup Guide](https://github.com/swisspost/design-system/wiki/How-to-set-up-the-Design-System-Repo)

### Development

Expand Down
32 changes: 10 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,19 @@
"optionalDependencies": {
"@web-types/lit": "2.0.0-3"
},
"engines": {
"node": "20"
},
"packageManager": "[email protected]",
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
"eslint",
"@typescript-eslint/eslint-plugin",
"@typescript-eslint/parser"
],
"ignoreMissing": {},
"allowedVersions": {
"react": ">=18",
"react-dom": ">=18",
"stylelint": ">=15"
"@typescript-eslint/eslint-plugin": ">=7",
"@typescript-eslint/parser": ">=7",
"zone.js": ">=0.14"
}
},
"overrides": {
"merge@< 2.1.1": "2.1.1",
"glob-parent@< 5.1.2": "5.1.2",
"glob-parent@<5.1.2": ">=5.1.2",
"merge@<2.1.1": ">=2.1.1",
"ip@=2.0.0": ">=2.0.1",
"es5-ext@>=0.10.0 <0.10.63": ">=0.10.63",
"follow-redirects@<=1.15.5": ">=1.15.6"
}
},
"engines": {
"node": "20"
},
"packageManager": "[email protected]"
"overrides": {}
}
}
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.6

### Patch Changes

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

## 1.1.5

### Patch Changes

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

## 1.1.4

### Patch Changes
Expand Down
6 changes: 3 additions & 3 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.4",
"version": "1.1.6",
"scripts": {
"start": "ng serve --port 9210",
"build": "ng build components",
Expand All @@ -18,8 +18,8 @@
"@angular/platform-browser": "17.3.11",
"@angular/platform-browser-dynamic": "17.3.11",
"@angular/router": "17.3.11",
"@swisspost/design-system-components": "workspace:7.3.0",
"@swisspost/design-system-styles": "workspace:7.3.0",
"@swisspost/design-system-components": "workspace:7.4.0",
"@swisspost/design-system-styles": "workspace:7.4.0",
"rxjs": "7.8.1",
"tslib": "2.6.3",
"zone.js": "0.14.7"
Expand Down
14 changes: 14 additions & 0 deletions packages/components-angular/projects/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @swisspost/design-system-components-angular

## 7.4.0

### Patch Changes

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

## 7.3.1

### Patch Changes

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

## 7.3.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components-angular/projects/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swisspost/design-system-components-angular",
"version": "7.3.0",
"version": "7.4.0",
"description": "Swiss Post Design System - Angular Wrapper Components",
"author": "Swiss Post <[email protected]>",
"license": "Apache-2.0",
Expand All @@ -19,7 +19,7 @@
},
"dependencies": {
"tslib": "2.6.3",
"@swisspost/design-system-components": "workspace:7.3.0"
"@swisspost/design-system-components": "workspace:7.4.0"
},
"peerDependencies": {
"@angular/common": "^16.0.0 || ^17.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ <h2>Post Rating</h2>
<div class="my-4">
<h2>Post Tabs</h2>
<post-tabs>
<post-tab-header slot="tabs" panel="unua">Unua langeto</post-tab-header>
<post-tab-header slot="tabs" panel="dua">Dua langeto</post-tab-header>
<post-tab-header slot="tabs" panel="tria">Tria langeto</post-tab-header>
<post-tab-header panel="unua">Unua langeto</post-tab-header>
<post-tab-header panel="dua">Dua langeto</post-tab-header>
<post-tab-header panel="tria">Tria langeto</post-tab-header>

<post-tab-panel name="unua">
Jen la enhavo de la unua langeto. Defaŭlte ĝi montriĝas komence.
Expand Down
14 changes: 14 additions & 0 deletions packages/components-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @swisspost/design-system-components-react

## 7.4.0

### Patch Changes

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

## 7.3.1

### Patch Changes

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

## 7.3.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swisspost/design-system-components-react",
"version": "7.3.0",
"version": "7.4.0",
"license": "Apache-2.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -20,7 +20,7 @@
"lint": "eslint src/**/*.ts"
},
"dependencies": {
"@swisspost/design-system-components": "workspace:7.3.0"
"@swisspost/design-system-components": "workspace:7.4.0"
},
"devDependencies": {
"@types/node": "20.14.9",
Expand Down
19 changes: 19 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# @swisspost/design-system-components

## 7.4.0

### Minor Changes

- Added the slot="tabs" attribute on the post-tab-header per default. (by [@davidritter-dotcom](https://github.com/davidritter-dotcom) with [#3282](https://github.com/swisspost/design-system/pull/3282))

### Patch Changes

- Fixed a bug with the post-collapsible-trigger imports (by [@oliverschuerch](https://github.com/oliverschuerch) with [#3302](https://github.com/swisspost/design-system/pull/3302))
- Updated dependencies:
- @swisspost/design-system-styles@7.4.0

## 7.3.1

### Patch Changes

- Updated dependencies:
- @swisspost/design-system-styles@7.3.1

## 7.3.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swisspost/design-system-components",
"version": "7.3.0",
"version": "7.4.0",
"description": "A collection of web components built with Stencil JS for the Swiss Post Design System.",
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
Expand Down Expand Up @@ -39,7 +39,7 @@
"dependencies": {
"@floating-ui/dom": "1.6.7",
"@oddbird/popover-polyfill": "0.3.7",
"@swisspost/design-system-styles": "workspace:7.3.0",
"@swisspost/design-system-styles": "workspace:7.4.0",
"ally.js": "1.4.1",
"long-press-event": "2.5.0"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Element, Listen, Method, Prop, Watch } from '@stencil/core';
import { version } from 'typescript';
import { version } from '@root/package.json';
import { checkNonEmpty, checkType, debounce } from '@/utils';
import { PostCollapsibleCustomEvent } from '@/components';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class PostTabHeader {
aria-selected="false"
tabindex="-1"
class="tab-title"
slot="tabs"
>
<slot />
</Host>
Expand Down
18 changes: 18 additions & 0 deletions packages/demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @swisspost/design-system-demo

## 7.3.6

### Patch Changes

- Updated dependencies:
- @swisspost/design-system-styles@7.4.0
- @swisspost/design-system-intranet-header@7.4.0
- @swisspost/design-system-migrations@7.4.0

## 7.3.5

### Patch Changes

- Updated dependencies:
- @swisspost/design-system-styles@7.3.1
- @swisspost/design-system-intranet-header@7.3.1
- @swisspost/design-system-migrations@7.3.1

## 7.3.4

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swisspost/design-system-demo",
"version": "7.3.4",
"version": "7.3.6",
"description": "Pattern documentation, code snippets and implementation guidelines for the Design System Styles.",
"author": "Swiss Post <[email protected]>",
"license": "Apache-2.0",
Expand All @@ -25,9 +25,9 @@
"@ng-bootstrap/ng-bootstrap": "16.0.0",
"@popperjs/core": "2.11.8",
"@swimlane/ngx-datatable": "20.1.0",
"@swisspost/design-system-intranet-header": "workspace:7.3.0",
"@swisspost/design-system-migrations": "workspace:7.3.0",
"@swisspost/design-system-styles": "workspace:7.3.0",
"@swisspost/design-system-intranet-header": "workspace:7.4.0",
"@swisspost/design-system-migrations": "workspace:7.4.0",
"@swisspost/design-system-styles": "workspace:7.4.0",
"bootstrap": "5.3.3",
"core-js": "3.37.1",
"highlight.js": "11.9.0",
Expand Down
Loading

0 comments on commit 49fc7a6

Please sign in to comment.