Skip to content

Commit 3d48c3b

Browse files
author
Gérard Collin
committed
fix: upgraded vitest for plugin-sample
1 parent 3d8052e commit 3d48c3b

14 files changed

Lines changed: 90 additions & 97 deletions

File tree

common/config/rush/pnpm-lock.yaml

Lines changed: 26 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/xt-plugin-sample/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ trim_trailing_whitespace = true
1010

1111
[*.ts]
1212
quote_type = single
13+
ij_typescript_use_double_quotes = false
1314

1415
[*.md]
1516
max_line_length = off

libs/xt-plugin-sample/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ yarn-error.log
2626
!.vscode/tasks.json
2727
!.vscode/launch.json
2828
!.vscode/extensions.json
29+
!.vscode/mcp.json
2930
.history/*
3031

3132
# Miscellaneous
@@ -36,6 +37,7 @@ yarn-error.log
3637
/libpeerconnection.log
3738
testem.log
3839
/typings
40+
__screenshots__/
3941

4042
# System files
4143
.DS_Store

libs/xt-plugin-sample/.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"overrides": [
5+
{
6+
"files": "*.html",
7+
"options": {
8+
"parser": "angular"
9+
}
10+
}
11+
]
12+
}

libs/xt-plugin-sample/angular.json

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717
"prefix": "lib",
1818
"architect": {
1919
"build": {
20-
"builder": "@angular-devkit/build-angular:ng-packagr",
21-
"options": {
22-
"project": "projects/sample/ng-package.json"
23-
},
20+
"builder": "@angular/build:ng-packagr",
2421
"configurations": {
2522
"production": {
2623
"tsConfig": "projects/sample/tsconfig.lib.prod.json"
@@ -32,20 +29,16 @@
3229
"defaultConfiguration": "development"
3330
},
3431
"test": {
35-
"builder": "@analogjs/vitest-angular:test",
32+
"builder": "@angular/build:unit-test",
3633
"options": {
37-
"tsConfig": "projects/sample/tsconfig.spec.json",
38-
"polyfills": []
34+
"tsConfig": "projects/sample/tsconfig.spec.json"
3935
}
4036
}
4137
}
4238
},
4339
"sample-plugin": {
4440
"projectType": "application",
4541
"schematics": {
46-
"@schematics/angular:component": {
47-
"style": "css"
48-
}
4942
},
5043
"root": "projects/sample-plugin",
5144
"sourceRoot": "projects/sample-plugin/src",
@@ -71,11 +64,15 @@
7164
"target": "sample-plugin:serve-original:development",
7265
"rebuildDelay": 0,
7366
"dev": true,
67+
"cacheExternalArtifacts": false,
7468
"port": 0
7569
}
7670
},
71+
"test": {
72+
"builder": "@angular/build:unit-test"
73+
},
7774
"esbuild": {
78-
"builder": "@angular-devkit/build-angular:application",
75+
"builder": "@angular/build:application",
7976
"options": {
8077
"outputPath": "dist/xt-sample-plugin",
8178
"index": "projects/sample-plugin/src/index.html",
@@ -85,7 +82,6 @@
8582
"es-module-shims"
8683
],
8784
"tsConfig": "projects/sample-plugin/tsconfig.app.json",
88-
"inlineStyleLanguage": "css",
8985
"assets": [
9086
{
9187
"glob": "**/*",
@@ -94,8 +90,7 @@
9490
],
9591
"styles": [
9692
"projects/sample-plugin/src/styles.css"
97-
],
98-
"scripts": []
93+
]
9994
},
10095
"configurations": {
10196
"production": {
@@ -122,7 +117,7 @@
122117
"defaultConfiguration": "development"
123118
},
124119
"serve-original": {
125-
"builder": "@angular-devkit/build-angular:dev-server",
120+
"builder": "@angular/build:dev-server",
126121
"configurations": {
127122
"production": {
128123
"buildTarget": "sample-plugin:esbuild:production"
@@ -135,28 +130,7 @@
135130
"options": {
136131
"port": 4201
137132
}
138-
},
139-
"extract-i18n": {
140-
"builder": "@angular-devkit/build-angular:extract-i18n"
141-
},
142-
"test": {
143-
"builder": "@analogjs/vitest-angular:test",
144-
"options": {
145-
"polyfills": [],
146-
"tsConfig": "projects/sample-plugin/tsconfig.spec.json",
147-
"inlineStyleLanguage": "css",
148-
"assets": [
149-
{
150-
"glob": "**/*",
151-
"input": "projects/sample-plugin/public"
152-
}
153-
],
154-
"styles": [
155-
"projects/sample-plugin/src/styles.css"
156-
],
157-
"scripts": []
158-
}
159-
}
133+
}
160134
}
161135
}
162136
}

