build: upgrade runtime to Node 24.19.0 and TypeScript 5.9.3 - #51
Open
dhairyathareja1 wants to merge 2 commits into
Open
build: upgrade runtime to Node 24.19.0 and TypeScript 5.9.3#51dhairyathareja1 wants to merge 2 commits into
dhairyathareja1 wants to merge 2 commits into
Conversation
Member
|
I got the issue you are facing currently, I'd suggest you to avoid making changes related to hubot. As of now, we need to migrate from hubot to bolt as slack adapter as well. The |
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.
Node.js 24 Upgrade
Summary
This PR upgrades the bot's runtime from Node.js 8 to Node.js 24 and modernizes the associated npm, TypeScript, Docker, launcher, and CI configuration.
It does not intentionally change the bot's commands or business logic.
Core changes
8.10.0to24.19.0..nvmrcto keep local development and CI on the same Node.js version.npm@11.17.0as the package manager.4.9.5to5.9.3.@types/nodefrom Node 8 typings to Node 24 typings.package-lock.jsonusing the new npm version.check, type-check, build, test, and Heroku post-build commands.--legacy-peer-depswhere required because the currently merged Hubot dependency tree contains incompatible peer-dependency declarations.start_bot.shto use the Node.js version from.nvmrc.Docker changes
The Docker image now uses separate build and runtime stages:
scripts/.nodeuser.The runtime command originally invoked
bin/hubot. That launcher unconditionally runsnpm installandnpm run build, but the final image intentionally does not containtsconfig.jsonorsrc-ts/. Consequently, a production container would fail during startup even though its compiled scripts were already present.The Docker command has therefore been changed to launch the precompiled bot directly:
This keeps the image immutable and prevents dependency installation or unnecessary TypeScript compilation during container startup.
Existing Hubot 14 compatibility issue
This branch inherits
hubot@14.1.0from the previously merged Dependabot changes. The Hubot upgrade was not introduced as part of this Node.js upgrade.Although Hubot 14 supports Node.js 24, it is not compatible with several legacy components currently used by this repository:
hubot-slackcannot be loaded through Hubot 14's ESM-based adapter loader.hubot-envexposes a CoffeeScript entry point that Hubot 14 cannot import directly.hubot-redis-brain@0.0.3declares compatibility with Hubot 2.x.hubot-scripts.jsonconfiguration, so the Redis brain andshipitscripts are not loaded through that file.Using
--legacy-peer-depsallows npm to install this dependency tree, but it does not resolve these runtime incompatibilities.The Node.js 24 toolchain itself installs, compiles, type-checks, and runs the repository's regression tests successfully. However, full Slack bot startup remains blocked by the independently merged Hubot 14 upgrade. That dependency should either be temporarily pinned to a compatible Hubot release or migrated separately with compatible adapters, scripts, middleware, and persistence packages.
Current CI coverage and gaps
The workflow currently verifies:
The Docker smoke test currently overrides the image entry point and executes Node.js directly. This allows CI to import the compiled modules without requiring Slack credentials, Redis, or other production services.
Because the real Docker command is bypassed, the test does not verify:
Therefore, a green CI run currently confirms that the Node.js and TypeScript build artifacts are valid, but it does not confirm that the complete production bot starts successfully. A separate end-to-end startup test should be added after the Hubot compatibility work is resolved.
Closes #49