-
Notifications
You must be signed in to change notification settings - Fork 52
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
Feat/standardize web3api manifest #50
Conversation
Did some changes. Feel free to check it - Anyways, let's talk about this on tuesday's call :-D @dOrgJelli |
Implemented a PoC of the migrator. Right now we are using any for the Schema object and we need to use the |
After making the |
packages/cli/src/lib/Web3API.ts
Outdated
// - validate manifest structure | ||
// - ensure everything exists | ||
|
||
manifestValidation(manifest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that here, we should redefine the manifest
variable. The reason is that on this function, first, we check if the manifest passed as argument is outdated, if that's true, then it's going to be updated, hence, editing this variable that is being passed. If we don't update the manifest
variable here, it will compile the older version of the manifest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signature should be something like this: manifestValidation(manifest: AnyManifest): LatestManifest
, so we can set manifest
equal to return value.
Also change the function name to sanitizeAndUpgrade
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also change the import path from root level to some nested folder like @web3api/client-js/manifest
, this way top level imports is very minimal and easy to understand.
9660bb4
to
cd76b39
Compare
cd76b39
to
e56a422
Compare
packages/cli/src/lib/Web3API.ts
Outdated
// - validate manifest structure | ||
// - ensure everything exists | ||
|
||
manifestValidation(manifest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signature should be something like this: manifestValidation(manifest: AnyManifest): LatestManifest
, so we can set manifest
equal to return value.
Also change the function name to sanitizeAndUpgrade
packages/cli/src/lib/Web3API.ts
Outdated
// - validate manifest structure | ||
// - ensure everything exists | ||
|
||
manifestValidation(manifest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also change the import path from root level to some nested folder like @web3api/client-js/manifest
, this way top level imports is very minimal and easy to understand.
Regarding that point i've been doing some research and came up with this: microsoft/TypeScript#8305 Looks like there is no an official way to do this. Reading that thread you will come up to this: microsoft/TypeScript#33079 but not sure how should we tackle this? @dOrgJelli |
closes: #17