From c228a71bfabb9060a7079d2b89705df0333cb244 Mon Sep 17 00:00:00 2001 From: Ronny Dewaele Date: Tue, 10 Sep 2024 12:28:58 +0200 Subject: [PATCH 1/2] adapt dependencies --- package.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.js b/package.js index 361f8b2..c7084e1 100644 --- a/package.js +++ b/package.js @@ -5,8 +5,8 @@ Package.describe({ git: 'https://github.com/iron-meteor/iron-middleware-stack' }); -Package.on_use(function (api) { - api.versionsFrom('METEOR@0.9.2'); +Package.onUse(function (api) { + api.versionsFrom('3.0.2'); api.use('underscore'); api.use('ejson'); @@ -16,15 +16,15 @@ Package.on_use(function (api) { api.use('iron:url@1.0.11'); - api.add_files('lib/handler.js'); - api.add_files('lib/middleware_stack.js'); + api.addFiles('lib/handler.js'); + api.addFiles('lib/middleware_stack.js'); api.export('Handler', {testOnly: true}); }); -Package.on_test(function (api) { +Package.onTest(function (api) { api.use('iron:middleware-stack'); api.use('tinytest'); api.use('test-helpers'); - api.add_files('test/handler_test.js'); - api.add_files('test/middleware_stack_test.js'); + api.addFiles('test/handler_test.js'); + api.addFiles('test/middleware_stack_test.js'); }); From 4ce59ba580de05444374cf1d8e67348de486f94f Mon Sep 17 00:00:00 2001 From: Ronny Dewaele Date: Tue, 10 Sep 2024 12:29:27 +0200 Subject: [PATCH 2/2] drop Fiber test --- test/middleware_stack_test.js | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/test/middleware_stack_test.js b/test/middleware_stack_test.js index 9a1c3e6..72e92cc 100644 --- a/test/middleware_stack_test.js +++ b/test/middleware_stack_test.js @@ -152,31 +152,31 @@ Tinytest.add('MiddlewareStack - dispatch callback', function (test) { } }); -if (Meteor.isServer) { - var Fiber = Npm.require('fibers'); - Tinytest.addAsync('MiddlewareStack - async next maintains fibers', function (test, done) { - var envVar = new Meteor.EnvironmentVariable; +// if (Meteor.isServer) { +// var Fiber = Npm.require('fibers'); +// Tinytest.addAsync('MiddlewareStack - async next maintains fibers', function (test, done) { +// var envVar = new Meteor.EnvironmentVariable; - envVar.withValue(true, function () { - var stack = new Iron.MiddlewareStack; +// envVar.withValue(true, function () { +// var stack = new Iron.MiddlewareStack; - test.isTrue(envVar.getOrNullIfOutsideFiber()); - stack.push(function(req, res, next) { - // break out of the current fiber - setTimeout(function() { - next(); - }, 0); - }, {where: 'server'}); - - stack.push(function(req, res, next) { - test.isTrue(envVar.getOrNullIfOutsideFiber()); - this.next(); - }, {where: 'server'}); +// test.isTrue(envVar.getOrNullIfOutsideFiber()); +// stack.push(function(req, res, next) { +// // break out of the current fiber +// setTimeout(function() { +// next(); +// }, 0); +// }, {where: 'server'}); + +// stack.push(function(req, res, next) { +// test.isTrue(envVar.getOrNullIfOutsideFiber()); +// this.next(); +// }, {where: 'server'}); - stack.dispatch('/', {}, function () { - test.isTrue(envVar.getOrNullIfOutsideFiber()); - done(); - }); - }); - }); -} +// stack.dispatch('/', {}, function () { +// test.isTrue(envVar.getOrNullIfOutsideFiber()); +// done(); +// }); +// }); +// }); +// }