Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds automation and documentation to keep the committed JavaScript/TypeScript declaration outputs under js/ in sync with their TypeScript sources (notably js/module.ts), and updates the JS build configuration accordingly.
Changes:
- Adds a GitHub Actions workflow + CI script to regenerate
js/outputs and fail when committed generated files are out of date. - Updates local build flow to run the JS generation step before building/installing native artifacts.
- Updates
js/tsconfig.json(target bump to ES2020 and removes a deprecated compiler option) and refreshes committed generated outputs (js/*.js,js/*.d.ts).
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents that js/module.ts is the source of truth and how/where generated outputs are enforced. |
| package.json | Chains build:javascript into local:build to reduce drift locally. |
| js/type_check.js | Updated committed tsc output to match current generation. |
| js/tsconfig.json | Updates TS emit target to ES2020 and removes suppressImplicitAnyIndexErrors. |
| js/module.js | Updated committed tsc output to match current generation. |
| js/module.d.ts | Updated committed declaration output to match current generation. |
| ci/check-js-generated.sh | New CI helper script to detect stale generated outputs after running yarn build:javascript. |
| .github/workflows/check-js-generated.yml | New workflow to run JS generation and invoke the stale-check script on PRs/pushes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+8
| #!/bin/bash | ||
| # Verify that the committed tsc outputs under js/ match what regenerating | ||
| # from js/module.ts would produce. CI runs `yarn build:javascript` first, | ||
| # so any modified file at this point is a stale generated file. | ||
| dirty=$(git ls-files --modified js/) | ||
|
|
||
| set +x | ||
| if [[ $dirty ]]; then |
| return sourcesSize; | ||
| } | ||
| exports.getSourcesSize = getSourcesSize; | ||
| ; |
…ntain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…s/obs-studio-node into js_tsc_build_pipeline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
add script to keep module.d.ts and module.js files consistent with module.ts
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: