Skip to content

Commit

Permalink
Cherry pick main to v6 (#10619)
Browse files Browse the repository at this point in the history
* docs(Page): add example showing different type prop variants (#10352)

* docs(Page): add example showing different type prop variants

* docs(Page): make text color white in "subnav" section

* docs(Page): rename IDs in example

* docs(Table): update column management example to use link button for Cancel action (#10459)

* feat(Modal): support ReactNode type for 'title' prop

* fix(DatePicker/CalendarMonth): better range styling when some dates are disabled (#10398)

* fix(DatePicker/CalendarMonth): range styling when disabled dates

* chore(Datepicker): getElementSelectorToFocus function description

* feat(MenuToggle): add OUIA support

* docs(menu-toggle): Adds docs for split button examples. (#10268)

* docs(menu-toggle): Adds docs for split button examples.

* Update names of split toggle examples.

* Add description list basic demo (#10184)

* add description list basic demo

* fix DashboardWrapper not found issue

* implement review comments

* add divider and size

* update content

* fixed layout issues

* Convert demo application to Vite

* Upgrade Testing Library dependencies to latest version

* upgrade  to latest version

* upgrade  to latest version

* upgrade  to latest version

* chore(deps): replace camel-case with change-case

* Masthead: add demo that includes horizontal nav

* chore: use  protocol for workspace dependencies

* chore(deps): upgrade  to the latest version

* chore(deps): upgrade  to the latest version

* chore(deps): upgrade  to the latest version

* chore(deps): remove unused  dependency

* chore(deps): upgrade  to the latest version

* chore(deps): ugprade Jest to latest version

* chore(deps): upgrade  to the latest version

* chore(deps): upgrade  dependencies to the latest version

* chore(deps): upgrade  to the latest version

* chore(deps): update dependencies

* update yarn file

* more deps fixes

* more deps

* fix(build): get our custom TS transformers working again (#10477)

* fix(build): get our custom TS transformers working again

* chore(deps): Update lock file

* Update lock file

* chore(deps): Update yarn lock

* fix demo app

* cherry pick yarn changes

* update yarn.lock

* updatw snapshots

* fix demo app

* feat(templates): toggle props & improvements (#10473)

* feat(templates): toggle props & improvements

* remove toggleContent from typeahead template

* update template names

* update tests

* added SimpleSelect tests

* fix yarnlock

* fix(CodeEditor) support Mac and PC shortcuts in example (#10472)

* updatee lock file

---------

Co-authored-by: adamviktora <84135613+adamviktora@users.noreply.github.com>
Co-authored-by: Erin Donehoo <105813956+edonehoo@users.noreply.github.com>
Co-authored-by: Ajay Pratap <ajay.pratap233@gmail.com>
Co-authored-by: Austin Sullivan <ausulliv@redhat.com>
Co-authored-by: kmcfaul <45077788+kmcfaul@users.noreply.github.com>
Co-authored-by: Dominik Petřík <77832970+Dominik-Petrik@users.noreply.github.com>
  • Loading branch information
7 people authored Jun 25, 2024
1 parent 74b0b00 commit 9e7b462
Show file tree
Hide file tree
Showing 166 changed files with 23,822 additions and 22,834 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ packages/react-docs/.cache
packages/react-docs/static
packages/react-docs/public
packages/react-integration/results
packages/react-integration/demo-app-ts/public
packages/react-integration/demo-app-ts/dist

# package managers
yarn-error.log
Expand Down
13 changes: 12 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
Expand Down Expand Up @@ -46,6 +47,7 @@
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-duplicate-enum-values": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
Expand Down Expand Up @@ -119,7 +121,8 @@
"react/no-unescaped-entities": ["error", {"forbid": [">", "}"]}],
"spaced-comment": "error",
"use-isnan": "error",
"patternfly-react/no-layout-effect": "error"
"patternfly-react/no-layout-effect": "error",
"valid-typeof": "off"
},
"overrides": [
{
Expand All @@ -136,6 +139,14 @@
"react/jsx-key": "off",
"no-console": "off"
}
},
{
"files": ["packages/react-integration/demo-app-ts/**/*"],
"rules": {
"patternfly-react/no-anonymous-functions": "off",
"react/react-in-jsx-scope": "off",
"spaced-comment": "off"
}
}
]
}
10 changes: 7 additions & 3 deletions .github/actions/setup-project/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ runs:
node-version: 20
check-latest: true

- name: Enable Corepack
shell: bash
run: corepack enable

- name: Get Yarn configuration
id: yarn-config
shell: bash
run: |
echo "cache-directory=$(yarn cache dir)" >> $GITHUB_OUTPUT
echo "cache-folder=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
# TODO: This can be simplified to use the `cache` option of the `actions/setup-node` action when it supports Corepack.
# See: https://github.com/actions/setup-node/issues/531
Expand All @@ -31,14 +35,14 @@ runs:
# Also cache Cypress binary.
path: |
~/.cache/Cypress
${{ steps.yarn-config.outputs.cache-directory }}
${{ steps.yarn-config.outputs.cache-folder }}
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-
- name: Install dependencies
shell: bash
run: yarn install --frozen-lockfile
run: yarn install --immutable

- uses: actions/cache@v4
if: inputs.skip-build != 'true' && inputs.skip-build-cache != 'true'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: demo-app
path: packages/react-integration/demo-app-ts/public
path: packages/react-integration/demo-app-ts/dist

integration-tests:
name: Integration tests
Expand All @@ -87,7 +87,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: demo-app
path: packages/react-integration/demo-app-ts/public
path: packages/react-integration/demo-app-ts/dist

- name: Print environment variables
run: printenv
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn exec lint-staged
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ git fetch upstream

2. Set up tooling

[Install Node.js](https://nodejs.org/en/download/package-manager) version 20 (or higher). Then install the project dependencies and build it by running:
[Install Node.js](https://nodejs.org/en/download/package-manager) version 20 (or higher), and make sure to [enable Corepack](https://nodejs.org/api/corepack.html). Then install the project dependencies and build it by running:

```sh
yarn install
Expand Down
4 changes: 0 additions & 4 deletions GETTING-STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,3 @@ PatternFly React has 3 linters you can run all at once using `yarn lint:all`. Th
### ESLint

ESLint is run on .js, .jsx, .ts, and .tsx files. It uses the [@typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) parser with custom config added over the years. We write some of our own ESLint rules in `eslint-plugin-patternfly-react`. You can run this linter with `yarn lint:ts` or on specific files with `yarn lint <path>`.

### Version lint

The `@patternfly` version linter is run on all `package.json` files to ensure that versions of all `@patternfly/*` packages match. This is done to prevent mismatching versions of essential PatternFly packages from accidentally being published. You can run this linter with `yarn lint:versions`.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Before you begin, check out this [overview of PatternFly](http://patternfly.org/
Install a package manager before using the PatternFly libraries.

* [Use npm](https://nodejs.org/en/download/package-manager)
* [Use Yarn](https://yarnpkg.com/en/docs/getting-started)
* [Use Yarn](https://yarnpkg.com/getting-started/install)


#### Start with PatternFly React seed
Expand Down
10 changes: 9 additions & 1 deletion jest.config.js → jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
module.exports = {
/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
import type { Config } from 'jest';

const config: Config = {
collectCoverage: true,
coverageReporters: ['lcov'],
clearMocks: true,
Expand All @@ -22,3 +28,5 @@ module.exports = {
},
testEnvironment: 'jsdom'
};

export default config;
102 changes: 47 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"url": "https://github.com/patternfly/patternfly-react.git"
},
"engines": {
"node": ">=20",
"yarn": ">=1.6.0"
"node": ">=20.14.0"
},
"packageManager": "yarn@4.3.0",
"keywords": [
"react",
"patternfly",
Expand All @@ -24,58 +24,60 @@
},
"homepage": "https://github.com/patternfly/patternfly-react#readme",
"devDependencies": {
"@babel/core": "^7.24.3",
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
"@babel/preset-react": "^7.24.1",
"@babel/preset-typescript": "^7.24.1",
"@octokit/rest": "^20.0.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@babel/core": "^7.24.7",
"@babel/plugin-transform-modules-commonjs": "^7.24.7",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@octokit/rest": "^20.1.1",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-replace": "^5.0.7",
"@rollup/plugin-terser": "^0.4.4",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "14.5.2",
"@testing-library/dom": "^10.1.0",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "29.5.12",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"@types/node": "^20.14.2",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.13.0",
"@typescript-eslint/parser": "^7.13.0",
"babel-jest": "^29.7.0",
"concurrently": "^7.6.0",
"eslint": "^8.39.0",
"concurrently": "^8.2.2",
"eslint": "^8.57.0",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-testing-library": "^6.1.0",
"fs-extra": "^11.1.1",
"glob": "^9.3.0",
"husky": "^4.3.0",
"jest": "27.5.1",
"jest-cli": "27.5.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-testing-library": "^6.2.2",
"fs-extra": "^11.2.0",
"glob": "^10.4.1",
"husky": "^9.0.11",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-transform-stub": "^2.0.0",
"lerna": "^7.1.5",
"lint-staged": "^14.0.0",
"lerna": "^8.1.4",
"lint-staged": "^15.2.7",
"mutation-observer": "^1.0.3",
"plop": "^3.1.2",
"prettier": "^3.0.0",
"react": "^18",
"react-dom": "^18",
"rimraf": "^5.0.5",
"rollup": "^4.17.2",
"plop": "^4.0.1",
"prettier": "^3.3.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rimraf": "^5.0.7",
"rollup": "^4.18.0",
"rollup-plugin-scss": "^4.0.0",
"rollup-plugin-svg": "^2.0.0",
"sass": "^1.77.2",
"sass": "^1.77.5",
"surge": "^0.23.1",
"ts-node": "^10.9.1",
"ts-patch": "^3.1.2",
"ts-node": "^10.9.2",
"ts-patch": "^3.2.0",
"typescript": "^5.4.5"
},
"scripts": {
"build": "yarn clean && yarn build:generate && yarn build:esm && yarn build:cjs && yarn build:subpaths && yarn build:single:packages",
"build:cjs": "tsc --build --verbose packages/tsconfig.cjs.json",
"build:esm": "tsc --build --verbose packages/tsconfig.json",
"build:integration": "lerna run build:demo-app --stream",
"build:integration": "lerna run build --scope=demo-app-ts --stream",
"build:docs": "yarn workspace @patternfly/react-docs build:docs",
"build:generate": "lerna run generate --parallel --stream",
"build:subpaths": "lerna run subpaths --parallel --stream",
Expand All @@ -85,41 +87,31 @@
"clean:build": "rimraf .cache .eslintcache coverage",
"clean:exports": "lerna run clean:exports --parallel --stream",
"generate": "yarn plop",
"lint": "node --max-old-space-size=4096 node_modules/.bin/eslint --ext js,jsx,ts,tsx --cache --cache-strategy content",
"lint:all": "yarn lint:md && yarn lint:versions && yarn lint:ts",
"lint": "eslint --ext js,jsx,ts,tsx --cache --cache-strategy content",
"lint:all": "yarn lint:md && yarn lint:ts",
"lint:md": "yarn eslint packages --ext md --no-eslintrc --config .eslintrc-md.json --cache --cache-strategy content",
"lint:ts": "yarn lint packages/*/src",
"lint:versions": "node scripts/verifyPatternflyVersions.js",
"lint:tests": "yarn lint packages/*/src/components/*/__tests__/*.test.*",
"prepare": "ts-patch install -s",
"postinstall": "ts-patch install -s && husky",
"serve:docs": "yarn workspace @patternfly/react-docs serve",
"serve:integration": "lerna run serve:demo-app",
"serve:integration": "lerna run preview --scope=demo-app-ts",
"start": "yarn build && concurrently --kill-others \"yarn watch\" \"yarn workspace @patternfly/react-docs develop\"",
"start:cypress": "lerna run cypress:open",
"start:demo-app": "lerna run start:demo-app --stream",
"start:demo-app:hot": "lerna run start:demo-app:hot --stream",
"start:demo-app": "lerna run dev --scope=demo-app-ts --stream",
"test": "TZ=EST LC_ALL=en_US.UTF8 jest packages",
"test:a11y": "lerna run test:a11y --stream",
"test:integration": "yarn workspace @patternfly/react-integration test:integration",
"uninstall": "find . -name node_modules -type d | xargs rm -rf",
"watch": "yarn build:esm --watch",
"screenshots": "yarn workspace @patternfly/react-docs screenshots"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.md": "yarn lint:md --fix",
"*.{js,jsx,ts,tsx}": "yarn lint --fix",
"*.json": "yarn lint:versions --fix"
"*.{js,jsx,ts,tsx}": "yarn lint --fix"
},
"workspaces": {
"packages": [
"packages/**"
]
},
"dependencies": {},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
}
1 change: 0 additions & 1 deletion packages/eslint-plugin-patternfly-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "eslint-plugin-patternfly-react",
"version": "5.2.0-alpha.3",
"private": false,
"main": "./lib/index.js",
"license": "MIT",
"publishConfig": {
Expand Down
14 changes: 6 additions & 8 deletions packages/react-charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
},
"homepage": "https://github.com/patternfly/patternfly-react#readme",
"dependencies": {
"@patternfly/react-styles": "^6.0.0-alpha.24",
"@patternfly/react-tokens": "^6.0.0-alpha.24",
"hoist-non-react-statics": "^3.3.0",
"@patternfly/react-styles": "workspace:^",
"@patternfly/react-tokens": "workspace:^",
"hoist-non-react-statics": "^3.3.2",
"lodash": "^4.17.21",
"tslib": "^2.6.2",
"tslib": "^2.6.3",
"victory-area": "^37.0.2",
"victory-axis": "^37.0.2",
"victory-bar": "^37.0.2",
Expand Down Expand Up @@ -61,9 +61,7 @@
"build:single:packages": "node ../../scripts/build-single-packages.js --config single-packages.config.json"
},
"devDependencies": {
"@types/lodash": "^4.14.157",
"css": "^2.2.3",
"fs-extra": "^11.0.0",
"glob": "^7.1.2"
"@types/lodash": "^4.17.5",
"fs-extra": "^11.2.0"
}
}
6 changes: 3 additions & 3 deletions packages/react-code-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
},
"dependencies": {
"@monaco-editor/react": "^4.6.0",
"@patternfly/react-core": "^6.0.0-alpha.71",
"@patternfly/react-icons": "^6.0.0-alpha.25",
"@patternfly/react-styles": "^6.0.0-alpha.24",
"@patternfly/react-core": "workspace:^",
"@patternfly/react-icons": "workspace:^",
"@patternfly/react-styles": "workspace:^",
"react-dropzone": "14.2.3",
"tslib": "^2.6.2"
},
Expand Down
Loading

0 comments on commit 9e7b462

Please sign in to comment.