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

@financial-times/biz-ops-schema

Package Overview
Dependencies
Maintainers
15
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/biz-ops-schema - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

9

methods/get-type.js

@@ -126,4 +126,11 @@ const rawData = require('../lib/raw-data');

getType,
(typeName, { primitiveTypes = 'biz-ops', relationshipStructure = false, groupProperties = false } = {}) =>
(
typeName,
{
primitiveTypes = 'biz-ops',
relationshipStructure = false,
groupProperties = false
} = {}
) =>
`types:${typeName}:${relationshipStructure}:${groupProperties}:${primitiveTypes}`
);

2

package.json
{
"name": "@financial-times/biz-ops-schema",
"version": "0.2.6",
"version": "0.2.7",
"description": "Schema for biz-ops data store and api. It provides two things: - yaml files which define which types, properties and relationships are allowed - a nodejs library for extracting subsets of this information",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,5 +9,8 @@ # biz-ops-schema

## Releasing
1. Create an appropriate semver tag:
- for additions to the schema release as a patch
- for additions to the api relase as a minor
- for additions to the schema release as a patch
- for additions to the api relase as a minor
2. Checkout https://github.com/Financial-Times/biz-ops-api and `npm install @financial-times/biz-ops-schema@{the new version}`

@@ -19,3 +22,5 @@ 3. Once this is merged to master, verify the https://dashboard.heroku.com/apps/biz-ops-api-staging app has deployed. If it all seems ok (try querying http://biz-ops-api-staging.herokuapp.com/graphiql for your new schema properties, or reading/writing a few dummy entries to the rest api. But use common sense, if you're just fixing a typo in a label or something, don't be too cautious)

### Future plans
The plan is to have non-breaking releases of this component do two things:
- Push schema files to s3 so they can be shared instantly. The js code in this component will poll s3 for the latest version

@@ -22,0 +27,0 @@ - Restart/kick the biz-ops-api app so that the graphql api reflects schema changes

@@ -101,3 +101,4 @@ const rawData = require('../../lib/raw-data');

'isRecursive',
'hidden'
'hidden',
'autoPopulated'
])

@@ -112,2 +113,3 @@ );

'canFilter',
'autoPopulated',
'pattern'

@@ -114,0 +116,0 @@ ])

@@ -105,2 +105,28 @@ const { getType } = require('../../');

it('it returns read-only properties', async () => {
rawData.getTypes.returns([
{
name: 'Type1',
properties: {
primitiveProp: {
type: 'Word',
autoPopulated: true
},
paragraphProp: {
type: 'Paragraph',
autoPopulated: false
},
enumProp: {
type: 'SomeEnum'
}
}
}
]);
const type = getType('Type1', { primitiveTypes: 'graphql' });
expect(type.properties.primitiveProp.autoPopulated).to.eql(true);
expect(type.properties.paragraphProp.autoPopulated).to.eql(false);
expect(type.properties.enumProp.autoPopulated).to.not.exist;
});
it('it maps types to graphql properties', async () => {

@@ -107,0 +133,0 @@ rawData.getTypes.returns([

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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