Skip to content

Commit

Permalink
feat(angular): add support for Angular 16
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanpowell88 committed Mar 8, 2023
1 parent 89cc70d commit cf9154b
Show file tree
Hide file tree
Showing 11 changed files with 5,607 additions and 38 deletions.
10 changes: 5 additions & 5 deletions packages/scaffold-config/src/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const WIZARD_DEPENDENCY_ANGULAR_CLI = {
package: '@angular/cli',
installer: '@angular/cli',
description: 'CLI tool that you use to initialize, develop, scaffold, and maintain Angular applications.',
minVersion: '^=13.0.0 || ^=14.0.0 || ^=15.0.0',
minVersion: '^=13.0.0 || ^=14.0.0 || ^=15.0.0' || '^=16.0.0-next.*',
} as const

export const WIZARD_DEPENDENCY_ANGULAR_DEVKIT_BUILD_ANGULAR = {
Expand All @@ -112,7 +112,7 @@ export const WIZARD_DEPENDENCY_ANGULAR_DEVKIT_BUILD_ANGULAR = {
package: '@angular-devkit/build-angular',
installer: '@angular-devkit/build-angular',
description: 'Angular Webpack build facade',
minVersion: '^=13.0.0 || ^=14.0.0 || ^=15.0.0',
minVersion: '^=13.0.0 || ^=14.0.0 || ^=15.0.0' || '^=16.0.0-next.*',
} as const

export const WIZARD_DEPENDENCY_ANGULAR_CORE = {
Expand All @@ -121,7 +121,7 @@ export const WIZARD_DEPENDENCY_ANGULAR_CORE = {
package: '@angular/core',
installer: '@angular/core',
description: 'The core of the Angular framework',
minVersion: '^=13.0.0 || ^=14.0.0 || ^=15.0.0',
minVersion: '^=13.0.0 || ^=14.0.0 || ^=15.0.0' || '^=16.0.0-next.*',
} as const

export const WIZARD_DEPENDENCY_ANGULAR_COMMON = {
Expand All @@ -130,7 +130,7 @@ export const WIZARD_DEPENDENCY_ANGULAR_COMMON = {
package: '@angular/common',
installer: '@angular/common',
description: 'Commonly needed Angular directives and services',
minVersion: '^=13.0.0 || ^=14.0.0 || ^=15.0.0',
minVersion: '^=13.0.0 || ^=14.0.0 || ^=15.0.0' || '^=16.0.0-next.*',
} as const

export const WIZARD_DEPENDENCY_ANGULAR_PLATFORM_BROWSER_DYNAMIC = {
Expand All @@ -139,7 +139,7 @@ export const WIZARD_DEPENDENCY_ANGULAR_PLATFORM_BROWSER_DYNAMIC = {
package: '@angular/platform-browser-dynamic',
installer: '@angular/platform-browser-dynamic',
description: 'Library for using Angular in a web browser with JIT compilation',
minVersion: '^=13.0.0 || ^=14.0.0 || ^=15.0.0',
minVersion: '^=13.0.0 || ^=14.0.0 || ^=15.0.0' || '^=16.0.0-next.*',
} as const

export const WIZARD_DEPENDENCY_SVELTE: Cypress.CypressComponentDependency = {
Expand Down
1 change: 1 addition & 0 deletions system-tests/project-fixtures/angular/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default defineConfig({
resolve: {
alias: {
'@angular/common/http': require.resolve('@angular/common/http'),
'@angular/common/testing': require.resolve('@angular/common/testing'),
'@angular/common': require.resolve('@angular/common'),
'@angular/core/testing': require.resolve('@angular/core/testing'),
'@angular/core': require.resolve('@angular/core'),
Expand Down

This file was deleted.

This file was deleted.

32 changes: 32 additions & 0 deletions system-tests/projects/angular-16/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "angular-16",
"version": "0.0.0",
"private": true,
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"dependencies": {
"@angular/animations": "^16.0.0-next.1",
"@angular/common": "^16.0.0-next.1",
"@angular/compiler": "^16.0.0-next.1",
"@angular/core": "^16.0.0-next.1",
"@angular/forms": "^16.0.0-next.1",
"@angular/platform-browser": "^16.0.0-next.1",
"@angular/platform-browser-dynamic": "^16.0.0-next.1",
"@angular/router": "^16.0.0-next.1",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.0-next.2",
"@angular/cli": "~16.0.0-next.2",
"@angular/compiler-cli": "^16.0.0-next.1",
"typescript": "~4.9.4"
},
"projectFixtureDirectory": "angular"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { SignalsComponent } from './signals.component'

describe('SiganlsComponent', () => {
it('can mount a signals component', () => {
cy.mount(SignalsComponent)
})

it('can increment the count using a signal', () => {
cy.mount(SignalsComponent)
cy.get('span').contains(0)
cy.get('button').click()
cy.get('span').contains(1)
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Component, signal } from '@angular/core'

@Component({
standalone: true,
selector: 'app-signals',
template: `<span>{{ count() }}</span> <button (click)="increment()">+</button>`,
})
export class SignalsComponent {
count = signal(0)

increment (): void {
this.count.update((_count: number) => _count + 1)
}
}
Loading

0 comments on commit cf9154b

Please sign in to comment.