Skip to content

Remove Storage AuthWrapper layer #3399

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

Merged
merged 3 commits into from
Jul 20, 2020
Merged

Remove Storage AuthWrapper layer #3399

merged 3 commits into from
Jul 20, 2020

Conversation

hsubox76
Copy link
Contributor

Remove AuthWrapper class wrapping Storage service. It no longer seems to be necessary and will simplify the code in preparation for modularization.

@changeset-bot
Copy link

changeset-bot bot commented Jul 13, 2020

💥 No Changeset

Latest commit: f489262

Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂

If these changes should be published to npm, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 13, 2020

Binary Size Report

Affected SDKs

  • @firebase/storage

    Type Base (4aa169b) Head (4003487) Diff
    esm2017 56.4 kB 54.9 kB -1.50 kB (-2.7%)
    main 62.8 kB 61.3 kB -1.46 kB (-2.3%)
    module 62.6 kB 61.1 kB -1.47 kB (-2.4%)
  • firebase

    Type Base (4aa169b) Head (4003487) Diff
    firebase-storage.js 40.9 kB 39.9 kB -1.02 kB (-2.5%)
    firebase.js 820 kB 819 kB -1.02 kB (-0.1%)

Test Logs

Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I will try to add some integration tests today.

Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@@ -42,15 +38,14 @@ import * as errorsExports from './implementation/error';
*/
export class StorageService {
private app_: FirebaseApp | null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be readonly as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like it can't because deleteApp() sets it to null.

@@ -14,6 +33,13 @@ module.exports = {
varsIgnorePattern: '^_',
args: 'none'
}
],
'import/no-extraneous-dependencies': [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using some devDependencies declared in the root package.json? What package was the offender? Should it be a dependency of @firebase/storage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not, accidental copy-paste artifact. I only put this here because vscode for some reason doesn't process the top-level packageDir path correctly, only if it's in the package's local eslintrc.js file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean we need it here to make the eslint plugin happy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

this.app_ = app;
this.authProvider_ = authProvider;
this.requestMaker_ = makeRequest;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems unnecessary to first assign it to this.requestMaker_ since makeRequest is a pure function, unless we want to support multiple implementations of makeRequest, but I don't think it is the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, makes sense. Just leftover from AuthWrapper.

@hsubox76 hsubox76 merged commit 8396405 into master Jul 20, 2020
@firebase firebase locked and limited conversation to collaborators Aug 20, 2020
@hsubox76 hsubox76 deleted the ch-remove-aw branch January 21, 2021 20:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants