Skip to content

Commit a8b0492

Browse files
Merge branch 'master' into bugfix/4058
2 parents 7c399c2 + 34c3b5f commit a8b0492

File tree

551 files changed

+30420
-15188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

551 files changed

+30420
-15188
lines changed
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
name: size
2-
on: [pull_request]
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
permissions:
7+
pull-requests: write
38
jobs:
49
size:
510
runs-on: ubuntu-latest
611
env:
712
CI_JOB_NUMBER: 1
813
steps:
914
- uses: actions/checkout@v2
10-
- uses: andresz1/size-limit-action@v1
15+
- uses: EskiMojo14/size-limit-action@v2
1116
with:
1217
directory: packages/toolkit
1318
github_token: ${{ secrets.GITHUB_TOKEN }}
1419
build_script: build-only
20+
package_manager: yarn
21+
size_margin: non-zero

.github/workflows/test-codegen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
strategy:
3333
matrix:
34-
node-version: ['16.x']
34+
node-version: ['18.x']
3535

3636
steps:
3737
- uses: actions/checkout@v2

.github/workflows/tests.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
- name: Install build artifact
9292
run: yarn workspace @reduxjs/toolkit add $(pwd)/package.tgz
9393

94-
- run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.ts ./src/tests/*.* ./src/query/tests/*.*
94+
- run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts ./src/tests/*.* ./src/query/tests/*.*
9595

9696
- name: Run tests, against dist
9797
run: yarn test
@@ -133,7 +133,7 @@ jobs:
133133
- name: Show installed RTK versions
134134
run: yarn info @reduxjs/toolkit
135135

136-
- run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.ts ./src/tests/*.* ./src/query/tests/*.*
136+
- run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts ./src/tests/*.* ./src/query/tests/*.*
137137

138138
- name: Test types
139139
run: |
@@ -149,7 +149,17 @@ jobs:
149149
fail-fast: false
150150
matrix:
151151
node: ['18.x']
152-
example: ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm', 'expo']
152+
example:
153+
[
154+
'cra4',
155+
'cra5',
156+
'next',
157+
'vite',
158+
'node-standard',
159+
'node-esm',
160+
'react-native',
161+
'expo',
162+
]
153163
defaults:
154164
run:
155165
working-directory: ./examples/publish-ci/${{ matrix.example }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ typesversions
3030
!.yarn/versions
3131
.pnp.*
3232
*.tgz
33+
34+
tsconfig.vitest-temp.json

.prettierrc.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
22
"semi": false,
33
"singleQuote": true,
4-
"endOfLine": "auto"
4+
"endOfLine": "auto",
5+
"overrides": [
6+
{
7+
"files": ["examples/**/tsconfig*.json"],
8+
"options": { "parser": "json" }
9+
}
10+
]
511
}
6-

