-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Refactor * refactor(internal): renamed memorised ids name in factory * This will reduce the likelihood of clashing with user's code ## Performance * perf(internal): removed repeated calls in factory builder `getKey` method ## Fix * fix(internal): prevent losing error name when mangling code * fix(factory): ensured states are only called once * fix(model)!: `exists` now accepts any string id as valid * So long the string has length * fix(factory)!: factory now respects the model's key type * fix(attributes)!: recursively transform keys on mass-assignment * On outgoing object keys were recursively set back to `serverAttributeCasing`. * Now the incoming object keys behave the same way and are set to `attributeCasing`. * Bringing it the behaviour in line with expectations. * fix(attributes): added SimpleAttributes type * This type is same as Attributes except it does not include Models and ModelCollections Resolves #183 * fix(timestamps): added missing deletedAt value in FormData * fix(attributes)!: updated attributeCasing modifier type to protected * just like `serverAttributeCasing` this isn't expected to be used outside of the class. * fix(model-collection): fixed `toJSON` return type * Type information got lost when using return type of model type argument's `toJSON` ## Feature * feat(factory): added factory type argument to factory builder * feat(model): added keyType getter * This change allows for custom string ids that are not uuids and the factory to set keys as string * feat(model): improved `getKey` typing * It now returns the correct type based on the type argument or `keyType` return value * feat(model-collection): improved `modelKeys` return value * Changes missed from 6c54090 * feat(api-calls): improved `call` method signature with overrides * feat(attributes): added `RawAttributes` type * This utility type helps describe the raw json version of the model. * feat(factory): improved raw method typings * feat(factory): added `attributes` method * feat(collection): added missing array methods * feat(factory): added missing type export * Missed in 5c191a2 * feat: added `PartialSome` utility type ## Documentation * docs(factory): give more helpful error messages in case of mangling * docs(factory): added tip for factory files and improved interface doc * docs(model): updated examples to use `create` * Missed updating when moved to the `create` method * docs(model): updated documentation around mass assignment * docs: simplified custom collection extending recipe * docs(api-calls): fixed wording * docs(attributes): formatted inline comment * docs(timestamps): added comment ## Testing * test(factory): added test for states application order * test: improved test helpers * test(model-collection): fixed typing error in test * test(factory): reset state after testing * test(attributes): corrected test block name ## Chore * chore: incremented version * chore: updated test tsconfig * chore: removed unused type import * chore(deps-dev): updated dependencies * @commitlint/config-conventional * @commitlint/prompt-cli * @commitlint/types * @typescript-eslint/eslint-plugin * @typescript-eslint/parser * commitlint * eslint * lint-staged * rollup ## Continuous Integration * ci: ensure `.nojekyll` exists ## Refactor * refactor(api-calls): `customHeaders` type DRY-ed by adding a type ## Style * style: fixed code style issues
- Loading branch information
Showing
41 changed files
with
1,413 additions
and
893 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.