-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(core): alpha implementation of nx release
#19110
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -145,7 +145,7 @@ export async function runCommand( | |||
initiatingProject: string | null, | |||
extraTargetDependencies: Record<string, (TargetDependencyConfig | string)[]>, | |||
extraOptions: { excludeTaskDependencies: boolean; loadDotEnvFiles: boolean } | |||
) { | |||
): Promise<NodeJS.Process['exitCode']> { |
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.
@FrozenPandaz requested I make this API change here after I demonstrated that I needed runCommand
to not control the process exit directly
0b2ae3c
to
acaa79f
Compare
acaa79f
to
bddac27
Compare
dff5e4b
to
cd7b767
Compare
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.
Docs look good
currentVersionResolver: 'disk', | ||
}) | ||
).rejects.toThrowErrorMatchingInlineSnapshot(` | ||
"The project "my-lib" does not have a package.json available at libs/my-lib/package.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.
Eventually this kind of error message will be more concise and link off to dedicated docs around configuring release groups
packages/nx/src/command-line/release/config/create-release-groups.spec.ts
Outdated
Show resolved
Hide resolved
packages/js/src/executors/release-publish/release-publish.impl.ts
Outdated
Show resolved
Hide resolved
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! Thanks for the fixes and effort 🎉
"currentVersionResolver": { | ||
"type": "string", | ||
"default": "disk", | ||
"description": "Which approach to use to determine the current version of the project.", | ||
"enum": ["registry", "disk"] | ||
}, |
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.
What about adding the ability to provide a custom resolver? For instance a resolver that retrieves the version from a git tag.
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.
Hi @edbzn, please note the description of this PR. It is currently aimed at providing versioning and publishing for the nx repo itself only.
Rest assured we have lots of exciting plans for this coming up, which very much includes resolving versions from git tags. This is just humble beginnings and we will begin talking about more broadly once we feel it is in a good place for Nx users rather than just ourselves at this point.
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.
Hi @JamesHenry, thank you I appreciate the clarification.
It is currently aimed at providing versioning and publishing for the nx repo itself only.
In light of your explanation, could you please confirm whether this PR will introduce a new command that Nx users can utilize? I'm a bit confused about whether this feature will be part of the public API or not.
This is just humble beginnings and we will begin talking about more broadly once we feel it is in a good place for Nx users rather than just ourselves at this point.
It's already looking promising, and I'm keen to provide additional feedback based on my experiences with releasing using Nx, primarily through @jscutlery/semver. However, it seems this PR may not be the ideal place for such discussions. Would you consider opening a dedicated discussion on the repository to gather input from the wider community?
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 definitely look forward to the great feedback you will be able to provide in good time. For right now, I genuinely recommend putting this out of your mind. As noted, it is all subject to change and rapid, breaking evolution. We will begin talking about this publicly once we are ready, and at that point we will definitely seek yours and other's valuable feedback. Importantly, no existing solutions or tooling will cease to work off the back of this, no existing APIs will be negatively impacted.
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.
@edbzn have you had chance to join our official discord yet? https://go.nx.dev/community
I will reach out to you on there soon to discuss further
Hey there, I couldn't find any issue linked in this thread, so I'm leaving this comment here instead: How will this differ from kreuzerk/nx-release? I am using this for versioning & publishing to npm for my library. |
@ajitzero please note the description of this PR. It is currently aimed at providing versioning and publishing for the nx repo itself only. This is just humble beginnings and we will begin talking about more broadly once we feel it is in a good place for Nx users rather than just ourselves, which is all this is at this point. We will not be providing comparisons to other tools until we actively recommend it as a solution to our users. |
Nice work and happy to see changelogen could be an inspiration for this feature 🚀 If you would love, I would be more than happy to collaborate in order to make it possible to directly using changelogen API interface, maintaining a single solid and stable codebase together for the community :) |
Thanks @pi0! We are definitely open to that once we figure out the end DX and API we want to achieve on our side, let's chat on Discord? You'll find me in the Official Nx Server: https://go.nx.dev/community |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
This is a new alpha feature.
It is currently aimed at providing versioning and publishing for the nx repo itself only. (Although not yet configured to do so based on how we publish the packages and then install them back into the repo)
We will continue to build this out over time, and add more documentation for common use-cases.
If you choose to use it at this stage it will be entirely at your own risk, and APIs and configuration are subject to change at any time until it is no longer marked as alpha.