Skip to content

Commit

Permalink
Downgrade chromatic (medplum#3848)
Browse files Browse the repository at this point in the history
* Downgrade chromatic

* Exclude chromatic from auto-upgrades

* Downgrade back to 10.3.1

* Revert chromatic workflow version change

* Lock chromatic runner version as well

* Fallback to new URL(binaryUrl) fails
  • Loading branch information
mattlong authored Jan 30, 2024
1 parent 961c093 commit fce9474
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: npm run build -- --filter=@medplum/react

- name: Publish @medplum/react Chromatic
uses: chromaui/action@latest
uses: chromaui/action@v10.3.1
with:
projectToken: chpt_429b596edaecafb
workingDir: packages/react
Expand Down
23 changes: 7 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ export const useCachedBinaryUrl = (binaryUrl: string | undefined): string | unde
}

// Check if the binaryUrl is a presigned S3 URL
const binaryUrlSearchParams = new URLSearchParams(new URL(binaryUrl).search);
let binaryUrlSearchParams: URLSearchParams;
try {
binaryUrlSearchParams = new URLSearchParams(new URL(binaryUrl).search);
} catch (e) {
return binaryUrl;
}

if (!binaryUrlSearchParams.has('Key-Pair-Id') || !binaryUrlSearchParams.has('Signature')) {
return binaryUrl;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"@types/react": "18.2.48",
"@types/react-dom": "18.2.18",
"@vitejs/plugin-react": "4.2.1",
"chromatic": "10.6.1",
"chromatic": "10.3.1",
"jest": "29.7.0",
"jest-each": "29.7.0",
"postcss": "8.4.33",
Expand Down
2 changes: 1 addition & 1 deletion scripts/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ git checkout -b "$BRANCH_NAME"

# Exclude known problem packages
# node-fetch - version 3+ requires ESM, holding back until server supports ESM
EXCLUDE="node-fetch"
EXCLUDE="node-fetch chromatic"

npx npm-check-updates -u -x "$EXCLUDE" --packageFile package.json

Expand Down

0 comments on commit fce9474

Please sign in to comment.