@patternfly/documentation-framework 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.4.2 (2023-01-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update codesandbox dependencies per example import ([#3352](https://github.com/patternfly/patternfly-org/issues/3352)) ([cd67873](https://github.com/patternfly/patternfly-org/commit/cd67873352e8b9b6080c91d2c5ede9fe7ddf448a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 1.4.1 (2023-01-18)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# 1.4.0 (2023-01-18)
|
|
7
26
|
|
|
8
27
|
|
package/helpers/codesandbox.js
CHANGED
|
@@ -160,6 +160,20 @@ function getReactParams(title, code, scope, lang, relativeImports) {
|
|
|
160
160
|
.filter(([pkg]) => code.includes(pkg))
|
|
161
161
|
.forEach(([pkg, version]) => dependencies[pkg] = version);
|
|
162
162
|
|
|
163
|
+
|
|
164
|
+
// Get any additional dependencies from example code
|
|
165
|
+
const importMatch = /(?:import [^'"`]*)(?:['"`])((?!.\/)[^'"`]*)/gm;
|
|
166
|
+
let depImport;
|
|
167
|
+
while (depImport = importMatch.exec(code)) {
|
|
168
|
+
let res = depImport[1];
|
|
169
|
+
// Only include package name, not full import path
|
|
170
|
+
if (!dependencies[res] && res.includes('@') && res.includes('/')) {
|
|
171
|
+
const importArr = res.split('/');
|
|
172
|
+
res = `${importArr[0]}/${importArr[1]}`;
|
|
173
|
+
}
|
|
174
|
+
dependencies[res] = dependencies[res] || 'latest';
|
|
175
|
+
}
|
|
176
|
+
|
|
163
177
|
return {
|
|
164
178
|
files: {
|
|
165
179
|
'index.html': {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/documentation-framework",
|
|
3
3
|
"description": "A framework to build documentation for PatternFly.",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.2",
|
|
5
5
|
"author": "Red Hat",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"react": "^16.8.0 || ^17.0.0",
|
|
85
85
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "e918ef5a07aa7a29bd469f41370a3e9ace9cf328"
|
|
88
88
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
|
|
3
3
|
module.exports = (sourceMD, sourceProps) => {
|
|
4
|
-
|
|
4
|
+
/** Parse source content for props so that we can display them. You must source props before sourcing the markdown
|
|
5
|
+
files, otherwise the props table won't be rendered.
|
|
6
|
+
*/
|
|
5
7
|
const propsIgnore = ['**/*.test.tsx', '**/examples/*.tsx'];
|
|
6
8
|
const extensionPath = path.join(__dirname, '../src');
|
|
7
9
|
sourceProps(path.join(extensionPath, '/**/*.tsx'), propsIgnore);
|