Repository navigation
fix(onboarding): a pure uptide/onboarding that loads in ESM and browser bundles - #94
Merged
Merged
Conversation
…er bundles
The published entry inlined yaml, whose CommonJS build calls
require("process") inside an ES module (fails under Node ESM, Vitest,
Turbopack), and imported fs/path at the top level.
- yaml is a dependency of uptide and external in the onboarding build.
- uptide/onboarding is pure: no fs, path or Node globals (Buffer.byteLength
becomes TextEncoder). globRegExp and keyLike move to pure modules, re-
exported from where they were.
- loadUptideConfig and snapshotFromDisk move to uptide/onboarding/node.
- pnpm smoke:onboarding, in CI on Node 20 and 22: the packed tarball,
installed with npm, imported under plain Node ESM, and bundled by esbuild
for the browser with no Node builtin reached. Both fail against 0.8.0.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Lucas Braum <[email protected]>
lucasbraum
marked this pull request as ready for review
October 13, 2026 02:52
Merged
lucasbraum
added a commit
that referenced
this pull request
Oct 13, 2026
… loadUptideConfig Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
lucasbraum
pushed a commit
that referenced
this pull request
Oct 13, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## [email protected] ### Minor Changes - [#93](#93) [`765de77`](765de77) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide fix <package>` with Anthropic selected runs assisted fixes as one Claude Agent SDK session in the temporary clone, covering the package's manual sites and their rule knowledge, gated once at the end of the session. It is the default when `@anthropic-ai/claude-agent-sdk`, an optional peer that is never bundled, is installed next to Uptide; without it, the patch executor runs and the output says what to install. Use `--agent patch` to opt out; other providers keep the patch executor. See `docs/decisions/0016-agent-sdk-executor.md`. Stripe period helpers accept both endpoint payload shapes, and both executors share the same period knowledge. - [#94](#94) [`5f54bad`](5f54bad) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide/onboarding` loads where it broke: under plain Node ESM, Vitest and Turbopack, and in a browser bundle. It no longer inlines `yaml` (its CommonJS build called `require("process")` inside an ES module); `yaml` is now a dependency of the package. The entry is pure, with no file system and no Node globals: `loadUptideConfig` and `snapshotFromDisk` move to `uptide/onboarding/node` (breaking for code that imported them from `uptide/onboarding`). The command line is unchanged. - [#92](#92) [`b21a911`](b21a911) Thanks [@lucasbraum](https://github.com/lucasbraum)! - The Uptide Action: `action.yml` at the root of this repository now runs Uptide in a repository's own GitHub Actions (`mode: list | check | fix`, `package`, `config`, `anthropic-api-key`, `app-url`). It builds the engine of its own pinned commit, migrates with `--agent sdk` by default, and opens draft pull requests with a short-lived installation token of the Uptide GitHub App, obtained for the job's OIDC token, so those pull requests run the repository's CI. Each run writes an `uptide.run/v1` report to the job summary and sends it to the Uptide app; a failed upload is a warning. It replaces the earlier Renovate/Dependabot pull-request checker that lived at the same path; workflows pinned to an earlier commit keep running that one. New `uptide/report` export: the `uptide.run/v1` types, its JSON Schema (also `uptide/report/schema.json`), a validator and the summary renderer. The report holds no source code, diffs, snippets or environment values: paths, line numbers, symbol names and counts only. `uptide init` and the "Add Uptide" pull request now write `permissions: contents: read, id-token: write`; the Action pushes with the Uptide GitHub App's token instead of `GITHUB_TOKEN`. ### Patch Changes - [#96](#96) [`b9c1d71`](b9c1d71) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Assisted fixes group two sites of one file into one task only when their fix is in the same place: the same repository declarations behind each compiler error, or none. Two React 19 `RefObject<T | null>` errors in one file whose prop types live in two components were sent as one task that could edit only the first component, and both stayed manual (a regression in 0.8.0). Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
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.
The published
uptide/onboarding(0.8.0) breaks consumers in two ways. Both reproduce against the published tarball:Error: Dynamic require of "process" is not supported. The entry inlinedyaml's CommonJS build, which callsrequire("process")inside an ES module.platform: 'browser'):Could not resolve "fs"andCould not resolve "path".loadUptideConfigandsnapshotFromDiskimported them at the top level.What changes
yamlis not bundled. It is now adependenciesentry ofuptideand is external intsup.onboarding.config.ts. It is the package's only runtime dependency; the command line still inlines everything.uptide/onboardingis pure: schema, types, validate, render,generateOnboardingandrepoFactsfrom in-memory facts, andWORKFLOW_PATH. It reaches no file system and no Node globals:parseUptideConfig's size check usesTextEncoderinstead ofBuffer;globRegExpandkeyLikemove to pure modules (glob.ts,llm/types.ts), re-exported from where they were, so no other importer changes.uptide/onboarding/nodeholdsloadUptideConfigandsnapshotFromDisk. The two entries share one chunk. Core's own entries mirror this (@uptide/core/onboarding/node), and@uptide/corestill exports everything, so the CLI is untouched.pnpm smoke:onboarding, on Node 20 and 22. It installs the packed tarball with npm into an emptytype: moduleapp. There it imports both entries under plain Node ESM and generates the files, then bundlesuptide/onboardingwith esbuild for the browser. The bundle must reach no Node builtin, and it is run once to prove it works. Both checks fail against 0.8.0 and pass here.onboarding-export.test.tsnow checks each output file. The pure entry may import onlyyaml, and the node entry onlyfs,pathandyaml. Neither may useBufferorrequire(. The bundle stays within a smaller size budget (120 KB; it went from 238 KB in 0.8.0 to 73 KB without yaml).Breaking (minor changeset): code that imported
loadUptideConfigorsnapshotFromDiskfromuptide/onboardingmust import them fromuptide/onboarding/node.Once this is released, uptide-app can drop
patches/[email protected]and thefsalias innext.config.ts.Verified
pnpm typecheck,pnpm test(CLI 414, core 1,290 passed / 32 skipped),pnpm lint,pnpm docs:links,pnpm public:checkpnpm smoke:onboardingpasses locally on Node 22, in about 9s.🤖 Generated with Claude Code