@patternfly/documentation-framework 1.4.1 → 1.4.3

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.3 (2023-01-19)
7
+
8
+ **Note:** Version bump only for package @patternfly/documentation-framework
9
+
10
+
11
+
12
+
13
+
14
+ ## 1.4.2 (2023-01-19)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * update codesandbox dependencies per example import ([#3352](https://github.com/patternfly/patternfly-org/issues/3352)) ([cd67873](https://github.com/patternfly/patternfly-org/commit/cd67873352e8b9b6080c91d2c5ede9fe7ddf448a))
20
+
21
+
22
+
23
+
24
+
6
25
  ## 1.4.1 (2023-01-18)
7
26
 
8
27
  **Note:** Version bump only for package @patternfly/documentation-framework
@@ -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.1",
4
+ "version": "1.4.3",
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": "ac26e1664e16660f2f07f9c52b68a01af1d3f061"
87
+ "gitHead": "e4492c954bbd1a1cfe5631f572a14854d3c5a043"
88
88
  }