Skip to content

Commit

Permalink
fix(sandbox): fixed missing versions for sandboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed Nov 14, 2020
1 parent e0862bf commit 09c97ee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"helmet": "^4.2.0",
"hpp": "^0.2.3",
"js-cookie": "^2.2.1",
"lodash": "^4.17.20",
"marked": "^1.2.3",
"mobile-detect": "^1.4.4",
"morgan": "^1.10.0",
Expand All @@ -74,6 +75,7 @@
"react-hook-form": "^6.11.0",
"react-router-dom": "^5.2.0",
"react-swipeable": "^5.5.1",
"react-transition-group": "^4.4.1",
"react-virtualized": "^9.21.2"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/documentation/src/constants/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const versions: Record<string, string> = {
helmet: "4.2.0",
hpp: "0.2.3",
"js-cookie": "2.2.1",
lodash: "4.17.20",
marked: "1.2.3",
"mobile-detect": "1.4.4",
morgan: "1.10.0",
Expand All @@ -92,6 +93,7 @@ export const versions: Record<string, string> = {
"react-hook-form": "6.11.0",
"react-router-dom": "5.2.0",
"react-swipeable": "5.5.1",
"react-transition-group": "4.4.1",
"react-virtualized": "9.21.2",
"@babel/core": "7.12.3",
"@react-md/dev-utils": "2.4.2",
Expand Down
6 changes: 5 additions & 1 deletion packages/documentation/src/utils/getSandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ interface PackageJson {
devDependencies: Record<string, string>;
}

function getVersion(name: string): string {
function getVersion(packageName: string): string {
const name = packageName.startsWith("@")
? packageName
: packageName.replace(/\/.+$/, "");

if (name === "react-scripts") {
return "latest";
}
Expand Down

0 comments on commit 09c97ee

Please sign in to comment.