Skip to content

Tags: jkossis/nx

Tags

22.5.0-beta.0

Toggle 22.5.0-beta.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(devkit): allow null values in JSON schema validation (nrwl#34167)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

Schema validation (done, for instance, when calling an executor) fails
when an option has value "null" and schema accepts null values. I had it
in a custom executor for `nx-release-publish`, that understands that
`nxReleaseVersionData` is implicitly passed, so I define its schema:
```json
"newVersion": {
  "type": ["string", "null"],
  "description": "The new version of the project, null if no changes detected"
}
```

My code calls `getReleaseClient().releaseVersion(options)`, which gets
me a `projectsVersionData` object with version info. It contains `null`
values (allowed). I then pass it, and ends up in:
```typescript
 // nx/src/tasks-runner/task-orchestrator.ts:531-539                                                                                                                                                                      
  const combinedOptions = combineOptionsForExecutor(                                                                                                                                                                       
      task.overrides,  // ← Contains nxReleaseVersionData with null values                                                                                                                                                 
      task.target.configuration,                                                                                                                                                                                           
      targetConfiguration,                                                                                                                                                                                                 
      schema,           // ← Schema from executor                                                                                                                                                                          
      task.target.project,                                                                                                                                                                                                 
      relativeCwd,                                                                                                                                                                                                         
      isVerbose                                                                                                                                                                                                            
  );
```

which fails inside:
```typescript
 // nx/src/utils/params.js:126-201                                                                                                                                                                                        
  function validateObject(opts, schema, definitions) {                                                                                                                                                                     
      // Line 191-200: Iterate through all properties                                                                                                                                                                      
      Object.keys(opts).forEach((p) => {                                                                                                                                                                                   
          validateProperty(                                                                                                                                                                                                
              p,                              // "nxReleaseVersionData"                                                                                                                                                    
              opts[p],                        // { foo: { newVersion: null, ... }}                                                                                                                                         
              (schema.properties ?? {})[p],   // schema for nxReleaseVersionData                                                                                                                                           
              definitions                                                                                                                                                                                                  
          );                                                                                                                                                                                                               
      });                                                                                                                                                                                                                  
  }
  ```

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR -->

`null` values should be considered, as they are valid in JSON schemas. It was probably not considered, because we never think that `typeof null === "object"`, but it's unfortunately the case.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is merged. -->

I will create one

Fixes nrwl#34169

22.4.1

Toggle 22.4.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Revert "feat(core): add A/B testing variant 1 to skip cloud prompt in…

… CNW (nrwl#34106)" (nrwl#34191)

## Current Behavior

The create-nx-workspace (CNW) command includes A/B testing variant 1
which skips the cloud prompt under certain conditions.

## Expected Behavior

Revert to the previous behavior where the cloud prompt flow is
consistent without the A/B testing variant.

## Related Issue(s)

This reverts commit 2039a5e from PR
nrwl#34106.

22.4.0

Toggle 22.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(core): improve TUI task selection and pane focus behavior (nrwl#3…

…4175)

## Current Behavior

1. When running a task with dependencies (e.g., `nx serve app` where app
depends on app2:serve), the initiating task might not be selected on
startup. Additionally, the auto-select logic could switch selection to
the initiating task at any time when it started running - even minutes
later - which felt "random" to the user.

2. When pressing Enter on an already-pinned task, it would unpin the
task, causing the pane to disappear while focus remained on it
(invisible-but-focused state).

## Expected Behavior

1. The initiating task (the one the user actually requested) should be
selected during init, and selection should never unexpectedly change
later when tasks start.

2. Pressing Enter on an already-pinned task should focus the pane, not
unpin it.

## Changes

- **Select initiating task during init**: Moved initiating task
selection to `init()` in app.rs. This only applies in `RunOne` mode
since in `RunMany` there's no single initiating task to prioritize.
Removed the "switch to initiating task" logic from `start_tasks()` in
tasks_list.rs.
- **Focus pane on Enter**: Changed behavior so pressing Enter on an
already-pinned task focuses the pane instead of unpinning it.

## Related Issue(s)

N/A - discovered during TUI testing

22.4.0-beta.5

Toggle 22.4.0-beta.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(core): add A/B testing variant 1 to skip cloud prompt in CNW (nr…

…wl#34106)

## Current Behavior
CNW always shows the "Try the full Nx platform?" prompt and connects to
Nx Cloud to generate an onboarding URL with a token.

## Expected Behavior
For A/B testing variant 1:
- Skip cloud prompt
- Skip connectToNxCloudForTemplate() - no nxCloudId in nx.json
- Skip readNxCloudToken() - no misleading spinner
- Use GitHub flow for URL generation (accessToken: null)
- Show github.com/new hint when user hasn't pushed

Also fixes:
- Expired cache file bug: now deletes with unlinkSync() instead of
ignoring, which caused 50-50 randomization after 1-week expiry
- Adds variant-X to short URL meta property for cloud analytics

## Related Issue(s)
Closes NXC-3628

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

22.4.0-beta.4

Toggle 22.4.0-beta.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore(repo): update nx to 22.4.0-beta.3 (nrwl#34108)

Updating Nx from 22.4.0-beta.1 to 22.4.0-beta.3

---------

Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>

22.4.0-beta.3

Toggle 22.4.0-beta.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(core): upgrade sysinfo to 0.37.2 and fix cpu measurement accuracy (

…nrwl#34101)

## Current Behavior

CPU metrics collection can report inaccurate values where:

- Individual processes show inflated CPU usage
- Total CPU aggregation across all processes exceeds the system's
maximum available CPU
- This leads to confusing and misleading metrics data  

## Expected Behavior

CPU metrics accurately reflect actual resource usage:

- Process CPU values are accurate
- Total CPU aggregation stays within system limits
- Metrics data is reliable and trustworthy

### Additional Notes

- **Root cause**: When registering a new process, we established a CPU
baseline by refreshing only that single process via `sysinfo`.
Internally, `sysinfo` calculates CPU% as `(process_cpu_time_delta /
wall_time_delta) * 100`. Refreshing a single process updates the wall
time reference but leaves the CPU time baselines of other processes
unchanged. In the next metrics collection, these other processes appear
to have consumed their CPU time over a shorter wall time period (based
on the last baseline), resulting in inflated percentages (e.g., 200%+
for single-threaded processes).
- This PR also improves initialization performance by only loading
necessary system data (processes, CPU, memory) instead of all system
information
- Upgrades `sysinfo` dependency to v0.37.2, which includes upstream CPU
measurement improvements.

---------

Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>

22.4.0-beta.2

Toggle 22.4.0-beta.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
docs(nx-cloud): add missing 2025.07.4-.7 release notes (nrwl#34079)

20.8.4

Toggle 20.8.4's commit message
chore(repo): fix failing nx-dev build due to missing files from master

22.4.0-beta.1

Toggle 22.4.0-beta.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(gradle): resolve dependencies after capturing project tasks (nrwl…

…#34045)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

When processing Kotlin Multiplatform (KMP) projects, the Nx Gradle
plugin encounters ConcurrentModificationException errors because KMP
dynamically modifies the Gradle project's task and configuration
containers during dependency resolution. The plugin was resolving
configuration dependencies before processing tasks, which triggered
KMP's hierarchy finalization and dynamic task creation while the plugin
was still iterating over these collections.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

The Gradle plugin should handle Kotlin Multiplatform projects without
errors by:
1. Processing tasks before resolving configuration dependencies,
preventing KMP from modifying task containers during iteration
2. Creating immutable snapshots of task and configuration collections
before iteration to avoid concurrent modification issues

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes NXC-3633

22.4.0-beta.0

Toggle 22.4.0-beta.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
docs(nx-dev): support .md URLs and llms.txt for AI agents (nrwl#33958)

This PR allows `.md` to be append to any docs URL to return raw markdown
content. Also adds `/llms.txt` that links to each markdown URL in the
docs site.

This allows AI agents to read content without having to parse HTML,
saving tokens.

Preview of `llms.txt`:
https://deploy-preview-33958--nx-docs.netlify.app/docs/llms.txt
Preview of page markdown content:
https://deploy-preview-33958--nx-docs.netlify.app/docs/concepts/buildable-and-publishable-libraries.md

Closes DOC-368