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

feat: add support for richTextFile #29

Merged
merged 5 commits into from
Dec 19, 2024
Merged

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Dec 12, 2024

Writing and reviewing multiline text in JSON is not great, with this PR we'd have the option of moving it to a file instead.

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

LGTM with a nit, it could use some docs though.

@@ -12,6 +13,12 @@ import { validateAccount, validateRequest, validateAndExtendRequestReferences }

const requestFilePath = path.resolve(process.argv[2]);
const request = JSON.parse(fs.readFileSync(requestFilePath, 'utf8'));
if (Object.hasOwn(request, 'richTextFile')) {
assert(!path.isAbsolute(request.richTextFile));
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be part of validateRequest? Maybe we can rename that to validateAndExtendRequestLocally(), too..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

validateRequest doesn't have access to requestFilePath, so it felt less sloppy to have it here.

@aduh95 aduh95 requested a review from joyeecheung December 13, 2024 16:30
@aduh95 aduh95 merged commit bcd4917 into nodejs:main Dec 19, 2024
1 check passed
@aduh95 aduh95 deleted the richTextFile branch December 19, 2024 19:26
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.

2 participants