Skip to content

Commit 24a1c31

Browse files
authored
feat(ref: no-ref): angular v20 (#132)
* feat(no-ref): bump ver * feat(ref: no-ref): angular v20 * fix(no-ref): platformBrowserTesting * fix(no-ref): remove extra code * fix(no-ref): remove extra code * feat(no-ref): vitest * feat(no-ref): ts ver
1 parent 7847224 commit 24a1c31

File tree

8 files changed

+1116
-827
lines changed

8 files changed

+1116
-827
lines changed

angular.json

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,34 @@
77
"style": "scss",
88
"standalone": true,
99
"changeDetection": "OnPush",
10-
"viewEncapsulation": "Emulated"
10+
"viewEncapsulation": "Emulated",
11+
"type": "component"
1112
},
1213
"@schematics/angular:directive": {
13-
"standalone": true
14+
"standalone": true,
15+
"type": "directive"
1416
},
1517
"@schematics/angular:pipe": {
16-
"standalone": true
18+
"standalone": true,
19+
"typeSeparator": "."
1720
},
1821
"@schematics/angular:application": {
1922
"strict": true
23+
},
24+
"@schematics/angular:service": {
25+
"type": "service"
26+
},
27+
"@schematics/angular:guard": {
28+
"typeSeparator": "."
29+
},
30+
"@schematics/angular:interceptor": {
31+
"typeSeparator": "."
32+
},
33+
"@schematics/angular:module": {
34+
"typeSeparator": "."
35+
},
36+
"@schematics/angular:resolver": {
37+
"typeSeparator": "."
2038
}
2139
},
2240
"projects": {
@@ -85,17 +103,7 @@
85103
"test": {
86104
"builder": "@angular-devkit/build-angular:web-test-runner",
87105
"options": {
88-
"tsConfig": "tsconfig.spec.json",
89-
"inlineStyleLanguage": "scss",
90-
"assets": [
91-
"src/favicon.ico",
92-
"src/assets",
93-
"src/robots.txt",
94-
"src/sitemap.xml"
95-
],
96-
"polyfills": ["zone.js", "zone.js/testing"],
97-
"styles": ["src/styles.scss"],
98-
"scripts": []
106+
"tsConfig": "tsconfig.spec.json"
99107
}
100108
},
101109
"lint": {

bun.lock

Lines changed: 985 additions & 752 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 58 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-loader-indicator",
3-
"version": "19.0.1",
3+
"version": "20.0.0",
44
"description": "The best directive without wrapping your element to additional component",
55
"license": "MIT",
66
"keywords": [
@@ -19,8 +19,9 @@
1919
"build:lib": "ng build --configuration production ngx-loader-indicator-lib && bun run copy-libdocs",
2020
"copy-libdocs": "cp README.md LICENSE dist/ngx-loader-indicator-lib",
2121
"publish:lib": "cd dist/ngx-loader-indicator-lib && bun publish",
22-
"test": "ng test",
23-
"test:pre-commit": "ng test --watch=false",
22+
"test": "npx vitest",
23+
"test:pre-commit": "npx vitest run",
24+
"test:coverage": "npx vitest run --coverage",
2425
"lint": "npx eslint . && bun run lint:scss",
2526
"lint:scss": "stylelint \"**/*.scss\"",
2627
"lint:scss:fix": "stylelint \"**/*.scss\" --fix",
@@ -36,65 +37,70 @@
3637
"url": "https://github.com/JsDaddy/ngx-loader-indicator.git"
3738
},
3839
"dependencies": {
39-
"@angular/animations": "19.2.8",
40-
"@angular/common": "19.2.8",
41-
"@angular/compiler": "19.2.8",
42-
"@angular/core": "19.2.8",
43-
"@angular/forms": "19.2.8",
44-
"@angular/platform-browser": "19.2.8",
45-
"@angular/platform-browser-dynamic": "19.2.8",
46-
"@angular/router": "^19.2.8",
47-
"@tailwindcss/postcss": "^4.1.4",
48-
"core-js": "3.42.0",
40+
"@angular/animations": "20.1.4",
41+
"@angular/common": "20.1.4",
42+
"@angular/compiler": "20.1.4",
43+
"@angular/core": "20.1.4",
44+
"@angular/forms": "20.1.4",
45+
"@angular/platform-browser": "20.1.4",
46+
"@angular/platform-browser-dynamic": "20.1.4",
47+
"@angular/router": "^20.1.4",
48+
"@tailwindcss/postcss": "^4.1.11",
49+
"core-js": "3.45.0",
4950
"highlight.js": "^11.11.1",
50-
"ngx-highlightjs": "^14.0.0",
51-
"ngxtension": "5.0.0",
52-
"rxjs": "7.8.2"
51+
"ngx-highlightjs": "^14.0.1",
52+
"ngxtension": "5.1.0",
53+
"rxjs": "7.8.2",
54+
"zone.js": "^0.15.1"
5355
},
5456
"devDependencies": {
55-
"@angular-devkit/build-angular": "19.2.9",
56-
"@angular-eslint/builder": "19.3.0",
57-
"@angular-eslint/eslint-plugin": "19.3.0",
58-
"@angular-eslint/eslint-plugin-template": "19.3.0",
59-
"@angular-eslint/schematics": "19.3.0",
60-
"@angular-eslint/template-parser": "19.3.0",
61-
"@angular/cli": "19.2.9",
62-
"@angular/compiler-cli": "19.2.8",
63-
"@angular/language-service": "19.2.8",
64-
"@commitlint/cli": "19.8.0",
65-
"@commitlint/config-conventional": "19.8.0",
66-
"@types/jasmine": "5.1.7",
57+
"@angular-devkit/build-angular": "20.1.4",
58+
"@angular-eslint/builder": "20.1.1",
59+
"@angular-eslint/eslint-plugin": "20.1.1",
60+
"@angular-eslint/eslint-plugin-template": "20.1.1",
61+
"@angular-eslint/schematics": "20.1.1",
62+
"@angular-eslint/template-parser": "20.1.1",
63+
"@angular/cli": "20.1.4",
64+
"@angular/compiler-cli": "20.1.4",
65+
"@angular/language-service": "20.1.4",
66+
"@commitlint/cli": "19.8.1",
67+
"@commitlint/config-conventional": "19.8.1",
68+
"@types/jasmine": "5.1.8",
6769
"@types/jasminewd2": "2.0.13",
68-
"@types/node": "22.15.3",
69-
"@typescript-eslint/eslint-plugin": "8.31.1",
70-
"@web/test-runner": "^0.20.1",
71-
"angular-eslint": "^19.3.0",
72-
"eslint": "9.25.1",
73-
"eslint-config-prettier": "10.1.2",
74-
"eslint-plugin-import": "2.31.0",
70+
"@types/node": "24.2.0",
71+
"@typescript-eslint/eslint-plugin": "8.39.0",
72+
"@vitest/browser": "^3.2.4",
73+
"@vitest/coverage-v8": "3.2.4",
74+
"@web/test-runner": "^0.20.2",
75+
"angular-eslint": "^20.1.1",
76+
"bun-types": "^1.2.19",
77+
"eslint": "9.32.0",
78+
"eslint-config-prettier": "10.1.8",
79+
"eslint-plugin-import": "2.32.0",
7580
"eslint-plugin-json": "4.0.1",
76-
"eslint-plugin-prettier": "5.2.6",
77-
"jasmine-core": "5.7.0",
81+
"eslint-plugin-prettier": "5.5.3",
82+
"jasmine-core": "5.9.0",
7883
"jasmine-spec-reporter": "7.0.0",
79-
"lint-staged": "15.5.1",
80-
"ng-packagr": "19.2.2",
81-
"npm-check-updates": "^18.0.1",
82-
"prettier": "3.5.3",
83-
"puppeteer": "24.7.2",
84-
"semantic-release": "24.2.3",
85-
"semantic-release-export-data": "1.1.0",
86-
"snyk": "^1.1296.2",
87-
"stylelint": "16.19.1",
84+
"jsdom": "^26.1.0",
85+
"lint-staged": "16.1.4",
86+
"ng-packagr": "20.1.0",
87+
"npm-check-updates": "^18.0.2",
88+
"postcss": "^8.5.6",
89+
"prettier": "3.6.2",
90+
"puppeteer": "24.15.0",
91+
"semantic-release": "24.2.7",
92+
"semantic-release-export-data": "1.1.1",
93+
"snyk": "^1.1298.2",
94+
"stylelint": "16.23.0",
8895
"stylelint-config-prettier": "9.0.5",
89-
"stylelint-config-recommended-scss": "14.1.0",
96+
"stylelint-config-recommended-scss": "15.0.1",
9097
"stylelint-prettier": "5.0.3",
98+
"tailwindcss": "^4.1.11",
9199
"ts-node": "10.9.2",
92100
"type-coverage": "^2.29.7",
93-
"typescript": "5.8.3",
94-
"typescript-eslint": "^8.31.1",
95-
"tailwindcss": "^4.1.4",
96-
"bun-types": "^1.2.11",
97-
"postcss": "^8.5.3"
101+
"typescript": "5.8.2",
102+
"typescript-eslint": "^8.39.0",
103+
"vitest": "^3.2.4"
98104
},
99105
"typeCoverage": {
100106
"atLeast": 98,

projects/ngx-loader-indicator-lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-loader-indicator",
3-
"version": "19.0.1",
3+
"version": "20.0.0",
44
"description": "The best directive without wrapping your element to additional component",
55
"license": "MIT",
66
"keywords": [
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
1+
// This file is required by vitest and loads recursively all the .spec and framework files
2+
import 'zone.js';
23
import 'zone.js/testing';
34
import { getTestBed } from '@angular/core/testing';
4-
import {
5-
BrowserDynamicTestingModule,
6-
platformBrowserDynamicTesting,
7-
} from '@angular/platform-browser-dynamic/testing';
5+
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
86

97
// First, initialize the Angular testing environment.
10-
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
8+
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), {
119
teardown: { destroyAfterEach: false },
1210
});

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { provideExperimentalZonelessChangeDetection } from '@angular/core';
1+
import { provideZonelessChangeDetection } from '@angular/core';
22
import { provideHttpClient } from '@angular/common/http';
33
import { bootstrapApplication } from '@angular/platform-browser';
44
import { provideAnimations } from '@angular/platform-browser/animations';
@@ -12,7 +12,7 @@ import { AppComponent } from './app/app.component';
1212

1313
bootstrapApplication(AppComponent, {
1414
providers: [
15-
provideExperimentalZonelessChangeDetection(),
15+
provideZonelessChangeDetection(),
1616
provideAnimations(),
1717
provideRouter([]),
1818
GithubStarsService,

src/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

vitest.config.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { defineConfig } from 'vitest/config';
2+
import { resolve } from 'path';
3+
4+
export default defineConfig({
5+
test: {
6+
globals: true,
7+
environment: 'jsdom',
8+
setupFiles: ['./src/test.ts'],
9+
include: ['**/*.spec.ts'],
10+
exclude: [
11+
'node_modules/**',
12+
'dist/**',
13+
'**/*.d.ts',
14+
'src/test.ts',
15+
'projects/ngx-loader-indicator-lib/src/test.ts',
16+
],
17+
coverage: {
18+
provider: 'v8',
19+
reporter: ['text', 'json', 'html'],
20+
exclude: [
21+
'node_modules/**',
22+
'dist/**',
23+
'**/*.spec.ts',
24+
'src/test.ts',
25+
'src/main.ts',
26+
'projects/ngx-loader-indicator-lib/src/test.ts',
27+
'**/*.config.*',
28+
'**/*.d.ts',
29+
'**/index.ts',
30+
'**/public-api.ts',
31+
],
32+
include: ['src/**/*.ts', 'projects/ngx-loader-indicator-lib/src/**/*.ts'],
33+
},
34+
},
35+
resolve: {
36+
alias: {
37+
'ngx-loader-indicator': resolve(
38+
__dirname,
39+
'./projects/ngx-loader-indicator-lib/src/public-api'
40+
),
41+
},
42+
},
43+
});

0 commit comments

Comments
 (0)