Skip to content

Commit 60cf185

Browse files
authored
feat!: remove deprecated enum levels (#216)
## PR Checklist Please check if your PR fulfills the following requirements: - [x] The commit message follows our guidelines: CONTRIBUTING.md#commit - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> ``` [ ] Bugfix [x] Feature [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Build related changes [ ] CI related changes [ ] Documentation content changes [ ] Other... Please describe: ``` ## What is the current behavior? We support both enum-based and literal union-based log levels. ## What is the new behavior? The deprecated enum-based log levels have been removed. ## Does this PR introduce a breaking change? ``` [x] Yes [ ] No ``` BREAKING CHANGES: Remove deprecated enum-based log levels
1 parent 762206f commit 60cf185

39 files changed

+92
-224
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,10 @@ jobs:
9595
- name: Run NX Commands
9696
run: |
9797
pnpm exec nx-cloud record -- nx format:check
98-
pnpm exec nx affected -t lint test build e2e-ci
98+
pnpm exec nx affected -t lint test:ci build e2e-ci
9999
100100
sonarcloud:
101101
name: SonarCloud
102-
needs: main
103102
runs-on: ubuntu-latest
104103
permissions:
105104
id-token: write
@@ -114,16 +113,16 @@ jobs:
114113
uses: ./.github/actions/setup
115114
# Uses the cache generated in the distributed step (Needed for the sonar eslint reports).
116115
- name: Lint with reports
117-
run: pnpm exec nx run-many --all --target=lint --configuration=report --parallel=2 --max-warnings=0
116+
run: pnpm exec nx run-many --target=lint --configuration=report --parallel=2 --max-warnings=0
118117
# Uses the cache generated in the distributed step (Needed for the sonar jest coverage reports).
119118
- name: Tests with coverage
120-
run: pnpm exec nx run-many --all --target=test --configuration=coverage --parallel=1 --max-workers=2
119+
run: pnpm exec nx run-many --target=test --configuration=ci --parallel=1 --max-workers=2
121120

122121
- name: Configure Sonar report paths
123122
run: pnpm run configure-sonar-report-paths
124123

125124
- name: SonarCloud Scan
126-
uses: sonarsource/sonarcloud-github-action@v2.1.1
125+
uses: sonarsource/sonarcloud-github-action@v3.1.0
127126
env:
128127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
129128
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

nx.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
},
3131
"@nx/eslint:lint": {
3232
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
33-
"cache": true,
34-
"outputs": ["{options.outputFile}"]
33+
"cache": true
3534
},
3635
"@angular-devkit/build-angular:application": {
3736
"cache": true,

packages/examples/lumberjack-app/jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export default {
44
preset: '../../../jest.preset.js',
55
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
66
globals: {},
7+
coverageReporters: ['lcovonly', 'text-summary'],
78
coverageDirectory: '../../../coverage/packages/examples/lumberjack-app',
89
transform: {
910
'^.+\\.(ts|mjs|js|html)$': [

packages/examples/lumberjack-app/project.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@
8282
"ci": {
8383
"ci": true,
8484
"coverage": true
85-
},
86-
"coverage": {
87-
"ci": true,
88-
"coverageReporters": ["lcovonly", "text-summary"],
89-
"coverage": true
9085
}
9186
}
9287
},
@@ -98,6 +93,15 @@
9893
"staticFilePath": "dist/packages/examples/lumberjack-app/browser",
9994
"spa": true
10095
}
96+
},
97+
"lint": {
98+
"outputs": ["{workspaceRoot}/reports/packages/examples/lumberjack-app/lint/report.json"],
99+
"configurations": {
100+
"report": {
101+
"format": "json",
102+
"output-file": "../../../reports/packages/examples/lumberjack-app/lint/report.json"
103+
}
104+
}
101105
}
102106
}
103107
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
import 'jest-preset-angular/setup-jest';
1+
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
2+
3+
setupZoneTestEnv();

packages/internal/console-driver/test-util/jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export default {
44
preset: '../../../../jest.preset.js',
55
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
66
globals: {},
7+
coverageReporters: ['lcovonly', 'text-summary'],
78
coverageDirectory: '../../../../coverage/packages/internal/console-driver/test-util',
89
transform: {
910
'^.+\\.(ts|mjs|js|html)$': [

packages/internal/console-driver/test-util/project.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,15 @@
1515
"ci": {
1616
"ci": true,
1717
"coverage": true
18-
},
19-
"coverage": {
20-
"ci": true,
21-
"coverageReporters": ["lcovonly", "text-summary"],
22-
"coverage": true
2318
}
2419
}
2520
},
2621
"lint": {
22+
"outputs": ["{workspaceRoot}/reports/packages/internal/console-driver/test-util/lint/report.json"],
2723
"configurations": {
2824
"report": {
2925
"format": "json",
30-
"output-file": "reports/packages/internal/console-driver/test-util/lint/report.json"
26+
"output-file": "../../../../reports/packages/internal/console-driver/test-util/lint/report.json"
3127
}
3228
}
3329
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
import 'jest-preset-angular/setup-jest';
1+
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
2+
3+
setupZoneTestEnv();

packages/internal/test-util/jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export default {
44
preset: '../../../jest.preset.js',
55
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
66
globals: {},
7+
coverageReporters: ['lcovonly', 'text-summary'],
78
coverageDirectory: '../../../coverage/packages/internal/test-util',
89
transform: {
910
'^.+\\.(ts|mjs|js|html)$': [

packages/internal/test-util/project.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,15 @@
1515
"ci": {
1616
"ci": true,
1717
"coverage": true
18-
},
19-
"coverage": {
20-
"ci": true,
21-
"coverageReporters": ["lcovonly", "text-summary"],
22-
"coverage": true
2318
}
2419
}
2520
},
2621
"lint": {
22+
"outputs": ["{workspaceRoot}/reports/packages/internal/test-util/lint/report.json"],
2723
"configurations": {
2824
"report": {
2925
"format": "json",
30-
"output-file": "reports/packages/internal/test-util/lint/report.json"
26+
"output-file": "../../../reports/packages/internal/test-util/lint/report.json"
3127
}
3228
}
3329
}

0 commit comments

Comments
 (0)