Socket
Socket
Sign inDemoInstall

forest-express

Package Overview
Dependencies
Maintainers
5
Versions
374
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

forest-express - npm Package Compare versions

Comparing version 10.0.0 to 10.0.1

2

dist/serializers/resource.js

@@ -29,3 +29,3 @@ "use strict";

var needsDateOnlyFormating = Implementation.getLianaName() === 'forest-express-sequelize' && semver.lt(Implementation.getOrmVersion(), '4.0.0');
var reservedWords = ['meta'];
var reservedWords = ['meta', 'attributes'];
var fieldInfoDateonly = [];

@@ -32,0 +32,0 @@ var fieldInfoPoint = [];

{
"name": "forest-express",
"description": "Official package for all Forest Express Lianas",
"version": "10.0.0",
"version": "10.0.1",
"author": "Sandro Munda <sandro@munda.me>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -57,2 +57,25 @@ module.exports = {

}, {
field: 'attributes',
type: {
fields: [{
field: 'option',
type: 'String',
}, {
field: 'color',
type: 'String',
}],
},
defaultValue: null,
enums: null,
integration: null,
isFilterable: true,
isPrimaryKey: false,
isReadOnly: false,
isRequired: false,
isSortable: true,
isVirtual: false,
reference: null,
inverseOf: null,
validations: [],
}, {
field: 'name',

@@ -59,0 +82,0 @@ type: 'String',

@@ -64,2 +64,36 @@ const ResourceSerializer = require('../../src/serializers/resource');

it('should serialize the fields with a nested model named "attributes"', async () => {
const records = [
{
_id: '5fbfb0ee67e7953f9b8414bf',
name: 'Zoey',
attributes: {
color: 'red',
option: 'air conditioning',
},
}, {
_id: '5f928f4f1eedcfbce937bbd0',
name: 'Ibiza',
}];
const serialized = await getSerializer(records).perform();
expect(serialized).toStrictEqual({
data: [{
attributes: {
_id: '5fbfb0ee67e7953f9b8414bf',
attributes: { color: 'red', option: 'air conditioning' },
name: 'Zoey',
},
type: 'cars',
}, {
attributes: {
_id: '5f928f4f1eedcfbce937bbd0',
name: 'Ibiza',
},
type: 'cars',
}],
});
});
it('should not add attribute when their are undefined', async () => {

@@ -66,0 +100,0 @@ const records = [

Sorry, the diff of this file is too big to display

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