Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use unscoped version of rxPoweredUp lib #234

Merged
merged 2 commits into from
Aug 31, 2023
Merged
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
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@ngrx/router-store": "^16.0.1",
"@ngrx/store": "^16.0.1",
"@ngrx/store-devtools": "^16.0.1",
"@nvsukhanov/rxpoweredup": "^0.0.35",
"rxpoweredup": "^0.0.36",
"ngrx-store-localstorage": "^16.0.0",
"rxjs": "^7.8.1",
"tslib": "^2.5.2",
Expand Down
7 changes: 2 additions & 5 deletions setup-jest.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
const {pathsToModuleNameMapper} = require('ts-jest');
const {paths} = require('./tsconfig.json').compilerOptions;

const ES_MODULES = ['@angular', '@ngrx', '@nvsukhanov', 'reflect-metadata'];
const ES_MODULES = ['@angular', '@ngrx', 'rxpoweredup', 'reflect-metadata'];

// eslint-disable-next-line no-undef
globalThis.ngJest = {
skipNgcc: false,
tsconfig: 'tsconfig.spec.json',
};

/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
module.exports = {
preset: 'jest-preset-angular',
// globalSetup: 'jest-preset-angular/global-setup',
moduleNameMapper: pathsToModuleNameMapper(paths, {prefix: '<rootDir>'}),
transform: {
'^.+\\.(ts|js|mjs|html|svg)$': 'jest-preset-angular',
},
transformIgnorePatterns: [
`<rootDir>/node_modules/(?!.*\\.mjs$|${ES_MODULES.join('|')})`,
],
// setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
]
};
1 change: 0 additions & 1 deletion setup-jest.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/control-schemes/are-controllable-ios-present.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PortModeName } from '@nvsukhanov/rxpoweredup';
import { PortModeName } from 'rxpoweredup';
import { Dictionary } from '@ngrx/entity';
import { AttachedIoModel, AttachedIoModesModel, AttachedIoPortModeInfoModel, attachedIoModesIdFn, attachedIoPortModeInfoIdFn } from '@app/store';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { NgForOf, NgIf } from '@angular/common';
import { TranslocoModule } from '@ngneat/transloco';
import { MOTOR_LIMITS, PortModeName } from '@nvsukhanov/rxpoweredup';
import { MOTOR_LIMITS, PortModeName } from 'rxpoweredup';
import { BehaviorSubject, Observable } from 'rxjs';
import { PushPipe } from '@ngrx/component';
import { SliderControlComponent, ToggleControlComponent } from '@app/shared';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSelector } from '@ngrx/store';
import { PortModeName } from '@nvsukhanov/rxpoweredup';
import { PortModeName } from 'rxpoweredup';
import { Dictionary } from '@ngrx/entity';
import {
ATTACHED_IO_MODES_SELECTORS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core';
import { NgIf } from '@angular/common';
import { MOTOR_LIMITS, PortModeName } from '@nvsukhanov/rxpoweredup';
import { MOTOR_LIMITS, PortModeName } from 'rxpoweredup';
import { TranslocoModule } from '@ngneat/transloco';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core';
import { NgIf } from '@angular/common';
import { MOTOR_LIMITS, PortModeName } from '@nvsukhanov/rxpoweredup';
import { MOTOR_LIMITS, PortModeName } from 'rxpoweredup';
import { TranslocoModule } from '@ngneat/transloco';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core';
import { NgIf } from '@angular/common';
import { MOTOR_LIMITS } from '@nvsukhanov/rxpoweredup';
import { MOTOR_LIMITS } from 'rxpoweredup';
import { merge } from 'rxjs';
import { TranslocoModule } from '@ngneat/transloco';
import { ControllerInputType, SliderControlComponent, ToggleControlComponent } from '@app/shared';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { NgForOf, NgIf } from '@angular/common';
import { TranslocoModule } from '@ngneat/transloco';
import { MOTOR_LIMITS } from '@nvsukhanov/rxpoweredup';
import { MOTOR_LIMITS } from 'rxpoweredup';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { SliderControlComponent, ToggleControlComponent } from '@app/shared';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core';
import { NgIf } from '@angular/common';
import { MOTOR_LIMITS } from '@nvsukhanov/rxpoweredup';
import { MOTOR_LIMITS } from 'rxpoweredup';
import { TranslocoModule } from '@ngneat/transloco';
import { SliderControlComponent, ToggleControlComponent } from '@app/shared';
import { ControlSchemeInputAction } from '@app/store';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { MotorServoEndState } from '@nvsukhanov/rxpoweredup';
import { MotorServoEndState } from 'rxpoweredup';
import { FormControl, ReactiveFormsModule } from '@angular/forms';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatOptionModule } from '@angular/material/core';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, Output } from '@angular/core';
import { BehaviorSubject, Observable, Subscription, combineLatestWith, finalize, map, of, take } from 'rxjs';
import { concatLatestFrom } from '@ngrx/effects';
import { PortModeName } from '@nvsukhanov/rxpoweredup';
import { PortModeName } from 'rxpoweredup';
import { Store } from '@ngrx/store';
import { MatIconModule } from '@angular/material/icon';
import { PushPipe } from '@ngrx/component';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Inject, Injectable } from '@angular/core';
import { FormBuilder, FormControl, Validators } from '@angular/forms';
import { ButtonGroupButtonId, MOTOR_LIMITS, MotorServoEndState } from '@nvsukhanov/rxpoweredup';
import { ButtonGroupButtonId, MOTOR_LIMITS, MotorServoEndState } from 'rxpoweredup';
import { ControllerInputType, WINDOW } from '@app/shared';
import { ControlSchemeInput, InputGain } from '@app/store';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MOTOR_LIMITS } from '@nvsukhanov/rxpoweredup';
import { MOTOR_LIMITS } from 'rxpoweredup';
import { FormBuilder, Validators } from '@angular/forms';
import { Injectable } from '@angular/core';
import { ControlSchemeInputAction, ControlSchemeServoBinding } from '@app/store';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { MotorServoEndState } from '@nvsukhanov/rxpoweredup';
import { MotorServoEndState } from 'rxpoweredup';
import { ControlSchemeInputAction, ControlSchemeStepperBinding } from '@app/store';

