Skip to content

Commit

Permalink
Correct widget template package dependency versions (#1068)
Browse files Browse the repository at this point in the history
* Correct widget template package dependency versions

changeset

update lock

update in-repo generated package

update lock

* handle new package replacements

update locks

---------

Co-authored-by: Ross Court <[email protected]>
  • Loading branch information
rosscourt and Ross Court authored Dec 19, 2024
1 parent 06e66dc commit 23754dd
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 27 deletions.
5 changes: 5 additions & 0 deletions .changeset/tender-apricots-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@osdk/create-widget.template.react.v2": patch
---

Correct widget template package dependency versions
8 changes: 4 additions & 4 deletions examples/example-widget-react-sdk-2.x/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"test": "vitest run --passWithNoTests"
},
"dependencies": {
"@osdk/client": "workspace:~",
"@osdk/client": "workspace:*",
"@osdk/e2e.generated.catchall": "workspace:*",
"@osdk/widget-client-react.unstable": "workspace:~",
"@osdk/widget-client.unstable": "workspace:~",
"@osdk/widget-client-react.unstable": "workspace:*",
"@osdk/widget-client.unstable": "workspace:*",
"@radix-ui/react-icons": "^1.3.1",
"@radix-ui/themes": "^3.1.4",
"react": "^18",
Expand All @@ -28,7 +28,7 @@
"devDependencies": {
"@eslint/compat": "^1.2.1",
"@eslint/js": "^9.13.0",
"@osdk/widget.vite-plugin.unstable": "workspace:~",
"@osdk/widget.vite-plugin.unstable": "workspace:*",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^8.11.0",
Expand Down
4 changes: 0 additions & 4 deletions packages/create-widget.template.react.v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
"transpile": "monorepo.tool.transpile"
},
"dependencies": {
"@osdk/client": "workspace:~",
"@osdk/widget-client-react.unstable": "workspace:~",
"@osdk/widget-client.unstable": "workspace:~",
"@radix-ui/react-icons": "^1.3.1",
"@radix-ui/themes": "^3.1.4",
"react": "^18",
Expand All @@ -45,7 +42,6 @@
"@osdk/monorepo.api-extractor": "workspace:~",
"@osdk/monorepo.tsconfig": "workspace:~",
"@osdk/monorepo.tsup": "workspace:~",
"@osdk/widget.vite-plugin.unstable": "workspace:~",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^8.11.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
"preview": "vite preview"
},
"dependencies": {
"{{osdkPackage}}": "latest"

"{{osdkPackage}}": "latest",
"@osdk/client": "^2.0.0",
"@osdk/widget-client-react.unstable": "^1.0.0",
"@osdk/widget-client.unstable": "^1.0.0"
},
"devDependencies": {

"@osdk/widget.vite-plugin.unstable": "^1.0.0"
}
}
15 changes: 15 additions & 0 deletions packages/example-generator/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,21 @@ const UPDATE_PACKAGE_JSON: Mutator = {
/"@osdk\/oauth": "\^.*?"/,
`"@osdk/oauth": "workspace:*"`,
)
.replace(
// Use locally generated SDK in the monorepo
/"@osdk\/widget-client-react.unstable": "\^.*?"/,
`"@osdk/widget-client-react.unstable": "workspace:*"`,
)
.replace(
// Use locally generated SDK in the monorepo
/"@osdk\/widget-client.unstable": "\^.*?"/,
`"@osdk/widget-client.unstable": "workspace:*"`,
)
.replace(
// Use locally generated SDK in the monorepo
/"@osdk\/widget.vite-plugin.unstable": "\^.*?"/,
`"@osdk/widget.vite-plugin.unstable": "workspace:*"`,
)
.replace(
// Follow monorepo package naming convention
`"name": "${sdkVersionedTemplateExampleId(template, sdkVersion)}"`,
Expand Down
20 changes: 4 additions & 16 deletions pnpm-lock.yaml

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

0 comments on commit 23754dd

Please sign in to comment.