Skip to content

Releases: alineacms/alinea

v1.0.5

29 Nov 12:50
0b545c2
Compare
Choose a tag to compare
  • Alinea will now fail if linked entries cannot be resolved during querying.
    Before it would log the error but continue - but this is rarely desired.

v1.0.4

26 Nov 15:35
d42e8e4
Compare
Choose a tag to compare
  • Fix removing field contents in Edit.update. Pass an undefined value to remove
    field contents:

    await cms.commit(
      Edit.update({
        id: '...',
        set: {removeMe: undefined}
      })
    )
  • Fix processing link data correctly even it contains legacy data

v1.0.3

19 Nov 13:21
6e67856
Compare
Choose a tag to compare
  • Only access normalized config in next cms adapter. This fixes an error
    in production builds which would prevent you from querying media files.

v1.0.2

19 Nov 09:38
d35581a
Compare
Choose a tag to compare
  • Tweak the withAlinea config function to work in all environments including
    Next 14.

v1.0.1

18 Nov 13:58
862e2c3
Compare
Choose a tag to compare
  • Add the Infer.Entry and Infer.ListItem types which can be used to infer the
    type of an entry or list item from a query.

    type Entry = Infer.Entry<typeof EntryType>
    const entry: Entry = await cms.get({type: MyType})
    type ListItem = Infer.ListItem<typeof ListType>
    const list: Array<ListItem> = await cms.get({select: MyType.list})

v1.0.0

18 Nov 09:05
97860e0
Compare
Choose a tag to compare
  • Add support for Next.js 15 and Turbopack.
  • Removed all previously deprecated options.
  • Next.js config changes are now bundled in a withAlinea export found in
    'alinea/next'.
  • Querying via cms.find/get is rewritten to take a single query object.
    Have a look at the docs to see how to use the new query api.
  • Creating custom fields can now be done through Field.create.
  • Entries now have a single id. If you are upgrading and were using i18n you
    can stabilize your ids by running npx alinea build --fix.

v0.11.2

25 Oct 04:18
3ff302d
Compare
Choose a tag to compare
  • Querying data in a Next.js edge route or middleware will forward the request
    to your CMS handler. This will keep the code size of the edge route to a
    minimum.

v0.11.1

15 Oct 13:35
b1578cc
Compare
Choose a tag to compare
  • Fix RichTextEditor.addHtml not parsing marks correctly
  • Fix index on entry creation

v0.11.0

11 Oct 11:38
b245426
Compare
Choose a tag to compare
  • The cms handler has been rewritten to handle both backend and previews. This
    requires updating your handler route. In the case of Next.js you can replace
    both app/api/cms/[...slug]/route.ts and /app/api/preview.ts with the
    following:

    // app/api/cms/route.ts
    import {cms} from '@/cms'
    import {createHandler} from 'alinea/next'
    
    const handler = createHandler(cms)
    
    export const GET = handler
    export const POST = handler

    This release also requires you to restructure your Alinea config file.
    The dashboard property is replaced by the baseUrl, handlerUrl and
    dashboardFile properties.

    // cms.tsx
    
    // Previously:
    const cms = createCMS({
      // ... schema and workspaces
      dashboard: {
        dashboardUrl: '/admin.html',
        handlerUrl: '/api/cms',
        staticFile: 'public/admin.html'
      },
      preview:
        process.env.NODE_ENV === 'development'
          ? 'http://localhost:3000/api/preview'
          : '/api/preview'
    })
    
    // Becomes:
    const cms = createCMS({
      // ... schema and workspaces
      baseUrl: {
        // Point this to your local frontend
        development: 'http://localhost:3000'
        // If hosting on vercel you can use: process.env.VERCEL_URL
        production: 'http://example.com'
      },
      handlerUrl: '/api/cms',
      dashboardFile: 'admin.html',
      // Optionally supply the public folder with
      publicDir: 'public',
      // Enable previews which are handled via handlerUrl
      preview: true
    })

v0.10.1

30 Jul 11:02
c729a55
Compare
Choose a tag to compare
  • Use buffer-to-base64 to compress store data written to disk
  • Improve live previews, fetch data only when needed