Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency tinacms to v1.6.7 #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 8, 2022

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
tinacms (source) 1.4.3 -> 1.6.7 age adoption passing confidence

Release Notes

tinacms/tinacms (tinacms)

v1.6.7

Patch Changes
  • 82ab066: upgrade vulnerable packages in example project, test project and peer dependency packages

v1.6.6

Patch Changes

v1.6.5

Patch Changes

v1.6.4

Compare Source

Patch Changes

v1.6.3

Compare Source

Patch Changes

v1.6.2

Compare Source

Patch Changes
  • 141e78c: Fix for issue where content creation UI on mobile is stretched beyond the screen size by changing the style from flex-1 to w-full and then adding dynamic top padding so it doesn't conflict with hamburger menu

v1.6.1

Compare Source

Patch Changes
  • 216cfff: Add fetch options to generated client

v1.6.0

Compare Source

Minor Changes
  • c8ceba4: Fixes an issue where it was impossible to navigate to nested fields (e.g. object fields or list items) when editing the values for a rich-text template when that template was configured to be inline: true

v1.5.30

Compare Source

Patch Changes
  • 04704e3: Fix incorrect call to isAuthenticated

v1.5.29

Compare Source

Patch Changes

v1.5.28

Compare Source

Patch Changes

v1.5.27

Compare Source

Patch Changes

v1.5.26

Compare Source

Patch Changes
  • 9e1a22a: Fix media store auth functions

v1.5.25

Compare Source

Patch Changes

v1.5.24

Compare Source

Patch Changes
  • a65ca13: ## TinaCMS Self hosted Updates
Changes in the database file
Deprecations and Additions
  • Deprecated: onPut, onDelete, and level arguments in createDatabase.
  • Added: databaseAdapter to replace level.
  • Added: gitProvider to substitute onPut and onDelete.
  • New Package: tinacms-gitprovider-github, exporting the GitHubProvider class.
  • Interface Addition: gitProvider added to @tinacms/graphql.
  • Addition: Generated database client.
Updated database.ts Example
import { createDatabase, createLocalDatabase } from '@​tinacms/datalayer'
import { MongodbLevel } from 'mongodb-level'
import { GitHubProvider } from 'tinacms-gitprovider-github'

const isLocal = process.env.TINA_PUBLIC_IS_LOCAL === 'true'

export default isLocal
  ? createLocalDatabase()
  : createDatabase({
      gitProvider: new GitHubProvider({
        branch: process.env.GITHUB_BRANCH,
        owner: process.env.GITHUB_OWNER,
        repo: process.env.GITHUB_REPO,
        token: process.env.GITHUB_PERSONAL_ACCESS_TOKEN,
      }),
      databaseAdapter: new MongodbLevel<string, Record<string, any>>({
        collectionName: 'tinacms',
        dbName: 'tinacms',
        mongoUri: process.env.MONGODB_URI,
      }),
      namespace: process.env.GITHUB_BRANCH,
    })
Migrating database.ts
a. Replacing onPut and onDelete with gitProvider
  • GitHubProvider Usage: Replace onPut and onDelete with gitProvider, using the provided GitHubProvider for GitHub.
const gitProvider = new GitHubProvider({
  branch: process.env.GITHUB_BRANCH,
  owner: process.env.GITHUB_OWNER,
  repo: process.env.GITHUB_REPO,
  token: process.env.GITHUB_PERSONAL_ACCESS_TOKEN,
})
  • Custom Git Provider: Implement the GitProvider interface for different git providers.

If you are not using Github as your git provider, you can implement the GitProvider interface to use your own git provider.

class CustomGitProvider implements GitProvider
    async onPut(key: string, value: string)
        // ...

    async onDelete(key: string)
        // ...

const gitProvider = new CustomGitProvider();
b. Renaming level to databaseAdapter
  • Renaming in Code: Change level to databaseAdapter for clarity.
createDatabase({
-    level: new MongodbLevel<string, Record<string, any>>(...),
+    databaseAdapter: new MongodbLevel<string, Record<string, any>>(...),
})
c. createLocalDatabase Function
  • Usage: Implement a local database with the createLocalDatabase function.
import { createLocalDatabase } from '@&#8203;tinacms/datalayer'
createLocalDatabase(port)
d. Consolidated Example
  • Updated database.{ts,js} File:
import { createDatabase, createLocalDatabase, GitHubProvider } from '@&#8203;tinacms/datalayer';
import { MongodbLevel } from 'mongodb-level';
const isLocal = process.env.TINA_PUBLIC_IS_LOCAL === 'true';
export default isLocal
  ? createLocalDatabase()
  : createDatabase({
      gitProvider: new GitHubProvider(...),
      databaseAdapter: new MongodbLevel<string, Record<string, any>>(...),
    });
