vazco/uniforms v2.0.0-alpha.0 Release Notes

Release Date: 2019-05-01 // about 5 years ago
    • ๐Ÿ’ฅ Breaking: Separated schema packages. These are now:
      uniforms-bridge-graphql
      uniforms-bridge-json-schema
      uniforms-bridge-simple-schema
      uniforms-bridge-simple-schema-2
    

    To register a new schema, import uniforms-bridge-X or uniforms-bridge-X/register directly. Named exports and file names haven't changed, so imports looks like this:

      // GraphQL
      -import { GraphQLBridge } from 'uniforms';
      +import { GraphQLBridge } from 'uniforms-bridge-graphql';
    
      -import GraphQLBridge from 'uniforms/GraphQLBridge';
      +import GraphQLBridge from 'uniforms-bridge-graphql/GraphQLBridge';
    
      // JSON Schema
      -import { JSONSchemaBridge } from 'uniforms';
      +import { JSONSchemaBridge } from 'uniforms-bridge-graphql';
    
      -import JSONSchemaBridge from 'uniforms/JSONSchemaBridge';
      +import JSONSchemaBridge from 'uniforms-bridge-json-schema/JSONSchemaBridge';
    
      // SimpleSchema (Atmosphere version for Meteor)
      -import { SimpleSchemaBridge } from 'uniforms';
      +import { SimpleSchemaBridge } from 'uniforms-bridge-simple-schema';
    
      -import SimpleSchemaBridge from 'uniforms/SimpleSchemaBridge';
      +import SimpleSchemaBridge from 'uniforms-bridge-simple-schema/SimpleSchemaBridge';
    
      // SimpleSchema (npm version)
      -import { SimpleSchema2Bridge } from 'uniforms';
      +import { SimpleSchema2Bridge } from 'uniforms-bridge-simple-schema-2';
    
      -import SimpleSchema2Bridge from 'uniforms/SimpleSchema2Bridge';
      +import SimpleSchema2Bridge from 'uniforms-bridge-simple-schema-2/SimpleSchema2Bridge';
    
    • ๐Ÿ’ฅ Breaking: Packages depending on the uniforms package are now using dependency instead of the peerDependency. Same goes for the schema packages and their schema respectives: uniforms-bridge-graphql ~> graphql uniforms-bridge-simple-schema-2 ~> simpl-schema
    • ๐Ÿ’ฅ Breaking: Removed jsnext:main and module from package.json in all packages. It means that bundlers like Webpack will load the fully transpiled version now. It caused more troubles than it's worth. The original sources are still shipped in src directory.
    • ๐Ÿ’ฅ Breaking: QuickForm.render logic was moved to QuickForm.getNativeFormProps. BaseForm is now the only form component with an explicit render method, what is good for custom themes and form components.
    • ๐Ÿ’ฅ Breaking: SubmitField in uniforms-material now uses children by default and fallback to label. #523
    • ๐Ÿ”‹ Feature: Added createSchemaBridge.register for registering custom bridges.
    • ๐Ÿ”‹ Feature: Added onSubmit to the context data. Now every field can trigger the submit directly, without the form ref.
    • ๐Ÿ›  Fixed: SelectField label shrink state in uniforms-material. #522