@codefast/di 0.3.16-canary.1 → 0.3.16-canary.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.
package/dist/token.d.mts CHANGED
@@ -16,7 +16,7 @@ declare function token<Value>(name: string): Token<Value>;
16
16
  /**
17
17
  * @since 0.3.16-canary.0
18
18
  */
19
- declare function tokenName(t: Token<unknown> | Constructor): string;
19
+ declare function tokenName(dependency: Token<unknown> | Constructor): string;
20
20
  /**
21
21
  * @since 0.3.16-canary.0
22
22
  */
package/dist/token.mjs CHANGED
@@ -8,15 +8,15 @@ function token(name) {
8
8
  /**
9
9
  * @since 0.3.16-canary.0
10
10
  */
11
- function tokenName(t) {
12
- if (typeof t === "function") return t.name;
13
- return t.name;
11
+ function tokenName(dependency) {
12
+ if (typeof dependency === "function") return dependency.name;
13
+ return dependency.name;
14
14
  }
15
15
  /**
16
16
  * @since 0.3.16-canary.0
17
17
  */
18
18
  function isToken(value) {
19
- return typeof value === "object" && value !== null && "name" in value && typeof value["name"] === "string" && typeof value !== "function";
19
+ return typeof value === "object" && value !== null && "name" in value && typeof value["name"] === "string";
20
20
  }
21
21
  //#endregion
22
22
  export { isToken, token, tokenName };
package/dist/types.d.mts CHANGED
@@ -46,7 +46,7 @@ interface ResolveOptions {
46
46
  /**
47
47
  * @since 0.3.16-canary.0
48
48
  */
49
- interface MaterializationFrame {
49
+ interface ResolutionFrame {
50
50
  readonly tokenName: string;
51
51
  readonly scope: BindingScope;
52
52
  readonly bindingId: BindingIdentifier;
@@ -61,9 +61,9 @@ interface MaterializationFrame {
61
61
  */
62
62
  interface ConstraintContext {
63
63
  readonly resolutionPath: ReadonlyArray<string>;
64
- readonly materializationStack: ReadonlyArray<MaterializationFrame>;
65
- readonly parent: MaterializationFrame | undefined;
66
- readonly ancestors: ReadonlyArray<MaterializationFrame>;
64
+ readonly resolutionStack: ReadonlyArray<ResolutionFrame>;
65
+ readonly parent: ResolutionFrame | undefined;
66
+ readonly ancestors: ReadonlyArray<ResolutionFrame>;
67
67
  readonly currentResolveHint: ResolveOptions | undefined;
68
68
  }
69
69
  /**
@@ -83,4 +83,4 @@ interface ResolutionContext {
83
83
  */
84
84
  type TokenValue<Type> = Type extends Token<infer Value> ? Value : Type extends Constructor<infer Value> ? Value : never;
85
85
  //#endregion
86
- export { ActivationHandler, BindingIdentifier, BindingKind, BindingScope, ConstraintContext, type Constructor, DeactivationHandler, DependencyKey, MaterializationFrame, ResolutionContext, ResolveOptions, TokenValue };
86
+ export { ActivationHandler, BindingIdentifier, BindingKind, BindingScope, ConstraintContext, type Constructor, DeactivationHandler, DependencyKey, ResolutionContext, ResolutionFrame, ResolveOptions, TokenValue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefast/di",
3
- "version": "0.3.16-canary.1",
3
+ "version": "0.3.16-canary.2",
4
4
  "description": "Lightweight dependency injection primitives for Codefast",
5
5
  "keywords": [
6
6
  "codefast",
@@ -170,16 +170,17 @@
170
170
  "access": "public"
171
171
  },
172
172
  "devDependencies": {
173
- "@types/node": "^25.6.2",
174
- "@typescript/native-preview": "7.0.0-dev.20260509.2",
175
- "@vitest/coverage-v8": "^4.1.5",
173
+ "@babel/plugin-proposal-decorators": "^7.29.0",
174
+ "@rolldown/plugin-babel": "^0.2.3",
175
+ "@types/node": "^25.7.0",
176
+ "@typescript/native-preview": "7.0.0-dev.20260514.1",
177
+ "@vitest/coverage-v8": "^4.1.6",
176
178
  "expect-type": "^1.3.0",
177
179
  "tsdown": "^0.22.0",
178
- "tsx": "^4.21.0",
180
+ "tsx": "^4.22.0",
179
181
  "typescript": "^6.0.3",
180
- "unplugin-swc": "^1.5.9",
181
- "vitest": "^4.1.5",
182
- "@codefast/typescript-config": "0.3.16-canary.1"
182
+ "vitest": "^4.1.6",
183
+ "@codefast/typescript-config": "0.3.16-canary.2"
183
184
  },
184
185
  "engines": {
185
186
  "node": ">=22.0.0"