@featurevisor/core 2.6.0 → 2.7.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 +59 -0
- package/LICENSE +1 -1
- package/coverage/clover.xml +63 -59
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/index.html +23 -23
- package/coverage/lcov-report/lib/builder/allocator.js.html +1 -1
- package/coverage/lcov-report/lib/builder/buildScopedConditions.js.html +1 -1
- package/coverage/lcov-report/lib/builder/buildScopedDatafile.js.html +1 -1
- package/coverage/lcov-report/lib/builder/buildScopedSegments.js.html +1 -1
- package/coverage/lcov-report/lib/builder/index.html +1 -1
- package/coverage/lcov-report/lib/builder/revision.js.html +1 -1
- package/coverage/lcov-report/lib/builder/traffic.js.html +1 -1
- package/coverage/lcov-report/lib/list/index.html +15 -15
- package/coverage/lcov-report/lib/list/matrix.js.html +18 -9
- package/coverage/lcov-report/lib/tester/helpers.js.html +1 -1
- package/coverage/lcov-report/lib/tester/index.html +1 -1
- package/coverage/lcov-report/src/builder/allocator.ts.html +1 -1
- package/coverage/lcov-report/src/builder/buildScopedConditions.ts.html +1 -1
- package/coverage/lcov-report/src/builder/buildScopedDatafile.ts.html +1 -1
- package/coverage/lcov-report/src/builder/buildScopedSegments.ts.html +1 -1
- package/coverage/lcov-report/src/builder/index.html +1 -1
- package/coverage/lcov-report/src/builder/revision.ts.html +1 -1
- package/coverage/lcov-report/src/builder/traffic.ts.html +1 -1
- package/coverage/lcov-report/src/list/index.html +15 -15
- package/coverage/lcov-report/src/list/matrix.ts.html +18 -9
- package/coverage/lcov-report/src/tester/helpers.ts.html +1 -1
- package/coverage/lcov-report/src/tester/index.html +1 -1
- package/coverage/lcov.info +81 -74
- package/lib/linter/testSchema.d.ts +5 -0
- package/lib/linter/testSchema.js +6 -1
- package/lib/linter/testSchema.js.map +1 -1
- package/lib/list/matrix.js +4 -1
- package/lib/list/matrix.js.map +1 -1
- package/lib/tester/testFeature.js +6 -1
- package/lib/tester/testFeature.js.map +1 -1
- package/lib/tester/testProject.d.ts +1 -0
- package/lib/tester/testProject.js +28 -2
- package/lib/tester/testProject.js.map +1 -1
- package/package.json +5 -5
- package/src/linter/testSchema.ts +9 -1
- package/src/list/matrix.ts +4 -1
- package/src/tester/testFeature.ts +6 -1
- package/src/tester/testProject.ts +41 -2
|
@@ -23,6 +23,7 @@ export interface TestProjectOptions {
|
|
|
23
23
|
schemaVersion?: string;
|
|
24
24
|
inflate?: number;
|
|
25
25
|
withScopes?: boolean;
|
|
26
|
+
withTags?: boolean;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export interface ExecutionResult {
|
|
@@ -173,7 +174,26 @@ export async function testProject(
|
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
176
|
|
|
176
|
-
//
|
|
177
|
+
// by tag
|
|
178
|
+
if (projectConfig.tags && options.withTags) {
|
|
179
|
+
for (const tag of projectConfig.tags) {
|
|
180
|
+
const existingState = await datasource.readState(environment);
|
|
181
|
+
const datafileContent = (await buildDatafile(
|
|
182
|
+
projectConfig,
|
|
183
|
+
datasource,
|
|
184
|
+
{
|
|
185
|
+
schemaVersion: options.schemaVersion || SCHEMA_VERSION,
|
|
186
|
+
revision: "include-tagged-features",
|
|
187
|
+
environment: environment,
|
|
188
|
+
inflate: options.inflate,
|
|
189
|
+
tag: tag,
|
|
190
|
+
},
|
|
191
|
+
existingState,
|
|
192
|
+
)) as DatafileContent;
|
|
193
|
+
|
|
194
|
+
datafileContentByKey.set(`${environment}-tag-${tag}`, datafileContent);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
177
197
|
}
|
|
178
198
|
}
|
|
179
199
|
|
|
@@ -221,7 +241,26 @@ export async function testProject(
|
|
|
221
241
|
}
|
|
222
242
|
}
|
|
223
243
|
|
|
224
|
-
//
|
|
244
|
+
// by tag
|
|
245
|
+
if (projectConfig.tags && options.withTags) {
|
|
246
|
+
for (const tag of projectConfig.tags) {
|
|
247
|
+
const existingState = await datasource.readState(false);
|
|
248
|
+
const datafileContent = (await buildDatafile(
|
|
249
|
+
projectConfig,
|
|
250
|
+
datasource,
|
|
251
|
+
{
|
|
252
|
+
schemaVersion: options.schemaVersion || SCHEMA_VERSION,
|
|
253
|
+
revision: "include-tagged-features",
|
|
254
|
+
environment: false,
|
|
255
|
+
inflate: options.inflate,
|
|
256
|
+
tag: tag,
|
|
257
|
+
},
|
|
258
|
+
existingState,
|
|
259
|
+
)) as DatafileContent;
|
|
260
|
+
|
|
261
|
+
datafileContentByKey.set(`tag-${tag}`, datafileContent);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
225
264
|
}
|
|
226
265
|
|
|
227
266
|
const tests = await listEntities<Test>(
|