Toolbar take 3#1064
Open
ryanechternacht wants to merge 17 commits into
Open
Conversation
…olbar package Move DeveloperToolbar class out of the JS package into a new toolbar/ package so it can be installed as a devDependency and never bundled into production. The JS package now uses a dynamic import() to discover the toolbar at runtime, falling back to a console.error if not installed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add vitest infrastructure to toolbar/ (config, setup, tsconfig, eslint) - Add 22 unit tests for DeveloperToolbar class (initialize, cleanup, overrides) - Add 11 integration tests to js/ for SDK toolbar integration points - Add pull_request_toolbar.yml CI workflow (build/lint/test on PRs) - Add deploy_toolbar.yml CI workflow (publish to npm on tag) - Update publish-package.sh and release_candidate.yml to include toolbar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…arDependencies locally Removes js/src/schematic-dev-toolbar.d.ts which caused api-extractor to trace source .ts files through its imports, failing with ae-wrong-input-file-type. Replaces the stub with an inline type cast on the dynamic import. Defines DeveloperToolbarDependencies locally in the toolbar package so it does not depend on the unpublished type from @schematichq/schematic-js@1.3.0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…build to remove it for prod builds
Closed
dontlaugh
reviewed
Apr 6, 2026
|
|
||
| export default defineConfig({ | ||
| define: { | ||
| __DEV__: true, |
Contributor
There was a problem hiding this comment.
How does this __DEV__ property get set/used?
Member
Author
There was a problem hiding this comment.
The build scripts in package.json
"build:browser": "npx esbuild src/browser.ts --bundle --minify --outfile=dist/schematic.browser.js --platform=browser --define:__DEV__=false",
"build:cjs:dev": "npx esbuild src/index.ts --bundle --format=cjs --outfile=dist/schematic.dev.cjs.js --define:__DEV__=true",
"build:cjs:prod": "npx esbuild src/index.ts --bundle --format=cjs --outfile=dist/schematic.prod.cjs.js --define:__DEV__=false",
"build:esm:dev": "npx esbuild src/index.ts --bundle --format=esm --outfile=dist/schematic.dev.esm.js --define:__DEV__=true",
"build:esm:prod": "npx esbuild src/index.ts --bundle --format=esm --outfile=dist/schematic.prod.esm.js --define:__DEV__=false",
Open to a different approach if you have one. The goal is to include/exclude these code paths at build time
Contributor
There was a problem hiding this comment.
This should work since it's only defined in a test config.
dontlaugh
approved these changes
Apr 21, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://linear.app/schematic/issue/DEV-183/add-a-dev-toolbar
https://www.loom.com/share/5775484e81e247e6be147bbe0e861fa7