[pull] main from tldraw:main#533
Merged
Merged
Conversation
Following dotdev imminent release, we need to make sure all assets URLs in doc can be prefixed with the right url so we don't have issues when visitors are coming from dotdev urls ### Change type - [ ] `bugfix` - [x] `improvement` - [ ] `feature` - [ ] `api` - [ ] `other` ### Test plan - [ ] visit staging docs - [ ] images are working
In order to help projects upgrade to newer tldraw SDK versions, this PR adds a `tldraw-migrate` skill that an agent can invoke as `/tldraw-migrate` (or `/tldraw-migrate <previous-version>` to override version detection). The skill auto-detects the previous tldraw version from git history, fetches and filters the public release notes between that version and the latest, downloads the full SDK docs for ad-hoc lookup, and walks through a structured migration: 1. Inspect the project (package manager, tldraw packages installed, import style, typecheck/build/lint setup). 2. Upgrade tldraw packages. 3. Categorize TypeScript errors by code, file, and pattern. 4. Fix in order of impact: React types → custom shape and binding registration → API renames → TipTap → remaining errors. 5. Address `@deprecated` symbols. 6. Verify with typecheck and build, plus a sanity check that no new `as` casts crept in. The skill is marked `disable-model-invocation: true` and `user-invocable: true`, so it only runs when the user types `/tldraw-migrate`. ### Bundled helpers - `detect-versions.mjs` — resolves the "from" version. Order: explicit CLI arg → `git show main:package.json` (only when it differs from the working tree, so on-main migrations don't return the new version) → `HEAD~1` → working-tree fallback. Probes 11 tldraw packages so projects that don't depend on the umbrella `tldraw` package are still detected. - `filter-changelog.mjs` — filters `https://tldraw.dev/llms-releases.txt` to versions between `from` and `to` (inclusive of `to`). The downloaded references live under `skills/tldraw-migrate/references/` and are gitignored. The full docs (~1.5MB) are cached across invocations; the changelog is always re-fetched since it's small and version-dependent. ### Change type - [x] \`other\` ### Test plan 1. In a tldraw-using project where the working tree has bumped tldraw versions but `main` (or `HEAD~1`) still has the old ones, invoke \`/tldraw-migrate\`. 2. Confirm the skill prints the detected previous version, writes the filtered changelog to \`references/tldraw-releases.txt\`, downloads the full docs to \`references/tldraw-full-docs.txt\`, and re-uses the cached docs on a second invocation. 3. Override detection with \`/tldraw-migrate 4.0.0\` and confirm the explicit version is used. ### Code changes | Section | LOC change | | -------------- | ---------- | | Config/tooling | +339 / -0 |
Before #8665 we need to test the ASSET_PREFIX env variable, this would not break the docs in case the SDK / new docs are released before ### Change type - [ ] `bugfix` - [x] `improvement` - [ ] `feature` - [ ] `api` - [ ] `other` ### Test plan 1. Go to staging.tldraw.dev 2. Nothing's broken XD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )