* Bump vite to v6 to get the newest esbuild.
* Bump tsx to get the newest esbuild.
* Fix lodash version.
* Make the www app use the catalog version of next.
* Consolidate different versions of postcss. Remove @mertasan/tailwindcss-variables from ui package.
* Bump vitest in pg-meta to remove a vulnerable version of vite.
* Bump dompurify.
* Bump all octokit deps to solve 2 vulns.
* Fix warnings about destructuring json imports.
* Remove a console.log in docs.
* Fix the changelog page to use an ESM import.
* Stabilize the generate-sitemap script output.
* Try another fix for the changelog.
* feat: llms.txt
* feat: split llms.txt into multiple files
We have too many docs, so the concatenated text file uses an unreasonable amount of tokens. Chunk it up a little so it's more usable.
Small DX improvement for writing troubleshooting guides. When a new troubleshooting guide is created, it is auto-populated with the tempalte (as long as docs dev is running).
* Separate turbo config for docs app into its own separate file. Add a task dependency for codegen tasks.
* Fix the clean command. Remove the prebuild command cause it's already covered by turbo.
* fix: response error codes
* upgrade docs
* remove request url modification middleware
* move api routes for self-hosted to platform folder
* remove some lib/common/fetch usage
* docs: use middleware for openapi-fetch (#30600)
Get rid of the unauthedAllowedPost function (I don't think there's any harm in letting any requests that require authentication to just 403, they should be disabled at the React Query level and if not they will fail gracefully enough...)
* fix local count query
* add default values for clone mutation
* fix ts and codegen
* add missing lodash dep to playwright tests
* Fix the playwright tests to match the new folder structure for selfhosted variant.
* remove unused import
* Remove unused state
* remove unused sql debug mutation
* remove unused export
* fix notifications query
* fix jwt updating status
* fix typescript
* save sql snippet after renaming
* update codegen & fix ts error
* override array querySerializer
---------
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* fix: bump auth-js version to v2.67.3
* chore: add supabase/auth and supabase/dashboard as codeowners
* Revert "chore: add supabase/auth and supabase/dashboard as codeowners"
This reverts commit 57fc5776ba.
* bump supabase-js version
* import user type from single gotrue
* fix auth-js version in studio
* remove auth-js dep in studio
* fix ts
* use catalog versions
* fix ts
* Bump realtime-js version to avoid having 2 versions.
* Add @supabase/realtime-js to the pnpm catalog.
* upgrade realtime-js
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
The examples folder needs to be explicitly included in the Vercel Serverless bundle. Because it's at the root of the monorepo rather than being within the `app/docs` folder, we copy it over pre-build (and pre-dev).
Test the examples/prompts fix by re-enabling revalidations on graphql pages. Added a temp version of the fetch function so we can gradually reenable and monitor Vercel error rates over time.
* chore: remove auth-helpers (deprecated)
* type supabase client in feedback
* small adjustments to error and loading state handling for docs search
---------
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
* Add next to pnpm catalog and use that next version from all apps and packages.
* Remove vite direct dependency.
* Set the @types/node to version 20.
* Stabilize supports-color by adding it in the main package.json. This will make it appear in all packages that have it as optional.
* Use built-in matchers for vitest in @testing-library/jest-dom.
* Add libpg-query as a dependency to docs.
* Remove nextjs-node-loader for the built-in external packages feature on nextjs.
* Clean up extra comment.
* Fix some missing and duplicate dependencies.
* Fix the types for jest in ai-commands package.
* Replace all npm commands with pnpm. Add pnpm files and workspace links.
* Fix rimraf to work with pnpm.
* Refactor the github actions to work with pnpm.
* Delete package-lock.json.
* Fix the tailwind configs to not include node_modules.
* Fix random files.
* Add preinstall scripts to all packages.
* Fix the Dockerfile to work with pnpm.
* Update the DEVELOPERS documentation.
When a troubleshooting entry is created or updated in this repo, sync it to GitHub. This creates a new troubleshooting discussion if one does not exist, and updates the content on an existing troubleshooting discussion if it has changed.
To preserve the connections between GitHub discussions and Markdown files, record the discussion ID and URL to the database. The database ID is then written to the Markdown file, and a new PR is generated to commit the new Markdown with ID.
There is currently no mechanism to delete outdated discussions. That will be a follow-up.
* feat(docs): main troubleshooting page
* feat(docs): global troubleshooting page layout
* feat(docs): global troubleshooting page filter logic
* enhance(docs): troubleshooting page ui & filters
Improve UX and accessibility of global troubleshooting search page.
- Implement TroubleshootingFilterStateProvider for managing filter state
- Add TroubleshootingFilterEmptyState component
- Improve TroubleshootingFilter UI with applied filters display
- Update TroubleshootingPreview component with better layout and accessibility
- Add TroubleshootingEntryAssociatedErrors component for displaying related errors
- Refactor Troubleshooting utils and schemas
- Update troubleshooting content template
* feat(docs): individual troubleshooting pages
Add individual pages for detailed information on troubleshooting
entries. Small fixes to UI for troubleshooting displays.
- Wrap GlobalTroubleshootingPage with SidebarSkeleton
- Add TroubleshootingErrorListDetailed component for detailed error display
- Implement TroubleshootingBackLink component for navigation
- Update TroubleshootingPreview to use Next.js Link and include parent page
- Refactor Footer component to accept className prop
- Add hideFooter option to SidebarSkeleton
- Minor updates to TopNavBar and other utility functions
* fix: minor styling issues
* tweak(troubleshooting docs): use breadcrumbs
* tweak(troubleshooting docs): use sidebar for filter
* enhance(troubleshooting docs): navigation, keywords
Better navigation for individual troubleshooting entries, using a
version of the sidebar + keywords handling via search params for good
linking behavior
Details:
- Add TroubleshootingSidebar to TroubleshootingPage
- Implement query state management for keywords using nuqs
- Improve accessibility and styling of troubleshooting components
- Update empty state handling and related keywords display
- Upgrade nuqs package to version 1.19.1
* fix(docs): wrap useSearchParams in Suspense
* seo(docs): add canonical link to troubleshooting
* enhance(docs,troubleshooting): auto-reveal errors
On troubleshooting search pages, if the searched term matches a hidden
error, auto-reveal it when searching. When the search term is cleared,
hide programmatically-opened errors while preserving user-opened ones.
* enhance(docs,troubleshooting): search bar
Add search bar to individual troubleshooting pages
* fix(docs): breadcrumb links
Fix breadcrumb linking so it uses next/link instead of reloading entire
app on navigation.
* fix(docs): typo
* enh(docs): new troubleshooting design
* enh(docs): use new multi-select
* enh(docs): troubleshooting responsive styles
* Update apps/docs/content/troubleshooting/monitor-supavisor-postgres-connections.mdx
* Add all missing libraries in the packages/apps.
* Add all missing Vitest imports to the tests.
* Add some missing exports to ui.
* Fix the admonition export.
* Fix various minor bugs.
* Migrate the ui package to use vitest.
Add the ability to embed code samples from GitHub into tutorials, so we can have a single source of truth for the source code.
Introduces the <$CodeSample /> syntax, which is a special syntax and not a real React component (see the directives/README.md for why on earth I did it this way -- in this specific case, CodeHike adjusts the MDX syntax tree before it gets compiled, and we need to adjust it ourselves before CodeHike sees it, so we need to get down to the level of manipulating the AST in order to make this work with CodeHike).
Adjusted one of the example tutorials to use this new feature as a test.
* Bump dompurify to non-vulnerable version.
* Bump next package to non-vulnerable version.
* Bump vite to non-vulnerable version.
* Bump path-to-regexp.
* Bump rollup to a non-vulnerable version.
* Revert vite bump.
* chore(docs,refs): prebuild self-hosted ref data
Pregenerate self-hosted ref data files, in the style of the client lib,
Management API, and CLI references. Preparatory step for migrating the
self-hosted references to App Router.
* refactor(docs): convert self-hosting to app router
Convert self-hosting reference pages to App Router.
* fix(docs,sitemap)
Pages were missing from the sitemap after the reorganization. Added them
back in.
Also added an optional priority that can be specified by including
`sitemapPriority` in content metadata. Used on the deprecated Auth
Helpers pages to see if we can tweak the relative SEO ranking for them.
* Add lucide-react to docs (to make the autocomplete work).
* Migrate the docs app icons.
* Migrate the ui-patterns.
* Remove the old icons from ui package.
* Migrate the www app from react-feather icons.
* Migrate all of studio icons.
* Migrate the only component in design-system.
* Fix an old import in ui package. Revert an import in docs app.
* Fix some pages in www.
* Remove unneeded files used in generation of icons.
* Fix a prettier error.
* Fix more issues in www.
* Fix an issue in Log Date picker.
* Replace all string sizes with number sizes because the icons grew in some cases.
* Fix more imports in security page.
* Fix an extra import.
* Remove the size prop from all icons if they're in a button and they match the button size.
* Minor fixes for docs and www.
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Migrates client SDK References to App Router. (Management and CLI API references aren't migrated yet, nor are self-hosting config references.)
Some notes:
Big changes to the way crawler pages are built and individual section URLs (e.g., javascript/select) are served. All of these used to be SSG-generated pages, but the number of heavy pages was just too much to handle -- slow as molasses and my laptop sounded like it was taking off, and CI sometimes refuses to build it all at all.
Tried various tricks with caching and pre-generating data but no dice.
So I changed to only building one copy of each SDK+version page, then serving the sub-URLs through a response rewrite. That's for the actual user-visible pages.
For the bot pages, each sub-URL needs to be its own page, but prebuilding it doesn't work, and rendering on demand from React components is too slow (looking for super-fast response here for SEO). Instead I changed to using an API route that serves very minimal, hand-crafted HTML. It looks ugly, but it's purely for the search bots.
You can test what bots see by running curl --user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" <URL_OF_PAGE>
Also added some smoke tests to run against prod for the crawler routes, since we don't keep an eye on those regularly, and Vercel config changes could surprise-break them. Tested the meta images on Open Graph and all seems to work fine.
With this approach, full production builds are really fast: ~5 minutes
Starts using the new type spec handling, which is better at finding params automatically, so I could remove some of the manually written ones from the spec files.
This produces more complete type information (unions, following type alias refererences that aren't successfully dereferenced at an earlier stage, etc.), in a format that is much easier to query from UI components. Also adds a snapshot test for easier future iteration.
I had a lot of trouble configuring Jest for the snapshot tests (something to do with imports and compile targets), and there are zero other tests in this directory right now, so I just tore out the test setup and replaced it with Vitest. Much faster!
* Move the eslint preset into a separate package.
* Import the next package into all apps. Remove redundant packages.
* Import the new eslint rules.
* Update the package-lock.
Keeps track of fine-grained (per section) edit times for docs content.
Once daily, a GitHub Action runs that:
- Checks whether content hashes have changed for each section
- Updates the table that tracks content edit times if the hashes have changed
Note: The cron job isn't scheduled yet. I'll run the Action manually a few times to validate it, then turn it on in another PR.
* move to shared types
* Rename the package to api-types.
* Fix a forgotten dependency.
* Add more forgotten deps.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>