Change startupjs
and all @startupjs/*
dependencies in your package.json
to ^0.30
.
-
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.cjs
and change the following:-
require('startupjs/bundler.cjs').webpackWebConfig
TO:
require('startupjs/bundler/webpack.web.config.cjs')
-
require('startupjs/bundler.cjs').webpackServerConfig
TO:
require('startupjs/bundler/webpack.server.config.cjs')
-
require('startupjs/bundler.cjs').babelConfig
TO:
require('startupjs/bundler/babel.config.cjs')
-
require('startupjs/bundler.cjs').metroConfig
TO:
require('startupjs/bundler/metro.config.cjs')
-
require('startupjs/bundler.cjs').rnConfig
TO:
require('startupjs/bundler/react-native.config.cjs')
-
require('startupjs/bundler.cjs').viteConfig
TO:
require('startupjs/bundler/vite.config.cjs')
Additionally, if you did override .js/.jsx compilation in your
webpack.web.config.cjs
, you might have usedgetJsxRule
function 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 access
properies (changed backend to model). Now they look like:class ItemModel { static access = { create: async (model, collection, docId, doc, session) => { your code } read: async (model, collection, docId, doc, session) => { your code }, update: async (model, collection, docId, oldDoc, session, ops, newDoc) => { your code }, delete: async (model, collection, docId, doc, session) => { your code } } }
-
server-aggregation - There was changed parameters of functions in
static access
properies. Now they look like:class ItemModel { static aggregations = { openEvents: async (model, params, session) => { return [ {$match: {status: 'open'}} ] } } }
Here
model
- it's sharedb model;params
- it's parameters from$params
field in aggregation call;session
- it's your session. -
DateTimePicker:
- for Android and IOS changed deprecated libraries from
react-native
toDateTimePicker
from@react-native-community/datetimepicker
. - for web changed library to
react-datepicker
that allow use calendar in modedatetime
in Safari and Firefox.
Need to manually install a new library
yarn add @react-native-community/datetimepicker
with your package manager, install pod for IOS and init backend side of UI:- import
initUi
andgetUiHead
and connect them in the body of thestartupjsServer
andgetHead
functions inserver/index.js
.
import { getUiHead, initUi } from '@startupjs/ui/server' startupjsServer({ getHead, ... }, (ee, options) => { ... initUi(ee, options) ... }) function getHead () { return ` ${getUiHead()} other head text ` }
- add module
@startupjs/ui/server
toforceCompileModules
inwebpack.server.config.cjs
const getConfig = require('startupjs/bundler.cjs').webpackServerConfig module.exports = getConfig(undefined, { forceCompileModules: ['@startupjs/ui/server'] })
- for Android and IOS changed deprecated libraries from
-
Modal: the API of the Modal component has changed. See more
- rename old
onDismiss
toonCancel
- add
onDismiss
,onShow
,showCross
,onCrossPress
,enableBackdropPress
,supportedOrientations
,$visible
,onOrientationChange
- Previously,
Modal
requireduseState
, but now you need to useuseValue
and pass the$visible
setter property instead ofvisible
, also you can not useuseValue
and not pass$visible
, but useuseRef
instead. See more - rename
variant='pure'
tovariant='custom'
- rename old
-
Dropdown:
- popoverWrapperStyle property is removed. Use
style
instead like:
.wrapper // Drawer styles +tablet() // Popover styles
- popoverWrapperStyle property is removed. Use
-
Drawer:
- styleContent property is removed. Use
style
instead - styleSwipe property is removed. Use
swipeStyle
instead - styleCase property is removed. Use
caseStyle
instead
- styleContent property is removed. Use
-
DateTimePicker
- add new properties
disabled
,format
,minuteInterval
,placeholder
,size
,timeFormat
,cancelButtonText
,confirmButtonText
,is24Hour
See more.
- add new properties
-
Drawer:
- add
onRequestOpen
property
- add
-
NumberInput:
- onNumberChange returns
undefined
if NumberInput is empty
- onNumberChange returns