Skip to content

Commit bc28ca0

Browse files
feat!: add support for Angular 14 (#539)
1 parent 4d85483 commit bc28ca0

File tree

215 files changed

+6728
-6398
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+6728
-6398
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: Install and cache dependencies
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2020
with:
2121
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
2222
fetch-depth: 0
@@ -28,7 +28,7 @@ jobs:
2828
run: node ./scripts/rebase-pr.js
2929
- name: Cache node modules
3030
id: cache
31-
uses: actions/cache@v2
31+
uses: actions/cache@v3
3232
with:
3333
path: node_modules
3434
key: cache-node-modules-${{ hashFiles('package-lock.json') }}
@@ -44,14 +44,18 @@ jobs:
4444
needs: install-deps
4545
strategy:
4646
matrix:
47-
agent: [1, 2, 3, 4, 5, 6, 7]
47+
agent: [1, 2, 3]
4848
steps:
49-
- uses: actions/checkout@v2
49+
- uses: actions/checkout@v3
5050
- name: Retrieve node_modules cache
51-
uses: actions/cache@v2
51+
uses: actions/cache@v3
5252
with:
5353
path: node_modules
5454
key: cache-node-modules-${{ hashFiles('package-lock.json') }}
55+
# Running ngcc after each agent is created to address the "ngcc is already running error".
56+
# Since we're running multiple builds in parallel, we need to pre-process our node_modules before starting the builds.
57+
- name: Run NGCC
58+
run: npx ngcc
5559
- name: Start Nx Agent ${{ matrix.agent }}
5660
run: npx nx-cloud start-agent
5761

@@ -60,7 +64,7 @@ jobs:
6064
needs: install-deps
6165
runs-on: ubuntu-latest
6266
steps:
63-
- uses: actions/checkout@v2
67+
- uses: actions/checkout@v3
6468
with:
6569
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
6670
fetch-depth: 0
@@ -71,9 +75,9 @@ jobs:
7175
- name: Rebase current branch
7276
run: node ./scripts/rebase-pr.js
7377
- name: Derive appropriate SHAs for base and head for `nx affected` commands
74-
uses: nrwl/nx-set-shas@v2
78+
uses: nrwl/nx-set-shas@v3
7579
- name: Retrieve node_modules cache
76-
uses: actions/cache@v2
80+
uses: actions/cache@v3
7781
with:
7882
path: node_modules
7983
key: cache-node-modules-${{ hashFiles('package-lock.json') }}
@@ -86,15 +90,15 @@ jobs:
8690
- name: Check code formatting
8791
run: npx prettier --check .
8892
- name: Run lint
89-
run: npx nx affected:lint --quiet --silent --parallel --maxParallel=5
93+
run: npx nx affected:lint --quiet --silent --parallel=3
9094

9195
build:
9296
name: Build
9397
needs: install-deps
9498
runs-on: ubuntu-latest
9599
if: ${{ github.event_name == 'pull_request' }}
96100
steps:
97-
- uses: actions/checkout@v2
101+
- uses: actions/checkout@v3
98102
with:
99103
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
100104
fetch-depth: 0
@@ -105,22 +109,24 @@ jobs:
105109
- name: Rebase current branch
106110
run: node ./scripts/rebase-pr.js
107111
- name: Derive appropriate SHAs for base and head for `nx affected` commands
108-
uses: nrwl/nx-set-shas@v2
112+
uses: nrwl/nx-set-shas@v3
109113
- name: Retrieve node_modules cache
110-
uses: actions/cache@v2
114+
uses: actions/cache@v3
111115
with:
112116
path: node_modules
113117
key: cache-node-modules-${{ hashFiles('package-lock.json') }}
118+
- name: Run NGCC
119+
run: npx ngcc
114120
- name: Build
115-
run: npx nx affected --target=build --parallel --maxParallel=5
121+
run: npx nx affected --target=build --parallel=3
116122

117123
build-dist:
118124
name: Build packages distribution
119125
needs: install-deps
120126
runs-on: ubuntu-latest
121127
if: ${{ github.event_name == 'push' }}
122128
steps:
123-
- uses: actions/checkout@v2
129+
- uses: actions/checkout@v3
124130
with:
125131
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
126132
fetch-depth: 0
@@ -131,7 +137,7 @@ jobs:
131137
- name: Rebase current branch
132138
run: node ./scripts/rebase-pr.js
133139
- name: Retrieve node_modules cache
134-
uses: actions/cache@v2
140+
uses: actions/cache@v3
135141
with:
136142
path: node_modules
137143
key: cache-node-modules-${{ hashFiles('package-lock.json') }}
@@ -143,7 +149,7 @@ jobs:
143149
needs: install-deps
144150
runs-on: ubuntu-latest
145151
steps:
146-
- uses: actions/checkout@v2
152+
- uses: actions/checkout@v3
147153
with:
148154
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
149155
fetch-depth: 0
@@ -154,29 +160,29 @@ jobs:
154160
- name: Rebase current branch
155161
run: node ./scripts/rebase-pr.js
156162
- name: Derive appropriate SHAs for base and head for `nx affected` commands
157-
uses: nrwl/nx-set-shas@v2
163+
uses: nrwl/nx-set-shas@v3
158164
- name: Retrieve node_modules cache
159-
uses: actions/cache@v2
165+
uses: actions/cache@v3
160166
with:
161167
path: node_modules
162168
key: cache-node-modules-${{ hashFiles('package-lock.json') }}
163169
- name: Code coverage
164170
run: |
165-
npx nx affected --target=test --parallel --maxParallel=5 --browsers=ChromeHeadless
166-
npx nx affected --target=posttest --parallel --maxParallel=5 --browsers=ChromeHeadless
171+
npx nx affected --target=test --parallel=3 --browsers=ChromeHeadless --code-coverage
172+
npx nx affected --target=posttest --parallel=3 --browsers=ChromeHeadless
167173
168174
stop-agents:
169175
name: Stop Nx Cloud agents
170176
runs-on: ubuntu-latest
171177
if: always()
172178
needs: [lint, build, build-dist, coverage]
173179
steps:
174-
- uses: actions/checkout@v2
180+
- uses: actions/checkout@v3
175181
- uses: actions/setup-node@v3
176182
with:
177183
node-version: '14'
178184
- name: Retrieve node_modules cache
179-
uses: actions/cache@v2
185+
uses: actions/cache@v3
180186
with:
181187
path: node_modules
182188
key: cache-node-modules-${{ hashFiles('package-lock.json') }}

.github/workflows/e2e.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
- 6.x.x
87
pull_request:
98

109
env:
@@ -32,7 +31,7 @@ jobs:
3231
run: node ./scripts/rebase-pr.js
3332
- name: Cache dependencies
3433
id: cache
35-
uses: actions/cache@v2
34+
uses: actions/cache@v3
3635
with:
3736
path: |
3837
node_modules
@@ -44,7 +43,7 @@ jobs:
4443
run: npm ci
4544
- name: Derive appropriate SHAs for base and head for `nx affected` commands
4645
id: setSHAs
47-
uses: nrwl/nx-set-shas@v2
46+
uses: nrwl/nx-set-shas@v3
4847
- name: Set workflow parameters
4948
id: parameters
5049
run: |
@@ -76,7 +75,7 @@ jobs:
7675
run: node ./scripts/rebase-pr.js
7776
if: ${{ matrix.project != 'skip' }}
7877
- name: Retrieve dependencies cache
79-
uses: actions/cache@v2
78+
uses: actions/cache@v3
8079
with:
8180
path: |
8281
node_modules
@@ -126,7 +125,7 @@ jobs:
126125
run: node ./scripts/rebase-pr.js
127126
if: ${{ github.event_name == 'pull_request' }}
128127
- name: Retrieve dependencies cache
129-
uses: actions/cache@v2
128+
uses: actions/cache@v3
130129
with:
131130
path: |
132131
node_modules
@@ -171,7 +170,7 @@ jobs:
171170
- name: Rebase current branch
172171
run: node ./scripts/rebase-pr.js
173172
- name: Retrieve dependencies cache
174-
uses: actions/cache@v2
173+
uses: actions/cache@v3
175174
with:
176175
path: |
177176
node_modules
@@ -225,7 +224,7 @@ jobs:
225224
- name: Rebase current branch
226225
run: node ./scripts/rebase-pr.js
227226
- name: Retrieve dependencies cache
228-
uses: actions/cache@v2
227+
uses: actions/cache@v3
229228
with:
230229
path: |
231230
node_modules

.github/workflows/release-please.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ jobs:
1515
release-type: 'node'
1616
default-branch: '${{ github.ref_name }}'
1717
package-name: 'skyux'
18-
pull-request-title-pattern: 'chore: ${{ github.ref_name }} release ${version}'
18+
pull-request-title-pattern: 'chore: release ${version}'
1919
labels: 'autorelease ${{ github.ref_name }}: pending'
2020
release-labels: 'autorelease ${{ github.ref_name }}: tagged'
21-
prerelease: false
21+
# remove the following line after initial release
22+
release-as: 7.0.0-beta.0
23+
prerelease: true
2224
draft-pull-request: true
2325
include-v-in-tag: false
2426
token: '${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}'
25-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
2628
- uses: actions/setup-node@v3
2729
with:
2830
cache: npm
@@ -36,7 +38,7 @@ jobs:
3638
- name: Cache node modules
3739
if: ${{ steps.release.outputs.release_created }}
3840
id: cache
39-
uses: actions/cache@v2
41+
uses: actions/cache@v3
4042
with:
4143
path: node_modules
4244
key: cache-node-modules-${{ hashFiles('package-lock.json') }}

.github/workflows/validate-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
conventional-title:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818
- uses: amannn/action-semantic-pull-request@v4
1919
with:
2020
# subject should not start with a capital letter or end with a period

.storybook/main.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { StorybookConfig } from '@storybook/core-common';
1+
import type { StorybookConfig } from '@storybook/core-common';
22

3-
const main: StorybookConfig = {
3+
export const rootMain: StorybookConfig = {
44
stories: [],
55
addons: [
66
'@storybook/addon-a11y',
@@ -22,5 +22,3 @@ const main: StorybookConfig = {
2222
builder: 'webpack5',
2323
},
2424
};
25-
26-
module.exports = main;

apps/code-examples/karma.conf.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,20 @@ module.exports = function (config) {
88
const baseConfig = getBaseKarmaConfig();
99
config.set({
1010
...baseConfig,
11-
coverageIstanbulReporter: {
12-
...baseConfig.coverageIstanbulReporter,
11+
coverageReporter: {
12+
...baseConfig.coverageReporter,
1313
dir: join(__dirname, '../../coverage/apps/code-examples'),
14+
// TODO: remove these threshold overrides to meet 100% coverage!
15+
check: {
16+
global: {
17+
statements: 80,
18+
branches: 81,
19+
functions: 72,
20+
lines: 77,
21+
},
22+
},
1423
},
1524
});
25+
26+
console.log(config);
1627
};

apps/code-examples/src/app/code-examples/autonumeric/autonumeric/currency/autonumeric-demo.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Component, OnInit } from '@angular/core';
22
import {
3-
FormBuilder,
4-
FormControl,
5-
FormGroup,
3+
UntypedFormBuilder,
4+
UntypedFormControl,
5+
UntypedFormGroup,
66
Validators,
77
} from '@angular/forms';
88
import { SkyAutonumericOptions } from '@skyux/autonumeric';
@@ -14,13 +14,13 @@ import { SkyAutonumericOptions } from '@skyux/autonumeric';
1414
export class AutonumericDemoComponent implements OnInit {
1515
public autonumericOptions: SkyAutonumericOptions;
1616

17-
public formGroup: FormGroup;
17+
public formGroup: UntypedFormGroup;
1818

19-
constructor(private formBuilder: FormBuilder) {}
19+
constructor(private formBuilder: UntypedFormBuilder) {}
2020

2121
public ngOnInit(): void {
2222
this.formGroup = this.formBuilder.group({
23-
donationAmount: new FormControl(1234.5678, [Validators.required]),
23+
donationAmount: new UntypedFormControl(1234.5678, [Validators.required]),
2424
});
2525

2626
this.autonumericOptions = {

apps/code-examples/src/app/code-examples/autonumeric/autonumeric/international-formatting/autonumeric-demo.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Component, OnInit } from '@angular/core';
22
import {
3-
FormBuilder,
4-
FormControl,
5-
FormGroup,
3+
UntypedFormBuilder,
4+
UntypedFormControl,
5+
UntypedFormGroup,
66
Validators,
77
} from '@angular/forms';
88
import { SkyAutonumericOptions } from '@skyux/autonumeric';
@@ -14,13 +14,13 @@ import { SkyAutonumericOptions } from '@skyux/autonumeric';
1414
export class AutonumericDemoComponent implements OnInit {
1515
public autonumericOptions: SkyAutonumericOptions;
1616

17-
public formGroup: FormGroup;
17+
public formGroup: UntypedFormGroup;
1818

19-
constructor(private formBuilder: FormBuilder) {}
19+
constructor(private formBuilder: UntypedFormBuilder) {}
2020

2121
public ngOnInit(): void {
2222
this.formGroup = this.formBuilder.group({
23-
donationAmount: new FormControl(1234.5678, [Validators.required]),
23+
donationAmount: new UntypedFormControl(1234.5678, [Validators.required]),
2424
});
2525

2626
this.autonumericOptions = {

apps/code-examples/src/app/code-examples/autonumeric/autonumeric/options-provider/autonumeric-demo.component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Component, OnInit } from '@angular/core';
22
import {
3-
FormBuilder,
4-
FormControl,
5-
FormGroup,
3+
UntypedFormBuilder,
4+
UntypedFormControl,
5+
UntypedFormGroup,
66
Validators,
77
} from '@angular/forms';
88
import { SkyAutonumericOptions } from '@skyux/autonumeric';
@@ -23,18 +23,18 @@ import { AutonumericDemoOptionsProvider } from './autonumeric-demo-options-provi
2323
export class AutonumericDemoComponent implements OnInit {
2424
public donationOptions: SkyAutonumericOptions = {};
2525

26-
public formGroup: FormGroup;
26+
public formGroup: UntypedFormGroup;
2727

2828
public pledgeOptions: SkyAutonumericOptions = {
2929
decimalPlaces: 0,
3030
};
3131

32-
constructor(private formBuilder: FormBuilder) {}
32+
constructor(private formBuilder: UntypedFormBuilder) {}
3333

3434
public ngOnInit(): void {
3535
this.formGroup = this.formBuilder.group({
36-
donationAmount: new FormControl(1234.5678, [Validators.required]),
37-
pledgeAmount: new FormControl(2345.6789, [Validators.required]),
36+
donationAmount: new UntypedFormControl(1234.5678, [Validators.required]),
37+
pledgeAmount: new UntypedFormControl(2345.6789, [Validators.required]),
3838
});
3939
}
4040
}

0 commit comments

Comments
 (0)