Skip to the content
OrielDocs
0.1.0-alpha.15GitHub

Getting started

Upgrade guide

Oriel is in alpha, so a release can change something your app relies on. Each release's breaking changes are listed below, newest first, each with what to do about it.

Moving to a new version#

A new app takes each Oriel package at the exact version of the installer that made it, so a later release changes nothing in your app until you move to it. To move, set every @orieljs/* package in your package.json to the same new version, exactly:

Terminal
npm install --save-exact @orieljs/framework@0.1.0-alpha.15 @orieljs/vite@0.1.0-alpha.15

List your kit's own packages in the same command: @orieljs/inertia-client and your framework's adapter (@orieljs/inertia-react, -vue, -svelte, -solid or -angular), or @orieljs/live-client. With the other package managers, -E pins the version the same way: pnpm add -E …, yarn add -E …, bun add -E …. Then run your migrations and work through the sections below, from the version you had to the one you moved to:

Terminal
node oriel migrate

An app made before 0.1.0-alpha.15 has ^ ranges, which take a later release by themselves the next time the dependencies are installed without a lockfile. Pinning its packages as above stops that.

0.1.0-alpha.15#

  • Oriel's packages are pinned in new apps. Nothing to do in an existing app, but you can pin it the same way (above).
  • find() with an array returns a collection of the models it found, as Laravel's does. Code that called find([1, 2]) expecting one model takes .first() of the result.
  • Two app classes with the same name are stored in a queued job by their folder, as Events.OrderShipped and Mail.OrderShipped. A class whose name is its own keeps it. Deploy your app and its workers together.
  • A limit() in an eager-load constraint applies to each model, as in Laravel 11: Post.with({ comments: (q) => q.limit(3) }) gives each post three comments. It needs SQLite 3.25, MySQL 8 or PostgreSQL.
  • increment() and decrement() on a model dispatch updating and updated. An observer that should ignore them checks wasChanged() for the columns it cares about.
  • Two-factor counts wrong codes in the cache. On several servers, or on Vercel, the cache store must be shared: database or redis.
  • public/ publishes the same files everywhere: serve(), vercel:build and oriel export leave out TypeScript files and dotfiles, except .well-known/ and .nojekyll. serve() now serves .well-known/; the builds no longer copy other dotfiles, such as .htaccess, or public/index.ts.
  • Inner transactions started at once under one transaction run one after the other. One that waits for a sibling started beside it never finishes: await them in turn, or start them from separate transactions.
  • Two-factor sign-in rehashes the password when your hashing settings changed, as Auth.attempt() does, so with auth.session the user's other sessions end at their next sign-in after the change.
  • A chain's catch jobs and a batch's then, catch and finally go to the chain's or batch's connection and queue, not the default: run a worker there.
  • where(column, 'like', …) on PostgreSQL compares the column as text, as Laravel does, so it works on numbers and dates; a citext column compares case-sensitively there, so use whereLike() or ilike for those.
  • Page prop types leave out a model's hidden columns, which never reached the page: code reading props.user.password no longer typechecks.
  • inertia:stop-ssr exits 1 with "Unable to connect to Inertia SSR server." when none is running, and inertia:start-ssr exits 1 when its server is killed by a signal: a deploy script that stops SSR before starting it should allow the first to fail.

0.1.0-alpha.14#

  • Database sessions keep no IP address or browser. Set client_details: true in config/session.ts to keep storing them; the columns are already there.
  • Drivers are installed separately: better-sqlite3 for SQLite on Node, @aws-sdk/client-s3 and @aws-sdk/s3-request-presigner for an s3 disk, @vercel/blob for a blob disk. A missing one says which package to install.
  • A Live upload's store() moves the file. Reset the property after storing it: a second store(), or temporaryUrl() after it, throws UploadAlreadyStoredError.
  • TwoFactor.enableApp() refuses an app that already works, with TwoFactorAppAlreadyEnabledError: call disableApp() first.
  • DB_URL and DB_CONNECTION no longer reach your tests. Use TEST_DATABASE_URL to test on PostgreSQL or MySQL.
  • A command registered as a class gets a new instance for each run.
  • Add AuthenticateSession to the web group in bootstrap/app.ts to end other sessions on a new password, and in vitest.config.ts replace env: { ...TESTING_ENVIRONMENT } with ...testingConfig().

Was this page helpful?

Privacy policy ·

esc