Skip to content

Commit

Permalink
build: update nx workspace to v12.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Ende committed May 10, 2022
1 parent f7bbb14 commit 9494f2b
Show file tree
Hide file tree
Showing 10 changed files with 21,181 additions and 24,677 deletions.
9 changes: 3 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
module.exports = {
projects: [
'<rootDir>/libs/ng-mockito/ng-mockito',
'<rootDir>/libs/ng-mockito/integration',
],
};
const { getJestProjects } = require('@nrwl/jest');

module.exports = { projects: getJestProjects() };
16 changes: 6 additions & 10 deletions libs/ng-mockito/integration/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@ module.exports = {
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
astTransformers: {
before: [
'jest-preset-angular/build/InlineFilesTransformer',
'jest-preset-angular/build/StripStylesTransformer',
],
},

tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
coverageDirectory: '../../../coverage/libs/ng-mockito/integration',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
};
2 changes: 1 addition & 1 deletion libs/ng-mockito/integration/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import '@testing-library/jest-dom';
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
16 changes: 6 additions & 10 deletions libs/ng-mockito/ng-mockito/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@ module.exports = {
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
astTransformers: {
before: [
'jest-preset-angular/build/InlineFilesTransformer',
'jest-preset-angular/build/StripStylesTransformer',
],
},

tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
coverageDirectory: '../../../coverage/libs/ng-mockito/ng-mockito',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
};
2 changes: 1 addition & 1 deletion libs/ng-mockito/ng-mockito/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import '@testing-library/jest-dom';
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
222 changes: 131 additions & 91 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -1,144 +1,184 @@
{
"migrations": [
{
"version": "11.0.0-beta.3",
"description": "Update the decoration script when using Angular CLI",
"factory": "./src/migrations/update-11-0-0/update-decorate-angular-cli",
"version": "12.5.0-beta.1",
"description": "Rename the workspace-schematic script into workspace-generator script",
"factory": "./src/migrations/update-12-5-0/add-target-dependencies",
"cli": "nx",
"package": "@nrwl/workspace",
"name": "update-decorate-angular-cli"
"name": "add-target-dependencies"
},
{
"version": "11.0.0-beta.3",
"description": "Update the @types/node package",
"factory": "./src/migrations/update-11-0-0/update-node-types",
"package": "@nrwl/workspace",
"name": "update-node-types"
"version": "12.0.0-beta.0",
"description": "adjusts the ngcc postinstall command to just leave 'ngcc' in there. This fixes Ivy in Jest tests and Storybooks",
"factory": "./src/migrations/update-12-0-0/update-ngcc-postinstall",
"package": "@nrwl/angular",
"name": "update-ngcc-postinstall"
},
{
"version": "11.0.0-beta.3",
"description": "Rename tools/schematics into tools/generators",
"factory": "./src/migrations/update-11-0-0/rename-workspace-schematics",
"package": "@nrwl/workspace",
"name": "rename-workspace-schematics"
"cli": "nx",
"version": "12.3.1",
"description": "Remove deprecated options and update others according to new defaults. It syncs with the v12 migration of Angular builders.",
"factory": "./src/migrations/update-12-3-0/update-webpack-browser-config",
"package": "@nrwl/angular",
"name": "update-webpack-browser-config"
},
{
"version": "11.0.0-beta.15",
"description": "Adds `outputs` based on builders",
"factory": "./src/migrations/update-11-0-0/add-outputs-in-workspace",
"package": "@nrwl/workspace",
"name": "add-outputs-in-workspace"
"cli": "nx",
"version": "12.3.1",
"description": "Updates storybook configurations to support webpack 5",
"factory": "./src/migrations/update-12-3-0/update-storybook",
"package": "@nrwl/angular",
"name": "update-storybook"
},
{
"version": "11.0.0",
"description": "Check that the right update command is used",
"factory": "./src/migrations/update-11-0-0/update-command-check",
"package": "@nrwl/workspace",
"name": "update-command-check"
"cli": "nx",
"version": "12.3.1",
"description": "Migrates some rules that have changed in Angular EsLint",
"factory": "./src/migrations/update-12-3-0/update-angular-eslint-rules",
"package": "@nrwl/angular",
"name": "update-angular-eslint-rules"
},
{
"version": "11.0.2",
"description": "Rename the workspace-schematic script into workspace-generator script",
"factory": "./src/migrations/update-11-0-0/rename-workspace-schematic-script",
"package": "@nrwl/workspace",
"name": "rename-workspace-schematic-script"
"cli": "nx",
"version": "12.3.5-beta.0",
"description": "Convert targets using @nrwl/angular:webpack-browser with the buildTarget option set to use the @nrwl/angular:delegate-build executor instead.",
"factory": "./src/migrations/update-12-3-0/convert-webpack-browser-build-target-to-delegate-build",
"package": "@nrwl/angular",
"name": "convert-webpack-browser-build-target-to-delegate-build"
},
{
"version": "10.5.0-beta.0",
"description": "Update eslint config and builder to extend from new Nx Angular presets and lint templates",
"factory": "./src/migrations/update-10-5-0/add-template-support-and-presets-to-eslint",
"cli": "nx",
"version": "12.9.0",
"description": "Fixes invalid importPaths for buildable and publishable libs.",
"factory": "./src/migrations/update-12-9-0/update-invalid-import-paths",
"package": "@nrwl/angular",
"name": "add-template-support-and-presets-to-eslint"
"name": "update-invalid-import-paths"
},
{
"version": "11.0.0-beta.13",
"description": "Update builder configurations and dependencies",
"factory": "./src/migrations/update-11-0-0/update-builders-config",
"package": "@nrwl/angular",
"name": "update-11-0-0"
"version": "12.0.0-next.0",
"factory": "./update-12/update-angular-config",
"description": "Remove deprecated options from 'angular.json' that are no longer present in v12.",
"package": "@angular/cli",
"name": "update-angular-config-v12"
},
{
"version": "11.0.0-next.0",
"factory": "./update-11/replace-ng-packagr-builder",
"description": "Replace deprecated library builder '@angular-devkit/build-ng-packagr'.",
"version": "12.0.0-next.1",
"factory": "./update-12/update-zonejs",
"description": "Update 'zone.js' to version 0.11.x. Read more about this here: https://github.com/angular/angular/blob/master/packages/zone.js/CHANGELOG.md#breaking-changes-since-zonejs-v0111",
"package": "@angular/cli",
"name": "replace-ng-packagr-builder"
"name": "update-zonejs"
},
{
"version": "11.0.0-next.2",
"factory": "./update-11/add-declaration-map-compiler-option",
"description": "Add 'declarationMap' compiler options for non production library builds.",
"version": "12.0.0-next.2",
"factory": "./update-12/remove-emit-decorator-metadata",
"description": "Remove 'emitDecoratorMetadata' TypeScript compiler option. Decorator metadata is no longer needed by Angular. Read more about this here: https://www.typescriptlang.org/docs/handbook/decorators.html#metadata",
"package": "@angular/cli",
"name": "add-declaration-map-compiler-option"
"name": "remove-emit-decorator-metadata"
},
{
"version": "11.0.0-next.8",
"factory": "./update-11/update-angular-config",
"description": "Remove deprecated options from 'angular.json' that are no longer present in v11.",
"version": "12.0.0-next.4",
"factory": "./update-12/update-lazy-module-paths",
"description": "Lazy loading syntax migration. Update lazy loading string syntax to use dynamic imports.",
"package": "@angular/cli",
"name": "update-angular-config-v11"
"name": "lazy-loading-string-syntax"
},
{
"version": "11.0.0",
"factory": "./update-11/update-dependencies",
"description": "Update workspace dependencies to match a new v11 project.",
"version": "12.0.0-next.7",
"factory": "./update-9/update-i18n#updateI18nConfig",
"description": "Remove deprecated ViewEngine-based i18n build and extract options. Options present in the configuration will be converted to use non-deprecated options.",
"package": "@angular/cli",
"name": "update-workspace-dependencies-v11"
"name": "remove-deprecated-i18n-options"
},
{
"version": "11.0.0-beta",
"description": "NavigationExtras omissions migration. In version 11, some unsupported properties were omitted from the `extras` parameter of the `Router.navigateByUrl` and `Router.createUrlTree` methods.",
"factory": "./migrations/navigation-extras-omissions/index",
"package": "@angular/core",
"name": "migration-v11-navigation-extras-omissions"
"version": "12.0.0-next.7",
"factory": "./update-12/update-web-workers",
"description": "Updates Web Worker consumer usage to use the new syntax supported directly by Webpack 5.",
"package": "@angular/cli",
"name": "update-web-workers-webpack-5"
},
{
"version": "11.0.0-beta",
"description": "The default value for `relativeLinkResolution` is changing from 'legacy' to 'corrected'.\nThis migration updates `RouterModule` configurations that use the default value to \nnow specifically use 'legacy' to prevent breakages when updating.",
"factory": "./migrations/relative-link-resolution/index",
"package": "@angular/core",
"name": "migration-v11-router-relative-link-resolution-default"
"version": "12.0.1",
"factory": "./update-12/schematic-options",
"description": "Remove invalid 'skipTests' option in '@schematics/angular:module' Angular schematic options.",
"package": "@angular/cli",
"name": "schematic-options-12"
},
{
"version": "11.0.0-beta",
"description": "In Angular version 11, the type of `AbstractControl.parent` can be `null` to reflect the runtime value more accurately. This migration automatically adds non-null assertions to existing accesses of the `parent` property on types like `FormControl`, `FormArray` and `FormGroup`.",
"factory": "./migrations/abstract-control-parent/index",
"package": "@angular/core",
"name": "migration-v11-abstract-control-parent"
"version": "12.1.0",
"factory": "./update-12/replace-prod-flag",
"description": "Replace the deprecated '--prod' in package.json scripts.",
"package": "@angular/cli",
"name": "replace-deprecated-prod-flag"
},
{
"version": "11.0.0-beta",
"description": "ViewEncapsulation.Native has been removed as of Angular version 11. This migration replaces any usages with ViewEncapsulation.ShadowDom.",
"factory": "./migrations/native-view-encapsulation/index",
"version": "12.0.0-beta",
"description": "In Angular version 12, the type of ActivatedRouteSnapshot.fragment is nullable. This migration automatically adds non-null assertions to it.",
"factory": "./migrations/activated-route-snapshot-fragment/index",
"package": "@angular/core",
"name": "migration-v11-native-view-encapsulation"
"name": "migration-v12-activated-route-snapshot-fragment"
},
{
"version": "11.0.0-beta",
"description": "`async` to `waitForAsync` migration. The `async` testing function has been renamed to `waitForAsync` to avoid confusion with the native `async` keyword.",
"factory": "./migrations/wait-for-async/index",
"version": "12.0.0-next.6",
"description": "`XhrFactory` has been moved from `@angular/common/http` to `@angular/common`.",
"factory": "./migrations/xhr-factory/index",
"package": "@angular/core",
"name": "migration-v11-wait-for-async"
"name": "migration-v12-xhr-factory"
},
{
"version": "11.0.0-beta",
"description": "NavigationExtras.preserveQueryParams has been removed as of Angular version 11. This migration replaces any usages with the appropriate assignment of the queryParamsHandling key.",
"factory": "./migrations/router-preserve-query-params/index",
"version": "12.0.2",
"description": "Automatically migrates shadow-piercing selector from `/deep/` to the recommended alternative `::ng-deep`.",
"factory": "./migrations/deep-shadow-piercing-selector/index",
"package": "@angular/core",
"name": "migration-v11-router-preserve-query-params"
"name": "migration-v12-deep-shadow-piercing-selector"
},
{
"version": "11.0.0-beta",
"description": "Updates the `initialNavigation` property for `RouterModule.forRoot`.",
"factory": "./migrations/initial-navigation/index",
"package": "@angular/core",
"name": "migration-v11-router-initial-navigation-options"
"cli": "nx",
"version": "12.8.0-beta.0",
"description": "Remove Typescript Preprocessor Plugin",
"factory": "./src/migrations/update-12-8-0/remove-typescript-plugin",
"package": "@nrwl/cypress",
"name": "remove-typescript-plugin"
},
{
"version": "11.1.0-beta",
"description": "Removes `canActivate` from a `Route` config when `redirectTo` is also present",
"factory": "./migrations/can-activate-with-redirect-to/index",
"package": "@angular/core",
"name": "migration-v11.1-can-activate-with-redirect-to"
"version": "12.1.0-beta.1",
"cli": "nx",
"description": "Update jest-preset-angular to version 8.4.0",
"factory": "./src/migrations/update-12-1-2/update-jest-preset-angular",
"package": "@nrwl/jest",
"name": "update-jest-preset-angular-8-4-0"
},
{
"version": "12.1.2-beta.1",
"cli": "nx",
"description": "Replace tsConfig with tsconfig for ts-jest in jest.config.js",
"factory": "./src/migrations/update-12-1-2/update-ts-jest",
"package": "@nrwl/jest",
"name": "update-ts-jest-6-5-5"
},
{
"version": "12.4.0-beta.1",
"cli": "nx",
"description": "Add testEnvironment: 'jsdom' in web apps + libraries",
"factory": "./src/migrations/update-12-4-0/add-test-environment-for-node",
"package": "@nrwl/jest",
"name": "support-jest-27"
},
{
"version": "12.4.0-beta.1",
"cli": "nx",
"description": "Support for Jest 27 via updating ts-jest + jest-preset-angular",
"factory": "./src/migrations/update-12-4-0/update-jest-preset-angular",
"package": "@nrwl/jest",
"name": "update-ts-jest-and-jest-preset-angular"
},
{
"version": "12.6.0-beta.0",
"cli": "nx",
"description": "Uses `getJestProjects()` to populate projects array in root level `jest.config.js` file.",
"factory": "./src/migrations/update-12-6-0/update-base-jest-config",
"package": "@nrwl/jest",
"name": "update-jest-config-to-use-util"
}
]
}
8 changes: 8 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,13 @@
"unitTestRunner": "jest",
"strict": true
}
},
"targetDependencies": {
"build": [
{
"target": "build",
"projects": "dependencies"
}
]
}
}
Loading

0 comments on commit 9494f2b

Please sign in to comment.