Announcement
Mini Program Crucial Update
Notice: Termination of Support for JS SDK <4.0
Announcement Date: November 21, 2022
We hereby announce the cessation of support for JS SDK <4.0. Immediate action necessary: Upgrade your JS SDK to ^4.x or later versions and confirm that your Mini Program functions seamlessly with the most recent version of Native with SDK ^4.x.
For any assistance required, our team is readily available.
End Of Life (EOL) Notice
Our Mini Program hereby discontinues its support for the following JS SDK versions marking their End of Life (EOL):
| Most Recent Supported Native Version | Correlated JS SDK Version | EOL Status |
|---|---|---|
| 2.35 | JS SDK ^1.x | Ended on 2021-09-09 |
| 2.46 | JS SDK ^2.x | Ended on 2022-05-19 |
| 2.58 | JS SDK ^3.x | Ending on 2022-12-22 |
| JS SDK ^4.x | Continues LTS ⭐️ |
Key Notes on Breaking Changes
Deprecation of Template Tags <style> and <br>
Refrain from using <style> and <br> tags and instead, opt for CSS files.
🙅Discouraged Practice:
Implementing inline <style>
<View className="index">
<style
dangerouslySetInnerHTML={{
__html: `
.index {
background: #333;
}
`,
}}
/>
<View className="index-hd"></View>
</View>
Incorporating inline <br>
<View className="title">
Mini Program <br />
Component Demos
</View>
Image Component Changes
Replacement element styles like object-fit have ceased to function. Kindly employ other styles or prop modes as replacement.
The size of Image will not be auto-adjusted to the image size when both width and height are set to auto.
The image event detail source event.detail.src has been removed.
🙅Incorrect Usage:
Employing object-fit style
<Image className="image" src={imageSrc} />
.image {
object-fit: cover; // 🙅 This style has been deprecated for img only
}
✅Correct Usage:
Implementing mode
<Image mode="scaleToFill" src={imageSrc} /> // ✅ Recommended to use `mode`
Modifications to Text Component
The Text component confines its nesting to Text component only. Other components will now be disabled within the Text component.
🙅Avoid:
Using <View> within <Text>
<Text>
<View>Mini Program</View>
<View>Component Demos</View>
</Text>
✅Preferred:
Implement <Text> within <Text>
<Text>
<Text>Mini Program</Text>
<Text>Component Demos</Text>
</Text>
Eviction of Deprecated Legacy Code
- The API
bn.twoFahas been terminated. - The global
envhas been abandoned, please use APIbn.envas the alternate. - The
entryPageattribute fromapp.jsonhas been scrapped, please useentryPagePathas its substitution. - The error element
error._codehas been cancelled, useerror.errnoinstead. - canIUseCustom: Options of string type like
'myaction'have been tossed out, please adopt{ action: 'myaction' }instead. - showModal: The
response.statushas been revoked, preferresponse.confirm/response.cancelinstead. - request: The function
response.json()has been omitted, setoptions.dataTypeto'json'and useresponse.datainstead. - request: The
response.text()has been deserted, opt to useresponse.datainstead. - request: The thenable return is no longer available, use
options.success/options.failas a substitute.
To attune to the new SDK ^4, consider re-uploading your MiniProgram project with
- CLI v2.4.22 by running
$ npm install -g @binance/mp-cli - And by selecting
MSV^4.0.2on IDE v2.22.0.
Announcement: End of support for JS SDK <3.0
Date of announcement: 2022-03-10
Announcing the end of support for JS SDK <3.0. Action required: You need to upgrade to JS SDK ^3.x or later and make sure your Mini Program can run on the latest version of Native with SDK ^3.x.
If you need any assistance, feel free to contact us.
EOL
Starting May 19th 2022, the Mini Program will no longer support the following end of life (EOL) JS SDK versions:
| Last supported Native version | JS SDK version | EOL |
|---|---|---|
| 2.35 | JS SDK ^1.x | EOL on 2021-09-09 |
| 2.46 | JS SDK ^2.x | EOL on 2022-05-19 |
| JS SDK ^3.x | Active LTS ✅ |
Release notes
The release note for each release. Please also check Release Note for more details.
| JS SDK Version | Release note |
|---|---|
| 2.2.0 -> 3.0.0 | 3.0.0 (2021-11-18) |
| 3.0.0 -> 3.1.0 | 3.1.0 (2021-12-09) |
| 3.1.0 -> 3.2.4 | 3.2.4 (2021-12-30) |
| 3.2.4 -> 3.3.0 | 3.3.0 (2022-01-20) |
| 3.3.0 -> 3.4.2 (rollbacked) | 3.4.0 (2022-02-17) |
| 3.4.2 -> 3.5.0 | 3.5.0 (2022-03-10) |
Breaking changes Summary
Image component
Now default size of Image is width: 320px; height: 240px;
// Image Component size
+ width: 320px;
+ height: 240px;
Deprecated legacy code removed
- Component
DeprecatedInputremoved, please useInputcomponent instead. - Component
DeprecatedTextarearemoved, please useTextareacomponent instead.
import {
- DeprecatedInput,
- DeprecatedTextarea,
Input,
Textarea,
} from '@binance/mp-components'
- API
bn.getCurrentPagesremoved, please use globalgetCurrentPagesfunction instead. - API
bn.getAppremoved, please use globalgetAppfunction instead. - API
bn.getTabBarremoved. - requestPayment:
options.noncestrremoved, please useoptions.nonceStrinstead. - request:
options.bodyremoved, please useoptions.datainstead. - request:
options.headersremoved, please useoptions.headerinstead. - connectSocket:
options.headersremoved, please useoptions.headerinstead. - SocketTask: callback payload of
onOpenchanged:
socketTask.onOpen({
- headers,
+ header
} => {})
To use the new SDK ^3, please re-upload MiniProgram with
- CLI v2.1.3
$ npm install -g @binance/mp-cli - IDE v2.12.0 and select
MSV^3.2.0on IDE
Crucial Update to the Mini Program
Notice: Termination of Support for JS SDK <3.0
Bulletin Date: March 10, 2022
We hereby announce the discontinuation of support for JS SDK <3.0. Immediate Action Required: You must upgrade to JS SDK ^3.x or newer and ensure that your Mini Program is compatible with the latest version of Native featuring SDK ^3.x.
For any assistance required, feel free to get in touch.
End Of Life (EOL) Notice
Effective from May 19th, 2022, our Mini Program will cease supporting the following JS SDK versions:
| Latterly Supported Native Version | Correlated JS SDK Version | EOL Status |
|---|---|---|
| 2.35 | JS SDK ^1.x | Ended 2021-09-09 |
| 2.46 | JS SDK ^2.x | Ended 2022-05-19 |
| JS SDK ^3.x | Active LTS ⭐️ |
Release Notes Insight
We document focus points of each release in our Release Notes. To capture meticulous updates, please explore our Release Note.
| Transitional JS SDK Versions | Complementary Release Notes |
|---|---|
| 2.2.0 -> 3.0.0 | 3.0.0 (2021-11-18) |
| 3.0.0 -> 3.1.0 | 3.1.0 (2021-12-09) |
| 3.1.0 -> 3.2.4 | 3.2.4 (2021-12-30) |
| 3.2.4 -> 3.3.0 | 3.3.0 (2022-01-20) |
| 3.3.0 -> 3.4.2 (Rolled back) | 3.4.0 (2022-02-17) |
| 3.4.2 -> 3.5.0 | 3.5.0 (2022-03-10) |
Crucial Notes on Breaking Changes
Image Component Alterations
The current default Image measurements are width: 320px; height: 240px;
// Adjustment to Image Component Size
+ width: 320px;
+ height: 240px;
Expunction of Deprecated Legacy Code
- The
DeprecatedInputcomponent has been discarded. Please utilize theInputcomponent as its replacement. - The
DeprecatedTextareaComponent has been removed. You are advised to rely on the updatedTextareacomponent.
import {
- DeprecatedInput,
- DeprecatedTextarea,
Input,
Textarea,
} from '@binance/mp-components'
- The
bn.getCurrentPagesAPI has been eliminated. Please use the global functiongetCurrentPagesas its replacement. - The
bn.getAppAPI has been discarded. Please resort to the global functiongetAppas an alternate. - The
bn.getTabBarAPI has been dismissed. - requestPayment:
options.noncestrhas been discarded. Please resort tooptions.nonceStras its replacement. - request:
options.bodyhas been terminated. Please adoptoptions.dataas its replacement. - request:
options.headershas been eliminated. Please resort tooptions.headerfor its replacement. - connectSocket:
options.headershas been discarded. Please resort tooptions.headeras an alternate. - SocketTask: The callback payload of
onOpenhas been altered:
socketTask.onOpen({
- headers,
+ header
} => {})
To transition smoothly to the new SDK ^3, please follow these steps:
- Adopt CLI v2.1.3 by executing
$ npm install -g @binance/mp-cli - Choose
MSV^3.2.0on IDE v2.12.0.