fix: drop .zip deployment - isDate is not a function#4129
Open
NomisCZ wants to merge 2 commits intoDokploy:canaryfrom
Open
fix: drop .zip deployment - isDate is not a function#4129NomisCZ wants to merge 2 commits intoDokploy:canaryfrom
NomisCZ wants to merge 2 commits intoDokploy:canaryfrom
Conversation
Contributor
|
Check the build errors @NomisCZ |
Author
|
@Siumauricio Any updates? |
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.
What is this PR about?
Summary:
Fix
TypeError: isDate is not a functionin Drop Deployment by upgrading ssh2 from 1.15.0 to ^1.16.0, which replaces the removed util.isDate with util.types.isDate for Node.js v23+ compatibility.Description:
ssh2@1.15.0importsisDatedirectly from Node.js'sutilmodule. However,isDatewas deprecated and removed in Node.js v23+.ssh2 commit: mscdex/ssh2@4f771c9
Dokploy now requires
"node": "^24.4.0", which means util.isDate destructures as undefined at runtime. When the bundled code calls isDate(attrs.atime) during an SFTP file upload, it throws:Called API endpoint:
/api/trpc/application.dropDeployment:{ "error": { "json": { "message": "isDate is not a function", "code": -32603, "data": { "code": "INTERNAL_SERVER_ERROR", "httpStatus": 500, "path": "application.dropDeployment", "zodError": null } } } }This breaks the Drop Deployment feature — every file upload via SFTP fails with HTTP 500.
Checklist
Before submitting this PR, please make sure that:
canarybranch.Screenshots (if applicable)
Greptile Summary
This PR fixes a runtime crash in the Drop Deployment (
.zipupload) feature by upgradingssh2from1.15.0to^1.16.0(resolves to1.17.0in the lockfile). The root cause is that Node.js v23+ removedutil.isDate, whichssh2@1.15.0destructures directly fromrequire('util'). Since Dokploy now requires Node.js^24.4.0, this caused every SFTP file upload to throwTypeError: isDate is not a functionand return HTTP 500. The upgrade tossh2@1.17.0usesutil.types.isDateinstead, restoring compatibility.Key changes:
packages/server/package.json:ssh2bumped from pinned1.15.0to^1.16.0pnpm-lock.yaml: Resolvesssh2to1.17.0and includes expected collateral lockfile changes (peer-dependency hash updates forbetter-auth,jitiminor resolution shifts for dev/test tooling). None of these collateral changes affect production runtime behavior.Confidence Score: 5/5
This PR is safe to merge — it is a minimal, well-scoped dependency bump that directly addresses a confirmed production crash on Node.js v23+.
The fix is precise and well-justified: ssh2@1.17.0 contains the exact upstream commit that replaces the removed util.isDate with util.types.isDate. The change is isolated to one dependency. The collateral lockfile changes (better-auth hash updates, jiti version swaps in dev/test tooling snapshots) are normal artifacts of lockfile regeneration and carry no production risk. No breaking changes are introduced by the ssh2 minor version upgrade.
No files require special attention.
Reviews (1): Last reviewed commit: "fix: upgrade ssh2 from 1.15.0 to ^1.16.0..." | Re-trigger Greptile
(2/5) Greptile learns from your feedback when you react with thumbs up/down!