Skip to content

Commit

Permalink
Merge pull request #92 from basics/beta
Browse files Browse the repository at this point in the history
Beta
  • Loading branch information
StephanGerbeth authored Nov 25, 2024
2 parents 8417442 + 22b1a59 commit 4210a22
Show file tree
Hide file tree
Showing 16 changed files with 50 additions and 17 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions packages/observables/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Project Changelog

# [@rxjs-collection/observables-v1.0.6-beta.1](https://github.com/basics/rxjs-collection/compare/@rxjs-collection/observables-v1.0.5...@rxjs-collection/observables-v1.0.6-beta.1) (2024-11-25)


### Bug Fixes

* **operators:** restructured and added aliases ([1e53881](https://github.com/basics/rxjs-collection/commit/1e5388145a60f7cdb8c2ff1a980df204ad64b4f3))

# [@rxjs-collection/observables-v1.0.5](https://github.com/basics/rxjs-collection/compare/@rxjs-collection/observables-v1.0.4...@rxjs-collection/observables-v1.0.5) (2024-11-24)


Expand Down
5 changes: 4 additions & 1 deletion packages/observables/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rxjs-collection/observables",
"version": "1.0.5",
"version": "1.0.6-beta.1",
"description": "rxjs observables",
"license": "MIT",
"contributors": [
Expand All @@ -17,6 +17,9 @@
"scripts": {
"release": "npx semantic-release"
},
"imports": {
"#mocks/*": "../mocks/*"
},
"dependencies": {
"@rxjs-collection/operators": "*",
"rxjs": "7.8.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/observables/src/dom/window.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { mockOffline, mockOnline, mockReset } from '#mocks/network.js';
import { tap } from 'rxjs';
import { TestScheduler } from 'rxjs/testing';
import { beforeEach, test, expect, describe, afterEach } from 'vitest';

import { mockOffline, mockOnline, mockReset } from '../../../mock/network.js';
import { connectionObservable } from './window.js';

// HINT: https://betterprogramming.pub/rxjs-testing-write-unit-tests-for-observables-603af959e251
Expand Down
7 changes: 7 additions & 0 deletions packages/operators/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Project Changelog

# [@rxjs-collection/operators-v1.0.10-beta.1](https://github.com/basics/rxjs-collection/compare/@rxjs-collection/operators-v1.0.9...@rxjs-collection/operators-v1.0.10-beta.1) (2024-11-25)


### Bug Fixes

* **operators:** restructured and added aliases ([1e53881](https://github.com/basics/rxjs-collection/commit/1e5388145a60f7cdb8c2ff1a980df204ad64b4f3))

# [@rxjs-collection/operators-v1.0.9](https://github.com/basics/rxjs-collection/compare/@rxjs-collection/operators-v1.0.8...@rxjs-collection/operators-v1.0.9) (2024-11-24)


Expand Down
6 changes: 5 additions & 1 deletion packages/operators/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rxjs-collection/operators",
"version": "1.0.9",
"version": "1.0.10-beta.1",
"description": "rxjs operators",
"license": "MIT",
"contributors": [
Expand All @@ -17,6 +17,10 @@
"scripts": {
"release": "npx semantic-release"
},
"imports": {
"#observables/*": "../observables/src/*",
"#mocks/*": "../mocks/*"
},
"dependencies": {
"@rxjs-collection/observables": "*",
"ansi-colors": "4.1.3",
Expand Down
14 changes: 14 additions & 0 deletions packages/operators/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export { autoPagination } from './request/autoPagination';
export { cache } from './request/cache';
export { concurrentRequest } from './request/concurrentRequest';
export { lazyPagination } from './request/lazyPagination';
export { polling } from './request/polling';
export { request, requestJSON, requestText, requestBlob } from './request/request';
export {
resolve,
resolveJSON,
resolveText,
resolveBlob,
distinctUntilResponseChanged
} from './request/response';
export { retryWhenError } from './request/retry';
4 changes: 2 additions & 2 deletions packages/operators/src/request/autoPagination.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { mockAsync } from '#mocks/async';
import { mockResponse } from '#mocks/response';
import { concatAll, delay, from, map, of } from 'rxjs';
import { TestScheduler } from 'rxjs/testing';
import { afterAll, beforeAll, beforeEach, describe, expect, test, vi } from 'vitest';

import { mockAsync } from '../../../mock/async';
import { mockResponse } from '../../../mock/response';
import { log, logResult } from '../log';
import { resolveJSON } from './response';

Expand Down
4 changes: 2 additions & 2 deletions packages/operators/src/request/concurrentRequest.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { mockAsync } from '#mocks/async';
import { mockResponse } from '#mocks/response';
import { concatAll, delay, map, of } from 'rxjs';
import { TestScheduler } from 'rxjs/testing';
import { afterAll, beforeAll, beforeEach, describe, expect, test, vi } from 'vitest';

import { mockAsync } from '../../../mock/async';
import { mockResponse } from '../../../mock/response';
import { log, logResult } from '../log';
import { resolveJSON, resolveText } from './response';

Expand Down
4 changes: 2 additions & 2 deletions packages/operators/src/request/lazyPagination.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { mockAsync } from '#mocks/async';
import { mockResponse } from '#mocks/response';
import { concatAll, delay, map, of, Subject, tap } from 'rxjs';
import { TestScheduler } from 'rxjs/testing';
import { afterAll, beforeAll, beforeEach, describe, expect, test, vi } from 'vitest';

import { mockAsync } from '../../../mock/async';
import { mockResponse } from '../../../mock/response';
import { log, logResult } from '../log';
import { resolveJSON } from './response';

Expand Down
5 changes: 2 additions & 3 deletions packages/operators/src/request/polling.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { mockAsync } from '#mocks/async';
import { mockResponse } from '#mocks/response';
import { concatMap } from 'rxjs';
import { TestScheduler } from 'rxjs/testing';
import { afterAll, beforeAll, beforeEach, describe, expect, test, vi } from 'vitest';

import { mockAsync } from '../../../mock/async';
import { mockResponse } from '../../../mock/response';

describe('polling', () => {
let testScheduler;

Expand Down
4 changes: 2 additions & 2 deletions packages/operators/src/request/request.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { mockAsync } from '#mocks/async.js';
import { mockResponse } from '#mocks/response.js';
import { readFile } from 'node:fs/promises';
import { of } from 'rxjs';
import { TestScheduler } from 'rxjs/testing';
import { test, describe, beforeEach, expect, vi, afterAll, beforeAll } from 'vitest';

import { mockAsync } from '../../../mock/async.js';
import { mockResponse } from '../../../mock/response.js';
import { log, logResult } from '../log.js';
import { resolveJSON } from './response.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/operators/src/request/response.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { mockResponse } from '#mocks/response';
import { concatMap } from 'rxjs';
import { TestScheduler } from 'rxjs/testing';
import { afterEach, test, describe, beforeEach, expect, vi, beforeAll } from 'vitest';

import { mockResponse } from '../../../mock/response';
import { log } from '../log';
import { distinctUntilResponseChanged, resolveJSON, resolveText } from './response';

Expand Down
3 changes: 1 addition & 2 deletions packages/operators/src/request/retry.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { connectionObservable } from '#observables/dom/window.js';
import {
combineLatest,
concatMap,
Expand All @@ -12,8 +13,6 @@ import {
throwError
} from 'rxjs';

import { connectionObservable } from '../../../observables/src/dom/window.js';

const defaultTimeout = count => Math.min(60000, Math.pow(count, 2) * 1000);

export const retryWhenError = ({ timeout = defaultTimeout, count } = {}) => {
Expand Down

0 comments on commit 4210a22

Please sign in to comment.