341 Commits

Author SHA1 Message Date
Craigory Coppola
6948ffdcff fix(core): project graph should be read from executor context
These changes lower the risk of reading the cache during a write operation when multiple
processes are actively writing / reading the cache.
2022-08-19 12:50:07 -04:00
Craigory Coppola
458fc36014
chore(misc): split create tree with empty workspace to remove parameter (#10188)
* feat(devkit): split create-empty-tree to different functions

* chore(repo): apply migration for createEmptyTree

* cleanup(misc): fix tests that migration misses
2022-08-11 19:24:04 -04:00
Colum Ferry
f4ce897128
fix(devkit): do not duplicate dependencies (#10921) 2022-08-03 12:23:25 -04:00
Leosvel Pérez Espinosa
6f2d5243c5
cleanup(misc): replace usage of rxjs-for-await (#11182) 2022-07-22 15:28:45 -04:00
Phillip Barta
fc16d6228d
cleanup(devkit): use Mode type from fs for Tree permissions (#11188) 2022-07-19 12:58:23 -04:00
Miroslav Jonaš
62bae5a120
feat(core): make npmScope optional (#10018) 2022-06-23 10:57:54 +02:00
Jason Jean
5b17335f4d Revert "feat(core): support nested ignore files (#10455)"
This reverts commit 36d8ee26c430def7b68b123d1b87b792928411d2.
2022-06-13 13:16:05 -04:00
Gabriel Terwesten
36d8ee26c4
feat(core): support nested ignore files (#10455) 2022-06-10 14:05:41 -04:00
Craigory Coppola
c9897c61e6
fix(core): swc should be an optional peer dependency (#10461) 2022-05-26 12:09:27 -04:00
Craigory Coppola
e439718059
fix(devkit): parseTargetString should support targets with colons in the name (#10400) 2022-05-20 16:12:35 -04:00
Chau Tran
17c40229a7
fix(js): format .lib.swcrc file with nx format (#10254) 2022-05-16 10:19:49 -04:00
Alois
0bd08cccba
fix(devkit): don't replace begining undescore when creating file (#9870)
Underscore is a character usually used for sorting purposes and is absolutely legit. There is no
reason to replace it.

ISSUES CLOSED: #8875
2022-04-29 14:17:14 -04:00
Jason Jean
5e23c07077
fix(core): automatically add root to the project.json projects (#9977)
* fix(core): automatically add root to the project.json projects

* chore(core): move project-configuration generator utils to nx package

* fix(core): add migrations to remove root
2022-04-28 13:24:35 -04:00
Jason Jean
3d563685d1
fix(core): fix having multiple versions of nx/devkit (#9998) 2022-04-26 14:39:18 -04:00
Craigory Coppola
b225d98aaa
fix(devkit): remove from package-json should pass when dev dependencies null (#9903)
Closes #9877
2022-04-20 16:54:44 -04:00
William Neely
af37fe9125
docs(devkit): name is returned unmodified (#9418)
the docs for the names function say that the name is modified to hyphenated case but it's actually returned unmodified
2022-04-04 14:40:41 +00:00
CommanderRoot
05a9544806
cleanup(misc): replace deprecated String.prototype.substr()
* cleanup(misc): replace deprecated String.prototype.substr()

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>

* fix(js): fix slice change

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2022-04-01 23:04:26 +00:00
Leosvel Pérez Espinosa
18776f6764
feat(angular): update ng-add generator so the migration result is more aligned with new nx workspaces (#9630) 2022-03-31 16:30:06 +01:00
Victor Savkin
428106f6be
cleanup(core): create more meaningful file structure in nx package (#9621) 2022-03-31 09:07:22 -04:00
danjor
c2c3cf58ba
fix(devkit): add missing parameter to prettier getFileInfo (#9577)
Co-authored-by: Jordan CALVI <jordan.calvi.external@atos.net>
2022-03-29 10:14:52 -04:00
Victor Savkin
d4b5c30eba
cleanup(core): remove the indirection left after inlining ta… (#9469) 2022-03-23 22:18:17 -04:00
Victor Savkin
6f038e7a4a feat(core): reorganize packges to consolidate all cli-related code in nx 2022-03-14 16:42:51 -04:00
Leosvel Pérez Espinosa
081ff42955
fix(angular): handle newProjectRoot correctly when generating apps and libs (#9255) 2022-03-10 13:09:04 +00:00
Leosvel Pérez Espinosa
acc29e9593
fix(misc): support workspaces using a root tsconfig.json instead of tsconfig.base.json (#9195)
* fix(misc): support workspaces using a root tsconfig.json instead of tsconfig.base.json

* cleanup(angular): address pr feedback
2022-03-09 11:30:26 -05:00
Jason Jean
5964379bc9
feat(core): use package manager workspace globs to find projects (#9131) 2022-03-02 16:03:21 -05:00
Leosvel Pérez Espinosa
e677a1d82d
fix(devkit): fall back to the target default config when reading target options and the config is not provided (#8932) 2022-02-25 09:18:27 +00:00
Miroslav Jonaš
b251234af9
feat(core): use stricter types for project graph node references (#8813) 2022-02-16 11:45:04 +01:00
John Woodruff
9a0db6a61e
fix(angular): newProjectRoot key is removed on Angular CLI conversion (#8865)
When converting an Angular CLI project to an NX Workspace, the newProjectRoot key needs to be removed
from the angular.json to ensure generators function properly.

Closes #8851
2022-02-08 09:24:48 +00:00
Victor Savkin
4e474773bf
Revert "feat(core): show dep types in dep graph (#2760) (#8132)"
This reverts commit 31bb2f36261fdf222e9e8e962227dcd911dfee66.
2022-01-25 15:23:25 -05:00
David Nunez
3d36169b49
fix(core): need to read in any base nx.json when building a workspace (#8333)
* fix(core): need to read in any base nx.json when building a workspace

* chore(core): remove changes to ngcli-adapter and cleanup nx extension

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2022-01-24 18:46:36 -05:00
MaximSagan
31bb2f3626
feat(core): show dep types in dep graph (#2760) (#8132) 2022-01-18 10:20:09 -07:00
Victor Savkin
57593f5df7 feat(core): add the ability to remove edges in the graph 2021-12-22 12:51:16 -05:00
Craigory Coppola
814061dbff
feat(core): support for extending project inference capabilities (#8210) 2021-12-20 11:18:31 -05:00
Craigory Coppola
ea26751523
fix(core): remove generator should work w/o workspace.json (#8077) 2021-12-09 16:59:51 +00:00
Craigory Coppola
ec24422927
fix(core): package.json should not override project.json during generation of new js apps (#8076) 2021-12-09 11:59:05 -05:00
Craigory Coppola
c04686ab10
feat(core): optional workspace.json file (#7584) 2021-11-30 15:02:06 -06:00
Leosvel Pérez Espinosa
446ef6e552
fix(devkit): handle other variants of root paths in visitNotIgnoredFiles (#7767) 2021-11-17 14:02:54 +00:00
Caleb Ukle
0ca5a88bf1
fix(testing) generated jest ts configs mismatch (#7556)
* fix(testing): add .test. files to spec tsconfig template

add support for .test.ts and with supportTsx .test.{js|tsx|jsx} files
in the tsconfig.spec.json template.

Note each package that excludes testing files will need to be updated to
exclude the new files (coming in future commits)

* fix(angular): add .test.ts support in tsconfigs

add .test.ts in angular jest template
update angular generators to exclude test files

* fix(gatsby): add .test. file prefixes to tsconfig ignore

ignore the new .test.{js|ts|jsx|tsx} files added to jest configs

* fix(react): add .test. file prefix to app/lib tsconfigs

add .test.{ts|js|tsx|jsx} files to be excluded by app/lib tsconfig

* fix(node): add .test. file prefix to app/lib tsconfig

add .test.{ts|js|tsx|jsx} files to be excluded by app/lib tsconfig

ISSUES CLOSED: #7263

* fix(nest): update tests for new .test.ts files in tsconfig

update tests to account for changes in node generators which add .test.ts to the exclude of
tsconfigs

* fix(express): update tests to account for new tsconfig changes

updated snapshots
added new patterns for tsconfig

* fix(linter): update snapshots for new tsconfig changes

snapshot updated to include new .test.ts file changes for tsconfig

* fix(node): update testing to account for spec tsconfig changes

add .test.ts files in e2e tests

* fix(testing): add migration for tsconfig changes

initial migration and test for tsconfig changes

* chore(testing): add to migrations collection

add the update-ts-config-for-test-filenames to migrations

* fix(testing): fix filesystem issue with jest tests

mock readConfig to always return an basic config to prevent issues of not finding a config in non
linux environments, aka missing /root

* cleanup(testing): update error message

update message logged when tsconfig isn't found to mention what was trying to be accompished so it
can be manually updated if desired.
2021-11-05 14:25:25 -05:00
Craigory Coppola
892dfa0bcc
chore(core): fix migration for new config locations (#7390) 2021-10-15 23:45:46 +00:00
Craigory Coppola
bdcbac4445
feat(core): standalone project configuration is default (#7351)
* feat(core): standalone project configuration is default

* chore(core): changes to e2e tests

* fix(core): intuit projects when inside their directories when using project.json files

* chore(core): e2e changes

* fix(core): standalone configurations work with npm-project generator

* chore(core): e2e tests should use standalone configurations

* chore(core): e2e fixes per review
2021-10-16 00:07:12 +02:00
Miroslav Jonaš
b23f2d8b80
feat(core): extract project graph external nodes (#7340) 2021-10-15 10:08:12 -04:00
Craigory Coppola
79cf69b4e4
feat(core): consolidate nx.json and workspace.json (#6642)
* feat(core): consolidate settings between workspace.json + nx.json

workspace.json (and linked project.json files) now contain all project specific settings.
nx.json now contains all settings that affect the whole workspace.

* chore(core): fix angular unit tests w/ new config

* chore(core): fix failing tests

* chore(core): fix formatting

* chore(core): fix more tests

* chore(core): normalize-nx-json feedback

* chore(core): Fix more unit tests

* chore(core): fix remaining tests in workspace

* chore(linter): fix remaining linter tests

* chore(core): fix remaining spec + build issues

* chore(core): formatting fixes

* feat(core): migration script to move config options to new locations

* chore(core): fix e2e tests

* chore(core): run format

* chore(react-native): fix failing tests

Signed-off-by: AgentEnder <craigorycoppola@gmail.com>

* feat(core): move properties to new location during format step

Signed-off-by: AgentEnder <craigorycoppola@gmail.com>

* feat(core): initial pass on ngcli-adapter for property consolidation

Signed-off-by: AgentEnder <craigorycoppola@gmail.com>

* chore(misc): fix tests

Signed-off-by: AgentEnder <craigorycoppola@gmail.com>

* docs(core): update docs with changes

* chore(misc): fix tests

* chore(core): code review changes

updateWorkspaceJson -> updateWorkspace, no longer uses updater function

Signed-off-by: AgentEnder <craigorycoppola@gmail.com>

* chore(core): fix bug in ngcli impl

* fix(core): fix bug in ngcli-adapter

Signed-off-by: AgentEnder <craigorycoppola@gmail.com>

* fix(core): fix ngcli-adapter

Signed-off-by: AgentEnder <craigorycoppola@gmail.com>

* chore(core): fix workspace e2e

* chore(core): fix nx-plugin e2e

* fix(core): move defaultProject to nx.json

* chore(core): fix broken workspace test

* chore(core): formatting

* chore(core): fix workspace format

* chore(core): add nxJson to ExecutorContext

Signed-off-by: AgentEnder <craigorycoppola@gmail.com>

* chore(core): remove all references ot `NxProjectConfiguration` from our code

* chore(core): Review Changes

* fix(core): update new config locations v13 migration
2021-10-14 10:42:47 -04:00
Leosvel Pérez Espinosa
301e11660a
fix(core): ensure workspace version format is respected when making changes to it (#7043) 2021-10-12 15:05:16 -04:00
Victor Savkin
18c8e371ad feat(core): compute all workspace files incrementally 2021-10-12 12:10:13 -04:00
Victor Savkin
a81fbbac1b feat(core): clean up daemon server 2021-10-11 12:56:43 -04:00
Craigory Coppola
8435bdfb6f
feat(core): shift from 'master' to 'main' as default branch and base (#7111)
* chore(core): fix some broken tests

* docs(core): update docs to represent master -> main

* chore(core): review changes

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>

* chore(core): add migration script for backwards-compat w/ main default.

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2021-10-08 16:48:02 -04:00
Leosvel Pérez Espinosa
c21835d40a
fix(devkit): move files to a directory using normalized paths to handle windows correctly (#7264) 2021-10-06 17:42:36 +01:00
Juri Strumpflohner
83a6ffb47a
fix(nxdev): verify whether srcFolder passed to generateFiles exists (#7219) 2021-10-04 11:30:02 -04:00
AgentEnder
3a9910e311 fix(devkit): normalizePath should not be dependant on host OS
Currently, we split on path.sep in normalizePath. This results in differing results based on if the host file system is unix or windows. I
would expect that normalizePath(...) should return the same result wether or not it was executed in windows.
2021-09-28 11:37:03 -04:00
AgentEnder
8f9da7c762 fix(core): read v2 workspace format in converted nx generators
closes #6452
2021-09-15 11:54:03 -04:00