casbin 5.38.0 → 5.39.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [5.39.0](https://github.com/casbin/node-casbin/compare/v5.38.0...v5.39.0) (2025-09-22)
2
+
3
+
4
+ ### Features
5
+
6
+ * **adapter:** add lazyLoad parameter to initWithAdapter in newEnforcerWithClass ([#503](https://github.com/casbin/node-casbin/issues/503)) ([b9a3d45](https://github.com/casbin/node-casbin/commit/b9a3d451baabc60f2de0e64807b9930c888b3774))
7
+
1
8
  # [5.38.0](https://github.com/casbin/node-casbin/compare/v5.37.0...v5.38.0) (2025-01-23)
2
9
 
3
10
 
@@ -491,7 +491,7 @@ async function newEnforcerWithClass(enforcer, ...params) {
491
491
  await e.initWithFile(params[0].toString(), params[1].toString());
492
492
  }
493
493
  else {
494
- await e.initWithAdapter(params[0].toString(), params[1]);
494
+ await e.initWithAdapter(params[0].toString(), params[1], params[2] === true);
495
495
  }
496
496
  }
497
497
  else {
@@ -468,7 +468,7 @@ export async function newEnforcerWithClass(enforcer, ...params) {
468
468
  await e.initWithFile(params[0].toString(), params[1].toString());
469
469
  }
470
470
  else {
471
- await e.initWithAdapter(params[0].toString(), params[1]);
471
+ await e.initWithAdapter(params[0].toString(), params[1], params[2] === true);
472
472
  }
473
473
  }
474
474
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "casbin",
3
- "version": "5.38.0",
3
+ "version": "5.39.0",
4
4
  "description": "An authorization library that supports access control models like ACL, RBAC, ABAC in Node.JS",
5
5
  "main": "lib/cjs/index.js",
6
6
  "typings": "lib/cjs/index.d.ts",