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: match branches #200

Merged
merged 13 commits into from
Feb 15, 2022
Merged

chore: match branches #200

merged 13 commits into from
Feb 15, 2022

Conversation

nandi95
Copy link
Collaborator

@nandi95 nandi95 commented Feb 15, 2022

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

nandi95 and others added 13 commits January 26, 2022 11:10
## Docs 
* docs: updated pagination recipe 
* docs: corrected pagination example 
  * The exists method has taken the `_lastSyncedAt` property into account and here it was not set before 
* docs: adjust wording in doc blocks 
* docs(services): noted `handleError` is now async 
* docs(query-builder): added documentation for `resetQueryParameters` 
* docs: fixed grammar mistakes 
* docs(factory): updated examples to be in-line with mocks 
* docs(api-calls): updated methods to preferred uppercase 
* docs: updated recipe to use the new typing 
* docs(timestamps): updated attribute name getter method names 
    * Linked: 114176e 
* docs: fixed typo in test name 
* docs: updated pagination recipe to handle model constructors 
* docs(api-calls): updated to uppercase method names 
  * Updated all method argument to `call` to uppercase for consistency 
* docs: fixed examples 
* docs(api-calls): updated method name to uppercase 
  * change missed from 03486f1 
 
## Perf 
* perf(query-builder): simplified withs deduplication 
 
## Feature 
* feat(services): made handleError async on ApiResponseHandler 
* feat(api-calls): added default type argument 
  * While this is invalid, from the outside TS still figures the current `this` correctly 
* feat(query-builder): changed `resetQueryParameters` access to public 
* feat(api-calls): export `Method` type 
* feat(services): widened request type on ApiResponse 
* feat(services): added HEAD request handling 
* feat(services): improve typings of services call and handle method 
* feat(attributes): improved `Attributes` type inference 
    * Resolves #154 
* feat(attributes): improved `only` method's typing 
* feat(attributes): improved `except` typing 
* feat(attributes): improved typings on attribute management methods 
    * Following have been updated: 
      `getOriginal` 
      `getRawOriginal` 
      `getChanges` 
      `getDeletedAttributes` 
      `getNewAttributes` 
* feat: updated static methods returning models to infer type from `this` 
* feat: updated some static inference to not use error ignoring 
    * Updates related to: 63ed0be 
* feat(model): added `create` method 
    * This allows to constructing a model more fluently 
 
## Fix 
* fix(model): updated missed distinctBy in the clone method 
* fix(attributes): fixed casting methods typing to accept mixed values 
* fix(api-calls): pass the response attributes to the constructor 
  * This also cleans up the code a little 
* fix(services): normalised fetch methods 
  * `patch` could failed with lowercase method name 
* fix(api-calls): updated typing to be inclusive of each other on `get` 
* fix(relations): fixed `addRelation` typing to accept subclass of a model 
* fix: fixed outstanding eslint and typing errors 
* fix(model-collection): fixed wrong typing of `toJSON` 
    * Issue introduced in b4d6db4 
* fix(**BREAKING CHANGE**): renamed timestamp name methods 
  * Renamed the following: 
    `getDeletedAtColumn` -> `getDeletedAtName` 
    `getCreatedAtColumn` -> `getCreatedAtName` 
    `getUpdatedAtColumn` -> `getUpdatedAtName` 
 
## Test 
* test(timestamps): tested `restore` accepting server deletedAt value 
* test: added initial baseEndpoint in testing 
* test(services): added missing test updates 
    * Updates missed from a07b22a 
* test(attributes): fixed failing guarding tests 
* test(services): added missing test updates 
    * Updates missed from a07b22a 
* test(relations): updated testing to use the new typings 
* test(model): updated to use new typings 
* test(api-calls): added missing data unwrap test 
* test(api-calls): added missing endpoint getter test 
 
## Refactor 
* refactor(services): simplified `handleError` in response handler 
* refactor(attributes): simplified `getAttribute` override typing 
* refactor(factory): update return types of mock factories 
* refactor(model-collection): updated `toJSON` typing 
  * updated `toJSON` typing to track the model's `toJSON` 
 
## Chore 
* chore: incremented package version 
* chore: added new eslint rule 
* chore: moved todos into github 
* chore(deps): updated non-breaking dependencies 
  * @commitlint/prompt-cli 
  * @types/uuid 
  * @typescript-eslint/eslint-plugin 
  * @typescript-eslint/parser 
  * commitlint 
  * eslint 
  * eslint-plugin-jest 
  * lint-staged 
  * qs 
  * rollup 
  * typedoc 
  * typescript 
* chore(deps-dev): updated breaking change dependencies 
  * semantic-release 
 
## Style 
* style: fixed eslint issues 
 
## Continuous Integration 
* ci: added matrix values explanation
…Data is used (#185)

## Fix
* fix(services): removed setting Content-Type on FormData
    * Removed as no boundary was calculated and this allows fetch to figure it out in its own.
    * https://fetch.spec.whatwg.org/#ref-for-formdata%E2%91%A1

## Chore
* chore: incremented package version

## Test
* test(services): removed content type test when using form data
    * fetch mock doesn't implement automatic header setting
## Fix
* fix(attributes)(**BREAKING CHANGE**): moved constructor logic into `create`
  * This will allow setting up descriptors for default values
  * Resolves #186

### Docs
* docs(model): added missing `create` documentation
* docs: simplified pagination recipe
* docs(model): fixed grammar

### Refactor
* refactor(collection): updated `_newInstance` typing to not use any
* refactor(relations): moved `relations` into its handling class
* refactor(internal): added response handling method overrides

## Chore
* chore: incremented package version
* chore(deps-dev): updated lint-staged

### Style
* style(api-calls): moved method call to new line
* style(api-calls): fixed eslint issue
* style(api-calls): fixed eslint issue in test

### Continuous Integration
* ci: wrapped dotfile in quotes
## 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
## Continuous Integration 
* ci: added git identification configuration 
 
## Fix 
* fix(attributes): updated `toJSON` to use `getRawAttributes`

## Chore
* chore: incremented version
@nandi95 nandi95 merged commit 2eaedb8 into release/0.x Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant