Skip to content

Commit

Permalink
build: update to Nx 12.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Sep 21, 2021
1 parent 6dc209c commit 352587f
Show file tree
Hide file tree
Showing 60 changed files with 3,617 additions and 2,793 deletions.
742 changes: 378 additions & 364 deletions angular.json

Large diffs are not rendered by default.

18 changes: 3 additions & 15 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
module.exports = {
projects: [
'<rootDir>/projects/example-app',
'<rootDir>/modules/store',
'<rootDir>/modules/effects',
'<rootDir>/modules/data',
'<rootDir>/modules/entity',
'<rootDir>/modules/store-devtools',
'<rootDir>/modules/router-store',
'<rootDir>/modules/schematics',
'<rootDir>/modules/component',
'<rootDir>/modules/component-store',
'<rootDir>/modules/schematics-core',
],
};
const { getJestProjects } = require('@nrwl/jest');

module.exports = { projects: getJestProjects() };
6 changes: 6 additions & 0 deletions jest.preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ module.exports = {
resolver: '@nrwl/jest/plugins/resolver',
moduleFileExtensions: ['ts', 'js', 'html'],
coverageReporters: ['html'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
testRunner: 'jest-jasmine2',
};
83 changes: 83 additions & 0 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"migrations": [
{
"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": "add-target-dependencies"
},
{
"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": "update-invalid-import-paths"
},
{
"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"
},
{
"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": "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"
},
{
"cli": "nx",
"version": "12.4.0-beta.0",
"description": "Remove ESLint parserOptions.project config if no rules requiring type-checking are in use",
"factory": "./src/migrations/update-12-4-0/remove-eslint-project-config-if-no-type-checking-rules",
"package": "@nrwl/linter",
"name": "remove-eslint-project-config-if-no-type-checking-rules"
},
{
"cli": "nx",
"version": "12.9.0-beta.0",
"description": "Add outputs for caching",
"factory": "./src/migrations/update-12-9-0/add-outputs",
"package": "@nrwl/linter",
"name": "add-outputs"
},
{
"cli": "nx",
"version": "12.9.0-beta.0",
"description": "Remove ESLint parserOptions.project config if no rules requiring type-checking are in use",
"factory": "./src/migrations/update-12-4-0/remove-eslint-project-config-if-no-type-checking-rules",
"package": "@nrwl/linter",
"name": "remove-eslint-project-config-if-no-type-checking-rules-again"
}
]
}
13 changes: 2 additions & 11 deletions modules/component-store/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,13 @@ module.exports = {
displayName: 'Component Store',
preset: '../../jest.preset.js',
coverageDirectory: '../../coverage/libs/component-store',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],

setupFilesAfterEnv: ['<rootDir>/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',
],
},
},
},
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
};
5 changes: 0 additions & 5 deletions modules/component-store/schematics-core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ module.exports = {
},
},
coverageDirectory: '../../coverage/modules/schematics-core',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],
};
2 changes: 1 addition & 1 deletion modules/component-store/schematics-core/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
2 changes: 1 addition & 1 deletion modules/component-store/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
13 changes: 2 additions & 11 deletions modules/component/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,9 @@ module.exports = {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
astTransformers: {
before: [
'jest-preset-angular/build/InlineFilesTransformer',
'jest-preset-angular/build/StripStylesTransformer',
],
},
},
},
setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],

transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
};
5 changes: 0 additions & 5 deletions modules/component/schematics-core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ module.exports = {
},
},
coverageDirectory: '../../coverage/modules/schematics-core',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],
};
2 changes: 1 addition & 1 deletion modules/component/schematics-core/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
2 changes: 1 addition & 1 deletion modules/component/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
13 changes: 2 additions & 11 deletions modules/data/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,13 @@ module.exports = {
displayName: 'Data',
preset: '../../jest.preset.js',
coverageDirectory: '../../coverage/modules/data',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],

setupFilesAfterEnv: ['<rootDir>/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',
],
},
},
},
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
};
5 changes: 0 additions & 5 deletions modules/data/schematics-core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ module.exports = {
},
},
coverageDirectory: '../../coverage/modules/schematics-core',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],
};
2 changes: 1 addition & 1 deletion modules/data/schematics-core/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
2 changes: 1 addition & 1 deletion modules/data/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
13 changes: 2 additions & 11 deletions modules/effects/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,13 @@ module.exports = {
displayName: 'Effects',
preset: '../../jest.preset.js',
coverageDirectory: '../../coverage/modules/effects',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],

setupFilesAfterEnv: ['<rootDir>/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',
],
},
},
},
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
};
5 changes: 0 additions & 5 deletions modules/effects/schematics-core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ module.exports = {
},
},
coverageDirectory: '../../coverage/modules/schematics-core',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],
};
2 changes: 1 addition & 1 deletion modules/effects/schematics-core/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
2 changes: 1 addition & 1 deletion modules/effects/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
13 changes: 2 additions & 11 deletions modules/entity/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,13 @@ module.exports = {
displayName: 'Entity',
preset: '../../jest.preset.js',
coverageDirectory: '../../coverage/modules/entity',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],

setupFilesAfterEnv: ['<rootDir>/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',
],
},
},
},
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
};
5 changes: 0 additions & 5 deletions modules/entity/schematics-core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ module.exports = {
},
},
coverageDirectory: '../../coverage/modules/schematics-core',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],
};
2 changes: 1 addition & 1 deletion modules/entity/schematics-core/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
2 changes: 1 addition & 1 deletion modules/entity/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
13 changes: 2 additions & 11 deletions modules/router-store/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,13 @@ module.exports = {
displayName: 'Router Store',
preset: '../../jest.preset.js',
coverageDirectory: '../../coverage/modules/router-store',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],

setupFilesAfterEnv: ['<rootDir>/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',
],
},
},
},
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
};
5 changes: 0 additions & 5 deletions modules/router-store/schematics-core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ module.exports = {
},
},
coverageDirectory: '../../coverage/modules/schematics-core',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],
};
2 changes: 1 addition & 1 deletion modules/router-store/schematics-core/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
2 changes: 1 addition & 1 deletion modules/router-store/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
5 changes: 0 additions & 5 deletions modules/schematics-core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ module.exports = {
},
},
coverageDirectory: '../../coverage/modules/schematics-core',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],
};
2 changes: 1 addition & 1 deletion modules/schematics-core/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
7 changes: 2 additions & 5 deletions modules/schematics/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ module.exports = {
displayName: 'Schematics',
preset: '../../jest.preset.js',
coverageDirectory: '../../coverage/modules/schematics',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],

globals: { 'ts-jest': { tsconfig: '<rootDir>/tsconfig.spec.json' } },
testEnvironment: 'node',
};
5 changes: 0 additions & 5 deletions modules/schematics/schematics-core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ module.exports = {
},
},
coverageDirectory: '../../coverage/modules/schematics-core',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],
};
2 changes: 1 addition & 1 deletion modules/schematics/schematics-core/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
2 changes: 1 addition & 1 deletion modules/schematics/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
Loading

0 comments on commit 352587f

Please sign in to comment.