Description of the issue
Our components do not currently point to a pinned version of pfelement in their dependencies. They point to the latest minor release. In other words, they use a carrot(^) when defining the dependency. What you end up with is that there will be a chance that you end up with a version mismatch between the element and pfelement.
For example
"dependencies": {
"@patternfly/pfe-card": "1.10.0"
},
Will result in the following packages being installed:
"node_modules/@patternfly/pfe-card": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@patternfly/pfe-card/-/pfe-card-1.10.0.tgz",
"integrity": "sha512-/RETcKoE+LGUQRQ80GbJ7IVQxRZ3UU81Apl9NAQNIrrcKEXoQaoQAilv6uQQ2oaXzLvo9HWFvhuTVqDNJcUmYA==",
"dependencies": {
"@patternfly/pfelement": "^1.10.0"
},
"engines": {
"node": ">=10 <13"
}
},
"node_modules/@patternfly/pfelement": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@patternfly/pfelement/-/pfelement-1.11.1.tgz",
"integrity": "sha512-qy4saYS+YCecmYzdlp+JJX3PfFg/ksQHblr0MpYKhOueR/KsGm/tjCYoqbyRMqRd4eK+PJf9t1p0506j3ZOAZw==",
"engines": {
"node": ">=10 <13"
}
},
Steps to reproduce
- Create a fresh directory
- cd into the directory and run
npm init -y to create a package.json file.
- Run
npm i --save @patternfly/pfe-card@1.10.0
- Check
package-lock.json and verify that @patternfly/pfelement is at version 1.11.1
Proposed Solution
We should pin the @patternfly/pfelement dependency to the save version as the component. This will prevent version mismatches.
Description of the issue
Our components do not currently point to a pinned version of
pfelementin their dependencies. They point to the latest minor release. In other words, they use a carrot(^) when defining the dependency. What you end up with is that there will be a chance that you end up with a version mismatch between the element and pfelement.For example
Will result in the following packages being installed:
Steps to reproduce
npm init -yto create a package.json file.npm i --save @patternfly/pfe-card@1.10.0package-lock.jsonand verify that@patternfly/pfelementis at version1.11.1Proposed Solution
We should pin the
@patternfly/pfelementdependency to the save version as the component. This will prevent version mismatches.