import { CommonFormControlsBuilderService } from './common-form-controls-builder.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { MOTOR_LIMITS, MotorServoEndState, PortModeName } from '@nvsukhanov/rxpoweredup';
import { MOTOR_LIMITS, MotorServoEndState, PortModeName } from 'rxpoweredup';
import { Observable, Subject, bufferCount, catchError, concat, concatWith, first, last, map, of, switchMap, take, takeUntil, timeout, zip } from 'rxjs';
import { Store } from '@ngrx/store';
import { ATTACHED_IO_PORT_MODE_INFO_SELECTORS, HubStorageService } from '@app/store';
Expand Down
2 changes: 1 addition & 1 deletion src/app/control-schemes/binding-edit/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FormArray, FormControl, FormGroup } from '@angular/forms';
import { ButtonGroupButtonId, MotorServoEndState } from '@nvsukhanov/rxpoweredup';
import { ButtonGroupButtonId, MotorServoEndState } from 'rxpoweredup';
import { ControlSchemeInputAction, InputGain } from '@app/store';
import { ControlSchemeBindingType, ControllerInputType } from '@app/shared';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Dictionary } from '@ngrx/entity';
import { HubType, PortModeName } from '@nvsukhanov/rxpoweredup';
import { HubType, PortModeName } from 'rxpoweredup';
import { createSelector } from '@ngrx/store';
import {
ATTACHED_IO_MODES_SELECTORS,
Expand Down
2 changes: 1 addition & 1 deletion src/app/control-schemes/control-scheme-page/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HubType, IOType } from '@nvsukhanov/rxpoweredup';
import { HubType, IOType } from 'rxpoweredup';
import { ControlSchemeBinding, PortCommandTask } from '@app/store';

export enum ControlSchemeNodeTypes {
Expand Down
2 changes: 1 addition & 1 deletion src/app/control-schemes/get-io-output-port-mode-names.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Dictionary } from '@ngrx/entity';
import { PortModeName } from '@nvsukhanov/rxpoweredup';
import { PortModeName } from 'rxpoweredup';
import { AttachedIoModel, AttachedIoModesModel, AttachedIoPortModeInfoModel, attachedIoModesIdFn, attachedIoPortModeInfoIdFn } from '@app/store';

