Skip to content

Commit 09c97ee

Browse files
committed
fix(sandbox): fixed missing versions for sandboxes
1 parent e0862bf commit 09c97ee

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

packages/documentation/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"helmet": "^4.2.0",
6464
"hpp": "^0.2.3",
6565
"js-cookie": "^2.2.1",
66+
"lodash": "^4.17.20",
6667
"marked": "^1.2.3",
6768
"mobile-detect": "^1.4.4",
6869
"morgan": "^1.10.0",
@@ -74,6 +75,7 @@
7475
"react-hook-form": "^6.11.0",
7576
"react-router-dom": "^5.2.0",
7677
"react-swipeable": "^5.5.1",
78+
"react-transition-group": "^4.4.1",
7779
"react-virtualized": "^9.21.2"
7880
},
7981
"devDependencies": {

packages/documentation/src/constants/versions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export const versions: Record<string, string> = {
8383
helmet: "4.2.0",
8484
hpp: "0.2.3",
8585
"js-cookie": "2.2.1",
86+
lodash: "4.17.20",
8687
marked: "1.2.3",
8788
"mobile-detect": "1.4.4",
8889
morgan: "1.10.0",
@@ -92,6 +93,7 @@ export const versions: Record<string, string> = {
9293
"react-hook-form": "6.11.0",
9394
"react-router-dom": "5.2.0",
9495
"react-swipeable": "5.5.1",
96+
"react-transition-group": "4.4.1",
9597
"react-virtualized": "9.21.2",
9698
"@babel/core": "7.12.3",
9799
"@react-md/dev-utils": "2.4.2",

packages/documentation/src/utils/getSandbox.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ interface PackageJson {
1010
devDependencies: Record<string, string>;
1111
}
1212

13-
function getVersion(name: string): string {
13+
function getVersion(packageName: string): string {
14+
const name = packageName.startsWith("@")
15+
? packageName
16+
: packageName.replace(/\/.+$/, "");
17+
1418
if (name === "react-scripts") {
1519
return "latest";
1620
}

0 commit comments

Comments
 (0)