* add docs to eslint
* update prettier ignore
* fix vitepress linting
* eslint ignore fixes
* prettier run
* update prettier ignore
* fix formatting
* enable linting of markdown files
* revert format command change
* fix irregular whitespace
* update dictionary
* (Changelog) Create four-boxes-shake.md
* Rework ESLint / Prettier setup
- Disable js/ts/vue files for Prettier to ensure linting/formatting is
only happening via ESLint
- Rework formatting of code blocks in md files
- Disable formatting of code blocks in md files under '/docs' by Prettier
- Instead use "eslint-plugin-markdown" to format & __lint__ js*/ts*/vue such code blocks
- Replace unmaintained "eslint-plugin-md" plugin by official "eslint-plugin-markdown" plugin
- I'll check whether we can use this to format other code blocks
(json, html, ...) as well
- Restructure, clean-up and apply some fixes to the ESLint config
(Note: Not ready for flat config yet since not supported by
vscode-eslint)
- Enable cache for ESLint / Prettier in scripts
- Clean-up ignore file
- Explicit folder declaration (.../)
- Don't ignore all 'extensions' folders in ESLint (only
'/api/extensions/')
- Enable formatting in '/.github' folder
* Fix all formatting issues with Prettier
* Update md files under /docs/.typedocs
* Fix lint issues in vue/js files
* ESLint / Prettier config revision v2
Enable Prettier for md code blocks, but only as warnings since it can
get into the way with Vitepress md extensions like '[!code ...]'
comments
* Remove prettier-ignore comments
* Make spellchecker happy
* Remove changeset
* Revert lint setup for code blocks
There are many cases in the docs where linting / formatting of code
blocks doesn't make
sense:
- Code block is only an excerpt - linter fails
- Code block contains special comments (e.g. markdown extensions) which
needs to remain at the same place - formatting would break it
- ...
* Apply lint issues / formatting from temp lint setup
* Run formatter
* Fix merge failure
* Simplify & modernize ESLint / Prettier setup
No longer run Prettier via ESLint. Nowadays, this is the recommended
setup. There's no real need to run it this way, it's just an additional
layer.
Add VS Code settings to make the work with the new setup easier.
* Remove unused eslint disable directives
* Make editorconfig more useful
* Fix formatting issues reported by editorconfig
* Format files with Prettier
* Enable formatting of source translations file
* Format source translations file
* Remove unnecessary console error
* Remove unnecessary line
* Only ignore md files under .changeset
* Add CI reporter for Prettier
* Fail job on wrongly formatted files
* Fix format
* Test Prettier action on changed/added file
* Use simple CI format check for now & no cache
* Revert "Test Prettier action on changed/added file"
This reverts commit 4f7d8826ad.
* Introduce code blocks check for docs
* Fix code block issues
* Ignore auto-generated packages dir
* Fix comment position
* Also lint `/app/.storybook`
* Reformat modified files
---------
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* Add synchronization to schedule flows and hooks
Fixes#15052
* Add changeset
* Add test
* Add to sequential list
* Fix spelling in changeset
---------
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: ian <licitdev@gmail.com>
* Remove publishConfig from all packages
* Remove invalid version field
* Move @directus/composables to devDependencies in app
* Resort all package.json files
* Align meta fields
---------
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Redact additional keys in logs of Flows
* Create moody-poems-pump.md
* Move REDACTED_TEXT to constants package & update tests
* Revert "Move REDACTED_TEXT to constants package & update tests"
This reverts commit 0f5b227253.
* Update redacted value in blackbox test
* Use own redact implementation
* Move REDACTED_TEXT to constants package
* Replace outdated comment
* Fix misleading return type
Since values might change (redacted), output isn't necessarily the same type anymore
* Prevent auto conversion of png to jpg images
* Create red-swans-march.md
* Update transformation tests
* Update blackbox test
* Fix image allocation
* Fix test again :-)
* Convert formats with transparency support to png (if no accept header)
* Update tests & add final fallback
* Update changeset
* Update blackbox test
---------
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Change license to BSL1.1
* Mark major version
* Fix formatting
* Remove duplicate heading
* Update formatting
* Copy paste error
* Update license
* Update license
* Format covenants
* Update readme.md
* Update licenses for packages
* Update readme.md
* Update contributors.yml
OG... but to be clear, rijkvanzanten is the one who really built all of this ❤️
* Tweak license in openapi
* Update packages/specs/src/openapi.yaml
* Add MIT license headers
* Use v10 in examples
* Update additional examples
* Update generate-extensions-entrypoint.test.ts
* Update tests to use latest v9 and v10 versions
* use lowercase for naming consistency
* change casing for api license
* Update migrations doc
* Update dictionary
* Consistent ordering of license field in app/package.json
* Use major version in specs again (but as string)
So it's valid for all v10 versions
* Consolidate readme's
---------
Co-authored-by: Ben Haynes <ben@directus.io>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
* Migrate filter tests
* Migrate aggregation tests
* Remove migrated tests
* Migrate offset tests
* Migrate depth tests
* Run testing for all vendors
* Fix count returned as bigint for pg and crdb
* Calculate snapshot value counts instead of hardcoding
* Delete remnants
* Revert testing for all vendors
* Speed query up by reusing existing aliases which reduces table joins
* Use subquery in top level m2o to remove duplicates
* Fix linting
* Apply distinct on primary key field in subqueries
* Use distinct instead as there are only primary keys
* Apply subquery on top level
* Try remove sub sub query
* Test if working for all vendors
* Add support for _none and _some
* Use subquery only when field depth > 1
* Add tests
* Use original table names for columns with functions (#14690)
* Use original table names for columns with functions
* Extract filter function path parsing as shared util
* Fix filter function path when adding node
* Pass the originalCollectionName into filter functions
* Update unit test
* Replace functions within deep GraphQL
* Fix invalid operator error for _none and _some
* Add filter function tests
* Revert triggering for all vendors
* Simplify aliasMap
* Replace functions in filter within GraphQL aggregate query
* Add API support for filtering of alias field
* Mark schema as optional
* Shift logical operators upwards
* Separate recursive parseFilter
* Rework shifting of logical operators
* Error on invalid usage of _none and _some
* Use inner join to preserve sort order
* Run tests for all vendors
* Reuse aliasMap for sort and filter
* Sort on top level query
* Remove unnecessary limit on wrapper query
* Refactor applyQuery options
* Remove duplicates from nested multi relational sort
* Fix offset in MSSQL requiring OrderBy
* Disable schema cache
* Use inner query only for nested sort or multi relational filter
* Fix MSSQL duplicate order column
* Use inner query only for multi relational
* Additional integration tests
* Order within partition for multi relational sorts
* Rename to directus_row_number
* Fix unit test
* Add base sort and filter tests
* Fix Oracle uppercased rowNumber column
* Fix unit test
* Fix top level query sort with function
* Parse functions in inner query
* Increase clarity with knex.ref()
* Remove sort filter for top level primary key
* Fix unit test
* Bypass queries with groupBy
* Add collection to aliasMap to fix functions in nested sort
* Fix multi relational sort with functions
* Add tests for filter and sort with functions
* Fix accidental deletion of brackets
* Fix top level alias filter node interface
* Update M2M sort tests
* Add M2A tests
* Cast m2a primary key as varchar2 for oracle
* Enable filtering tests for M2A
* Fix prototype polluting assignment in aliasMap
* Remove unnecessary currentKey
* Simplify code to increase readability
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* Fix linting and missing 'this' error
* Revert optional chaining
* Add mysql5 to tests
* Fix mysql5 missing rowNumber()
* Overcome indexing delays in MySQL5
* Verify MySQL5 sorting is in order as the result count varies between runs
* Skip joining when sorting field already exists
* Simplify variable assignment
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
* Fix linting
* Reduce duplicate logic with vars
* Transform _func fields in GraphQL only for valid functions
* Fix unit test
* Fix unsupported date_part() in CrDB
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Roger Stringer <roger@directus.io>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* Use pnpm instead of npm
* Setup workspace
* Replace scripts / lerna root stuff
* Add todo file
* Update lock, start updating packages
* Update todo
* [WIP] Keep going on module resolution in pnpm
* Fix final missing deps/types for complete build
* [WIP] Replace npm commands with pnpm alternatives
* Update jest config for v28
* Fix missing package under schema
* Update workflow
* Run CI on fork
* Use local reference
* Remove version from local workflow
* Add build to prepare
* Add Node's max old space size flag to linter
* Idemdito for codeql
* Hyphens? Underscores?
* Bang
* Only build one thing at a time
* Underscores after all?
* Match 7gb of GH
* Set env on prepare
* Jest is driving me nuts
* Downgrade jest
* Add root jest
* We'll get there, eventually.
* 🥳
* Het houdt niet op, niet vanzelf
* attempt to fix e2e
* fix unit test & shared import
* add `debug: true` to CodeQL action
* Fix dev call in shared
* Add missing cross-env
* Add missing geo-json dependency for app
* add flag to prepare action to skip build
* remove debug flag from codeql action
* fix invalid env syntax
* add tslib to app dependencies for tests
* another attempt
* Added missing rimraf dependency for the api prebuild/cleanup scripts
* Added missing ts-node dependency for the api cli script
* update E2E tests readme to use pnpm
* Undo move of extensions sdk
* Fixes nested groups in accordions not rendering fields (#14369)
* initial fix for nested groups in accordions
* removed debug code
* Fix strict relative dates showing "incorrect" (#14390)
* Set rounding method of relative formatted date to floor when strict option is selected
* Add round fn as an option
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Don't use locales in generated camelCased values from env (#14401)
Ref https://github.com/directus/directus/discussions/14122
* Fix list panel descending sort (#14396)
* fix list panel descending sort
* Handle missing or explicit desc value
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Fix query primary field for system tables (#14402)
* New Crowdin updates (#14403)
* Update source file en-US.yaml
* New translations en-US.yaml (Spanish, Chile)
* New translations en-US.yaml (Spanish, Latin America)
* New translations en-US.yaml (Greek)
* New translations en-US.yaml (Italian)
* New translations en-US.yaml (French, Canada)
* Fix/wysiwyg context menu (#14404)
* New translations en-US.yaml (Polish) (#14407)
* Encoded the url using encodeURIComponent, so that the url gets sanitzed and so, we did not get 404 error. (#14418)
* Encoded the url using encodeURIComponent, so that the url gets sanitized and we did not get 404 error.
* Added required changes as stated by the reviewer
* Used encodeURI instead of encodeURIComponent to encode the params only
* Solved linting error
* Solved linting errors
* checked with npm run lint, no linting errors found
* fix generateJoi error due to empty permissions when creating new role (#14416)
* fix empty permissions when creating new role
* basic test
* move logic up
* additional test
* Update api/tests/utils/filter-items.test.ts
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: ian <licitdev@gmail.com>
* Recreate lockfile
* Fix build of extensions-sdk
* Add missing dependency
* Add some more missing deps
* Update blackbox to use pnpm
* Update workflow to use main
* Update pack to work with pnpm
* Simplify commands
* Remove todo file (completed)
* ADd missing types dep
* Use local test version
* Remove version from local reference
* Call super with context
* Add missing dep
* Simplify workflows
Ref https://github.com/directus/organization/issues/135
* Simplify some more
* Linter is on root
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: brainslug <tim@brainslug.nl>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Gerard Lamusse <gerardlamo@gmail.com>
Co-authored-by: José Varela <joselcvarela@gmail.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Zeel Pathak <60271095+zeel-pathak@users.noreply.github.com>
* Add black box tests
* Revert docker compose file
* Update workflow
* Try use workflow from dev repo
* Increase seedDB() timeout
* Disable other checks for now
* Change DB sequence
* Update jest moduleNameMapper
* Update workflow's docker-compose.yml path
* Slice array first
* Remove differentiation of status code
* Delete field only after foreign key constraints are removed
* Add checks for different types of primary key
* Test global query filter for all field types
* Increase timeout for m2o seeding
* Add case insensitive string operators
* Update filter check to run on relational fields
* Enable time field checks
* Add seeded random and fix relational seeding
* Add casting for integer and bigInteger
* Minor fixes
* Reduce bigInt values
* Separate seeding of DB structure from values
* Add primaryKey seeding function
* Use automatic IDs except for string pk
* Try fix ci
* Update package-lock.json
* Update common.test for concealed user tokens
* Use dynamic field type for m2o.test relational fields
* Temporary disable missing nicontains for string type
* Add support for alias type filtering
* Fix relational filter operator checks
* Add initial o2m test
* Remove integer pk limit
* Add empty checks for string and uuid null
* Limit generated integer value to 4 bytes
* Patch timezone tests for MSSQL
* Remove sample query filter test
* Fix timezone test for sqlite
* Fix MSSQL uuids
* Fix MSSQL timestamp inaccuracy
* Cast datetime schema to milliseconds for comparison
* Fix MySQL / Maria timestamp inaccuracy
* Fix MySQL / Maria between operator inconsistency for float type
* Fix missing time datatype in Oracle
* Skip filter testing on Oracle
* Enable o2m filter tests for other collections
* Run tests only on SQLite for PRs unless the Full Tests label exists
* Try fix actions
* Refactor github actions
* Update tests flow setup to use getURL()
* Start postgres docker
* Reinstate package-lock
* Fix geometry test
* Remove .gitkeep files
* Add todo.md
* Rename black box to blackbox
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Add depth limit to filtering
* Add depth limit to GraphQL
* Add docs
* Rename environment variable
* Add simple deep filter depth calculation
* Update error message
* Shift fields depth check to base function
* Remove unused var
* Implement GraphQL filter depth
* Add check for _and & _or filters in GraphQL
* Add check for _and & _or filters in REST
* Remove commented code
* Add check for REST filter query
* Add REST tests
* Setup m2m using directus fields
* Add GraphQL tests
* Fix linter error
* Cleanup calculateDepth + add docs/tests
* Remove validator in GraphQL
* Add depth checking for nested sort
* Enable source map to display correct error lines
* Set max relational depth to be at least 2
* Update tests
* Add unit test for deep _sort
* Add minimum value in docs
* Refactor depth validation to be in validateQuery
* Add boolean parameter for calculation of _sort in deep query
* Use array of keys to parse dot notation
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* Fix range to be based on current time
* Parse using localtime for fields without timezone data on SQLite
* Add tests
* Parse test response to int
* Refactor to options object
* Read timestamps as UTC for Oracle
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>