Upgrade 0.29 to 0.30
Change startupjs and all @startupjs/* dependencies in your package.json to ^0.30.
BREAKING CHANGES
-
bundler - Instead of using general
require('startupjs/bundler.cjs')you have to require a specific file you need.Do a global search in your project for the text
startupjs/bundler.cjsand change the following:-
require('startupjs/bundler.cjs').webpackWebConfigTO:
require('startupjs/bundler/webpack.web.config.cjs') -
require('startupjs/bundler.cjs').webpackServerConfigTO:
require('startupjs/bundler/webpack.server.config.cjs') -
require('startupjs/bundler.cjs').babelConfigTO:
require('startupjs/bundler/babel.config.cjs') -
require('startupjs/bundler.cjs').metroConfigTO:
require('startupjs/bundler/metro.config.cjs') -
require('startupjs/bundler.cjs').rnConfigTO:
require('startupjs/bundler/react-native.config.cjs') -
require('startupjs/bundler.cjs').viteConfigTO:
require('startupjs/bundler/vite.config.cjs')
Additionally, if you did override .js/.jsx compilation in your
webpack.web.config.cjs, you might have usedgetJsxRulefunction there. In which case you should now get it from helpers:-
const { getJsxRule } = require('startupjs/bundler.cjs')TO:
const { getJsxRule } = require('startupjs/bundler/helpers.cjs')
-
-
sharedb-access - There was changed parameters of functions in
static accessproperies (changed backend to model). Now they look like: -
server-aggregation - There was changed parameters of functions in
static accessproperies. Now they look like:Here
model- it's sharedb model;params- it's parameters from$paramsfield in aggregation call;session- it's your session. -
DateTimePicker:
- for Android and IOS changed deprecated libraries from
react-nativetoDateTimePickerfrom@react-native-community/datetimepicker. - for web changed library to
react-datepickerthat allow use calendar in modedatetimein Safari and Firefox.
Need to manually install a new library
yarn add @react-native-community/datetimepickerwith your package manager, install pod for IOS and init backend side of UI:- import
initUiandgetUiHeadand connect them in the body of thestartupjsServerandgetHeadfunctions inserver/index.js.
- add module
@startupjs/ui/servertoforceCompileModulesinwebpack.server.config.cjs
- for Android and IOS changed deprecated libraries from
-
Modal: the API of the Modal component has changed. See more
- rename old
onDismisstoonCancel - add
onDismiss,onShow,showCross,onCrossPress,enableBackdropPress,supportedOrientations,$visible,onOrientationChange - Previously,
ModalrequireduseState, but now you need to useuseValueand pass the$visiblesetter property instead ofvisible, also you can not useuseValueand not pass$visible, but useuseRefinstead. See more - rename
variant='pure'tovariant='custom'
- rename old
-
Dropdown:
- popoverWrapperStyle property is removed. Use
styleinstead like:
- popoverWrapperStyle property is removed. Use
-
Drawer:
- styleContent property is removed. Use
styleinstead - styleSwipe property is removed. Use
swipeStyleinstead - styleCase property is removed. Use
caseStyleinstead
- styleContent property is removed. Use
Features
-
DateTimePicker
- add new properties
disabled,format,minuteInterval,placeholder,size,timeFormat,cancelButtonText,confirmButtonText,is24HourSee more.
- add new properties
-
Drawer:
- add
onRequestOpenproperty
- add
-
NumberInput:
- onNumberChange returns
undefinedif NumberInput is empty
- onNumberChange returns