-
Notifications
You must be signed in to change notification settings - Fork 18
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
Changes fetchye into a monorepo #15
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2b7f045:
|
FetchyeReduxProvider needs also be its own package |
Ok perfect, I wasn't entirely sure about that. |
Hey @JamesSingleton 👋 I cloned the repo, checked out your branch, set it to use yarn 2, added some missing dependencies, and ran the build, worked perfectly fine. diff --git a/packages/fetchye-immutable-cache/package.json b/packages/fetchye-immutable-cache/package.json
index 160884a..f260e67 100644
--- a/packages/fetchye-immutable-cache/package.json
+++ b/packages/fetchye-immutable-cache/package.json
@@ -36,9 +36,11 @@
"immutable": "^4.0.0-rc.12"
},
"devDependencies": {
+ "@babel/core": "7.11.6",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
+ "babel-preset-amex": "^3.4.1",
"fetchye": "*",
"rimraf": "^3.0.2",
"rollup": "^2.28.2",
diff --git a/packages/fetchye-redux-provider/package.json b/packages/fetchye-redux-provider/package.json
index 0683e5e..576bf25 100644
--- a/packages/fetchye-redux-provider/package.json
+++ b/packages/fetchye-redux-provider/package.json
@@ -39,10 +39,12 @@
"redux": "^4.0.5"
},
"devDependencies": {
+ "@babel/core": "7.11.6",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@testing-library/react": "^11.0.4",
+ "babel-preset-amex": "^3.4.1",
"fetchye": "*",
"rimraf": "^3.0.2",
"rollup": "^2.29.0",
diff --git a/packages/fetchye/package.json b/packages/fetchye/package.json
index 8a4205f..17ddda7 100644
--- a/packages/fetchye/package.json
+++ b/packages/fetchye/package.json
@@ -59,11 +59,13 @@
"react-dom": "^16.13.1"
},
"devDependencies": {
+ "@babel/core": "7.11.6",
"@babel/plugin-transform-runtime": "^7.11.5",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@testing-library/react": "^11.0.4",
+ "babel-preset-amex": "^3.4.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-redux": "^7.2.1",
|
@merceyz this is using Yarn 1. The issue currently is having to disable import/no-unresolved for |
I'm aware, but it's way easier to test with V2 as its node_modules linker is more stable, but I digress. The issue you're seeing is with the eslint plugin, not yarn. |
@merceyz good to know! For some reason I thought it was Yarn not resolving. Also, any particular reason for adding |
Yes, I opened #16 (which targets this branch) to "show" the use of V2, you can close it if you want, but I highly suggest using it as its node_modules linker is more stable than V1, and makes it just a flip of a switch to adopt PnP in the future (https://yarnpkg.com/features/pnp). You can run with PnP on the CI to catch dependency issues and node_modules locally to preserve the DX |
Don't think |
@merceyz so does that mean dependencies with Yarn 2 can't be hijacked in the same manner as Yarn 1 or a |
It might be possible, but it's harder, for example all https://yarnpkg.com/configuration/yarnrc#unsafeHttpWhitelist |
Yarn will support blocking network requests on a per hostname basis with yarnpkg/berry#2030, that should hopefully cover the "hijack" concerns |
"license": "Apache-2.0", | ||
"main": "es/index.js", | ||
"files": [ | ||
"es" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean it can technically be anything
const inputSrc = 'src/index.js'; | ||
|
||
export default [ | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we probably only need a CJS build for this as its a test lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will need to fast followup with fixes to the builds
I am opening this PR as a draft because I need to still update the documentation and workflows. However, I would like everyone to try the package(s) out.