diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1eac4c8..c170068 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,14 +4,15 @@ on: push: branches: - 'main' + - 'beta' pull_request: {} jobs: build_test_release: strategy: matrix: - node-version: ${{ fromJSON(github.ref == 'refs/heads/main' && '[16]' || '[12,14,16]') }} - os: ${{ fromJSON(github.ref == 'refs/heads/main' && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest"]') }} + node-version: ${{ fromJSON((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta') && '[16]' || '[12,14,16]') }} + os: ${{ fromJSON((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta') && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest"]') }} runs-on: ${{ matrix.os }} steps: @@ -27,7 +28,7 @@ jobs: - name: test run: npm run test - name: Release - if: github.repository == 'timdeschryver/ngrx-immer' && github.ref == 'refs/heads/main' + if: github.repository == 'timdeschryver/ngrx-immer' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta') run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index f5901bc..219a8d5 100644 --- a/package.json +++ b/package.json @@ -2,25 +2,26 @@ "name": "ngrx-immer", "version": "0.0.0-development", "scripts": { - "test": "uvu -r ts-node/register -r tsconfig-paths/register src tests", + "test": "uvu -r tsm -r tsconfig-paths/register src tests", "build": "ng-packagr -p src/ng-package.json", "postbuild": "cpy README.md LICENSE dist && cpy schematics ../dist --parents --cwd=src" }, "devDependencies": { - "@angular/compiler": "^12.0.0", - "@angular/compiler-cli": "^12.0.0", - "@angular/core": "^12.0.0", - "@ngrx/component-store": "^12.0.0", - "@ngrx/store": "^12.0.0", + "@angular/compiler": "^13.0.0", + "@angular/compiler-cli": "^13.0.0", + "@angular/core": "^13.0.0", + "@ngrx/component-store": "^13.0.1", + "@ngrx/store": "^13.0.1", "cpy-cli": "^3.1.1", "immer": "^8.0.0", - "ng-packagr": "^12.0.0", + "ng-packagr": "^13.0.0", "prettier": "^2.2.1", "rimraf": "^3.0.2", - "rxjs": "^6.6.3", + "rxjs": "~7.4.0", "ts-node": "^10.2.1", "tsconfig-paths": "^3.10.1", - "typescript": "4.2.4", + "tsm": "^2.1.4", + "typescript": "4.4.4", "uvu": "^0.5.1" } } diff --git a/src/component-store/tests/immer-component-store.test.ts b/src/component-store/tests/immer-component-store.test.ts index f2f5417..f23b54a 100644 --- a/src/component-store/tests/immer-component-store.test.ts +++ b/src/component-store/tests/immer-component-store.test.ts @@ -1,3 +1,4 @@ +import '@angular/compiler'; import { test } from 'uvu'; import * as assert from 'uvu/assert'; diff --git a/src/package.json b/src/package.json index b314462..baa271f 100644 --- a/src/package.json +++ b/src/package.json @@ -28,8 +28,8 @@ }, "peerDependencies": { "immer": ">=7.0.0", - "@ngrx/component-store": ">=11.0.0", - "@ngrx/store": ">=11.0.0" + "@ngrx/component-store": ">=13.0.0", + "@ngrx/store": ">=13.0.0" }, "peerDependenciesMeta": { "@ngrx/component-store": { diff --git a/src/store/tests/create-immer-reducer.test.ts b/src/store/tests/create-immer-reducer.test.ts index 1192f07..6cfa789 100644 --- a/src/store/tests/create-immer-reducer.test.ts +++ b/src/store/tests/create-immer-reducer.test.ts @@ -1,3 +1,4 @@ +import '@angular/compiler'; import { test } from 'uvu'; import * as assert from 'uvu/assert'; diff --git a/tsconfig.json b/tsconfig.json index 6fcff11..6fa80f0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,24 +1,24 @@ { - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "baseUrl": ".", - "rootDir": ".", - "strict": true , - "noImplicitThis": true, - "alwaysStrict": true, - "noUnusedLocals": true , - "noUnusedParameters": true, - "noImplicitReturns": true, - "esModuleInterop": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "paths": { - "ngrx-immer": ["./src"], - "ngrx-immer/shared": ["./src/shared"], - "ngrx-immer/component-store": ["./src/component-store"], - "ngrx-immer/store": ["./src/store"] - } - }, - "exclude": ["node_modules"] -} \ No newline at end of file + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "baseUrl": ".", + "rootDir": ".", + "strict": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "paths": { + "ngrx-immer": ["./src"], + "ngrx-immer/shared": ["./src/shared"], + "ngrx-immer/component-store": ["./src/component-store"], + "ngrx-immer/store": ["./src/store"] + } + }, + "exclude": ["node_modules"] +}