.yarn/patches/msw-npm-0.40.2-2107d48752

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/get-config.js b/get-config.js
2+
index 76ebaee5455b2a4bacb986784bd1b53ad89adeb7..1b092e645b258f4a6533ca88b7d36dbcde4eb6de 100644
3+
--- a/get-config.js
4+
+++ b/get-config.js
5+
@@ -132,7 +132,7 @@ export default async function getConfig(plugins, process, args, pkg) {
6+
} else if (!check.entry) {
7+
if (pkg.packageJson.main) {
8+
processed.files = [
9+
- require.resolve(join(dirname(pkg.path), pkg.packageJson.main))
10+
+ import.meta.resolve(join(dirname(pkg.path), pkg.packageJson.main))
11+
]
12+
} else {
13+
processed.files = [join(dirname(pkg.path), 'index.js')]
14+
@@ -177,7 +177,7 @@ export default async function getConfig(plugins, process, args, pkg) {
15+
for (let i in check.import) {
16+
if (peer.includes(i)) {
17+
check.ignore = check.ignore.filter(j => j !== i)
18+
- imports[require.resolve(i, config.cwd)] = check.import[i]
19+
+ imports[import.meta.resolve(i, config.cwd)] = check.import[i]
20+
} else {
21+
imports[toAbsolute(i, config.cwd)] = check.import[i]
22+
}

.yarn/releases/yarn-3.2.4.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,59 @@ Before opening an issue, please search the [issue tracker](https://github.com/re
88

99
Please ask any general and implementation specific questions on [Stack Overflow with a Redux Toolkit tag](http://stackoverflow.com/questions/tagged/redux-toolkit?sort=votes&pageSize=50) for support.
1010

11-
## New Features
11+
We ask you to do this because StackOverflow has a much better job at keeping popular questions visible. Unfortunately good answers get lost and outdated on GitHub.
1212

13-
Please open an issue with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept.
13+
If your question gets closed or you don't get a reply after a few days, consider opening a [discussion](https://github.com/reduxjs/redux-toolkit/discussions) or joining the [Reactiflux](https://discord.gg/reactiflux) discord server and asking in the #redux channel.
14+
15+
### Help Us Help You
16+
17+
On both websites, it is a good idea to structure your code and question in a way that is easy to read to help people to answer it. For example, we encourage you to use syntax highlighting, indentation, and split text in paragraphs.
18+
19+
Please keep in mind that people spend their free time trying to help you. You can make it easier for them if you provide versions of the relevant libraries and a runnable small project reproducing your issue. You can put your code on [JSBin](https://jsbin.com) or, for bigger projects, on GitHub. Make sure all the necessary dependencies are declared in `package.json` so anyone can run `npm install && npm start` and reproduce your issue.
20+
21+
## Ways You Can Contribute
22+
23+
There are several ways you can contribute to the repository. Instead of developing a feature or fixing a bug, you can also contribute by updating or writing [documentation](https://github.com/reduxjs/redux-toolkit/tree/master/docs) for a specific feature or implementation if you know you are good with documentation. Alternatively, you can add [examples](https://github.com/reduxjs/redux-toolkit/tree/master/examples) of any 3rd party implementation like GraphQL or React (just an example) that would help users to understand and easily integrate Redux Toolkit with that specific framework and library.
1424

1525
## Getting started
1626

1727
Visit the [Issue tracker](https://github.com/reduxjs/redux-toolkit/issues) to find a list of open issues that need attention.
1828

29+
### Bugs and Improvements
30+
31+
We use the [Issue tracker](https://github.com/reduxjs/redux-toolkit/issues) to keep track of bugs and improvements to Redux Toolkit itself, its examples, and the documentation. We encourage you to open issues to discuss improvements, architecture, theory, internal implementation, etc. If a topic has been discussed before, we will ask you to join the previous discussion.
32+
33+
### New Features
34+
35+
Please open an [issue](https://github.com/reduxjs/redux-toolkit/issues) with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept.
36+
1937
### Fork the repository
2038

2139
Please use the GitHub UI to [fork this repository](https://github.com/reduxjs/redux-toolkit) (_read more about [Forking a repository](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo)_). Redux Toolkit has forked builds enabled in the CI, so you will see the build status of your fork's branch.
2240

41+
![Fork Button](https://docs.github.com/assets/cb-40742/mw-1440/images/help/repository/fork-button.webp)
42+
43+
Fork, then clone the repo:
44+
45+
```sh
46+
git clone https://github.com/your-username/redux-toolkit.git
47+
```
48+
2349
### Install
2450

2551
```bash
2652
$ cd redux-toolkit
2753
$ yarn
2854
```
2955

56+
### Build
57+
58+
You can build the packages with the following command:
59+
60+
```
61+
yarn build
62+
```
63+
3064
### Tests
3165

3266
You can run tests for all packages with:
@@ -41,14 +75,6 @@ To continuously watch and run tests, run the following:
4175
yarn test --watch
4276
```
4377

44-
### Build
45-
46-
You can build the packages with the following command:
47-
48-
```
49-
yarn build
50-
```
51-
5278
## Git workflow / Submitting Changes
5379

5480
- Open a new issue in the [Issue tracker](https://github.com/reduxjs/redux-toolkit/issues).

docs/api/actionCreatorMiddleware.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import reducer from './reducer'
5353

5454
// Augment middleware to consider all functions with a static type property to be action creators
5555
const isActionCreator = (
56-
action: unknown
56+
action: unknown,
5757
): action is Function & { type: unknown } =>
5858
typeof action === 'function' && 'type' in action
5959

0 commit comments

Comments
 (0)