@art-ws/di 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,8 +66,8 @@ export class Injector {
66
66
  }
67
67
  }
68
68
  export function inject(token) {
69
- const context = asyncLocalStorage.getStore();
70
- const injector = context?.injector || Injector.root;
69
+ const asyncContext = asyncLocalStorage.getStore();
70
+ const injector = asyncContext?.injector || Injector.root;
71
71
  if (!injector)
72
72
  throw new Error(`No injector found`);
73
73
  return injector.get(token);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@art-ws/di",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Dependency injection for TypeScript",
5
5
  "license": "UNLICENSED",
6
6
  "author": "art-ws Team",
@@ -15,12 +15,13 @@
15
15
  "eslint": "9.29.0",
16
16
  "typescript": "5.6.2",
17
17
  "vitest": "3.2.4",
18
- "@art-ws/config-eslint": "2.0.0",
19
- "@art-ws/config-ts": "2.0.0"
18
+ "@art-ws/config-eslint": "2.0.2",
19
+ "@art-ws/config-ts": "2.0.5"
20
20
  },
21
21
  "scripts": {
22
22
  "build": "tsc",
23
- "clean": "rm -rf node_modules && rm -rf dist",
23
+ "clean": "rm -rf dist",
24
+ "clean:nm": "rm -rf node_modules",
24
25
  "lint": "eslint .",
25
26
  "test": "vitest run",
26
27
  "test:watch": "vitest",