14186 Commits

Author SHA1 Message Date
Phillip Barta
f015dd7527
cleanup(react-native): use native fetch for isPackagerRunning check and remove node-fetch dependency (#29568)
Removes the `node-fetch` dependency and uses the native fetch global for
the `isPackagerRunning()` check

## Current Behavior
- Dependency `node-fetch` is used.

## Expected Behavior
- Removed the `node-fetch` dependency.
- Used the native `fetch` global.


---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-01-28 11:03:05 +00:00
Leosvel Pérez Espinosa
626c514a99
feat(misc): replace ts-jest transformer with @swc/jest for ts solution setup (#29763)
## Current Behavior

## Expected Behavior

## Related Issue(s)

Fixes #
2025-01-28 11:51:25 +01:00
Juri Strumpflohner
5127c15871
feat(nx-dev): refactor and improve style of video-player (#29749) 2025-01-28 00:14:56 -08:00
Jack Hsu
e0c49d3627
fix(testing): infer correct file output paths for atomized targets (#29766)
There is a bug when `outputFile` is specified in `playright.config.ts`,
and atomizer is enabled via `ciTargetName`, then the path of the output
file is wrong.

For example, if you have this reporters entry:

```
reporter: [
  [
    'junit',
    {
      outputFile: 'dist/report.xml',
    },
  ],
],

```

Then the atomized output file would be something like
`dist/report.xml/example-spec-ts`, where `report.xml` is a directory.
The correct output file should be `dist/example-spec-ts/report.xml` to
avoid conflict with the non-atomized output of `dist/report.xml`.

## Current Behavior
If you run `nx e2e proj` then `nx e2e-ci proj` then you can run into an
issue where `report.xml` (or whatever the file name is) is a directory
in the cache, but it is a file currently -- or vice versa. This happens
due to the bug described above.

## Expected Behavior

The `outputFile` should never cause a conflict where a path should be a
directory but is currently a file, or vice versa.

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

Fixes #
2025-01-27 20:32:41 -05:00
Jason Jean
82c4e17b05
chore(repo): remove leftover debugging logs and update migrations docs (#29765)
<!-- 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 -->

Left a log by accident.
`master` is broken because of migrations misalignment..

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

Log is removed
migrations docs are aligned.

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

Fixes #
2025-01-27 14:23:35 -05:00
Isaac Mann
84387f3611
feat(nx-dev): generate migration detail pages (#29580)
Generates list of migrations on the plugin overview page and a
standalone `/migrations` page.

To add sample code changes for a migration that has an implementation
file, create a `.md` file with the same name as the implementation file
in the same folder as the implementation file. i.e.
`move-cache-directory.md` for `move-cache-directory.ts`.

Migrations that have `packages` defined will have a table generated with
the package updates listed.

Separate PRs will be created to add sample code changes for each
migration with an implementation.

The migration list on the plugin overview page: [Angular
migrations](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular#migrations)
Standalone migration list page: [Angular
migrations](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular/migrations)
Sample migration with added markdown file details:
[17.0.0-move-cache-directory](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/nx#1700movecachedirectory)
Sample migration with only package updates: [Angular
20.4.0](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular#2040packageupdates)
Sample migration without any markdown file details:
[update-angular-cli-version-19-1-0](https://nx-dev-git-docs-migration-details-nrwl.vercel.app/nx-api/angular#updateangularcliversion1910)
- This last sample is very bare-bones and the reason why we need these
pages in the first place. People don't know what migrations are actually
doing. Follow up PRs will address pages like this.
2025-01-27 13:17:36 -05:00
Jason Jean
4a9508b368
feat(core): add pre and post run apis (#29636)
<!-- 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 specific API for running things before and after tasks run.

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

This PR adds an API akin to npm's `preinstall` and `postinstall`.

Plugins can now specify `preTasksExecution` and `postTasksExecution`
functions which run before and after Nx runs tasks respectively.

```ts
import type { PreTasksExecutionContext, PostTasksExecutionContext } from '@nx/devkit';

interface PluginOptions {
  field: any;
}

export function preTasksExecution(options: PluginOptions, context: PreTasksExecutionContext) {
  console.log('prerun')
}

export function postTasksExecution(options: PluginOptions, context: PostTasksExecutionContext) {
  console.log('postrun', context.taskResults)
}
```

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

Fixes #
2025-01-27 12:09:43 -05:00
Jack Hsu
f02a88a72c
Revert "fix(core): support subpath exports when constructing the project graph" (#29762)
Reverts nrwl/nx#29577

There is an issue with workspaces using tsconfig path alias, and when an
invalid import is found, it'll match on the wrong package due to the
name matching the prefix.
2025-01-27 11:52:28 -05:00
Phillip Barta
7df5737e12
feat(node): upgrade express to v4.21.2 to address security vulnerabilities (#29419)
<!-- 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
-->
Nx should install and depend on a version of express without security
vulnerabilities.

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

Fixes #

Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com>
Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-01-27 11:49:20 -05:00
Leosvel Pérez Espinosa
1a13a67982
fix(misc): generate remix libs correctly and install correct @types/react version for react libs (#29760)
- Fix server file location for the `@nx/remix:library` generator
- Do not error when generating a buildable Remix library in the TS
solution setup
- Install the correct versions of react-related packages when generating
a React library

## Current Behavior

## Expected Behavior

## Related Issue(s)

Fixes #
2025-01-27 10:28:48 -05:00
Zachary DeRose
9f7120a228
Typescript project references article (#29698)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2025-01-27 08:53:00 -05:00
Maksym Polupan
655342ba11
fix(nuxt): correct webServerAddress and webServerCommand options in add-e2e.ts generator. (#29713)
## Current Behavior
Currently, the add-e2e.ts generator has redundant lines for the
webServerAddress and webServerCommand configuration when generating
Playwright configuration.
Produces `TypeError: Invalid URL` when running playwright tests on a
clean create-nx-workspace project.

## Expected Behavior
The generator should configure webServerAddress and webServerCommand
correctly. The changes fix the configuration generation for Playwright
tests.
2025-01-27 13:08:26 +00:00
Igor Loskutov
1f69dce067
feat(node): update app generator for fastify to the next major v5 (#29589)
## Current Behavior
`npx create-nx-workspace`, when fastify is chosen, generates fastify 4
boilerplate

## Expected Behavior
fastify bumped their major version, and many latest plugins require v5
(e.g. [cors](https://github.com/fastify/fastify-cors))

## Related Issue(s)
no

- the combination of versions works on my setup
- the combinations of versions is the latest at the moment

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-01-27 12:29:12 +00:00
AdrianDuan
2c607951f7
fix(rspack): fix error with 'TypeError: userDefinedConfig is not a function' (#29514) (#29515)
<!-- 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. -->

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

Fixes #29514

---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-01-27 12:29:02 +00:00
Hassan Khan
ed186fd2c3
fix(detox): use a version of Detox that works with React Native 0.76/Expo v52 (#29679)
## Current Behavior

After adding `@nx/detox` to a newly-generated project, Detox E2E apps
will either fail to build or run with intermittent crashes on Android.

## Expected Behavior

Detox E2E apps should run as they normally did with React Native
0.74/Expo v51.
2025-01-27 10:38:00 +00:00
ilovemoon
4100515e78
chore(js): update dep babel-plugin-macros to ^3.1.0 (#28649)
<!-- 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 -->

```bash
@coreproject-moe/monorepo@ /home/moonlitgrace/Projects/coreproject-monorepo
├─┬ @coreproject-moe/icons@0.0.65 -> ./packages/icons
│ └─┬ jest-config@29.7.0
│   └─┬ jest-circus@29.7.0
│     └─┬ dedent@1.5.3
│       └── babel-plugin-macros@2.8.0 deduped invalid: "^3.1.0" from node_modules/dedent
└─┬ @nx/js@20.0.5
  └── babel-plugin-macros@2.8.0
```

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

No conflicts, without overriding `package.json`

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

Fixes #28620
2025-01-27 10:20:29 +00:00
Jason Jean
a8aba61e0b
chore(repo): update nx to 20.4.0-beta.2 (#29752)
<!-- 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 -->

This repo uses Nx 20.3.0-rc.0

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

This repo uses Nx 20.4.0-beta.2

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

Fixes #
2025-01-25 23:55:07 -05:00
saintfirewater
15fc599a10
docs(core): run run to run (#29516) 2025-01-24 23:22:38 +04:00
Juri Strumpflohner
1c8b3b3fb9
docs(nx-dev): fix broken links to Nx Cloud runs (#29747) 2025-01-24 16:08:34 +01:00
Leosvel Pérez Espinosa
8d9234b385
feat(misc): prompt for unit test runner when creating a workspace using --workspaces flag (#29743)
## Current Behavior

Creating a new workspace does not prompt for the unit test runner.

## Expected Behavior

Creating a new workspace should prompt for the unit test runner.

For now, this new behavior will be behind the `--workspaces` flag.

## Related Issue(s)

Fixes #
2025-01-24 10:03:57 -05:00
Leosvel Pérez Espinosa
86798a286e
fix(testing): finish dev server async generator in cypress executor (#29689)
<!-- 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 -->

Running an e2e task using the `@nx/cypress:cypress` executor that starts
a dev server by running another task that uses the `@nx/js:node`
executor result in the process to hang after the e2e tests have finished
running.

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

The async generator returned by starting the dev server and consumed by
the `@nx/cypress:cypress` executor should be finished, and the
`@nx/js:node` executor should properly clean up its child process once
the generator is finished.

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

Fixes #29571
2025-01-24 10:03:10 -05:00
Leosvel Pérez Espinosa
b0d4ac64d7
Revert "fix(core): collect all logs from forked processes (#27778)" (#29740)
This reverts commit c3709b2b84057166cbb94d3ce5cfc3de17252d35.

The change can result in tasks hanging when underlying processes are not
properly managed (can be processes created from third-party plugins or
user's code). A hanging task is a more serious issue than what this was
originally solving. We'll revisit this soon.

<!-- 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 #
2025-01-24 10:00:25 -05:00
James Henry
9b7a797e8e
chore(repo): update to powerpack 1.2.3 (#29744) 2025-01-24 18:31:34 +04:00
Ihor
128f21b0bb
fix(devkit): add .riv to binary extension (#29309) 2025-01-24 16:56:18 +04:00
Oliver Yasuna
f3b85bef22
fix(linter): export Options types for enforce-module-boundaries and nx-plugin-checks (#29072) 2025-01-24 16:54:18 +04:00
Phillip Barta
0ce694c9ca
cleanup(rspack): migrate rspack to picocolors (#29562) 2025-01-24 16:48:27 +04:00
Phillip Barta
c8865badac
cleanup(react-native): migrate react-native to picocolors (#29566) 2025-01-24 16:47:49 +04:00
Mads Mætzke Tandrup
3e4f16f8b0
feat(release): allow invalid conventional commits to be considered via custom config (#29658) 2025-01-24 14:29:35 +04:00
Jack Hsu
45847a6754
feat(js): remove nx property from generated package.json files (#29705)
This PR updates our generators to no longer generate with `nx` in
`package.json` by default. The only times it is needed is if you pass
add `tags` or `implicitDependencies` to the project config.

This PR replaces our `projectType` checks to use the `getProjectType`
util from `@nx/js` to prefer the project config, but otherwise will
check for our conventions (e.g. using `exports` for libs,
`tsconfig.lib.json` vs `tsconfig.app.json`).

## Impact
- There shouldn't be any behavioral changes to existing projects that
have explicit `projectType`, `name`, etc. in with `project.json` or
`package.json` (via `nx` property).
- For new projects created under the new TS setup, the `nx` property
will no longer be there. Generators with logic that depend on
`projectType` will now check for `tsconfig.lib.json` and
`tsconfig.app.json` (so all of our generators are covered). If none of
those tsconfig files are found, then we check `package.json`, since
libraries are required to have `exports` to be consumed.
2025-01-23 20:03:28 -05:00
Benjamin Cabanes
ae9aa5ac76
docs(nx-dev): remove webinar notifier & event link (#29737)
Commented out the `WebinarNotifier` in `_app.tsx` and the live event link section in `hero.tsx`.
2025-01-23 15:21:29 -05:00
Nicholas Cunningham
21a1f4e385
feat(rspack): non-inferred targets should work OOTB (#29733) 2025-01-23 10:06:44 -07:00
Leosvel Pérez Espinosa
d6015613f5
feat(misc): use @swc/jest instead of ts-jest for the ts solution setup (#29718)
## Current Behavior

When using the TS solution setup and `jest` is used, `ts-jest` is used
as the transformer in most cases (except when the build compiler is
`swc`). The `ts-jest` transformer doesn't support modern module
resolutions like `nodenext` and it doesn't support TS project references
either.

## Expected Behavior

When using the TS solution setup and `jest` is used, `@swc/jest` should
be used as the transformer in cases where previously `ts-jest` was being
used and regardless of using `swc` as the build compiler.

## Related Issue(s)

Fixes #
2025-01-23 11:59:16 -05:00
Leosvel Pérez Espinosa
4bbbea2def
fix(react): ensure project name is escaped in spec matcher when generating an application (#29732)
<!-- 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 #
2025-01-23 17:55:48 +01:00
Leosvel Pérez Espinosa
9d1c55b80e
fix(nx-plugin): fix plugin generation in ts solution setup (#29730)
<!-- 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 #
2025-01-23 11:43:29 -05:00
Jiří Prokop
bd35ab2892
fix(vite): do not stop the test process of failure in watch mode (#29260)
<!-- 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

When you run `nx run <lib>:test --watch` it only works correctly if
there are no failing tests. In case you have some failing test, the
process finishes immediately after all tests are finished.

## Expected Behavior

Watch mode should work the same as with Jest or when you use `vitest` on
its own.

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

The logic seems to be broken with introduction of
https://github.com/nrwl/nx/pull/27722

Fixes #28050
2025-01-23 08:18:36 -07:00
Jack Hsu
a0cfe88f5f
fix(node): set correct compilerOptions for Nest applications (#29725)
This PR fixes and issue where generating Nest app in the new TS setup
results in a build error due to missing `experimentalDecorators` option
in tsconfig. Decorators are required for Nest to work, but we do not set
it anymore in `tsconfig.base.json` by default.


## Current Behavior
Nest apps are broken

## Expected Behavior
Nest apps work

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

Fixes #
2025-01-22 23:20:25 -05:00
Isaac Mann
8357a2270a
docs(core): project linking concept and recipe (#29652)
Adds two pages:
- Concept page describing two options for [TypeScript project
linking](https://nx-dev-git-docs-workspaces-project-linking-nrwl.vercel.app/concepts/typescript-project-linking)
(workspaces and path aliases).
- Also describes performance benefits of TS Project References that are
possible with workspaces
- Recipe describing how to manually [switch from path aliases to
workspaces project
linking](https://nx-dev-git-docs-workspaces-project-linking-nrwl.vercel.app/recipes/tips-n-tricks/switch-to-workspaces-project-references)
2025-01-22 22:11:06 -05:00
Nicholas Cunningham
7524356180
feat(webpack, rspack): support multiple configurations (#29691)
This pull request includes changes to support multi-configuration mode
for both Rspack and Webpack.

## Currently
Currently our plugin only supports single configurations
```js
module.exports =  { 
  ...config
}
```
Which works in most cases but some applications can have mutliple
configs that serve different platforms.

## Changes
With these changes, the Webpack and Rspack plugins will also support
multi-configuration.
```js
module.exports = [ 
   { ...clientConfig },
   { ...serverConfig }
 ]
2025-01-22 18:50:03 -07:00
James Henry
123602c0d6
chore(repo): latest powerpack 1.2.0 (#29724) 2025-01-23 01:44:32 +04:00
Jonathan Cammisuli
cad265dad6
docs(core): add local cache information for powerpack (#29630)
<!-- 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
-->
Also includes update ENV variables

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

Fixes #
2025-01-22 15:21:28 -05:00
Isaac Mann
c32d2c77f4
docs(core): typescript packages tutorial (#29721)
Renames the NPM workspaces tutorial to TypeScript Packages tutorial and
updates the intro text a bit. The content is all still valid for ts
project references
2025-01-22 14:30:55 -05:00
Jonathan Cammisuli
a9f6ba553a
fix(core): ensure that nx is backwards compatible with older versions of Nx Cloud (#29703) 2025-01-22 09:30:25 -05:00
Juri Strumpflohner
a055f1be36
fix(nx-dev): update request a trial link on pricing page (#29711) 2025-01-22 05:38:07 -08:00
Zach Tindall
3c98a1ca56
fix(core): update yarn-parser to handle yarn v4 syntax for root workspace package (#29452)
<!-- 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 root workspace package is not generated correctly when using Yarn v4

## Expected Behavior
yarn.lock should be created correctly

## Related Issue(s)

Fixes #29451
2025-01-21 17:12:18 -05:00
Jack Hsu
cf206c3928
feat(core): support reading projects under new pnpm workspaces entry + skip writing empty nx property to pacakge.json for non-root projects (#29707)
This PR is a prerequisite to removing `nx` property from `package.json`
files in the new TS setup. It fixes two issues:

1. We always write `nx` property in `package.json` even if it is empty.
This should be done for root projects.
2. Adding an entry to `pnpm-workspace.yaml` is not picked up because
`readProjectConfiguration` only reads the file from disk, not from
virtual `Tree`

This is the next PR to remove the property:
https://github.com/nrwl/nx/pull/29705
2025-01-21 17:11:29 -05:00
Nicholas Cunningham
7f3ca1f094
docs(nx-dev): remove unnecessary directory flag from host & remote generation commands (#29704)
### Changes
Remove `--directory` flag if the arg is provided as a positional. If
provided it will throw errors.
2025-01-21 20:09:22 +00:00
Craigory Coppola
104f06ccb7
fix(core): do not warn about custom tasks runners when explicitly usi… (#29669)
…ng default<!-- 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 #
2025-01-21 14:00:28 -05:00
Emily Xiong
ee135b20a9
feat(core): handle existing plugins failed with imported project (#28893)
<!-- 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
-->
<img width="1025" alt="Screenshot 2024-12-21 at 9 51 18 PM"
src="https://github.com/user-attachments/assets/32815566-c532-4186-bc94-4b017b0a84c2"
/>


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

Fixes #
2025-01-17 15:06:49 -05:00
Nicholas Cunningham
dec21662b6
feat(core): Add ESM support for Eslint config file (#29613)
This pull request includes changes to migrate ESLint configuration files
from CommonJS (`.cjs`) to ECMAScript modules (`.mjs`) as the default.

### ESLint Configuration Generation Changes

The changes also ensure consistent generated eslint configs based on the
base eslint config.
- If the workspace root has an `eslint.config.cjs` or `eslint.config.js`
with `module.exports`. When you create a library or application it will
generate an accompanying config at path
`{projectRoot}/eslint.config.cjs` of the same format.
- If the workspace root has an `eslint.config.mjs` or
`eslint.config.mjs` with `export default`. When you create a library or
application it will generate an accompanying config at path
`{projectRoot}/eslint.config.mjs`.
- If no eslint config is found at the workspace root one will be created
`eslint.config.mjs`
2025-01-17 13:39:45 -05:00
Colum Ferry
a468d72c7f
feat(react): add support for React 19 for new Workspaces (#29286)
## Current Behavior
We currently have no support for React 19, generating only React 18
applications.

## Expected Behavior
Add utils to determine what version of React is installed in the
workspace.
If React 18 is the main version of react installed, continue to generate
React 18 projects.
If React 19 is the main version of react installed, generate React 19
projects.
If no React version is installed or can be determined, generate React 19
projects.
2025-01-17 15:14:48 +00:00