-
Notifications
You must be signed in to change notification settings - Fork 20
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: generate-from-ts #85
Conversation
@@ -1,36 +0,0 @@ | |||
name: manual release |
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.
create github release will do this for you
@@ -1,412 +1,146 @@ | |||
{ | |||
"$schema": "http://json-schema.org/draft-07/schema#", |
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.
there's a lot of diffs for this file. The valid/invalid tests are passing so it's probably reasonably close.
@@ -1,6 +1,23 @@ | |||
#!/usr/bin/env node | |||
|
|||
const exec = require("child_process").execSync; | |||
const fs = require("fs"); | |||
/** | |||
* Dummy build script to satisfy Github Actions build requirement for running unit tests. | |||
*/ |
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.
This comment can be removed correct?
/** | ||
* Dummy build script to satisfy Github Actions build requirement for running unit tests. | ||
*/ | ||
console.log("compiling"); | ||
exec(`yarn tsc -p . --pretty`); | ||
console.log(`generating schema from TS files`); |
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.
NIT: template strings without variables or need
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.
LGTM. I'll ping IDEx and see if anyone is available to give it a quick QE in VSCode.
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.
@mshanemc changes seem reasonable to me and I see there is a PR open against core as well. Are there any functional changes expected due to the changes here and in core?
I post a question.
} | ||
] | ||
}, | ||
"alias-147831185-257-1138-147831185-0-1202": { |
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.
@mshanemc this is a funky name. What's its purpose?
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.
it's an artifact of the schema generator because the type is intentionally circular (metadataTypes have a children
property which contains metadataTypes).
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.
Valid files before should still be valid. I think there were some things that should have been valid that weren't (ex: a property the packaging plugin/library knew about but the schema didn't account for).
And once used, this change should also add some things to SfdxProject(Json) that it was currently missing.
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.
Core PR not required
everything here looks good
consumers will get updates and improvements as they update/need
What does this PR do?
"single-source-of-type"
start generating sfdx-project.json, (not scratchDef file) schema from TS types
export those same types for other packages (ex: sfdx-core, packaging) to use
compile TS on build
What issues does this PR fix or reference?
@W-13565856@
https://github.com/forcedotcom/sfdx-core/issues/489
while here, we might as well fix #75
QA via use: forcedotcom/sfdx-core#1066