Releases: upfrontjs/framework
Releases · upfrontjs/framework
Release 0.18.1
Fix
- fix: remove jest from ts include
- This was adding an extra src folder in the emitted types folder
Full Changelog: v0.18.0...v0.18.1
Release 0.18.0
Testing
- test: update jest config to ts file
- test(global-config): ensure values not bleeding across tests
- test: set up multiple test environments
- test(collection): add shuffle test
- test(api-calls): add connect, trace and options test
- test(attributes): clarify variable name
- test(helpers): update test name
Continuous Integration
- ci: separate testing for environments
- ci: move dependency install step into later jobs
- ci: use checkout in later jobs too
- ci: use npx to run jest
- ci: bump node version
Features
- feat(collection): added
is
method - feat(attributes): create simple access to accessors
- feat(api-calls): add options trace and connect request options
- feat: add an experimental Getter type
Documentation
- docs: improve documentation accuracy
- docs(helpers): add documentation for dataGet
- docs: grammar and spacing fixes
- docs: add word clarification
- docs(attributes): document magic access
Revert
- revert(collection): change introduced in 8d8023a
Refactor
- refactor: use
in
operator as opposed to hasOwnProperty function- This is compatible with objects without a prototype to inherit from
However, this checks the property from the prototype chain
- This is compatible with objects without a prototype to inherit from
- refactor(collection): improve readability of unique function
- refactor: improve the type
Data
Performance
- perf(attributes): iterate objects using for...of on Object.entries
- This has a small performance improvement when it comes to using it with large objects
- perf(attributes): use an object with no inheritance for original&attributes
- This provides a slight performance improvement when it comes to memory
- perf: remove lodash in favour of specific lodash modules
Chores
- chore: update dependencies
- chore: bump version
- chore: add exports for node environments
Fix
- fix(helpers): remove circular dependency between a collection and dataGet
- This also means no longer importing the collection when just using dateGet
Release 0.17.0
Feature:
- feat(helpers): add '*' as an accepted key to
dataGet
- Added collection as argument type
- Added option to pass keys in as array or collection
- Added a default value
- feat(helpers): added error check argument to the
retry
function - feat(helpers): add typing to
ucFirst
function - feat(helpers): add typing to
finish
function - feat(helpers): add typing to
after
function - feat(helpers): add typing to
afterLast
function - feat(helpers): add typing to
before
function - feat(helpers): add typing to
beforeLast
function - feat(helpers): accept array of timeouts in
retry
function as shorthand - feat(ancestry-collection): improved generic type of collection
- feat(helpers): add typing to
finish
function
Testing:
- test(helpers): add
dataGet
tests - test(collection): added partition test
- ensure that partition returns the current collection type
- test(helpers): add
limit
test for not showing limiter after length - test(ancestry-collection): remove folder properties now known
Fix:
- fix(helpers): only include limiter when necessary with
words
- fix(helpers): only include limiter when necessary with
limit
Refactor:
- refactor(helpers): rename argument in
dataGet
Chore:
- chore(internal): update jest config
- chore: increment version
- chore(deps-dev): updated dependencies
- chore: adjust lines-around-comment eslint rule
- chore: fix eslint issue
Documentation:
- docs(helpers): update
dataGet
documentation
Full Changelog: v0.16.0...v0.17.0
Release 0.16.0
Refactor:
- refactor(query-builder): move query attributes into its own object
- This slightly reduces size and looks better when logging a model out
- refactor(model)(BREAKING CHANGE): remove non-static
find
method- If the model is instantiated it is likely to have been hydrated with data.
If it has then, nothing to find. If it hasn't then the static method is enough.
- If the model is instantiated it is likely to have been hydrated with data.
- refactor(internal): moved existence check up the class chain
- refactor(model)(BREAKING CHANGE): remove
findMany
non-static method - refactor(model)(BREAKING CHANGE): removed
when
andunless
non-static methods - refactor(model): move 'when
and
unless` methods to the model - refactor(internal): rename withouts query parameter to without
Feature:
- feat(helpers): added
value
function - feat(api-calls): add
setModelEndpoint
helper method - feat(model): added
tap
method - feat(model): added function resolving to
when
andunless
methods
Fix:
- fix(relations): added existence check for
load
method - fix(api-calls): improved
get
method's type argument/return - fix(relations): fix
morphTo
relation- Endpoint was not set correctly for the next request
- fix(model): add missing lastSyncedAt copy in the
clone
method
Chore:
- chore: increment version
- chore: add optional peer dependencies
- chore(deps-dev): updated dependencies
Documentation
- docs(model): fix heading for
make
section - docs(helpers): documented
value
function - docs(timestamps): removed invalid todo comment
Testing
- test(model): improved
tap
's test - test(relations): fix morphTo test
Full Changelog: v0.15.1...v0.16.0
Release 0.15.1
Documentation:
- docs(ancestry-collection): fixed spacing
- docs: fix jsdoc return types
- docs(internal): commented exception classes
- docs(query-builder): adjusted
when
's grammar - docs: document
StaticToThis
type helper - docs(ancestry-collection): add flatten tip
Fix:
- fix(api-calls): include @ts-expect-error in declaration file
- fix(api-calls): added missing
RequestMiddleware
type export - fix(relations): fix
morphTo
definition - fix(ancestry-collection): update constructor to be protected
- Protected to discourage its usage from the outside.
- fix(model-collection): improve argument of
findByKey
Performance:
- perf(model): remove unnecessary
make
call
Refactor:
- refactor: rename FileModel to File
- refactor: further File name changes
Continuous Delivery:
- ci: update testing node matrix
- ci: fixed rollup config
Style:
- style(services): fixed too long line issue
- style(relations): fixed too long line issue
- style: fix eslint issues
- style: fixed eslint issues
Chore:
- chore(deps-dev): updated dependencies
- chore(deps-dev): update semantic-release
- chore(deps-dev): updated packages
- chore: increment version
Testing:
- test: update JSON parse error
- test(helpers): improve variable name
- test(relations): added missing test
- test: add test for untested logic paths
- test(ancestry-collection): fixed test name
- test(services): fix json test for node 18
Full Changelog: v0.13.0...v0.15.1
Release 0.15.0
Chore:
- chore: increment version
- chore(deps-dev): updated dependencies
- chore(deps-dev): updated eslint dependency
Fix:
- fix(attributes): return null when null given and casting to Date
- Closes #304
- fix(model-collection): improved duplicate methods typings
Documentation:
- docs: wording changes
- docs(collection): add missing static badges
- docs: added cookbook entry
- docs(collection): moved partition documentation to alphabetical order
Feature:
- feat(collection): add partition method
- feat(ancestry-collection): added AncestryCollection
Performance
- perf(model-collection): simplified hasDuplicates method
Refactor
- refactor(query-builder): moved operator values to method
- This will mean less clutter when logging out a model on the console
Testing:
- test(model-collection): added tests for
hasDuplicates
- This ensures argument type validity.
Release 0.14.0
Feature:
- feat(collection): add dot notation to pluck method
- feat(collection): add
shuffle
method
Chore:
- chore: increment version
- chore: make tsc output predictable
- chore(deps-dev): update dependencies
Refactor:
- refactor(helpers): split out functions into files
- This will help with maintainability and with tree-shaking when packaging separately for cjs.
- refactor: import helper methods from their respective path
Testing:
- test: fix timestamp
- test(api-calls): removed some casting
- The values can already be inferred from the code
- test(helpers): fix node@16 fringe testing error
- Potentially issue due to different architecture on the runner.
- https://github.com/upfrontjs/framework/actions/runs/3118093610/jobs/5057158718#step:5:59
- test(helpers): use real timers where possible
- test(helpers): clarified comment
Full Changelog: v0.13.0...v0.14.0
Release 0.13.0
Refactor
- refactor(timestamps): moved existence check to HasTimestamps class
- refactor(events): simplified method signatures
- refactor(model)(BREAKING CHANGE): renamed
create
tomake
- This name hints the behaviour somewhat clearer than before. Previously it might have suggested that some persistence was involved.
- refactor(events): removed redundant union type
- refactor: move fetch mock file
Chore
- chore: increment version
- chore: eslint changes
- chore(deps-dev): updated ts eslint
Fix
- fix: allow any values within
handleError
- Some errors may be handled here and recovered from by returning something. Or perhaps an error is expected and no throwing is necessary.
- fix(events): added missing listener signature to
has
method - fix(collection): fixed typing issue after typescript update
Documentation
- docs: doc page linking, grammar and typo fixes
- docs(collection): fixed typo
- docs: add internal inline comments to testing
Testing
- test: updated jest
Feature
- feat(collection): improved
pluck
return type - feat(helpers): add
dataGet
function
Performance
- perf(collection): shortcut return when
0
given as argument
Release 0.12.0
Continious Integration:
- ci: update setup-node versions
Build:
- build: added minimum required node version
Chore:
- chore: incremented version
- chore(relations): updated
instanceof
check to current class - chore(deps-dev): updated dependencies
Refactor:
- refactor(services): simplified logic
Feature:
- feat(helpers): added
retry
function
Fix:
- fix(helpers): make
transformKeys
handle array of objects
Testing:
- test(helpers): renamed missed function rename
Documentation:
- docs(helpers): documented
retry
function - docs(helpers): documented
transformKeys
function - docs(helpers): updated jsdoc param to latest info
- docs(factory): fixed indentation
Release 0.11.0
Continuous Integration
- ci: updated setup node actions
- ci: added concurrency cancelling in workflows
- ci: removed redundant caching
- release workflow is not something that is frequently ran
Feature
- feat(api-calls): updated visibility modifier of
setLastSyncedAt
- In practice this has been reached for on enough occasions to warrant the change
- feat(collection): added
orderBy
method - feat(helpers): added
transformKeys
utility- Extracted logic from model for use outside of models.
Chore
- chore: turned on
noImplicitOverride
config- With the intention that this would help with maintainability of the codebase
- chore: incremented version
- chore(deps-dev): updated dependencies
- chore(deps-dev): updated eslint plugins
- chore: fixed eslint issues
- chore: bumped current node version
Documentation
- docs(api-calls): documented
setLastSyncedAt
- docs: added best practices section
- docs(services): corrected example output
- docs: organised testing section better
- docs: updated wording
Fix
- fix(helpers): fixed
DeepPartial
logic