Skip to content

Commit 82acc40

Browse files
committedJan 27, 2023
fix: release and publish from 'main' rather than 'master' branch
1 parent 3eeb331 commit 82acc40

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed
 

‎.github/workflows/docs-public.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Public docs
44

55
on:
66
push:
7-
branches: [ master ]
7+
branches: [main]
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
@@ -30,5 +30,3 @@ jobs:
3030
build_dir: website/build
3131
env:
3232
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
34-

‎.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Release
66
on:
77
push:
88
branches:
9-
- master
9+
- main
1010

1111
jobs:
1212
release:

‎readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Immer
44

5-
[![npm](https://img.shields.io/npm/v/immer.svg)](https://www.npmjs.com/package/immer) [![Build Status](https://travis-ci.org/immerjs/immer.svg?branch=master)](https://travis-ci.org/immerjs/immer) [![Coverage Status](https://coveralls.io/repos/github/mweststrate/immer/badge.svg?branch=master)](https://coveralls.io/github/mweststrate/immer?branch=master) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) [![OpenCollective](https://opencollective.com/immer/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/immer/sponsors/badge.svg)](#sponsors) [![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/immerjs/immer)
5+
[![npm](https://img.shields.io/npm/v/immer.svg)](https://www.npmjs.com/package/immer) [![Build Status](https://travis-ci.org/immerjs/immer.svg?branch=main)](https://travis-ci.org/immerjs/immer) [![Coverage Status](https://coveralls.io/repos/github/mweststrate/immer/badge.svg?branch=main)](https://coveralls.io/github/mweststrate/immer?branch=main) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) [![OpenCollective](https://opencollective.com/immer/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/immer/sponsors/badge.svg)](#sponsors) [![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/immerjs/immer)
66

77
_Create the next immutable state tree by simply modifying the current tree_
88

‎website/docs/performance.mdx

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ title: Immer performance
99
data-ea-type="image"
1010
className="horizontal bordered"
1111
></div>
12-
</center> <details>
12+
</center>
13+
<details>
1314
<summary className="egghead-summary">
1415
egghead.io lesson 5: Leveraging Immer's structural sharing in React
1516
</summary>
@@ -28,7 +29,8 @@ title: Immer performance
2829
>
2930
Hosted on egghead.io
3031
</a>
31-
</details> <details>
32+
</details>
33+
<details>
3234
<summary className="egghead-summary">
3335
egghead.io lesson 7: Immer will try to re-cycle data if there was no
3436
semantic change
@@ -50,7 +52,7 @@ title: Immer performance
5052
</a>
5153
</details>
5254

53-
Here is a [simple benchmark](https://github.com/immerjs/immer/blob/master/__performance_tests__/todo.js) on the performance of Immer. This test takes 50,000 todo items and updates 5,000 of them. _Freeze_ indicates that the state tree has been frozen after producing it. This is a _development_ best practice, as it prevents developers from accidentally modifying the state tree.
55+
Here is a [simple benchmark](https://github.com/immerjs/immer/blob/main/__performance_tests__/todo.js) on the performance of Immer. This test takes 50,000 todo items and updates 5,000 of them. _Freeze_ indicates that the state tree has been frozen after producing it. This is a _development_ best practice, as it prevents developers from accidentally modifying the state tree.
5456

5557
Something that isn't reflected in the numbers above, but in reality, Immer is sometimes significantly _faster_ than a hand written reducer. The reason for that is that Immer will detect "no-op" state changes, and return the original state if nothing actually changed, which can avoid a lot of re-renderings for example. Cases are known where simply applying immer solved critical performance issues.
5658

‎website/docusaurus.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ module.exports = {
7575
"@docusaurus/plugin-content-docs",
7676
{
7777
sidebarPath: require.resolve("./sidebars.js"),
78-
editUrl: "https://github.com/immerjs/immer/edit/master/website/",
78+
editUrl: "https://github.com/immerjs/immer/edit/main/website/",
7979
routeBasePath: "/"
8080
}
8181
],

‎website/i18n/zh-CN/docusaurus-plugin-content-docs/current/performance.mdx

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ title: Immer 性能
99
data-ea-type="image"
1010
className="horizontal bordered"
1111
></div>
12-
</center> <details>
12+
</center>
13+
<details>
1314
<summary className="egghead-summary">
1415
egghead.io 第5课: 在 React 中利用 Immer 的结构共享
1516
</summary>
@@ -28,7 +29,8 @@ title: Immer 性能
2829
>
2930
Hosted on egghead.io
3031
</a>
31-
</details> <details>
32+
</details>
33+
<details>
3234
<summary className="egghead-summary">
3335
egghead.io 第7课: 如果没有语义变化,Immer 会使用原先的数据
3436
</summary>
@@ -49,7 +51,7 @@ title: Immer 性能
4951
</a>
5052
</details>
5153

52-
这是一个关于 Immer 性能的 [简单 benchmark](https://github.com/immerjs/immer/blob/master/__performance_tests__/todo.js) 。该测试需要 50,000 个待办事项并更新其中的 5,000 个。 _Freeze_ 表示状态树在生成后已被冻结。这是一种开发最佳实践,因为它可以防止开发人员意外修改状态树。
54+
这是一个关于 Immer 性能的 [简单 benchmark](https://github.com/immerjs/immer/blob/main/__performance_tests__/todo.js) 。该测试需要 50,000 个待办事项并更新其中的 5,000 个。 _Freeze_ 表示状态树在生成后已被冻结。这是一种开发最佳实践,因为它可以防止开发人员意外修改状态树。
5355

5456
上面的数字没有反映一些东西,但实际上,Immer 有时比手写的 reducer __ 得多。这样做的原因是,Immer 会检测“无操作”状态变化,如果实际上没有任何变化,则返回原始状态,这可以避免很多重新渲染。众所周知,只需应用 immer 即可解决关键性能问题。
5557

@@ -68,7 +70,7 @@ title: Immer 性能
6870

6971
### 预冻结数据
7072

71-
当向 Immer producer 中的状态树添加大型数据集时(例如从 JSON 端点接收的数据),可以在首先添加的数据的根上调用 `freeze(json)`来_浅冻结_它。这将允许 Immer 更快地将新数据添加到树中,因为它将避免_递归_扫描和冻结新数据的需要
73+
当向 Immer producer 中的状态树添加大型数据集时(例如从 JSON 端点接收的数据),可以在首先添加的数据的根上调用 `freeze(json)`*浅冻结*。这将允许 Immer 更快地将新数据添加到树中,因为它将避免*递归*扫描和冻结新数据的需要
7274

7375
### 您可以随时选择退出
7476

0 commit comments

Comments
 (0)
Please sign in to comment.