diff --git a/templates/javascript-esm/package.json b/templates/javascript-esm/package.json index 7121a7b0..9a319fa8 100644 --- a/templates/javascript-esm/package.json +++ b/templates/javascript-esm/package.json @@ -13,7 +13,7 @@ ], "license": "UNLICENSED", "dependencies": { - "@sern/handler": "^2.0.0", + "@sern/handler": "^2.5.0", "discord.js": "^14.7.1" }, "devDependencies": { diff --git a/templates/javascript-esm/src/index.js b/templates/javascript-esm/src/index.js index d3c8514e..fb665ced 100644 --- a/templates/javascript-esm/src/index.js +++ b/templates/javascript-esm/src/index.js @@ -22,8 +22,8 @@ const client = new Client({ export const useContainer = Sern.makeDependencies({ build: (root) => root - .add({ '@sern/client': single(client) }) - .add({ '@sern/logger': single(new DefaultLogging()) }), + .add({ '@sern/client': single(() => client) }) + .upsert({ '@sern/logger': single(() => new DefaultLogging()) }), //using upsert because it replaces the default provided }); //View docs for all options diff --git a/templates/javascript/package.json b/templates/javascript/package.json index 6d214824..9f67d042 100644 --- a/templates/javascript/package.json +++ b/templates/javascript/package.json @@ -13,7 +13,7 @@ ], "license": "UNLICENSED", "dependencies": { - "@sern/handler": "^2.0.0", + "@sern/handler": "^2.5.0", "discord.js": "^14.7.1" }, "devDependencies": { diff --git a/templates/javascript/src/index.js b/templates/javascript/src/index.js index 8fad7584..bef58fd9 100644 --- a/templates/javascript/src/index.js +++ b/templates/javascript/src/index.js @@ -22,8 +22,8 @@ const client = new Client({ export const useContainer = Sern.makeDependencies({ build: (root) => root - .add({ '@sern/client': single(client) }) - .add({ '@sern/logger': single(new DefaultLogging()) }), + .add({ '@sern/client': single(() => client) }) + .upsert({ '@sern/logger': single(() => new DefaultLogging()) }), //using upsert because it replaces the default provided }); //View docs for all options diff --git a/templates/typescript/package.json b/templates/typescript/package.json index 02ee8976..4b2f1f8b 100644 --- a/templates/typescript/package.json +++ b/templates/typescript/package.json @@ -15,7 +15,7 @@ ], "license": "UNLICENSED", "dependencies": { - "@sern/handler": "^2.0.0", + "@sern/handler": "^2.5.0", "discord.js": "^14.7.1" }, "devDependencies": { diff --git a/templates/typescript/src/index.ts b/templates/typescript/src/index.ts index 71ba32d9..6bc4902f 100644 --- a/templates/typescript/src/index.ts +++ b/templates/typescript/src/index.ts @@ -33,8 +33,8 @@ interface MyDependencies extends Dependencies { export const useContainer = Sern.makeDependencies({ build: (root) => root - .add({ '@sern/client': single(client) }) - .add({ '@sern/logger': single(new DefaultLogging()) }), + .add({ '@sern/client': single(() => client) }) + .upsert({ '@sern/logger': single(() => new DefaultLogging()) }), //using upsert because it replaces the default provided }); //View docs for all options