From 452c59052126c73c5f6d452233a846ec7ac13ae7 Mon Sep 17 00:00:00 2001 From: jankapunkt Date: Thu, 1 Aug 2024 13:46:03 +0200 Subject: [PATCH] build: move npm-depends to top of package hooks --- package.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/package.js b/package.js index 067d4bf..be8e3dd 100755 --- a/package.js +++ b/package.js @@ -17,6 +17,7 @@ const dependencies = { }; Package.onUse(function (api) { + Npm.depends(dependencies); api.versionsFrom(['2.3', '3.0']); api.use(['ecmascript', 'webapp', 'http@1.0.0 || 2.0.0']); @@ -35,11 +36,16 @@ Package.onUse(function (api) { api.mainModule('server/index.js', 'server'); api.mainModule('client/methods.js', 'client'); - Npm.depends(dependencies); }); Package.onTest(function (api) { + Npm.depends({ + ...dependencies, + 'chai': '4.2.0', + 'sinon': '7.1.1', + 'sinon-chai': '3.2.0' + }); api.use('ecmascript'); api.use('lmieulet:meteor-legacy-coverage@0.4.0', 'server'); api.use(['lmieulet:meteor-coverage@4.3.0']); @@ -48,11 +54,4 @@ Package.onTest(function (api) { api.addFiles(['client/methods.e2e.tests.js', 'client/methods.unit.tests.js', 'client/client.instrumentation.tests.js'], 'client'); api.mainModule('server/tests.js', 'server'); api.mainModule('client/main.tests.js', 'client'); - - Npm.depends({ - ...dependencies, - 'chai': '4.2.0', - 'sinon': '7.1.1', - 'sinon-chai': '3.2.0' - }); });