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

Increased test coverage #106

Merged
merged 1 commit into from
Sep 22, 2022
Merged

Increased test coverage #106

merged 1 commit into from
Sep 22, 2022

Conversation

fenos
Copy link
Contributor

@fenos fenos commented Sep 21, 2022

What kind of change does this PR introduce?

Adds more tests around the Object API and general test refactor

What is the current behavior?

No tests were present for the object api

What is the new behavior?

new tests are added

Additional context

Screenshot 2022-09-21 at 12 54 25

@fenos fenos force-pushed the increased-test-coverage-rc branch from 0b25ddc to a8896c1 Compare September 21, 2022 12:36
@fenos fenos merged commit 38fb1d9 into rc Sep 22, 2022
@fenos fenos deleted the increased-test-coverage-rc branch September 22, 2022 07:46
@kiwicopple
Copy link
Member

🎉 This PR is included in version 2.0.0-rc.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

alaister added a commit that referenced this pull request Oct 11, 2022
* feat: improve function return types (#60)

* feat: improve types

* chore: better error handling

* feat: custom storage api error

* chore: use custom error type

* chore: update custom error type

* chore: replace instanceof with isStorageError

* chore: move isStorageError to a non-static method

* Improve `uploadOrUpdate` returned data. (#63)

* fix: typo in updateBucket jsdoc

* fix: import cross-fetch conditionally

* fix: es2020

* Also return the clean path for the uploaded file.

* Update readme.

* Add bucket id in returned data.

* Update readme

* Fix return type for `upload` and `update`.

* Fix typo in code snippet comment.

* Rename `downloadPath` to `path`

* Update return types

Co-authored-by: Jonathan Picques <[email protected]>
Co-authored-by: Bobbie Soedirgo <[email protected]>
Co-authored-by: Mircea-Pavel Anton <[email protected]>

* Improve `getPublicUrl` (#62)

* Improve `getPublicUrl`

* Make return types consistent across all functions.

* Undo return type change

* Change the `getPublicUrl` method to return only the url as string.

* Remove redundant method.

* Update tests.

Co-authored-by: Mircea-Pavel Anton <[email protected]>

* upload, update: don't return bucketId

as a return parameter and in the path. Just returning the path without the bucket id makes it easier to pass the value in to other storage-js functions. Also not calling it Key -- was uppercase and not as clear as just calling it path.

* add docs folder to .gitignore

* Merge branch 'master' into chore/merge-master-04-08-22 (#82)

* fix: remove release config from package.json (#83)

* chore: merge main into next (#85)

* fix: typo in updateBucket jsdoc

* fix: import cross-fetch conditionally

* fix: es2020

* chore: add search param to SearchOptions jsdoc on list function (#59)

* build(release-next): sets up the next branch as an npm prerelease (#80)

* fix: rename main release branch (#84)

Co-authored-by: Jonathan Picques <[email protected]>
Co-authored-by: Bobbie Soedirgo <[email protected]>

* fix: encode all urls

fixes #78

this should ideally be done in the api server, but doing this breaking change at the client library first, so when we do it at the backend, only folks who are using the api directly will need to upgrade.

* return values is always wrapped by data

signedURL used to return a url directly and inside the data object. This is inconsistent. Now we always return values inside a data object only.

* fix: pass through all values returned by backend

instead of cherry picking only name - we still do this in the types though.

also ensures data is always an object.

Fixes #6

* fix tests

* fix metadata type

Previously accessing metada.contentType would throw a type error since we set the type to an empty object.

* only export StorageClient

#46

removing the change we added for backward compatibility

* update ci to node 16

* upgrade typedoc to latest version

* fix: move bucket and file api to package folder

docs look better when we do this and add the packages to the entrypoint to the typedoc command

* modify publicurl to always return data

all methods return data and an error

* dont return error for getPublicUrl

* fix: signed url is returned as signedUrl

matches the method name createSignedUrl

* downgrade typedoc to 0.22.16

our doc generation pipeline only works with 0.22.16 for now

* exclude protected properties from typedoc

* fix: typedocs

* chore: merge main into next (#99)

* fix: typo in updateBucket jsdoc

* fix: import cross-fetch conditionally

* fix: es2020

* chore: add search param to SearchOptions jsdoc on list function (#59)

* build(release-next): sets up the next branch as an npm prerelease (#80)

* fix: rename main release branch (#84)

* build(release-rc): sets up the rc branch as an npm prerelease (#98)

Co-authored-by: Jonathan Picques <[email protected]>
Co-authored-by: Bobbie Soedirgo <[email protected]>

* feat: Release V2 RC

BREAKING CHANGE: Release V2

* update docs (#102)

* Fix docs typo (#104)

* chore: increased test coverage (#106)

* fix: consistent return types for copy (#110)

* feat: download file via url (#112)

* fix: merge main into rc (#113)

* fix: typo in updateBucket jsdoc

* fix: import cross-fetch conditionally

* fix: es2020

* chore: add search param to SearchOptions jsdoc on list function (#59)

* build(release-next): sets up the next branch as an npm prerelease (#80)

* fix: rename main release branch (#84)

* build(release-rc): sets up the rc branch as an npm prerelease (#98)

* Adds v1 docs (#107)

* docs: ci

Co-authored-by: Jonathan Picques <[email protected]>
Co-authored-by: Bobbie Soedirgo <[email protected]>
Co-authored-by: Copple <[email protected]>

Co-authored-by: Mircea-Pavel Anton <[email protected]>
Co-authored-by: Jonathan Picques <[email protected]>
Co-authored-by: Bobbie Soedirgo <[email protected]>
Co-authored-by: Mircea-Pavel Anton <[email protected]>
Co-authored-by: Inian <[email protected]>
Co-authored-by: Fabrizio <[email protected]>
Co-authored-by: Copple <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants