634 Commits

Author SHA1 Message Date
Patrick P
88ac601798
fix(js): Adds mjs files to prettierrcNameOptions (#21796)
<!-- 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 running a generator, it does not check for the existence of a
prettier.config.mjs or .prettierrc.mjs file

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
When using a generator, it check for the existence of all config file
names specified in the docs.

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


Fixes https://github.com/nrwl/nx/issues/21795

adds .mjs file names to checks
2024-05-10 13:26:34 -06:00
Nicholas Cunningham
0322b9804f
fix(module-federation): Throw an error if remote is invalid (#23100)
If you are generating a remote using `--dynamic` either by using the
`host` generator or the `remote` generator we now check to ensure that
the remote name is a valid JavaScript variable.

If this is not done the app with be invalid and unable to be ran or
bundled.


closes: #23024
2024-05-09 11:19:50 -06:00
Jason Jean
8f705e31e2
fix(misc): adjust deprecation messages to v20 (#23223)
<!-- 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` -->

## Breaking Changes:


BREAKING CHANGE: `nx print-affected` was deprecated in 16.4.0 and has
been removed.
BREAKING CHANGE: `nx affected:graph` was deprecated in 16.4.0 and has
been removed.
BREAKING CHANGE: The `criticalPath` and `affectedProjects` properties of
the JSON created by `nx graph --file graph.json` was deprecated in
16.2.0 and has been removed.

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

Some deprecation messages still reference v19.

`nx print-affected` was deprecated in 16.4.0 to be removed in Nx 19 but
was not removed.
`nx affected:graph` was deprecated in 16.4.0 to be removed in Nx 19 but
was not removed.

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

Deprecation messages reference v20 now.

`nx print-affected` is removed.
`nx affected:graph` is removed.

There are redirects to a `deprecated` page describing those commands for
Nx users using Nx <19

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

Fixes #
2024-05-08 21:54:41 -04:00
Jack Hsu
2e621f324c
feat(misc): v19 cleanup for Nx plugins (#23104)
This PR removes deprecated code that's been slated for removal in Nx 19
- mentioned as `TODO(v19)` comments.

## Breaking Changes

- **CNW:** `create-nx-workspace` no longer support `--preset=empty` and
`--preset=core`, use `--preset=apps` and `--preset=npm` respectively.
Deprecated in Nx 15.9.
- **Next.js:** `NX_` environment variables are no longer bundled into
Next.js apps, use `NEXT_PUBLIC` instead. Deprecated in Nx 16.8.
- **Webpack, Storybook, Esbuild:** `NX_` environment variables are no
longer bundled into browser bundles, use `NX_PUBLIC` instead. This
removes the possibility of intentional bundling of `NX_` variables.
Deprecated in Nx 18.
- **Cypress:** `cypressComponentConfiguration` generator removed from
`@nx/cypress`, use `configurationGenerator`instead. Deprecated in Nx
16.8.
- **Cypress:** `cypressProjectGenerator` generator removed from
`@nx/cypress`, use `configurationGenerator` instead. Deprecated in Nx
15.9.
- **Expo:** `withNxWebpack` removed from `@nx/expo`, use [metro
bundler](https://docs.expo.dev/guides/customizing-metro/)
(https://docs.expo.dev/guides/customizing-metro/) in app.json instead.
There is a migration to handle this in Nx 19. Deprecated in Nx 15.8.

## Deferred to v20

- **JS:** `classProperties.loose` option removed from `@nx/js/babel`
preset, use `loose` instead. Deprecated in Nx 17.0.
- **ESLint:** Low priority task to "deviations from
@typescript-eslint/recommended" for our lint rules. @JamesHenry will
look at this later before Nx 20, but it is unimportant.
- **React:** component testing does not work with Project Crystal, and
we need the executor + built-in webpack configs to run CT. Will do a
follow-up on this after Nx 19 release. Related issue:
https://github.com/nrwl/nx/issues/21546
- **Next.js:** `withStylus` removal from `@nx/next`, use SASS instead.
It hasn't worked, but we kept the file to throw an error when used.
Deprecated in Nx 17.0.
- **Next.js**: `@nx/next:component` and `@nx/next:page` generators to
not derive the `components` and `app`/`pages` directory. Use `nx g
@nx/next:component apps/myapp/components/button` instead. Deprecated in
Nx 17.0.
- **Webpack:** `isolatedConfig` option removal from
`@nx/webpack:webpack` executor. There is a migration to handle this in
Nx 19. Deprecated in in Nx 17.2.
- **Angular:** `executeWebpackDevServerBuilder` removal from
`@nx/angular/executors`, use `executeDevServerBuilder` instead.
Deprecated in Nx 17.0.
2024-05-02 13:37:12 -04:00
Jason Jean
a64a7e2db9
feat(core): cleanup for v19 (#22993) 2024-05-01 12:12:32 -04:00
Craigory Coppola
c09f70f9a0
fix(js): copy assets handler should handle ignore globs on windows (#23065) 2024-04-30 14:14:54 -04:00
Nicholas Cunningham
1f6aba03a1
fix(js): Correct file path for cjs.js (#23081) 2024-04-29 19:54:09 +00:00
James Henry
addde70251
fix(js): typescript plugin target hashing (#23073) 2024-04-29 18:51:32 +01:00
Craigory Coppola
c5df9902b4
fix(js): ignore yarn corepack check when updating config (#23043) 2024-04-26 18:57:02 -04:00
James Henry
526ea7cfdf
chore(js): experimental tsc entrypoint (#22852)
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2024-04-24 10:14:57 -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
Jack Hsu
701c513fd7
feat(js): add swc cli options --strip-leading-paths (#22856) 2024-04-17 14:18:10 -04:00
Jason Jean
2ee965042d
Revert "feat(js): add swc cli options --strip-leading-paths (#22193)" (#22832) 2024-04-15 20:35:58 -04:00
Jason Jean
bf206e578e
feat(misc): non conflicting init/add flow (#22791) 2024-04-15 16:45:08 -04:00
Colum Ferry
7dcd043362
fix(js): do not default to commonjs type field in package.json (#22819) 2024-04-15 15:55:34 +01:00
Philip Fulcher
810a3b5259
docs(release): adjust description for preid to be more clear (#22569) 2024-04-14 19:26:54 +04:00
Austin Fahsl
34cc2f2172
fix(release): do not try to interpolate packageRoot for root project (#22771) 2024-04-11 23:04:26 -04:00
Every
f59ed58ae6
feat(js): add swc cli options --strip-leading-paths (#22193)
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-04-11 10:54:27 -04:00
Nicholas Cunningham
c27a668530
fix(webpack): Should work when absolute paths are supplied as output (#22736) 2024-04-09 09:27:10 -06:00
Jack Hsu
a9e554ff79
fix(js): propagate error from child process to @nx/js:node executor (#22705) 2024-04-05 17:45:04 -04:00
Colum Ferry
1c6118e140
fix(js): append target when generating tmp tsconfig to prevent conflicts #21396 (#22671) 2024-04-05 11:58:15 -04:00
Austin Fahsl
12afa20210
fix(release): respect root .npmrc registry settings for publishing 2024-04-02 13:53:14 -06:00
Altan Stalker
902da5db58
fix(js): update jest snapshot after vite-plugin-dts bump (#22621) 2024-04-02 14:47:19 -04:00
Jack Hsu
82dc70373f
fix(js): handle case where tslib or @swc/helpers are missing from externalNodes (#22523) 2024-03-26 18:05:29 -04:00
Jack Hsu
8f02325136
fix(js): match core-js version with babel options (#22493) 2024-03-25 12:49:13 -04:00
Jack Hsu
61cb63dad2
fix(js): update babel preset to specify minor version of core-js for better optimization (#22433) 2024-03-21 22:09:56 -04:00
Leosvel Pérez Espinosa
8baddb5f08
feat(angular): support angular 17.3.0 (#22202) 2024-03-19 14:58:23 -04:00
Austin Fahsl
cbb88f0d29
feat(release): add conventional commits configurability for version and changelog (#22004)
Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
2024-03-13 18:19:24 -06:00
Austin Fahsl
38179ad278
feat(js): replace publish script with nx release config (#21474) 2024-03-05 17:53:07 -05:00
James Henry
6957937ec4
fix(release): store rawVersionSpec on versionData (#22071) 2024-03-04 13:10:19 -05:00
Austin Fahsl
8bde48fc7a
fix(release): skip lock file update if workspaces are not enabled (#22055) 2024-03-01 10:15:55 -07:00
Craigory Coppola
a89c73483e
feat(core): use flag in nx.json for toggling crystal (#21980) 2024-02-29 15:18:46 -05:00
Leosvel Pérez Espinosa
7879b3fd2e
fix(misc): fix buildable libs utils calculating dependent projects from task graph (#22015) 2024-02-29 12:09:55 -05:00
Jack Hsu
26b266faf4
fix(core): update generated README pages with more useful instructions (#21976) 2024-02-23 16:09:57 -05:00
Colum Ferry
972801ede2
fix(js): swc executor should support inlining on windows (#21801) 2024-02-13 18:48:53 +00:00
Colum Ferry
11e139c7ec
fix(js): nx release-version resolve-version-spec should normalize fetchSpec (#21710) 2024-02-10 13:58:27 +00:00
Emily Xiong
f3cdce0c7a
feat(core): update swc/register (#21755) 2024-02-09 18:09:23 -05:00
Jack Hsu
70ea82d58c
fix(js): babel preset should also check for JEST_WORKER_ID to transpile to CJS (#21754) 2024-02-09 15:49:59 -05:00
James Henry
a568df2934
fix(release): do not stop daemon in dry-run (#21743) 2024-02-09 13:45:21 -05:00
Jack Hsu
f6d2dccd62
feat(linter): add option for @nx/dependency-checks to update workspace dependencies using local file paths (#20157)
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2024-02-02 14:51:49 +02: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
Austin Fahsl
f21b86cff2
fix(release): skip lock file update if yarn classic (#21489) 2024-02-01 11:02:01 -07: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
Dmitry Zakharov
8ee8f3ffc3
chore(repo): bump @babel/core plugin-transform-runtime to 7.23.2 (#20952) 2024-01-30 13:50:29 -05:00
beeman
a9974d3f25
docs(misc): change http:// to https:// (#19534) 2024-01-30 11:33:13 -05: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
Zac Bristow
169a3f56c5
fix(js): allow inlined libs without imports (#20649) 2024-01-30 11:53:09 +02:00
Austin Fahsl
69636ad7ba
fix(release): do not restart the daemon when skipLockFileUpdate is set (#21389) 2024-01-29 23:07:16 +04:00
daiscog
ec38a58a9f
fix(js): fix missing top-level dependencies in publishable libs (#17730) 2024-01-29 12:23:23 -05:00