3696 Commits

Author SHA1 Message Date
Caleb Ukle
ecf88a6995
fix(testing): update v14 migration and migrate jest.config.ts to use export default (#10035)
* fix(testing): jest.preset.ts => jest.preset.js

* fix(testing): update to export default

* fix(testing): migration for moving to export default

* fix(testing): add eslint ignore comments for jest config properties

fixes: #10021

* fix(testing): update tsconfig.spec.json for next apps with project parserOptions

fixes: #9982

* fix(testing): prevent renaming root jest preset

fixes: #9973

* fix(testing): update snapshots for export default

* fix(testing): bump migration version to run

* fix(testing): make sure default jest tests pass for various projects

* fix(js): generate correct jest config for --compiler=swc --js
2022-05-11 18:04:29 +00:00
Jason Jean
4dbd6559cf
fix(linter): fix default lint file (#10250) 2022-05-11 16:45:21 +00:00
Jay Bell
93c7ea5f31
cleanup(js): use import instead of require in jest config (#10239)
if we are going to use typescript we might as well use typescript and use import instead of require
for build in modules that support it
2022-05-11 11:18:32 -04:00
Nicoss54
5c995a797f
docs(nxdev): update run-script documentation (#10195) 2022-05-11 11:08:12 -04:00
Alois
e5bde2fe46
fix(linter): Generator creating .eslintrc.json at the root path even when .eslintrc.js already exist (#10080)
* feat(devkit): feat(devkit): don't replace begining undescore when creating file

Underscore is a character usually used for sorting purposes and is absolutely legit. There is no
reason to replace it.

ISSUES CLOSED: #8875

* fix(linter): generator creating .eslintrc.json at the root path even when .eslintrc.js
2022-05-11 11:07:10 -04:00
NejcZdovc
60382f6370 docs(misc): Fixes typo for browserslistrc
Resolves #10230
2022-05-10 16:32:25 -04:00
Chau Tran
512237caf7
feat(core): add nx.json, workspace.json, and project.json JSON schemas (#10228)
* feat(core): add nx.json, workspace.json, and project.json JSON schemas

ISSUES CLOSED: #8574, #2299

* fix(core): add ajv to test generated config files based on JSON schema

* fix(core): only add $schema to project.json if it is standalone and in create mode

* feat(core): add migration to add json schema to config files for 14.2.0

* fix(core): adjust schemas

* chore(core): adjust tests across repo to adhere to JSON schema if generated

* fix(core): construct the json schema object instead of using a boolean flag

* chore(core): add ajv tests for workspacejson and nxjson

* chore(core): remove unnecessary standalone check
2022-05-10 15:05:26 -05:00
Jack Hsu
fecbb81120
fix(react): set mode correctly when serve --prod is used (#10235)
Fixes #10199
2022-05-10 09:56:42 -04:00
Katerina Skroumpelou
e674be7dcb
fix(storybook): optional chain some options (#10232) 2022-05-10 10:58:10 +00:00
Craigory Coppola
6025ce57ae
fix(core): migrate should not fail under certain circumstances (#10225)
Closes #10144
2022-05-10 00:06:20 +00:00
James Garbutt
99252cccfa
fix(react): aliases should be an array in schematics (#10198) 2022-05-09 23:58:51 +00:00
Ilya Zyablitsev
fdd7479465
fix(core): migrate should not fail if dependencies section doesn't exist (#10202) 2022-05-09 17:16:22 -04:00
Jack Hsu
23f6d5492c
fix(react): SWC compiled code should include react jsx runtime (#10220)
Fixes #8869
2022-05-09 12:32:08 -04:00
Leosvel Pérez Espinosa
25035927d6
fix(angular): handle packages with no exported package.json when collecting secondary entry points for mf builds (#10216) 2022-05-09 15:43:54 +01:00
Colum Ferry
e7074617be
fix(angular): module federation generation should match react (#10214) 2022-05-09 15:31:57 +01:00
Leosvel Pérez Espinosa
425adf1d00
feat(react): add support for passing additional shared dependencies in the module federation config (#10169) 2022-05-09 09:00:31 -04:00
Stian Morsund
eb4243bc87
feat(angular): add flag for skipping the postinstall script in relevant generators (#10208) 2022-05-09 12:48:41 +01:00
Colum Ferry
b51327111f
fix(angular): eagerly load default packages (#10207) 2022-05-09 11:28:00 +01:00
Colum Ferry
38345dae3a
fix(angular): remote failing to serve should fail host serve (#10181) 2022-05-09 09:36:36 +01:00
Jon Hammerskov
0ec1a628dc
fix(core): if git hash-object reports fewer hashes than requested - log one of the missing files (#10134)
When executing parallel targets using e.g. run-commands missing entries in .gitignore
may lead to
temp files being passed to "git hash-object"
which when git executes have been deleted
resulting in
mismatch between number of files requested and hashes returned.
git reports the error and this PR
will make sure that report is passed
in the error thrown.
This will make problem resolution a lot
faster.

ISSUES CLOSED: #9946
2022-05-06 18:06:52 -04:00
Phillip Barta
0cc7042beb
chore(repo): updated dependency fs-extra to ^10.1.0 (#9985) 2022-05-06 17:56:19 -04:00
Miroslav Jonaš
e5fd269511
fix(core): list only changed files on format:write log (#10155) 2022-05-06 17:10:18 -04:00
Daniel Grant
63006b791a
fix(js): .swcrc path option should follow existing conventions (#10127)
Co-authored-by: Craigory Coppola <craigorycoppola@gmail.com>
2022-05-06 13:46:13 -04:00
Jack Hsu
c4e5b7c7c0
fix(react): host server exits when one of the remotes fail (#10185) 2022-05-06 12:41:40 -04:00
Denis Frenademetz
5dc5429632
fix(testing): 14.0.0 jest migration errors when additional configurations are specified 2022-05-06 08:34:04 -05:00
Stian Morsund
d6f49ea624
fix(angular): support skipPackageJson for library generation (#10179) 2022-05-06 09:08:52 +01:00
Leosvel Pérez Espinosa
5c94d6222f
fix(angular): add missing skipImport option to the component generator (#10167) 2022-05-06 08:57:20 +01:00
Victor Savkin
53460849a2 feat(core): introduce an explicit variable for deciding on how output is printed 2022-05-05 17:22:22 -04:00
Miroslav Jonaš
c9e28a183e
chore(core): cleanup create-nx-workspace from obsolete code (#10174) 2022-05-05 15:31:19 -04:00
Miroslav Jonaš
43ac1f9c43
fix(core): fix broken cnw with pnpm v7 (#10175) 2022-05-05 19:31:11 +00:00
Colum Ferry
77cc38a624
fix(angular): use fork in file-server for http-server (#10161) 2022-05-05 16:08:04 +01:00
Leosvel Pérez Espinosa
67e233d8d7
fix(react): remove collected dependency from module federation shared config when not found in package.json (#10157) 2022-05-05 10:43:37 -04:00
Leosvel Pérez Espinosa
b8c175f5e0
feat(angular): add support for passing additional shared dependencies in the module federation config (#10156) 2022-05-05 15:08:55 +01:00
Leosvel Pérez Espinosa
0a1e82210d
fix(angular): expand extends property when reading nx.json in the angular cli adapter (#10165) 2022-05-05 15:05:16 +01:00
Juri Strumpflohner
e8be46986d
docs(nxdev): adjust syntax highlighting lang for javascript & typescript (#10152) 2022-05-05 09:33:00 -04:00
Lucas Vieira
6d4f971722
fix(js): add missing projectType property to @nrwl/js:library generator (#10159) 2022-05-05 09:18:13 -04:00
Leosvel Pérez Espinosa
e212cb9fe1
fix(angular): fix collecting secondary entry points for module federation builds (#10129) 2022-05-05 09:14:56 +01:00
Jason Jean
8b810879d2
fix(core): add tao to package group (#10148) 2022-05-04 22:43:40 +00:00
Daniel Harvey
8e4a38e764
fix(core): skip dependencies already added (avoid circular dependencies) (#9744)
* fix(core): Skip dependencies already added (avoid circular)

The project utility method `collectDependentProjectNodesNames()`
produces a stack overflow (e.g. producing project dependencies for
`tailwind.config.js` when circular dependencies exist.

Fix by adding loop detection for "already add" dependencies.

* cleanup(core): Correct formating

* chore(core): add test for circular dependencies in getSourceDirOfDependentProjects

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2022-05-04 22:16:17 +00:00
Jay Bell
4a91966cb4
feat(core): expose hash file function in hasher (#10146) 2022-05-04 17:52:35 -04:00
Craigory Coppola
27d7eebbcd
fix(core): update run-migrations log message (#10137) 2022-05-04 17:48:29 -04:00
Jason Jean
ac8ebed1c8
fix(core): add dependency from workspace to devkit (#10147) 2022-05-04 21:27:31 +00:00
Colum Ferry
1d3becac90
fix(angular): kill ports correctly (#10142) 2022-05-04 20:08:34 +01:00
Daniele Tortora
664df0e849
feat(js): add --includeBabelRc flag for @nrwl/js:library generator (#8793, #8600) (#10055)
* fix(js): fix(js): adding missing babelrc for tsc compiled libraries

ISSUES CLOSED: #8600, #8793

ISSUES CLOSED: #8600, #8793

* feat(js): adds the --skipBabelConfig flag to prevent .babelrc file generation

ISSUES CLOSED: #8600, #8793
ISSUES CLOSED: #8600, #8793

* feat(js): adds the --includeBabelRc flag to the library generator

adds the --includeBabelRc flag to the library generator, and a mechanism to automatically detect the
nrwl/web plugin, which requires auto-generation of the babelrc even when not explicitly set by the
user

ISSUES CLOSED: #8600, #8793
2022-05-04 10:58:34 -05:00
Jason Jean
e4cccfc14d
chore(repo): update nx to 14.1.1 (#10132) 2022-05-04 15:27:43 +00:00
Jack Hsu
14b3419c19
fix(nextjs): update custom server setup so hostname and port are always provided (#10103) 2022-05-04 14:31:05 +00:00
Jason Jean
95412cfa17
fix(misc): fix incorrect nx imports (#10131) 2022-05-04 14:24:31 +00:00
Ben Ezard
9fc0a18cae
feat(core): mark implementation packages as affected if their corresponding type declaration package is updated (#10083) 2022-05-03 18:21:14 -04:00
Craigory Coppola
7d9397f2f1
fix(nx-plugin): e2e project paths should be normalized (#10123) 2022-05-03 21:26:48 +00:00
Victor Savkin
821fc07723 chore(repo): format fixes 2022-05-03 14:35:18 -04:00