export function getIoOutputPortModeNames(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PortModeName } from '@nvsukhanov/rxpoweredup';
import { PortModeName } from 'rxpoweredup';
import { ControlSchemeBindingType } from '@app/shared';

const REQUIRED_PORT_MODES_FOR_OPERATION_MODE: { [k in ControlSchemeBindingType]: PortModeName[] } = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/controller-profiles/hub/controller-profile-hub.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Observable, of } from 'rxjs';
import { TranslocoService } from '@ngneat/transloco';
import { ButtonGroupButtonId } from '@nvsukhanov/rxpoweredup';
import { ButtonGroupButtonId } from 'rxpoweredup';

import { IControllerProfile } from '../i-controller-profile';

Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/hub-type-to-l10n.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HubType } from '@nvsukhanov/rxpoweredup';
import { HubType } from 'rxpoweredup';

export const HUB_TYPE_TO_L10N_MAPPING: Readonly<{ [type in HubType]: string }> = {
[HubType.BoostHub]: 'hubTypes.boost',
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/i-app-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { InjectionToken, isDevMode } from '@angular/core';
import { LogLevel } from '@nvsukhanov/rxpoweredup';
import { LogLevel } from 'rxpoweredup';

export interface IAppConfig {
readonly gamepadConnectionReadInterval: number;
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/io-inline-view/io-inline-view.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { IOType } from '@nvsukhanov/rxpoweredup';
import { IOType } from 'rxpoweredup';
import { TranslocoModule } from '@ngneat/transloco';
import { NgIf } from '@angular/common';

Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/io-type-to-l10n-key.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Pipe, PipeTransform } from '@angular/core';
import { IOType } from '@nvsukhanov/rxpoweredup';
import { IOType } from 'rxpoweredup';

import { L10nScopes, composeL10nKey } from '../i18n';

Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/logging/console-logging.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-console */
import { Inject, Injectable } from '@angular/core';
import { ILogger, LogLevel } from '@nvsukhanov/rxpoweredup';
import { ILogger, LogLevel } from 'rxpoweredup';

import { APP_CONFIG, IAppConfig } from '../i-app-config';

Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/logging/logging.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
import { LogLevel } from '@nvsukhanov/rxpoweredup';
import { LogLevel } from 'rxpoweredup';

import { ConsoleLoggingService } from './console-logging.service';
import { IAppConfig } from '../i-app-config';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Inject, Injectable } from '@angular/core';
import { ILogger } from '@nvsukhanov/rxpoweredup';
import { ILogger } from 'rxpoweredup';

import { PrefixedConsoleLogger } from './prefixed-console-logger';
import { APP_CONFIG, IAppConfig } from '../i-app-config';
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/motor-servo-end-state-l10n-key.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Pipe, PipeTransform } from '@angular/core';
import { MotorServoEndState } from '@nvsukhanov/rxpoweredup';
import { MotorServoEndState } from 'rxpoweredup';

import { L10nScopes, composeL10nKey } from '../i18n';

Expand Down
2 changes: 1 addition & 1 deletion src/app/store/actions/hub-port-mode-info.actions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createActionGroup, props } from '@ngrx/store';
import { IOType } from '@nvsukhanov/rxpoweredup';
import { IOType } from 'rxpoweredup';

import { AttachedIoPortModeInfoModel } from '../models';

Expand Down
2 changes: 1 addition & 1 deletion src/app/store/actions/hubs.actions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HubType } from '@nvsukhanov/rxpoweredup';
import { HubType } from 'rxpoweredup';
import { createActionGroup, emptyProps, props } from '@ngrx/store';

