-
Notifications
You must be signed in to change notification settings - Fork 61
Change library/import naming from Objects to LiveObjects #2133
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
Change library/import naming from Objects to LiveObjects #2133
Conversation
WalkthroughThis PR renames the "Objects" plugin and related build/artifacts to "LiveObjects" across build configs, package exports, TypeScript types, plugin sources, client/internal fields, transport/protocol wiring, scripts, and tests. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (42)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (15)
🧰 Additional context used🧬 Code graph analysis (7)test/common/modules/liveobjects_helper.js (1)
Gruntfile.js (2)
src/common/lib/client/realtimechannel.ts (1)
test/realtime/liveobjects.test.js (1)
test/package/browser/template/src/index-liveobjects.ts (1)
src/common/lib/types/protocolmessage.ts (1)
scripts/moduleReport.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🔇 Additional comments (44)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.40.0)test/realtime/liveobjects.test.jsThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1ada09b to
d29c49e
Compare
d29c49e to
7266c0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
typedoc.json (1)
1-31: Fix Prettier formatting issue.The documentation configuration changes are correct, but there's a formatting issue that needs to be addressed.
The pipeline reports a Prettier formatting issue. Please run:
prettier --write typedoc.jsontest/realtime/liveobjects.test.js (1)
94-96: Replace remainingObjectsPluginreferences withLiveObjectsPluginto fixReferenceError.The test suite no longer imports
ObjectsPlugin, but a few references remain:
objectMessageFromValues(line 95) callsObjectsPlugin.ObjectMessage.fromValues(...)— this is the source of the current pipeline failure.- The gc tests still use
ObjectsPlugin.RealtimeObject._DEFAULTS.gcGracePeriodandObjectsPlugin.RealtimeObject._DEFAULTS.gcInterval.All of these should use the imported
LiveObjectsPlugininstead:Suggested diff
function objectMessageFromValues(values) { - return ObjectsPlugin.ObjectMessage.fromValues(values, Utils, MessageEncoding); + return LiveObjectsPlugin.ObjectMessage.fromValues(values, Utils, MessageEncoding); } @@ - // set gcGracePeriod to a value different from the default - realtimeObject.gcGracePeriod = ObjectsPlugin.RealtimeObject._DEFAULTS.gcGracePeriod + 1; + // set gcGracePeriod to a value different from the default + realtimeObject.gcGracePeriod = LiveObjectsPlugin.RealtimeObject._DEFAULTS.gcGracePeriod + 1; @@ - expect(realtimeObject.gcGracePeriod).to.equal( - ObjectsPlugin.RealtimeObject._DEFAULTS.gcGracePeriod, + expect(realtimeObject.gcGracePeriod).to.equal( + LiveObjectsPlugin.RealtimeObject._DEFAULTS.gcGracePeriod, 'Check gcGracePeriod is set to a default value if connectionDetails.objectsGCGracePeriod is missing', ); @@ - try { - helper.recordPrivateApi('write.RealtimeObject._DEFAULTS.gcInterval'); - ObjectsPlugin.RealtimeObject._DEFAULTS.gcInterval = 500; + try { + helper.recordPrivateApi('write.RealtimeObject._DEFAULTS.gcInterval'); + LiveObjectsPlugin.RealtimeObject._DEFAULTS.gcInterval = 500; @@ - } finally { - helper.recordPrivateApi('write.RealtimeObject._DEFAULTS.gcInterval'); - ObjectsPlugin.RealtimeObject._DEFAULTS.gcInterval = gcIntervalOriginal; - } + } finally { + helper.recordPrivateApi('write.RealtimeObject._DEFAULTS.gcInterval'); + LiveObjectsPlugin.RealtimeObject._DEFAULTS.gcInterval = gcIntervalOriginal; + }This will align all usages with the actual import and remove the
ObjectsPlugin is not definedruntime errors.Also applies to: 7362-7390, 7505-7563
🧹 Nitpick comments (1)
scripts/moduleReport.ts (1)
49-52: LiveObjects plugin wired correctly into size and file checksThe module report now:
- Treats
'liveobjects'as a buildable plugin with the correct bundle path anddequalmarked as external.- Uses
buildablePlugins.liveobjectsboth for size calculation and the source‑map–based file whitelist, which now points entirely atsrc/plugins/liveobjects/*sources.Function names (
calculateObjectsPluginSize,checkObjectsPluginFiles) still mention “Objects”; if you want to avoid confusion for future readers, consider renaming them tocalculateLiveObjectsPluginSize/checkLiveObjectsPluginFiles, but that’s purely cosmetic.Also applies to: 220-222, 324-346
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (40)
.gitignore(1 hunks)Gruntfile.js(3 hunks)ably.d.ts(2 hunks)grunt/esbuild/build.js(2 hunks)liveobjects.d.ts(2 hunks)package.json(3 hunks)scripts/moduleReport.ts(3 hunks)src/common/lib/client/baserealtime.ts(2 hunks)src/common/lib/client/modularplugins.ts(2 hunks)src/common/lib/client/realtimechannel.ts(3 hunks)src/common/lib/transport/comettransport.ts(1 hunks)src/common/lib/transport/connectionmanager.ts(1 hunks)src/common/lib/transport/protocol.ts(1 hunks)src/common/lib/transport/transport.ts(1 hunks)src/common/lib/transport/websockettransport.ts(1 hunks)src/common/lib/types/protocolmessage.ts(8 hunks)src/plugins/index.d.ts(1 hunks)src/plugins/liveobjects/batchcontext.ts(1 hunks)src/plugins/liveobjects/index.ts(1 hunks)src/plugins/liveobjects/instance.ts(1 hunks)src/plugins/liveobjects/livecounter.ts(1 hunks)src/plugins/liveobjects/livecountervaluetype.ts(1 hunks)src/plugins/liveobjects/livemap.ts(1 hunks)src/plugins/liveobjects/livemapvaluetype.ts(1 hunks)src/plugins/liveobjects/objectmessage.ts(1 hunks)src/plugins/liveobjects/pathobject.ts(1 hunks)src/plugins/liveobjects/pathobjectsubscriptionregister.ts(1 hunks)src/plugins/liveobjects/realtimeobject.ts(1 hunks)src/plugins/liveobjects/rootbatchcontext.ts(1 hunks)test/common/globals/named_dependencies.js(2 hunks)test/common/modules/liveobjects_helper.js(3 hunks)test/package/browser/template/README.md(2 hunks)test/package/browser/template/package.json(1 hunks)test/package/browser/template/server/resources/index-liveobjects.html(1 hunks)test/package/browser/template/server/server.ts(1 hunks)test/package/browser/template/src/index-liveobjects.ts(2 hunks)test/package/browser/template/test/lib/package.test.ts(1 hunks)test/realtime/liveobjects.test.js(27 hunks)test/support/browser_file_list.js(1 hunks)typedoc.json(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (9)
src/plugins/index.d.ts (1)
src/plugins/liveobjects/index.ts (1)
LiveObjects(17-23)
scripts/moduleReport.ts (1)
src/plugins/liveobjects/pathobject.ts (1)
path(48-51)
src/common/lib/types/protocolmessage.ts (2)
src/plugins/liveobjects/index.ts (1)
WireObjectMessage(11-11)src/plugins/liveobjects/objectmessage.ts (1)
WireObjectMessage(468-812)
test/common/modules/liveobjects_helper.js (1)
test/realtime/liveobjects.test.js (1)
createPM(14-14)
test/realtime/liveobjects.test.js (2)
test/common/modules/liveobjects_helper.js (1)
createPM(7-7)liveobjects.d.ts (4)
LiveMap(154-157)LiveMap(1823-1837)LiveCounter(162-165)LiveCounter(1842-1852)
Gruntfile.js (2)
scripts/cdn_deploy.js (1)
fs(4-4)test/support/runPlaywrightTests.js (1)
fs(4-4)
test/package/browser/template/src/index-liveobjects.ts (1)
test/realtime/liveobjects.test.js (4)
channel(171-171)channel(207-207)channel(285-285)channel(8175-8175)
src/common/lib/client/baserealtime.ts (2)
src/platform/web/modular.ts (1)
BaseRealtime(47-47)src/common/lib/client/modularplugins.ts (1)
RealtimePresencePlugin(21-23)
liveobjects.d.ts (1)
src/plugins/liveobjects/index.ts (1)
LiveObjects(17-23)
🪛 GitHub Actions: API Reference
ably.d.ts
[warning] 1-1: TypeDoc warning: RealtimeChannel, defined in ably.d.ts, is referenced by ably.Realtime.channels but not included in the documentation.
[warning] 1-1: Failed to resolve link to "ably!RealtimeChannel.history | retrieving the message history of a channel" in comment for modular.Rest.
[warning] 1-1: Failed to resolve link to "ably!RealtimeChannel.presence" in comment for modular.RealtimePresence.
[warning] 1-1: Failed to resolve link to "ably!RealtimeChannel.annotations" in comment for modular.Annotations.
[warning] 1-1: Failed to resolve link to "ably!RealtimeChannel.subscribe:WITH_MESSAGE_FILTER | the overload of subscribe() that accepts a MessageFilter" in comment for modular.MessageInteractions.
🪛 GitHub Actions: Lint
typedoc.json
[warning] 1-1: Prettier reported formatting issues in typedoc.json. Run 'prettier --write' to fix.
🪛 GitHub Actions: Test NodeJS
test/realtime/liveobjects.test.js
[error] 95-95: ReferenceError: ObjectsPlugin is not defined.
[error] 95-95: Error originated during test execution in objectMessageFromValues. Process exited with code 1.
test/package/browser/template/package.json
[error] Command 'npm run test:node' failed in CI pipeline.
package.json
[error] Command 'npm run test:node' failed in CI pipeline.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: test-browser (chromium)
- GitHub Check: test-browser (firefox)
- GitHub Check: test-browser (webkit)
🔇 Additional comments (53)
src/plugins/liveobjects/batchcontext.ts (1)
10-10: LGTM! Import path updated consistently.The import path has been correctly updated from
../../../objectsto../../../liveobjects, maintaining consistency with the broader renaming effort across the codebase.src/plugins/liveobjects/rootbatchcontext.ts (1)
1-1: Import path correctly updated to liveobjects module.The import path has been properly updated from
../../../objectsto../../../liveobjects. BothInstanceandValuetypes are correctly exported from the liveobjects module (defined inliveobjects.d.ts), and no old references to the objects import remain in the codebase. This aligns with the PR's objective to rename the library from Objects to LiveObjects.src/plugins/liveobjects/objectmessage.ts (1)
5-5: LGTM! Import path updated correctly.The import path change from
../../../objectsto../../../liveobjectsaligns with the plugin rename.src/plugins/liveobjects/livecounter.ts (1)
2-2: LGTM! Import path updated correctly.The import path change is consistent with the plugin rename.
.gitignore (1)
7-7: LGTM! .gitignore updated for renamed declaration file.The ignore pattern correctly reflects the renamed
liveobjects.d.mtsbuild artifact.test/package/browser/template/test/lib/package.test.ts (1)
6-6: LGTM! Test scenario updated for LiveObjects.Both the scenario name and HTML path have been correctly updated to reflect the plugin rename.
src/plugins/liveobjects/pathobject.ts (1)
16-16: LGTM! Import path updated correctly.The import path change is consistent with the LiveObjects plugin rename.
src/common/lib/transport/connectionmanager.ts (1)
1815-1815: LGTM! Plugin property reference updated correctly.The property reference change from
_objectsPluginto_liveObjectsPluginin the logging statement is consistent with the plugin rename.src/plugins/liveobjects/pathobjectsubscriptionregister.ts (2)
3-3: LGTM! Import path updated correctly.The import path change is consistent with the plugin rename.
1-207: The rename to "LiveObjects" has been applied comprehensively across the codebase. Verification confirms:
- No references to
_objectsPluginor oldObjectsexport naming found- Public API exports correctly show
LiveObjects?: typeof LiveObjectsinsrc/plugins/index.d.ts- Plugin entry point (
src/plugins/liveobjects/index.ts) properly exportsconst LiveObjects- Type declarations consistently use
LiveObjectsnaming- All module imports reference the correct plugin name
The rename is complete and consistent throughout the repository.
test/package/browser/template/package.json (1)
7-7: Build script correctly updated with no stale references.The build script change from
index-objects.tstoindex-liveobjects.tsis correct. Thesrc/index-liveobjects.tsfile exists attest/package/browser/template/src/index-liveobjects.ts, and there are no remaining references to the old name in the browser template directory. The changes are complete and properly configured.src/plugins/liveobjects/livemap.ts (1)
3-11: LiveObjects and branding imports correctly updatedSwitching
Primitive,Value,PublicLiveMap,PublicLiveObjectto../../../liveobjectsand pulling__livetypefrom../../../ablyis consistent with the new LiveObjects module and preserves existing typings and runtime behavior.src/plugins/liveobjects/livemapvaluetype.ts (1)
1-4: Type imports aligned with LiveObjects moduleImporting
Primitive,Value, andLiveMap as PublicLiveMapfrom../../../liveobjectskeeps the implementation intact while pointing at the new LiveObjects surface. No further changes needed.src/plugins/liveobjects/instance.ts (1)
1-15: Instance typings now sourced from LiveObjectsUpdating the type-only imports (
LiveObjectType,Primitive,Value) to../../../liveobjectscleanly tracks the public rename without affecting runtime behavior.test/package/browser/template/README.md (1)
10-31: README updated to LiveObjects entrypointReferences to
index-objects.tsare correctly replaced withindex-liveobjects.tsand the import example now points atably/liveobjects, keeping the docs aligned with the renamed plugin and build script.ably.d.ts (1)
302-310: Public typings updated for LiveObjects plugin and branding symbol
- The
__livetypedocumentation now correctly states that the symbol is shared with types in'ably/liveobjects', matching how it’s imported in the LiveObjects plugin code.CorePluginsexposesLiveObjects?: unknowninstead ofObjects?: unknown, which aligns the default client’sClientOptions.pluginsshape with the new plugin name.Since this is a public API/typing rename, please double‑check:
- That all usage sites and docs now refer to
plugins.LiveObjects(including any upgrade notes).- Whether the existing TypeDoc warnings in the API Reference job are pre‑existing; they look unrelated to these specific lines but worth confirming once more after this change.
Also applies to: 627-642
src/common/lib/transport/transport.ts (1)
122-139: Transport logging now uses LiveObjects plugin handlePassing
this.connectionManager.realtime._liveObjectsPluginintostringifyProtocolMessageis the correct counterpart to the plugin rename and keeps protocol logging aligned with the new LiveObjects integration.test/support/browser_file_list.js (1)
30-48: Browser test manifest updated to LiveObjects testThe file list now points to
test/realtime/liveobjects.test.js, ensuring the renamed plugin’s realtime tests are included in the browser test run. No leftover reference to the oldobjectstest remains here.src/common/lib/transport/websockettransport.ts (1)
144-144: LGTM! Property reference updated correctly.The change from
_objectsPluginto_liveObjectsPlugincorrectly aligns with the plugin rename.src/common/lib/transport/comettransport.ts (1)
360-360: LGTM! Property reference updated correctly.The change from
_objectsPluginto_liveObjectsPlugincorrectly aligns with the plugin rename.src/plugins/liveobjects/realtimeobject.ts (1)
5-5: LGTM! Import path updated correctly.The import path change from
'../../../objects'to'../../../liveobjects'correctly reflects the module rename.test/package/browser/template/server/server.ts (1)
8-8: LGTM! Static file reference updated correctly.The filename change from
'index-objects.js'to'index-liveobjects.js'correctly reflects the test asset rename.test/package/browser/template/server/resources/index-liveobjects.html (1)
5-8: LGTM! Test page updated correctly.Both the page title and script reference have been updated to reflect the LiveObjects rename.
src/common/lib/transport/protocol.ts (1)
87-87: LGTM! Property reference updated correctly.The change from
_objectsPluginto_liveObjectsPlugincorrectly aligns with the plugin rename.liveobjects.d.ts (3)
73-73: LGTM! Documentation example updated correctly.The import path in the code example has been updated from
'ably/objects'to'ably/liveobjects'.
854-879: LGTM! Plugin documentation and export updated correctly.All references have been consistently updated from Objects to LiveObjects:
- Plugin name in documentation
- Import paths in code examples
- Export declaration
883-883: LGTM! Module augmentation documentation updated correctly.The module augmentation comment correctly references
'ably/liveobjects'as the import source.src/plugins/liveobjects/index.ts (1)
14-23: LGTM! Clean public API rename.The export has been cleanly renamed from
ObjectstoLiveObjects, with the comment appropriately updated to reflect the new naming. The internal structure and exports remain unchanged.src/common/lib/client/realtimechannel.ts (3)
20-20: Import path updated correctly.The import has been properly updated from
plugins/objectstoplugins/liveobjects.
140-142: Plugin initialization updated consistently.The plugin check and instantiation have been correctly updated to use
LiveObjectsinstead ofObjects.
152-158: Error message aligned with rename.The missing plugin error message has been appropriately updated to reference
LiveObjects.src/plugins/index.d.ts (1)
1-7: Type definitions updated consistently.Both the import path and the
StandardPluginsinterface property have been correctly updated fromObjectstoLiveObjects.src/common/lib/client/modularplugins.ts (2)
14-14: Import alias updated correctly.The import has been properly updated to use
LiveObjectsPluginfromplugins/liveobjects.
32-45: ModularPlugins interface aligned with rename.The
ModularPluginsinterface property has been correctly updated to referenceLiveObjectswith the proper type annotation.test/common/globals/named_dependencies.js (2)
14-17: Test dependency paths updated correctly.The
liveobjectsdependency paths have been properly updated frombuild/objectstobuild/liveobjectsfor both browser and node environments.
30-33: Test helper dependency renamed consistently.The
liveobjects_helperdependency has been properly renamed and its paths updated to align with the overall rename.src/common/lib/client/baserealtime.ts (3)
16-16: Import updated to LiveObjectsPlugin.The import has been correctly updated to use
LiveObjectsPluginfromplugins/liveobjects.
21-23: Plugin field renamed consistently.The field has been properly renamed from
_objectsPluginto_liveObjectsPluginwith the correct type annotation.
61-63: Plugin initialization aligned with rename.The plugin initialization has been correctly updated to reference
options.plugins?.LiveObjects.test/common/modules/liveobjects_helper.js (3)
6-7: Test helper dependencies updated correctly.The AMD module definition has been properly updated to use
liveobjectsdependency andLiveObjectsPluginparameter, with thecreatePMfunction initialized using the correct plugin reference.
30-30: Helper class renamed to LiveObjectsHelper.The class has been appropriately renamed from
ObjectsHelpertoLiveObjectsHelper.
429-429: Export aligned with class rename.The module export has been correctly updated to export
LiveObjectsHelper.package.json (3)
33-42: Package exports updated to LiveObjects.The export path has been correctly updated from
./objectsto./liveobjects, with all associated type definition and build artifact paths updated consistently.Note: This is a breaking change for consumers using
import { ... } from 'ably/objects'. Ensure this is documented in release notes and migration guides.
44-54: Files list updated with LiveObjects artifacts.The files list has been properly updated to include
liveobjects.d.tsandliveobjects.d.mtsinstead of the old objects-related files.
150-170: Build configuration verified successfully.The Grunt task
build:liveobjectsis properly defined in Gruntfile.js and integrated into the build pipeline. Type definitions are being generated correctly, and there are no missed references to the old Objects naming in the codebase. The pipeline should proceed without issues.test/package/browser/template/src/index-liveobjects.ts (1)
10-13: LGTM! Systematic rename from Objects to LiveObjects.The import statements, plugin initialization, and comments have been consistently updated to reflect the new LiveObjects naming convention. The test logic remains unchanged and will continue to validate TypeScript types and functionality with the renamed plugin.
Also applies to: 41-46
grunt/esbuild/build.js (1)
80-110: LGTM! Build configurations systematically updated.All four LiveObjects plugin configurations have been consistently renamed and updated:
- Entry points correctly reference
src/plugins/liveobjects/index.ts- Library name changed to
AblyLiveObjectsPlugin- Output files correctly reference
build/liveobjects.*- Module exports properly expose the new configuration names
The structural integrity of the build configurations is maintained while reflecting the new naming convention.
Also applies to: 120-123
src/common/lib/types/protocolmessage.ts (3)
14-14: LGTM! Import path updated correctly.The import path has been updated from
'plugins/objects'to'plugins/liveobjects', aligning with the plugin renaming.
29-103: LGTM! Function signatures updated systematically.All function signatures and type references have been consistently updated from
ObjectsPlugintoLiveObjectsPlugin:
deserialize,fromDeserialized,makeFromDeserializedWithDependencies, andstringifyparameter types- Local variable types and casts
- Dependency object key names
- Documentation comments
The changes maintain type safety and consistency throughout the file.
174-174: LGTM! Property type updated correctly.The
stateproperty type has been updated to useLiveObjectsPlugin.WireObjectMessage[], consistent with all other changes in this file.Gruntfile.js (3)
76-76: LGTM! Build task names updated consistently.All Grunt task names and dependencies have been systematically updated from
objectstoliveobjects:
- Main build task dependency
- Task registration names (
build:liveobjects:bundle,build:liveobjects, etc.)- Composite task dependencies
- Test webserver dependencies
The changes maintain the same task structure while implementing the rename.
Also applies to: 141-141, 169-169, 174-174
158-167: LGTM! Type generation task updated correctly.The task has been properly renamed and updated:
- Task name:
build:objects:types→build:liveobjects:types- Description references
liveobjects.d.mtsandliveobjects.d.ts- File reads/writes updated to
liveobjects.d.tsandliveobjects.d.mts- Log message updated to reference the new filenames
All file path references are consistent with the rename.
145-148:, the rewritten comment, a classification tag, and
7266c0a to
4ca4954
Compare
972be63 to
3cfb8df
Compare
4ca4954 to
3c871a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (2)
src/plugins/liveobjects/livecountervaluetype.ts (1)
2-2: The import path issue has already been flagged.This import path was already identified in previous reviews as resolving to a non-existent
src/liveobjectsdirectory and marked as addressed in commit 7266c0a. The comprehensive past review included extensive verification confirming this will cause a build failure.test/realtime/liveobjects.test.js (1)
3-9: LiveObjects AMD wiring and helper imports look consistentThe AMD
definenow pulls in'liveobjects'/'liveobjects_helper'asLiveObjectsPluginandLiveObjectsHelper, andcreatePM,gcIntervalOriginal,LiveMap, andLiveCounterare all sourced fromLiveObjectsPlugin. This cleanly aligns the test harness with the new LiveObjects plugin naming without changing behavior.Also applies to: 14-19
🧹 Nitpick comments (1)
src/common/lib/types/protocolmessage.ts (1)
29-38: Consider renaming parameter for consistency.The parameter name
objectsPlugincould be updated toliveObjectsPluginto match the new type nameLiveObjectsPlugin. This would improve consistency with the naming convention used throughout the codebase.🔎 View suggested naming update
This change would need to be applied to all three function signatures (
deserialize,fromDeserialized, andstringify) and their usages within this file.Example for the
deserializefunction:export function deserialize( serialized: unknown, MsgPack: MsgPack | null, presenceMessagePlugin: PresenceMessagePlugin | null, annotationsPlugin: AnnotationsPlugin | null, - objectsPlugin: typeof LiveObjectsPlugin | null, + liveObjectsPlugin: typeof LiveObjectsPlugin | null, format?: Utils.Format, ): ProtocolMessage { const deserialized = Utils.decodeBody<Record<string, unknown>>(serialized, MsgPack, format); - return fromDeserialized(deserialized, presenceMessagePlugin, annotationsPlugin, objectsPlugin); + return fromDeserialized(deserialized, presenceMessagePlugin, annotationsPlugin, liveObjectsPlugin); }Also applies to: 41-46, 109-114
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (42)
.gitignore(1 hunks)Gruntfile.js(3 hunks)ably.d.ts(2 hunks)grunt/esbuild/build.js(2 hunks)liveobjects.d.ts(3 hunks)package.json(3 hunks)scripts/moduleReport.ts(5 hunks)src/common/lib/client/baserealtime.ts(2 hunks)src/common/lib/client/modularplugins.ts(2 hunks)src/common/lib/client/realtimechannel.ts(3 hunks)src/common/lib/transport/comettransport.ts(1 hunks)src/common/lib/transport/connectionmanager.ts(1 hunks)src/common/lib/transport/protocol.ts(1 hunks)src/common/lib/transport/transport.ts(1 hunks)src/common/lib/transport/websockettransport.ts(1 hunks)src/common/lib/types/protocolmessage.ts(8 hunks)src/plugins/index.d.ts(1 hunks)src/plugins/liveobjects/batchcontext.ts(1 hunks)src/plugins/liveobjects/index.ts(1 hunks)src/plugins/liveobjects/instance.ts(1 hunks)src/plugins/liveobjects/livecounter.ts(1 hunks)src/plugins/liveobjects/livecountervaluetype.ts(1 hunks)src/plugins/liveobjects/livemap.ts(1 hunks)src/plugins/liveobjects/livemapvaluetype.ts(1 hunks)src/plugins/liveobjects/objectmessage.ts(1 hunks)src/plugins/liveobjects/objectspool.ts(1 hunks)src/plugins/liveobjects/pathobject.ts(1 hunks)src/plugins/liveobjects/pathobjectsubscriptionregister.ts(1 hunks)src/plugins/liveobjects/realtimeobject.ts(1 hunks)src/plugins/liveobjects/rootbatchcontext.ts(1 hunks)test/common/globals/named_dependencies.js(2 hunks)test/common/modules/liveobjects_helper.js(3 hunks)test/package/browser/template/README.md(2 hunks)test/package/browser/template/package.json(1 hunks)test/package/browser/template/server/resources/index-liveobjects.html(1 hunks)test/package/browser/template/server/server.ts(1 hunks)test/package/browser/template/src/index-liveobjects.ts(2 hunks)test/package/browser/template/test/lib/package.test.ts(1 hunks)test/realtime/liveobjects.test.js(30 hunks)test/support/browser_file_list.js(1 hunks)tsconfig.typedoc.json(1 hunks)typedoc.json(1 hunks)
✅ Files skipped from review due to trivial changes (3)
- src/common/lib/transport/protocol.ts
- src/plugins/liveobjects/objectspool.ts
- src/plugins/liveobjects/pathobjectsubscriptionregister.ts
🚧 Files skipped from review as they are similar to previous changes (20)
- src/plugins/liveobjects/livecounter.ts
- src/plugins/liveobjects/objectmessage.ts
- package.json
- test/package/browser/template/package.json
- src/plugins/index.d.ts
- src/common/lib/transport/comettransport.ts
- src/common/lib/client/modularplugins.ts
- ably.d.ts
- test/support/browser_file_list.js
- test/package/browser/template/server/server.ts
- test/package/browser/template/server/resources/index-liveobjects.html
- .gitignore
- scripts/moduleReport.ts
- test/package/browser/template/README.md
- src/plugins/liveobjects/index.ts
- src/plugins/liveobjects/rootbatchcontext.ts
- src/plugins/liveobjects/livemap.ts
- src/common/lib/client/baserealtime.ts
- liveobjects.d.ts
- src/plugins/liveobjects/realtimeobject.ts
🧰 Additional context used
🧬 Code graph analysis (4)
test/common/modules/liveobjects_helper.js (1)
test/realtime/liveobjects.test.js (1)
createPM(14-14)
test/package/browser/template/src/index-liveobjects.ts (1)
test/realtime/liveobjects.test.js (4)
channel(171-171)channel(207-207)channel(285-285)channel(8175-8175)
test/realtime/liveobjects.test.js (1)
test/common/modules/liveobjects_helper.js (1)
createPM(7-7)
src/common/lib/types/protocolmessage.ts (2)
src/plugins/liveobjects/index.ts (1)
WireObjectMessage(11-11)src/plugins/liveobjects/objectmessage.ts (1)
WireObjectMessage(468-812)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: test-node (20.x)
- GitHub Check: test-node (16.x)
- GitHub Check: test-node (18.x)
- GitHub Check: test-browser (webkit)
- GitHub Check: test-browser (firefox)
- GitHub Check: test-browser (chromium)
- GitHub Check: test-npm-package
🔇 Additional comments (19)
src/plugins/liveobjects/batchcontext.ts (1)
10-10: Import path change is correct and consistent across the codebase.The import path change from
../../../objectsto../../../liveobjectson line 10 is verified as correct. Theliveobjects.d.tsfile exists at the repository root and exports the required types (Instance, Primitive, Value, and others). All other files in the liveobjects plugin directory have been consistently updated to use the new import path, with no remaining references to the old../../../objectspath.tsconfig.typedoc.json (1)
3-3: LGTM!The exclude pattern is correctly updated to reflect the liveobjects naming.
typedoc.json (1)
3-3: LGTM!The typedoc entry point is correctly updated to reference liveobjects.d.ts.
src/common/lib/transport/transport.ts (1)
135-135: LGTM!The plugin reference in the stringify call is correctly updated to
_liveObjectsPlugin.src/common/lib/transport/websockettransport.ts (1)
144-144: LGTM!The plugin reference in the deserialization call is correctly updated to
_liveObjectsPlugin.src/plugins/liveobjects/instance.ts (1)
14-14: LGTM!The type import path is correctly updated from
../../../objectsto../../../liveobjects.src/common/lib/transport/connectionmanager.ts (1)
1815-1815: Plugin reference update is complete and consistent.Verification confirms all occurrences of
_objectsPluginhave been renamed to_liveObjectsPluginthroughout the codebase. No stray references to the old plugin name remain. The update at line 1815 in connectionmanager.ts is part of a complete, consistent migration across multiple files (protocol.ts, websockettransport.ts, transport.ts, comettransport.ts, and baserealtime.ts).test/package/browser/template/test/lib/package.test.ts (1)
6-6: HTML file for LiveObjects plugin export is properly configured.The HTML file at
test/package/browser/template/server/resources/index-liveobjects.htmlexists and is correctly named to match the test scenario reference.src/plugins/liveobjects/livemapvaluetype.ts (1)
2-2: The import path migration is complete and consistent.The import statement in
src/plugins/liveobjects/livemapvaluetype.tscorrectly references../../../liveobjects. A codebase-wide search confirms no remaining imports from the oldobjectsmodule path exist; all imports have been successfully updated to useliveobjects.src/common/lib/client/realtimechannel.ts (1)
20-20: LGTM! Import and plugin references correctly updated to LiveObjects.The changes consistently rename the Objects plugin to LiveObjects across imports, initialization, and error messages. The logic remains intact.
Also applies to: 140-142, 155-155
test/common/modules/liveobjects_helper.js (1)
6-7: LGTM! Helper class and module references correctly migrated to LiveObjects.The AMD module definition, class name, protocol message construction, and exports are all consistently updated to use the LiveObjects naming convention.
Also applies to: 30-30, 429-429
test/common/globals/named_dependencies.js (1)
14-17: LGTM! AMD module mappings correctly updated for LiveObjects.Both the plugin module and helper module mappings have been properly renamed and their paths updated for browser and node environments.
Also applies to: 30-33
grunt/esbuild/build.js (1)
80-110: LGTM! Build configurations comprehensively migrated to LiveObjects.All plugin configurations have been properly renamed with:
- Entry points updated to
src/plugins/liveobjects/index.ts- Library name changed to
AblyLiveObjectsPlugin- Output files renamed to
build/liveobjects.*- Module exports updated to reflect the new naming
The configuration structure and build logic remain unchanged.
Also applies to: 120-123
test/package/browser/template/src/index-liveobjects.ts (1)
10-13: LGTM! Test template correctly migrated to LiveObjects API.The imports, plugin initialization, and comments have been properly updated to use the LiveObjects naming convention. The test logic and type checking remain intact.
Also applies to: 41-41, 45-46
Gruntfile.js (1)
76-76: LGTM! Grunt tasks comprehensively migrated to LiveObjects.All build task references have been properly updated:
- Main build task dependency:
build:objects→build:liveobjects- Bundle task with updated esbuild config references
- Types task generating
liveobjects.d.tsandliveobjects.d.mts- Test webserver task dependency updated accordingly
The task structure and build logic remain unchanged.
Also applies to: 141-169, 174-174
test/realtime/liveobjects.test.js (1)
7394-7563: GC behaviour tests correctly target LiveObjects defaults and restore stateThe tombstone GC scenarios now mutate
LiveObjectsPlugin.RealtimeObject._DEFAULTS.gcIntervaland per‑testrealtimeObject.gcGracePeriod, then restore both (gcIntervalOriginalandgcGracePeriodOriginal) viafinally/post‑scenario cleanup. This keeps the tests focused on LiveObjects while avoiding global state leakage into other suites.src/common/lib/types/protocolmessage.ts (3)
14-14: LGTM! Import updated correctly.The import path and naming have been correctly updated to reflect the LiveObjects rename.
71-81: LGTM! Type references updated correctly.All type references for the state field and the
makeFromDeserializedWithDependenciesfunction have been properly updated to useLiveObjectsPlugin. The logic remains intact while the naming convention has been successfully migrated.Also applies to: 89-103
14-14: All ObjectsPlugin references have been successfully updated to LiveObjectsPlugin.Verification confirms no remaining references to the old
ObjectsPluginname exist in the codebase, and all import paths have been properly updated from'ably/objects'or'plugins/objects'to'plugins/liveobjects'. The import statement at line 14 is correct.
ttypic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changes import from 'ably/objects' to 'ably/liveobjects' and renames the named export from 'Objects' to 'LiveObjects'. See SDK and Plugin Naming Conventions for Multi-Product Architecture DR: https://ably.atlassian.net/wiki/x/GoAJ-g
3c871a9 to
ea4c08d
Compare
Change library/import naming from Objects to LiveObjects
We changed the name of the build file in #2133 but forgot to update the CDN deploy script to reference the new name. Resolves AIT-242
Changes made by Claude and then reviewed and tested locally by me.
Changes import from 'ably/objects' to 'ably/liveobjects' and renames
the named export from 'Objects' to 'LiveObjects'.
See SDK and Plugin Naming Conventions for Multi-Product Architecture DR:
https://ably.atlassian.net/wiki/x/GoAJ-g
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.