Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
"generate": "yarn plop",
"lint:md": "yarn eslint packages --ext md --no-eslintrc --config .eslintrc-md.json --cache",
"lint:ts": "node --max-old-space-size=4096 node_modules/.bin/eslint packages --ext js,jsx,ts,tsx --cache",
"lint:versions": "node ./scripts/verifyCoreVersions.js",
"prettier": "node node_modules/.bin/prettier --write \"packages/**/*.{js,ts,tsx}\" \"scripts/**/*.{js,ts,tsx}\"",
"lint:versions": "node scripts/verifyPatternflyVersions.js",
"prettier": "node node_modules/.bin/prettier --write \"packages/**/*.{js,jsx,ts,tsx}\" \"scripts/**/*.{js,jsx,ts,tsx}\"",
"serve:docs": "lerna run serve",
"serve:integration": "lerna run serve:demo-app",
"start": "yarn build && lerna run develop --parallel --stream",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-catalog-view-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"develop": "yarn build:babel:esm --skip-initial-build --watch --verbose --source-maps"
},
"dependencies": {
"@patternfly/patternfly": "2.68.3",
"@patternfly/patternfly": "2.70.1",
"@patternfly/react-core": "^3.149.1",
"@patternfly/react-styles": "^3.7.9",
"classnames": "^2.2.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/patternfly/patternfly-react#readme",
"dependencies": {
"@patternfly/patternfly": "2.68.3",
"@patternfly/patternfly": "2.70.1",
"@patternfly/react-styles": "^3.7.9",
"@patternfly/react-tokens": "^2.8.9",
"hoist-non-react-statics": "^3.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@babel/plugin-transform-typescript": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@patternfly/patternfly": "2.68.3",
"@patternfly/patternfly": "2.70.1",
"@types/exenv": "^1.2.0",
"@types/jest": "^24.0.11",
"@types/react": "^16.4.0",
Expand Down
70 changes: 35 additions & 35 deletions packages/react-core/src/demos/CardView/examples/CardView.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,40 @@ experimentalStage: 'early'

import React from 'react';
import {
Avatar,
Brand,
Button,
ButtonVariant,
Card,
CardHead,
CardActions,
CardHeader,
CardBody,
Checkbox,
Dropdown,
DropdownToggle,
DropdownItem,
DropdownSeparator,
DropdownPosition,
DropdownDirection,
Gallery,
GalleryItem,
KebabToggle,
Nav,
NavItem,
NavList,
NavVariants,
Page,
PageHeader,
PageSection,
PageSectionVariants,
PageSidebar,
SkipToContent,
TextContent,
Text,
Toolbar,
ToolbarGroup,
ToolbarItem
Avatar,
Brand,
Button,
ButtonVariant,
Card,
CardHead,
CardActions,
CardHeader,
CardBody,
Checkbox,
Dropdown,
DropdownToggle,
DropdownItem,
DropdownSeparator,
DropdownPosition,
DropdownDirection,
Gallery,
GalleryItem,
KebabToggle,
Nav,
NavItem,
NavList,
NavVariants,
Page,
PageHeader,
PageSection,
PageSectionVariants,
PageSidebar,
SkipToContent,
TextContent,
Text,
Toolbar,
ToolbarGroup,
ToolbarItem
} from '@patternfly/react-core';
import accessibleStyles from '@patternfly/react-styles/css/utilities/Accessibility/accessibility';
import spacingStyles from '@patternfly/react-styles/css/utilities/Spacing/spacing';
Expand Down Expand Up @@ -720,7 +720,7 @@ class CardViewBasic extends React.Component {
<React.Fragment>
<Card isHoverable key={key}>
<CardHead>
<img src={icons[product.icon]} style={{ height: '50px' }} />
<img src={icons[product.icon]} alt={`${product.name} icon`} style={{ height: '50px' }} />
<CardActions>
<Dropdown
isPlain
Expand Down
2 changes: 1 addition & 1 deletion packages/react-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@mdx-js/mdx": "^1.1.5",
"@mdx-js/react": "^1.1.5",
"@patternfly/patternfly": "2.68.3",
"@patternfly/patternfly": "2.70.1",
"@patternfly/react-catalog-view-extension": "^1.4.39",
"@patternfly/react-charts": "^5.3.15",
"@patternfly/react-core": "^3.149.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@babel/preset-react": "^7.0.0",
"@fortawesome/free-regular-svg-icons": "^5.7.2",
"@fortawesome/free-solid-svg-icons": "^5.7.2",
"@patternfly/patternfly": "2.68.3",
"@patternfly/patternfly": "2.70.1",
"babel-plugin-transform-es2015-modules-umd": "^6.24.1",
"babel-plugin-typescript-to-proptypes": "^0.17.1",
"fs-extra": "^6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-inline-edit-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"homepage": "https://github.com/patternfly/patternfly-react/tree/master/packages/patternfly-4/",
"dependencies": {
"@patternfly/patternfly": "2.68.3",
"@patternfly/patternfly": "2.70.1",
"@patternfly/react-core": "^3.149.1",
"@patternfly/react-icons": "^3.15.12",
"@patternfly/react-styles": "^3.7.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@babel/plugin-transform-typescript": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@patternfly/patternfly": "2.68.3",
"@patternfly/patternfly": "2.70.1",
"babel-plugin-transform-es2015-modules-umd": "^6.24.1",
"babel-plugin-typescript-to-proptypes": "^0.17.1",
"fbjs-scripts": "^0.8.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"homepage": "https://github.com/patternfly/patternfly-react/tree/master/packages/react-table#readme",
"dependencies": {
"@patternfly/patternfly": "2.68.3",
"@patternfly/patternfly": "2.70.1",
"@patternfly/react-core": "^3.149.1",
"@patternfly/react-icons": "^3.15.12",
"@patternfly/react-styles": "^3.7.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@patternfly/patternfly": "2.68.3",
"@patternfly/patternfly": "2.70.1",
"babel-plugin-transform-es2015-modules-umd": "^6.24.1",
"css": "^2.2.3",
"fs-extra": "^6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-topology/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"homepage": "https://github.com/patternfly/patternfly-react/tree/master/packages/react-topology#readme",
"dependencies": {
"@patternfly/patternfly": "2.68.3",
"@patternfly/patternfly": "2.70.1",
"@patternfly/react-core": "^3.149.1",
"@patternfly/react-icons": "^3.15.12",
"@patternfly/react-styles": "^3.7.9"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-virtualized-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"homepage": "https://github.com/patternfly/patternfly-react/tree/master/packages/react-virtualized-extension/",
"dependencies": {
"@patternfly/patternfly": "2.68.3",
"@patternfly/patternfly": "2.70.1",
"@patternfly/react-core": "^3.149.1",
"@patternfly/react-icons": "^3.15.12",
"@patternfly/react-styles": "^3.7.9",
Expand Down
34 changes: 0 additions & 34 deletions scripts/verifyCoreVersions.js

This file was deleted.

70 changes: 70 additions & 0 deletions scripts/verifyPatternflyVersions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
const fs = require('fs');
const Project = require('@lerna/project');

// '@patternfly/patternfly': {'4.0.4': ['@patternfly/react-styles', ...]},
// '@patternfly/react-core': {'^4.0.3': ['@patternfly/react-docs', ...]]
const patternflyDeps = {};

async function accumulateDependencies(package, dependencies) {
if (!dependencies) {
return;
}
Object.entries(dependencies)
.filter(([dep, _version]) => dep.startsWith('@patternfly'))
.forEach(([dep, version]) => {
patternflyDeps[dep] = patternflyDeps[dep] || {};
patternflyDeps[dep][version] = patternflyDeps[dep][version] || [];
patternflyDeps[dep][version].push(package);
});
}

function setDependency(dependencies, package, version) {
if (dependencies[package]) {
dependencies[package] = version;
}
}

async function verifyPatternflyVersions() {
const packages = (await new Project(__dirname).getPackages());

packages.forEach(package => {
accumulateDependencies(package.name, { [package.name]: `^${package.version}` });
accumulateDependencies(package.name, package.dependencies);
accumulateDependencies(package.name, package.devDependencies);
});

let failed = false;
const mismatchedVersions = Object.entries(patternflyDeps)
.filter(([_dep, versions]) => Object.keys(versions).length > 1);

mismatchedVersions.forEach(([dep, versions]) => {
failed = true;
console.error(`Mismatching versions for ${dep}:`);
Object.entries(versions).forEach(([version, packages]) => console.error(`${version}: ${packages.join(' ')}`));
});

if (process.argv[2] === '--fix') {
mismatchedVersions.forEach(([dep, versions]) => {
const highestVersion = Object.keys(versions).sort().reverse()[0];
Object.keys(versions)
.filter(version => version !== highestVersion)
.map(version => versions[version])
.forEach(mismatchedPackages => {
console.log(`Writing ${dep}@${highestVersion}:`);
mismatchedPackages
.map(package => packages.find(p => p.name === package))
.forEach(package => {
console.log(package.manifestLocation);
setDependency(package.dependencies, dep, highestVersion);
setDependency(package.devDependencies, dep, highestVersion);
package.serialize();
});
});
});
} else if (failed) {
console.error('\nRun script again with --fix to bump to latest version');
process.exit(1);
}
}

verifyPatternflyVersions();
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3377,10 +3377,10 @@
xmldoc "^1.1.2"
yargs "^15.0.2"

"@patternfly/patternfly@2.68.3":
version "2.68.3"
resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-2.68.3.tgz#fd2b8b92618cd9adde714d46f33ae050d7a3d4f0"
integrity sha512-ZsANYyp/AVRaSWAFBnKuoyvVoA1tMT7hh1jHpua0sQYjN4ocuN89MNcNdAJhdawt1Bh+p9OEtDgl4vfKQbJ9RQ==
"@patternfly/patternfly@2.70.1":
version "2.70.1"
resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-2.70.1.tgz#ef5f9b7912313b873d128002152106c1a5f86b42"
integrity sha512-vimiUQRX0SdaxFKOWaFQ9Gcva/cnEWl4R9SNx1837TRBonLTyTKmzuDRuaDF09ximiRQyWB08/WLESJLLrEF+A==

"@pieh/friendly-errors-webpack-plugin@1.7.0-chalk-2":
version "1.7.0-chalk-2"
Expand Down