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

Update build-diff script to also accept a URL #1264

Merged
merged 2 commits into from
Mar 19, 2024
Merged

Update build-diff script to also accept a URL #1264

merged 2 commits into from
Mar 19, 2024

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Mar 19, 2024

This update makes the src/build-diff.js script accept the canonical URL of a spec as parameter, and build the updates to index.json that this URL would trigger if it were added to specs.json (or if it would replace the corresponding entry in specs.json).

The script still accepts commit references, although the syntax was slightly updated to get back to one parameter and better align with git diff, from node src/build-diff HEAD HEAD~2 to node src/build-diff HEAD..HEAD~2.

The script is now also available as a module and the exported function also accepts additional spec properties on top of the URL. That is not yet used but will be useful for later.

Next step is to create a more proper CLI that makes use of the module, can also run tests on the updates, and propose a human-readable report that could be added to a pull request and/or used as commit message.

This update makes the `src/build-diff.js` script accept the canonical URL of a
spec as parameter, and build the updates to `index.json` that this URL would
trigger if it were added to `specs.json` (or if it would replace the
corresponding entry in `specs.json`).

The script still accepts commit references, although the syntax was slightly
updated to get back to one parameter and better align with `git diff`, from
`node src/build-diff HEAD HEAD~2` to `node src/build-diff HEAD..HEAD~2`.

The script is now also available as a module and the exported function also
accepts additional spec properties on top of the URL. That is not yet used but
will be useful for later.

Next step is to create a more proper CLI that makes use of the module, can
also run tests on the updates, and propose a human-readable report that could
be added to a pull request and/or used as commit message.
@tidoust tidoust requested a review from dontcallmedom March 19, 2024 16:10
src/build-diff.js Outdated Show resolved Hide resolved
Co-authored-by: Dominique Hazael-Massieux <[email protected]>
@tidoust tidoust merged commit 1cd3e2f into main Mar 19, 2024
1 check passed
@tidoust tidoust deleted the build-diff branch March 19, 2024 16:55
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