Skip to content

Commit

Permalink
chore(repo): update nx to 14.2.0-rc.1 (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz authored Jun 3, 2022
1 parent 62bd007 commit 620de87
Show file tree
Hide file tree
Showing 65 changed files with 2,294 additions and 1,587 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2
defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:12-browsers
- image: circleci/node:lts-browsers

set_env: &set_env
name: Setup Environment Variables
Expand Down
2 changes: 1 addition & 1 deletion apps/cart-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"root": "apps/cart-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/cart-e2e/src",
"projectType": "application",
"targets": {
Expand Down
9 changes: 2 additions & 7 deletions apps/cart-e2e/src/integration/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ describe('cart', () => {
});

it('should display products', () => {
getPage()
.get('li figure')
.should('have.length', 5);
getPage().get('li figure').should('have.length', 5);
});

it('should have the total price', () => {
Expand All @@ -22,10 +20,7 @@ describe('cart', () => {
});

it('should update total price', () => {
getPage()
.get('li select')
.first()
.select('3');
getPage().get('li select').first().select('3');
getPage()
.get('li:last-of-type nx-example-product-price')
.contains('$700.00');
Expand Down
4 changes: 2 additions & 2 deletions apps/cart/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
Expand All @@ -7,5 +7,5 @@ module.exports = {
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: { 'ts-jest': { tsconfig: '<rootDir>/tsconfig.spec.json' } },
displayName: 'cart',
preset: '../../jest.preset.ts',
preset: '../../jest.preset.js',
};
2 changes: 1 addition & 1 deletion apps/cart/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"root": "apps/cart",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/cart/src",
"projectType": "application",
"generators": {},
Expand Down
2 changes: 1 addition & 1 deletion apps/cart/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const environment = {
production: true
production: true,
};
2 changes: 1 addition & 1 deletion apps/cart/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
// When building for production, this file is replaced with `environment.prod.ts`.

export const environment = {
production: false
production: false,
};
2 changes: 1 addition & 1 deletion apps/products-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"root": "apps/products-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/products-e2e/src",
"projectType": "application",
"targets": {
Expand Down
9 changes: 2 additions & 7 deletions apps/products-e2e/src/integration/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@ describe('products', () => {
});

it('should display products', () => {
getPage()
.get('li figure')
.should('have.length', 5);
getPage().get('li figure').should('have.length', 5);
});

it('should navigate to product details', () => {
getPage()
.get('li a')
.first()
.click();
getPage().get('li a').first().click();

cy.url().should('include', '/product/1');
});
Expand Down
4 changes: 2 additions & 2 deletions apps/products/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
coverageDirectory: '../../coverage/apps/products',

setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
Expand All @@ -19,5 +19,5 @@ module.exports = {
'jest-preset-angular/build/serializers/html-comment',
],
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
preset: '../../jest.preset.ts',
preset: '../../jest.preset.js',
};
2 changes: 1 addition & 1 deletion apps/products/project.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"generators": {
"@nrwl/workspace:component": {
"style": "scss"
}
},
"root": "apps/products",
"sourceRoot": "apps/products/src",
"prefix": "nx-example",
"targets": {
Expand Down
2 changes: 1 addition & 1 deletion apps/products/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('AppComponent', () => {
TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();
fixture = TestBed.createComponent(AppComponent);

Expand Down
2 changes: 1 addition & 1 deletion apps/products/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import '@nx-example/shared/header';
@Component({
selector: 'nx-example-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
styleUrls: ['./app.component.scss'],
})
export class AppComponent {}
2 changes: 1 addition & 1 deletion apps/products/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { AppComponent } from './app.component';
),
},
],
{ initialNavigation: 'enabled', relativeLinkResolution: 'legacy' }
{ initialNavigation: 'enabledBlocking', relativeLinkResolution: 'legacy' }
),
StoreModule.forRoot({}),
],
Expand Down
2 changes: 1 addition & 1 deletion apps/products/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const environment = {
production: true
production: true,
};
2 changes: 1 addition & 1 deletion apps/products/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false
production: false,
};

/*
Expand Down
2 changes: 1 addition & 1 deletion apps/products/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ if (environment.production) {

platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
.catch((err) => console.error(err));
3 changes: 2 additions & 1 deletion apps/products/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "jest"]
"types": ["node", "jest"],
"target": "es2020"
},
"include": [],
"files": [],
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const { getJestProjects } = require('@nrwl/jest');

module.exports = { projects: getJestProjects() };
export default { projects: getJestProjects() };
2 changes: 1 addition & 1 deletion jest.preset.ts → jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const nxPreset = require('@nrwl/jest/preset');
const nxPreset = require('@nrwl/jest/preset').default;
module.exports = {
...nxPreset,
testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
Expand Down
4 changes: 2 additions & 2 deletions libs/cart/cart-page/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
Expand All @@ -7,5 +7,5 @@ module.exports = {
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: { 'ts-jest': { tsconfig: '<rootDir>/tsconfig.spec.json' } },
displayName: 'cart-cart-page',
preset: '../../../jest.preset.ts',
preset: '../../../jest.preset.js',
};
2 changes: 1 addition & 1 deletion libs/cart/cart-page/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"root": "libs/cart/cart-page",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/cart/cart-page/src",
"projectType": "library",
"generators": {},
Expand Down
4 changes: 2 additions & 2 deletions libs/products/home-page/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
coverageDirectory: '../../../coverage/libs/products/home-page',

setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
Expand All @@ -19,5 +19,5 @@ module.exports = {
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
preset: '../../../jest.preset.ts',
preset: '../../../jest.preset.js',
};
2 changes: 1 addition & 1 deletion libs/products/home-page/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"root": "libs/products/home-page",
"sourceRoot": "libs/products/home-page/src",
"prefix": "nx-example",
"targets": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ describe('HomePageComponent', () => {
imports: [
StoreModule.forRoot({}),
RouterTestingModule,
SharedProductStateModule
SharedProductStateModule,
],
declarations: [HomePageComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ProductsHomePageModule } from './products-home-page.module';
describe('ProductsHomePageModule', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [ProductsHomePageModule]
imports: [ProductsHomePageModule],
}).compileComponents();
}));

Expand Down
8 changes: 4 additions & 4 deletions libs/products/home-page/src/lib/products-home-page.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import { HomePageComponent } from './home-page/home-page.component';
{
path: '',
pathMatch: 'full',
component: HomePageComponent
}
])
component: HomePageComponent,
},
]),
],
declarations: [HomePageComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class ProductsHomePageModule {}
3 changes: 2 additions & 1 deletion libs/products/home-page/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "jest"]
"types": ["node", "jest"],
"target": "es2020"
},
"include": [],
"files": [],
Expand Down
4 changes: 2 additions & 2 deletions libs/products/product-detail-page/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
coverageDirectory: '../../../coverage/libs/products/product-detail-page',

setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
Expand All @@ -19,5 +19,5 @@ module.exports = {
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
preset: '../../../jest.preset.ts',
preset: '../../../jest.preset.js',
};
2 changes: 1 addition & 1 deletion libs/products/product-detail-page/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"root": "libs/products/product-detail-page",
"sourceRoot": "libs/products/product-detail-page/src",
"prefix": "nx-example",
"targets": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import { SharedProductStateModule } from '@nx-example/shared/product/state';
import { ProductDetailPageComponent } from './product-detail-page.component';

class MockActivatedRoute {
paramMap = of(
new Map<string, string>([['productId', '1']])
);
paramMap = of(new Map<string, string>([['productId', '1']]));
}

describe('ProductDetailPageComponent', () => {
Expand All @@ -25,11 +23,11 @@ describe('ProductDetailPageComponent', () => {
providers: [
{
provide: ActivatedRoute,
useClass: MockActivatedRoute
}
useClass: MockActivatedRoute,
},
],
declarations: [ProductDetailPageComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ProductsProductDetailPageModule } from './products-product-detail-page.
describe('ProductsProductDetailPageModule', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [ProductsProductDetailPageModule]
imports: [ProductsProductDetailPageModule],
}).compileComponents();
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import { ProductDetailPageComponent } from './product-detail-page/product-detail
SharedProductStateModule,

RouterModule.forChild([
{ path: ':productId', component: ProductDetailPageComponent }
])
{ path: ':productId', component: ProductDetailPageComponent },
]),
],
declarations: [ProductDetailPageComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class ProductsProductDetailPageModule {}
3 changes: 2 additions & 1 deletion libs/products/product-detail-page/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "jest"]
"types": ["node", "jest"],
"target": "es2020"
},
"include": [],
"files": [],
Expand Down
2 changes: 1 addition & 1 deletion libs/shared/assets/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"root": "libs/shared/assets",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/shared/assets/src",
"projectType": "library",
"generators": {},
Expand Down
4 changes: 2 additions & 2 deletions libs/shared/cart/state/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
coverageDirectory: '../../../../coverage/libs/shared/cart/state',

setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
Expand All @@ -19,5 +19,5 @@ module.exports = {
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
preset: '../../../../jest.preset.ts',
preset: '../../../../jest.preset.js',
};
2 changes: 1 addition & 1 deletion libs/shared/cart/state/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"root": "libs/shared/cart/state",
"sourceRoot": "libs/shared/cart/state/src",
"prefix": "nx-example",
"targets": {
Expand Down
Loading

0 comments on commit 620de87

Please sign in to comment.