@memberjunction/global 5.30.1 → 5.31.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/dist/__tests__/MultiProviderCompliance.test.d.ts +2 -0
- package/dist/__tests__/MultiProviderCompliance.test.d.ts.map +1 -0
- package/dist/__tests__/MultiProviderCompliance.test.js +171 -0
- package/dist/__tests__/MultiProviderCompliance.test.js.map +1 -0
- package/dist/__tests__/UUIDCompliance.test.js +27 -5
- package/dist/__tests__/UUIDCompliance.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiProviderCompliance.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/MultiProviderCompliance.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-Provider Compliance Tests (Strict)
|
|
3
|
+
*
|
|
4
|
+
* Scans the MemberJunction source tree for `new Metadata()` and `Metadata.Provider`
|
|
5
|
+
* references — patterns that resolve to the **process-global** default
|
|
6
|
+
* `IMetadataProvider`. These are bugs in any code path that should be per-provider:
|
|
7
|
+
* - Multi-provider clients (parallel server connections)
|
|
8
|
+
* - Server-side request handlers (transaction isolation)
|
|
9
|
+
* - Any class that already owns a provider via `this.ProviderToUse` / `this`
|
|
10
|
+
*
|
|
11
|
+
* See [/CLAUDE.md] section "Don't Reach for the Global Metadata Provider in
|
|
12
|
+
* Per-Provider Code Paths" for the rule and migration patterns.
|
|
13
|
+
*
|
|
14
|
+
* ## Strict mode
|
|
15
|
+
*
|
|
16
|
+
* The migration completed in `multi-provider-threading` (Phase 6 acceptance
|
|
17
|
+
* criterion). The previous ratchet baseline has been deleted. The test now
|
|
18
|
+
* fails on **any** non-allowlisted violation — no per-package allowance.
|
|
19
|
+
*
|
|
20
|
+
* Lines are exempt from the violation count if any of the following hold:
|
|
21
|
+
* 1. They are pure comments / JSDoc (start with `//`, `*`, or `/*`).
|
|
22
|
+
* 2. They are imports.
|
|
23
|
+
* 3. They use the recommended fallback pattern: `provider ?? new Metadata()`
|
|
24
|
+
* or `provider ?? Metadata.Provider`. The `??` operator clearly marks
|
|
25
|
+
* "use the supplied provider, or fall back to global", which is the
|
|
26
|
+
* legitimate terminal state for a helper that accepts an optional
|
|
27
|
+
* provider parameter.
|
|
28
|
+
* 4. They have an inline allowlist comment: `// global-provider-ok: <reason>`
|
|
29
|
+
* anywhere on the line. Use sparingly and document the reason — these
|
|
30
|
+
* are reviewed in PRs.
|
|
31
|
+
*
|
|
32
|
+
* ## How to fix a violation
|
|
33
|
+
*
|
|
34
|
+
* - **Inside a class with a bound provider** (ProviderBase, BaseEngine,
|
|
35
|
+
* BaseEntity, BaseAngularComponent subclass): use `this.ProviderToUse`
|
|
36
|
+
* (or `this` when the class IS the provider).
|
|
37
|
+
* - **Inside a helper function**: accept an optional `provider?: IMetadataProvider`
|
|
38
|
+
* parameter and use the `??` fallback pattern (exempt from the scanner).
|
|
39
|
+
* - **Inside genuinely global / bootstrap / CLI / codegen code**: append
|
|
40
|
+
* `// global-provider-ok: <specific reason>` on the same line.
|
|
41
|
+
*/
|
|
42
|
+
import { describe, it, expect } from 'vitest';
|
|
43
|
+
import * as fs from 'fs';
|
|
44
|
+
import * as path from 'path';
|
|
45
|
+
const SCAN_ROOT = path.resolve(__dirname, '..', '..', '..'); // packages/
|
|
46
|
+
/** Anti-pattern regexes — match a global-provider reference. */
|
|
47
|
+
const PATTERNS = [
|
|
48
|
+
/\bnew\s+Metadata\s*\(\s*\)/,
|
|
49
|
+
/\bMetadata\.Provider\b/,
|
|
50
|
+
];
|
|
51
|
+
/**
|
|
52
|
+
* Patterns that indicate a LEGITIMATE global fallback inside an otherwise provider-aware
|
|
53
|
+
* helper. These are the recommended terminal state: a method that accepts
|
|
54
|
+
* `provider?: IMetadataProvider` and falls back to the global default when the
|
|
55
|
+
* caller doesn't supply one. The `??` operator clearly marks "use the supplied
|
|
56
|
+
* provider, or fall back to global." Counting these as violations would penalize
|
|
57
|
+
* the right pattern.
|
|
58
|
+
*/
|
|
59
|
+
const FALLBACK_PATTERNS = [
|
|
60
|
+
/\?\?\s*\(?\s*new\s+Metadata\s*\(\s*\)/,
|
|
61
|
+
/\?\?\s*Metadata\.Provider\b/,
|
|
62
|
+
];
|
|
63
|
+
/** Inline allowlist marker — line is intentional global use. */
|
|
64
|
+
const ALLOW_COMMENT = /\/\/\s*global-provider-ok\b/i;
|
|
65
|
+
/** Path patterns to skip during scan. Mirrors UUIDCompliance.test.ts. */
|
|
66
|
+
const EXCLUDE_PATH_PATTERNS = [
|
|
67
|
+
/node_modules/,
|
|
68
|
+
/\/dist\//,
|
|
69
|
+
/\/generated\//,
|
|
70
|
+
/\.test\.ts$/,
|
|
71
|
+
/\.spec\.ts$/,
|
|
72
|
+
/__tests__/,
|
|
73
|
+
/\.d\.ts$/,
|
|
74
|
+
/\.map$/,
|
|
75
|
+
/\.js$/,
|
|
76
|
+
];
|
|
77
|
+
function shouldScanFile(filePath) {
|
|
78
|
+
if (!filePath.endsWith('.ts'))
|
|
79
|
+
return false;
|
|
80
|
+
return !EXCLUDE_PATH_PATTERNS.some(p => p.test(filePath));
|
|
81
|
+
}
|
|
82
|
+
function findTsFiles(dir) {
|
|
83
|
+
const results = [];
|
|
84
|
+
if (!fs.existsSync(dir))
|
|
85
|
+
return results;
|
|
86
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
87
|
+
for (const entry of entries) {
|
|
88
|
+
const fullPath = path.join(dir, entry.name);
|
|
89
|
+
if (entry.isDirectory()) {
|
|
90
|
+
// Hard-skip massive / irrelevant directories for performance
|
|
91
|
+
if (entry.name === 'node_modules' ||
|
|
92
|
+
entry.name === 'dist' ||
|
|
93
|
+
entry.name === '.git' ||
|
|
94
|
+
entry.name === 'generated' ||
|
|
95
|
+
entry.name === '__tests__') {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
results.push(...findTsFiles(fullPath));
|
|
99
|
+
}
|
|
100
|
+
else if (shouldScanFile(fullPath)) {
|
|
101
|
+
results.push(fullPath);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return results;
|
|
105
|
+
}
|
|
106
|
+
function scanFile(filePath) {
|
|
107
|
+
const violations = [];
|
|
108
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
109
|
+
const lines = content.split('\n');
|
|
110
|
+
const relativePath = path.relative(SCAN_ROOT, filePath);
|
|
111
|
+
for (let i = 0; i < lines.length; i++) {
|
|
112
|
+
const line = lines[i];
|
|
113
|
+
const trimmed = line.trim();
|
|
114
|
+
// Skip pure comment lines (block / line comments / JSDoc)
|
|
115
|
+
if (trimmed.startsWith('//') || trimmed.startsWith('*') || trimmed.startsWith('/*'))
|
|
116
|
+
continue;
|
|
117
|
+
// Skip imports — `import { Metadata } from ...` is not a use site
|
|
118
|
+
if (trimmed.startsWith('import '))
|
|
119
|
+
continue;
|
|
120
|
+
// Skip lines explicitly allowlisted with the marker comment
|
|
121
|
+
if (ALLOW_COMMENT.test(line))
|
|
122
|
+
continue;
|
|
123
|
+
// Skip the legitimate `provider ?? new Metadata()` / `?? Metadata.Provider` fallback
|
|
124
|
+
// pattern — that's the recommended terminal state for provider-aware helpers.
|
|
125
|
+
if (FALLBACK_PATTERNS.some(p => p.test(line)))
|
|
126
|
+
continue;
|
|
127
|
+
for (const pattern of PATTERNS) {
|
|
128
|
+
if (pattern.test(line)) {
|
|
129
|
+
violations.push({
|
|
130
|
+
file: relativePath,
|
|
131
|
+
line: i + 1,
|
|
132
|
+
content: trimmed.substring(0, 160),
|
|
133
|
+
});
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return violations;
|
|
139
|
+
}
|
|
140
|
+
describe('Multi-Provider Compliance', () => {
|
|
141
|
+
it('should not have any non-allowlisted `new Metadata()` or `Metadata.Provider` references', () => {
|
|
142
|
+
const tsFiles = findTsFiles(SCAN_ROOT);
|
|
143
|
+
const allViolations = [];
|
|
144
|
+
for (const file of tsFiles) {
|
|
145
|
+
allViolations.push(...scanFile(file));
|
|
146
|
+
}
|
|
147
|
+
if (allViolations.length === 0)
|
|
148
|
+
return;
|
|
149
|
+
const report = allViolations
|
|
150
|
+
.slice(0, 50)
|
|
151
|
+
.map(v => ` ${v.file}:${v.line}: ${v.content}`)
|
|
152
|
+
.join('\n');
|
|
153
|
+
const truncatedNote = allViolations.length > 50
|
|
154
|
+
? `\n ... and ${allViolations.length - 50} more`
|
|
155
|
+
: '';
|
|
156
|
+
expect.fail(`Found ${allViolations.length} non-allowlisted global-provider reference(s):\n` +
|
|
157
|
+
`${report}${truncatedNote}\n\n` +
|
|
158
|
+
`In multi-provider scenarios (parallel client connections, transaction-isolated\n` +
|
|
159
|
+
`server requests), these silently use the wrong provider.\n\n` +
|
|
160
|
+
`How to fix:\n` +
|
|
161
|
+
` 1. Inside a class with a bound provider: use \`this.ProviderToUse\`.\n` +
|
|
162
|
+
` 2. Inside a helper function: accept \`provider?: IMetadataProvider\` and use\n` +
|
|
163
|
+
` the recommended fallback: \`const md = provider ?? new Metadata();\` (the \`??\`\n` +
|
|
164
|
+
` form is recognized as a legitimate fallback by this scanner).\n` +
|
|
165
|
+
` 3. Genuinely global / bootstrap / CLI / codegen code: append\n` +
|
|
166
|
+
` \`// global-provider-ok: <specific reason>\` on the same line.\n\n` +
|
|
167
|
+
`See /CLAUDE.md "Don't Reach for the Global Metadata Provider in Per-Provider\n` +
|
|
168
|
+
`Code Paths" for the full rule and patterns.`);
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
//# sourceMappingURL=MultiProviderCompliance.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiProviderCompliance.test.js","sourceRoot":"","sources":["../../src/__tests__/MultiProviderCompliance.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;A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AC,CAAC,OAAO,EAAE,CAAC;aAC/C,IAAI,CAAC,IAAI,CAAC,CAAC;QAEhB,MAAM,aAAa,GAAG,aAAa,CAAC,MAAM,GAAG,EAAE;YAC3C,CAAC,CAAC,eAAe,aAAa,CAAC,MAAM,GAAG,EAAE,OAAO;YACjD,CAAC,CAAC,EAAE,CAAC;QAET,MAAM,CAAC,IAAI,CACP,SAAS,aAAa,CAAC,MAAM,kDAAkD;YAC/E,GAAG,MAAM,GAAG,aAAa,MAAM;YAC/B,kFAAkF;YAClF,8DAA8D;YAC9D,eAAe;YACf,0EAA0E;YAC1E,kFAAkF;YAClF,yFAAyF;YACzF,sEAAsE;YACtE,kEAAkE;YAClE,yEAAyE;YACzE,gFAAgF;YAChF,6CAA6C,CAChD,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -23,7 +23,16 @@ const ANTI_PATTERNS = [
|
|
|
23
23
|
/!==\s*\w+\.ID\b/, // something !== x.ID
|
|
24
24
|
/\.includes\(\w+\.ID\b\)/, // array.includes(x.ID) — uses === internally
|
|
25
25
|
];
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Files/directories to exclude from scanning.
|
|
28
|
+
*
|
|
29
|
+
* Each pattern is matched against the path with both `\` and `/` separators.
|
|
30
|
+
* On Windows, `path.join` and `fs.readdirSync` produce backslash-separated
|
|
31
|
+
* paths; the previous version of these patterns used `/dist/` and `/generated/`
|
|
32
|
+
* which silently never matched on Windows, producing false-positive flags for
|
|
33
|
+
* generated entity_subclasses.ts, etc. Each scan now normalizes the candidate
|
|
34
|
+
* path to forward slashes before testing.
|
|
35
|
+
*/
|
|
27
36
|
const EXCLUDE_PATTERNS = [
|
|
28
37
|
/node_modules/,
|
|
29
38
|
/\/dist\//,
|
|
@@ -37,16 +46,26 @@ const EXCLUDE_PATTERNS = [
|
|
|
37
46
|
/\.map$/, // Skip source maps
|
|
38
47
|
/package-lock\.json$/,
|
|
39
48
|
];
|
|
40
|
-
/** Known exceptions — files where .ID === is comparing non-UUID values (e.g., numeric IDs, string enum values)
|
|
49
|
+
/** Known exceptions — files where .ID === is comparing non-UUID values (e.g., numeric IDs, string enum values).
|
|
50
|
+
* Keys MUST use forward slashes; the test normalizes scanned paths to forward slashes before lookup so
|
|
51
|
+
* the same exception list works on Windows and Unix. */
|
|
41
52
|
const KNOWN_EXCEPTIONS = {
|
|
42
53
|
// Add file paths (relative to packages/) and the reason they're excepted
|
|
43
54
|
// Example: 'SomePackage/src/file.ts': ['Uses numeric IDs, not UUIDs'],
|
|
44
55
|
'Angular/Explorer/dashboards/src/Integration/components/mapping-workspace/mapping-workspace.component.ts': ['LocalID is a local string identifier (e.g. "pending-1"), not a UUID'],
|
|
45
56
|
};
|
|
57
|
+
/** Normalize a path to forward slashes so EXCLUDE_PATTERNS and KNOWN_EXCEPTIONS lookups
|
|
58
|
+
* work identically on Windows and Unix. Without this, `\generated\` on Windows
|
|
59
|
+
* silently bypasses the `/generated/` filter and the test reports false positives
|
|
60
|
+
* in auto-generated code. */
|
|
61
|
+
function normalizePath(filePath) {
|
|
62
|
+
return filePath.replace(/\\/g, '/');
|
|
63
|
+
}
|
|
46
64
|
function shouldScanFile(filePath) {
|
|
47
65
|
if (!filePath.endsWith('.ts'))
|
|
48
66
|
return false;
|
|
49
|
-
|
|
67
|
+
const normalized = normalizePath(filePath);
|
|
68
|
+
return !EXCLUDE_PATTERNS.some(pattern => pattern.test(normalized));
|
|
50
69
|
}
|
|
51
70
|
function findTsFiles(dir) {
|
|
52
71
|
const results = [];
|
|
@@ -71,8 +90,11 @@ function scanFileForViolations(filePath) {
|
|
|
71
90
|
const violations = [];
|
|
72
91
|
const content = fs.readFileSync(filePath, 'utf-8');
|
|
73
92
|
const lines = content.split('\n');
|
|
74
|
-
// Check if file is in known exceptions
|
|
75
|
-
|
|
93
|
+
// Check if file is in known exceptions. Normalize to forward slashes —
|
|
94
|
+
// path.relative produces backslash-separated paths on Windows, but
|
|
95
|
+
// KNOWN_EXCEPTIONS keys are intentionally written with forward slashes
|
|
96
|
+
// for cross-platform readability.
|
|
97
|
+
const relativePath = normalizePath(path.relative(SCAN_ROOT, filePath));
|
|
76
98
|
if (KNOWN_EXCEPTIONS[relativePath]) {
|
|
77
99
|
return [];
|
|
78
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UUIDCompliance.test.js","sourceRoot":"","sources":["../../src/__tests__/UUIDCompliance.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,0EAA0E;AAC1E,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY;AAEzE,oEAAoE;AACpE,MAAM,aAAa,GAAG;IAClB,qDAAqD,EAAM,sDAAsD;IACjH,iBAAiB,EAA2C,qBAAqB;IACjF,qDAAqD,EAAM,kBAAkB;IAC7E,iBAAiB,EAA2C,qBAAqB;IACjF,yBAAyB,EAAoC,6CAA6C;CAC7G,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"UUIDCompliance.test.js","sourceRoot":"","sources":["../../src/__tests__/UUIDCompliance.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,0EAA0E;AAC1E,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,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