411 Commits

Author SHA1 Message Date
Jason Jean
cfadd7d8cf
Revert "fix(core): addPlugin should not conflict on project.json targ… (#23391)
…ets (#23264)"

This reverts commit 85c89160

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

## 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-05-14 18:01:30 -04:00
Colum Ferry
85c8916087
fix(core): addPlugin should not conflict on project.json targets (#23264)
<!-- 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` -->

## Current Behavior
<!-- This is the behavior we have today -->
Calculating conflicts in target names does not consider if the
project.json defined targets will actually be impacted by the plugin
that wants to be added creating false negatives

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Calculating conflicts should be more accurate

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

Fixes #22476
2024-05-13 10:53:09 -04:00
Mehrad Rafigh
f7dcf433c3
fix(core): include more binary extensions (#22788) (#22861) 2024-05-10 18:50:11 -04:00
Jack Hsu
4106691d33
fix(core): update getLastValueFromAsyncIterableIterator to support AsyncIterables returned from executors (#23229)
When an executor returns an `AsyncIterable` Nx fails because it cannot
read the value using `getLastValueFromAsyncIterableIterator` (which only
supports `AsyncIterableIterator`. This PR updates it to support both so
executors like `@nx/rollup:rollup` will work.


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

## Current Behavior
Running Nx command fails if executor returns `AsyncIterable` e.g. by
calling `createAsyncIterable`.

## Expected Behavior
Nx command succeeds when executor returns `AsyncIterable`.

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

Fixes #23028
2024-05-08 18:07:14 -04:00
Craigory Coppola
cc875a6ac8
fix(devkit): check if includes is actually necessary (#23181)
<!-- 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` -->

## Current Behavior
We run the createNodes function once when converting to inferred
targets, and remove includes if its not needed anymore based solely on
the config files returned.

## Expected Behavior
We run the createNodes function twice, and remove includes if the result
was the same with / without it.

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

Fixes #
2024-05-04 10:01:10 -04:00
Colum Ferry
2526979ab0
fix(devkit): executor-to-plugin-migrator should add // targets hint (#23167)
<!-- 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` -->

## Current Behavior
<!-- This is the behavior we have today -->
When `convert-to-inferred` generators are run, they leave no hints as to
what happened to the targets.
This is usually fine as the person running the generator should know
what it is doing.
However, other team members who may not have been privy to the migration
may be confused when they see an empty project.json


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Add the same `// targets` hint that we generate for plugin-first
projects to help guide users to the PDV to see the targets.

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

Fixes #
2024-05-03 15:27:21 +00:00
Colum Ferry
21d7e9221d
fix(testing): convert-to-inferred generators should add includes only when needed (#23159)
- fix(devkit): executor-to-plugin-migrator should remove includes when
all config files are handled
- fix(testing): cypress convert-to-inferred should add
ciWebServerCommand correctly

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

## Current Behavior
<!-- This is the behavior we have today -->
`includes` are being added to all new plugins that are being added to
nx.json.
It should only be added when not all config files are addressed by the
plugin to be added.

Cypress Convert To Inferred is not creating a `ciWebServerCommand` when
it is possible to do so.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Ensure `includes` is added only when required.
Ensure `cypress:convert-to-inferred` is adding a ciWebServerCommand
correctly


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

Fixes #
2024-05-03 09:50:08 -04:00
Colum Ferry
acd0993f1a
feat(linter): add convert-to-inferred migration generator (#23142) 2024-05-03 17:23:01 +04:00
Colum Ferry
dbad02afe4
fix(testing): convert-to-inferred generator should handle legacy cypress executor (#23151)
<!-- 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` -->

## Current Behavior
<!-- This is the behavior we have today -->
The `convert-to-inferred` generator does not handle
`@nrwl/cypress:cypress`.


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The generator should handle the legacy executor

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

Fixes #
2024-05-02 18:05:59 -04:00
Colum Ferry
11fec5a4e8
fix(devkit): run callback for forEachProjectConfig when target.options is undefined (#23143)
<!-- 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` -->

## Current Behavior
<!-- This is the behavior we have today -->
`forEachExecutorOptions` will not run the callback if `target.options`
is undefined.
This means that even if a target exists with an executor, the target is
not being processed if it does not have `options`.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Run the callback anyway even if `target.options` is undefined

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

Fixes #
2024-05-02 12:20:07 -04:00
Jason Jean
a64a7e2db9
feat(core): cleanup for v19 (#22993) 2024-05-01 12:12:32 -04:00
Colum Ferry
44820f2c4b
feat(testing): add convert-to-inferred migration generator for cypress (#22884) 2024-04-30 12:47:12 -04:00
Colum Ferry
25eeddc338
feat(testing): add playwright generator to convert from executors to plugin (#22784)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2024-04-24 09:06:23 -04:00
Jack Hsu
bc43243498
chore(repo): add eslint and jest plugins to use inferred targets (#22946) 2024-04-23 21:52:13 -04:00
Craigory Coppola
355d5c593d
fix(core): move a few api points to return root maps directly (#22949) 2024-04-23 15:09:48 -04:00
Craigory Coppola
80b55144db
fix(misc): don't clear node_modules require cache (#22907) 2024-04-19 17:41:20 -04:00
Colum Ferry
82145e7d02
fix(core): load config util supports absolute paths on windows (#22837) 2024-04-17 11:32:09 -04:00
Jason Jean
bf206e578e
feat(misc): non conflicting init/add flow (#22791) 2024-04-15 16:45:08 -04:00
Jason Jean
54c42c1725
fix(devkit): update peer dependency on nx to include Nx 19 (#22811) 2024-04-12 18:32:26 -04:00
Craigory Coppola
7a7cbeca44
feat(core): re-enable running plugins in isolation (#22527) 2024-04-09 18:36:33 -04:00
Leosvel Pérez Espinosa
c20e00cab8
fix(misc): handle cwd correctly when generating artifacts with as-provided (#22411) 2024-03-21 12:48:47 -04:00
Leosvel Pérez Espinosa
8baddb5f08
feat(angular): support angular 17.3.0 (#22202) 2024-03-19 14:58:23 -04:00
Jack Hsu
d058c8c0b1
chore(devkit): fix failing devkit test for convertNxExecutor (#22398) 2024-03-19 14:55:43 -04:00
James Henry
1fe5b98f45
fix(linter): refactor pcv3 plugin, expose configFiles on context (#21677) 2024-03-15 16:29:13 -04:00
Jason Jean
c01b566728
feat(core): revert running plugins in isolation (#22246) 2024-03-09 11:30:10 -05:00
Jason Jean
ec12e67e10
fix(core): only start plugin workers once (#22222) 2024-03-08 10:29:37 -05:00
Jason Jean
4484a91bc1
chore(repo): update nx to 18.1.0-beta.3 (#22135) 2024-03-06 12:58:29 -05:00
Leosvel Pérez Espinosa
1731ad890a
fix(misc): do not add includedScripts unless really needed when running nx add (#22180) 2024-03-06 18:28:52 +01:00
Leosvel Pérez Espinosa
876bc94aab
fix(misc): improve package.json scripts handling when running "nx init" and "nx add" (#22168) 2024-03-06 09:39:34 -05:00
MaxKless
4c5654dac7
cleanup(core): rewrite text reference to nx console 'run' button (#21020) 2024-02-26 11:01:31 -05:00
Craigory Coppola
c2581dcf0b
feat(core): execute plugins in isolated processes (#21760) 2024-02-23 13:20:44 -05:00
Emily Xiong
f3cdce0c7a
feat(core): update swc/register (#21755) 2024-02-09 18:09:23 -05:00
Jason Jean
26a815c7df
chore(core): add one off exception for next.js (#21572) 2024-02-02 23:46:02 -05:00
Jason Jean
396ffc4636
feat(core): enable project crystal by default (#21403)
Co-authored-by: Katerina Skroumpelou <sk.katherine@gmail.com>
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
Co-authored-by: Colum Ferry <cferry09@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Emily Xiong <xiongemi@gmail.com>
Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-02-02 03:40:59 -05:00
Jack Hsu
05b0848eb5
feat(devkit): add loadConfigFile function for plugins to use (#21511) 2024-02-01 22:46:04 -05:00
Lukas
857a07d87d
fix(misc): use caret for semver version (#18140) 2024-01-31 19:48:38 +02:00
Craigory Coppola
deb0f1a492
chore(repo): bump deprecation messages to v19 (#21430) 2024-01-30 16:29:05 -05:00
wout junius
946c6a745d
feat(devkit): improving error handeling read target options (#20336) 2024-01-30 18:25:31 +00:00
Colum Ferry
0b3e1f6ec4
feat(core): log to guide users to show details after project generation (#21350) 2024-01-30 10:58:49 -05:00
Kaden Wilkinson
8274f3419d
fix(devkit): fix extractLayoutDirectory typescript types to better reflect allowed params and return value (#15339) 2024-01-29 13:01:14 -05:00
Miroslav Jonaš
7ab0de8f68
fix(core): yargs array-like prompts initial field is number (#21349) 2024-01-26 10:46:05 -05:00
Leosvel Pérez Espinosa
4b88f48a18
feat(angular): support angular 17.1.0 (#20556) 2024-01-26 10:43:16 -05:00
Leosvel Pérez Espinosa
e4758358b0
feat(misc): optionally update package.json scripts in init generators (#21204) 2024-01-22 13:51:41 -05:00
Jason Jean
1ffd6731dc
feat(core): add target defaults in configuration generators rather th… (#21105) 2024-01-17 16:02:47 -05:00
Jack Hsu
253c0ff2ab
feat(devkit): add a flag to keep existing versions when calling addDependenciesToPackageJson (#21123) 2024-01-16 14:24:14 -05:00
Craigory Coppola
2374d8eaba
feat(testing): add create-nodes plugin for playwright e2e targets (#20099) 2023-12-20 16:34:32 -05:00
Benjamin Cabanes
db77ddef8a
chore(repo): update packages readme banner (#20695) 2023-12-11 11:32:42 -05:00
Benjamin Cabanes
5a305d41de
feat(nx-dev): add homepage updates (#20592)
Co-authored-by: Juri <juri.strumpflohner@gmail.com>
2023-12-08 14:40:42 -05:00
Miroslav Jonaš
fe63f856ec
feat(linter): add create-nodes plugin (#20264) 2023-11-30 09:15:08 -05:00
Jason Jean
78ab39b895
feat(testing): allow cypress preset to execute a command for a web server (#20355) 2023-11-27 13:30:01 -05:00