Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 22 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,22 @@ on:
branches:
- main
jobs:
yarn-install:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- id: cache
name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}

- name: Yarn Install
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install
build:
runs-on: ubuntu-latest
needs: [yarn-install]
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Cache node modules
uses: actions/cache@v4
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}
cache: true

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: yarn build
run: pnpm build

- name: Archive build artifacts
uses: actions/upload-artifact@v4
Expand All @@ -49,11 +34,13 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Restore node modules
uses: actions/cache@v4
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}
cache: true

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Download build artifacts
uses: actions/download-artifact@v4
Expand All @@ -62,21 +49,22 @@ jobs:
path: dist

- name: Type-check published types
run: yarn test:types
run: pnpm test:types
test:
runs-on: ubuntu-latest
needs: [yarn-install]
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Restore node modules
uses: actions/cache@v4
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}
cache: true

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Test
run: yarn test:ci
run: pnpm test:ci
- name: Lint
run: yarn lint
run: pnpm lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ speed-measure-plugin.json
/libpeerconnection.log
npm-debug.log
yarn-error.log
pnpm-debug.log*
testem.log
/typings

Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit $1
pnpm commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-prefix=''
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ This fork, published as [`@openng/spectator`](https://www.npmjs.com/package/@ope
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [NPM](#npm)
- [Yarn](#yarn)
- [pnpm](#pnpm)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- [yarn](#yarn)
- [Compatibility Matrix](#compatibility-matrix)
- [Testing Components](#testing-components)
- [Events API](#events-api)
Expand Down Expand Up @@ -93,7 +94,11 @@ This fork, published as [`@openng/spectator`](https://www.npmjs.com/package/@ope

`npm install @openng/spectator --save-dev`

### Yarn
### pnpm

`pnpm add @openng/spectator --dev`

### yarn

`yarn add @openng/spectator --dev`

Expand Down
102 changes: 52 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,74 +3,76 @@
"license": "MIT",
"description": "Angular tests made easy",
"private": true,
"workspaces": [
"projects/*"
],
"packageManager": "pnpm@10.33.1",
"engines": {
"npm": "please-use-yarn",
"yarn": ">= 1.22.0"
"npm": "please-use-pnpm",
"pnpm": ">=10.0.0"
},
"scripts": {
"prepare": "husky install",
"ng": "ng",
"build": "ng build --configuration production && yarn build:schematics && yarn copy:schematics && yarn copy:docs",
"build": "ng build --configuration production && pnpm build:schematics && pnpm copy:schematics && pnpm copy:docs",
"build:schematics": "tsc -p projects/spectator/schematics/tsconfig.json",
"test": "ng test",
"test:jest": "ng run spectator:test-jest",
"test:vitest": "ng run spectator:test-vitest",
"test:types": "tsc -p type-tests/jasmine && tsc -p type-tests/jest && tsc -p type-tests/vitest",
"test:ci": "cross-env NODE_ENV=build yarn test && yarn test:jest --silent && yarn test:vitest",
"test:ci": "cross-env NODE_ENV=build pnpm test && pnpm test:jest --silent && pnpm test:vitest",
"lint": "ng lint",
"format": "prettier --write \"{projects,src}/**/*.ts\"",
"commit": "git-cz",
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate",
"copy:docs": "cp *.md dist/spectator",
"copy:schematics": "cp -r projects/spectator/schematics/src/ dist/spectator/schematics",
"postbump": "yarn build",
"postbump": "pnpm build",
"release": "cd projects/spectator && standard-version --infile ../../CHANGELOG.md",
"release:dry": "cd projects/spectator && standard-version --infile ../../CHANGELOG.md --dry-run"
},
"devDependencies": {
"@analogjs/vite-plugin-angular": "^2.6.2",
"@analogjs/vitest-angular": "^2.6.2",
"@angular-builders/jest": "^22.0.1",
"@angular-devkit/architect": "^0.2200.5",
"@angular-devkit/build-angular": "^22.0.5",
"@angular-devkit/schematics": "^22.0.5",
"@angular/animations": "^22.0.5",
"@angular/build": "^22.0.5",
"@angular/cdk": "^22.0.3",
"@angular/cli": "^22.0.5",
"@angular/common": "^22.0.5",
"@angular/compiler": "^22.0.5",
"@angular/compiler-cli": "^22.0.5",
"@angular/core": "^22.0.5",
"@angular/forms": "^22.0.5",
"@angular/language-service": "^22.0.5",
"@angular/platform-browser": "^22.0.5",
"@angular/platform-browser-dynamic": "^22.0.5",
"@angular/router": "22.0.5",
"@analogjs/vite-plugin-angular": "2.7.2",
"@analogjs/vitest-angular": "2.7.2",
"@angular-builders/jest": "22.0.1",
"@angular-devkit/architect": "0.2200.9",
"@angular-devkit/build-angular": "22.1.8",
"@angular-devkit/core": "22.1.8",
"@angular-devkit/schematics": "22.1.8",
"@angular/animations": "22.1.6",
"@angular/build": "22.1.8",
"@angular/cdk": "22.1.6",
"@angular/cli": "22.1.8",
"@angular/common": "22.1.6",
"@angular/compiler": "22.1.6",
"@angular/compiler-cli": "22.1.6",
"@angular/core": "22.1.6",
"@angular/forms": "22.1.6",
"@angular/language-service": "22.1.6",
"@angular/platform-browser": "22.1.6",
"@angular/platform-browser-dynamic": "22.1.6",
"@angular/router": "22.1.6",
"@commitlint/cli": "17.3.0",
"@emnapi/core": "^1.7.1",
"@emnapi/runtime": "^1.7.1",
"@commitlint/config-angular": "17.3.0",
"@commitlint/config-conventional": "17.3.0",
"@emnapi/core": "1.11.3",
"@emnapi/runtime": "1.11.3",
"@jest/globals": "30.4.1",
"@schematics/angular": "22.1.8",
"@testing-library/dom": "10.4.1",
"@types/jasmine": "5.1.4",
"@types/jest": "30.0.0",
"@types/node": "^26.1.0",
"@typescript-eslint/eslint-plugin": "^8.62.1",
"@typescript-eslint/parser": "^8.62.1",
"all-contributors-cli": "^6.19.0",
"angular-eslint": "^22.0.0",
"core-js": "^3.9.1",
"cross-env": "^5.1.4",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^9.28.0",
"git-cz": "^4.7.6",
"helpful-decorators": "^2.1.0",
"husky": "^8.0.2",
"istanbul-lib-instrument": "^6.0.3",
"@types/node": "26.5.1",
"@typescript-eslint/eslint-plugin": "8.70.0",
"@typescript-eslint/parser": "8.70.0",
"all-contributors-cli": "6.26.1",
"angular-eslint": "22.5.0",
"core-js": "3.50.0",
"cross-env": "5.2.1",
"cz-conventional-changelog": "3.3.0",
"eslint": "9.39.5",
"git-cz": "4.9.0",
"helpful-decorators": "2.1.0",
"husky": "8.0.3",
"istanbul-lib-instrument": "6.0.3",
"jasmine-core": "5.1.1",
"jasmine-spec-reporter": "7.0.0",
"jest": "30.4.2",
Expand All @@ -82,18 +84,18 @@
"karma-coverage": "2.2.1",
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.1.0",
"lint-staged": "^13.1.0",
"lint-staged": "13.3.0",
"ng-packagr": "22.0.1",
"prettier": "3.5.3",
"rxjs": "7.8.1",
"standard-version": "^9.1.0",
"rxjs": "7.8.2",
"standard-version": "9.5.0",
"ts-node": "10.1.0",
"tslib": "^2.6.2",
"tslib": "2.8.1",
"typescript": "6.0.3",
"typescript-eslint": "^8.62.1",
"vite": "^7.3.5",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^4.1.9",
"typescript-eslint": "8.70.0",
"vite": "7.3.6",
"vite-tsconfig-paths": "5.1.4",
"vitest": "4.1.11",
"zone.js": "0.15.0"
},
"config": {
Expand Down
Loading
Loading