Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbc924e7

Browse files
author
ben.durrant
committed
Merge branch 'v2.0-integration' into more-produce
2 parents5bd963c +d96ce6e commitbc924e7

File tree

171 files changed

+47270
-83
lines changed

Some content is hidden

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

171 files changed

+47270
-83
lines changed

‎.github/workflows/tests.yml‎

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
filters:|
1919
toolkit:
2020
- 'packages/toolkit/**'
21+
- 'examples/publish-ci/**'
22+
- '.github/workflows/tests.yml'
2123
2224
build:
2325
needs:changes
@@ -43,6 +45,13 @@ jobs:
4345
-name:Install deps
4446
run:yarn install
4547

48+
# Read existing version, reuse that, add a Git short hash
49+
-name:Set build version to Git commit
50+
run:node scripts/writeGitVersion.mjs $(git rev-parse --short HEAD)
51+
52+
-name:Check updated version
53+
run:jq .version package.json
54+
4655
-name:Pack
4756
run:yarn pack
4857

@@ -121,9 +130,76 @@ jobs:
121130
-name:Install build artifact
122131
run:yarn add ./package.tgz
123132

133+
-name:Show installed RTK versions
134+
run:yarn info @reduxjs/toolkit
135+
124136
-run:sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.ts ./src/tests/*.* ./src/query/tests/*.*
125137

126138
-name:Test types
127139
run:|
128140
yarn tsc --version
129141
yarn type-tests
142+
143+
test-published-artifact:
144+
name:Test Published Artifact ${{ matrix.example }}
145+
146+
needs:[build]
147+
runs-on:ubuntu-latest
148+
strategy:
149+
fail-fast:false
150+
matrix:
151+
node:['16.x']
152+
example:
153+
[
154+
'cra4',
155+
'cra5',
156+
'next',
157+
'vite',
158+
'node-standard',
159+
'node-esm',
160+
'are-the-types-wrong',
161+
]
162+
defaults:
163+
run:
164+
working-directory:./examples/publish-ci/${{ matrix.example }}
165+
steps:
166+
-name:Checkout repo
167+
uses:actions/checkout@v2
168+
169+
-name:Use node ${{ matrix.node }}
170+
uses:actions/setup-node@v2
171+
with:
172+
node-version:${{ matrix.node }}
173+
cache:'yarn'
174+
175+
-name:Install deps
176+
run:yarn install
177+
178+
-name:Remove existing RTK
179+
run:yarn remove @reduxjs/toolkit
180+
181+
-uses:actions/download-artifact@v2
182+
with:
183+
name:package
184+
path:./examples/publish-ci/${{ matrix.example }}
185+
186+
-name:Check folder contents
187+
run:ls -l .
188+
189+
-name:Install RTK build artifact
190+
run:yarn add ./package.tgz
191+
192+
-name:Show installed RTK versions
193+
run:yarn info @reduxjs/toolkit && yarn why @reduxjs/toolkit
194+
195+
-name:Build example
196+
run:yarn build
197+
198+
-name:Run test step
199+
run:yarn test
200+
if:matrix.example != 'are-the-types-wrong'
201+
202+
-name:Run test step (attw)
203+
# Ignore "FalseCJS" errors in the `attw` job
204+
run:yarn test -n FalseCJS
205+
if:matrix.example == 'are-the-types-wrong'

‎.gitignore‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ es
99

1010
.yalc
1111
yalc.lock
12+
yalc.sig
1213

1314
.idea/
1415
.vscode/
@@ -29,7 +30,3 @@ typesversions
2930
!.yarn/versions
3031
.pnp.*
3132
*.tgz
32-
33-
.yalc
34-
yalc.lock
35-
yalc.sig

‎docs/rtk-query/usage/code-splitting.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ export const { useExampleQuery } = extendedApi
5656
```
5757

5858
:::tip
59-
In development mode, ifyou inject an endpoint that already exists and don't explicitly specify`overrideExisting: true`, the endpoint will not be overridden andyou will get a warning aboutit. You**will not see the warning in production** and the existing endpoint will just be overriden, so make sure to account forthis in your tests.
59+
Ifyou inject an endpoint that already exists and don't explicitly specify`overrideExisting: true`, the endpoint will not be overridden. In development mode,you will get a warning about this.
6060
:::

‎docs/rtk-query/usage/queries.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function App() {
225225
}
226226
```
227227

228-
While`data` is expected to used in the majority of situations,`currentData` is also provided,
228+
While`data` is expected tobeused in the majority of situations,`currentData` is also provided,
229229
which allows for a further level of granularity. For example, if you wanted to show data in the UI
230230
as translucent to represent a re-fetching state, you can use`data` in combination with`isFetching`
231231
to achieve this. However, if you also wish to_only_ show data corresponding to the current arg,
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
typesversions
26+
.cache
27+
.yarnrc
28+
.yarn/*
29+
!.yarn/patches
30+
!.yarn/releases
31+
!.yarn/plugins
32+
!.yarn/sdks
33+
!.yarn/versions
34+
.pnp.*
35+
*.tgz
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/package.json b/package.json
2+
index 60791b6ccd3575279eddef2ac795802bd5044abd..41be518d2f21a659ca71095850cb18264a814f8d 100644
3+
--- a/package.json
4+
+++ b/package.json
5+
@@ -25,6 +25,7 @@
6+
"prepublishOnly": "npm run tsc && npm run test"
7+
},
8+
"type": "module",
9+
+ "types": "./dist/index.d.ts",
10+
"exports": {
11+
".": {
12+
"development": "./src/index.ts",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp