All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
18.0.0 (2024-06-29)
18.0.0-next.0 (2024-06-08)
- libraries with dependencies are now at versions: Typescript 5.4, Angular 18, Jasmine 5.1, ESLint 9.3
- rxjs-core: Typing for
logToReduxDevtoolsExtension()
now accepts the format from extension v3.3. The only breaking change appears to be in theserialize
option. - ng-core: Subclasses of
InjectableSuperclass
andDirectiveSuperclass
can no longer callsuper.ngOnDestroy()
. Simply remove those calls; they are no longer needed. - signal-store: The typing for stores in the new @s-libs/signal-store is more strict, e.g. forbidding
.assign()
when the state could be undefined.
- micro-dash: remove dependency on the
utility-types
library (e0d6a21) - ng-core:
InjectableSuperclass
no longer requiressuper.ngOnDestroy()
. Previously if you implemntedngOnDestroy()
for a subclass ofInjectableSuperclass
(and thereforeDirectiveSuperclass
), you would have to callsuper.ngOnDestroy()
to maintain its functionality. That is no longer necessary (or possible!). (c194c63) - rxjs-core: Updating typing for the options of
logToReduxDevtoolsExtension()
(6c10750) - signal-store: add
pushToArrayStore()
(2f35dd1) - signal-store: add
spreadArrayStore()
(7cc374b) - signal-store: Selecting into a store whose value can be undefined now works, returning a
ReadonlyStore
(3c015bd) - update dependencies (81cc8ff)
17.1.0 (2024-01-02)
- js-core: add
WeakValueMap
(6df8150) - signal-store: Introducing a new library to the S-Libs family: Signal Store! A state management library similar to App State, built on Angular Signals instead of RxJS. (e7f8797)
17.0.0 (2023-11-19)
17.0.0-next.2 (2023-11-17)
- update peer dependencies for @typescript/eslint, eslint, and jasmine-core (e24576e)
17.0.0-next.1 (2023-11-16)
- update peer dependencies for @angular/eslint and @angular/cdk (e06f71e)
17.0.0-next.0 (2023-11-11)
- ng-core:
WrappedFormControlSuperclass
, which was deprecated in 16.0, is now gone. - Requires newer versions of peer dependencies
- app-state: If you rely on the old behavior of
PersistentStore
throwing an exception when_version
changes, you should pass an empty migration manager:new PersistentStore('myKey', myDefaultState, { migrationManager: new MigrationManager() })
- app-state: by default
PersistentStore
now resets to the default state when_version
changes (770330c) - eslint-config-ng: officially release strict config (11c8d02)
- ng-core: Mark the abstract
WrappedControlSuperclass.control
protected. So now your subclasses can too, if you desire. (c424860), closes #109 - ng-core: remove
WrappedFormControlSuperclass
(29d76c7) - ng-div: add
AngularContext.isRunning()
(ce1a8bb) - rxjs-core: add
isPageVisible$()
(ad1bd8d) - upgrade Angular, Typescript, Eslint (0b20a33)
16.1.0 (2023-08-04)
- js-core: add
MagicalMap
(05fabf4) - micro-dash: add
startCase()
(dfc6bcc), closes #105 - micro-dash: reduce the size of
cloneDeep
by using the newstructuredClone
(a7c5ece) - ng-mat-core: add
matButtonHarnessWithIcon
(df25e25), closes #107 - ng-mat-core: add
provideMatIcons()
(1d7374e), closes #108
16.0.0 (2023-06-01)
- ng-dev: Revert support for using
inject()
inside test code. It could mask a production bug when calling inject() without an injection context. (5c28a8a)
16.0.0-next.2 (2023-05-09)
- ng-dev:
AngularContext
no longer automatically providesHttpClient
. This is a good thing, because it will now catch when you forget to import/provide it in your production code. But it's technically a breaking change because any tests that relied on it will start to fail.
- ng-dev:
AngularContext
automatically sets up http testing when usingprovideHttpClient()
. Previously it only worked withHttpClientModule
. (b734bc1) - ng-dev:
ComponentContext
now disables animations fromprovideAnimations()
, not justBrowserAnimationsModule
(9f0c650)
16.0.0-next.1 (2023-05-07)
- ng-dev: Fix bug in
16.0.0-next.0
whereAngularContext
was triggering test bed init before.init()
(fe1d279)
16.0.0-next.0 (2023-05-06)
- Angular dependencies are now at v16
- RxJS dependencies are now at v7.8
- ESLint dependencies are now at v8.39
- ng-core: Subclasses of
WrappedControlSuperclass
may need to be adjusted if they were doing any type-unsafe things. For example you may need to add| null
to its typing, or create your form control with the optionnonNullable: true
.
- ng-core: Deprecate
WrappedFormControlSuperclass
to encourage type safe alternatives (bd78e3e) - ng-core: improve type safety of
WrappedControlSuperclass
(da5e888) - ng-dev: support Angular's new
inject()
for test code that executes during a.run()
callback (329b9a2) - upgrade dependencies (df52c37)
15.2.0 (2023-03-18)
- ng-core: add
LazyLoader
(d157ec6) - ng-dev:
ComponentContext
supports standalone components (92eae17) - ng-mat-core:
SlDialogService
is now provided inSlDialogModule
instead of root, to be more friendly for lazy loading. (6450155)
- ng-dev:
AngularContext
cleans up after itself even better in error situations, to avoid all future tests failing "There is already another AngularContext in use (or it was not cleaned up)" (f208815) - ng-mat-core: support "fab" and "icon-button" when specifying specific modules to theme (0b6bc02)
15.1.0 (2023-01-16)
- js-core: add
getCombinations()
(a1ec141), closes #84 - ng-dev: add
AngularContext.getHarnessOrNull()
(c2bb4ba), closes #88 - ng-mat-core: add helpers to set up complex themes easily (0879e43)
- ng-dev:
AngularContext
cleans up after itself better in error situations, to avoid all future tests failing "There is already another AngularContext in use (or it was not cleaned up)" (81cbd5c), closes #98
15.0.0 (2022-12-05)
15.0.0-next.0 (2022-11-24)
- ng-core: Descendants of
DirectiveSuperclass
must no longer passinjector
insuper(injector)
- ng-core: Removed the protected instance variable
DirectiveSuperclass.changeDetectorRef
. If you are using it, you'll need to inject it yourself. - Libraries that depend on them now require Angular 15 and Jasmine 4.5
- ng-core:
DirectiveSuperclass
and its descendants no longer require passingInjector
to their constructors (a439a43) - Upgrade to Angular 15 (81e664a)
- ng-core:
WrappedControlSuperclass
was failing to synchronize validations with its parent when bound usingformControlName
(0afc421), closes #82
14.1.0 (2022-08-26)
- js-core:
sleep()
now accepts a unit of time (cd3ac16) - js-core: add
sort()
(94d255a) - micro-dash: accept nullish values for
size()
(71eaf0b) - ng-dev:
ComponentContext
will now runAPP_INITIALIZER
s before instantiating your component. This requires all work in your initializers to complete with a call totick()
. (4f5a0a2) - rxjs-core: add
debounceMap()
(b6bc9bb)
14.0.0 (2022-06-24)
14.0.0-next.0 (2022-06-11)
- Libraries that depend on Angular now require version 14, that depend on RxJS require 7.5, and that require Jasmine require 4.1
- ng-core: Subclasses that override one of these methods must make the same name change.
- ng-core: Errors from validation outside and inside a
WrappedControlSuperclass
are now synchronized both ways. See the docs for examples to modify or disable this process.
- ng-core:
WrappedControlSuperclass
now synchronizes validation errors with its outerNgControl
, if one exists (edea7d4), closes #76 - ng-core: Rename
WrappedControlSuperclass.outerToInner
and similar to.outerToInnerValues
and similar, to avoid confusion with.outerToInnerErrors
(b65e4e2) - ng-dev: add
ComponentHarnessSuperclass
(861a4a4) - rxjs-core: improve typing for
withHistory()
(c4134ff), closes #5 - Update to Angular 14 (ea35470)
13.1.0 (2021-12-29)
- app-state: add
PersistentStore
(f85fc6f) - app-state: add
codec
param toPersistentStore
(5a008f7) - js-core: Add
PublicInterface
(e443610), closes #65 - ng-app-state:
nasModel
'sdisabled
input acceptsnull
, for compatibility with an async pipe (d3cebcd), closes #69 - ng-dev: add
staticTest()
(e3ca8a2)
13.1.0-next.2 (2021-12-18)
- ng-mat-core: Add
SlDialogHarness
(2478777)
13.1.0-next.1 (2021-12-18)
- ng-mat-core: properly export
SlDialogService
(68d3963)
13.1.0-next.0 (2021-12-18)
- js-core: add
Stopwatch
(2704c53) - micro-dash: add
mapKeys()
(f29016a) - ng-dev: add
AngularContext.hasHarness()
(464a9b9) - ng-mat-core: Introducing
@s-libs/ng-mat-core
! A library of utility for Angular Material. The first thing available:SlDialogService
(#71) (91de8e6)
- js-core: improve accuracy of
elapsedToString()
when computing both very large and very small units. (It is now accurate until the largest unit is about a quadrillion times the size of the smallest unit.) (fa072cd)
13.0.0 (2021-11-20)
- ng-dev: properly export
expectRequest
andSlTestRequest
(9c64fdd)
13.0.0-next.0 (2021-11-20)
- all libraries: UMD bundles are no longer published, because the Angular CLI no longer creates them.
- ng-core: In subclasses of
WrappedFormControlSuperclass
, rename all references offormControl
tocontrol
- ng-core: If you have a subclass of
WrappedFormControlSuperclass
that implementngOnInit()
, you must now callsuper.ngOnInit()
- ng-core: Rename all references of
FormControlSuperclass
toFormComponentSuperclass
- ng-dev: In a previous version, linting config moved from
ng-dev
toeslint-config-ng
. The old config was deprecated, now it is removed. - ng-dev: Tests that cause a call to
ErrorHandler.handleError
will now fail. Expect the errors with something likectx.inject(MockErrorHandler).expectOne('error message')
. - ng-dev:
trimLeftoverStyles()
has been removed, because Angular does it now by default. - ng-dev: The deprecated
precompileForTests()
was removed from the library. It was only useful for the old View Engine renderer. - ng-dev: The behavior for
AsyncMethodController
to automatically trigger promise handlers and change detection is now opt-out instead of opt-in. Thectx
option for its constructor has been removed. If you are using anAngularContext
and do not want automatic calls to.tick()
after each.flush()
and.error()
, pass a new option the constructor:autoTick: false
. - ng-dev: To track which context is "current", it is now an error to create a context object without later calling its
.run()
method. - ng-dev: To track which context is "current", it is now required for context subclasses to call
super.cleanUp()
.
- Upgrade peer dependencies to RxJs 7.4, Angular 13, and Jasmine 3.10 (b030aa1)
- app-state: improve error message when trying to
.assign()
to undefined state. (ad11531), closes #53 - js-core: Improve typing of
mapToObject()
for index types (4310429), closes #54 - micro-dash: add
intersection()
(1c9a715), closes #48 - micro-dash: add
partition()
(14417df), closes #25 - micro-dash: add
property()
(52a3c02) - ng-app-state:
nasModel
acceptsnull
for the store, for compatibility with an async pipe (f5f8f7a), closes #60 - ng-core: add
WrappedControlSuperclass
(fb7cc7e) - ng-core: No longer require unnecessary-looking constructors when extending
WrappedControlSuperclass
(337eaa3) - ng-core: Rename
FormControlSuperclass
toFormComponentSuperclass
, to better match Angular terminology (where a "FormControl" is not a component) (481908d) - ng-dev:
AngularContext
now usesMockErrorHandler
. (71f0c44) - ng-dev:
AsyncMethodController
no longer needs thectx
argument (3c2f190) - ng-dev:
ComponentContext
no longer clears styles between tests that were added by anyone other than angular. (This is desirable when using e.g. Ionic or Fontawesome, which expect styles to persist.) (b42af81), closes #34 - ng-dev: add
AngularContext.getCurrent()
(0c0acfc) - ng-dev: add
expectRequest()
andSlTestRequest
(115b757) - ng-dev: add
MockErrorHandler
(d83353e) - ng-dev: provide a nice error message why trying to use
AngularContext.tick()
outside.run()
(396af3c), closes #29 - ng-dev: remove deprecated linting config (5b4aefe)
- js-core: Fix typing to show that
Persistence.get()
can returnundefined
(50239e5), closes #56 - micro-dash:
flatten()
andflatMap()
now work on very large arrays (5c215da), closes #46 - ng-core:
WrappedControlSuperclass
gracefully handles errors thrown frominnerToOuter()
andouterToInner()
(45599aa) - ng-core: Fix a timing issue when combining
nasModel
andWrappedControlSuperclass
so that it properly receives its initial value (6e07405) - ng-dev: fix compilation error in CI (2ff1d2c)
12.0.0 (2021-05-26)
- js-core: Typing for
MigrateFunction
andVersionedObject
are available from the package root (4e50072)
12.0.0-next.1 (2021-05-23)
- eslint-config-ng: Extract eslint config to a new project. Allows using it in a JSON config file (cb84b1b)
12.0.0-next.0 (2021-05-18)
- ng-dev: Linting config is now provided by
@s-libs/eslint-config-ng
. The old TSLint and ESLint configs are still available inng-dev
, but are deprecated. ESLint is no longer installed automatically withng-dev
, so to continue using its deprecated config you'll need to install the old dependencies via your ownpackage.json
. They were:"@typescript-eslint/eslint-plugin": "^4.8.0"
,"@typescript-eslint/parser": "^4.6.0"
, and"eslint": "^7.14.0"
. Consult the README for eslint-config-ng to to switch to the new configs. The old ones will be removed from this library in a future version. - all 3rd party dependencies require bumped version numbers
- ng-core:
AngularContextNext
andComponentContextNext
are renamed to replace their old, deprecated versions. If you are still using the old ones, switch to the "Next" versions and get your tests passing before upgrading to@s-libs
version 12. Once you are on the "Next" versions, this upgrade only requires removing "Next" from the ends of their names.
- ng-dev: Migrate from deprecated TSLint config to new ESLint config (acd734c)
- Update to Angular 12 (d527860)
- micro-dash: add
reject()
(915db96), closes #33 - ng-core: add
WrappedFormControlSuperclass.setUpInnerToOuter$()
and.setUpOuterToInner$
(6c90588), closes #37 - ng-core: Remove deprecated APIs (106962f)
- ng-core: WrappedFormControlSuperclass now sets
ng-touched
on the inner form control (ad1a474), closes #38
- ng-dev:
ComponentContextNext
now handles inputs that come from a component's superclass (f7830e6), closes #40
11.3.0 (2021-03-13)
- micro-dash: add
negate()
(1056836), closes #26 - micro-dash: improve typing of
forEach
(74dbdbf), closes #22 - ng-dev: remove the ESLint rule
max-statements
. It did not lead to better code. (339ab7f) - rxjs-core: add
keepWakeLock$()
(4a58461) - rxjs-core: add
SubscriptionManager.manage()
(4b1aad6)
11.2.1 (2021-01-07)
- ng-core: Fix for "Types of property 'ɵfac' are incompatible." (06f89f9)
11.2.0 (2021-01-07)
- micro-dash: improve typing of
reduce()
andreduceRight()
(6c5500d), closes #20 - ng-dev:
AngularContext
flushes pending timeouts automatically at the end of each test (instead of throwing the error "X timer(s) still in the queue.") (33d890a), closes #21
- js-core: no longer throw error when
localStorage
is not available (06be1e5), closes #17 - ng-core:
DirectiveSuperclass.getInput$()
emits synchronously if.ngOnChanges()
was already called (466415c)
11.2.0-next.2 (2021-01-05)
- ng-dev:
ComponentContextNext
runs async tests and uses normal async component harnesses. DeprecateAngularContext
in favor of the newAngularContextNext
(which powers some of this new behavior). (07cecef) - ng-dev: added
ComponentContextNext.assignWrapperStyles()
(b3fc051)
11.2.0-next.1 (2021-01-01)
- ng-core:
DirectiveSuperclass.getInput$()
wait until the input is set before emitting. Before, if called e.g. from the directive's constructor, it would emitundefined
immediately, then emit again duringngOnChanges
. Caveat: all emissions are now delayed on the microtask queue. (3b13611), closes #14 - ng-dev: add
ComponentContextNext
. This will replaceComponentContext
in a future major version release. See migration notes in the class-level docs forComponentContext
. Closes #15. (90bc99f)
11.2.0-next.0 (2020-12-19)
- js-core: add
isFalsy()
(62bd6da) - js-core: add
isTruthy()
(ca38c5d) - micro-dash: add
nth()
(61a37b1), closes #10 - micro-dash: add
sampleSize()
(05bf741) - micro-dash: add
shuffle()
(5e6f51a) - ng-dev: add
AsyncMethodController
(a8eb567), closes #9
11.1.0 (2020-11-27)
- app-state:
spreadArrayStore$()
handles null and undefined (16e0dce), closes #4 - app-state:
spreadObjectStore$()
handles null and undefined (c15b653) - js-core: add
Constructor
type to support the mixin pattern (f39a6b9) - micro-dash: improve the typing of
omit()
(48d267b) - micro-dash: improve the typing of
omitBy()
(a2c4280) - micro-dash: improve the typing of
pick()
(ecedb2e) - micro-dash: improve the typing of
pickBy()
(bcf1824) - micro-dash: reduce size of
isBoolean()
(a57466a) - ng-core: add
mixInInjectableSuperclass()
(e3cacf8) - rxjs-core:
mapAndCacheArrayElements()
handles null and undefined (7d19f47) - rxjs-core:
mapAndCacheObjectElements()
handles null and undefined (7829d6b) - rxjs-core: add
mixInSubscriptionManager()
(c173fa5) - add support for all libraries to be consumed as UMD bundles (8e9bec9), closes #7
11.0.0 (2020-11-23)
- ng-core: DirectiveSuperclass can now be used for a pipe (7fcd056)
11.0.0-next.0 (2020-11-21)
ng-core
andng-app-state
, andng-dev
now require angular 11
- Update dependenices (45eb28e)
10.0.0 (2020-11-21)
- app-state: improve performance when unsubscribing (6bdd873)
0.3.3 (2020-11-14)
- micro-dash: reduce size of
functions()
(e9efb9f)
- micro-dash:
functions()
no longer calls getters (145f301)
0.3.2 (2020-11-13)
- ng-dev:
AngularContext.tick()
better simulates real change detection (68fc5da)
0.3.1 (2020-11-13)
- ng-dev:
AngularContext
mocks performance.now (0ae92d6)
0.3.0 (2020-11-12)
- ng-dev: requires @angular/cdk as a peer dependency
- js-core: add
isPromiseLike()
(7cfec64) - micro-dash: add
isObject()
(6495ec3) - ng-dev:
AngularContext
supports component harnesses with fakeAsync (97a0fb9)
0.2.0 (2020-11-11)
- app-state:
.batch()
in now only available onRootStore
. There is a newStore.getRootStore()
to get a reference to it if needed.
- app-state: Batch API better reflects its semantics (56214c6)
0.1.0 (2020-11-09)
- requires libraries scaffolded by Angular 10.2
- support the latest Angular CLI scaffolding (900876d)
0.0.7 (2020-11-02)
- app-state: unsubscribing mid-emit could sometimes result in an error (c42585f)
0.0.6 (2020-11-01)
- include a copy of redux types, so its not a required dependency (0d567fc)
0.0.5 (2020-11-01)
- change internal import paths to match how they will be used externally (1020f8f)