Skip to content

Commit 41e03fd

Browse files
authored
Merge pull request #588 from GetStream/v5-update-angular
Drop support for Angular 12-14
2 parents 47195ba + b53c5fc commit 41e03fd

File tree

88 files changed

+22611
-28500
lines changed

Some content is hidden

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

88 files changed

+22611
-28500
lines changed

.eslintrc.json

+28-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
22
"root": true,
33
"ignorePatterns": ["projects/**/*"],
4-
"plugins": ["unused-imports", "cypress", "jasmine"],
5-
"env": {
6-
"jasmine": true
7-
},
4+
"plugins": ["unused-imports"],
85
"overrides": [
96
{
107
"files": ["*.ts"],
@@ -16,19 +13,38 @@
1613
"eslint:recommended",
1714
"plugin:@typescript-eslint/recommended-requiring-type-checking",
1815
"plugin:@angular-eslint/all",
19-
"plugin:cypress/recommended",
20-
"plugin:jasmine/recommended",
2116
"plugin:prettier/recommended" // This should always be the last in the extends array
2217
],
2318
"rules": {
2419
"@angular-eslint/sort-ngmodule-metadata-arrays": "off",
2520
"@angular-eslint/prefer-on-push-component-change-detection": "off",
2621
"unused-imports/no-unused-imports": "error",
2722
"no-console": ["error", { "allow": ["warn", "error"] }],
28-
"jasmine/no-spec-dupes": [1, "branch"],
2923
"@typescript-eslint/unbound-method": "off"
3024
}
3125
},
26+
{
27+
"files": ["*.spec.ts", "**/mocks/*.ts"],
28+
"parserOptions": {
29+
"project": ["tsconfig.json"],
30+
"createDefaultProgram": true
31+
},
32+
"extends": [
33+
"eslint:recommended",
34+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
35+
"plugin:@angular-eslint/all",
36+
"plugin:prettier/recommended" // This should always be the last in the extends array
37+
],
38+
"rules": {
39+
"@angular-eslint/sort-ngmodule-metadata-arrays": "off",
40+
"@angular-eslint/prefer-on-push-component-change-detection": "off",
41+
"unused-imports/no-unused-imports": "error",
42+
"no-console": ["error", { "allow": ["warn", "error"] }],
43+
"@typescript-eslint/unbound-method": "off",
44+
"@typescript-eslint/no-explicit-any": "off",
45+
"@typescript-eslint/ban-types": "off"
46+
}
47+
},
3248
{
3349
"files": ["*.html"],
3450
"extends": [
@@ -39,7 +55,11 @@
3955
"@angular-eslint/template/i18n": "off",
4056
"@angular-eslint/template/cyclomatic-complexity": "off",
4157
"@angular-eslint/template/no-call-expression": "off",
42-
"@angular-eslint/template/no-autofocus": "off"
58+
"@angular-eslint/template/no-autofocus": "off",
59+
"@angular-eslint/template/no-interpolation-in-attributes": "off",
60+
"@angular-eslint/template/button-has-type": "off",
61+
"@angular-eslint/template/no-inline-styles": "off",
62+
"@angular-eslint/template/accessibility-interactive-supports-focus": "off"
4363
}
4464
}
4565
]

.github/workflows/workflow.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
node-version: [16.x]
18+
node-version: [18.x]
1919

2020
steps:
2121
- uses: actions/checkout@v2
@@ -45,13 +45,6 @@ jobs:
4545
- name: Unit tests
4646
run: |
4747
npm run test:ci
48-
# - name: E2e tests
49-
# env:
50-
# STREAM_API_KEY: ${{ secrets.API_KEY }}
51-
# STREAM_USER_ID: ${{ secrets.USER_ID }}
52-
# STREAM_USER_TOKEN: ${{ secrets.USER_TOKEN }}
53-
# run: |
54-
# npm run e2e:ci
5548
- name: Release
5649
env:
5750
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ chrome-profiler-events*.json
3131
.history/*
3232

3333
# misc
34+
/.angular/cache
3435
/.sass-cache
3536
/connect.lock
3637
/coverage

angular.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"cli": {
4-
"defaultCollection": "@angular-eslint/schematics"
4+
"schematicCollections": ["@angular-eslint/schematics"],
5+
"analytics": false
56
},
67
"version": 1,
78
"newProjectRoot": "projects",
@@ -323,5 +324,12 @@
323324
}
324325
}
325326
},
326-
"defaultProject": "stream-chat-angular"
327+
"schematics": {
328+
"@angular-eslint/schematics:application": {
329+
"setParserOptionsProject": true
330+
},
331+
"@angular-eslint/schematics:library": {
332+
"setParserOptionsProject": true
333+
}
334+
}
327335
}

copy-generated-service-docs.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ fs.readdir(sourcePath, (err: any, files: string[]) => {
3131
}
3232

3333
// Remove the thre prefix from the title
34-
const result = data.replace(/# Class:/g, '#').replace('<T\\>', '');
34+
const result = data
35+
.replace(/# Class:/g, '#')
36+
.replace('<T\\>', '')
37+
.replace('\\', '');
3538

3639
fs.writeFile(`${sourcePath}/${file}`, result, 'utf8', (err: any) => {
3740
if (err) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
id: upgrade-v4
3+
title: Upgrade from v4
4+
---
5+
6+
## About version 5
7+
8+
This version takes care of some important housekeeping tasks that help provide better maintainability on the long run.
9+
10+
## Breaking changes
11+
12+
### Angular version support
13+
14+
Angular versions 12-14 are no longer supported. You can use the (Angular update guide)[https://update.angular.io/] to update your application.
15+
16+
## Type changes
17+
18+
- Event handlers with `Function` type are changed to `() => void`
19+
- Event handlers with `any` return types are changed to `void` return type

0 commit comments

Comments
 (0)