Skip to content

Commit b7d27a6

Browse files
authored
Merge pull request #1011 from reduxjs/feature/build-rtk-query
2 parents bf8a7d0 + 00440b1 commit b7d27a6

File tree

190 files changed

+1583
-32485
lines changed

Some content is hidden

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

190 files changed

+1583
-32485
lines changed
File renamed without changes.

.github/workflows/main.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# name: Compressed Size
1+
name: Compressed Size
22

3-
# on: [pull_request]
3+
on: [pull_request]
44

5-
# jobs:
6-
# build:
7-
# runs-on: ubuntu-latest
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
88

9-
# steps:
10-
# - uses: actions/checkout@v2
11-
# - uses: preactjs/compressed-size-action@v1
12-
# with:
13-
# repo-token: '${{ secrets.GITHUB_TOKEN }}'
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: preactjs/compressed-size-action@v1
12+
with:
13+
repo-token: '${{ secrets.GITHUB_TOKEN }}'

.github/workflows/tests.yml

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -33,59 +33,59 @@ jobs:
3333
name: package
3434
path: reduxjs-toolkit*.tgz
3535

36-
# test:
37-
# name: Test Types with TypeScript ${{ matrix.ts }}
38-
39-
# needs: [build]
40-
# runs-on: ubuntu-latest
41-
# strategy:
42-
# fail-fast: false
43-
# matrix:
44-
# node: ['14.x']
45-
# ts: ['3.8', '3.9', '4.0', '4.1', 'next']
46-
# steps:
47-
# - name: Checkout repo
48-
# uses: actions/checkout@v2
49-
50-
# - name: Use node ${{ matrix.node }}
51-
# uses: actions/setup-node@v1
52-
# with:
53-
# node-version: ${{ matrix.node }}
54-
55-
# - uses: c-hive/gha-npm-cache@v1
56-
57-
# - name: Install deps
58-
# run: npm ci --ignore-scripts
59-
60-
# - name: Install TypeScript ${{ matrix.ts }}
61-
# run: npm install typescript@${{ matrix.ts }} --ignore-scripts
62-
63-
# - uses: actions/download-artifact@v2
64-
# with:
65-
# name: package
66-
67-
# - name: Unpack build artifact to dist
68-
# run: tar -xzvf reduxjs-toolkit-*.tgz --strip-components=1 package/dist
69-
70-
# - name: Remap @redux/toolkit from src to dist
71-
# run: |
72-
# sed -i -e 's|@reduxjs/toolkit": \["./src"\]|@reduxjs/toolkit": ["."]|' ./type-tests/files/tsconfig.json
73-
74-
# - name: Prefix `freeze` re-export for pre-3.7 TS versions with @ts-ignore
75-
# if: ${{ matrix.ts < 3.7 }}
76-
# run: |
77-
# sed -i -e "/import .* freeze .* from 'immer'/s/^/\/\/ @ts-ignore\n/" dist/typings.d.ts
78-
# sed -i -e "/ freeze,/s/^/ \/\/ @ts-ignore\n/" src/index.ts
79-
80-
# - name: Use typings-tester for old TS versions
81-
# if: ${{ matrix.ts < 3.9 }}
82-
# run: |
83-
# sed -i -e 's/"cd type-tests.*"/"npm run test type-tests"/' package.json
84-
# sed -i -e 's/@ts-expect-error/typings:expect-error/' type-tests/files/*.typetest.ts
85-
# sed -i -e 's/@ts-expect-error/@ts-ignore/' type-tests/files/*.ts
86-
# mv type-tests/types.test.disabled.ts type-tests/types.test.ts
87-
88-
# - name: Test types
89-
# run: |
90-
# ./node_modules/.bin/tsc --version
91-
# npm run type-tests
36+
test:
37+
name: Test Types with TypeScript ${{ matrix.ts }}
38+
39+
needs: [build]
40+
runs-on: ubuntu-latest
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
node: ['14.x']
45+
ts: ['3.8', '3.9', '4.0', '4.1', 'next']
46+
steps:
47+
- name: Checkout repo
48+
uses: actions/checkout@v2
49+
50+
- name: Use node ${{ matrix.node }}
51+
uses: actions/setup-node@v1
52+
with:
53+
node-version: ${{ matrix.node }}
54+
55+
- uses: c-hive/gha-npm-cache@v1
56+
57+
- name: Install deps
58+
run: npm ci --ignore-scripts
59+
60+
- name: Install TypeScript ${{ matrix.ts }}
61+
run: npm install typescript@${{ matrix.ts }} --ignore-scripts
62+
63+
- uses: actions/download-artifact@v2
64+
with:
65+
name: package
66+
67+
- name: Unpack build artifact to dist
68+
run: tar -xzvf reduxjs-toolkit-*.tgz --strip-components=1 package/dist
69+
70+
- name: Remap @redux/toolkit from src to dist
71+
run: |
72+
sed -i -e 's|@reduxjs/toolkit": \["./src"\]|@reduxjs/toolkit": ["."]|' ./type-tests/files/tsconfig.json
73+
74+
- name: Prefix `freeze` re-export for pre-3.7 TS versions with @ts-ignore
75+
if: ${{ matrix.ts < 3.7 }}
76+
run: |
77+
sed -i -e "/import .* freeze .* from 'immer'/s/^/\/\/ @ts-ignore\n/" dist/typings.d.ts
78+
sed -i -e "/ freeze,/s/^/ \/\/ @ts-ignore\n/" src/index.ts
79+
80+
- name: Use typings-tester for old TS versions
81+
if: ${{ matrix.ts < 3.9 }}
82+
run: |
83+
sed -i -e 's/"cd type-tests.*"/"npm run test type-tests"/' package.json
84+
sed -i -e 's/@ts-expect-error/typings:expect-error/' type-tests/files/*.typetest.ts
85+
sed -i -e 's/@ts-expect-error/@ts-ignore/' type-tests/files/*.ts
86+
mv type-tests/types.test.disabled.ts type-tests/types.test.ts
87+
88+
- name: Test types
89+
run: |
90+
./node_modules/.bin/tsc --version
91+
npm run type-tests

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
.DS_Store
22
*.log
33
node_modules
4+
# Dist and query are both build output folders
45
dist
6+
query
57
lib
68
es
79
yarn.lock

api-extractor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
/**
183183
* (REQUIRED) Whether to generate the .d.ts rollup file.
184184
*/
185-
"enabled": true,
185+
"enabled": false,
186186

187187
/**
188188
* Specifies the output path for a .d.ts rollup file to be generated without any trimming.

0 commit comments

Comments
 (0)