Closed massimocandela closed 1 year ago
Would love for this to get merged 🙏 Getting rid of this deprecation warning would be a godsend
So, when you release it?
Is there any chance this PR will be included in the next release?
I wonder if this pr is in any of releases so far?
Restify is dead. Migrate to express
I was having the same problem and fixed it by using patch-package
with the following content on Restify 1.11:
diff --git a/node_modules/restify/lib/server.js b/node_modules/restify/lib/server.js
index a586532..412e850 100644
--- a/node_modules/restify/lib/server.js
+++ b/node_modules/restify/lib/server.js
@@ -11,7 +11,6 @@ var _ = require('lodash');
var assert = require('assert-plus');
var errors = require('restify-errors');
var mime = require('mime');
-var spdy = require('spdy');
var vasync = require('vasync');
var Chain = require('./chain');
@@ -187,6 +186,7 @@ function Server(options) {
];
if (options.spdy) {
+ var spdy = require('spdy');
this.spdy = true;
this.server = spdy.createServer(options.spdy);
} else if (options.http2) {
First of all, thanks for the great Restify!! I've been using it for years in several projects (including this).
Pre-Submission Checklist
make prepush
Issues
Closes:
Support for Node14 will end in 2 months, we need to move to Node 16+. However, restify imports spdy, which raises
The good news is that most of the time spdy is not used since you need to pass
options.spdy
.Changes
We can simply avoid deprecation warnings (and also avoid to run unused code) by importing spdy on request (as currently done for http2). This could be both a permanent or temporary solution waiting for spdy to be patched.