-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1006 from reduxjs/feature/migrate-rtkq-source
- Loading branch information
Showing
207 changed files
with
54,408 additions
and
74 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
name: Compressed Size | ||
# name: Compressed Size | ||
|
||
on: [pull_request] | ||
# on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: preactjs/compressed-size-action@v1 | ||
with: | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: preactjs/compressed-size-action@v1 | ||
# with: | ||
# repo-token: '${{ secrets.GITHUB_TOKEN }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,9 @@ yarn.lock | |
temp/ | ||
.tmp-projections | ||
|
||
.rts2* | ||
.rts2* | ||
|
||
typesversions | ||
.cache | ||
.yarn | ||
.yarnrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
module.exports = { | ||
setupFilesAfterEnv: ['./jest.setup.js'] | ||
setupFilesAfterEnv: ['./jest.setup.js'], | ||
testPathIgnorePatterns: ['<rootDir>/query/*'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"sandboxes": ["new", "react-ts", "/examples/react", "/examples/svelte"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
extends: ['react-app', 'prettier/@typescript-eslint', 'plugin:prettier/recommended'], | ||
parser: '@typescript-eslint/parser', | ||
rules: { | ||
'no-use-before-define': 'off', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': ['error', { args: 'none', varsIgnorePattern: '^_' }], | ||
'no-redeclare': 'off', | ||
// '@typescript-eslint/no-redeclare': ['error'], // rule not found?, | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
endOfLine: 'auto', | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node: ['12.x'] | ||
os: [ubuntu-latest] #, windows-latest, macOS-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node ${{ matrix.node }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install deps and build (with cache) | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
install-command: yarn --frozen-lockfile --ignore-scripts | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Test | ||
run: yarn test --ci --coverage --maxWorkers=2 | ||
|
||
- name: Pack (including Prepare) | ||
run: npm pack | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: package | ||
path: rtk-incubator-rtk-query*.tgz | ||
|
||
test: | ||
name: Test Types with TypeScript ${{ matrix.ts }} | ||
|
||
needs: [build] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: ['12.x'] | ||
ts: ['3.9', '4.0', '4.1', '4.2', 'next'] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use node ${{ matrix.node }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install deps and build (with cache) | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
install-command: yarn --frozen-lockfile --ignore-scripts | ||
|
||
- name: Install TypeScript ${{ matrix.ts }} | ||
run: npm install typescript@${{ matrix.ts }} --ignore-scripts | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: package | ||
|
||
- name: Unpack build artifact to dist | ||
run: tar -xzvf rtk-incubator-rtk-query-*.tgz --strip-components=1 package/dist | ||
|
||
- name: Remap @redux/toolkit from src to dist | ||
run: | | ||
sed -i -re 's|(@rtk-incubator/rtk-query.*)\./src|\1./|' ./test/tsconfig.json | ||
- name: '@ts-ignore @ts-expect-error messages in pre-3.9 in the tests' | ||
if: ${{ matrix.ts < 3.9 }} | ||
run: | | ||
sed -i 's/@ts-expect-error/@ts-ignore/' test/*.ts* | ||
- name: "@ts-ignore stuff that didn't exist pre-4.1 in the tests" | ||
if: ${{ matrix.ts < 4.1 }} | ||
run: sed -i -e 's/@pre41-ts-ignore/@ts-ignore/' -e '/pre41-remove-start/,/pre41-remove-end/d' test/*.ts* | ||
|
||
- name: Test types | ||
run: | | ||
./node_modules/.bin/tsc --version | ||
./node_modules/.bin/tsc --skipLibCheck -p test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: size | ||
on: [pull_request] | ||
jobs: | ||
size: | ||
runs-on: ubuntu-latest | ||
env: | ||
CI_JOB_NUMBER: 1 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: andresz1/size-limit-action@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"endOfLine": "auto", | ||
"printWidth": 120, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"overrides": [ | ||
{ | ||
"files": "*.ts", | ||
"options": { | ||
"parser": "babel-ts" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"name": "vscode-jest-tests", | ||
"request": "launch", | ||
"args": ["test", "--runInBand", "${file}"], | ||
"cwd": "${workspaceFolder}", | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"disableOptimisticBPs": true, | ||
"program": "${workspaceFolder}/node_modules/.bin/tsdx" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"jest.pathToJest": "npm test --", | ||
"jest.enableInlineErrorMessages": true, | ||
"jest.autoEnable": false, | ||
"editor.formatOnSave": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Lenz Weber | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.