Skip to content

Commit

Permalink
fix: don't pin peer dep to exact version (#1108)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge authored Dec 30, 2024
1 parent c557f44 commit b2de189
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .changeset/large-dryers-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@uploadthing/expo": patch
"@uploadthing/mime-types": patch
"@uploadthing/nuxt": patch
"@uploadthing/react": patch
"@uploadthing/shared": patch
"@uploadthing/solid": patch
"@uploadthing/svelte": patch
"uploadthing": patch
"@uploadthing/vue": patch
---

chore: more relaxed peer dep requirements between uploadthing packages
7 changes: 6 additions & 1 deletion .github/release-canary.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ async function version() {

// Update dependencies
for (const dep in pkg.dependencies) {
if (versions[dep]) {
if (versions[dep] && pkg.dependencies[dep].startsWith("workspace:")) {
pkg.dependencies[dep] = versions[dep];
}
}
for (const dep in pkg.peerDependencies) {
if (versions[dep] && pkg.peerDependencies[dep].startsWith("workspace:")) {
pkg.peerDependencies[dep] = versions[dep];
}
}

const fmt = prettier.format(JSON.stringify(pkg), { filepath: pkgJsonPath });
fs.writeFileSync(pkgJsonPath, fmt);
Expand Down
9 changes: 7 additions & 2 deletions .github/replace-workspace-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ await Promise.all(
const workspacePkg = await Bun.file("package.json").json();
for (const dep in workspacePkg.dependencies) {
if (dep in packageVersions) {
workspacePkg.dependencies[dep] = packageVersions[dep];
if (workspacePkg.dependencies[dep].startsWith("workspace:")) {
workspacePkg.dependencies[dep] = packageVersions[dep];
}
}
}
for (const dep in workspacePkg.peerDependencies) {
if (dep in packageVersions) {
if (
dep in packageVersions &&
workspacePkg.peerDependencies[dep].startsWith("workspace:")
) {
workspacePkg.peerDependencies[dep] = packageVersions[dep];
}
}
Expand Down

0 comments on commit b2de189

Please sign in to comment.