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

Cleanup dependencies #155

Merged
merged 35 commits into from
Nov 6, 2020
Merged

Cleanup dependencies #155

merged 35 commits into from
Nov 6, 2020

Conversation

yuri-sergiichuk
Copy link
Contributor

@yuri-sergiichuk yuri-sergiichuk commented Nov 5, 2020

The goal of this PR is to resolve #153 as well as upgrade our dependencies for the UI libraries. The removed AppEngine SDK was not used in any of the modules.

As part of the PR, I have addressed various deprecations in the NodeJS environment and related required changes in JS tests.

There's no logical reason to have the implementation dependency on the App Engine API unless we're extending the App Engine-specific APIs.
…ver the net.

`instanceof` for Protos may have glitches if messages were created with different versions of Protobuf or even in different OSs.

The bullet-proof method for JS is to compare TypeUrl value.
@yuri-sergiichuk yuri-sergiichuk self-assigned this Nov 5, 2020
@codecov
Copy link

codecov bot commented Nov 5, 2020

Codecov Report

Merging #155 into master will increase coverage by 0.09%.
The diff coverage is 72.72%.

@@             Coverage Diff              @@
##             master     #155      +/-   ##
============================================
+ Coverage     61.88%   61.98%   +0.09%     
  Complexity      178      178              
============================================
  Files            88       88              
  Lines          2188     2191       +3     
  Branches         40       40              
============================================
+ Hits           1354     1358       +4     
+ Misses          825      824       -1     
  Partials          9        9              

@yuri-sergiichuk yuri-sergiichuk marked this pull request as ready for review November 6, 2020 13:13
@yuri-sergiichuk
Copy link
Contributor Author

@dmdashenkov @dmitrykuzmin PTAL.

Copy link
Contributor

@dmdashenkov dmdashenkov left a comment

Choose a reason for hiding this comment

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

@yuri-sergiichuk, please see my comment. Also, was there no use of AppEngine SDK at all? If so, please mention this in the PR description.

@@ -815,7 +815,7 @@ class QueryFactory {
*/
static _newId() {
const result = new QueryId();
result.setValue(`q-${uuid.v4()}`);
result.setValue(`q-${uuidv4()}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this some kind of a convention? Why do we alias this particular import?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default exported item is v4 and I don't think it worth using it as is. That's why I used the alias.

With just q-${v4()} it is more awkward.

@@ -37,7 +35,7 @@ import TestEnvironment from "../../given/test-environment";
* @return {FirebaseClient} the Firebase client instance
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we okay with using doc-only imports in JS? My IDEA gives a warning for an unused import here, but maybe the config is wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I personally totally am. Mine shows warnings for unresolved types when the type is not imported. Also, JS through webpack and Babel has tree-shaking that'll eliminate all parts that are not being used in the runtime.

@@ -37,7 +35,7 @@ import TestEnvironment from "../../given/test-environment";
* @return {FirebaseClient} the Firebase client instance
*/
export function initClient(endpointUrl, tenantProvider, keepUpInterval) {
return spineWeb.init({
return initSpineWeb({
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe initSpineWebClient?

@yuri-sergiichuk yuri-sergiichuk merged commit ca4ccc7 into master Nov 6, 2020
@yuri-sergiichuk yuri-sergiichuk deleted the cleanup-dependencies branch November 6, 2020 17:18
@yuri-sergiichuk yuri-sergiichuk mentioned this pull request Dec 15, 2020
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.

Drop dependency on App Engine SDK
3 participants