export const HUBS_ACTIONS = createActionGroup({
Expand Down
2 changes: 1 addition & 1 deletion src/app/store/effects/attached-io-modes.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import { Actions, concatLatestFrom, createEffect, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { filter, map, mergeMap, takeUntil } from 'rxjs';
import { PortModeInboundMessage } from '@nvsukhanov/rxpoweredup';
import { PortModeInboundMessage } from 'rxpoweredup';

import { ATTACHED_IOS_ACTIONS, ATTACHED_IO_MODES_ACTIONS } from '../actions';
import { ATTACHED_IO_MODES_SELECTORS } from '../selectors';
Expand Down
2 changes: 1 addition & 1 deletion src/app/store/effects/attached-ios.effects.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { map, mergeMap, takeUntil } from 'rxjs';
import { AttachIoEvent, AttachedIoAttachInboundMessage } from '@nvsukhanov/rxpoweredup';
import { AttachIoEvent, AttachedIoAttachInboundMessage } from 'rxpoweredup';

import { HubStorageService } from '../hub-storage.service';
import { ATTACHED_IOS_ACTIONS, HUBS_ACTIONS } from '../actions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createEffect } from '@ngrx/effects';
import { Action, Store, createSelector } from '@ngrx/store';
import { inject } from '@angular/core';
import { NEVER, Observable, from, map, mergeMap, pairwise, startWith, switchMap } from 'rxjs';
import { PortModeName } from '@nvsukhanov/rxpoweredup';
import { PortModeName } from 'rxpoweredup';
import {
ATTACHED_IO_MODES_SELECTORS,
ATTACHED_IO_PORT_MODE_INFO_SELECTORS,
Expand Down
2 changes: 1 addition & 1 deletion src/app/store/effects/hub-attached-ios-state.effects.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { Observable, bufferCount, concatWith, filter, map, mergeMap, take } from 'rxjs';
import { PortModeName } from '@nvsukhanov/rxpoweredup';
import { PortModeName } from 'rxpoweredup';
import { Store } from '@ngrx/store';
import { Injectable } from '@angular/core';

Expand Down
2 changes: 1 addition & 1 deletion src/app/store/effects/hub-port-mode-info-effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import { Actions, concatLatestFrom, createEffect, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { map, mergeMap, takeUntil, zip } from 'rxjs';
import { PortModeInformationName, PortModeInformationSymbol, PortModeInformationType, PortModeName, PortModeSymbol } from '@nvsukhanov/rxpoweredup';
import { PortModeInformationName, PortModeInformationSymbol, PortModeInformationType, PortModeName, PortModeSymbol } from 'rxpoweredup';

import { ATTACHED_IO_MODES_ACTIONS, HUB_PORT_MODE_INFO_ACTIONS } from '../actions';
import { HubStorageService } from '../hub-storage.service';
Expand Down
2 changes: 1 addition & 1 deletion src/app/store/effects/hubs.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Actions, concatLatestFrom, createEffect, ofType } from '@ngrx/effects';
import { Observable, catchError, combineLatestWith, filter, from, interval, map, mergeMap, of, startWith, switchMap, takeUntil, tap } from 'rxjs';
import { Action, Store } from '@ngrx/store';
import { Router } from '@angular/router';
import { IHub, MessageLoggingMiddleware, connectHub } from '@nvsukhanov/rxpoweredup';
import { IHub, MessageLoggingMiddleware, connectHub } from 'rxpoweredup';
import { APP_CONFIG, IAppConfig, NAVIGATOR, PrefixedConsoleLoggerFactoryService } from '@app/shared';

import { HubStorageService } from '../hub-storage.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MotorServoEndState } from '@nvsukhanov/rxpoweredup';
import { MotorServoEndState } from 'rxpoweredup';
import { Dictionary } from '@ngrx/entity';
import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MOTOR_LIMITS } from '@nvsukhanov/rxpoweredup';
import { MOTOR_LIMITS } from 'rxpoweredup';
import { Dictionary } from '@ngrx/entity';
import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IHub, PortCommandExecutionStatus } from '@nvsukhanov/rxpoweredup';
import { IHub, PortCommandExecutionStatus } from 'rxpoweredup';
import { Observable, debounceTime, from, take } from 'rxjs';
import { Injectable } from '@angular/core';
import { ControlSchemeBindingType } from '@app/shared';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IHub, PortCommandExecutionStatus } from '@nvsukhanov/rxpoweredup';
import { IHub, PortCommandExecutionStatus } from 'rxpoweredup';
import { Observable } from 'rxjs';
import { ControlSchemeBindingType } from '@app/shared';

Expand Down
Loading
Loading