mirror of
https://github.com/directus/directus.git
synced 2026-01-23 06:58:05 -05:00
Bump prettier from 2.2.1 to 2.3.0 (#5593)
* Bump prettier from 2.2.1 to 2.3.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.2.1...2.3.0) Signed-off-by: dependabot[bot] <support@github.com> * Fix lint issues for updated prettier * Lets remove dev: true again so we can auto-add it later why don't we Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export function toArray<T = any>(val: T | T[]): T[] {
|
||||
if (typeof val === 'string') {
|
||||
return (val.split(',') as unknown) as T[];
|
||||
return val.split(',') as unknown as T[];
|
||||
}
|
||||
|
||||
return Array.isArray(val) ? val : [val];
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
"nanoid": "^3.1.22",
|
||||
"pinia": "^0.0.7",
|
||||
"portal-vue": "^2.1.7",
|
||||
"prettier": "^2.2.1",
|
||||
"prettier": "^2.3.0",
|
||||
"pretty-ms": "^7.0.1",
|
||||
"qrcode": "^1.4.4",
|
||||
"raw-loader": "^4.0.2",
|
||||
|
||||
@@ -118,7 +118,13 @@ export default defineComponent({
|
||||
const id = computed(() => nanoid());
|
||||
const popper = ref<HTMLElement | null>(null);
|
||||
|
||||
const { start, stop, styles, arrowStyles, placement: popperPlacement } = usePopper(
|
||||
const {
|
||||
start,
|
||||
stop,
|
||||
styles,
|
||||
arrowStyles,
|
||||
placement: popperPlacement,
|
||||
} = usePopper(
|
||||
reference,
|
||||
popper,
|
||||
computed(() => ({
|
||||
|
||||
@@ -22,12 +22,12 @@ export default defineDisplay(() => ({
|
||||
groups: ['m2m', 'm2o', 'o2m'],
|
||||
fields: (options: Options | null, { field, collection }) => {
|
||||
const relatedCollection = getRelatedCollection(collection, field);
|
||||
const { primaryKeyField } = useCollection(ref((relatedCollection as unknown) as string));
|
||||
const { primaryKeyField } = useCollection(ref(relatedCollection as unknown as string));
|
||||
|
||||
if (!relatedCollection) return [];
|
||||
|
||||
const fields = options?.template
|
||||
? adjustFieldsForDisplays(getFieldsFromTemplate(options.template), (relatedCollection as unknown) as string)
|
||||
? adjustFieldsForDisplays(getFieldsFromTemplate(options.template), relatedCollection as unknown as string)
|
||||
: [];
|
||||
|
||||
if (primaryKeyField.value && !fields.includes(primaryKeyField.value.field)) {
|
||||
|
||||
@@ -67,7 +67,7 @@ export default defineComponent({
|
||||
|
||||
const primaryKeyField = computed(() => {
|
||||
if (relatedCollection.value !== null) {
|
||||
return useCollection((relatedCollection as unknown) as Ref<string>).primaryKeyField.value;
|
||||
return useCollection(relatedCollection as unknown as Ref<string>).primaryKeyField.value;
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
@@ -177,15 +177,8 @@ export default defineComponent({
|
||||
const { fetchValues, previewValues, loading: previewLoading, junctionRowMap, relatedItemValues } = useValues();
|
||||
const { collections, templates, primaryKeys } = useCollections();
|
||||
const { selectingFrom, stageSelection, deselect } = useSelection();
|
||||
const {
|
||||
currentlyEditing,
|
||||
relatedPrimaryKey,
|
||||
editsAtStart,
|
||||
stageEdits,
|
||||
cancelEdit,
|
||||
editExisting,
|
||||
createNew,
|
||||
} = useEdits();
|
||||
const { currentlyEditing, relatedPrimaryKey, editsAtStart, stageEdits, cancelEdit, editExisting, createNew } =
|
||||
useEdits();
|
||||
const { onSort } = useManualSort();
|
||||
|
||||
watch(props, fetchValues, { immediate: true, deep: true });
|
||||
|
||||
@@ -185,15 +185,8 @@ export default defineComponent({
|
||||
getPrimaryKeys
|
||||
);
|
||||
|
||||
const {
|
||||
currentlyEditing,
|
||||
editItem,
|
||||
editsAtStart,
|
||||
stageEdits,
|
||||
cancelEdit,
|
||||
relatedPrimaryKey,
|
||||
editModalActive,
|
||||
} = useEdit(value, relationInfo, emitter);
|
||||
const { currentlyEditing, editItem, editsAtStart, stageEdits, cancelEdit, relatedPrimaryKey, editModalActive } =
|
||||
useEdit(value, relationInfo, emitter);
|
||||
|
||||
const { stageSelection, selectModalActive, selectionFilters } = useSelection(value, items, relationInfo, emitter);
|
||||
const { sort, sortItems, sortedItems } = useSort(relationInfo, fields, items, emitter);
|
||||
|
||||
@@ -97,9 +97,8 @@ export default function usePreview(
|
||||
() => {
|
||||
const { junctionField, junctionCollection } = relation.value;
|
||||
|
||||
tableHeaders.value = (fields.value.length > 0
|
||||
? fields.value
|
||||
: getDefaultFields().map((field) => `${junctionField}.${field}`)
|
||||
tableHeaders.value = (
|
||||
fields.value.length > 0 ? fields.value : getDefaultFields().map((field) => `${junctionField}.${field}`)
|
||||
)
|
||||
.map((fieldKey) => {
|
||||
const field = fieldsStore.getField(junctionCollection, fieldKey);
|
||||
|
||||
@@ -239,15 +239,8 @@ export default defineComponent({
|
||||
}
|
||||
);
|
||||
|
||||
const {
|
||||
tableSort,
|
||||
tableHeaders,
|
||||
tableRowHeight,
|
||||
onRowClick,
|
||||
onSortChange,
|
||||
activeFields,
|
||||
tableSpacing,
|
||||
} = useTable();
|
||||
const { tableSort, tableHeaders, tableRowHeight, onRowClick, onSortChange, activeFields, tableSpacing } =
|
||||
useTable();
|
||||
|
||||
const showingCount = computed(() => {
|
||||
if ((itemCount.value || 0) < (totalCount.value || 0)) {
|
||||
|
||||
@@ -246,9 +246,13 @@ export default defineComponent({
|
||||
|
||||
const revisionsDrawerDetail = ref<Vue | null>(null);
|
||||
|
||||
const { info: collectionInfo, defaults, primaryKeyField, isSingleton, accountabilityScope } = useCollection(
|
||||
collection
|
||||
);
|
||||
const {
|
||||
info: collectionInfo,
|
||||
defaults,
|
||||
primaryKeyField,
|
||||
isSingleton,
|
||||
accountabilityScope,
|
||||
} = useCollection(collection);
|
||||
|
||||
const {
|
||||
isNew,
|
||||
|
||||
@@ -188,13 +188,8 @@ export default defineComponent({
|
||||
const collectionsStore = useCollectionsStore();
|
||||
const fieldsStore = useFieldsStore();
|
||||
|
||||
const {
|
||||
availableCollections,
|
||||
systemCollections,
|
||||
fields,
|
||||
currentCollectionPrimaryKey,
|
||||
collectionMany,
|
||||
} = useRelation();
|
||||
const { availableCollections, systemCollections, fields, currentCollectionPrimaryKey, collectionMany } =
|
||||
useRelation();
|
||||
const { hasCorresponding, correspondingLabel } = useCorresponding();
|
||||
|
||||
const relatedCollectionExists = computed(() => {
|
||||
|
||||
@@ -224,15 +224,8 @@ export default defineComponent({
|
||||
const editActive = ref(false);
|
||||
|
||||
const { deleteActive, deleting, deleteField } = useDeleteField();
|
||||
const {
|
||||
duplicateActive,
|
||||
duplicateName,
|
||||
collections,
|
||||
duplicateTo,
|
||||
saveDuplicate,
|
||||
duplicating,
|
||||
duplicable,
|
||||
} = useDuplicate();
|
||||
const { duplicateActive, duplicateName, collections, duplicateTo, saveDuplicate, duplicating, duplicable } =
|
||||
useDuplicate();
|
||||
|
||||
const interfaceName = computed(() => {
|
||||
return interfaces.value.find((inter: InterfaceConfig) => inter.id === props.field.meta?.interface)?.name;
|
||||
|
||||
@@ -151,16 +151,8 @@ export default defineComponent({
|
||||
|
||||
const { loading, preset } = usePreset();
|
||||
const { fields } = useForm();
|
||||
const {
|
||||
edits,
|
||||
hasEdits,
|
||||
initialValues,
|
||||
values,
|
||||
layoutQuery,
|
||||
layoutOptions,
|
||||
updateFilters,
|
||||
searchQuery,
|
||||
} = useValues();
|
||||
const { edits, hasEdits, initialValues, values, layoutQuery, layoutOptions, updateFilters, searchQuery } =
|
||||
useValues();
|
||||
const { save, saving } = useSave();
|
||||
const { deleting, deleteAndQuit, confirmDelete } = useDelete();
|
||||
|
||||
|
||||
@@ -109,12 +109,8 @@ export default defineComponent({
|
||||
const relationsStore = useRelationsStore();
|
||||
|
||||
const { _active } = useActiveState();
|
||||
const {
|
||||
junctionFieldInfo,
|
||||
junctionRelatedCollection,
|
||||
junctionRelatedCollectionInfo,
|
||||
setJunctionEdits,
|
||||
} = useJunction();
|
||||
const { junctionFieldInfo, junctionRelatedCollection, junctionRelatedCollectionInfo, setJunctionEdits } =
|
||||
useJunction();
|
||||
const { _edits, loading, item } = useItem();
|
||||
const { save, cancel } = useActions();
|
||||
|
||||
|
||||
18
package-lock.json
generated
18
package-lock.json
generated
@@ -37,7 +37,7 @@
|
||||
"npm-run-all": "^4.1.5",
|
||||
"oracledb": "^5.1.0",
|
||||
"pg": "^8.6.0",
|
||||
"prettier": "^2.2.1",
|
||||
"prettier": "^2.3.0",
|
||||
"simple-git-hooks": "^2.4.1",
|
||||
"sqlite3": "^5.0.2",
|
||||
"stylelint": "^13.12.0",
|
||||
@@ -301,7 +301,7 @@
|
||||
"nanoid": "^3.1.22",
|
||||
"pinia": "^0.0.7",
|
||||
"portal-vue": "^2.1.7",
|
||||
"prettier": "^2.2.1",
|
||||
"prettier": "^2.3.0",
|
||||
"pretty-ms": "^7.0.1",
|
||||
"qrcode": "^1.4.4",
|
||||
"raw-loader": "^4.0.2",
|
||||
@@ -33805,9 +33805,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
|
||||
"integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==",
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.0.tgz",
|
||||
"integrity": "sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==",
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
@@ -51349,7 +51349,7 @@
|
||||
"nanoid": "^3.1.22",
|
||||
"pinia": "^0.0.7",
|
||||
"portal-vue": "^2.1.7",
|
||||
"prettier": "^2.2.1",
|
||||
"prettier": "^2.3.0",
|
||||
"pretty-ms": "^7.0.1",
|
||||
"qrcode": "^1.4.4",
|
||||
"raw-loader": "^4.0.2",
|
||||
@@ -79167,9 +79167,9 @@
|
||||
"integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc="
|
||||
},
|
||||
"prettier": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
|
||||
"integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q=="
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.0.tgz",
|
||||
"integrity": "sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w=="
|
||||
},
|
||||
"prettier-bytes": {
|
||||
"version": "1.0.4",
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
"npm-run-all": "^4.1.5",
|
||||
"oracledb": "^5.1.0",
|
||||
"pg": "^8.6.0",
|
||||
"prettier": "^2.2.1",
|
||||
"prettier": "^2.3.0",
|
||||
"simple-git-hooks": "^2.4.1",
|
||||
"sqlite3": "^5.0.2",
|
||||
"stylelint": "^13.12.0",
|
||||
|
||||
Reference in New Issue
Block a user