diff --git a/api/src/app.ts b/api/src/app.ts index d84e733448..3f05840818 100644 --- a/api/src/app.ts +++ b/api/src/app.ts @@ -24,7 +24,7 @@ import settingsRouter from './controllers/settings'; import usersRouter from './controllers/users'; import utilsRouter from './controllers/utils'; import webhooksRouter from './controllers/webhooks'; -import { isInstalled, validateDBConnection } from './database'; +import { isInstalled, validateDBConnection, validateMigrations } from './database'; import { emitAsyncSafe } from './emitter'; import env from './env'; import { InvalidPayloadException } from './exceptions'; @@ -60,6 +60,10 @@ export default async function createApp(): Promise { process.exit(1); } + if ((await validateMigrations()) === false) { + logger.warn(`Database migrations have not all been run`); + } + await initializeExtensions(); registerExtensionHooks(); diff --git a/api/src/database/index.ts b/api/src/database/index.ts index 6eae98ccc0..fa6e59beff 100644 --- a/api/src/database/index.ts +++ b/api/src/database/index.ts @@ -5,6 +5,8 @@ import env from '../env'; import logger from '../logger'; import { getConfigFromEnv } from '../utils/get-config-from-env'; import { validateEnv } from '../utils/validate-env'; +import fse from 'fs-extra'; +import path from 'path'; let database: Knex | null = null; let inspector: ReturnType | null = null; @@ -134,3 +136,35 @@ export async function isInstalled(): Promise { // exists when using the installer CLI. return await inspector.hasTable('directus_collections'); } + +export async function validateMigrations(): Promise { + const database = getDatabase(); + + try { + let migrationFiles = await fse.readdir(path.join(__dirname, 'migrations')); + + const customMigrationsPath = path.resolve(env.EXTENSIONS_PATH, 'migrations'); + + let customMigrationFiles = + ((await fse.pathExists(customMigrationsPath)) && (await fse.readdir(customMigrationsPath))) || []; + + migrationFiles = migrationFiles.filter( + (file: string) => file.startsWith('run') === false && file.endsWith('.d.ts') === false + ); + + customMigrationFiles = customMigrationFiles.filter((file: string) => file.endsWith('.js')); + + migrationFiles.push(...customMigrationFiles); + + const requiredVersions = migrationFiles.map((filePath) => filePath.split('-')[0]); + const completedVersions = (await database.select('version').from('directus_migrations')).map( + ({ version }) => version + ); + + return requiredVersions.every((version) => completedVersions.includes(version)); + } catch (error) { + logger.error(`Database migrations cannot be found`); + logger.error(error); + throw process.exit(1); + } +} diff --git a/api/src/database/migrations/run.ts b/api/src/database/migrations/run.ts index 5b3566fd1d..fb9c20bc6a 100644 --- a/api/src/database/migrations/run.ts +++ b/api/src/database/migrations/run.ts @@ -5,12 +5,7 @@ import fse from 'fs-extra'; import { Knex } from 'knex'; import path from 'path'; import env from '../../env'; - -type Migration = { - version: string; - name: string; - timestamp: Date; -}; +import { Migration } from '../../types'; export default async function run(database: Knex, direction: 'up' | 'down' | 'latest'): Promise { let migrationFiles = await fse.readdir(__dirname); diff --git a/api/src/types/index.ts b/api/src/types/index.ts index d8c3228f00..a940387388 100644 --- a/api/src/types/index.ts +++ b/api/src/types/index.ts @@ -8,6 +8,7 @@ export * from './files'; export * from './graphql'; export * from './items'; export * from './meta'; +export * from './migration'; export * from './permissions'; export * from './query'; export * from './relation'; diff --git a/api/src/types/migration.ts b/api/src/types/migration.ts new file mode 100644 index 0000000000..0819484a83 --- /dev/null +++ b/api/src/types/migration.ts @@ -0,0 +1,5 @@ +export type Migration = { + version: string; + name: string; + timestamp: Date; +}; diff --git a/changelog.md b/changelog.md index 1ca3da27f1..52573d9366 100644 --- a/changelog.md +++ b/changelog.md @@ -7,137 +7,228 @@ _Changes marked with a :warning: contain potential breaking changes depending on ### :sparkles: New Features - **API** - - [#7014](https://github.com/directus/directus/pull/7014) Add new /utils/cache/clear endpoint ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7008](https://github.com/directus/directus/pull/7008) Prevent from deleting the last admin user ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7014](https://github.com/directus/directus/pull/7014) Add new /utils/cache/clear endpoint + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7008](https://github.com/directus/directus/pull/7008) Prevent from deleting the last admin user + ([@rijkvanzanten](https://github.com/rijkvanzanten)) ### :rocket: Improvements - **App** - - [#7025](https://github.com/directus/directus/pull/7025) Handle autocomplete empty path configurations ([@luanmm](https://github.com/luanmm)) - - [#7013](https://github.com/directus/directus/pull/7013) Use limit layoutQuery in export sidebar detail ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7025](https://github.com/directus/directus/pull/7025) Handle autocomplete empty path configurations + ([@luanmm](https://github.com/luanmm)) + - [#7013](https://github.com/directus/directus/pull/7013) Use limit layoutQuery in export sidebar detail + ([@rijkvanzanten](https://github.com/rijkvanzanten)) - **API** - - [#7003](https://github.com/directus/directus/pull/7003) Default SERVE_APP to true ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#6987](https://github.com/directus/directus/pull/6987) Wait for the database to be ready in bootstrap step ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#6852](https://github.com/directus/directus/pull/6852) Support for notifying user if an update is available for Directus CLI ([@msaaddev](https://github.com/msaaddev)) + - [#7003](https://github.com/directus/directus/pull/7003) Default SERVE_APP to true + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6987](https://github.com/directus/directus/pull/6987) Wait for the database to be ready in bootstrap step + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6852](https://github.com/directus/directus/pull/6852) Support for notifying user if an update is available for + Directus CLI ([@msaaddev](https://github.com/msaaddev)) ### :bug: Bug Fixes - **API** - - [#7060](https://github.com/directus/directus/pull/7060) Fix top level perm check on nested m2a records ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7050](https://github.com/directus/directus/pull/7050) Don't throw 500 on missing email ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7042](https://github.com/directus/directus/pull/7042) Fix type checking in password reset controller ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7041](https://github.com/directus/directus/pull/7041) Fix mssql max-length doubling ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7027](https://github.com/directus/directus/pull/7027) Move object-hash to non-optional deps ([@paescuj](https://github.com/paescuj)) - - [#7021](https://github.com/directus/directus/pull/7021) Fix cache-key causing problems in memcached ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7020](https://github.com/directus/directus/pull/7020) Don't return collections outside of cache ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7019](https://github.com/directus/directus/pull/7019) Fix MS SQL unique constraint field name extraction ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7008](https://github.com/directus/directus/pull/7008) Prevent from deleting the last admin user ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7003](https://github.com/directus/directus/pull/7003) Default SERVE_APP to true ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7060](https://github.com/directus/directus/pull/7060) Fix top level perm check on nested m2a records + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7050](https://github.com/directus/directus/pull/7050) Don't throw 500 on missing email + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7042](https://github.com/directus/directus/pull/7042) Fix type checking in password reset controller + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7041](https://github.com/directus/directus/pull/7041) Fix mssql max-length doubling + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7027](https://github.com/directus/directus/pull/7027) Move object-hash to non-optional deps + ([@paescuj](https://github.com/paescuj)) + - [#7021](https://github.com/directus/directus/pull/7021) Fix cache-key causing problems in memcached + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7020](https://github.com/directus/directus/pull/7020) Don't return collections outside of cache + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7019](https://github.com/directus/directus/pull/7019) Fix MS SQL unique constraint field name extraction + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7008](https://github.com/directus/directus/pull/7008) Prevent from deleting the last admin user + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7003](https://github.com/directus/directus/pull/7003) Default SERVE_APP to true + ([@rijkvanzanten](https://github.com/rijkvanzanten)) - **App** - - [#7057](https://github.com/directus/directus/pull/7057) Fix last action button not surfacing on mobile ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7049](https://github.com/directus/directus/pull/7049) Fix value unstaging in nested field groups ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7045](https://github.com/directus/directus/pull/7045) Remove illegal words from translations root ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7018](https://github.com/directus/directus/pull/7018) Add selectMode to Calendar layout ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7012](https://github.com/directus/directus/pull/7012) Fix M2O type in O2M creation when referencing UUID-PK collections ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#7005](https://github.com/directus/directus/pull/7005) Fix advanced filter sidebar detail ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#6924](https://github.com/directus/directus/pull/6924) Add modular extension badge to app docs ([@Nitwel](https://github.com/Nitwel)) - - [#6775](https://github.com/directus/directus/pull/6775) Calendar range render ([@bernatvadell](https://github.com/bernatvadell)) + - [#7057](https://github.com/directus/directus/pull/7057) Fix last action button not surfacing on mobile + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7049](https://github.com/directus/directus/pull/7049) Fix value unstaging in nested field groups + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7045](https://github.com/directus/directus/pull/7045) Remove illegal words from translations root + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7018](https://github.com/directus/directus/pull/7018) Add selectMode to Calendar layout + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7012](https://github.com/directus/directus/pull/7012) Fix M2O type in O2M creation when referencing UUID-PK + collections ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#7005](https://github.com/directus/directus/pull/7005) Fix advanced filter sidebar detail + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6924](https://github.com/directus/directus/pull/6924) Add modular extension badge to app docs + ([@Nitwel](https://github.com/Nitwel)) + - [#6775](https://github.com/directus/directus/pull/6775) Calendar range render + ([@bernatvadell](https://github.com/bernatvadell)) ### :package: Dependency Updates -- [#7056](https://github.com/directus/directus/pull/7056) update fullcalendar monorepo to v5.9.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#7028](https://github.com/directus/directus/pull/7028) update dependency rollup to v2.55.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#7023](https://github.com/directus/directus/pull/7023) update dependency pg to v8.7.1 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#7022](https://github.com/directus/directus/pull/7022) update dependency @types/dockerode to v3.2.7 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#7017](https://github.com/directus/directus/pull/7017) update dependency @types/sharp to v0.28.5 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#7007](https://github.com/directus/directus/pull/7007) update dependency pg to v8.7.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6998](https://github.com/directus/directus/pull/6998) update dependency @vitejs/plugin-vue to v1.3.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6997](https://github.com/directus/directus/pull/6997) update dependency vite to v2.4.4 ([@renovate[bot]](https://github.com/apps/renovate)) +- [#7056](https://github.com/directus/directus/pull/7056) update fullcalendar monorepo to v5.9.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#7028](https://github.com/directus/directus/pull/7028) update dependency rollup to v2.55.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#7023](https://github.com/directus/directus/pull/7023) update dependency pg to v8.7.1 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#7022](https://github.com/directus/directus/pull/7022) update dependency @types/dockerode to v3.2.7 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#7017](https://github.com/directus/directus/pull/7017) update dependency @types/sharp to v0.28.5 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#7007](https://github.com/directus/directus/pull/7007) update dependency pg to v8.7.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6998](https://github.com/directus/directus/pull/6998) update dependency @vitejs/plugin-vue to v1.3.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6997](https://github.com/directus/directus/pull/6997) update dependency vite to v2.4.4 + ([@renovate[bot]](https://github.com/apps/renovate)) ## v9.0.0-rc.86 (July 26, 2021) ### :sparkles: New Features - **API** - - [#6890](https://github.com/directus/directus/pull/6890) Allow using a custom name for the refresh token cookie ([@j3n57h0m45](https://github.com/j3n57h0m45)) - - [#6593](https://github.com/directus/directus/pull/6593) Allow custom transformations of assets ([@tim-smart](https://github.com/tim-smart)) + - [#6890](https://github.com/directus/directus/pull/6890) Allow using a custom name for the refresh token cookie + ([@j3n57h0m45](https://github.com/j3n57h0m45)) + - [#6593](https://github.com/directus/directus/pull/6593) Allow custom transformations of assets + ([@tim-smart](https://github.com/tim-smart)) - **App** - - [#6864](https://github.com/directus/directus/pull/6864) Add support for Conditional Fields ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#3209](https://github.com/directus/directus/pull/3209) Add default-folder option ([@dimitrov-adrian](https://github.com/dimitrov-adrian)) + - [#6864](https://github.com/directus/directus/pull/6864) Add support for Conditional Fields + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#3209](https://github.com/directus/directus/pull/3209) Add default-folder option + ([@dimitrov-adrian](https://github.com/dimitrov-adrian)) ### :rocket: Improvements - **API** - - [#6984](https://github.com/directus/directus/pull/6984) Fix pino deprecation warning ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#6977](https://github.com/directus/directus/pull/6977) Improve error reporting on CLI bootstrap command ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#6860](https://github.com/directus/directus/pull/6860) Use `/` as default value for public_url ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#6845](https://github.com/directus/directus/pull/6845) Make extension loading more robust ([@nickrum](https://github.com/nickrum)) - - [#6843](https://github.com/directus/directus/pull/6843) Improve default value extraction in MS SQL ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#6840](https://github.com/directus/directus/pull/6840) Show warning when PUBLIC_URL isn't correctly configured ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6984](https://github.com/directus/directus/pull/6984) Fix pino deprecation warning + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6977](https://github.com/directus/directus/pull/6977) Improve error reporting on CLI bootstrap command + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6860](https://github.com/directus/directus/pull/6860) Use `/` as default value for public_url + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6845](https://github.com/directus/directus/pull/6845) Make extension loading more robust + ([@nickrum](https://github.com/nickrum)) + - [#6843](https://github.com/directus/directus/pull/6843) Improve default value extraction in MS SQL + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6840](https://github.com/directus/directus/pull/6840) Show warning when PUBLIC_URL isn't correctly configured + ([@rijkvanzanten](https://github.com/rijkvanzanten)) - **Extensions** - - [#6845](https://github.com/directus/directus/pull/6845) Make extension loading more robust ([@nickrum](https://github.com/nickrum)) + - [#6845](https://github.com/directus/directus/pull/6845) Make extension loading more robust + ([@nickrum](https://github.com/nickrum)) - **App** - - [#6838](https://github.com/directus/directus/pull/6838) Auto-open groups on search in tree-select ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6838](https://github.com/directus/directus/pull/6838) Auto-open groups on search in tree-select + ([@rijkvanzanten](https://github.com/rijkvanzanten)) ### :bug: Bug Fixes - **API** - - [#6968](https://github.com/directus/directus/pull/6968) Fix quotes with schema default values ([@aidenfoxx](https://github.com/aidenfoxx)) - - [#6862](https://github.com/directus/directus/pull/6862) Fix extension loading on Windows ([@nickrum](https://github.com/nickrum)) - - [#6847](https://github.com/directus/directus/pull/6847) Make sure every DB returns time as HH:mm:ss ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#6841](https://github.com/directus/directus/pull/6841) Fixed issue that would cause the wrong field to be extracted when using "detailed" updates in o2m with non-"id" primary keys ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6968](https://github.com/directus/directus/pull/6968) Fix quotes with schema default values + ([@aidenfoxx](https://github.com/aidenfoxx)) + - [#6862](https://github.com/directus/directus/pull/6862) Fix extension loading on Windows + ([@nickrum](https://github.com/nickrum)) + - [#6847](https://github.com/directus/directus/pull/6847) Make sure every DB returns time as HH:mm:ss + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6841](https://github.com/directus/directus/pull/6841) Fixed issue that would cause the wrong field to be extracted + when using "detailed" updates in o2m with non-"id" primary keys ([@rijkvanzanten](https://github.com/rijkvanzanten)) - **App** - - [#6943](https://github.com/directus/directus/pull/6943) Fix form field sort order ([@rijkvanzanten](https://github.com/rijkvanzanten)) - - [#6856](https://github.com/directus/directus/pull/6856) Fix logs logo alignment ([@SeanDylanGoff](https://github.com/SeanDylanGoff)) + - [#6943](https://github.com/directus/directus/pull/6943) Fix form field sort order + ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6856](https://github.com/directus/directus/pull/6856) Fix logs logo alignment + ([@SeanDylanGoff](https://github.com/SeanDylanGoff)) - **sdk** - - [#6925](https://github.com/directus/directus/pull/6925) Fix SDK invite accept ([@MajesteitBart](https://github.com/MajesteitBart)) + - [#6925](https://github.com/directus/directus/pull/6925) Fix SDK invite accept + ([@MajesteitBart](https://github.com/MajesteitBart)) - **Misc.** - - [#6878](https://github.com/directus/directus/pull/6878) Fix update/delete relation docs ([@rijkvanzanten](https://github.com/rijkvanzanten)) + - [#6878](https://github.com/directus/directus/pull/6878) Fix update/delete relation docs + ([@rijkvanzanten](https://github.com/rijkvanzanten)) - **Extensions** - - [#6862](https://github.com/directus/directus/pull/6862) Fix extension loading on Windows ([@nickrum](https://github.com/nickrum)) + - [#6862](https://github.com/directus/directus/pull/6862) Fix extension loading on Windows + ([@nickrum](https://github.com/nickrum)) ### :memo: Documentation -- [#6962](https://github.com/directus/directus/pull/6962) Add PUBLIC_URL example in docker-compose guide ([@paescuj](https://github.com/paescuj)) -- [#6920](https://github.com/directus/directus/pull/6920) Use `--workspace` instead of `cd` in "Running locally" guide ([@paescuj](https://github.com/paescuj)) -- [#6878](https://github.com/directus/directus/pull/6878) Fix update/delete relation docs ([@rijkvanzanten](https://github.com/rijkvanzanten)) -- [#6846](https://github.com/directus/directus/pull/6846) Correctly document the default value of PUBLIC_URL ([@nickrum](https://github.com/nickrum)) -- [#6830](https://github.com/directus/directus/pull/6830) Fix session memcache variable name ([@Moeriki](https://github.com/Moeriki)) +- [#6962](https://github.com/directus/directus/pull/6962) Add PUBLIC_URL example in docker-compose guide + ([@paescuj](https://github.com/paescuj)) +- [#6920](https://github.com/directus/directus/pull/6920) Use `--workspace` instead of `cd` in "Running locally" guide + ([@paescuj](https://github.com/paescuj)) +- [#6878](https://github.com/directus/directus/pull/6878) Fix update/delete relation docs + ([@rijkvanzanten](https://github.com/rijkvanzanten)) +- [#6846](https://github.com/directus/directus/pull/6846) Correctly document the default value of PUBLIC_URL + ([@nickrum](https://github.com/nickrum)) +- [#6830](https://github.com/directus/directus/pull/6830) Fix session memcache variable name + ([@Moeriki](https://github.com/Moeriki)) ### :package: Dependency Updates -- [#6985](https://github.com/directus/directus/pull/6985) pin dependency lodash to 4.17.21 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6983](https://github.com/directus/directus/pull/6983) pin dependency joi to 17.4.1 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6980](https://github.com/directus/directus/pull/6980) update dependency @rollup/plugin-yaml to v3.1.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6979](https://github.com/directus/directus/pull/6979) update typescript-eslint monorepo to v4.28.5 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6976](https://github.com/directus/directus/pull/6976) update dependency knex-schema-inspector to v1.5.12 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6975](https://github.com/directus/directus/pull/6975) Update knex-schema-inspector@1.5.12 ([@rijkvanzanten](https://github.com/rijkvanzanten)) -- [#6973](https://github.com/directus/directus/pull/6973) update dependency @rollup/plugin-commonjs to v19.0.2 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6958](https://github.com/directus/directus/pull/6958) update dependency knex to v0.95.8 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6954](https://github.com/directus/directus/pull/6954) update dependency rollup to v2.54.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6951](https://github.com/directus/directus/pull/6951) update dependency @rollup/plugin-node-resolve to v13.0.4 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6949](https://github.com/directus/directus/pull/6949) update dependency lint-staged to v11.1.1 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6944](https://github.com/directus/directus/pull/6944) update dependency sass to v1.36.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6934](https://github.com/directus/directus/pull/6934) update dependency date-fns to v2 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6933](https://github.com/directus/directus/pull/6933) update dependency tedious to v11.4.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6928](https://github.com/directus/directus/pull/6928) update dependency lint-staged to v11.1.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6914](https://github.com/directus/directus/pull/6914) pin dependency @types/object-hash to 2.1.1 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6913](https://github.com/directus/directus/pull/6913) update dependency ts-jest to v27.0.4 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6911](https://github.com/directus/directus/pull/6911) update dependency codemirror to v5.62.2 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6903](https://github.com/directus/directus/pull/6903) update dependency rollup to v2.53.3 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6901](https://github.com/directus/directus/pull/6901) update dependency supertest to v6.1.4 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6896](https://github.com/directus/directus/pull/6896) update dependency codemirror to v5.62.1 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6894](https://github.com/directus/directus/pull/6894) update dependency gatsby-source-filesystem to v3.10.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6891](https://github.com/directus/directus/pull/6891) update dependency vite to v2.4.3 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6882](https://github.com/directus/directus/pull/6882) update typescript-eslint monorepo to v4.28.4 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6874](https://github.com/directus/directus/pull/6874) update dependency @types/dockerode to v3.2.6 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6873](https://github.com/directus/directus/pull/6873) update dependency stylelint-scss to v3.20.1 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6869](https://github.com/directus/directus/pull/6869) update dependency eslint-plugin-vue to v7.14.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6868](https://github.com/directus/directus/pull/6868) update dependency eslint to v7.31.0 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6863](https://github.com/directus/directus/pull/6863) update vue monorepo to v3.1.5 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6855](https://github.com/directus/directus/pull/6855) update dependency @types/dockerode to v3.2.5 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6849](https://github.com/directus/directus/pull/6849) update dependency @rollup/plugin-node-resolve to v13.0.2 ([@renovate[bot]](https://github.com/apps/renovate)) -- [#6839](https://github.com/directus/directus/pull/6839) update dependency slugify to v1.6.0 ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6985](https://github.com/directus/directus/pull/6985) pin dependency lodash to 4.17.21 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6983](https://github.com/directus/directus/pull/6983) pin dependency joi to 17.4.1 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6980](https://github.com/directus/directus/pull/6980) update dependency @rollup/plugin-yaml to v3.1.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6979](https://github.com/directus/directus/pull/6979) update typescript-eslint monorepo to v4.28.5 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6976](https://github.com/directus/directus/pull/6976) update dependency knex-schema-inspector to v1.5.12 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6975](https://github.com/directus/directus/pull/6975) Update knex-schema-inspector@1.5.12 + ([@rijkvanzanten](https://github.com/rijkvanzanten)) +- [#6973](https://github.com/directus/directus/pull/6973) update dependency @rollup/plugin-commonjs to v19.0.2 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6958](https://github.com/directus/directus/pull/6958) update dependency knex to v0.95.8 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6954](https://github.com/directus/directus/pull/6954) update dependency rollup to v2.54.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6951](https://github.com/directus/directus/pull/6951) update dependency @rollup/plugin-node-resolve to v13.0.4 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6949](https://github.com/directus/directus/pull/6949) update dependency lint-staged to v11.1.1 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6944](https://github.com/directus/directus/pull/6944) update dependency sass to v1.36.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6934](https://github.com/directus/directus/pull/6934) update dependency date-fns to v2 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6933](https://github.com/directus/directus/pull/6933) update dependency tedious to v11.4.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6928](https://github.com/directus/directus/pull/6928) update dependency lint-staged to v11.1.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6914](https://github.com/directus/directus/pull/6914) pin dependency @types/object-hash to 2.1.1 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6913](https://github.com/directus/directus/pull/6913) update dependency ts-jest to v27.0.4 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6911](https://github.com/directus/directus/pull/6911) update dependency codemirror to v5.62.2 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6903](https://github.com/directus/directus/pull/6903) update dependency rollup to v2.53.3 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6901](https://github.com/directus/directus/pull/6901) update dependency supertest to v6.1.4 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6896](https://github.com/directus/directus/pull/6896) update dependency codemirror to v5.62.1 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6894](https://github.com/directus/directus/pull/6894) update dependency gatsby-source-filesystem to v3.10.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6891](https://github.com/directus/directus/pull/6891) update dependency vite to v2.4.3 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6882](https://github.com/directus/directus/pull/6882) update typescript-eslint monorepo to v4.28.4 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6874](https://github.com/directus/directus/pull/6874) update dependency @types/dockerode to v3.2.6 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6873](https://github.com/directus/directus/pull/6873) update dependency stylelint-scss to v3.20.1 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6869](https://github.com/directus/directus/pull/6869) update dependency eslint-plugin-vue to v7.14.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6868](https://github.com/directus/directus/pull/6868) update dependency eslint to v7.31.0 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6863](https://github.com/directus/directus/pull/6863) update vue monorepo to v3.1.5 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6855](https://github.com/directus/directus/pull/6855) update dependency @types/dockerode to v3.2.5 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6849](https://github.com/directus/directus/pull/6849) update dependency @rollup/plugin-node-resolve to v13.0.2 + ([@renovate[bot]](https://github.com/apps/renovate)) +- [#6839](https://github.com/directus/directus/pull/6839) update dependency slugify to v1.6.0 + ([@renovate[bot]](https://github.com/apps/renovate)) Directus refs/tags/v9.0.0-rc.86 diff --git a/docs/guides/fields.md b/docs/guides/fields.md index 55462f8ac6..1b9d586305 100644 --- a/docs/guides/fields.md +++ b/docs/guides/fields.md @@ -157,8 +157,8 @@ This pane includes any customization options that may be defined by the Display. ### Conditions -Conditions allow you to alter the current field's setup based on the values of other fields in the form. This -allows you to show/hide the field, make it readonly, or change the interface options. +Conditions allow you to alter the current field's setup based on the values of other fields in the form. This allows you +to show/hide the field, make it readonly, or change the interface options. Each field can have one or more _rules_. Each rule has the following configuration options: