Skip to content

Commit e4debe9

Browse files
authored
feat(merge) merge main into v6 (#10478)
* feat(merge) merge main int v6 * add back rollup-plugin-svg * cherry picked rollup plugin * fix failing tests
1 parent 2b5a598 commit e4debe9

File tree

259 files changed

+15257
-8603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+15257
-8603
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Set up and build project
2+
inputs:
3+
skip-build:
4+
description: Skip the build step
5+
required: false
6+
default: 'false'
7+
skip-build-cache:
8+
description: Skip the build cache step
9+
required: false
10+
default: 'false'
11+
runs:
12+
using: composite
13+
steps:
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
check-latest: true
19+
20+
- name: Get Yarn configuration
21+
id: yarn-config
22+
shell: bash
23+
run: |
24+
echo "cache-directory=$(yarn cache dir)" >> $GITHUB_OUTPUT
25+
26+
# TODO: This can be simplified to use the `cache` option of the `actions/setup-node` action when it supports Corepack.
27+
# See: https://github.com/actions/setup-node/issues/531
28+
- uses: actions/cache@v4
29+
name: Setup Yarn cache
30+
with:
31+
# Also cache Cypress binary.
32+
path: |
33+
~/.cache/Cypress
34+
${{ steps.yarn-config.outputs.cache-directory }}
35+
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('yarn.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-yarn-cache-
38+
39+
- name: Install dependencies
40+
shell: bash
41+
run: yarn install --frozen-lockfile
42+
43+
- uses: actions/cache@v4
44+
if: inputs.skip-build != 'true' && inputs.skip-build-cache != 'true'
45+
id: cache-build
46+
name: Cache build
47+
with:
48+
path: |
49+
packages/*/dist
50+
packages/*/next
51+
packages/*/deprecated
52+
packages/*/components
53+
packages/react-styles/css
54+
packages/react-core/layouts
55+
packages/react-core/helpers
56+
key: ${{ runner.os }}-build-${{ hashFiles('yarn.lock', '**/package.json', 'packages/**', '!**/node_modules', '!**/dist') }}
57+
58+
- name: Run build
59+
if: inputs.skip-build != 'true' && steps.cache-build.outputs.cache-hit != 'true'
60+
shell: bash
61+
run: yarn build && yarn build:umd
62+
env:
63+
# Disable V8 compile cache to hard crashes in Node.js. This can likely be removed once upgraded to the next LTS version (version 22).
64+
# See: https://github.com/nodejs/node/issues/51555
65+
DISABLE_V8_COMPILE_CACHE: 1

.github/promote.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
1212
# Update their versions and changelogs according to angular commit guidelines
1313
# https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
1414

15-
# if [[ ! -z "${CORE_VERSION}" ]]; then
16-
# echo "Updating to @patternfly/patternfly: ${CORE_VERSION}"
17-
# npm pkg set dependencies.@patternfly/patternfly=${CORE_VERSION} --workspace @patternfly/react-docs
18-
# npm pkg set devDependencies.@patternfly/patternfly=${CORE_VERSION} --workspace @patternfly/react-core --workspace @patternfly/react-styles --workspace @patternfly/react-tokens --workspace @patternfly/react-icons
15+
# if [[ ! -z "${PATTERNFLY_VERSION}" ]]; then
16+
# echo "Updating to @patternfly/patternfly: ${PATTERNFLY_VERSION}"
17+
# npm pkg set dependencies.@patternfly/patternfly=${PATTERNFLY_VERSION} --workspace @patternfly/react-docs
18+
# npm pkg set devDependencies.@patternfly/patternfly=${PATTERNFLY_VERSION} --workspace @patternfly/react-core --workspace @patternfly/react-styles --workspace @patternfly/react-tokens --workspace @patternfly/react-icons
1919
# fi
2020

2121
# publish to npm

.github/renovate.json

Lines changed: 5 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,15 @@
11
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
23
"extends": [
3-
"config:base"
4+
"config:recommended"
45
],
5-
"enabledManagers": ["npm"],
6+
"rangeStrategy": "bump",
67
"packageRules": [
78
{
8-
"packagePatterns": ["*"],
9-
"excludePackagePatterns": [
10-
"@babel/*",
11-
"@octokit/rest",
12-
"@patternfly/patternfly",
13-
"@patternfly/patternfly-a11y",
14-
"@patternfly/documentation-framework",
15-
"@rollup/*",
16-
"@testing-library/jest-dom",
17-
"@testing-library/user-event",
18-
"@types/jest",
19-
"@types/react",
20-
"@types/react-dom",
21-
"@typescript-eslint/eslint-plugin",
22-
"@typescript-eslint/parser",
23-
"eslint",
24-
"eslint-plugin-prettier",
25-
"eslint-plugin-react",
26-
"fs-extra",
27-
"lint-staged",
28-
"mutation-observer",
29-
"plop",
30-
"prettier",
31-
"react-dropzone",
32-
"rollup",
33-
"rollup-plugin-scss",
34-
"rollup-plugin-terser",
35-
"shx",
36-
"surge",
37-
"ts-patch"
9+
"matchUpdateTypes": [
10+
"major"
3811
],
3912
"enabled": false
40-
},
41-
{
42-
"groupName": "devDependencies",
43-
"matchDatasources": ["npm"],
44-
"automerge": true,
45-
"matchPackagePatterns": [
46-
"@babel/*",
47-
"@octokit/rest",
48-
"@patternfly/patternfly-a11y",
49-
"@patternfly/documentation-framework",
50-
"@rollup/*",
51-
"@testing-library/jest-dom",
52-
"@testing-library/react-hooks",
53-
"@testing-library/user-event",
54-
"@types/jest",
55-
"@types/react",
56-
"@types/react-dom",
57-
"@typescript-eslint/eslint-plugin",
58-
"@typescript-eslint/parser",
59-
"eslint",
60-
"eslint-plugin-prettier",
61-
"eslint-plugin-react",
62-
"focus-trap",
63-
"fs-extra",
64-
"lint-staged",
65-
"mutation-observer",
66-
"plop",
67-
"prettier",
68-
"react-dropzone",
69-
"rollup",
70-
"rollup-plugin-scss",
71-
"rollup-plugin-terser",
72-
"shx",
73-
"surge",
74-
"ts-patch"
75-
]
76-
},
77-
{
78-
"matchDatasources": ["npm"],
79-
"matchPackageNames": [
80-
"focus-trap",
81-
"react-dropzone"
82-
]
83-
},
84-
{
85-
"matchDatasources": ["npm"],
86-
"matchPackageNames": [
87-
"@patternfly/patternfly"
88-
],
89-
"automerge": true,
90-
"followTag": "prerelease"
9113
}
9214
]
9315
}

.github/stale.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/upload-preview.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const fs = require('fs');
21
const path = require('path');
32
const { Octokit } = require('@octokit/rest');
43
const octokit = new Octokit({ auth: process.env.GH_PR_TOKEN });
@@ -7,11 +6,9 @@ const publishFn = surge().publish();
76

87
// From github actions
98
const ghrepo = process.env.GITHUB_REPOSITORY || '';
10-
11-
const owner = process.env.CIRCLE_PROJECT_USERNAME || ghrepo.split('/')[0]; // patternfly
12-
const repo = process.env.CIRCLE_PROJECT_REPONAME || ghrepo.split('/')[1];
13-
const prnum = process.env.CIRCLE_PR_NUMBER || process.env.GH_PR_NUM;
14-
const prbranch = process.env.CIRCLE_BRANCH || process.env.GITHUB_REF.split('/').pop();
9+
const [owner, repo] = ghrepo.split('/');
10+
const prnum = process.env.GH_PR_NUM;
11+
const prbranch = process.env.GITHUB_REF.split('/').pop();
1512

1613
const uploadFolder = process.argv[2];
1714
if (!uploadFolder) {
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
name: Add new issues to PatternFly Issues project
2-
32
on:
43
issues:
54
types:
65
- opened
7-
86
jobs:
97
add-to-project:
108
name: Add issue to project
119
runs-on: ubuntu-latest
1210
steps:
13-
- uses: actions/add-to-project@v0.3.0
11+
- uses: actions/add-to-project@v1.0.1
1412
with:
1513
project-url: https://github.com/orgs/patternfly/projects/7
1614
github-token: ${{ secrets.GH_PROJECTS }}

.github/workflows/documentation.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Documentation
2+
on:
3+
pull_request_target:
4+
workflow_call:
5+
secrets:
6+
SURGE_LOGIN:
7+
required: true
8+
SURGE_TOKEN:
9+
required: true
10+
GH_PR_TOKEN:
11+
required: true
12+
jobs:
13+
deploy:
14+
name: Build, test & deploy
15+
runs-on: ubuntu-latest
16+
env:
17+
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
18+
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
19+
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
20+
GH_PR_NUM: ${{ github.event.number }}
21+
steps:
22+
- name: Check out project from PR branch
23+
if: github.event_name == 'pull_request_target'
24+
uses: actions/checkout@v4
25+
with:
26+
# Checkout the merge commit so that we can access the PR's changes.
27+
# This is nessesary because `pull_request_target` checks out the base branch (e.g. `main`) by default.
28+
ref: refs/pull/${{ env.GH_PR_NUM }}/head
29+
30+
- name: Check out project
31+
if: github.event_name != 'pull_request_target'
32+
uses: actions/checkout@v4
33+
34+
- name: Set up and build project
35+
uses: ./.github/actions/setup-project
36+
37+
- name: Build documentation
38+
run: yarn build:docs
39+
40+
- name: Upload documentation
41+
if: always()
42+
run: node .github/upload-preview.js packages/react-docs/public
43+
44+
- name: Run accessibility tests
45+
run: yarn serve:docs & yarn test:a11y
46+
47+
- name: Upload accessibility results
48+
if: always()
49+
run: node .github/upload-preview.js packages/react-docs/coverage

.github/workflows/extensions.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
name: Add relevant issues to extensions project board
2-
32
on:
43
issues:
54
types:
65
- labeled
7-
86
jobs:
97
add-to-extensions:
108
if: github.event.label.name == 'extension'
119
name: Add issue to extensions board
1210
runs-on: ubuntu-latest
1311
steps:
14-
- uses: actions/add-to-project@v0.3.0
12+
- uses: actions/add-to-project@v1.0.1
1513
with:
1614
project-url: https://github.com/orgs/patternfly/projects/12
1715
github-token: ${{ secrets.GH_PROJECTS }}

0 commit comments

Comments
 (0)