-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore: update to nx 20 #10128
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 to nx 20 #10128
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
'use strict'; | ||
|
||
// @ts-check | ||
const { getJestProjects } = require('@nx/jest'); | ||
const { getJestProjectsAsync } = require('@nx/jest'); | ||
|
||
/** @type {import('@jest/types').Config.InitialOptions} */ | ||
module.exports = { | ||
projects: getJestProjects(), | ||
}; | ||
module.exports = async () => ({ | ||
projects: await getJestProjectsAsync(), | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
"nxCloudAccessToken": "YjIzMmMxMWItMjhiMS00NWY2LTk1NWYtYWU3YWQ0YjE4YjBlfHJlYWQ=", | ||
"release": { | ||
"projects": [ | ||
"*", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is no longer needed, we can use a list of only negative matchers and the ALL EXCEPT is implied |
||
"!repo", | ||
"!website*", | ||
"!integration-tests", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,34 +2,15 @@ | |
|
||
// @ts-check | ||
const { | ||
default: defaultChangelogRenderer, | ||
default: DefaultChangelogRenderer, | ||
} = require('nx/release/changelog-renderer'); | ||
|
||
const changelogRenderer = async ({ | ||
projectGraph, | ||
commits, | ||
releaseVersion, | ||
project, | ||
entryWhenNoChanges, | ||
changelogRenderOptions, | ||
repoSlug, | ||
conventionalCommitsConfig, | ||
changes, | ||
}) => { | ||
const defaultChangelog = await defaultChangelogRenderer({ | ||
projectGraph, | ||
commits, | ||
releaseVersion, | ||
project, | ||
entryWhenNoChanges, | ||
changelogRenderOptions, | ||
repoSlug, | ||
conventionalCommitsConfig, | ||
changes, | ||
}); | ||
|
||
// Append our custom messaging to the generated changelog entry | ||
return `${defaultChangelog}\n\nYou can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.`; | ||
module.exports = class CustomChangelogRenderer extends ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changelog renderer API is now class based where individual elements of the render can be easily patched by overwriting base methods. In our case we are just bolting text onto the full default render, so we only need to amend the main render() method. |
||
DefaultChangelogRenderer | ||
) { | ||
async render() { | ||
const defaultChangelog = await super.render(); | ||
// Append our custom messaging to the generated changelog entry | ||
return `${defaultChangelog}\n\nYou can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.`; | ||
} | ||
}; | ||
|
||
module.exports = changelogRenderer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,9 +59,13 @@ if (workspaceVersion === null) { | |
process.exit(0); | ||
} | ||
|
||
const publishStatus = await releasePublish({ | ||
const publishProjectsResult = await releasePublish({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
dryRun: options.dryRun, | ||
verbose: options.verbose, | ||
}); | ||
|
||
// eslint-disable-next-line no-process-exit | ||
process.exit(publishStatus); | ||
process.exit( | ||
// If any of the individual project publish tasks returned a non-zero exit code, exit with code 1 | ||
Object.values(publishProjectsResult).some(({ code }) => code !== 0) ? 1 : 0, | ||
); |
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'm getting flashbacks to C#/.NET 😛
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.
The sync version is only deprecated and still there so sadly we have to have another name for this one!