fix release script#4053
Conversation
because the cipublish script does it internally, so we have been doing twice the tests now
any change in package should result in a package release - not just the `src` directory
the Package that's defined in config does not have dependencies / peerDependencies, so we need to iterate over the object we find package.json
|
@DamianOsipiuk this should fix the release script :) |
|
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 5c25bc4:
|
| cache: 'npm' | ||
| - run: | | ||
| npm i | ||
| npm run test:ci |
There was a problem hiding this comment.
not needed because the publishci script also runs test
| : changedFiles.reduce((changedPackages, file) => { | ||
| const pkg = packages.find((p) => | ||
| file.startsWith(path.join('packages', p.packageDir, p.srcDir)), | ||
| file.startsWith(path.join('packages', p.packageDir)), |
There was a problem hiding this comment.
makes sure that we publish new versions whenever there are changes anywhere in the package directory, not just the src directory!
| ) | ||
|
|
||
| if ( | ||
| pkg.dependencies?.find((dep) => |
There was a problem hiding this comment.
pkg.dependencies does not exist - the type were wrong
so we need to find them in packgage.json
| (pkg.dependencies ?? []).map(async (dep) => { | ||
| Object.keys(config.dependencies ?? {}).map(async (dep) => { |
There was a problem hiding this comment.
same here - pkg.dependencies does not exist
| const depPackage = packages.find((d) => d.name === dep) | ||
|
|
||
| if (!depPackage) { | ||
| throw new Error(`Could not find package ${dep}`) |
There was a problem hiding this comment.
throwing here is wrong as it fails the promise and Promise.all stops after the first rejection. We can just ignore dependencies that are not dependencies we care about
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4053 +/- ##
==========================================
+ Coverage 96.36% 96.82% +0.45%
==========================================
Files 45 57 +12
Lines 2281 2673 +392
Branches 640 785 +145
==========================================
+ Hits 2198 2588 +390
- Misses 80 83 +3
+ Partials 3 2 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.