@prosopo/user-access-policy 3.9.1 → 3.10.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/.turbo/turbo-build$colon$cjs.log +35 -35
- package/.turbo/turbo-build$colon$tsc.log +14 -14
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +16 -0
- package/dist/cjs/redis/reader/redisRulesReader.cjs +120 -17
- package/dist/redis/reader/redisRulesReader.d.ts +4 -2
- package/dist/redis/reader/redisRulesReader.d.ts.map +1 -1
- package/dist/redis/reader/redisRulesReader.js +121 -18
- package/dist/redis/reader/redisRulesReader.js.map +1 -1
- package/dist/tests/redis/redisRulesReaderRank.benchmark.integration.test.d.ts +2 -0
- package/dist/tests/redis/redisRulesReaderRank.benchmark.integration.test.d.ts.map +1 -0
- package/dist/tests/redis/redisRulesReaderRank.benchmark.integration.test.js +189 -0
- package/dist/tests/redis/redisRulesReaderRank.benchmark.integration.test.js.map +1 -0
- package/package.json +3 -3
- package/src/redis/reader/redisRulesReader.ts +191 -33
- package/src/tests/redis/redisRulesReaderRank.benchmark.integration.test.ts +338 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.test.config.ts +12 -1
package/vite.test.config.ts
CHANGED
|
@@ -15,6 +15,7 @@ import path from "node:path";
|
|
|
15
15
|
// limitations under the License.
|
|
16
16
|
import { ViteTestConfig } from "@prosopo/config";
|
|
17
17
|
import dotenv from "dotenv";
|
|
18
|
+
import { mergeConfig } from "vitest/config";
|
|
18
19
|
process.env.NODE_ENV = "test";
|
|
19
20
|
// if .env.test exists at this level, use it, otherwise use the one at the root
|
|
20
21
|
const envFile = `.env.${process.env.NODE_ENV || "development"}`;
|
|
@@ -29,4 +30,14 @@ if (fs.existsSync(envFile)) {
|
|
|
29
30
|
|
|
30
31
|
dotenv.config({ path: envPath });
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
// All integration tests in this package share one redis-stack instance
|
|
34
|
+
// at localhost:6379, and they both write to the global access-rules
|
|
35
|
+
// index. With vitest's default parallel file execution, the suites
|
|
36
|
+
// trample each other's data (row counts diverge, indexes get dropped
|
|
37
|
+
// mid-query). Force serial file execution so test isolation matches
|
|
38
|
+
// the redis isolation the suites already rely on.
|
|
39
|
+
export default mergeConfig(ViteTestConfig(), {
|
|
40
|
+
test: {
|
|
41
|
+
fileParallelism: false,
|
|
42
|
+
},
|
|
43
|
+
});
|