libs/xt-plugin-sample/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build": "ng build sample --configuration=development",
88
"build-deploy": "APP=sample-plugin && MAIN_LIB=sample && ng build $MAIN_LIB --configuration=$BUILD && ng build $APP --configuration=$BUILD --output-path=\"../../dist/$STAGE/$APP\" --base-href=\"https://dont-code.net/apps/$STAGE/$APP/\" && rm -f ../../dist/$STAGE/$APP/*.* && mv ../../dist/$STAGE/$APP/browser/* ../../dist/$STAGE/$APP",
99
"watch": "ng build --watch --configuration=development",
10-
"test": "cd projects/sample && ../../node_modules/.bin/vitest && cd ../sample-plugin && ../../node_modules/.bin/vitest"
10+
"test": "ng test sample && ng test sample-plugin"
1111
},
1212
"repository": {
1313
"url": "https://github.com/dont-code/ng-xtend.git"
@@ -35,8 +35,7 @@
3535
"primeicons": "^7.0.0",
3636
"@primeuix/themes": "^2.0.3",
3737
"tslib": "^2.8.1",
38-
"@angular-architects/native-federation": "^21.2.3",
39-
"@softarc/native-federation-runtime": "^3.3.6"
38+
"@softarc/native-federation-node": "^3.3.4"
4039
},
4140
"devDependencies": {
4241
"@primeuix/utils": "^0.7.1",
@@ -46,12 +45,12 @@
4645
"@angular/build": "^21.2.6",
4746
"@angular/compiler-cli": "^21.2.7",
4847
"ng-packagr": "^21.2.2",
48+
"@angular-architects/native-federation": "^21.2.3",
4949
"typescript": "^5.9.3",
5050
"happy-dom": "^20.8.9",
51-
"@analogjs/vite-plugin-angular": "^2.4.0",
52-
"@analogjs/vitest-angular": "^2.4.0",
51+
"@types/node": "^24.12.2",
5352
"jsdom": "^29.0.1",
54-
"vite": "^8.0.3",
53+
"prettier": "^3.8.1",
5554
"vitest": "^4.1.2"
5655
}
5756
}

libs/xt-plugin-sample/projects/sample-plugin/vitest.config.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

libs/xt-plugin-sample/projects/sample/tsconfig.lib.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"declarationMap": true,
99
"types": []
1010
},
11-
"exclude": [
12-
"**/*.spec.ts"
13-
]
11+
"include": ["src/**/*.ts"],
12+
"exclude": ["**/*.spec.ts"]
1413
}

libs/xt-plugin-sample/projects/sample/tsconfig.spec.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@
44
"extends": "../../tsconfig.json",
55
"compilerOptions": {
66
"outDir": "../../out-tsc/spec",
7-
"target": "es2016",
8-
"types": [
9-
"vitest/globals","node"
10-
],
11-
"emitDecoratorMetadata": true
7+
"types": ["vitest/globals"]
128
},
13-
"files": ["src/test-setup.ts"],
14-
"include": [
15-
"src/**/*.spec.ts",
16-
"src/**/*.d.ts"
17-
]
9+
"include": ["src/**/*.d.ts", "src/**/*.spec.ts"]
1810
}

libs/xt-plugin-sample/tsconfig.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,12 @@
1313
"esModuleInterop": true,
1414
"sourceMap": true,
1515
"declaration": false,
16+
"isolatedModules": true,
1617
"experimentalDecorators": true,
1718
"moduleResolution": "bundler",
1819
"importHelpers": true,
1920
"target": "ES2022",
20-
"module": "ES2022",
21-
"useDefineForClassFields": false,
22-
"lib": [
23-
"ES2022",
24-
"dom"
25-
],
21+
"module": "preserve",
2622
"paths": {
2723
}
2824

0 commit comments

Comments
 (0)