Skip to content

v2.1.0

Compare
Choose a tag to compare
@lukeed lukeed released this 06 Aug 23:45
· 19 commits to main since this release

Features

  • Add Schema Composition utilities (#2): 04b22b5, c2a7394

    t.one(t.string(), t.number()); 
    //-> {
    //->   oneOf: [
    //->     { type: 'string' },
    //->     { type: 'number' },
    //->   ]
    //-> }
    
    t.any(t.string(), t.number()); 
    //-> {
    //->   anyOf: [
    //->     { type: 'string' },
    //->     { type: 'number' },
    //->   ]
    //-> }
    
    t.all(
      t.string({ minLength: 2 }), 
      t.string({ maxLength: 40 }),
    ); 
    //-> {
    //->   allOf: [
    //->     { type: 'string', minLength: 2 },
    //->     { type: 'string', maxLength: 40 },
    //->   ]
    //-> }
    
    t.not(t.string())
    //-> {
    //->  not: {
    //->    type: 'string'
    //->  }
    //->}

Chores

  • fix(ci): Add explicit registry-url to npm publisher: 08bae75
  • remove stale TODO note: 1614ac7

Full Changelog: v2.0.1...v2.1.0