Pre-release Changes
-
BREAKING CHANGE: Remove the
remix/data-table/sqlexport. ImportSqlStatement,sql, andrawSqlfromremix/data-tableinstead.remix/data-table/sql-helpersremains available for adapter-facing SQL utilities.remix/data-tablenow exports theDatabaseclass as a runtime value. You can construct a database directly withnew Database(adapter, options)or keep usingcreateDatabase(adapter, options), which now delegates to the class constructor.BREAKING CHANGE:
remix/data-tableno longer exportsQueryBuilder. ImportQueryandqueryfromremix/data-table, then execute unbound queries withdb.exec(...).db.exec(...)now accepts only raw SQL orQueryvalues, and unbound terminal methods likefirst(),count(),insert(), andupdate()returnQueryobjects instead of separate command descriptor types.db.query(table)remains available as shorthand and now returns the same boundQueryclass.remix/data-table/migrationsno longer exports a separateDatabasetype alias. ImportDatabasefromremix/data-tablewhen you need the migrationdbtype directly.The incidental
QueryMethodtype export has also been removed; useDatabase['query']orQueryForTable<table>when you need that type shape.Added
package.jsonexports:remix/auth-middlewareto re-export APIs from@remix-run/auth-middlewareremix/authto re-export APIs from@remix-run/auth
-
Add
remix/cors-middlewareto re-export the CORS middleware APIs from@remix-run/cors-middleware. -
Update
remix/componentandremix/component/serverto re-export the latest@remix-run/componentframe-navigation APIs.remix/componentnow exposesnavigate(href, { src, target, history }),link(href, { src, target, history }),run({ loadModule, resolveFrame }), and thehandle.frames.topandhandle.frames.get(name)helpers, whileremix/component/serverre-exports the SSR frame source APIs includingframeSrc,topFrameSrc, andResolveFrameContext. -
Add browser-origin and CSRF protection middleware APIs to
remix.remix/cop-middlewareexposescop(options)for browser-focused cross-origin protection
usingSec-Fetch-SitewithOriginfallback, trusted origins, and configurable bypasses.remix/csrf-middlewareexposescsrf(options)andgetCsrfToken(context)for
session-backed CSRF tokens plus origin validation.- Apps can use either middleware independently or layer
cop(),session(), andcsrf()
together when they want both browser-origin filtering and token-backed protection.
-
Bumped
@remix-run/*dependencies:async-context-middleware@0.2.0auth@0.1.0auth-middleware@0.1.0component@0.6.0compression-middleware@0.1.4cop-middleware@0.1.0cors-middleware@0.1.0csrf-middleware@0.1.0data-schema@0.2.0data-table@0.2.0data-table-mysql@0.2.0data-table-postgres@0.2.0data-table-sqlite@0.2.0fetch-router@0.18.0form-data-middleware@0.2.0form-data-parser@0.16.0logger-middleware@0.1.4method-override-middleware@0.1.5multipart-parser@0.15.0route-pattern@0.20.0session-middleware@0.2.0static-middleware@0.4.5