Releases: upfrontjs/framework
Releases · upfrontjs/framework
Release 0.5.0
Fix
- fix: added the expected type key to
isObjectLiteral
method - fix: added type argument to
Arrayable
interface - fix(model-collection): added missing toArray call
- Issue stemming from not adding the call in the refactor commit
bb8817c
- Issue stemming from not adding the call in the refactor commit
- fix(internal): fix
_relationType
type - fix: fixed typing issue from MaybeArray update
- commit: 8369c5e
Refactor
- refactor: updated
_allAreObjects
method to use existing helper - refactor(deps-dev): use jest timers
- removed jest-date-mock and use the jest built in fake timers
- refactor(deps-dev): use jest timers
- committing missing logic from previous commit
- refactor(deps-dev): use jest timers
- committing missing logic from previous commit
- refactor(model-collection)!: made internal methods more predictable
- These methods are protected so should not be breaking but marking it as such just in case
- refactor(model): simplify replicate method
- refactor: updated arguments to use MaybeArray utility type
Feature
- feat(services): made API accept a promise from initRequest method
- feat(model): improved return typing of
replicate
andfind
- feat(api-calls): added requestMiddleware
- This allows for transforming the requests before being passed to the ApiCaller
- feat(relations):
for
method now accepts model constructors - feat: added utility types
- feat: exported utility types
- feat: added ExtractArguments and DeepPartial type utility types
- feat(events): added event emitter
- Resolves #23
- feat(collection): added overrides for more exact type inference
- feat(relations): updated argument option of
addRelation
method- Added model array as possible argument
- feat(relations): add argument type to
addRelation
method- Added Collection of models as a possible argument type
Documentation
- docs: correct some inaccuracies
- docs: fixed toc
- docs: removed duplication
- docs: fixed small documentation issues
- docs: added teaser code example
- docs: added link to releases page as change-log
Test
- test(internal): simplified test helper
- test(model-collection): use types for testing
isModelCollection
- test: added more test types to the helper array
Style
- style: small inconsequential changes
- spacing
- property description
- removed debugging log
- style: fixed eslint issues
- style: ignored eslint issues
Chore
- chore(deps-dev): updated dependencies
- @commitlint/config-conventional
- @commitlint/prompt-cli
- @commitlint/types
- @semantic-release/git
- @types/lodash
- @types/semantic-release
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- commitlint
- eslint-plugin-jest
- rollup
- semantic-release
- typedoc
- chore: incremented version
- chore(deps-dev): updated dependencies
- @commitlint/prompt-cli
- @rollup/plugin-typescript
- @types/lodash
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- commitlint
- eslint-plugin-import
- eslint-plugin-jest
- husky
- lint-staged
- typedoc
- typescript
- chore: updated bug issue template
- chore(deps-dev): updated dependencies
- lint-staged
- rollup
- typedoc
Release 0.4.0
CI
- ci: added timeout to workflows
- ci: decreased update frequency
- ci: updated commit message enum
Docs
- docs: configured typedocs options
- docs: added external package references
Feature
- feat(global-config): added cloning escape hatch
- This solves the issue of Headers being cloned and coming out as an object
- feat(global-config)(BREAKING CHANGE): improve type support
- This change entails the requirement of an initial type going forward
- feat(services)(BREAKING CHANGE): updated response object to more generic interface
Chore
- chore(deps-dev): updated dependencies
- chore: updated package version
- chore: fix workflow issues
- Fixed linting issues
- Removed ts error expectations
- chore(deps-dev): locked dev dependency version
Release 0.3.0
Fix:
- fix(helpers): allow any value type in
isUuid
- fix(query-builder)(BREAKING CHANGE): updated the query param
- fix(api-calls): remove leading '/' if no baseEndpoint is set
- fix(timestamps): fixer argument merging of soft delete
Added option to override the deletedAt column in the request - fix(api-calls)(BREAKING CHANGE): remove the optional model argument from setLastSyncedAt
This was unnecessary option as this is a member function therefore should not change an outside object. - fix(services): add exist check for headers before setting in API
- fix(model): fixed boolean logic for
hasOne
orhasMany
saving - fix(query-builder): filter out duplicate where descriptions
- fix(services): add missing quote marks in API header setting
- fix(relations)(BREAKING CHANGE): correct related model saving request
When instantiating a related hasOne or hasMany model
it will now automatically set the parent key value.
When saving this model likeparent.$child().save({});
it will no longer set the query parameter for the parent id. - fix(query-builder): filter duplicate
withs
values - fix(query-builder): updated static return values
Static methods now return the current model as opposed toBuildsQuery
instance - fix(services): added missing response type export
Feature:
- feat(services)(BREAKING CHANGE): update custom header handling
Throw error instead of silently ignoring invalid values - feat(global-config)(BREAKING CHANGE): correct the global headers configuration
No longer accepting object with array of keys
If multiple values required either use theappend
method on theHeaders
- feat(services): added customisable queryParameters to API
- feat(api-calls): add customisable query parameters on get
- feat(attributes): added default value to date casting
When attribute set to datetime cast, by default it will cast to the built-in Date - feat(services): add Accept header in API service
Set the 'Accept' header if not already set by other configuration. - feat(query-builder): add parameter customisation option
- feat(query-builder): added missing interface export
- feat(factory): added creation methods to the factory builder
Added {raw|make|create}{One|Many) methods to ensure only the expected type is returned - feat(collection): added arithmetic methods
Addedmin
,max
,average
andsum
methods - feat(collection): Updated
join
to handle objects
Thejoin
method now accepts a property key or getter function for objects - feat(model): added type argument to
is
andisNot
methods
Removed duplicated values from the requested relations - feat(services): decouple logic flow from fetch
Performance:
- perf(attributes): removed redundant cloning
- perf(api-calls): remove repeated calls
Saved endpoint to variable - perf(api-calls): updated logic of updating outgoing keys casing
Removed unnecessary check and updated to forEach as map's return value isn't used
Chore:
- chore: remove redundant promise wraps
- chore: add more commitlint enums
- chore(attributes): added test to ensure values are not passed by ref
- chore(api-calls): added test
Added test to ensurefindMany
always returns ModelCollection - chore(dev-deps): updated dependencies
- chore(factory): fixed test group name
- chore(dev-deps): update dependencies
- husky
- eslint-plugin-import
- test(api-calls): add test for falsy data sending
Ensure that falsy data is not being filtered out - chore(dev-deps): updated dependencies
- rollup
- typedoc
- chore(dev-deps): updated dependencies
- chore(dev-deps): updated commitlint packages
- chore(dev-deps): updated dependencies
- rollup
- @typescript-eslint/parser
- @typescript-eslint/eslint-plugin
- chore(dev-deps): updated linting tools
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- eslint
- eslint-plugin-import
- lint-staged
- chore(dev-deps): updated dependencies
- @rollup/plugin-typescript
- @types/lodash
- rollup
- semantic-release
- tslib
- typedoc
- chore: added commit msg enum
Refactor
- refactor(attributes)(BREAKING CHANGE): renamed method
Renamed createDescriptors to createDescriptor as it's a more common use-case to pass a single key - refactor(attributes): extract string casting to its own method
This gives consistency and allows for overriding for more complex cases as key is also provided - refactor(api-calls): extracted method into dedicated type
- refactor(api-calls): simplified
newInstanceFromResponseData
logic - refactor(query-builder): simplified
addWhereConstraint
logic - refactor(attributes)(BREAKING CHANGE): moved
update
method to model
This method now throws an error if trying to update when the model does not exists - refactor(internal): clarified method name for easier comprehension
- refactor(relations)(BREAKING CHANGE): renamed
relationType
to_relationType
Renamed in attempt to avoid confusion over the property's origin,
and to be in-line with the _lastSyncedAt attribute
Test
- test(attributes): updated createDescriptions call
- test(helpers): added test for uuid string helper
CI
- ci: only run commitlint on non-draft PRs
- ci: added semantic release automation
- ci: revert release changes
There should be no automatic release until reaching V1 to avoid major version releases in 0.x
Docs
- docs: add badges to README.md
- docs(collection): fixed method call
- docs: updated colour of badges in README.md
- docs(services): added headers to API service request sample
- docs: small fixes on examples of contributions
- docs: added missing docs from the previous commits
Updates consist of:- moved update method
- date casting
- hasOne and hasMany relation construction
- simplified cookbook
- global config header type
- api request resolving
- api caller queryParameters argument
- docs: small inconsequential changes
- docs(services): added note about query string customisation
- docs: small comment updates
Style
- style: simplified configs and added reference in comment
- style(collection): set the return value to
this
Methods with this change:- withoutEmpty
- splice
- slice
- filter
Release 0.2.2
Fix:
- removed non-sensical never returns from unions
- simplified exists logic
- ensureed that name as always correct for the errors
Internal testing fixes:
- clarified test helper method name
- added missing constructors to test against
- added automatic support for collection in
buildResponse
test helper - updated test helper description
- added ts 4.3
override
keyword toModelCollection
methods - created
Order
type to ensure stricter typing
Chore:
- added build workflow (This tests whether the package can still successfully run the build after changes)
- fixed inaccuracy in docs
- updated commit message guidance in docs
- added npm caching in workflows
- updated dependencies
- added commitlint
- removed unnecessary config
Release 0.2.1
Fix:
- Add overrides to get attribute methods
- Removed redundant check when parsing response
- Updated check order in ModelCollection.isModelCollection for better performance
Chore:
- Updated dependencies
- Updated auto-merge strategy
Release 0.2.0
Feature:
- Added argument to the factory method
Fix:
- Updated @see jsdoc attribute to correctly link
- Removed redundant extend from the configuration
Chore:
- Create FUNDING.yml
- Added husky for git hook management
- Only tigger docs update on master change
- Remove assignees and reviewers from dependabot
Release 0.1.2
-
chore: update dependencies
-
feat: Added generic type argument
- Removed default value return on empty object as it seems like incorrect pattern
- fix: Fixed typing issues
Release 0.1.1
Release 0.1.0
Initial Release