Skip to content
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

Merged
merged 15 commits into from
Sep 18, 2023

Conversation

JamesHenry
Copy link
Collaborator

@JamesHenry JamesHenry commented Sep 11, 2023

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.

@vercel
Copy link

vercel bot commented Sep 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2023 4:21pm

@@ -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']> {
Copy link
Collaborator Author

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

Copy link
Collaborator

@isaacplmann isaacplmann left a 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.
Copy link
Collaborator Author

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/generators/utils/deprecated.ts Outdated Show resolved Hide resolved
packages/nx/src/utils/command-line-utils.ts Outdated Show resolved Hide resolved
e2e/release/src/release.test.ts Outdated Show resolved Hide resolved
e2e/release/src/release.test.ts Show resolved Hide resolved
e2e/release/src/release.test.ts Show resolved Hide resolved
packages/nx/src/command-line/release/release.ts Outdated Show resolved Hide resolved
Copy link
Member

@AgentEnder AgentEnder left a 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 🎉

Comment on lines +28 to +33
"currentVersionResolver": {
"type": "string",
"default": "disk",
"description": "Which approach to use to determine the current version of the project.",
"enum": ["registry", "disk"]
},
Copy link
Contributor

@edbzn edbzn Sep 15, 2023

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.

Copy link
Collaborator Author

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.

Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

@JamesHenry JamesHenry Sep 17, 2023

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

@ajitzero
Copy link

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.

@JamesHenry
Copy link
Collaborator Author

@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.

@pi0
Copy link

pi0 commented Sep 17, 2023

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 :)

@JamesHenry
Copy link
Collaborator Author

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

@FrozenPandaz FrozenPandaz merged commit 9116c29 into nrwl:master Sep 18, 2023
3 checks passed
@JamesHenry JamesHenry deleted the alpha-nx-release branch September 18, 2023 19:21
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants