Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
devanshj committed Dec 9, 2021
2 parents 9989d11 + 48d4dc1 commit 46f3cb2
Show file tree
Hide file tree
Showing 12 changed files with 1,648 additions and 1,004 deletions.
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended",
Expand All @@ -29,6 +31,9 @@
}
},
"rules": {
"eqeqeq": "error",
"no-var": "error",
"prefer-const": "error",
"curly": ["warn", "multi-line", "consistent"],
"no-console": "off",
"import/no-unresolved": ["error", { "commonjs": true, "amd": true }],
Expand Down Expand Up @@ -102,6 +107,18 @@
"parserOptions": {
"project": "./tsconfig.json"
}
},
{
"files": ["tests/**/*.tsx"],
"env": {
"jest/globals": true
}
},
{
"files": ["./*.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}
]
}
5 changes: 3 additions & 2 deletions .github/workflows/test-multiple-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
react:
- 16.8.0
- 17.0.0
- 18.0.0-alpha-327d5c484-20211106
- 0.0.0-experimental-327d5c484-20211106
- 18.0.0-beta-71d16750c-20211202
- 0.0.0-experimental-71d16750c-20211202
testing: [default, alpha]
exclude:
- { react: 16.8.0, testing: alpha }
Expand All @@ -52,6 +52,7 @@ jobs:
run: |
sed -i~ '1s/^/import React from "react";/' tests/*.tsx
sed -i~ 's/automatic/classic/' babel.config.js
sed -i~ 's/automatic/classic/' .swcrc
- name: Test ${{ matrix.react }}
run: |
yarn add -D react@${{ matrix.react }} react-dom@${{ matrix.react }}
Expand Down
19 changes: 19 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"jsc": {
"target": "es5",
"parser": {
"syntax": "typescript",
"tsx": true
},
"transform": {
"react": {
"runtime": "automatic",
"pragma": "React.createElement",
"pragmaFrag": "React.Fragment",
"throwIfNamespace": true,
"useBuiltins": true
}
}
},
"sourceMaps": true
}
50 changes: 28 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zustand",
"private": true,
"version": "3.6.5",
"version": "3.6.7",
"description": "🐻 Bear necessities for state management in React",
"main": "./index.js",
"types": "./index.d.ts",
Expand Down Expand Up @@ -101,6 +101,11 @@
"jest": {
"rootDir": ".",
"testEnvironment": "jsdom",
"transform": {
"^.+\\.(t|j)sx?$": [
"@swc/jest"
]
},
"moduleNameMapper": {
"^zustand$": "<rootDir>/src/index.ts",
"^zustand/(.*)$": "<rootDir>/src/$1.ts"
Expand Down Expand Up @@ -129,41 +134,42 @@
"@babel/core": "^7.16.0",
"@babel/plugin-external-helpers": "^7.16.0",
"@babel/plugin-transform-react-jsx": "^7.16.0",
"@babel/plugin-transform-runtime": "^7.16.0",
"@babel/plugin-transform-runtime": "^7.16.4",
"@babel/plugin-transform-typescript": "^7.16.1",
"@babel/preset-env": "^7.16.0",
"@babel/preset-env": "^7.16.4",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-node-resolve": "^13.0.6",
"@rollup/plugin-typescript": "^8.3.0",
"@swc/core": "^1.2.118",
"@swc/jest": "^0.2.11",
"@testing-library/react": "^12.1.2",
"@types/jest": "^27.0.2",
"@types/react": "^17.0.34",
"@types/jest": "^27.0.3",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"@types/use-sync-external-store": "^0.0.3",
"@typescript-eslint/eslint-plugin": "^5.3.1",
"@typescript-eslint/parser": "^5.3.1",
"concurrently": "^6.3.0",
"esbuild": "^0.13.13",
"eslint": "^8.2.0",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"concurrently": "^6.4.0",
"esbuild": "^0.14.2",
"eslint": "^8.4.1",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jest": "^25.2.4",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "^25.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "^7.0.4",
"immer": "^9.0.6",
"jest": "^27.3.1",
"immer": "^9.0.7",
"jest": "^27.4.3",
"json": "^11.0.0",
"lint-staged": "^11.2.6",
"prettier": "^2.4.1",
"lint-staged": "^12.1.2",
"prettier": "^2.5.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rollup": "^2.59.0",
"rollup-plugin-esbuild": "^4.6.0",
"rollup": "^2.60.2",
"rollup-plugin-esbuild": "^4.7.2",
"shx": "^0.3.3",
"typescript": "^4.4.4"
"typescript": "^4.5.2"
},
"peerDependencies": {
"react": ">=16.8"
Expand Down
Loading

0 comments on commit 46f3cb2

Please sign in to comment.