Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 18 support #148

Merged
merged 19 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpx pretty-quick --staged && pnpm run test && pnpm run lint
pnpm pretty-quick --staged && pnpm run test && pnpm run lint
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const config = {
scheduler: "scheduler/cjs/scheduler-unstable_mock.development.js",
"^single-spa-react$": "<rootDir>/src/single-spa-react.js",
},
setupFiles: ["<rootDir>/jest.setup.js"],
};

export default config;
1 change: 1 addition & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
globalThis.IS_REACT_ACT_ENVIRONMENT = true;
36 changes: 21 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "single-spa-react",
"version": "4.6.1",
"description": "A single spa plugin for React apps",
"version": "5.0.0",
"description": "Single-spa lifecycles helper for React apps",
"main": "lib/umd/single-spa-react.js",
"module": "lib/esm/single-spa-react.js",
"type": "module",
Expand Down Expand Up @@ -36,9 +36,7 @@
"watch-build": "rollup -cw",
"format": "prettier --write .",
"check-format": "prettier --check .",
"prepublishOnly": "pinst --disable && pnpm run build",
"postpublish": "pinst --enable",
"postinstall": "husky install"
"prepare": "husky install"
},
"browserslist": [
"extends browserslist-config-single-spa"
Expand All @@ -57,9 +55,9 @@
"author": "Joel Denning",
"license": "MIT",
"bugs": {
"url": "https://github.com/joeldenning/single-spa-react/issues"
"url": "https://github.com/single-spa/single-spa-react/issues"
},
"homepage": "https://github.com/joeldenning/single-spa-react#readme",
"homepage": "https://github.com/single-spa/single-spa-react#readme",
"dependencies": {
"browserslist-config-single-spa": "^1.0.1"
},
Expand All @@ -75,24 +73,23 @@
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^13.0.0-alpha.1",
"@types/react": "^17.0.24",
"@types/react-dom": "^17.0.9",
"@testing-library/react": "^13.1.1",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"concurrently": "^6.2.1",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
"dom-element-getter-helpers": "^1.1.1",
"eslint": "^7.32.0",
"eslint-config-react-important-stuff": "^3.0.0",
"husky": "^7.0.2",
"husky": "^8.0.0",
"jest": "^27.2.1",
"jest-cli": "^27.2.1",
"jest-config": "^27.2.1",
"pinst": "^2.1.6",
"prettier": "^2.4.1",
"pretty-quick": "^3.1.1",
"react": "^18.0.0-alpha-81346764b-20210714",
"react-dom": "^18.0.0-alpha-81346764b-20210714",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.56.3",
"rollup-plugin-terser": "^7.0.2",
Expand All @@ -104,5 +101,14 @@
"@types/react": "*",
"@types/react-dom": "*",
"react": "*"
}
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
},
"prettier": {}
}
118 changes: 45 additions & 73 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading