chore: migrate to pub workspaces and Melos 8#1525
Merged
Merged
Conversation
1f24e31 to
ef9017b
Compare
ef9017b to
5590507
Compare
spydon
added a commit
that referenced
this pull request
Jul 3, 2026
## What Raises the minimum Dart SDK of the pure-Dart packages (`functions_client`, `gotrue`, `postgrest`, `realtime_client`, `storage_client`, `supabase`, `supabase_lints`, `yet_another_json_isolate`) and the `supabase` web example from `3.4.0`/`3.3.0` to `3.9.0`, matching `supabase_flutter`. This is the base PR for the pub workspaces + Melos 8 migration (#1525), which is stacked on top of it. Pub workspaces resolve the whole workspace as a unit under a single Dart SDK, so aligning every package on 3.9.0 keeps the toolchain and formatting consistent across the repo. ## Why the large diff Raising the language version to 3.9 switches `dart format` to its mandatory "tall" style. All affected packages are reformatted accordingly (109 files) — this is a pure formatting change. `supabase_flutter` was already on 3.9, so it is untouched. ## Analyzer fixes surfaced by the new language version - **postgrest**: 3.9 no longer implicitly promotes the bare `body as dynamic;` statement in `_parseResponse`, which surfaced three `argument_type_not_assignable` errors. The casts are now explicit and behavior-preserving (`body as Iterable` / `body as Map`), guarded by the existing `R == PostgrestList` / `R == PostgrestMap` checks. - **realtime_client**: the tall formatter wraps a long single-line `if` onto two lines, which then needs braces (`curly_braces_in_flow_control_structures`). ## Validation - `dart format -l 80 --set-exit-if-changed` is clean across all packages. - `dart analyze --fatal-infos` passes (verified on `postgrest` and `realtime_client`, which had the only issues). - `postgrest`'s mock-based tests (response-conversion paths) pass. ## Note This raises the minimum supported Dart SDK for the affected published packages, which reviewers may want to reflect in the next version bump.
67708b6 to
9747337
Compare
9747337 to
495b801
Compare
Closed
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.
What
Migrates the monorepo from Melos 3 (
melos.yaml+pubspec_overrides.yamllinking) to Dart pub workspaces with the latest Melos (8.1.0), following the Melos migration guide and mirroring how flame is set up.Changes
pubspec.yamlnow holds the workspace: a literalworkspace:member list (globs would require Dart 3.11, we target 3.9),dev_dependencies: melos: ^8.1.0, and the Melos config moved under themelos:key.melos.yamlis deleted.resolution: workspace, so pub links the local packages automatically.pubspec_overrides.yamlandrunPubGetInParallel/usePubspecOverridesare gone.examples/launcher. Launcher was previously excluded because the old minimum Flutter shipped a Dart older than launcher required; now that the whole workspace is on Dart 3.9 it joins like the rest (bumped to>=3.9.0,resolution: workspace).analyze/format/lint:all/test:coverage/upgrade/outdatedscripts in favor of the built-inmelos analyze,melos format(line length configured in themelos:block) andmelos test. Only theupdate-versionscript (used by the version hook) remains.melos bootstrap --no-flutter(removed in Melos, andresolution: workspaceresolves the whole workspace at once, which includessupabase_flutterand therefore requires Flutter). It now uses the Flutterstable/beta/masterchannels, which bundle Dartstable/beta/dev, preserving multi-channel coverage (beta/master only on push to main, as ci: speed up build and test pipelines #1524 set up). Affected-package detection now watches the rootpubspec.yaml. Melos stays unpinned (the action/CLI install the latest, which supports workspaces).PasskeyAuthenticator, matching the currentsupabase_flutterAPI (a pre-existing break from fix(supabase_flutter): accept PasskeyAuthenticatorInterface instead of depending on passkeys #1444 that CI never covered, surfaced now thatmelos analyzeruns the whole workspace).Validation
Locally with Melos 8.1.0 and Flutter 3.44 (Dart 3.12):
melos bootstrapresolves the whole workspace with a singleflutter pub get(13 packages).melos analyze --fatal-infosis green across all packages.melos format --set-exit-if-changedis clean.melos testruns (verified on a backend-free package).