Conversation
Co-authored-by: litlfred <662242+litlfred@users.noreply.github.com>
Co-authored-by: litlfred <662242+litlfred@users.noreply.github.com>
Co-authored-by: litlfred <662242+litlfred@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR establishes a comprehensive integration between Kotlin multiplatform build and npm publishing workflows, creating an automated pipeline that ensures published npm packages always contain the latest tested Kotlin/JS artifacts.
- Integrated Kotlin/JS compilation workflow with npm publishing through workflow dependencies
- Created package infrastructure for
fmlrunnernpm package with TypeScript definitions and metadata - Implemented unified version management system across all packages with automated publishing capabilities
Reviewed Changes
Copilot reviewed 8 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/kotlin-js.yml |
Added workflow_call trigger to enable reuse by npm publishing workflow |
.github/workflows/publish-npm.yml |
Integrated Kotlin/JS dependency, artifact downloading, and automated package preparation |
packages/fmlrunner/package.json |
Created core npm package configuration with proper metadata and publishing settings |
packages/fmlrunner/README.md |
Added comprehensive package documentation with usage examples |
package.json |
Added npm scripts for version management, publishing, and testing workflows |
scripts/version.js |
Implemented unified version management and publishing automation script |
docs/WORKFLOW_INTEGRATION.md |
Created technical documentation explaining the integrated build architecture |
docs/NPM_PUBLISHING.md |
Updated publishing guide to reflect the new Kotlin/JS integration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| return; | ||
| } | ||
|
|
||
| const { execSync } = require('child_process'); |
There was a problem hiding this comment.
The execSync import should be moved to the top of the file with other imports for better code organization and readability.
| "scripts": { | ||
| "build": "echo 'Build handled by Kotlin/JS gradle build'", | ||
| "test": "echo 'Tests handled by Kotlin/JS gradle test'", | ||
| "prepublishOnly": "echo 'Ensuring Kotlin/JS artifacts are present' && ls -la dist/" |
There was a problem hiding this comment.
The prepublishOnly script should validate that required artifacts exist rather than just listing directory contents. Consider adding a proper validation command that exits with error code if artifacts are missing.
| "prepublishOnly": "echo 'Ensuring Kotlin/JS artifacts are present' && ls -la dist/" | |
| "prepublishOnly": "echo 'Ensuring Kotlin/JS artifacts are present' && test -f dist/fmlrunner.js && echo 'Found dist/fmlrunner.js' || (echo 'Missing dist/fmlrunner.js' && exit 1)" |
| echo "2. Running Kotlin tests..." | ||
| gradle test | ||
| echo "✅ Kotlin tests passed" | ||
|
|
There was a problem hiding this comment.
Running gradle test in the npm workflow duplicates testing that was already performed in the Kotlin/JS workflow. Consider removing this redundant test execution to improve workflow performance.
| echo "2. Running Kotlin tests..." | |
| gradle test | |
| echo "✅ Kotlin tests passed" | |
Overview
This PR integrates the existing Kotlin multiplatform build workflow with the npm publishing workflow, ensuring that published npm packages automatically include the latest Kotlin/JS compiled artifacts.
Problem
The repository had separate workflows for:
kotlin-js.yml) - building multiplatform code and generating JavaScript artifactspublish-npm.yml) - publishing packages to npm registryHowever, these workflows were not integrated, meaning:
Solution
Workflow Integration
Before:
After:
The npm publishing workflow now depends on successful Kotlin/JS builds, automatically downloading and packaging the generated JavaScript artifacts.
Key Changes
Workflow Dependencies
workflow_calltrigger tokotlin-js.ymlfor reusabilitypublish-npm.ymlto callkotlin-js.ymlas a dependencyPackage Infrastructure
packages/fmlrunner/directory with proper npm package structurepackage.jsonwith metadata and publishing configurationfmlrunner.d.ts) for better developer experienceArtifact Management
Version Management
scripts/version.jsfor synchronized version management across packagesQuality Assurance
The integration includes comprehensive validation:
Testing
Verified the complete integration works end-to-end:
Documentation
docs/NPM_PUBLISHING.mdwith integration details and new workflow architecturedocs/WORKFLOW_INTEGRATION.mdwith comprehensive technical documentationBenefits
✅ Automation: No manual steps required to sync Kotlin development with npm distribution
✅ Consistency: Published packages always contain latest tested Kotlin/JS code
✅ Quality: Both Kotlin and npm quality gates must pass before publishing
✅ Developer Experience: TypeScript definitions and comprehensive documentation
✅ Foundation: Infrastructure ready for additional packages (fmlrunner-rest, fmlrunner-mcp, fmlrunner-web)
This integration ensures that the npm publish workflow can reliably package and distribute the Kotlin/JS compiled core library, maintaining consistency between the multiplatform development workflow and JavaScript/Node.js distribution channels.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
accounts.google.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3721 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-61439286 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,11384712139921324152,6942535801816722025,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-61439286 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=61439286(dns block)clients2.google.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3721 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-61439286 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,11384712139921324152,6942535801816722025,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-61439286 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=61439286(dns block)clientservices.googleapis.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3721 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-61439286 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,11384712139921324152,6942535801816722025,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-61439286 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=61439286(dns block)redirector.gvt1.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3721 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-61439286 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,11384712139921324152,6942535801816722025,262144 --disable-features=PaintHolding --variations-seed-version(dns block)safebrowsingohttpgateway.googleapis.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3721 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-61439286 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,11384712139921324152,6942535801816722025,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-61439286 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=61439286(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)www.google.com/opt/google/chrome/chrome --user-data-dir=/tmp/karma-61439286 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=61439286(dns block)/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3721 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-61439286 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,11384712139921324152,6942535801816722025,262144 --disable-features=PaintHolding --variations-seed-version(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.