338 Commits

Author SHA1 Message Date
Chau Tran
fba478c362 fix(js): use ts-jest for compiler SWC due to known bug in SWC 2021-12-23 19:56:58 -05:00
Phillip Barta
e57cef0901
cleanup(repo): use devkit instead of devkit reexports from workspace (#7773) 2021-12-21 21:06:31 +00:00
Victor Savkin
88751a3685 chore(repo): clean up the language to match the new tag line 2021-12-17 16:08:38 -05:00
Jack Hsu
6d6f29439d
feat(testing): add --compiler=tsc|swc|babel option for jest project generator (#8177) 2021-12-15 14:27:53 +00:00
Jack Hsu
157c6e0fb0
feat(web): rename @nrwl/web:build to @nrwl/web:webpack (#7952) 2021-11-30 14:22:34 -05:00
James Henry
98ffe8574b feat(linter): support eslint v8 (#7800)
* feat(core): support eslint v8

* fix(core): align version of eslint across all packages
2021-11-19 14:55:33 -05:00
Colum Ferry
d110bc77c0
chore(angular): bump ngrx to 13.0.0 (#7765)
* chore(angular): bump ngrx to 13.0.0

* fix(angular): add path filter to resolver for exports

* fix(testing): add mjs to jest module extensions and add dependency on resolve.exports

Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2021-11-18 10:06:30 +00:00
Jason Jean
18f2e703dd
fix(angular): remove unnecessary addition of module file extensions (#7725) 2021-11-12 16:36:59 -05:00
Caleb Ukle
4c4a5039e8
fix(testing): update tsconfig migration to not warn when no file found (#7689)
* fix(testing): update tsconfig migration to not warn when no file found

use tsconfig.json references to find what other configs need to be updated. if non when we just exit

* fix(testing): update tests for migration changes

* fix(testing): include any spec. file names in pattern match

accounting for _spec. file names when generating 'test' pattern equivalents

* fix(testing): remove relance on tsconfig.references, walk for all tsconfigs to update

tsconfig.references is not always present. instead visit all files and check if they are tsconfig
json file. if so we update the include/exclude properties where a spec. pattern is found. if the
property isn't set then we do not update it.

* fix(testing): stream line update with devkit
2021-11-11 22:53:17 +00:00
AgentEnder
f6a562d1ec chore(repo): migrate to v13.1.4 2021-11-11 15:12:06 -05:00
Colum Ferry
85692e488d
chore(angular): bump jest-preset-angular to rc.3 (#7687)
* chore(angular): bump jest-preset-angular to rc.3

* fix(angular): version string typo

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>

* fix(angular): add mjs to angular jest module extensions

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2021-11-10 14:24:05 +00:00
Jason Jean
e0f08096c4
fix(testing): fix resolver to try using default resolution before using a package filter (#7681) 2021-11-10 09:50:36 +00:00
Jason Jean
f9d9e26882
fix(angular): do not ignore any mjs files for jest (#7670) 2021-11-09 13:44:52 -05:00
Matt
965b11679f
feat(testing): add --testPathIgnorePatterns flag support (#7478)
closes #7462

Co-authored-by: Matt <MattGson>
2021-11-08 13:42:44 -05:00
Colum Ferry
8d6ac4f694
chore(angular): support angular 13 (#7161)
* chore(angular): support angular 13

Support Angular 13

chore(angular): support ng 13 next 11

chore(angular): upgrade tslib dep

chore(angular): update package and ng-packagr-lite executors to align with ng-packagr v13

chore(angular): update test snapshots with ts version

fix(angular): buildable lib tsconfig transform test

* chore(angular): sync ng-packagr changes to the package and ng-packagr-lite executors

* chore(angular): add migrations

* chore(angular): rxjs7

* feat(angular): check rxjs version to install

* feat(angular): update jest resolver to resolve esm

* chore(angular): fix version

* chore(angular): support jest-preset-angular

* fix(angular): tests

* fix(angular): fix e2e tests and add .angular to gitignore

* fix(angular): fix jest transformers ignore pattern

* fix(angular): fix node test

* fix(angular): fix workspace test

* fix(angular): import marble utils from jasmine-marbles instead of @nrwl/angular/testing

* feat(angular): update ngrx to 13.0.0-beta.;0

* fix(angular): temporarily skip test with pnpm

* fix(angular): bump jest-preset-angular to fix jest performance issues

* fix(angular): webpack-browser and server schema changes

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
2021-11-08 12:01:55 -05: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
Jack Hsu
75513d6f8b
chore(repo): add tests to make sure migration factory/implementation are correct (#7541) 2021-10-27 16:12:07 -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
Minijus L
da658e10a7
fix(testing): update Jest to 27.2.x (#7101) 2021-09-30 16:46:45 -04:00
Victor Savkin
d79bba3630 chore(repo): update to nx 12.10 2021-09-20 16:39:13 -04:00
Andrew Luca
fe7c25d00f
chore(misc): add repository directory for all packages.json (#6973) 2021-09-15 11:53:08 -04:00
Craigory Coppola
25519a91ad
fix(testing): fix(testing): support for typescript jest configs (#6920)
ISSUES CLOSED: #5394
2021-09-03 14:40:56 -04:00
Juri
4305c5ef63 fix(testing): jest migration for Angular in 12.4 2021-08-22 12:50:47 +02:00
AgentEnder
c9c8fa7f1c chore(core): project.json should not be included in builds
Signed-off-by: AgentEnder <craigorycoppola@gmail.com>
2021-08-20 20:22:30 -04:00
Jason Jean
6fbf7ffa16
feat(misc): remove ts-node, tslib, and dotenv from empty workspace package.json (#6763) 2021-08-18 17:36:11 -04:00
Gustavo Bini
572e24e466
feat(react): add --changedSince flag to jest runner (#6729) 2021-08-16 16:24:36 -04:00
Leosvel Pérez Espinosa
f3cd6028f7
fix(testing): handle migrating base jest config without projects (#6601) 2021-08-04 17:30:27 +01:00
Jack Hsu
cdb954083e
fix(web): remove unnecessary packages from being installed with @nrwl/web (#6554) 2021-07-30 15:51:43 -04:00
Jack Hsu
bd7b2aadf8
fix(testing): remove installation of babel packages for jest projects (#6546) 2021-07-30 09:36:21 -04:00
Phillip Barta
1b5498f367
feat(core): updated dotenv and switched to import 'dotenv/config' (#5615) 2021-07-29 17:49:23 -04:00
Leosvel Pérez Espinosa
9044a8f869
cleanup(misc): rename collection.json to generators.json (#6442) 2021-07-21 11:42:43 +01:00
Zachary DeRose
f0dbfb0e0c
fix(testing): fixing formatting on root jest.config migration (#6418)
* fix(testing): fixing formatting on root jest.config migration

* fix(test): rm console.log
2021-07-19 18:54:20 +00:00
Jason Jean
9c3d798ecc
fix(testing): fix getting jest config from tree when require is used (#6322) 2021-07-12 15:06:24 +00:00
Zachary DeRose
41234db93b
fix(testing): fixing migration and interop with move generator (#6323)
* fix(testing): fixing move tests and functionality

* fix(testing): fixing migration to no-op if getJestProjects() is already being used

* fix(misc): rming console.log statements
2021-07-09 23:22:55 +00:00
Zachary DeRose
2524fdbc3d
feat(testing): Using getJestProjects() out of the box (#5900)
* feat(testing): updating nx to use getJestProjects() itself

* feat(testing): using getJestProjects() for new workspaces

* feat(testing): accomodating for getJestConfig() when adding new project

* feat(testing): migration for updating the base jest.config.js

* testing...

* fix(testing): fixing formatting in tests and bumping to next version

* fix(testing): fixing broken tests

* fix(testing): fixing test for jest init

* fix(testing): removing unnecessary test in jest project

* fix(testing): updating remove generator to work with jest utility fn

* fix(testing): fixing line break on package.json

* fix(testing): fixing import statement

* fix(testing): using AST to update the jest config contents

* fix(testing): fixing snapshot tests

* fix(testing): fixing describe to 12.6

* fix(testing): adding back in import statement to jest.config.js

* fix(testing): updating generated docs
2021-07-09 16:32:01 -04:00
Miroslav Jonaš
b9d76693b9
chore(repo): update remaining jest dependencies to v27 (#6296) 2021-07-09 19:06:15 +02:00
Craigory V Coppola
442e4fc6a1
chore(repo): convert to project json format (#6286) 2021-07-08 11:36:35 -04:00
Jonathan Cammisuli
d491b3eb66
feat(testing): add batch support for jest (#6234)
* feat(testing): add batch support for jest

* chore(testing): add missing deps

* fix(testing): properly structure the data without reduce

* fix(testing): use results.starttime instead of performance.now

* chore(testing): fix typo

* feat(testing): use overrides to pass to the jest process

* feat(testing): get all configs before building results

* feat(testing): use index to get config
2021-07-06 10:29:55 -04:00
Kyle Bastien
9be7a101d9
chore(core): add missing dependencies to devkit and jest package.json (#6233) 2021-07-05 16:49:38 -04:00
Miroslav Jonaš
8ab463e386
cleanup(core): replace deprecated usage of appRootPath (#6241)
* cleanup(core): replace deprecated usage of appRootPath

* cleanup(core): revert migration changes
2021-07-05 15:51:19 -04:00
Zachary DeRose
4406141637
docs(misc): fixing broken links in jest executor doc page (#6175) 2021-06-30 10:07:44 -07:00
AgentEnder
3ed002f1b1 cleanup(testing): jest 27 migration misses old style astTransformers
ISSUES CLOSED: #6110
2021-06-25 17:40:12 -04:00
AgentEnder
b873688d41 cleanup(testing): additional null-check in jest migration
Signed-off-by: AgentEnder <craigorycoppola@gmail.com>

ISSUES CLOSED: #6090
2021-06-25 17:40:12 -04:00
Jason Jean
4f7191e154 chore(repo): update nx to 12.5.0-beta.5 2021-06-25 17:08:37 -04:00
Phillip Barta
fe97444d78
feat(core): migrate prettier to v2.3.1 (#5623) 2021-06-17 16:44:30 +02:00
Jason Jean
1a1039f6c6
fix(testing): fix ts-jest transformer migration (#6024) 2021-06-16 01:03:36 +00:00
Craigory V Coppola
43b3eaf0bf
chore(testing): added null check to jest migration (#6021) 2021-06-15 22:47:23 +00:00
Craigory V Coppola
f9751786c6
feat(testing): support for Jest 27 (#5873)
- Sets default testEnvironment to web
- Updates node generators to specify testEnvironment: node
- Provides migrations to update existing jest.config.js files
- Bump angular-preset-jest to latest

ISSUES CLOSED: #5771
2021-06-11 13:25:57 -05:00
Phillip Barta
a2c2d94050
feat(core): first step to common JSON behavior and common fileutils (#5859) 2021-06-09 12:45:16 +02:00
vsavkin
f82344d63a chore(repo): refine the tag line 2021-05-18 20:55:40 -04:00