Summary of Authentication Updates in Config
a. AuthProvider and AbstractAuthProvider
  • New: authProvider in defineConfig.
  • Class: AbstractAuthProvider for extending new auth providers.
  • Clerk Auth Provider: New provider added.
  • Renaming: admin.auth to admin.authHooks.
  • Deprecation: admin.auth.
b. Auth Provider in Internal Client and Config
  • Transition: From auth functions to authProvider class.
c. Migration for Authentication
  • Previous API:
defineConfig({
  admin: {
    auth: {
      login() {},
      logout() {},
      //...
    },
  },
  //...
})
  • New API:
import { AbstractAuthProvider } from 'tinacms'
class CustomAuthProvider extends AbstractAuthProvider {
  login() {}
  logout() {}
  //...
}
defineConfig({
  authProvider: new CustomAuthProvider(),
  //...
})
TinaCMS Self Hosted backend updates
  • New: TinaNodeBackend is exported from @tinacms/datalayer. This is used to host the TinaCMS backend in a single function.

  • New: LocalBackendAuthProvider is exported from @tinacms/datalayer. This is used to host the TinaCMS backend locally.

  • New: AuthJsBackendAuthProvider is exported from tinacms-authjs. This is used to host the TinaCMS backend with AuthJS.

Migrating the TinaCMS backend

Now, instead of hosting the in /tina/api/gql.ts file, the entire TinaCMS backend (including auth) will be hosted in a single backend function.

/api/tina/[...routes].{ts,js}

import { TinaNodeBackend, LocalBackendAuthProvider } from '@&#8203;tinacms/datalayer'

import { TinaAuthJSOptions, AuthJsBackendAuthProvider } from 'tinacms-authjs'

import databaseClient from '../../../tina/__generated__/databaseClient'

const isLocal = process.env.TINA_PUBLIC_IS_LOCAL === 'true'

const handler = TinaNodeBackend({
  authProvider: isLocal
    ? LocalBackendAuthProvider()
    : AuthJsBackendAuthProvider({
        authOptions: TinaAuthJSOptions({
          databaseClient: databaseClient,
          secret: process.env.NEXTAUTH_SECRET,
        }),
      }),
  databaseClient,
})

export default (req, res) => {
  // Modify the request here if you need to
  return handler(req, res)
}

These changes are put in place to make self hosted TinaCMS easier to use and more flexible.

Please check out the docs for more information on self hosted TinaCMS.

v1.5.23

Compare Source

Patch Changes
  • 131b4dc: Fix button styling issue when using Firefox
  • 93bfc80: Fix issue where _template value was provided when creating a document from the editorial workflow
  • 1fc2c4a: Fix media manager to pass back error when upload_url fails due to existing file
  • 693cf5b: Improve types for tables, add support for column alignment
  • afd1c7c: Fix issue where Saved Changes indicator is not updated after a successful submit on a form
  • a937aab: Add support for build.basePath to be an environment variable
  • 661239b: update final form to fix peer deps issues
  • 630ab94: No longer treat user touch event as pending change for rich-text fields
  • Updated dependencies [693cf5b]

v1.5.22

Compare Source

Patch Changes
  • b6fbab8: Add support for basic markdown tables.
Usage
// tina/config.ts
import `tinaTableTemplate` from `tinacms`

