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

fix(core): add default configuration to nx schema #14298

Merged

Conversation

pvds
Copy link
Contributor

@pvds pvds commented Jan 12, 2023

Current Behavior

The defaultConfiguration property for an executor is missing from nx-schema.json properties.

Setting the defaultConfiguration property in nx.json for an executor does work though.

Expected Behavior

The defaultConfiguration property exists in the nx-schema.json properties you don't get an Property 'defaultConfiguration' is not allowed warning.

core: merge more target options from targetDefaults in release 15.4.3 should have included this change.

Related Issue(s)

Fixes #14214

pvds added 2 commits January 12, 2023 11:03
…g` properties

Ensure `defaultConfiguration` is available in the schema for `nx.json`
so the default `defaultConfiguration` can be set for an executor.

The PR [core: merge more target options from targetDefaults](https://github.com/nrwl/nx/pull/12435/files#diff-60e9fd49c694ec24c2e25e3201eeb2f4be115039b4c78218d74d8b73c7b38490)
released in version 15.4.3 should have included this change.
…nit tests

Ensure `defaultConfiguration` from `targetDefaults` and project `defaultConfiguration` merge behaviour is correct.
@vercel
Copy link

vercel bot commented Jan 12, 2023

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

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Jan 12, 2023 at 11:09AM (UTC)

@pvds
Copy link
Contributor Author

pvds commented Jan 12, 2023

@AgentEnder I checked the nx-json.md documentation file to see whether defaultConfiguration usage should be documented there.

I would suggest to not add any specific documentation because any supported property of an executor in project.json should work in the targetDefaults section of nx.json and there is nothing special to mention about defaultConfiguration in this context.

We could add "defaultConfiguration": "prod", to this configuration code sample in nx-json.md

@AgentEnder AgentEnder merged commit 37e88c5 into nrwl:master Jan 12, 2023
@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 Mar 13, 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.

"defaultConfiguration" missing from "nx-schema.json"
2 participants