13557 Commits

Author SHA1 Message Date
Colum Ferry
2be7424fc4
docs(angular): add esbuild information to incremental builds (#27952)
<!-- 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 -->
Setup angular incremental builds doc does not contain info on esbuild

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Add information about using incremental builds with angular.
Also callout that the performance gain may not be as effective as it was
with webpack

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

Fixes #27716
2024-09-17 15:17:38 +01:00
Jack Hsu
b92109164e
fix(core): import should be rebasable (#27940)
When users run `nx import` and open a PR with the imported package, they
should be able to use `git rebase --rebase-merges` to update their
branch with latest main.

## Why this matters

If the repo requires the PR to be updated with latest main before merge,
the user must have a way to do this and avoid having to do the import
process all over again.

<!-- 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
Rebase results in git error

## Expected Behavior
Rebase works

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

Fixes #
2024-09-17 09:50:57 -04:00
pralkarz
d38bb78f27
cleanup(js): replace fs-extra with node:fs (#27932) 2024-09-17 15:48:42 +04:00
Colum Ferry
79443ff962
fix(storybook): do not duplicate cacheable operations #27866 (#27951)
<!-- 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 -->
`build-storybook` is being added to cacheable operations multiple times
when the `@nx/storybook:init` generator is being invoked.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Do not add `build-storybook` multiple times

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

Fixes #27866
2024-09-17 14:34:53 +03:00
Leosvel Pérez Espinosa
67ecff198f
fix(js): do not infer typecheck target for root tsconfig.json (#27950)
<!-- 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 -->

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

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

Fixes #
2024-09-17 12:54:30 +02:00
Colum Ferry
81d3529768
docs(nx-dev): add next-gen module-federation deployments blog post (#27892)
- docs(nx-dev): add blog for nx rspack mod fed
- docs(nx-dev): add next-gen module federation deployments blog post

<!-- 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 -->

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

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

Fixes #
2024-09-17 11:49:57 +01:00
Jonathan Gelin
71fe65ffbd
feat(release): support groupPreVersionCommand for release groups (#27474) 2024-09-17 14:23:08 +04:00
Austin Fahsl
786537efa8
fix(release): allow string array for commitArgs and tagArgs (#27797) 2024-09-17 14:19:33 +04:00
Colum Ferry
0a8202aee1
fix(angular): migrations should use correct namedInputs #27899 (#27929)
<!-- 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 -->
Should use correct namedInputs in the migration instead of assuming
'production' is available.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Use the correct namedInputs based on what is listed in `nx.json`

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

Fixes #27899
2024-09-17 10:53:58 +01:00
Leosvel Pérez Espinosa
781f194bd3
cleanup(misc): fix outdated test snapshot (#27948) 2024-09-17 13:25:56 +04:00
Juri
57a201a562 docs(core): update watch command with new example and embed YT video 2024-09-17 09:43:48 +02:00
Benjamin Cabanes
5b34ea58a8
fix(nx-dev): update contributors value (#27944) 2024-09-16 16:39:31 -04:00
Jason Jean
e5f52ca426
fix(core): add flag to disable the db and logs when there are errors … (#27930)
…connecting to the db

<!-- 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 -->

There is no flag to disable the DB and little logs for when Nx fails to
connect to the DB.

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

There is a `NX_DISABLE_DB=true` flag which can be used to disable usage
of the DB. There are more logs which should help us identify what
exactly is failing when connecting to the DB.

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

Fixes #
2024-09-16 16:06:00 -04:00
Nicholas Cunningham
84dcbc80d7
fix(react): Add historyApiFallback to webpack config (#27942)
<!-- 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 -->

Currently, if we generate a react app with `--routing` enabled navigate
to the 2nd page and doing a refresh fails the load.

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

Routing to another page and refreshing should work out of the box.

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

Fixes #23188
2024-09-16 13:52:57 -06:00
Craigory Coppola
581f2fd068
fix(release): ensure default release group has projects on windows (#27933) 2024-09-16 16:59:01 +00:00
Ali Yusuf
2546082852
fix(vite): exit from test if no files found (#27722)
<!-- 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
After running `nx test project` or `nx run-many -t test` with no test
files with `@nx/vite:test` plugin, vitest process exit directly but nx
reporter keep waiting for finish notification which cause to waiting
indefinitely.

vitest reference:

https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/node/core.ts#L409-L413

https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/node/cli/cli-api.ts#L102-L116

console log example:
```bash
nx test project

> nx run project:test


 RUN  v2.0.5 /path/to/project

include: src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}
exclude:  **/node_modules/**, **/dist/**, **/cypress/**, **/.{idea,git,cache,output,temp}/**, **/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*
No test files found, exiting with code 0
```

```bash
nx run-many -t test --no-cache -p project

 NX   Running target test for project project

      With additional flags:
        --cache=false

   →  Executing 1/1 remaining tasks...

   ⠹  nx run project:test
```

## Expected Behavior
`nx test project` should exit directly in case vitest process exit
early.

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

Fixes #
2024-09-16 16:23:33 +01:00
Colum Ferry
d682baea67
fix(angular): dynamic module federation should not reset remoteUrlDefinitions #27793 (#27927)
<!-- 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 the `@nx/angular/mf` file is loaded, it sets `remoteUrlDefinitions
= {}`.
As this is a global, this can lead to erroneous behaviour by resetting
existing definitions. It is also always truthy, breaking logic on
whether urls need to be set or not.



## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The object should be conditionally set if undefined when calling
`setRemoteDefinition`


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

Fixes #27793, #27842
2024-09-16 14:47:31 +01:00
Colum Ferry
a7aab61ec3
fix(remix): vite plugin should be less strict on inference #27884 (#27923)
<!-- 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 -->
The Remix plugin is too strict when finding Remix Vite projects


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The Remix plugin should be more permissive in finding Remix Vite
projects

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

Fixes #27884
2024-09-16 09:08:29 -04:00
Colum Ferry
d7233268d8
fix(angular): add serve static target more intentionally #27854 (#27924)
<!-- 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 -->
The `serve-static` target is being added in the `add-e2e` file, however,
it has uses beyond e2e.



## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The `serve-static` target should be added with more intention

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

Fixes #27854
2024-09-16 13:45:46 +01:00
Colum Ferry
9c218e7606
fix(vite): typecheck infer plugin should use correct inputs (#27922)
<!-- 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 -->
Vite typecheck target is not falling back to default if production does
not exist.
It also does not have an input on typescript itself

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

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

Fixes #
2024-09-16 12:23:56 +01:00
MaxKless
dc821abd52
feat(graph): expose functions to render pdv & error page (#27833)
we have fully isolated graph & error components with a good api but no
way to access them directly from the outside (in console).

This PR adds two functions to the window object so that we can render
the PDV directly instead of needing the entire app with routing and
everything.

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-09-13 14:48:30 -04:00
Emily Xiong
61b3503619
feat(core): able to import gradle project (#27645)
<!-- 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 -->

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

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

Fixes #
2024-09-13 14:28:59 -04:00
MaxKless
5bbaffbda8
feat(core): add metagenerator for convert-to-inferred (#27672)
<!-- 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
The DX to migrate to project crystal isn't great right now - people have
to run `convert-to-inferred` generators manually.

## Expected Behavior
We should provide a smoother way to migrate, so we introduced an
`@nx/workspace:infer-targets` generator that can handle multiple
conversions at once, either for the whole workspace or at a project
level.

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-09-12 20:06:45 -04:00
Jack Hsu
7232b392ba
fix(js): set compilerOptions correctly when loading .ts that targets ESM (#27862)
When we load `.ts` files and the closest `package.json` specifies
`"type": "module"`, then the file may error upon loading. This happens
because we're not setting `compilerOptions` correctly when registering
`ts-node/esm`-- in fact there is no way to pass options through this
hook.

This PR sets defaults on `TS_NODE_COMPILER_OPTIONS` such that the
`module` and `moduleResolution` are correct values for ESM. It also
works for CJS since both `module` and `moduleResolution` check the
closest `package.json` to determine the format.

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

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

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

Fixes #23228
2024-09-12 18:47:15 -04:00
Craigory Coppola
1924bc30b6
fix(core): handleErrors should display error cause if it exists (#27886)
Some error messages are not displaying properly, as they pass their
original message as a cause. While `node` supports this, our
`handleErrors` function was not displaying error causes.

```
"Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
            CreateMetadataError: The "test-plugin" plugin threw an error while creating metadata: cause message
            at /Users/agentender/repos/nx/packages/nx/src/utils/handle-errors.spec.ts:17:29
            at handleErrors (/Users/agentender/repos/nx/packages/nx/src/utils/handle-errors.ts:11:26)
            at Object.<anonymous> (/Users/agentender/repos/nx/packages/nx/src/utils/handle-errors.spec.ts:15:23)
            at Promise.then.completed (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/utils.js:298:28)
            at new Promise (<anonymous>)
            at callAsyncCircusFn (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/utils.js:231:10)
            at _callCircusTest (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:316:40)
            at async _runTest (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:252:3)
            at async _runTestsForDescribeBlock (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:126:9)
            at async _runTestsForDescribeBlock (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:121:9)
            at async run (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:71:3)
            at async runAndTransformResultsToJestFormat (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
            at async jestAdapter (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
            at async runTestInternal (/Users/agentender/repos/nx/node_modules/.pnpm/jest-runner@29.7.0/node_modules/jest-runner/build/runTest.js:367:16)
            at async runTest (/Users/agentender/repos/nx/node_modules/.pnpm/jest-runner@29.7.0/node_modules/jest-runner/build/runTest.js:444:34)
        Caused by: 
            Error: cause message
              at /Users/agentender/repos/nx/packages/nx/src/utils/handle-errors.spec.ts:16:21
              at handleErrors (/Users/agentender/repos/nx/packages/nx/src/utils/handle-errors.ts:11:26)
              at Object.<anonymous> (/Users/agentender/repos/nx/packages/nx/src/utils/handle-errors.spec.ts:15:23)
              at Promise.then.completed (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/utils.js:298:28)
              at new Promise (<anonymous>)
              at callAsyncCircusFn (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/utils.js:231:10)
              at _callCircusTest (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:316:40)
              at async _runTest (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:252:3)
              at async _runTestsForDescribeBlock (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:126:9)
              at async _runTestsForDescribeBlock (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:121:9)
              at async run (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:71:3)
              at async runAndTransformResultsToJestFormat (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
              at async jestAdapter (/Users/agentender/repos/nx/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
              at async runTestInternal (/Users/agentender/repos/nx/node_modules/.pnpm/jest-runner@29.7.0/node_modules/jest-runner/build/runTest.js:367:16)
              at async runTest (/Users/agentender/repos/nx/node_modules/.pnpm/jest-runner@29.7.0/node_modules/jest-runner/build/runTest.js:444:34)"
    `
```
2024-09-12 17:02:13 -04:00
James Henry
68eeb2eeed
feat(linter): create new workspaces with ESLint v9 and typescript-eslint v8 (#27404)
Closes #27451

---------

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-09-12 16:02:27 -04:00
Craigory Coppola
2e0f374964
fix(misc): createNodesV2 plugins should show inference capabilities (#27896)
<!-- 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
Plugins that export `createNodesV2` are not considered as having
inference capabilities

## Expected Behavior
`createNodesV2` is the future API replacing `createNodes`, so it should
show the same capability

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

Fixes #
2024-09-12 15:59:01 -04:00
Louie Weng
7f7e4d0c4f
fix(nx-cloud): include nxCloudId when generating connect urls (#27882)
<!-- 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 -->

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

NxCloudId should be part of the URL that is created when connecting a
new workspace.

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

Fixes #
2024-09-12 13:57:01 -06:00
Emily Xiong
9c4092de8d
feat(core): use durations from task history to schedule tasks (#27783)
<!-- 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 -->

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

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

Fixes #

Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-09-12 15:53:37 -04:00
Chau Tran
0e603af8a9
docs(nx-cloud): update azure saml setup (#27898)
<!-- 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 -->

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

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

Fixes #
2024-09-12 14:14:08 -05:00
Isaac Mann
514ce17b8c
docs(core): import documentation (#27859)
Create an import project recipe
Creates the import command API reference
Adds the import command to the command landing page
2024-09-12 09:12:24 -04:00
Isaac Mann
4517d9f721
docs(core): nx sync (#27825)
- Adds nx sync to command reference
- Updates nx.json reference
- Update project configuration reference
- Adds a sync generators concept page
- Adds a Register a Sync Generator recipe under Extending Nx Recipes

---------

Co-authored-by: James Henry <james@henry.sc>
2024-09-12 07:30:46 -04:00
Nate Jacobs
b6140d4590
fix(core): respect filenames of inputs when computing task hash (#27873) 2024-09-11 18:30:20 -04:00
Jack Hsu
d8cb932422
fix(webpack): handle relative paths for additionalEntryPath (#27885)
The `NxAppWebpackPlugin` does not support relative paths in
`additionalEntryPoints`.

So this will fail:

```js
new NxAppWebpackPlugin({
  ...
  additionalEntryPoints: ['.src/foo.ts']
```

The resolved path is relative to workspace root when it should be
project root.

<!-- 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
Build will fail.
## Expected Behavior
Build should work.

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

Fixes #
2024-09-11 16:37:25 -04:00
Isaac Mann
43eaa5a348
chore(nx-dev): increase timeout for nx-dev-e2e (#27872)
Increase timeout for nx-dev-e2e tasks
2024-09-11 15:32:52 -04:00
Louie Weng
7da48d022c
docs(nx-cloud): add more information about setting up CI access tokens (#27883)
<!-- 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 -->

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

More graphics for changing and viewing access tokens (both CI and
personal). Also update the CI access token page with more information on
how to set them and the purposes of read-only tokens.

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

Fixes #

---------

Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-09-11 19:28:15 +00:00
Jack Hsu
8b177bd60e
feat(core): import warns when source and destination directories are different (#27875)
This PR adds a warning when the user choose different source and
destination roots. This is a problem for Nx workspaces using path
options in `project.json`, and possibly other config files such as
`tsconfig.json`, `jest.config.ts`, etc.

Note: Also included a guard that the destination directory isn't an
absolute path like `/tmp/foo`, because the behavior will not work as
expected.

The message when the source is an Nx workspace:
<img width="1392" alt="Screenshot 2024-09-11 at 9 32 54 AM"
src="https://github.com/user-attachments/assets/c8ebedba-fd66-4dbf-ada9-eacf86bd67fc">


The message when the source is not an Nx workspace:
<img width="1392" alt="Screenshot 2024-09-11 at 9 30 44 AM"
src="https://github.com/user-attachments/assets/ade9fbd1-4d5d-4d0c-93f6-eaad176af333">
2024-09-11 15:27:55 -04:00
Emily Xiong
24edc5ad99
fix(core): handle --no-interative for create-nx-workspace (#27702)
<!-- 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 -->

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

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

Fixes #
2024-09-11 15:02:59 -04:00
Emily Xiong
2eb5592ac3
fix(gradle): fix gradle app deps (#27865)
<!-- 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 -->

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

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

Fixes https://github.com/nrwl/nx/issues/27819
2024-09-11 14:39:08 -04:00
Jack Hsu
5784b885bd
docs(webpack): add a breaking change for updating webpack-dev-server to v5 (#27604)
<!-- 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 -->

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

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

Fixes #
2024-09-11 10:12:16 -04:00
Philip Fulcher
d6b87e5306
docs(nx-dev): fixes for personal access token blog (#27864)
* Updates screenshot of workspace settings
* Clarifies language around the personal access token
2024-09-11 07:46:17 -06:00
Isaac Mann
5576ba1159
docs(core): changes to login docs (#27863)
- Fixes typo for login/logout on commands landing page
- Mention that `nx-cloud login` is the same as `nx login`
- Update references to `npx nx-cloud login` to use `nx login` by default
instead
- Updates Workspace ID access level wording in the "Nx CLI and CI Access
Tokens" page
2024-09-11 09:12:21 -04:00
Leosvel Pérez Espinosa
2a3307cfad
fix(js): keep refs to ignored files and allow opting out of pruning stale refs in typescript sync generator (#27636) 2024-09-10 20:46:55 +04:00
Leosvel Pérez Espinosa
4986b88bb2
fix(core): handle sync generator failures (#27650) 2024-09-10 20:45:59 +04:00
Isaac Mann
5d039c2dcd
docs(core): reword import help text (#27732)
Updates the help text for the `nx import` command
2024-09-10 12:36:32 -04:00
Zachary DeRose
fd5928406d
docs(misc): turning on PAT blog and adding rspack to changelog (#27856)
<!-- 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 -->

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

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

Fixes #
2024-09-10 11:24:07 -04:00
James Henry
0b81de2639
fix(release): ensure git commits containing pipe can be parsed reliably (#27840) 2024-09-10 18:37:30 +04:00
James Henry
44da27d93d
fix(core): take nx-release-publish target defaults into account for implicit target (#27764) 2024-09-10 18:35:13 +04:00
James Henry
431fe2a021
feat(release): allow local dependency version protocols to be preserved, pnpm publish support (#27787) 2024-09-10 17:56:56 +04:00
James Henry
0c449b449b
fix(release): respect updateDependents being explicitly disabled in conventional commits (#27851) 2024-09-10 16:42:43 +04:00