Refactor rollup output format to match webpack-style structure#50
Merged
Refactor rollup output format to match webpack-style structure#50
Conversation
- Add stub functions with JSDoc in banner for Google Apps Script editor recognition (jobEventHandler, enqueueAsyncJob, createDelaydJob, consumeJob) - Change IIFE name from 'AppsScriptJobqueue' to 'JobBroker' - Export JobBroker and DelayedJobBroker classes for library usage - The stub functions are overwritten at runtime via globalThis assignments This change ensures the output format is similar to the previous webpack output, where empty function declarations appear at the top of the file for GAS editor compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…deps Change from `npm update` to `npm install --package-lock-only` to ensure that only the version field in package.json is synced to package-lock.json without upgrading dependency versions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Contributor
Code Metrics Report
Details | | main (0dd03de) | #50 (a2e0993) | +/- |
|---------------------|----------------|---------------|------|
| Coverage | 31.8% | 31.8% | 0.0% |
| Files | 2 | 2 | 0 |
| Lines | 88 | 88 | 0 |
| Covered | 28 | 28 | 0 |
+ | Code to Test Ratio | 1:0.0 | 1:0.0 | +0.0 |
| Code | 806732 | 806724 | -8 |
| Test | 407 | 407 | 0 |
| Test Execution Time | 4s | 4s | 0s |Reported by octocov |
Merged
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.
Summary
AppsScriptJobqueuetoJobBrokerJobBrokerandDelayedJobBrokerclasses for library usageDetails
This change refactors the rollup output to match the previous webpack-style structure where:
Stub functions are defined at the top of the file
jobEventHandler()enqueueAsyncJob(callback, parameter)createDelaydJob(scheduled_at)consumeJob(event, appGlobalThis)These empty function declarations allow the Google Apps Script editor to recognize them as available functions.
IIFE with exports
var JobBroker = (function(exports) { ... })({});JobBrokerandDelayedJobBrokerclassesRuntime behavior
globalThisassignments inside the IIFETest plan
npm test- all tests passnpm run build- bundle generates correctly🤖 Generated with Claude Code