// add it to the rich-text template
  {
    type: 'rich-text',
    label: 'Body',
    name: '_body',
    templates: [
      tinaTableTemplate
    ///

Customize the th and td fields in the <TinaMarkdown> component:

<TinaMarkdown
  content={props.body}
  components={{
    th: (props) => <th className="bg-gray-100 font-bold" {...props} />,
    td: (props) => <td className="bg-gray-100" {...props} />,
  }}
/>

To control the rendering for `

v1.5.21

Compare Source

Patch Changes
  • 1770027: Fix/media thumbnail
  • e69a3ef: fix: Fix active form on nested group when value is empty
  • c925786: Fix issue with undo/redo in rich-text editor
  • 9f01550: Fix issue where deeply nested mdx fields were not picking up the correct template"

v1.5.20

Compare Source

Patch Changes

v1.5.19

Compare Source

Patch Changes
  • 1563ce5: Update the router function to work asynchronously. This means that a user can now fetch data or perform other async operations in the router function.

    Example:

     router: async ({ document }) => {
      const res = await client.queries.post({
        relativePath: document._sys.relativePath,
      })
      return `/posts/${res.data.slug}`
    },
  • e83ba88: Update generated client to work in an edge runtime

  • Updated dependencies [1563ce5]

v1.5.18

Compare Source

Patch Changes
  • 9c27087: Show filter/search inputs on collections with templates instead of fields

  • 65d0a70: Show search input even when collection contains only non-filterable fields

  • 133e97d: Update the before submit types to not pass the finalForm form since it is contained in the TinaForm

  • f02b436: Adds a second parameter to the slugify function that passes the current collection and template.

  • 37cf8bd: Updated so a user can add an absolute path to the filename

    Before all files where created reletive to the users current folder and we gave an error if the filename started with a /.

    Now we check if the filename starts with a / and if it does we use that as the absolute path to the file.

    Demo: https://www.loom.com/share/5256114d1ce648eda69881e33f8f6bd4?sid=3eafb588-c4da-49eb-ace2-d6b02313e14c

  • ad22e09: Consolidate tailwind usage

  • 8db979b: Add support for "static" setting in Tina media, which preprocesses the available media files and disables uploads and deletions of media from the CMS.

  • 7991e09: Add a beforeSubmit hook function on a collection.ui. This give users the ability to run a function before the form is submitted.

    If the function returns values those values will be used will be submitted instead of the form values.

    If the function returns a falsy value the original form values will be submitted.

Example
// tina/config.{ts.js}

export default defineConfig({
  schema: {
    collections: [
      {
        ui: {
          // Example of beforeSubmit
          beforeSubmit: async ({ values }) => {
            return {
              ...values,
              lastUpdated: new Date().toISOString(),
            }
          },
          //...
        },
        //...
      },
      //...
    ],
  },
  //...
})

v1.5.17

Compare Source

Patch Changes

v1.5.16

Compare Source

Patch Changes

v1.5.15

Compare Source

Patch Changes

v1.5.14

Compare Source

Patch Changes
  • f1e8828: fix: resort prop overrides to allow for style & className merging of list items
  • 304e233: - Update pull request title to include the branch name
    • Slugify brach name when typing in the title
  • Updated dependencies [f1e8828]
  • Updated dependencies [304e233]
  • Updated dependencies [a5d9864]

v1.5.13

Compare Source

Patch Changes

v1.5.12

Compare Source

Patch Changes

v1.5.11

Compare Source

Patch Changes

v1.5.10

Compare Source

Patch Changes

v1.5.9

Compare Source

Patch Changes

v1.5.8

Compare Source

Patch Changes

v1.5.7

Compare Source

Patch Changes

v1.5.6

Compare Source

Patch Changes
  • 5a60189: Add support for "quick editing". By adding the [data-tina-field] attribute to your elements, editors can click to see the
    correct form and field focused in the sidebar.

    This work closely resembles the "Active Feild Indicator" feature.
    Which will be phased in out place of this in the future. Note that the attribute name is different, [data-tinafield] is the value
    for the "Active Field Indicator" while [data-tina-field] is the new attribute.

    The tinaField helper function should now only be used with the [data-tina-field] attibute.

    Adds experimental support for Vercel previews, the useVisualEditing hook from @tinacms/vercel-previews can be used
    to activate edit mode and listen for Vercel edit events.

  • Updated dependencies [63dd989]

  • Updated dependencies [b3d98d1]

  • Updated dependencies [7f95c1c]

v1.5.5

Compare Source

Patch Changes

v1.5.4

Compare Source

Patch Changes
  • f6e2ec5: fix issue with single document naviation

v1.5.3

Compare Source

Patch Changes
  • 3532d07: fix issue where a user was unable to create a document with templates
  • 6d1465f: Fix auto navigate logic in GetCollection to only be active for Documents and not Folders

v1.5.2

Compare Source

Patch Changes

v1.5.1

Compare Source

Patch Changes
  • 1563ce5: Update the router function to work asynchronously. This means that a user can now fetch data or perform other async operations in the router function.

    Example:

     router: async ({ document }) => {
      const res = await client.queries.post({
        relativePath: document._sys.relativePath,
      })
      return `/posts/${res.data.slug}`
    },
  • e83ba88: Update generated client to work in an edge runtime

  • Updated dependencies [1563ce5]

v1.5.0

Compare Source

Minor Changes
  • eeedcfd: Adds folder support in the admin. See this PR for more info and a demo.
Patch Changes

v1.4.6

Compare Source

Patch Changes

v1.4.5

Compare Source

Patch Changes
  • 75d5ed3: Add html tag back into rich-text response

v1.4.4

Compare Source

Patch Changes

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@thedimestar
Copy link

Merge this please

@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1 chore(deps): update dependency tinacms to v1.4.5 Apr 12, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 2c01efc to 96309b3 Compare April 12, 2023 11:42
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.4.5 chore(deps): update dependency tinacms to v1.4.6 Apr 14, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 96309b3 to 506bf9b Compare April 14, 2023 03:36
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 506bf9b to d55490f Compare April 26, 2023 21:31
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.4.6 chore(deps): update dependency tinacms to v1.5.0 Apr 26, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from d55490f to 4793c93 Compare April 27, 2023 19:37
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.0 chore(deps): update dependency tinacms to v1.5.1 Apr 27, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 4793c93 to ce71669 Compare April 28, 2023 22:43
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.1 chore(deps): update dependency tinacms to v1.5.2 Apr 28, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from ce71669 to a1e4dee Compare May 2, 2023 21:57
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.2 chore(deps): update dependency tinacms to v1.5.3 May 2, 2023
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.3 chore(deps): update dependency tinacms to v1.5.4 May 4, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch 2 times, most recently from dfb5f56 to c94b62a Compare May 10, 2023 19:17
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.4 chore(deps): update dependency tinacms to v1.5.5 May 10, 2023
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.5 chore(deps): update dependency tinacms to v1.5.6 May 17, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 4f172da to 4e4e927 Compare June 2, 2023 17:32
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.6 chore(deps): update dependency tinacms to v1.5.7 Jun 2, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 4e4e927 to 3fd76e8 Compare June 2, 2023 21:29
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.7 chore(deps): update dependency tinacms to v1.5.8 Jun 2, 2023
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.8 chore(deps): update dependency tinacms to v1.5.9 Jun 13, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch 2 times, most recently from 3c071a0 to 43fc3e5 Compare June 14, 2023 20:50
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.9 chore(deps): update dependency tinacms to v1.5.10 Jun 14, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 43fc3e5 to 3c13cb0 Compare June 22, 2023 19:16
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.10 chore(deps): update dependency tinacms to v1.5.11 Jun 22, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 3c13cb0 to 58d2cb7 Compare June 27, 2023 20:02
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.11 chore(deps): update dependency tinacms to v1.5.12 Jun 27, 2023
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.26 chore(deps): update dependency tinacms to v1.5.27 Nov 28, 2023
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.27 chore(deps): update dependency tinacms to v1.5.28 Nov 30, 2023
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from ef6a7f2 to 092e493 Compare November 30, 2023 21:58
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 092e493 to 26444aa Compare March 2, 2024 21:40
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.28 chore(deps): update dependency tinacms to v1.5.29 Mar 2, 2024
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 26444aa to a2e8f90 Compare March 5, 2024 18:53
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.29 chore(deps): update dependency tinacms to v1.5.30 Mar 5, 2024
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from a2e8f90 to dda7959 Compare March 7, 2024 17:17
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.5.30 chore(deps): update dependency tinacms to v1.6.0 Mar 7, 2024
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from dda7959 to fd147be Compare March 29, 2024 02:02
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.6.0 chore(deps): update dependency tinacms to v1.6.1 Mar 29, 2024
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from fd147be to 8997f10 Compare April 24, 2024 01:09
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.6.1 chore(deps): update dependency tinacms to v1.6.2 Apr 24, 2024
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 8997f10 to 2d99631 Compare May 2, 2024 04:30
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.6.2 chore(deps): update dependency tinacms to v1.6.3 May 2, 2024
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 2d99631 to 4fdfbf3 Compare June 4, 2024 00:33
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.6.3 chore(deps): update dependency tinacms to v1.6.4 Jun 4, 2024
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 4fdfbf3 to 05d6b91 Compare July 8, 2024 02:17
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.6.4 chore(deps): update dependency tinacms to v1.6.5 Jul 8, 2024
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 05d6b91 to 3cb5ab9 Compare July 16, 2024 10:29
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.6.5 chore(deps): update dependency tinacms to v1.6.6 Jul 16, 2024
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 3cb5ab9 to add6747 Compare July 17, 2024 01:07
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.6.6 chore(deps): update dependency tinacms to v1.6.7 Jul 17, 2024
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.6.7 chore(deps): update dependency tinacms to v1.6.7 - autoclosed Dec 8, 2024
@renovate renovate bot closed this Dec 8, 2024
@renovate renovate bot deleted the renovate/tinacms-1.x branch December 8, 2024 18:49
@renovate renovate bot changed the title chore(deps): update dependency tinacms to v1.6.7 - autoclosed chore(deps): update dependency tinacms to v1.6.7 Dec 9, 2024
@renovate renovate bot reopened this Dec 9, 2024
@renovate renovate bot force-pushed the renovate/tinacms-1.x branch from 899c964 to add6747 Compare December 9, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant