Skip to content

Commit 81de96a

Browse files
committed
PR feedback -- use "[test mode]" instead of an empty string
1 parent f30d406 commit 81de96a

File tree

15 files changed

+17
-15
lines changed

15 files changed

+17
-15
lines changed

apps/api-extractor/src/api/model/ApiPackage.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ export class ApiPackage extends ApiItemContainerMixin(ApiNameMixin(ApiDocumented
115115
const jsonObject: IApiPackageJson = {
116116
metadata: {
117117
toolPackage: Extractor.packageName,
118-
toolVersion: options.testMode ? '' : Extractor.version,
118+
// In test mode, we don't write the real version, since that would cause spurious diffs whenever
119+
// the verison is bumped. Instead we write a placeholder string.
120+
toolVersion: options.testMode ? '[test mode]' : Extractor.version,
119121
schemaVersion: ApiJsonSchemaVersion.V_1000
120122
}
121123
} as IApiPackageJson;

build-tests/api-documenter-test/etc/api-documenter-test.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"toolPackage": "@microsoft/api-extractor",
4-
"toolVersion": "",
4+
"toolVersion": "[test mode]",
55
"schemaVersion": 1000
66
},
77
"kind": "Package",

build-tests/api-extractor-scenarios/etc/test-outputs/apiItemKinds/api-extractor-scenarios.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"toolPackage": "@microsoft/api-extractor",
4-
"toolVersion": "",
4+
"toolVersion": "[test mode]",
55
"schemaVersion": 1000
66
},
77
"kind": "Package",

build-tests/api-extractor-scenarios/etc/test-outputs/circularImport1/api-extractor-scenarios.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"toolPackage": "@microsoft/api-extractor",
4-
"toolVersion": "",
4+
"toolVersion": "[test mode]",
55
"schemaVersion": 1000
66
},
77
"kind": "Package",

build-tests/api-extractor-scenarios/etc/test-outputs/circularImport2/api-extractor-scenarios.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"toolPackage": "@microsoft/api-extractor",
4-
"toolVersion": "",
4+
"toolVersion": "[test mode]",
55
"schemaVersion": 1000
66
},
77
"kind": "Package",

build-tests/api-extractor-scenarios/etc/test-outputs/defaultExportOfEntryPoint1/api-extractor-scenarios.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"toolPackage": "@microsoft/api-extractor",
4-
"toolVersion": "",
4+
"toolVersion": "[test mode]",
55
"schemaVersion": 1000
66
},
77
"kind": "Package",

build-tests/api-extractor-scenarios/etc/test-outputs/defaultExportOfEntryPoint2/api-extractor-scenarios.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"toolPackage": "@microsoft/api-extractor",
4-
"toolVersion": "",
4+
"toolVersion": "[test mode]",
55
"schemaVersion": 1000
66
},
77
"kind": "Package",

build-tests/api-extractor-scenarios/etc/test-outputs/defaultExportOfEntryPoint3/api-extractor-scenarios.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"toolPackage": "@microsoft/api-extractor",
4-
"toolVersion": "",
4+
"toolVersion": "[test mode]",
55
"schemaVersion": 1000
66
},
77
"kind": "Package",

build-tests/api-extractor-scenarios/etc/test-outputs/defaultExportOfEntryPoint4/api-extractor-scenarios.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"toolPackage": "@microsoft/api-extractor",
4-
"toolVersion": "",
4+
"toolVersion": "[test mode]",
55
"schemaVersion": 1000
66
},
77
"kind": "Package",

build-tests/api-extractor-scenarios/etc/test-outputs/exportDuplicate1/api-extractor-scenarios.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"toolPackage": "@microsoft/api-extractor",
4-
"toolVersion": "",
4+
"toolVersion": "[test mode]",
55
"schemaVersion": 1000
66
},
77
"kind": "Package",

0 commit comments

Comments
 (0)