Upgrade 0.37 to 0.38

Change startupjs and all @startupjs/* dependencies in your package.json to ^0.38.

BREAKING CHANGES

startupjs/ui additional dependencies

  • Install the following dependencies into your project:

    yarn add react-native-collapsible@^1.6.0 react-native-color-picker@^0.6.0

startupjs/ui/Radio

  • rename data property to options

startupjs/ui/NumberInput

  • rename buttons property to buttonsMode

startupjs/ui/DateTimePicker

Add new cross-platform component. Steps to migrate:

  • remove initReactDatepicker() from server/index.js
  • remove @react-native-community/datetimepicker from your package.json
  • rename onDateChange to onChangeDate
  • rename minuteInterval to timeInterval
  • rename format to dateFormat
  • remove cancelButtonText and confirmButtonText
  • to render custom input component pass renderInput property

startupjs/ui/Popover

The current API is deprecated, the difference with the new API:

  • hasArrow property is renamed to arrow
  • hasWidthCaption property is renamed to matchAnchorWidth
  • style property is renamed to attachmentStyle
  • captionStyle property is renamed to style
  • the properties hasDefaultWrapper, hasOverlay, animationType are removed
  • the component is now uncontrolled and you don't need to pas visible and onDismiss properties
  • no need to use Popover.Caption, just pass trigger as popover children
  • to render content use renderContent property instead of passing it as children of the popover
  • there are no default paddings for content now (IMPORTANT: paddings were returned in version 40)

startupjs/ui/Tooltip

  • component is deprecated, instead use the renderTooltip of the Div component to render the tooltip

startupjs/ui/Collapse

  • the shadow of the component was removed

startupjs/ui/forms/*

  • All low-level inputs (TextInput, Select, etc.) are now pure and don't support label, description, layout. Using low-level inputs is now discouraged. Use Input everywhere which has support for label, description, layout and the 2-way bindings:

    1. ArrayInput -> Input(type='array')
    2. Checkbox -> Input(type='checkbox')
    3. ColorPicker -> Input(type='color')
    4. DateTimePicker -> Input(type='date') or Input(type='time') or Input(type='datetime')
    5. Multiselect -> Input(type='multiselect')
    6. NumberInput -> Input(type='number')
    7. ObjectInput -> Input(type='object')
    8. PasswordInput -> Input(type='password')
    9. Radio -> Input(type='radio')
    10. Select -> Input(type='select')
    11. TextInput -> Input(type='text')

startupjs/server, startupjs/backend

  • deny access to db by default. This is controlled with the flag secure (which is true by default) in the options of your startupjs server in server/index.js: startupjsServer(options, ee => {}).

    Specifying secure: true is the same as enabling all security options:

    accessControl: true,
    serverAggregate: true,
    validateSchema: true

    If you currently only have some of this security options enabled, you can specify secure: false and explicitely set only the options you want. BUT it's strongly encouraged to keep secure: true and implement all 3 security options when migrating to 0.38 by following the according guides: