Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sanity/data-aspects

Package Overview
Dependencies
Maintainers
6
Versions
700
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/data-aspects - npm Package Compare versions

Comparing version 0.105.1 to 0.105.9

25

lib/DataAspectsResolver.js

@@ -71,27 +71,2 @@ 'use strict';

}, {
key: 'fallbackItemDisplayField',
value: function fallbackItemDisplayField(typeName) {
var type = this.getType(typeName);
if (!type) {
return null;
}
var fieldsForType = type.fields || [];
var field = fieldsForType.find(function (currField) {
return ['name', 'title', 'label'].includes(currField.name);
});
return field ? field.name : null;
}
}, {
key: 'getItemDisplayField',
value: function getItemDisplayField(typeName) {
var typeOption = this.config.typeOptions[typeName];
var displayField = typeOption && typeOption.itemDisplayField ? typeOption.itemDisplayField : this.fallbackItemDisplayField(typeName);
if (!this.getField(this.getType(typeName), displayField)[0]) {
throw new Error('resolved display field for type "' + typeName + '" to "' + displayField + '", but field does not exist in schema. check data-aspects config');
}
return displayField;
}
}, {
key: 'getDisplayName',

@@ -98,0 +73,0 @@ value: function getDisplayName(typeName) {

2

package.json
{
"name": "@sanity/data-aspects",
"version": "0.105.1",
"version": "0.105.9",
"description": "Sanity plugin which controls how your data is presented",

@@ -5,0 +5,0 @@ "main": "lib/DataAspectsResolver.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc