Skip to content

MetaForge V0.4.0

Compare
Choose a tag to compare
@shuritch shuritch released this 05 Nov 16:46
· 23 commits to main since this release

Update 2023-11-05

  • Support latest:21 node version

  • Removed parser (maybe temporary)

  • TypeScript .d.ts support

  • Schema field with multiple type variants now works only with special type union

  • Modular mechanism (internal rework): How it works

    const schema = new Schema();
    schema.register((schema, options, plan) => {}); //? Register new module

    By default registrated modules are:

    • Metatest module (Adds tests for prototypes)
    • Metatype module (Typescript parser)
    • Handyman (Quality of life module)

    But you also remove default modules:

    Schema.modules.delete('metatest');
  • New shorthands for:

    • enum example: ['winter', 'spring', 'summer, 'autumn']
    • tuple example: ['string', 'number']
    • object example: { a: string, b: number }
    • string example: 'string'
    • schema example: 'MyGlobalSchema'
    • schema#2 example: new Schema('string')
  • Removed preprocessor mechanism

  • Schemas now can be part of plan

  • Performance improvements (by removing unnecessary modules)

  • Lightweight inheritance

  • Removed type JSON (temporary)

  • Prototype chaining

  • Partial testing

  • New prototypes:

    • Tuple
    • Record
    • Schema
    • Union