-
Notifications
You must be signed in to change notification settings - Fork 40
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
chore: update nx packages #1147
base: main
Are you sure you want to change the base?
Conversation
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.
Good that we update that!
Unfortunately, the nx-computed dependencies created by Marking draft until I figure this out. |
Looks like we can use |
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
There is one significant change in how this repo works: we no longer automatically compute the deps for all packages, BUT we instead throw a lint error if nx calculates that you have failed to include a dep in your package.json which you import in your code. For example, flagd uses the
I think this is actually an improvement over the last behavior, since it will cause devs to think carefully about their deps. I have updated all the deps for all the packages appropriately according to this check. Please check the deps of your package.json. |
Signed-off-by: Todd Baert <[email protected]>
}, | ||
{ | ||
"files": "*.json", | ||
"parser": "jsonc-eslint-parser", | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.json"], |
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 is the new lint rule which ensures projects have all the dependencies they need.
@@ -1,7 +1,7 @@ | |||
import fs from 'fs'; | |||
import { FileFetch } from './file-fetch'; | |||
import { FlagdCore } from '@openfeature/flagd-core'; | |||
import { Logger } from '@openfeature/core'; | |||
import { Logger } from '@openfeature/server-sdk'; |
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 should avoid direct imports from core in server/web libs. It technically isn't a problem, but it adds a direct dep to core which is not needed.
@@ -1,4 +1,4 @@ | |||
import { EvaluationContext } from '@openfeature/server-sdk'; |
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 we're importing from server in a web lib 😨
This was caught because the new lint tried to add the server-sdk to the deps.
@@ -1,17 +0,0 @@ | |||
services: |
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 now use TestContainers to start/stop all containers during testing.
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.
Looks good to me! Nice update!
This PR:
npx nx migrate 17
npx nx migrate latest
workspace-lint
from CI (this validates the project config, but it's automatic now): feat(core): remove deprecated workspace-lint nrwl/nx#16212There is one significant change in how this repo works: we no longer automatically compute the deps for all packages, BUT we instead throw a lint error if nx calculates that you have failed to include a dep in your package.json which you import in your code.
For example, flagd uses the
lru-cache
package. Because we import it in our ts files, if we DON'T include it in our pacakge.json, we see this lint error (which causes the build to fail):I think this is actually an improvement over the last behavior, since it will cause devs to think carefully about their deps.
I have updated all the deps for all the packages appropriately according to this check. Please check the deps of your package.json.