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

metaschema

Package Overview
Dependencies
Maintainers
6
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metaschema - npm Package Versions

13
8

2.0.0

Diff

Changelog

Source

[2.0.0][] - 2022-06-22

  • Struct implementation
  • Refactoring and code quality improvement
  • Metadata handled separetely
  • Error handling improved now errors are chained
  • Custom Kinds support implemented with custom metadata { CustomKind: { customMetadata: 'meta' } }
  • Update dependencies: "eslint", "eslint-config-metarhia"
  • Custom types syntax changed. No more hardcoded pg. Now you must use metadata which is static property of Type constructor.
  • Nested schema with relations bugfix
  • Tuple type implementation
  • Properly report error if trying to use field: 'type' shorthand for 'enum', 'array', 'set', 'map', 'object' types
  • Rewrite schemas and implement custom types
    • elegant syntax/format for custom types and internal types
    • custom types support
    • preprocessor to reduce Schema preprocess complexity
    • any kind of nested arrays, array of references https://github.com/metarhia/metaschema/issues/378
    • nested schemas with Schema instances support
    • any level of complex nested types support
    • custom validate for field
    • changed validate for schema, simplified for user
    • all user's validate functions support 4 types of syntax: boolean return, throw Error, error message as string return and array of error messages
    • reserved words permitted in schema if kind provided
    • function fields stored in schema
    • shorthand required key for collections support { 'array?': 'string' }
    • many relation now checks in runtime
    • model now loads projections at the end, to fix bug
    • schema kinds moved to separate file and kinds now have logic to remove hardcoded projection from Schema
    • ts interfaces from schema now have relation ids as well
    • deps update metautil
    • nested object support https://github.com/metarhia/metaschema/issues/395
    • syntax for validate function changed
    • Model no more require metavm for browser compatibility: need impress update
    • loadModel moved to loader: need impress update
    • Model no more writes d.ts file to disk moved to loader as well: need metasql update
    • syntax for pg types changed a bit, no more not-working types: need metasql update
timur.shemsedinov
published 2.0.0-alpha.2 •

timur.shemsedinov
published 2.0.0-alpha.1 •

timur.shemsedinov
published 1.4.1 •

Changelog

Source

[1.4.1][] - 2022-03-17

  • Skip calculated fields in schemas
  • Update dependencies
  • Fix tests after update metatests to 0.8.1
timur.shemsedinov
published 1.4.0 •

Changelog

Source

[1.4.0][] - 2022-02-23

  • Fix nullable field long-form
  • Optional for nested structures
  • Shorthand for optional nested structure
  • Fix paths in validation errors
  • Unify nested schema fields to { type: 'schema', schema: Schema, /* other fields */ }
  • Support Schema#validate function
timur.shemsedinov
published 1.3.4 •

Changelog

Source

[1.3.4][] - 2021-09-10

  • Show path to the field in warnings
  • Remove spread operator in toLongForm
  • Update dependencies
timur.shemsedinov
published 1.3.3 •

Changelog

Source

[1.3.3][] - 2021-07-19

  • Improve code style
  • Move types to package root
  • Package maintenance: update dependencies, update engines, security
timur.shemsedinov
published 1.3.2 •

Changelog

Source

[1.3.2][] - 2021-06-30

  • Schema projection
  • Schema.prototype.relations: Set<{ to: string, type: string }>
timur.shemsedinov
published 1.3.1 •

Changelog

Source

[1.3.1][] - 2021-06-26

  • Add namespaces to Schema.from factory
  • Fix "not expected" warning
timur.shemsedinov
published 1.3.0 •

Changelog

Source

[1.3.0][] - 2021-06-25

  • Check schemas with references to schemas from attached models
  • Add Schema.prototype.namespaces and attach/detouch methods to add/remove
  • Add types to Schema.prototype.references (in addition to entities)
  • Move Model.prototype.checkReferences to Schema.prototype.checkConsistency
  • Fix lost json subfields checking
  • Improve Schema kinds
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