From 43f80c444d8310304863ccd55c6ad714f1563d28 Mon Sep 17 00:00:00 2001 From: Frank Wienberg Date: Thu, 29 Sep 2022 10:59:35 +0200 Subject: [PATCH 001/399] [api-extractor-model, api-extractor] Support for 'abstract' modifier Analogous to other ApiItem mixins, the new ApiAbstractMixin adds 'isAbstract' as a property aspect. It is mixed into ApiClass and ApiMethod, the only models that may have an 'abstract' modifier. ApiModelGenerator detects the modifier and adds it to the models. This change updates all generated *.api.json files to include the new "isAbstract" property. --- .../src/generators/ApiModelGenerator.ts | 5 + .../api-documenter-scenarios.api.json | 12 ++ .../etc/api-documenter-test.api.json | 15 +++ .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 11 ++ .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 2 + .../api-extractor-scenarios.api.json | 4 + .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 2 + .../api-extractor-scenarios.api.json | 9 ++ .../api-extractor-scenarios.api.json | 2 + .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 2 + .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 3 + .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 3 + .../api-extractor-scenarios.api.json | 7 ++ .../api-extractor-scenarios.api.json | 4 + .../api-extractor-scenarios.api.json | 2 + .../api-extractor-scenarios.api.json | 2 + .../api-extractor-scenarios.api.json | 2 + .../api-extractor-scenarios.api.json | 2 + .../api-extractor-scenarios.api.json | 1 + .../api-extractor-scenarios.api.json | 3 + .../api-extractor-scenarios.api.json | 6 + .../api-extractor-scenarios.api.json | 3 + .../api-extractor-scenarios.api.json | 5 + common/reviews/api/api-extractor-model.api.md | 29 ++++- libraries/api-extractor-model/src/index.ts | 1 + .../src/mixins/ApiAbstractMixin.ts | 113 ++++++++++++++++++ .../api-extractor-model/src/model/ApiClass.ts | 11 +- .../src/model/ApiMethod.ts | 12 +- 40 files changed, 276 insertions(+), 9 deletions(-) create mode 100644 libraries/api-extractor-model/src/mixins/ApiAbstractMixin.ts diff --git a/apps/api-extractor/src/generators/ApiModelGenerator.ts b/apps/api-extractor/src/generators/ApiModelGenerator.ts index 86500b6c935..9b85b7b70b0 100644 --- a/apps/api-extractor/src/generators/ApiModelGenerator.ts +++ b/apps/api-extractor/src/generators/ApiModelGenerator.ts @@ -385,9 +385,12 @@ export class ApiModelGenerator { const apiItemMetadata: ApiItemMetadata = this._collector.fetchApiItemMetadata(astDeclaration); const docComment: tsdoc.DocComment | undefined = apiItemMetadata.tsdocComment; const releaseTag: ReleaseTag = apiItemMetadata.effectiveReleaseTag; + const isAbstract: boolean = + (ts.getCombinedModifierFlags(classDeclaration) & ts.ModifierFlags.Abstract) !== 0; apiClass = new ApiClass({ name, + isAbstract, docComment, releaseTag, excerptTokens, @@ -705,9 +708,11 @@ export class ApiModelGenerator { const isOptional: boolean = (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0; const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0; + const isAbstract: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Abstract) !== 0; apiMethod = new ApiMethod({ name, + isAbstract, docComment, releaseTag, isProtected, diff --git a/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json b/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json index 1fcb80522a6..87c31c3c732 100644 --- a/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json +++ b/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json @@ -196,6 +196,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "Class1", "preserveMemberOrder": false, "members": [ @@ -302,6 +303,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "someOverload" } ], @@ -344,6 +346,7 @@ } } ], + "isAbstract": false, "name": "Class2", "preserveMemberOrder": false, "members": [ @@ -421,6 +424,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "someMethod" }, { @@ -501,6 +505,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ExtendsAnonymousClass", "preserveMemberOrder": false, "members": [], @@ -530,6 +535,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ExtendsClassFromAnotherPackage", "preserveMemberOrder": false, "members": [], @@ -559,6 +565,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ExtendsClassLikeVariable", "preserveMemberOrder": false, "members": [], @@ -588,6 +595,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ExtendsUnexportedClass", "preserveMemberOrder": false, "members": [], @@ -903,6 +911,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "Class3", "preserveMemberOrder": false, "members": [ @@ -951,6 +960,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "someMethod" }, { @@ -998,6 +1008,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "someOverload" }, { @@ -1045,6 +1056,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "someOverload" }, { diff --git a/build-tests/api-documenter-test/etc/api-documenter-test.api.json b/build-tests/api-documenter-test/etc/api-documenter-test.api.json index e3ae518d1d1..27abda7eacd 100644 --- a/build-tests/api-documenter-test/etc/api-documenter-test.api.json +++ b/build-tests/api-documenter-test/etc/api-documenter-test.api.json @@ -231,6 +231,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "DecoratorExample", "preserveMemberOrder": false, "members": [ @@ -294,6 +295,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "DocBaseClass", "preserveMemberOrder": false, "members": [ @@ -385,6 +387,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "DocClass1", "preserveMemberOrder": false, "members": [ @@ -416,6 +419,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "deprecatedExample" }, { @@ -479,6 +483,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "exampleFunction" }, { @@ -526,6 +531,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "exampleFunction" }, { @@ -604,6 +610,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "genericWithConstraintAndDefault" }, { @@ -634,6 +641,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "interestingEdgeCases" }, { @@ -770,6 +778,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "optionalParamFunction" }, { @@ -921,6 +930,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "sumWithExample" }, { @@ -951,6 +961,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "tableExample" }, { @@ -1038,6 +1049,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "DocClassInterfaceMerge", "preserveMemberOrder": false, "members": [], @@ -1463,6 +1475,7 @@ } } ], + "isAbstract": false, "name": "Generic", "preserveMemberOrder": false, "members": [], @@ -2534,6 +2547,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SystemEvent", "preserveMemberOrder": false, "members": [ @@ -2582,6 +2596,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "addHandler" } ], diff --git a/build-tests/api-extractor-scenarios/etc/ambientNameConflict2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/ambientNameConflict2/api-extractor-scenarios.api.json index 13fc823e445..f1768ac298e 100644 --- a/build-tests/api-extractor-scenarios/etc/ambientNameConflict2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/ambientNameConflict2/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "Date_2", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/ancillaryDeclarations/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/ancillaryDeclarations/api-extractor-scenarios.api.json index dc2a0908811..4262ce5d636 100644 --- a/build-tests/api-extractor-scenarios/etc/ancillaryDeclarations/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/ancillaryDeclarations/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "MyClass", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json index 5b822e4801b..67c6b8f7d57 100644 --- a/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": true, "name": "AbstractClass", "preserveMemberOrder": false, "members": [ @@ -214,6 +215,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": true, "name": "member" } ], @@ -243,6 +245,7 @@ } } ], + "isAbstract": false, "name": "ClassWithTypeParameter", "preserveMemberOrder": false, "members": [], @@ -382,6 +385,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ExtendsClassWithTypeParameter", "preserveMemberOrder": false, "members": [], @@ -474,6 +478,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SomeClass3", "preserveMemberOrder": false, "members": [], @@ -492,6 +497,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SomeClass1", "preserveMemberOrder": false, "members": [], @@ -517,6 +523,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SomeClass2", "preserveMemberOrder": false, "members": [], @@ -537,6 +544,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SomeClass4", "preserveMemberOrder": false, "members": [], @@ -656,6 +664,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SimpleClass", "preserveMemberOrder": false, "members": [ @@ -687,6 +696,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "member" }, { @@ -734,6 +744,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "optionalParamMethod" }, { diff --git a/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json index f06c0ef3955..5e3cd67309d 100644 --- a/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json @@ -254,6 +254,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "Lib1Class", "preserveMemberOrder": false, "members": [ diff --git a/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json index 18e5df66989..2ce32af8832 100644 --- a/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "IFile", "preserveMemberOrder": false, "members": [ @@ -230,6 +231,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "IFolder", "preserveMemberOrder": false, "members": [ diff --git a/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json index 48a2c25fb89..8f1f2aacc4f 100644 --- a/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "A", "preserveMemberOrder": false, "members": [], @@ -199,6 +200,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "B", "preserveMemberOrder": false, "members": [], @@ -215,6 +217,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "IFile", "preserveMemberOrder": false, "members": [ @@ -262,6 +265,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "IFolder", "preserveMemberOrder": false, "members": [ diff --git a/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint/api-extractor-scenarios.api.json index 2ddcd94bcd4..d44a09c3f70 100644 --- a/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "DefaultClass", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/docReferences/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferences/api-extractor-scenarios.api.json index 4ccfd7d2936..fe55c0af4d0 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferences/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferences/api-extractor-scenarios.api.json @@ -251,6 +251,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "MyClass", "preserveMemberOrder": false, "members": [ @@ -299,6 +300,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "myMethod" } ], diff --git a/build-tests/api-extractor-scenarios/etc/docReferences2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferences2/api-extractor-scenarios.api.json index ac73eed8be7..3d52e2bd5e2 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferences2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferences2/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "CyclicA", "preserveMemberOrder": false, "members": [ @@ -214,6 +215,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "methodA1" }, { @@ -244,6 +246,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "methodA3" } ], @@ -260,6 +263,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "CyclicB", "preserveMemberOrder": false, "members": [ @@ -291,6 +295,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "methodB2" }, { @@ -321,6 +326,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "methodB4" } ], @@ -337,6 +343,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "FailWithSelfReference", "preserveMemberOrder": false, "members": [ @@ -368,6 +375,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "method1" }, { @@ -398,6 +406,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "method2" } ], diff --git a/build-tests/api-extractor-scenarios/etc/docReferences3/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferences3/api-extractor-scenarios.api.json index d571b9b5007..f3629bcdfad 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferences3/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferences3/api-extractor-scenarios.api.json @@ -241,6 +241,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "B", "preserveMemberOrder": false, "members": [ @@ -272,6 +273,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "myMethod" } ], diff --git a/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json index 4cefa690518..d6b613e1c02 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "Item", "preserveMemberOrder": false, "members": [ diff --git a/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json index d04711be940..972e4ad6fc3 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "Item", "preserveMemberOrder": false, "members": [ diff --git a/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json index d83bbf5d8df..02a33184f84 100644 --- a/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "Item", "preserveMemberOrder": false, "members": [ diff --git a/build-tests/api-extractor-scenarios/etc/ecmaScriptPrivateFields/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/ecmaScriptPrivateFields/api-extractor-scenarios.api.json index dbb4a5ec3e0..5681a9dd2ab 100644 --- a/build-tests/api-extractor-scenarios/etc/ecmaScriptPrivateFields/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/ecmaScriptPrivateFields/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "Example", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/excerptTokens/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/excerptTokens/api-extractor-scenarios.api.json index 903319f7eba..17afc47d2e7 100644 --- a/build-tests/api-extractor-scenarios/etc/excerptTokens/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/excerptTokens/api-extractor-scenarios.api.json @@ -205,6 +205,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "MyClass", "preserveMemberOrder": false, "members": [ @@ -269,6 +270,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "someMethod" } ], diff --git a/build-tests/api-extractor-scenarios/etc/exportDuplicate/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportDuplicate/api-extractor-scenarios.api.json index e8ef7fafe38..25271089e96 100644 --- a/build-tests/api-extractor-scenarios/etc/exportDuplicate/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportDuplicate/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "X", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/exportImportedExternalDefault/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportImportedExternalDefault/api-extractor-scenarios.api.json index 82f4eca1655..162201491af 100644 --- a/build-tests/api-extractor-scenarios/etc/exportImportedExternalDefault/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportImportedExternalDefault/api-extractor-scenarios.api.json @@ -192,6 +192,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "Child", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/exportStar/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportStar/api-extractor-scenarios.api.json index 34410a430fb..74e78552077 100644 --- a/build-tests/api-extractor-scenarios/etc/exportStar/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportStar/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "A", "preserveMemberOrder": false, "members": [], @@ -199,6 +200,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "B", "preserveMemberOrder": false, "members": [], @@ -215,6 +217,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "C", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/exportStar2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportStar2/api-extractor-scenarios.api.json index 876cc39e167..26ec6d7c7f6 100644 --- a/build-tests/api-extractor-scenarios/etc/exportStar2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportStar2/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "A", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/exportStar3/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportStar3/api-extractor-scenarios.api.json index 876cc39e167..26ec6d7c7f6 100644 --- a/build-tests/api-extractor-scenarios/etc/exportStar3/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportStar3/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "A", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/functionOverload/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/functionOverload/api-extractor-scenarios.api.json index 0e1499bd192..9de84ccb1aa 100644 --- a/build-tests/api-extractor-scenarios/etc/functionOverload/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/functionOverload/api-extractor-scenarios.api.json @@ -363,6 +363,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "Combiner", "preserveMemberOrder": false, "members": [ @@ -427,6 +428,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "combine" }, { @@ -490,6 +492,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "combine" } ], diff --git a/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json index 637c6966322..edbb7abb825 100644 --- a/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "AnotherDuplicateName_2", "preserveMemberOrder": false, "members": [], @@ -199,6 +200,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "AnotherDuplicateName", "preserveMemberOrder": false, "members": [], @@ -265,6 +267,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ForgottenExport1", "preserveMemberOrder": false, "members": [ @@ -366,6 +369,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ForgottenExport5", "preserveMemberOrder": false, "members": [], @@ -384,6 +388,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ForgottenExport6", "preserveMemberOrder": false, "members": [], @@ -409,6 +414,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ForgottenExport6", "preserveMemberOrder": false, "members": [], @@ -609,6 +615,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ForgottenExport3", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/internationalCharacters/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/internationalCharacters/api-extractor-scenarios.api.json index 0f2f17b021f..e4ba3e19250 100644 --- a/build-tests/api-extractor-scenarios/etc/internationalCharacters/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/internationalCharacters/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ClassΞ", "preserveMemberOrder": false, "members": [ @@ -236,6 +237,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "\"invalid chars\"" }, { @@ -284,6 +286,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "memberΔ" }, { @@ -314,6 +317,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "validChars" } ], diff --git a/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json index f79add87f66..a7c535e14af 100644 --- a/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "MergedClassAndInterface", "preserveMemberOrder": false, "members": [ @@ -318,6 +319,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "MergedClassAndNamespace", "preserveMemberOrder": false, "members": [ diff --git a/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json index c35001361df..9487791fce5 100644 --- a/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "A", "preserveMemberOrder": false, "members": [ @@ -238,6 +239,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "B", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/namespaceImports/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/namespaceImports/api-extractor-scenarios.api.json index 4f050369a44..e96d84eb72f 100644 --- a/build-tests/api-extractor-scenarios/etc/namespaceImports/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/namespaceImports/api-extractor-scenarios.api.json @@ -201,6 +201,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SomeClass", "preserveMemberOrder": false, "members": [], @@ -239,6 +240,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SomeClass", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/namespaceImports2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/namespaceImports2/api-extractor-scenarios.api.json index 1d2843bbcd5..d6c986625f0 100644 --- a/build-tests/api-extractor-scenarios/etc/namespaceImports2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/namespaceImports2/api-extractor-scenarios.api.json @@ -192,6 +192,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SomeClass", "preserveMemberOrder": false, "members": [], @@ -210,6 +211,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SomeClass", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json index 42af2ebf181..f57c6ba4fa1 100644 --- a/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "MyClass", "preserveMemberOrder": false, "members": [ diff --git a/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json index 4bc5e0d37a6..90cf5534ac9 100644 --- a/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json @@ -390,6 +390,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SomeClass1", "preserveMemberOrder": false, "members": [ @@ -445,6 +446,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SomeClass3", "preserveMemberOrder": false, "members": [], @@ -474,6 +476,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "SomeClass4", "preserveMemberOrder": false, "members": [], diff --git a/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json index e59358c5b10..ae49e9e3340 100644 --- a/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ExampleA", "preserveMemberOrder": false, "members": [ @@ -248,6 +249,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "member2" } ], @@ -264,6 +266,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ExampleB", "preserveMemberOrder": false, "members": [ @@ -312,6 +315,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "tryLoadFromFile" } ], @@ -328,6 +332,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ExampleC", "preserveMemberOrder": false, "members": [ @@ -359,6 +364,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "member1" } ], diff --git a/build-tests/api-extractor-scenarios/etc/typeLiterals/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/typeLiterals/api-extractor-scenarios.api.json index bf6587a6a6e..dc79bfb7b35 100644 --- a/build-tests/api-extractor-scenarios/etc/typeLiterals/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/typeLiterals/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ClassWithTypeLiterals", "preserveMemberOrder": false, "members": [ @@ -231,6 +232,7 @@ } ], "isOptional": false, + "isAbstract": false, "name": "method1" }, { @@ -270,6 +272,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "method2" } ], diff --git a/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json index a7758beb154..68531db38ef 100644 --- a/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json @@ -183,6 +183,7 @@ } ], "releaseTag": "Public", + "isAbstract": false, "name": "ClassWithGenericMethod", "preserveMemberOrder": false, "members": [ @@ -227,6 +228,7 @@ "overloadIndex": 1, "parameters": [], "isOptional": false, + "isAbstract": false, "name": "method" } ], @@ -256,6 +258,7 @@ } } ], + "isAbstract": false, "name": "GenericClass", "preserveMemberOrder": false, "members": [], @@ -293,6 +296,7 @@ } } ], + "isAbstract": false, "name": "GenericClassWithConstraint", "preserveMemberOrder": false, "members": [], @@ -330,6 +334,7 @@ } } ], + "isAbstract": false, "name": "GenericClassWithDefault", "preserveMemberOrder": false, "members": [], diff --git a/common/reviews/api/api-extractor-model.api.md b/common/reviews/api/api-extractor-model.api.md index a9505bde992..f33d24c2135 100644 --- a/common/reviews/api/api-extractor-model.api.md +++ b/common/reviews/api/api-extractor-model.api.md @@ -25,6 +25,23 @@ export class AedocDefinitions { static get tsdocConfiguration(): TSDocConfiguration; } +// @public +export function ApiAbstractMixin(baseClass: TBaseClass): TBaseClass & (new (...args: any[]) => ApiAbstractMixin); + +// @public +export interface ApiAbstractMixin extends ApiItem { + readonly isAbstract: boolean; + // Warning: (ae-forgotten-export) The symbol "IApiItemJson" needs to be exported by the entry point index.d.ts + // + // (undocumented) + serializeInto(jsonObject: Partial): void; +} + +// @public +export namespace ApiAbstractMixin { + export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiAbstractMixin; +} + // Warning: (ae-forgotten-export) The symbol "ApiCallSignature_base" needs to be exported by the entry point index.d.ts // // @public @@ -112,8 +129,6 @@ export class ApiDeclaredItem extends ApiDocumentedItem { // @public export class ApiDocumentedItem extends ApiItem { constructor(options: IApiDocumentedItemOptions); - // Warning: (ae-forgotten-export) The symbol "IApiItemJson" needs to be exported by the entry point index.d.ts - // // @override (undocumented) static onDeserializeInto(options: Partial, context: DeserializerContext, jsonObject: IApiItemJson): void; // Warning: (ae-forgotten-export) The symbol "IApiDocumentedItemJson" needs to be exported by the entry point index.d.ts @@ -718,12 +733,18 @@ export class HeritageType { readonly excerpt: Excerpt; } +// @public +export interface IApiAbstractMixinOptions extends IApiItemOptions { + // (undocumented) + isAbstract: boolean; +} + // @public export interface IApiCallSignatureOptions extends IApiTypeParameterListMixinOptions, IApiParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiDeclaredItemOptions { } // @public -export interface IApiClassOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions, IApiExportedMixinOptions { +export interface IApiClassOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiAbstractMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions, IApiExportedMixinOptions { // (undocumented) extendsTokenRange: IExcerptTokenRange | undefined; // (undocumented) @@ -805,7 +826,7 @@ export interface IApiItemOptions { } // @public -export interface IApiMethodOptions extends IApiNameMixinOptions, IApiOptionalMixinOptions, IApiParameterListMixinOptions, IApiProtectedMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiStaticMixinOptions, IApiTypeParameterListMixinOptions, IApiDeclaredItemOptions { +export interface IApiMethodOptions extends IApiNameMixinOptions, IApiAbstractMixinOptions, IApiOptionalMixinOptions, IApiParameterListMixinOptions, IApiProtectedMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiStaticMixinOptions, IApiTypeParameterListMixinOptions, IApiDeclaredItemOptions { } // @public (undocumented) diff --git a/libraries/api-extractor-model/src/index.ts b/libraries/api-extractor-model/src/index.ts index 7e3bf3b9b9e..187d29da142 100644 --- a/libraries/api-extractor-model/src/index.ts +++ b/libraries/api-extractor-model/src/index.ts @@ -30,6 +30,7 @@ export { IApiTypeParameterListMixinOptions, ApiTypeParameterListMixin } from './mixins/ApiTypeParameterListMixin'; +export { IApiAbstractMixinOptions, ApiAbstractMixin } from './mixins/ApiAbstractMixin'; export { IApiItemContainerMixinOptions, ApiItemContainerMixin } from './mixins/ApiItemContainerMixin'; export { IApiProtectedMixinOptions, ApiProtectedMixin } from './mixins/ApiProtectedMixin'; export { IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from './mixins/ApiReleaseTagMixin'; diff --git a/libraries/api-extractor-model/src/mixins/ApiAbstractMixin.ts b/libraries/api-extractor-model/src/mixins/ApiAbstractMixin.ts new file mode 100644 index 00000000000..f73aa84cb50 --- /dev/null +++ b/libraries/api-extractor-model/src/mixins/ApiAbstractMixin.ts @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information.s + +import { ApiItem, IApiItemJson, IApiItemConstructor, IApiItemOptions } from '../items/ApiItem'; +import { DeserializerContext } from '../model/DeserializerContext'; + +/** + * Constructor options for {@link (ApiAbstractMixin:interface)}. + * @public + */ +export interface IApiAbstractMixinOptions extends IApiItemOptions { + isAbstract: boolean; +} + +export interface IApiAbstractMixinJson extends IApiItemJson { + isAbstract: boolean; +} + +const _isAbstract: unique symbol = Symbol('ApiAbstractMixin._isAbstract'); + +/** + * The mixin base class for API items that have an abstract modifier. + * + * @remarks + * + * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of + * API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use + * TypeScript "mixin" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various + * features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class + * to extend more than one base class). The "mixin" is a TypeScript merged declaration with three components: + * the function that generates a subclass, an interface that describes the members of the subclass, and + * a namespace containing static members of the class. + * + * @public + */ +// eslint-disable-next-line @typescript-eslint/naming-convention +export interface ApiAbstractMixin extends ApiItem { + /** + * Indicates that the API item's value has an 'abstract' modifier. + */ + readonly isAbstract: boolean; + + serializeInto(jsonObject: Partial): void; +} + +/** + * Mixin function for {@link (ApiAbstractMixin:interface)}. + * + * @param baseClass - The base class to be extended + * @returns A child class that extends baseClass, adding the {@link (ApiAbstractMixin:interface)} + * functionality. + * + * @public + */ +export function ApiAbstractMixin( + baseClass: TBaseClass + // eslint-disable-next-line @typescript-eslint/no-explicit-any +): TBaseClass & (new (...args: any[]) => ApiAbstractMixin) { + class MixedClass extends baseClass implements ApiAbstractMixin { + public [_isAbstract]: boolean; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + public constructor(...args: any[]) { + super(...args); + + const options: IApiAbstractMixinOptions = args[0]; + this[_isAbstract] = options.isAbstract; + } + + /** @override */ + public static onDeserializeInto( + options: Partial, + context: DeserializerContext, + jsonObject: IApiAbstractMixinJson + ): void { + baseClass.onDeserializeInto(options, context, jsonObject); + + options.isAbstract = jsonObject.isAbstract || false; + } + + public get isAbstract(): boolean { + return this[_isAbstract]; + } + + /** @override */ + public serializeInto(jsonObject: Partial): void { + super.serializeInto(jsonObject); + + jsonObject.isAbstract = this.isAbstract; + } + } + + return MixedClass; +} + +/** + * Static members for {@link (ApiAbstractMixin:interface)}. + * @public + */ +export namespace ApiAbstractMixin { + /** + * A type guard that tests whether the specified `ApiItem` subclass extends the `ApiAbstractMixin` mixin. + * + * @remarks + * + * The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of + * the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however + * the TypeScript type system cannot invoke a runtime test.) + */ + export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiAbstractMixin { + return apiItem.hasOwnProperty(_isAbstract); + } +} diff --git a/libraries/api-extractor-model/src/model/ApiClass.ts b/libraries/api-extractor-model/src/model/ApiClass.ts index d207d96a6b9..6fc51b4bc83 100644 --- a/libraries/api-extractor-model/src/model/ApiClass.ts +++ b/libraries/api-extractor-model/src/model/ApiClass.ts @@ -25,6 +25,11 @@ import { IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin'; +import { + ApiAbstractMixin, + IApiAbstractMixinJson, + IApiAbstractMixinOptions +} from '../mixins/ApiAbstractMixin'; /** * Constructor options for {@link ApiClass}. @@ -33,6 +38,7 @@ import { export interface IApiClassOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, + IApiAbstractMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions, @@ -43,6 +49,7 @@ export interface IApiClassOptions export interface IApiClassJson extends IApiDeclaredItemJson, + IApiAbstractMixinJson, IApiTypeParameterListMixinJson, IApiExportedMixinJson { extendsTokenRange?: IExcerptTokenRange; @@ -66,7 +73,9 @@ export interface IApiClassJson * @public */ export class ApiClass extends ApiItemContainerMixin( - ApiNameMixin(ApiTypeParameterListMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))) + ApiNameMixin( + ApiAbstractMixin(ApiTypeParameterListMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))) + ) ) { /** * The base class that this class inherits from (using the `extends` keyword), or undefined if there is no base class. diff --git a/libraries/api-extractor-model/src/model/ApiMethod.ts b/libraries/api-extractor-model/src/model/ApiMethod.ts index c5b71ae03a5..ea3a5fd576d 100644 --- a/libraries/api-extractor-model/src/model/ApiMethod.ts +++ b/libraries/api-extractor-model/src/model/ApiMethod.ts @@ -15,6 +15,7 @@ import { IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ import { IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin'; import { ApiReturnTypeMixin, IApiReturnTypeMixinOptions } from '../mixins/ApiReturnTypeMixin'; import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin'; +import { IApiAbstractMixinOptions, ApiAbstractMixin } from '../mixins/ApiAbstractMixin'; import { ApiTypeParameterListMixin, IApiTypeParameterListMixinOptions @@ -27,6 +28,7 @@ import { ApiOptionalMixin, IApiOptionalMixinOptions } from '../mixins/ApiOptiona */ export interface IApiMethodOptions extends IApiNameMixinOptions, + IApiAbstractMixinOptions, IApiOptionalMixinOptions, IApiParameterListMixinOptions, IApiProtectedMixinOptions, @@ -58,10 +60,12 @@ export interface IApiMethodOptions * @public */ export class ApiMethod extends ApiNameMixin( - ApiOptionalMixin( - ApiParameterListMixin( - ApiProtectedMixin( - ApiReleaseTagMixin(ApiReturnTypeMixin(ApiStaticMixin(ApiTypeParameterListMixin(ApiDeclaredItem)))) + ApiAbstractMixin( + ApiOptionalMixin( + ApiParameterListMixin( + ApiProtectedMixin( + ApiReleaseTagMixin(ApiReturnTypeMixin(ApiStaticMixin(ApiTypeParameterListMixin(ApiDeclaredItem)))) + ) ) ) ) From b1460474eec355290890a5f511ebbbed1f9e32bd Mon Sep 17 00:00:00 2001 From: Frank Wienberg Date: Thu, 29 Sep 2022 11:06:57 +0200 Subject: [PATCH 002/399] [api-documenter] Add 'abstract' to "Modifiers" column Generate "abstract" if an API item has the ApiAbstractMixin and 'isAbstract' is true. So far, this only works for methods, since the classes overview table does not have a "Modifiers" column. --- .../api-documenter/src/documenters/MarkdownDocumenter.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/api-documenter/src/documenters/MarkdownDocumenter.ts b/apps/api-documenter/src/documenters/MarkdownDocumenter.ts index e8f374c476d..f750e546866 100644 --- a/apps/api-documenter/src/documenters/MarkdownDocumenter.ts +++ b/apps/api-documenter/src/documenters/MarkdownDocumenter.ts @@ -32,6 +32,7 @@ import { ApiPropertyItem, ApiInterface, Excerpt, + ApiAbstractMixin, ApiParameterListMixin, ApiReturnTypeMixin, ApiDeclaredItem, @@ -1057,6 +1058,14 @@ export class MarkdownDocumenter { } } + if (ApiAbstractMixin.isBaseClassOf(apiItem)) { + if (apiItem.isAbstract) { + section.appendNode( + new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'abstract' })]) + ); + } + } + return new DocTableCell({ configuration }, section.nodes); } From 66932f60de5dd518e96bc9c6529f03d76520dece Mon Sep 17 00:00:00 2001 From: Frank Wienberg Date: Thu, 29 Sep 2022 11:08:46 +0200 Subject: [PATCH 003/399] [api-documenter] Separate "Abstract Classes" overview table Split classes into abstract and non-abstract classes and add a separate overview table for "Abstract Classes". The alternative would be to add a "Modifiers" column to the existing "Classes" overview table. --- .../src/documenters/MarkdownDocumenter.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/api-documenter/src/documenters/MarkdownDocumenter.ts b/apps/api-documenter/src/documenters/MarkdownDocumenter.ts index f750e546866..4f441361e2a 100644 --- a/apps/api-documenter/src/documenters/MarkdownDocumenter.ts +++ b/apps/api-documenter/src/documenters/MarkdownDocumenter.ts @@ -503,6 +503,11 @@ export class MarkdownDocumenter { private _writePackageOrNamespaceTables(output: DocSection, apiContainer: ApiPackage | ApiNamespace): void { const configuration: TSDocConfiguration = this._tsdocConfiguration; + const abstractClassesTable: DocTable = new DocTable({ + configuration, + headerTitles: ['Abstract Class', 'Description'] + }); + const classesTable: DocTable = new DocTable({ configuration, headerTitles: ['Class', 'Description'] @@ -551,7 +556,11 @@ export class MarkdownDocumenter { switch (apiMember.kind) { case ApiItemKind.Class: - classesTable.addRow(row); + if (ApiAbstractMixin.isBaseClassOf(apiMember) && apiMember.isAbstract) { + abstractClassesTable.addRow(row); + } else { + classesTable.addRow(row); + } this._writeApiItemPage(apiMember); break; @@ -592,6 +601,11 @@ export class MarkdownDocumenter { output.appendNode(classesTable); } + if (abstractClassesTable.rows.length > 0) { + output.appendNode(new DocHeading({ configuration, title: 'Abstract Classes' })); + output.appendNode(abstractClassesTable); + } + if (enumerationsTable.rows.length > 0) { output.appendNode(new DocHeading({ configuration, title: 'Enumerations' })); output.appendNode(enumerationsTable); From c4c0d53c79d1e4e90f15756facb3deb8a254d765 Mon Sep 17 00:00:00 2001 From: Frank Wienberg Date: Tue, 18 Oct 2022 13:35:00 +0200 Subject: [PATCH 004/399] [api-extractor-model, api-extractor] Support for 'abstract' modifier also for ApiProperty When adding 'abstract' for classes and methods, @zelliott mentioned that properties can have this modifier, too. Thus, ApiProperty must be extended just like ApiMethod and ApiClass, and ApiModelGenerator must extract the 'abstract' modifier into the ApiProperty model. Expected test results change accordingly. --- .../src/generators/ApiModelGenerator.ts | 2 ++ .../api-documenter-scenarios.api.json | 15 +++++++---- .../etc/api-documenter-test.api.json | 27 ++++++++++++------- .../api-extractor-scenarios.api.json | 12 ++++++--- .../api-extractor-scenarios.api.json | 6 +++-- .../api-extractor-scenarios.api.json | 9 ++++--- .../api-extractor-scenarios.api.json | 9 ++++--- .../api-extractor-scenarios.api.json | 3 ++- .../api-extractor-scenarios.api.json | 3 ++- .../api-extractor-scenarios.api.json | 15 +++++++---- .../api-extractor-scenarios.api.json | 3 ++- .../api-extractor-scenarios.api.json | 6 +++-- .../api-extractor-scenarios.api.json | 3 ++- .../api-extractor-scenarios.api.json | 15 +++++++---- .../api-extractor-scenarios.api.json | 3 ++- .../api-extractor-scenarios.api.json | 3 ++- common/reviews/api/api-extractor-model.api.md | 2 +- .../src/model/ApiProperty.ts | 6 ++++- 18 files changed, 96 insertions(+), 46 deletions(-) diff --git a/apps/api-extractor/src/generators/ApiModelGenerator.ts b/apps/api-extractor/src/generators/ApiModelGenerator.ts index 9b85b7b70b0..4f37a1b8242 100644 --- a/apps/api-extractor/src/generators/ApiModelGenerator.ts +++ b/apps/api-extractor/src/generators/ApiModelGenerator.ts @@ -844,12 +844,14 @@ export class ApiModelGenerator { const isOptional: boolean = (astDeclaration.astSymbol.followedSymbol.flags & ts.SymbolFlags.Optional) !== 0; const isProtected: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Protected) !== 0; + const isAbstract: boolean = (astDeclaration.modifierFlags & ts.ModifierFlags.Abstract) !== 0; const isReadonly: boolean = this._isReadonly(astDeclaration); apiProperty = new ApiProperty({ name, docComment, releaseTag, + isAbstract, isProtected, isStatic, isOptional, diff --git a/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json b/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json index 87c31c3c732..a372066f77e 100644 --- a/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json +++ b/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json @@ -227,7 +227,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -256,7 +257,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Method", @@ -377,7 +379,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Method", @@ -454,7 +457,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "extendsTokenRange": { @@ -1086,7 +1090,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] diff --git a/build-tests/api-documenter-test/etc/api-documenter-test.api.json b/build-tests/api-documenter-test/etc/api-documenter-test.api.json index 27abda7eacd..901a3c71b6b 100644 --- a/build-tests/api-documenter-test/etc/api-documenter-test.api.json +++ b/build-tests/api-documenter-test/etc/api-documenter-test.api.json @@ -263,7 +263,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] @@ -672,7 +673,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -702,7 +704,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -731,7 +734,8 @@ "endIndex": 2 }, "isStatic": true, - "isProtected": true + "isProtected": true, + "isAbstract": false }, { "kind": "Method", @@ -808,7 +812,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": true + "isProtected": true, + "isAbstract": false }, { "kind": "Property", @@ -837,7 +842,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -867,7 +873,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Method", @@ -991,7 +998,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -1020,7 +1028,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "extendsTokenRange": { diff --git a/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json index 67c6b8f7d57..c6b8f1b778f 100644 --- a/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json @@ -774,7 +774,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -807,7 +808,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -836,7 +838,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -865,7 +868,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] diff --git a/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json index 5e3cd67309d..3d2cfb44107 100644 --- a/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json @@ -285,7 +285,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -314,7 +315,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "extendsTokenRange": { diff --git a/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json index 2ce32af8832..823cfd6a0c6 100644 --- a/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json @@ -215,7 +215,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] @@ -267,7 +268,8 @@ "endIndex": 3 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -301,7 +303,8 @@ "endIndex": 3 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] diff --git a/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json index 8f1f2aacc4f..6b695b554c6 100644 --- a/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json @@ -249,7 +249,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] @@ -301,7 +302,8 @@ "endIndex": 3 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -335,7 +337,8 @@ "endIndex": 3 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] diff --git a/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json index d6b613e1c02..d94419567fe 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json @@ -215,7 +215,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] diff --git a/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json index 972e4ad6fc3..5d4f156922f 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json @@ -215,7 +215,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] diff --git a/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json index 02a33184f84..2c417144b22 100644 --- a/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json @@ -219,7 +219,8 @@ "endIndex": 3 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -253,7 +254,8 @@ "endIndex": 3 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -287,7 +289,8 @@ "endIndex": 3 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -321,7 +324,8 @@ "endIndex": 3 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -355,7 +359,8 @@ "endIndex": 3 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] diff --git a/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json index edbb7abb825..4bc46aacf00 100644 --- a/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json @@ -314,7 +314,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] diff --git a/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json index a7c535e14af..bea8571066d 100644 --- a/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json @@ -214,7 +214,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] @@ -350,7 +351,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] diff --git a/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json index 9487791fce5..81022be8737 100644 --- a/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json @@ -214,7 +214,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] diff --git a/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json index f57c6ba4fa1..35df379d2f1 100644 --- a/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json @@ -214,7 +214,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -243,7 +244,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Property", @@ -272,7 +274,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] @@ -318,7 +321,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "IndexSignature", @@ -418,7 +422,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "extendsTokenRanges": [] diff --git a/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json index 90cf5534ac9..b8c1d0f29a0 100644 --- a/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json @@ -421,7 +421,8 @@ "endIndex": 2 }, "isStatic": true, - "isProtected": false + "isProtected": false, + "isAbstract": false } ], "implementsTokenRanges": [] diff --git a/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json index ae49e9e3340..f95c5f66538 100644 --- a/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json @@ -214,7 +214,8 @@ "endIndex": 2 }, "isStatic": false, - "isProtected": false + "isProtected": false, + "isAbstract": false }, { "kind": "Method", diff --git a/common/reviews/api/api-extractor-model.api.md b/common/reviews/api/api-extractor-model.api.md index f33d24c2135..7948e5cbaa0 100644 --- a/common/reviews/api/api-extractor-model.api.md +++ b/common/reviews/api/api-extractor-model.api.md @@ -887,7 +887,7 @@ export interface IApiPropertyItemOptions extends IApiNameMixinOptions, IApiRelea } // @public -export interface IApiPropertyOptions extends IApiPropertyItemOptions, IApiProtectedMixinOptions, IApiStaticMixinOptions, IApiInitializerMixinOptions { +export interface IApiPropertyOptions extends IApiPropertyItemOptions, IApiAbstractMixinOptions, IApiProtectedMixinOptions, IApiStaticMixinOptions, IApiInitializerMixinOptions { } // @public diff --git a/libraries/api-extractor-model/src/model/ApiProperty.ts b/libraries/api-extractor-model/src/model/ApiProperty.ts index 23aa832ffb1..f198a96dd5b 100644 --- a/libraries/api-extractor-model/src/model/ApiProperty.ts +++ b/libraries/api-extractor-model/src/model/ApiProperty.ts @@ -8,6 +8,7 @@ import { Component } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference'; import { ApiItemKind } from '../items/ApiItem'; +import { ApiAbstractMixin, IApiAbstractMixinOptions } from '../mixins/ApiAbstractMixin'; import { ApiProtectedMixin, IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin'; import { ApiStaticMixin, IApiStaticMixinOptions } from '../mixins/ApiStaticMixin'; import { ApiInitializerMixin, IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin'; @@ -19,6 +20,7 @@ import { ApiPropertyItem, IApiPropertyItemOptions } from '../items/ApiPropertyIt */ export interface IApiPropertyOptions extends IApiPropertyItemOptions, + IApiAbstractMixinOptions, IApiProtectedMixinOptions, IApiStaticMixinOptions, IApiInitializerMixinOptions {} @@ -57,7 +59,9 @@ export interface IApiPropertyOptions * * @public */ -export class ApiProperty extends ApiProtectedMixin(ApiStaticMixin(ApiInitializerMixin(ApiPropertyItem))) { +export class ApiProperty extends ApiAbstractMixin( + ApiProtectedMixin(ApiStaticMixin(ApiInitializerMixin(ApiPropertyItem))) +) { public constructor(options: IApiPropertyOptions) { super(options); } From 2088fd38b0766ab3c2273bb8d1e184dd16cc2ccd Mon Sep 17 00:00:00 2001 From: Frank Wienberg Date: Tue, 18 Oct 2022 14:21:23 +0200 Subject: [PATCH 005/399] Add new ApiJsonSchemaVersion (V_1011) for 'isAbstract' field --- .../src/model/DeserializerContext.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libraries/api-extractor-model/src/model/DeserializerContext.ts b/libraries/api-extractor-model/src/model/DeserializerContext.ts index 6c1d6fab487..b50aa8b1a68 100644 --- a/libraries/api-extractor-model/src/model/DeserializerContext.ts +++ b/libraries/api-extractor-model/src/model/DeserializerContext.ts @@ -82,13 +82,21 @@ export enum ApiJsonSchemaVersion { */ V_1010 = 1010, + /** + * Add an `isAbstract` field to `ApiClass`, `ApiMethod`, and `ApiProperty` to + * track whether the item is abstract. + * + * When loading older JSON files, the value defaults to `false`. + */ + V_1011 = 1011, + /** * The current latest .api.json schema version. * * IMPORTANT: When incrementing this number, consider whether `OLDEST_SUPPORTED` or `OLDEST_FORWARDS_COMPATIBLE` * should be updated. */ - LATEST = V_1010, + LATEST = V_1011, /** * The oldest .api.json schema version that is still supported for backwards compatibility. From dc41cb57f233242914ab0159c22a6b250d927d84 Mon Sep 17 00:00:00 2001 From: Frank Wienberg Date: Tue, 18 Oct 2022 14:34:25 +0200 Subject: [PATCH 006/399] Add change log entries for new 'isAbstract' field The support to track and render 'abstract' modifiers on classes, methods, and properties affects api-extractor-model, api-extractor, and api-documenter. --- ...ber-support-abstract-modifier_2022-10-18-12-29.json | 10 ++++++++++ ...ber-support-abstract-modifier_2022-10-18-12-29.json | 10 ++++++++++ ...ber-support-abstract-modifier_2022-10-18-12-29.json | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 common/changes/@microsoft/api-documenter/fwienber-support-abstract-modifier_2022-10-18-12-29.json create mode 100644 common/changes/@microsoft/api-extractor-model/fwienber-support-abstract-modifier_2022-10-18-12-29.json create mode 100644 common/changes/@microsoft/api-extractor/fwienber-support-abstract-modifier_2022-10-18-12-29.json diff --git a/common/changes/@microsoft/api-documenter/fwienber-support-abstract-modifier_2022-10-18-12-29.json b/common/changes/@microsoft/api-documenter/fwienber-support-abstract-modifier_2022-10-18-12-29.json new file mode 100644 index 00000000000..471188587c6 --- /dev/null +++ b/common/changes/@microsoft/api-documenter/fwienber-support-abstract-modifier_2022-10-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/api-documenter", + "comment": "Fix #3661: Render 'abstract' modifier for classes and members", + "type": "minor" + } + ], + "packageName": "@microsoft/api-documenter" +} \ No newline at end of file diff --git a/common/changes/@microsoft/api-extractor-model/fwienber-support-abstract-modifier_2022-10-18-12-29.json b/common/changes/@microsoft/api-extractor-model/fwienber-support-abstract-modifier_2022-10-18-12-29.json new file mode 100644 index 00000000000..a9523fbd575 --- /dev/null +++ b/common/changes/@microsoft/api-extractor-model/fwienber-support-abstract-modifier_2022-10-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/api-extractor-model", + "comment": "Fix #3661: New field 'isAbstract' to track 'abstract' modifier in 'ApiClass', 'ApiMethod', and 'ApiProperty' via 'ApiAbstractMixin'", + "type": "minor" + } + ], + "packageName": "@microsoft/api-extractor-model" +} \ No newline at end of file diff --git a/common/changes/@microsoft/api-extractor/fwienber-support-abstract-modifier_2022-10-18-12-29.json b/common/changes/@microsoft/api-extractor/fwienber-support-abstract-modifier_2022-10-18-12-29.json new file mode 100644 index 00000000000..e7caf61702e --- /dev/null +++ b/common/changes/@microsoft/api-extractor/fwienber-support-abstract-modifier_2022-10-18-12-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/api-extractor", + "comment": "Fix #3661: Track 'abstract' modifier of classes, methods, and properties in new field 'isAbstract'", + "type": "minor" + } + ], + "packageName": "@microsoft/api-extractor" +} \ No newline at end of file From 5a7e4dbea1130204517bac7dc099b61c7cfb64a3 Mon Sep 17 00:00:00 2001 From: Frank Wienberg Date: Tue, 18 Oct 2022 15:07:04 +0200 Subject: [PATCH 007/399] [api-documenter] Change modifier output order to match TypeScript syntax Unlike other languages like Java, in TypeScript, the order of modifiers is defined strictly. Currently, it looks like api-documenter uses alphabetical order, which is not the correct TypeScript modifier order. It seems the correct order is (`public` | `protected` | `private`)? (`static`? | `abstract`?) `override`? `readonly`? No member can be `static` and `abstract` at the same time, so the order of these two does not matter. api-documenter currently only uses `protected`, `static`, `abstract` (new in this PR) and `readonly`, so `public` (default!), `private` (no API!) and `override` (maybe interesting for navigation, but not as a modifier) do not apply. Added a code comment about the order and moved `readonly` to the last position so that the overall modifier output order now matches TypeScript syntax. --- .../src/documenters/MarkdownDocumenter.ts | 20 +++++++++++-------- .../markdown/api-documenter-test.docclass1.md | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/apps/api-documenter/src/documenters/MarkdownDocumenter.ts b/apps/api-documenter/src/documenters/MarkdownDocumenter.ts index 4f441361e2a..e2f3afdf7d9 100644 --- a/apps/api-documenter/src/documenters/MarkdownDocumenter.ts +++ b/apps/api-documenter/src/documenters/MarkdownDocumenter.ts @@ -1048,6 +1048,10 @@ export class MarkdownDocumenter { const section: DocSection = new DocSection({ configuration }); + // Output modifiers in syntactically correct order: first access modifier (here: `protected`), then + // `static` or `abstract` (no member can be both, so the order between the two of them does not matter), + // last `readonly`. If `override` was supported, it would go directly before `readonly`. + if (ApiProtectedMixin.isBaseClassOf(apiItem)) { if (apiItem.isProtected) { section.appendNode( @@ -1056,14 +1060,6 @@ export class MarkdownDocumenter { } } - if (ApiReadonlyMixin.isBaseClassOf(apiItem)) { - if (apiItem.isReadonly) { - section.appendNode( - new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'readonly' })]) - ); - } - } - if (ApiStaticMixin.isBaseClassOf(apiItem)) { if (apiItem.isStatic) { section.appendNode( @@ -1080,6 +1076,14 @@ export class MarkdownDocumenter { } } + if (ApiReadonlyMixin.isBaseClassOf(apiItem)) { + if (apiItem.isReadonly) { + section.appendNode( + new DocParagraph({ configuration }, [new DocCodeSpan({ configuration, code: 'readonly' })]) + ); + } + } + return new DocTableCell({ configuration }, section.nodes); } diff --git a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.docclass1.md b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.docclass1.md index 4ae28213699..f5c16d25f12 100644 --- a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.docclass1.md +++ b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.docclass1.md @@ -35,7 +35,7 @@ The constructor for this class is marked as internal. Third-party code should no | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [multipleModifiersProperty](./api-documenter-test.docclass1.multiplemodifiersproperty.md) |

protected

readonly

static

| boolean | Some property with multiple modifiers. | +| [multipleModifiersProperty](./api-documenter-test.docclass1.multiplemodifiersproperty.md) |

protected

static

readonly

| boolean | Some property with multiple modifiers. | | [protectedProperty](./api-documenter-test.docclass1.protectedproperty.md) | protected | string | Some protected property. | | [readonlyProperty](./api-documenter-test.docclass1.readonlyproperty.md) | readonly | string | | | [regularProperty](./api-documenter-test.docclass1.regularproperty.md) | | [SystemEvent](./api-documenter-test.systemevent.md) | This is a regular property that happens to use the SystemEvent type. | From c1e886ae53bf54ec5eb83269170747da1ddf6eec Mon Sep 17 00:00:00 2001 From: Frank Wienberg Date: Tue, 18 Oct 2022 18:00:54 +0200 Subject: [PATCH 008/399] Regenerate expected test data after updating schemaVersion The schema version was updated from 1010 to 1011 in 2088fd38, so this changed should be squashed with 2088fd38. --- .../etc/inheritedMembers/api-documenter-scenarios.api.json | 2 +- .../api-documenter-test/etc/api-documenter-test.api.json | 2 +- .../etc/ambientNameConflict/api-extractor-scenarios.api.json | 2 +- .../etc/ambientNameConflict2/api-extractor-scenarios.api.json | 2 +- .../etc/ancillaryDeclarations/api-extractor-scenarios.api.json | 2 +- .../etc/apiItemKinds/api-extractor-scenarios.api.json | 2 +- .../etc/bundledPackages/api-extractor-scenarios.api.json | 2 +- .../etc/circularImport/api-extractor-scenarios.api.json | 2 +- .../etc/circularImport2/api-extractor-scenarios.api.json | 2 +- .../defaultExportOfEntryPoint/api-extractor-scenarios.api.json | 2 +- .../defaultExportOfEntryPoint2/api-extractor-scenarios.api.json | 2 +- .../defaultExportOfEntryPoint3/api-extractor-scenarios.api.json | 2 +- .../defaultExportOfEntryPoint4/api-extractor-scenarios.api.json | 2 +- .../etc/docReferences/api-extractor-scenarios.api.json | 2 +- .../etc/docReferences2/api-extractor-scenarios.api.json | 2 +- .../etc/docReferences3/api-extractor-scenarios.api.json | 2 +- .../etc/docReferencesAlias/api-extractor-scenarios.api.json | 2 +- .../api-extractor-scenarios.api.json | 2 +- .../etc/dynamicImportType/api-extractor-scenarios.api.json | 2 +- .../etc/dynamicImportType2/api-extractor-scenarios.api.json | 2 +- .../etc/dynamicImportType3/api-extractor-scenarios.api.json | 2 +- .../ecmaScriptPrivateFields/api-extractor-scenarios.api.json | 2 +- .../etc/enumSorting/api-extractor-scenarios.api.json | 2 +- .../etc/excerptTokens/api-extractor-scenarios.api.json | 2 +- .../etc/exportDuplicate/api-extractor-scenarios.api.json | 2 +- .../etc/exportEquals/api-extractor-scenarios.api.json | 2 +- .../etc/exportImportStarAs/api-extractor-scenarios.api.json | 2 +- .../etc/exportImportStarAs2/api-extractor-scenarios.api.json | 2 +- .../etc/exportImportedExternal/api-extractor-scenarios.api.json | 2 +- .../exportImportedExternal2/api-extractor-scenarios.api.json | 2 +- .../api-extractor-scenarios.api.json | 2 +- .../etc/exportStar/api-extractor-scenarios.api.json | 2 +- .../etc/exportStar2/api-extractor-scenarios.api.json | 2 +- .../etc/exportStar3/api-extractor-scenarios.api.json | 2 +- .../etc/functionOverload/api-extractor-scenarios.api.json | 2 +- .../etc/importEquals/api-extractor-scenarios.api.json | 2 +- .../etc/importType/api-extractor-scenarios.api.json | 2 +- .../includeForgottenExports/api-extractor-scenarios.api.json | 2 +- .../inconsistentReleaseTags/api-extractor-scenarios.api.json | 2 +- .../internationalCharacters/api-extractor-scenarios.api.json | 2 +- .../etc/mergedDeclarations/api-extractor-scenarios.api.json | 2 +- .../etc/mixinPattern/api-extractor-scenarios.api.json | 2 +- .../etc/namedDefaultImport/api-extractor-scenarios.api.json | 2 +- .../etc/namespaceImports/api-extractor-scenarios.api.json | 2 +- .../etc/namespaceImports2/api-extractor-scenarios.api.json | 2 +- .../etc/preapproved/api-extractor-scenarios.api.json | 2 +- .../etc/projectFolderUrl/api-extractor-scenarios.api.json | 2 +- .../etc/readonlyDeclarations/api-extractor-scenarios.api.json | 2 +- .../etc/referenceTokens/api-extractor-scenarios.api.json | 2 +- .../etc/spanSorting/api-extractor-scenarios.api.json | 2 +- .../etc/typeLiterals/api-extractor-scenarios.api.json | 2 +- .../etc/typeOf/api-extractor-scenarios.api.json | 2 +- .../etc/typeOf2/api-extractor-scenarios.api.json | 2 +- .../etc/typeOf3/api-extractor-scenarios.api.json | 2 +- .../etc/typeParameters/api-extractor-scenarios.api.json | 2 +- 55 files changed, 55 insertions(+), 55 deletions(-) diff --git a/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json b/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json index 353fb1d844e..9118d0a598f 100644 --- a/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json +++ b/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-documenter-test/etc/api-documenter-test.api.json b/build-tests/api-documenter-test/etc/api-documenter-test.api.json index ecdc4270683..5d91fa222fd 100644 --- a/build-tests/api-documenter-test/etc/api-documenter-test.api.json +++ b/build-tests/api-documenter-test/etc/api-documenter-test.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/ambientNameConflict/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/ambientNameConflict/api-extractor-scenarios.api.json index c8044d1642a..0697715d9d5 100644 --- a/build-tests/api-extractor-scenarios/etc/ambientNameConflict/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/ambientNameConflict/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/ambientNameConflict2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/ambientNameConflict2/api-extractor-scenarios.api.json index 15509ec1718..d0e3d0c7980 100644 --- a/build-tests/api-extractor-scenarios/etc/ambientNameConflict2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/ambientNameConflict2/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/ancillaryDeclarations/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/ancillaryDeclarations/api-extractor-scenarios.api.json index 53341afdf70..8eda7baa8a6 100644 --- a/build-tests/api-extractor-scenarios/etc/ancillaryDeclarations/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/ancillaryDeclarations/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json index a23e873dea6..5399ba5ef08 100644 --- a/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json index c28e68ec177..5146f92aab4 100644 --- a/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/bundledPackages/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json index ae1bbe97086..d4f99324946 100644 --- a/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/circularImport/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json index e4776282848..2af5ea9bb31 100644 --- a/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/circularImport2/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint/api-extractor-scenarios.api.json index c10423b414a..ddc7e3f6556 100644 --- a/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint2/api-extractor-scenarios.api.json index 0a539f8cec6..d5b2da9ff7c 100644 --- a/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint2/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint3/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint3/api-extractor-scenarios.api.json index c3534ce9d89..35ffd2ab980 100644 --- a/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint3/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint3/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint4/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint4/api-extractor-scenarios.api.json index f15c13d7f97..5cdb5ae7e93 100644 --- a/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint4/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/defaultExportOfEntryPoint4/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/docReferences/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferences/api-extractor-scenarios.api.json index 1f7a7c233ad..fa4fdb7faba 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferences/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferences/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/docReferences2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferences2/api-extractor-scenarios.api.json index 9356d944113..89801701c03 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferences2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferences2/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/docReferences3/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferences3/api-extractor-scenarios.api.json index 86eb2fecd4e..f6bdf6840ed 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferences3/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferences3/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json index 9c19c8f5e0b..0e10f085184 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferencesAlias/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json index 56da84a2127..4bf60a5d307 100644 --- a/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/docReferencesNamespaceAlias/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json index 98b9058167c..3a7783606e3 100644 --- a/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/dynamicImportType/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/dynamicImportType2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/dynamicImportType2/api-extractor-scenarios.api.json index 0648ab651e8..b7a2b150998 100644 --- a/build-tests/api-extractor-scenarios/etc/dynamicImportType2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/dynamicImportType2/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/dynamicImportType3/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/dynamicImportType3/api-extractor-scenarios.api.json index 67334643b3d..45d2df5805b 100644 --- a/build-tests/api-extractor-scenarios/etc/dynamicImportType3/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/dynamicImportType3/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/ecmaScriptPrivateFields/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/ecmaScriptPrivateFields/api-extractor-scenarios.api.json index 9b1d9572484..623949f6883 100644 --- a/build-tests/api-extractor-scenarios/etc/ecmaScriptPrivateFields/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/ecmaScriptPrivateFields/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/enumSorting/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/enumSorting/api-extractor-scenarios.api.json index 999d0461953..e5c18346cba 100644 --- a/build-tests/api-extractor-scenarios/etc/enumSorting/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/enumSorting/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/excerptTokens/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/excerptTokens/api-extractor-scenarios.api.json index 8a92f59ef79..a79d24c516d 100644 --- a/build-tests/api-extractor-scenarios/etc/excerptTokens/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/excerptTokens/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/exportDuplicate/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportDuplicate/api-extractor-scenarios.api.json index 756706dfe72..f4ca40c849b 100644 --- a/build-tests/api-extractor-scenarios/etc/exportDuplicate/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportDuplicate/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/exportEquals/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportEquals/api-extractor-scenarios.api.json index 197bc9cff8f..14e0e241335 100644 --- a/build-tests/api-extractor-scenarios/etc/exportEquals/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportEquals/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/exportImportStarAs/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportImportStarAs/api-extractor-scenarios.api.json index 88dcd4cf162..65254a86a60 100644 --- a/build-tests/api-extractor-scenarios/etc/exportImportStarAs/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportImportStarAs/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/exportImportStarAs2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportImportStarAs2/api-extractor-scenarios.api.json index 404939b565c..569dc468334 100644 --- a/build-tests/api-extractor-scenarios/etc/exportImportStarAs2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportImportStarAs2/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/exportImportedExternal/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportImportedExternal/api-extractor-scenarios.api.json index 79a07fd02a9..895ed82382e 100644 --- a/build-tests/api-extractor-scenarios/etc/exportImportedExternal/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportImportedExternal/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/exportImportedExternal2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportImportedExternal2/api-extractor-scenarios.api.json index 79a07fd02a9..895ed82382e 100644 --- a/build-tests/api-extractor-scenarios/etc/exportImportedExternal2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportImportedExternal2/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/exportImportedExternalDefault/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportImportedExternalDefault/api-extractor-scenarios.api.json index 2a05f3d8c7f..e38f2eb3fbc 100644 --- a/build-tests/api-extractor-scenarios/etc/exportImportedExternalDefault/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportImportedExternalDefault/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/exportStar/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportStar/api-extractor-scenarios.api.json index c95675e2bac..034087c4404 100644 --- a/build-tests/api-extractor-scenarios/etc/exportStar/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportStar/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/exportStar2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportStar2/api-extractor-scenarios.api.json index a2ed1b1288b..89196c9883e 100644 --- a/build-tests/api-extractor-scenarios/etc/exportStar2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportStar2/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/exportStar3/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/exportStar3/api-extractor-scenarios.api.json index b99c5701c38..978e79dd798 100644 --- a/build-tests/api-extractor-scenarios/etc/exportStar3/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/exportStar3/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/functionOverload/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/functionOverload/api-extractor-scenarios.api.json index eae5b3f2d67..77963078446 100644 --- a/build-tests/api-extractor-scenarios/etc/functionOverload/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/functionOverload/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/importEquals/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/importEquals/api-extractor-scenarios.api.json index ba8e99605cf..99e2120fe4f 100644 --- a/build-tests/api-extractor-scenarios/etc/importEquals/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/importEquals/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/importType/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/importType/api-extractor-scenarios.api.json index f81b7a3945a..9b7a0ba9812 100644 --- a/build-tests/api-extractor-scenarios/etc/importType/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/importType/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json index 5bdbc889658..edf03124928 100644 --- a/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/inconsistentReleaseTags/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/inconsistentReleaseTags/api-extractor-scenarios.api.json index b7121a25fcc..fd70ca6eb1a 100644 --- a/build-tests/api-extractor-scenarios/etc/inconsistentReleaseTags/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/inconsistentReleaseTags/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/internationalCharacters/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/internationalCharacters/api-extractor-scenarios.api.json index ebd4505fbd4..5c99dc8cdb7 100644 --- a/build-tests/api-extractor-scenarios/etc/internationalCharacters/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/internationalCharacters/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json index ce0022a7547..41bf7a4b7cd 100644 --- a/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/mergedDeclarations/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json index 6c6e7e652d5..133cb558f57 100644 --- a/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/mixinPattern/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/namedDefaultImport/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/namedDefaultImport/api-extractor-scenarios.api.json index 3e06f53760f..e4a6ab82c27 100644 --- a/build-tests/api-extractor-scenarios/etc/namedDefaultImport/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/namedDefaultImport/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/namespaceImports/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/namespaceImports/api-extractor-scenarios.api.json index 5462f9c539b..7c915e7984a 100644 --- a/build-tests/api-extractor-scenarios/etc/namespaceImports/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/namespaceImports/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/namespaceImports2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/namespaceImports2/api-extractor-scenarios.api.json index b9cfe1afe5d..f40d2e64608 100644 --- a/build-tests/api-extractor-scenarios/etc/namespaceImports2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/namespaceImports2/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/preapproved/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/preapproved/api-extractor-scenarios.api.json index 79a07fd02a9..895ed82382e 100644 --- a/build-tests/api-extractor-scenarios/etc/preapproved/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/preapproved/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/projectFolderUrl/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/projectFolderUrl/api-extractor-scenarios.api.json index 223a02e84bc..bb32a39af82 100644 --- a/build-tests/api-extractor-scenarios/etc/projectFolderUrl/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/projectFolderUrl/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json index ca20b2bb194..c0ed696410b 100644 --- a/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/readonlyDeclarations/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json index 2f4eba57845..3840c1933fe 100644 --- a/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/referenceTokens/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json index 2a616ddd8ce..5315cb39238 100644 --- a/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/spanSorting/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/typeLiterals/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/typeLiterals/api-extractor-scenarios.api.json index 35ad0b7ef62..9e76ccb3d77 100644 --- a/build-tests/api-extractor-scenarios/etc/typeLiterals/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/typeLiterals/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/typeOf/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/typeOf/api-extractor-scenarios.api.json index c37e28a4708..52ea964fd3c 100644 --- a/build-tests/api-extractor-scenarios/etc/typeOf/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/typeOf/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/typeOf2/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/typeOf2/api-extractor-scenarios.api.json index da1afcf027c..bd0a1edd8c6 100644 --- a/build-tests/api-extractor-scenarios/etc/typeOf2/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/typeOf2/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/typeOf3/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/typeOf3/api-extractor-scenarios.api.json index ac5372d4cc6..36f784c17cc 100644 --- a/build-tests/api-extractor-scenarios/etc/typeOf3/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/typeOf3/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", diff --git a/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json index 05c515e3859..c50dc7eb1bb 100644 --- a/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json @@ -2,7 +2,7 @@ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "[test mode]", - "schemaVersion": 1010, + "schemaVersion": 1011, "oldestForwardsCompatibleVersion": 1001, "tsdocConfig": { "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", From 0a55655178a696ea86782005526d6cef1e540de8 Mon Sep 17 00:00:00 2001 From: Frank Wienberg Date: Tue, 29 Nov 2022 17:55:06 +0100 Subject: [PATCH 009/399] [api-documenter] Add test for an abstract class with abstract method & property Add a simple abstract class with an abstract method and an abstract property at build-tests/api-documenter-tests/src/AbstractClass.ts, re-export it in the corresponding index.ts and rebuild build-tests/api-documenter-tests. The updated report files look good. Especially note the "Modifiers" column of both tables in api-documenter-test.abstractclass.md now containing the "abstract" entry. --- .../etc/api-documenter-test.api.json | 80 +++++++++ .../etc/api-documenter-test.api.md | 6 + .../api-documenter-test.abstractclass.md | 26 +++ ...pi-documenter-test.abstractclass.method.md | 17 ++ ...-documenter-test.abstractclass.property.md | 13 ++ .../etc/markdown/api-documenter-test.md | 6 + .../etc/yaml/api-documenter-test.yml | 139 +++++++-------- .../api-documenter-test/abstractclass.yml | 40 +++++ .../api-documenter-test/etc/yaml/toc.yml | 160 +++++++++--------- .../api-documenter-test/src/AbstractClass.ts | 10 ++ build-tests/api-documenter-test/src/index.ts | 2 + 11 files changed, 351 insertions(+), 148 deletions(-) create mode 100644 build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.md create mode 100644 build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.method.md create mode 100644 build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.property.md create mode 100644 build-tests/api-documenter-test/etc/yaml/api-documenter-test/abstractclass.yml create mode 100644 build-tests/api-documenter-test/src/AbstractClass.ts diff --git a/build-tests/api-documenter-test/etc/api-documenter-test.api.json b/build-tests/api-documenter-test/etc/api-documenter-test.api.json index 5d91fa222fd..4b8d0a7951b 100644 --- a/build-tests/api-documenter-test/etc/api-documenter-test.api.json +++ b/build-tests/api-documenter-test/etc/api-documenter-test.api.json @@ -182,6 +182,86 @@ "name": "", "preserveMemberOrder": false, "members": [ + { + "kind": "Class", + "canonicalReference": "api-documenter-test!AbstractClass:class", + "docComment": "/**\n * Some abstract class with abstract members.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare abstract class AbstractClass " + } + ], + "fileUrlPath": "src/AbstractClass.ts", + "releaseTag": "Public", + "isAbstract": true, + "name": "AbstractClass", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "api-documenter-test!AbstractClass#method:member(1)", + "docComment": "/**\n * Some abstract method.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "abstract method(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": true, + "name": "method" + }, + { + "kind": "Property", + "canonicalReference": "api-documenter-test!AbstractClass#property:member", + "docComment": "/**\n * Some abstract property.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected abstract property: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "property", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": true, + "isAbstract": true + } + ], + "implementsTokenRanges": [] + }, { "kind": "Interface", "canonicalReference": "api-documenter-test!Constraint:interface", diff --git a/build-tests/api-documenter-test/etc/api-documenter-test.api.md b/build-tests/api-documenter-test/etc/api-documenter-test.api.md index 22fa1fef52d..18bab020adb 100644 --- a/build-tests/api-documenter-test/etc/api-documenter-test.api.md +++ b/build-tests/api-documenter-test/etc/api-documenter-test.api.md @@ -4,6 +4,12 @@ ```ts +// @public +export abstract class AbstractClass { + abstract method(): void; + protected abstract property: number; +} + // @public export interface Constraint { } diff --git a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.md b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.md new file mode 100644 index 00000000000..743b8feecd0 --- /dev/null +++ b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [api-documenter-test](./api-documenter-test.md) > [AbstractClass](./api-documenter-test.abstractclass.md) + +## AbstractClass class + +Some abstract class with abstract members. + +Signature: + +```typescript +export declare abstract class AbstractClass +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [property](./api-documenter-test.abstractclass.property.md) |

protected

abstract

| number | Some abstract property. | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [method()](./api-documenter-test.abstractclass.method.md) | abstract | Some abstract method. | + diff --git a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.method.md b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.method.md new file mode 100644 index 00000000000..bed2cf4bdeb --- /dev/null +++ b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.method.md @@ -0,0 +1,17 @@ + + +[Home](./index.md) > [api-documenter-test](./api-documenter-test.md) > [AbstractClass](./api-documenter-test.abstractclass.md) > [method](./api-documenter-test.abstractclass.method.md) + +## AbstractClass.method() method + +Some abstract method. + +Signature: + +```typescript +abstract method(): void; +``` +Returns: + +void + diff --git a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.property.md b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.property.md new file mode 100644 index 00000000000..6fb693016d1 --- /dev/null +++ b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.abstractclass.property.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [api-documenter-test](./api-documenter-test.md) > [AbstractClass](./api-documenter-test.abstractclass.md) > [property](./api-documenter-test.abstractclass.property.md) + +## AbstractClass.property property + +Some abstract property. + +Signature: + +```typescript +protected abstract property: number; +``` diff --git a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.md b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.md index 8ac3f68444c..ff7da3c5e33 100644 --- a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.md +++ b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.md @@ -19,6 +19,12 @@ This project tests various documentation generation scenarios and doc comment sy | [Generic](./api-documenter-test.generic.md) | Generic class. | | [SystemEvent](./api-documenter-test.systemevent.md) |

A class used to exposed events.

| +## Abstract Classes + +| Abstract Class | Description | +| --- | --- | +| [AbstractClass](./api-documenter-test.abstractclass.md) | Some abstract class with abstract members. | + ## Enumerations | Enumeration | Description | diff --git a/build-tests/api-documenter-test/etc/yaml/api-documenter-test.yml b/build-tests/api-documenter-test/etc/yaml/api-documenter-test.yml index 7576e5ade75..b0f265aeb59 100644 --- a/build-tests/api-documenter-test/etc/yaml/api-documenter-test.yml +++ b/build-tests/api-documenter-test/etc/yaml/api-documenter-test.yml @@ -1,69 +1,70 @@ -### YamlMime:TSPackage -uid: api-documenter-test! -name: api-documenter-test -type: package -summary: |- - api-extractor-test-05 - - This project tests various documentation generation scenarios and doc comment syntaxes. -interfaces: - - 'api-documenter-test!Constraint:interface' - - 'api-documenter-test!DefaultType:interface' - - 'api-documenter-test!DocClassInterfaceMerge:interface' - - 'api-documenter-test!IDocInterface1:interface' - - 'api-documenter-test!IDocInterface2:interface' - - 'api-documenter-test!IDocInterface3:interface' - - 'api-documenter-test!IDocInterface4:interface' - - 'api-documenter-test!IDocInterface5:interface' - - 'api-documenter-test!IDocInterface6:interface' - - 'api-documenter-test!IDocInterface7:interface' -classes: - - 'api-documenter-test!DecoratorExample:class' - - 'api-documenter-test!DocBaseClass:class' - - 'api-documenter-test!DocClass1:class' - - 'api-documenter-test!DocClassInterfaceMerge:class' - - 'api-documenter-test!Generic:class' - - 'api-documenter-test!SystemEvent:class' -enums: - - 'api-documenter-test!DocEnum:enum' - - 'api-documenter-test!DocEnumNamespaceMerge:enum' -typeAliases: - - 'api-documenter-test!ExampleDuplicateTypeAlias:type' - - 'api-documenter-test!ExampleTypeAlias:type' - - 'api-documenter-test!ExampleUnionTypeAlias:type' - - 'api-documenter-test!GenericTypeAlias:type' - - 'api-documenter-test!TypeAlias:type' -functions: - - name: 'exampleFunction(x, y)' - uid: 'api-documenter-test!exampleFunction:function(1)' - package: api-documenter-test! - summary: An exported function with hyperlinked parameters and return value. - remarks: '' - example: [] - isPreview: false - isDeprecated: false - syntax: - content: 'export declare function exampleFunction(x: ExampleTypeAlias, y: number): IDocInterface1;' - parameters: - - id: x - description: an API item that should get hyperlinked - type: '' - - id: 'y' - description: a system type that should NOT get hyperlinked - type: number - return: - type: '' - description: an interface that should get hyperlinked - - name: yamlReferenceUniquenessTest() - uid: 'api-documenter-test!yamlReferenceUniquenessTest:function(1)' - package: api-documenter-test! - summary: '' - remarks: '' - example: [] - isPreview: false - isDeprecated: false - syntax: - content: 'export declare function yamlReferenceUniquenessTest(): IDocInterface1;' - return: - type: '' - description: '' +### YamlMime:TSPackage +uid: api-documenter-test! +name: api-documenter-test +type: package +summary: |- + api-extractor-test-05 + + This project tests various documentation generation scenarios and doc comment syntaxes. +interfaces: + - 'api-documenter-test!Constraint:interface' + - 'api-documenter-test!DefaultType:interface' + - 'api-documenter-test!DocClassInterfaceMerge:interface' + - 'api-documenter-test!IDocInterface1:interface' + - 'api-documenter-test!IDocInterface2:interface' + - 'api-documenter-test!IDocInterface3:interface' + - 'api-documenter-test!IDocInterface4:interface' + - 'api-documenter-test!IDocInterface5:interface' + - 'api-documenter-test!IDocInterface6:interface' + - 'api-documenter-test!IDocInterface7:interface' +classes: + - 'api-documenter-test!AbstractClass:class' + - 'api-documenter-test!DecoratorExample:class' + - 'api-documenter-test!DocBaseClass:class' + - 'api-documenter-test!DocClass1:class' + - 'api-documenter-test!DocClassInterfaceMerge:class' + - 'api-documenter-test!Generic:class' + - 'api-documenter-test!SystemEvent:class' +enums: + - 'api-documenter-test!DocEnum:enum' + - 'api-documenter-test!DocEnumNamespaceMerge:enum' +typeAliases: + - 'api-documenter-test!ExampleDuplicateTypeAlias:type' + - 'api-documenter-test!ExampleTypeAlias:type' + - 'api-documenter-test!ExampleUnionTypeAlias:type' + - 'api-documenter-test!GenericTypeAlias:type' + - 'api-documenter-test!TypeAlias:type' +functions: + - name: 'exampleFunction(x, y)' + uid: 'api-documenter-test!exampleFunction:function(1)' + package: api-documenter-test! + summary: An exported function with hyperlinked parameters and return value. + remarks: '' + example: [] + isPreview: false + isDeprecated: false + syntax: + content: 'export declare function exampleFunction(x: ExampleTypeAlias, y: number): IDocInterface1;' + parameters: + - id: x + description: an API item that should get hyperlinked + type: '' + - id: 'y' + description: a system type that should NOT get hyperlinked + type: number + return: + type: '' + description: an interface that should get hyperlinked + - name: yamlReferenceUniquenessTest() + uid: 'api-documenter-test!yamlReferenceUniquenessTest:function(1)' + package: api-documenter-test! + summary: '' + remarks: '' + example: [] + isPreview: false + isDeprecated: false + syntax: + content: 'export declare function yamlReferenceUniquenessTest(): IDocInterface1;' + return: + type: '' + description: '' diff --git a/build-tests/api-documenter-test/etc/yaml/api-documenter-test/abstractclass.yml b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/abstractclass.yml new file mode 100644 index 00000000000..7d215efa4f1 --- /dev/null +++ b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/abstractclass.yml @@ -0,0 +1,40 @@ +### YamlMime:TSType +name: AbstractClass +uid: 'api-documenter-test!AbstractClass:class' +package: api-documenter-test! +fullName: AbstractClass +summary: Some abstract class with abstract members. +remarks: '' +example: [] +isPreview: false +isDeprecated: false +type: class +properties: + - name: property + uid: 'api-documenter-test!AbstractClass#property:member' + package: api-documenter-test! + fullName: property + summary: Some abstract property. + remarks: '' + example: [] + isPreview: false + isDeprecated: false + syntax: + content: 'protected abstract property: number;' + return: + type: number +methods: + - name: method() + uid: 'api-documenter-test!AbstractClass#method:member(1)' + package: api-documenter-test! + fullName: method() + summary: Some abstract method. + remarks: '' + example: [] + isPreview: false + isDeprecated: false + syntax: + content: 'abstract method(): void;' + return: + type: void + description: '' diff --git a/build-tests/api-documenter-test/etc/yaml/toc.yml b/build-tests/api-documenter-test/etc/yaml/toc.yml index caa0193215c..22523f8276b 100644 --- a/build-tests/api-documenter-test/etc/yaml/toc.yml +++ b/build-tests/api-documenter-test/etc/yaml/toc.yml @@ -1,79 +1,81 @@ -items: - - name: Test api-documenter - href: ~/homepage/homepage.md - - name: Test Sample for AD - href: api-documenter-test - extended: true - items: - - name: Classes - items: - - name: DocBaseClass - items: - - name: DocBaseClass - uid: 'api-documenter-test!DocBaseClass:class' - - name: IDocInterface1 - uid: 'api-documenter-test!IDocInterface1:interface' - - name: IDocInterface2 - uid: 'api-documenter-test!IDocInterface2:interface' - - name: DocClass1 - items: - - name: DocClass1 - uid: 'api-documenter-test!DocClass1:class' - - name: IDocInterface3 - uid: 'api-documenter-test!IDocInterface3:interface' - - name: IDocInterface4 - uid: 'api-documenter-test!IDocInterface4:interface' - - name: Interfaces - items: - - name: Interface5 - items: - - name: IDocInterface5 - uid: 'api-documenter-test!IDocInterface5:interface' - - name: Interface6 - items: - - name: InjectedCustomInterface - uid: customUid - - name: IDocInterface6 - uid: 'api-documenter-test!IDocInterface6:interface' - - name: References - items: - - name: InjectedCustomItem - uid: customUrl - - name: Constraint - uid: 'api-documenter-test!Constraint:interface' - - name: DecoratorExample - uid: 'api-documenter-test!DecoratorExample:class' - - name: DefaultType - uid: 'api-documenter-test!DefaultType:interface' - - name: DocClassInterfaceMerge (Class) - uid: 'api-documenter-test!DocClassInterfaceMerge:class' - - name: DocClassInterfaceMerge (Interface) - uid: 'api-documenter-test!DocClassInterfaceMerge:interface' - - name: DocEnum - uid: 'api-documenter-test!DocEnum:enum' - - name: DocEnumNamespaceMerge (Enum) - uid: 'api-documenter-test!DocEnumNamespaceMerge:enum' - - name: DocEnumNamespaceMerge (Namespace) - uid: 'api-documenter-test!DocEnumNamespaceMerge:namespace' - - name: EcmaSmbols - uid: 'api-documenter-test!EcmaSmbols:namespace' - - name: ExampleDuplicateTypeAlias - uid: 'api-documenter-test!ExampleDuplicateTypeAlias:type' - - name: ExampleTypeAlias - uid: 'api-documenter-test!ExampleTypeAlias:type' - - name: ExampleUnionTypeAlias - uid: 'api-documenter-test!ExampleUnionTypeAlias:type' - - name: Generic - uid: 'api-documenter-test!Generic:class' - - name: GenericTypeAlias - uid: 'api-documenter-test!GenericTypeAlias:type' - - name: IDocInterface7 - uid: 'api-documenter-test!IDocInterface7:interface' - - name: OuterNamespace - uid: 'api-documenter-test!OuterNamespace:namespace' - - name: OuterNamespace.InnerNamespace - uid: 'api-documenter-test!OuterNamespace.InnerNamespace:namespace' - - name: SystemEvent - uid: 'api-documenter-test!SystemEvent:class' - - name: TypeAlias - uid: 'api-documenter-test!TypeAlias:type' +items: + - name: Test api-documenter + href: ~/homepage/homepage.md + - name: Test Sample for AD + href: api-documenter-test + extended: true + items: + - name: Classes + items: + - name: DocBaseClass + items: + - name: DocBaseClass + uid: 'api-documenter-test!DocBaseClass:class' + - name: IDocInterface1 + uid: 'api-documenter-test!IDocInterface1:interface' + - name: IDocInterface2 + uid: 'api-documenter-test!IDocInterface2:interface' + - name: DocClass1 + items: + - name: DocClass1 + uid: 'api-documenter-test!DocClass1:class' + - name: IDocInterface3 + uid: 'api-documenter-test!IDocInterface3:interface' + - name: IDocInterface4 + uid: 'api-documenter-test!IDocInterface4:interface' + - name: Interfaces + items: + - name: Interface5 + items: + - name: IDocInterface5 + uid: 'api-documenter-test!IDocInterface5:interface' + - name: Interface6 + items: + - name: InjectedCustomInterface + uid: customUid + - name: IDocInterface6 + uid: 'api-documenter-test!IDocInterface6:interface' + - name: References + items: + - name: InjectedCustomItem + uid: customUrl + - name: AbstractClass + uid: 'api-documenter-test!AbstractClass:class' + - name: Constraint + uid: 'api-documenter-test!Constraint:interface' + - name: DecoratorExample + uid: 'api-documenter-test!DecoratorExample:class' + - name: DefaultType + uid: 'api-documenter-test!DefaultType:interface' + - name: DocClassInterfaceMerge (Class) + uid: 'api-documenter-test!DocClassInterfaceMerge:class' + - name: DocClassInterfaceMerge (Interface) + uid: 'api-documenter-test!DocClassInterfaceMerge:interface' + - name: DocEnum + uid: 'api-documenter-test!DocEnum:enum' + - name: DocEnumNamespaceMerge (Enum) + uid: 'api-documenter-test!DocEnumNamespaceMerge:enum' + - name: DocEnumNamespaceMerge (Namespace) + uid: 'api-documenter-test!DocEnumNamespaceMerge:namespace' + - name: EcmaSmbols + uid: 'api-documenter-test!EcmaSmbols:namespace' + - name: ExampleDuplicateTypeAlias + uid: 'api-documenter-test!ExampleDuplicateTypeAlias:type' + - name: ExampleTypeAlias + uid: 'api-documenter-test!ExampleTypeAlias:type' + - name: ExampleUnionTypeAlias + uid: 'api-documenter-test!ExampleUnionTypeAlias:type' + - name: Generic + uid: 'api-documenter-test!Generic:class' + - name: GenericTypeAlias + uid: 'api-documenter-test!GenericTypeAlias:type' + - name: IDocInterface7 + uid: 'api-documenter-test!IDocInterface7:interface' + - name: OuterNamespace + uid: 'api-documenter-test!OuterNamespace:namespace' + - name: OuterNamespace.InnerNamespace + uid: 'api-documenter-test!OuterNamespace.InnerNamespace:namespace' + - name: SystemEvent + uid: 'api-documenter-test!SystemEvent:class' + - name: TypeAlias + uid: 'api-documenter-test!TypeAlias:type' diff --git a/build-tests/api-documenter-test/src/AbstractClass.ts b/build-tests/api-documenter-test/src/AbstractClass.ts new file mode 100644 index 00000000000..bfb5f3d4dd9 --- /dev/null +++ b/build-tests/api-documenter-test/src/AbstractClass.ts @@ -0,0 +1,10 @@ +/** + * Some abstract class with abstract members. + * @public + */ +export abstract class AbstractClass { + /** Some abstract method. */ + public abstract method(): void; + /** Some abstract property. */ + protected abstract property: number; +} diff --git a/build-tests/api-documenter-test/src/index.ts b/build-tests/api-documenter-test/src/index.ts index b073763ebd6..bc08d496e2b 100644 --- a/build-tests/api-documenter-test/src/index.ts +++ b/build-tests/api-documenter-test/src/index.ts @@ -16,6 +16,8 @@ import { IDocInterface1, IDocInterface3, SystemEvent } from './DocClass1'; export { DecoratorExample } from './DecoratorExample'; +export { AbstractClass } from './AbstractClass'; + /** * A type alias * @public From 8b58a33b61442f168a57f0bec60df696f9514ae2 Mon Sep 17 00:00:00 2001 From: Lukas <4083977+lukaskl@users.noreply.github.com> Date: Wed, 7 Dec 2022 23:10:26 +0700 Subject: [PATCH 010/399] Introduce dependsOnAdditionalFiles setting per operation --- .../src/api/RushProjectConfiguration.ts | 11 +++ .../logic/buildCache/AdditionalFilesHasher.ts | 85 +++++++++++++++++++ .../logic/operations/ShellOperationRunner.ts | 18 ++++ .../src/schemas/rush-project.schema.json | 9 ++ 4 files changed, 123 insertions(+) create mode 100644 libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts diff --git a/libraries/rush-lib/src/api/RushProjectConfiguration.ts b/libraries/rush-lib/src/api/RushProjectConfiguration.ts index bb5aa5b432f..0245b8c53a9 100644 --- a/libraries/rush-lib/src/api/RushProjectConfiguration.ts +++ b/libraries/rush-lib/src/api/RushProjectConfiguration.ts @@ -76,6 +76,17 @@ export interface IOperationSettings { * you list them here. */ dependsOnEnvVars?: string[]; + + /** + * An optional list of glob (minimatch) patterns pointing to files that can affect this operation. + * The hash values of the contents of these files will become part of the final hash when reading + * and writing the build cache. + * + * Note: if a particular file will be matched by patterns provided by both `incrementalBuildIgnoredGlobs` and + * `dependsOnAdditionalFiles` options - `dependsOnAdditionalFiles` will win and the file will be included + * calculating final hash value when reading and writing the build cache + */ + dependsOnAdditionalFiles?: string[]; } interface IOldRushProjectJson { diff --git a/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts b/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts new file mode 100644 index 00000000000..397bbba9535 --- /dev/null +++ b/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { Import } from '@rushstack/node-core-library'; +import crypto from 'crypto'; +import fs from 'fs'; +import path from 'path'; + +import type { IOptions } from 'glob'; + +const glob: typeof import('glob') = Import.lazy('glob', require); + +const globAsync = (pattern: string, options: IOptions = {}): Promise => { + return new Promise((resolve, reject) => { + glob(pattern, options, (err, matches) => { + if (err) { + reject(err); + return; + } + resolve(matches); + }); + }); +}; + +export class AdditionalFilesHasher { + public static async getFileHashedFilesMap( + globPatterns: string[], + cwd: string + ): Promise> { + const filePaths: Set = await this._expandGlobPatterns(globPatterns, cwd); + + return await this._calculateFileHashes(filePaths, cwd); + } + + private static async _expandGlobPatterns(globPatterns: string[], cwd: string): Promise> { + const allMatches: Set = new Set(); + for (const pattern of globPatterns) { + const matches: string[] = await globAsync(pattern, { + cwd, + nodir: true, + // We want to keep path's type unchanged, + // i.e. if the pattern was a relative path, then matched paths should also be relative paths + // if the pattern was an absolute path, then matched paths should also be absolute paths + // + // We are doing this because these paths are going to be used to calculate a hash for the build cache and some users + // might choose to depend on global files (e.g. `/etc/os-release`) and some might choose to depend on local files + // (e.g. `../path/to/workspace/file`) + // + // In both cases we want that path to the resource would be the same on all machines, + // regardless of what is the current working directory. + // + // That being said, we want to keep `realpath` and `absolute` options here as false: + realpath: false, + absolute: false + }); + + matches.forEach((match) => allMatches.add(match)); + } + + if (allMatches.size === 0) { + throw new Error( + `Couldn't find any files matching provided glob patterns: ["${globPatterns.join('", "')}"].` + ); + } + + return allMatches; + } + + private static async _calculateFileHashes( + filePaths: Set, + cwd: string + ): Promise> { + const fileHashes: Map = new Map(); + + for (const filepath of filePaths.values()) { + const fullPath: string = path.isAbsolute(filepath) ? filepath : path.join(cwd, filepath); + const content: string = await fs.promises.readFile(fullPath, 'utf-8'); + + const hashValue: string = crypto.createHash('sha1').update(content).digest('hex'); + + fileHashes.set(filepath, hashValue); + } + + return fileHashes; + } +} diff --git a/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts b/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts index 147b5609d5d..aef6e17f198 100644 --- a/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts +++ b/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts @@ -29,6 +29,7 @@ import { OperationError } from './OperationError'; import { IOperationRunner, IOperationRunnerContext } from './IOperationRunner'; import { ProjectLogWritable } from './ProjectLogWritable'; import { ProjectBuildCache } from '../buildCache/ProjectBuildCache'; +import { AdditionalFilesHasher } from '../buildCache/AdditionalFilesHasher'; import { IOperationSettings, RushProjectConfiguration } from '../../api/RushProjectConfiguration'; import { CollatedTerminalProvider } from '../../utilities/CollatedTerminalProvider'; import { RushConstants } from '../RushConstants'; @@ -450,6 +451,23 @@ export class ShellOperationRunner implements IOperationRunner { additionalContext['$' + varName] = process.env[varName] || ''; } } + if (operationSettings.dependsOnAdditionalFiles) { + const additionalFiles: Map = + await AdditionalFilesHasher.getFileHashedFilesMap( + operationSettings.dependsOnAdditionalFiles, + this._rushProject.projectFolder + ); + + terminal.writeDebugLine( + `Including additional files to calculate build cache hash:\n ${Array.from( + additionalFiles.keys() + ).join('\n ')} ` + ); + + for (const [filePath, fileHash] of additionalFiles) { + additionalContext['file://' + filePath] = fileHash; + } + } this._projectBuildCache = await ProjectBuildCache.tryGetProjectBuildCache({ projectConfiguration, projectOutputFolderNames, diff --git a/libraries/rush-lib/src/schemas/rush-project.schema.json b/libraries/rush-lib/src/schemas/rush-project.schema.json index 6b163cfd04f..d309a568e45 100644 --- a/libraries/rush-lib/src/schemas/rush-project.schema.json +++ b/libraries/rush-lib/src/schemas/rush-project.schema.json @@ -60,6 +60,15 @@ "uniqueItems": true }, + "dependsOnAdditionalFiles": { + "type": "array", + "description": "Specify a list of glob (minimatch) paths (absolute or relative) pointing to files (within or outside the .git repository) that affect the output of this operation. If provided, the hash values of these files will become part of the final hash when reading and writing from cache.", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "disableBuildCacheForOperation": { "description": "Disable caching for this operation. The operation will never be restored from cache. This may be useful if this operation affects state outside of its folder.", "type": "boolean" From 0efe029a6409a566daab2488f87146085d587532 Mon Sep 17 00:00:00 2001 From: Lukas <4083977+lukaskl@users.noreply.github.com> Date: Wed, 7 Dec 2022 23:12:27 +0700 Subject: [PATCH 011/399] rush change --- .../lukaskl-additional-files_2022-12-07-16-12.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@microsoft/rush/lukaskl-additional-files_2022-12-07-16-12.json diff --git a/common/changes/@microsoft/rush/lukaskl-additional-files_2022-12-07-16-12.json b/common/changes/@microsoft/rush/lukaskl-additional-files_2022-12-07-16-12.json new file mode 100644 index 00000000000..4b22bf27a29 --- /dev/null +++ b/common/changes/@microsoft/rush/lukaskl-additional-files_2022-12-07-16-12.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Introduce \"dependsOnAdditionalFiles\" configuration option to operations in rush-project.json. This option allows to pass glob (minimatch) patterns pointing to files outside of .git repository. If provided, the hash values of these files will become part of the final hash when reading and writing from cache.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} From 4f9fa41793daa125dcd48d290387fff659ae2bff Mon Sep 17 00:00:00 2001 From: Lukas <4083977+lukaskl@users.noreply.github.com> Date: Thu, 8 Dec 2022 17:31:03 +0700 Subject: [PATCH 012/399] Code review: use node-core-library Use helper class provided by @rushstack/node-core-library instead of plain 'fs' package or manually converting callback to promise. --- .../logic/buildCache/AdditionalFilesHasher.ts | 75 +++++++++---------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts b/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts index 397bbba9535..f0bdf2412e6 100644 --- a/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts +++ b/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts @@ -1,8 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { Import } from '@rushstack/node-core-library'; +import { Async, FileSystem, Import, LegacyAdapters } from '@rushstack/node-core-library'; import crypto from 'crypto'; -import fs from 'fs'; import path from 'path'; import type { IOptions } from 'glob'; @@ -10,15 +9,7 @@ import type { IOptions } from 'glob'; const glob: typeof import('glob') = Import.lazy('glob', require); const globAsync = (pattern: string, options: IOptions = {}): Promise => { - return new Promise((resolve, reject) => { - glob(pattern, options, (err, matches) => { - if (err) { - reject(err); - return; - } - resolve(matches); - }); - }); + return LegacyAdapters.convertCallbackToPromise(glob, pattern, options); }; export class AdditionalFilesHasher { @@ -33,28 +24,32 @@ export class AdditionalFilesHasher { private static async _expandGlobPatterns(globPatterns: string[], cwd: string): Promise> { const allMatches: Set = new Set(); - for (const pattern of globPatterns) { - const matches: string[] = await globAsync(pattern, { - cwd, - nodir: true, - // We want to keep path's type unchanged, - // i.e. if the pattern was a relative path, then matched paths should also be relative paths - // if the pattern was an absolute path, then matched paths should also be absolute paths - // - // We are doing this because these paths are going to be used to calculate a hash for the build cache and some users - // might choose to depend on global files (e.g. `/etc/os-release`) and some might choose to depend on local files - // (e.g. `../path/to/workspace/file`) - // - // In both cases we want that path to the resource would be the same on all machines, - // regardless of what is the current working directory. - // - // That being said, we want to keep `realpath` and `absolute` options here as false: - realpath: false, - absolute: false - }); - matches.forEach((match) => allMatches.add(match)); - } + await Async.forEachAsync( + globPatterns, + async (pattern) => { + const matches: string[] = await globAsync(pattern, { + cwd, + nodir: true, + // We want to keep path's type unchanged, + // i.e. if the pattern was a relative path, then matched paths should also be relative paths + // if the pattern was an absolute path, then matched paths should also be absolute paths + // + // We are doing this because these paths are going to be used to calculate a hash for the build cache and some users + // might choose to depend on global files (e.g. `/etc/os-release`) and some might choose to depend on local files + // (e.g. `../path/to/workspace/file`) + // + // In both cases we want that path to the resource would be the same on all machines, + // regardless of what is the current working directory. + // + // That being said, we want to keep `realpath` and `absolute` options here as false: + realpath: false, + absolute: false + }); + matches.forEach((match) => allMatches.add(match)); + }, + { concurrency: 10 } + ); if (allMatches.size === 0) { throw new Error( @@ -71,14 +66,18 @@ export class AdditionalFilesHasher { ): Promise> { const fileHashes: Map = new Map(); - for (const filepath of filePaths.values()) { - const fullPath: string = path.isAbsolute(filepath) ? filepath : path.join(cwd, filepath); - const content: string = await fs.promises.readFile(fullPath, 'utf-8'); + await Async.forEachAsync( + filePaths, + async (filepath) => { + const fullPath: string = path.isAbsolute(filepath) ? filepath : path.join(cwd, filepath); + const content: string = await FileSystem.readFileAsync(fullPath); - const hashValue: string = crypto.createHash('sha1').update(content).digest('hex'); + const hashValue: string = crypto.createHash('sha1').update(content).digest('hex'); - fileHashes.set(filepath, hashValue); - } + fileHashes.set(filepath, hashValue); + }, + { concurrency: 10 } + ); return fileHashes; } From db2ab150372283f52386d1aa2621573e110c29ae Mon Sep 17 00:00:00 2001 From: Rongqi Zhou Date: Mon, 12 Dec 2022 11:04:26 +0800 Subject: [PATCH 013/399] support storybook with static build --- .../src/StorybookPlugin.ts | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts index 0f7ec69359b..0df8e10b0fc 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts @@ -55,8 +55,8 @@ export interface IStorybookPluginOptions { storykitPackageName: string; /** - * The module entry point that Heft should use to launch the Storybook toolchain. Typically it - * is the path loaded the `start-storybook` shell script. + * The module entry point that Heft `start` command should use to launch the Storybook toolchain. + * Typically it is the path loaded the `start-storybook` shell script. * * @example * If you are using `@storybook/react`, then the startup path would be: @@ -64,6 +64,17 @@ export interface IStorybookPluginOptions { * `"startupModulePath": "@storybook/react/bin/index.js"` */ startupModulePath: string; + + /** + * The module entry point that Heft `build` command should use to launch the Storybook toolchain. + * Typically it is the path loaded the `build-storybook` shell script. + * + * @example + * If you are using `@storybook/react`, then the startup path would be: + * + * `"startupModulePath": "@storybook/react/bin/build.js"` + */ + staticBuildModulePath: string } /** @public */ @@ -72,8 +83,8 @@ export class StorybookPlugin implements IHeftPlugin { private _logger!: ScopedLogger; private _storykitPackageName!: string; - private _startupModulePath!: string; - private _resolvedStartupModulePath!: string; + private _modulePath!: string; + private _resolvedModulePath!: string; /** * Generate typings for Sass files before TypeScript compilation. @@ -108,7 +119,6 @@ export class StorybookPlugin implements IHeftPlugin { ` plugin option was not specified` ); } - this._startupModulePath = options.startupModulePath; const storybookParameters: IHeftFlagParameter = heftSession.commandLine.registerFlagParameter({ associatedActionNames: ['start'], @@ -117,14 +127,25 @@ export class StorybookPlugin implements IHeftPlugin { '(EXPERIMENTAL) Used by the "@rushstack/heft-storybook-plugin" package to launch Storybook.' }); + const storybookStaticBuildParameters: IHeftFlagParameter = heftSession.commandLine.registerFlagParameter({ + associatedActionNames: ['build'], + parameterLongName: '--storybook', + description: + '(EXPERIMENTAL) Used by the "@rushstack/heft-storybook-plugin" package to start static build Storybook.' + }); + heftSession.hooks.build.tap(PLUGIN_NAME, (build: IBuildStageContext) => { - if (!storybookParameters.actionAssociated || !storybookParameters.value) { + if ((!storybookParameters.actionAssociated || !storybookParameters.value) + && (!storybookStaticBuildParameters.actionAssociated || !storybookStaticBuildParameters.value)) + { this._logger.terminal.writeVerboseLine( 'The command line does not include "--storybook", so bundling will proceed without Storybook' ); return; } + this._modulePath = storybookStaticBuildParameters.actionAssociated ? options.staticBuildModulePath: options.startupModulePath; + this._logger.terminal.writeVerboseLine( 'The command line includes "--storybook", redirecting Webpack to Storybook' ); @@ -177,17 +198,17 @@ export class StorybookPlugin implements IHeftPlugin { ); } - this._logger.terminal.writeVerboseLine(`Resolving startupModulePath "${this._startupModulePath}"`); + this._logger.terminal.writeVerboseLine(`Resolving startupModulePath "${this._modulePath}"`); try { - this._resolvedStartupModulePath = Import.resolveModule({ - modulePath: this._startupModulePath, + this._resolvedModulePath = Import.resolveModule({ + modulePath: this._modulePath, baseFolderPath: storykitModuleFolder }); } catch (ex) { throw new Error(`The ${TASK_NAME} task cannot start: ` + (ex as Error).message); } this._logger.terminal.writeVerboseLine( - `Resolved startupModulePath is "${this._resolvedStartupModulePath}"` + `Resolved startupModulePath is "${this._resolvedModulePath}"` ); // Example: "/path/to/my-project/.storybook" @@ -220,7 +241,7 @@ export class StorybookPlugin implements IHeftPlugin { heftConfiguration.terminalProvider, { buildFolder: heftConfiguration.buildFolder, - resolvedStartupModulePath: this._resolvedStartupModulePath + resolvedStartupModulePath: this._resolvedModulePath }, // TODO: Extract SubprocessRunnerBase into a public API // eslint-disable-next-line From b99b3bca28101947a615d1625847e32d9bd02af3 Mon Sep 17 00:00:00 2001 From: Lukas <4083977+lukaskl@users.noreply.github.com> Date: Tue, 13 Dec 2022 16:36:32 +0700 Subject: [PATCH 014/399] Code review: use package-deps-hash to hash files --- .../logic/buildCache/AdditionalFilesHasher.ts | 39 ++++--------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts b/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts index f0bdf2412e6..b6df5463101 100644 --- a/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts +++ b/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts @@ -1,8 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { Async, FileSystem, Import, LegacyAdapters } from '@rushstack/node-core-library'; -import crypto from 'crypto'; -import path from 'path'; +import { Async, Import, LegacyAdapters } from '@rushstack/node-core-library'; +import { getGitHashForFiles } from '@rushstack/package-deps-hash'; import type { IOptions } from 'glob'; @@ -15,21 +14,21 @@ const globAsync = (pattern: string, options: IOptions = {}): Promise = export class AdditionalFilesHasher { public static async getFileHashedFilesMap( globPatterns: string[], - cwd: string + packagePath: string ): Promise> { - const filePaths: Set = await this._expandGlobPatterns(globPatterns, cwd); + const filePaths: string[] = await this._expandGlobPatterns(globPatterns, packagePath); - return await this._calculateFileHashes(filePaths, cwd); + return getGitHashForFiles(filePaths, packagePath); } - private static async _expandGlobPatterns(globPatterns: string[], cwd: string): Promise> { + private static async _expandGlobPatterns(globPatterns: string[], packagePath: string): Promise { const allMatches: Set = new Set(); await Async.forEachAsync( globPatterns, async (pattern) => { const matches: string[] = await globAsync(pattern, { - cwd, + cwd: packagePath, nodir: true, // We want to keep path's type unchanged, // i.e. if the pattern was a relative path, then matched paths should also be relative paths @@ -57,28 +56,6 @@ export class AdditionalFilesHasher { ); } - return allMatches; - } - - private static async _calculateFileHashes( - filePaths: Set, - cwd: string - ): Promise> { - const fileHashes: Map = new Map(); - - await Async.forEachAsync( - filePaths, - async (filepath) => { - const fullPath: string = path.isAbsolute(filepath) ? filepath : path.join(cwd, filepath); - const content: string = await FileSystem.readFileAsync(fullPath); - - const hashValue: string = crypto.createHash('sha1').update(content).digest('hex'); - - fileHashes.set(filepath, hashValue); - }, - { concurrency: 10 } - ); - - return fileHashes; + return Array.from(allMatches); } } From 07569cba9c5813ffc1f9d32301f1b7c488db8a22 Mon Sep 17 00:00:00 2001 From: Rongqi Zhou Date: Wed, 14 Dec 2022 17:38:01 +0800 Subject: [PATCH 015/399] combine webpack build with storybook static build --- .../reviews/api/heft-storybook-plugin.api.md | 1 + .../src/StorybookPlugin.ts | 23 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/common/reviews/api/heft-storybook-plugin.api.md b/common/reviews/api/heft-storybook-plugin.api.md index 0fe6373cd61..7061f33384d 100644 --- a/common/reviews/api/heft-storybook-plugin.api.md +++ b/common/reviews/api/heft-storybook-plugin.api.md @@ -13,6 +13,7 @@ export default _default; // @public export interface IStorybookPluginOptions { startupModulePath: string; + staticBuildModulePath: string; storykitPackageName: string; } diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts index 0df8e10b0fc..33c402ade3e 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts @@ -74,7 +74,7 @@ export interface IStorybookPluginOptions { * * `"startupModulePath": "@storybook/react/bin/build.js"` */ - staticBuildModulePath: string + staticBuildModulePath: string; } /** @public */ @@ -135,16 +135,19 @@ export class StorybookPlugin implements IHeftPlugin { }); heftSession.hooks.build.tap(PLUGIN_NAME, (build: IBuildStageContext) => { - if ((!storybookParameters.actionAssociated || !storybookParameters.value) - && (!storybookStaticBuildParameters.actionAssociated || !storybookStaticBuildParameters.value)) - { + if ( + (!storybookParameters.actionAssociated || !storybookParameters.value) && + (!storybookStaticBuildParameters.actionAssociated || !storybookStaticBuildParameters.value) + ) { this._logger.terminal.writeVerboseLine( 'The command line does not include "--storybook", so bundling will proceed without Storybook' ); return; } - this._modulePath = storybookStaticBuildParameters.actionAssociated ? options.staticBuildModulePath: options.startupModulePath; + this._modulePath = storybookStaticBuildParameters.actionAssociated + ? options.staticBuildModulePath + : options.startupModulePath; this._logger.terminal.writeVerboseLine( 'The command line includes "--storybook", redirecting Webpack to Storybook' @@ -160,8 +163,8 @@ export class StorybookPlugin implements IHeftPlugin { bundle.hooks.configureWebpack.tap( { name: PLUGIN_NAME, stage: Number.MAX_SAFE_INTEGER }, (webpackConfiguration: unknown) => { - // Discard Webpack's configuration to prevent Webpack from running - return null; + // Discard Webpack's configuration to prevent Webpack from running only when starting a storybook server + return storybookStaticBuildParameters.actionAssociated ? webpackConfiguration : null; } ); @@ -198,7 +201,7 @@ export class StorybookPlugin implements IHeftPlugin { ); } - this._logger.terminal.writeVerboseLine(`Resolving startupModulePath "${this._modulePath}"`); + this._logger.terminal.writeVerboseLine(`Resolving modulePath "${this._modulePath}"`); try { this._resolvedModulePath = Import.resolveModule({ modulePath: this._modulePath, @@ -207,9 +210,7 @@ export class StorybookPlugin implements IHeftPlugin { } catch (ex) { throw new Error(`The ${TASK_NAME} task cannot start: ` + (ex as Error).message); } - this._logger.terminal.writeVerboseLine( - `Resolved startupModulePath is "${this._resolvedModulePath}"` - ); + this._logger.terminal.writeVerboseLine(`Resolved modulePath is "${this._resolvedModulePath}"`); // Example: "/path/to/my-project/.storybook" const dotStorybookFolder: string = path.join(heftConfiguration.buildFolder, '.storybook'); From fb4293c4cb61df979c5da23b03de082d5b399d12 Mon Sep 17 00:00:00 2001 From: Rongqi Zhou Date: Wed, 14 Dec 2022 18:01:52 +0800 Subject: [PATCH 016/399] add change file --- ...u-SupportStorybookStaticBuild_2022-12-14-10-01.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@rushstack/heft-storybook-plugin/user-rongqizhou-SupportStorybookStaticBuild_2022-12-14-10-01.json diff --git a/common/changes/@rushstack/heft-storybook-plugin/user-rongqizhou-SupportStorybookStaticBuild_2022-12-14-10-01.json b/common/changes/@rushstack/heft-storybook-plugin/user-rongqizhou-SupportStorybookStaticBuild_2022-12-14-10-01.json new file mode 100644 index 00000000000..535c5591b4c --- /dev/null +++ b/common/changes/@rushstack/heft-storybook-plugin/user-rongqizhou-SupportStorybookStaticBuild_2022-12-14-10-01.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/heft-storybook-plugin", + "comment": "Add support for storybook static build", + "type": "minor" + } + ], + "packageName": "@rushstack/heft-storybook-plugin" +} \ No newline at end of file From a2b39c7f45abcf6bfcebbe1739c107cd3044bf1a Mon Sep 17 00:00:00 2001 From: Rongqi Zhou Date: Thu, 15 Dec 2022 17:24:47 +0800 Subject: [PATCH 017/399] make staticBuildModulePath optional --- .../config/heft.json | 3 +- .../package.json | 1 + .../reviews/api/heft-storybook-plugin.api.md | 4 +-- .../src/StorybookPlugin.ts | 30 +++++++++++++------ .../schemas/heft-storybook-plugin.schema.json | 25 ++++++++++++++++ 5 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json diff --git a/build-tests-samples/heft-storybook-react-tutorial/config/heft.json b/build-tests-samples/heft-storybook-react-tutorial/config/heft.json index 3127789d6d8..659d24ddb98 100644 --- a/build-tests-samples/heft-storybook-react-tutorial/config/heft.json +++ b/build-tests-samples/heft-storybook-react-tutorial/config/heft.json @@ -55,7 +55,8 @@ "plugin": "@rushstack/heft-storybook-plugin", "options": { "storykitPackageName": "heft-storybook-react-tutorial-storykit", - "startupModulePath": "@storybook/react/bin/index.js" + "startupModulePath": "@storybook/react/bin/index.js", + "staticBuildModulePath": "@storybook/react/bin/build.js" } } ] diff --git a/build-tests-samples/heft-storybook-react-tutorial/package.json b/build-tests-samples/heft-storybook-react-tutorial/package.json index bafe1e7b26e..d6d9f35fc4a 100644 --- a/build-tests-samples/heft-storybook-react-tutorial/package.json +++ b/build-tests-samples/heft-storybook-react-tutorial/package.json @@ -7,6 +7,7 @@ "build": "heft build --clean", "start": "heft start", "storybook": "heft start --storybook", + "build-storybook": "heft build --storybook", "_phase:build": "heft build --clean", "_phase:test": "heft test --no-build" }, diff --git a/common/reviews/api/heft-storybook-plugin.api.md b/common/reviews/api/heft-storybook-plugin.api.md index 7061f33384d..368eb5c255a 100644 --- a/common/reviews/api/heft-storybook-plugin.api.md +++ b/common/reviews/api/heft-storybook-plugin.api.md @@ -12,8 +12,8 @@ export default _default; // @public export interface IStorybookPluginOptions { - startupModulePath: string; - staticBuildModulePath: string; + startupModulePath?: string; + staticBuildModulePath?: string; storykitPackageName: string; } diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts index 33c402ade3e..b1c789b11b1 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts @@ -7,6 +7,7 @@ import { FileSystem, Import, IParsedPackageNameOrError, + JsonSchema, PackageName } from '@rushstack/node-core-library'; import type { @@ -23,6 +24,7 @@ import { StorybookRunner } from './StorybookRunner'; const PLUGIN_NAME: string = 'StorybookPlugin'; const TASK_NAME: string = 'heft-storybook'; +const PLUGIN_SCHEMA_PATH: string = path.resolve(__dirname, 'schemas', 'heft-storybook-plugin.schema.json'); /** * Options for `StorybookPlugin`. @@ -63,23 +65,24 @@ export interface IStorybookPluginOptions { * * `"startupModulePath": "@storybook/react/bin/index.js"` */ - startupModulePath: string; + startupModulePath?: string; /** * The module entry point that Heft `build` command should use to launch the Storybook toolchain. * Typically it is the path loaded the `build-storybook` shell script. * * @example - * If you are using `@storybook/react`, then the startup path would be: + * If you are using `@storybook/react`, then the static build path would be: * - * `"startupModulePath": "@storybook/react/bin/build.js"` + * `"staticBuildModulePath": "@storybook/react/bin/build.js"` */ - staticBuildModulePath: string; + staticBuildModulePath?: string; } /** @public */ export class StorybookPlugin implements IHeftPlugin { public readonly pluginName: string = PLUGIN_NAME; + public readonly optionsSchema: JsonSchema = JsonSchema.fromFile(PLUGIN_SCHEMA_PATH); private _logger!: ScopedLogger; private _storykitPackageName!: string; @@ -113,10 +116,10 @@ export class StorybookPlugin implements IHeftPlugin { } this._storykitPackageName = options.storykitPackageName; - if (!options.startupModulePath) { + if (!options.startupModulePath && !options.staticBuildModulePath) { throw new Error( - `The ${TASK_NAME} task cannot start because the "startupModulePath"` + - ` plugin option was not specified` + `The ${TASK_NAME} task cannot start because the "startupModulePath" and the "staticBuildModulePath"` + + ` plugin options were not specified` ); } @@ -145,9 +148,16 @@ export class StorybookPlugin implements IHeftPlugin { return; } - this._modulePath = storybookStaticBuildParameters.actionAssociated + const modulePath: string | undefined = storybookStaticBuildParameters.actionAssociated ? options.staticBuildModulePath : options.startupModulePath; + if (!modulePath) { + this._logger.terminal.writeVerboseLine( + 'No matching module path option specified in heft.json, so bundling will proceed without Storybook' + ); + return; + } + this._modulePath = modulePath; this._logger.terminal.writeVerboseLine( 'The command line includes "--storybook", redirecting Webpack to Storybook' @@ -164,7 +174,9 @@ export class StorybookPlugin implements IHeftPlugin { { name: PLUGIN_NAME, stage: Number.MAX_SAFE_INTEGER }, (webpackConfiguration: unknown) => { // Discard Webpack's configuration to prevent Webpack from running only when starting a storybook server - return storybookStaticBuildParameters.actionAssociated ? webpackConfiguration : null; + return storybookParameters.actionAssociated && storybookParameters.value + ? null + : webpackConfiguration; } ); diff --git a/heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json b/heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json new file mode 100644 index 00000000000..0ba65767897 --- /dev/null +++ b/heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Heft Storybook Plugin Options Configuration", + "description": "This schema describes the \"options\" field that can be specified in heft.json when loading \"@rushstack/heft-storybook-plugin\".", + "type": "object", + "additionalProperties": false, + + "properties": { + "storykitPackageName": { + "title": "Specifies an NPM package that will provide the Storybook dependencies for the project.", + "description": "Storybook's conventional approach is for your app project to have direct dependencies\non NPM packages such as `@storybook/react` and `@storybook/addon-essentials`. These packages have\nheavyweight dependencies such as Babel, Webpack, and the associated loaders and plugins needed to\nbuild the Storybook app (which is bundled completely independently from Heft). Naively adding these\ndependencies to your app's package.json muddies the waters of two radically different toolchains,\nand is likely to lead to dependency conflicts, for example if Heft installs Webpack 5 but\n`@storybook/react` installs Webpack 4. To solve this problem, `heft-storybook-plugin` introduces the concept of a separate\n\"storykit package\". All of your Storybook NPM packages are moved to be dependencies of the\nstorykit. Storybook's browser API unfortunately isn't separated into dedicated NPM packages,\nbut instead is exported by the Node.js toolchain packages such as `@storybook/react`. For\nan even cleaner separation the storykit package can simply reexport such APIs.", + "type": "string" + }, + "startupModulePath": { + "title": "The module entry point that Heft `start` command should use to launch the Storybook toolchain.", + "description": "Typically it is the path loaded the `start-storybook` shell script. For example, If you are using `@storybook/react`, then the startup path would be: `\"startupModulePath\": \"@storybook/react/bin/index.js\"`", + "type": "string" + }, + "staticBuildModulePath": { + "title": "The module entry point that Heft `build` command should use to launch the Storybook toolchain.", + "description": "Typically it is the path loaded the `build-storybook` shell script. For example, If you are using `@storybook/react`, then the static build path would be: `\"staticBuildModulePath\": \"@storybook/react/bin/build.js\"`", + "type": "string" + } + } +} From c77ea3b365c4f136134f8852494f10ccafcc6eb3 Mon Sep 17 00:00:00 2001 From: RongqiZ <81340450+RongqiZ@users.noreply.github.com> Date: Fri, 16 Dec 2022 09:34:07 +0800 Subject: [PATCH 018/399] Update heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts Co-authored-by: Ian Clanton-Thuon --- heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts index b1c789b11b1..736402fa8ca 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts @@ -24,7 +24,7 @@ import { StorybookRunner } from './StorybookRunner'; const PLUGIN_NAME: string = 'StorybookPlugin'; const TASK_NAME: string = 'heft-storybook'; -const PLUGIN_SCHEMA_PATH: string = path.resolve(__dirname, 'schemas', 'heft-storybook-plugin.schema.json'); +const PLUGIN_SCHEMA_PATH: string = `${__dirname}/schemas/heft-storybook-plugin.schema.json`; /** * Options for `StorybookPlugin`. From 4a86a5a9f66e4924aec5c95518908bef589f6d68 Mon Sep 17 00:00:00 2001 From: Rongqi Zhou Date: Fri, 16 Dec 2022 09:44:11 +0800 Subject: [PATCH 019/399] remove unuse \n --- .../src/schemas/heft-storybook-plugin.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json b/heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json index 0ba65767897..bc88be031d7 100644 --- a/heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json +++ b/heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json @@ -8,7 +8,7 @@ "properties": { "storykitPackageName": { "title": "Specifies an NPM package that will provide the Storybook dependencies for the project.", - "description": "Storybook's conventional approach is for your app project to have direct dependencies\non NPM packages such as `@storybook/react` and `@storybook/addon-essentials`. These packages have\nheavyweight dependencies such as Babel, Webpack, and the associated loaders and plugins needed to\nbuild the Storybook app (which is bundled completely independently from Heft). Naively adding these\ndependencies to your app's package.json muddies the waters of two radically different toolchains,\nand is likely to lead to dependency conflicts, for example if Heft installs Webpack 5 but\n`@storybook/react` installs Webpack 4. To solve this problem, `heft-storybook-plugin` introduces the concept of a separate\n\"storykit package\". All of your Storybook NPM packages are moved to be dependencies of the\nstorykit. Storybook's browser API unfortunately isn't separated into dedicated NPM packages,\nbut instead is exported by the Node.js toolchain packages such as `@storybook/react`. For\nan even cleaner separation the storykit package can simply reexport such APIs.", + "description": "Storybook's conventional approach is for your app project to have direct dependencies on NPM packages such as `@storybook/react` and `@storybook/addon-essentials`. These packages have heavyweight dependencies such as Babel, Webpack, and the associated loaders and plugins needed to build the Storybook app (which is bundled completely independently from Heft). Naively adding these dependencies to your app's package.json muddies the waters of two radically different toolchains, and is likely to lead to dependency conflicts, for example if Heft installs Webpack 5 but `@storybook/react` installs Webpack 4. To solve this problem, `heft-storybook-plugin` introduces the concept of a separate \"storykit package\". All of your Storybook NPM packages are moved to be dependencies of the storykit. Storybook's browser API unfortunately isn't separated into dedicated NPM packages, but instead is exported by the Node.js toolchain packages such as `@storybook/react`. For an even cleaner separation the storykit package can simply reexport such APIs.", "type": "string" }, "startupModulePath": { From 50d77b40db1dcc1806aa31689fa76b80338ac642 Mon Sep 17 00:00:00 2001 From: Rongqi Zhou Date: Mon, 19 Dec 2022 11:26:15 +0800 Subject: [PATCH 020/399] deduplicate parameters --- .../src/StorybookPlugin.ts | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts index 736402fa8ca..91da7b7819c 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts @@ -124,33 +124,23 @@ export class StorybookPlugin implements IHeftPlugin { } const storybookParameters: IHeftFlagParameter = heftSession.commandLine.registerFlagParameter({ - associatedActionNames: ['start'], + associatedActionNames: ['start', 'build'], parameterLongName: '--storybook', description: '(EXPERIMENTAL) Used by the "@rushstack/heft-storybook-plugin" package to launch Storybook.' }); - const storybookStaticBuildParameters: IHeftFlagParameter = heftSession.commandLine.registerFlagParameter({ - associatedActionNames: ['build'], - parameterLongName: '--storybook', - description: - '(EXPERIMENTAL) Used by the "@rushstack/heft-storybook-plugin" package to start static build Storybook.' - }); - heftSession.hooks.build.tap(PLUGIN_NAME, (build: IBuildStageContext) => { - if ( - (!storybookParameters.actionAssociated || !storybookParameters.value) && - (!storybookStaticBuildParameters.actionAssociated || !storybookStaticBuildParameters.value) - ) { + if (!storybookParameters.actionAssociated || !storybookParameters.value) { this._logger.terminal.writeVerboseLine( 'The command line does not include "--storybook", so bundling will proceed without Storybook' ); return; } - const modulePath: string | undefined = storybookStaticBuildParameters.actionAssociated - ? options.staticBuildModulePath - : options.startupModulePath; + const modulePath: string | undefined = build.properties.serveMode + ? options.startupModulePath + : options.staticBuildModulePath; if (!modulePath) { this._logger.terminal.writeVerboseLine( 'No matching module path option specified in heft.json, so bundling will proceed without Storybook' From 2dde066605a24267a95b779689c0aef63432f5af Mon Sep 17 00:00:00 2001 From: Rongqi Zhou Date: Mon, 19 Dec 2022 15:01:56 +0800 Subject: [PATCH 021/399] discard webpack config when in serve mode --- heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts | 8 +++----- .../src/schemas/heft-storybook-plugin.schema.json | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts index 91da7b7819c..398735d866b 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts @@ -57,7 +57,7 @@ export interface IStorybookPluginOptions { storykitPackageName: string; /** - * The module entry point that Heft `start` command should use to launch the Storybook toolchain. + * The module entry point that Heft serve mode should use to launch the Storybook toolchain. * Typically it is the path loaded the `start-storybook` shell script. * * @example @@ -68,7 +68,7 @@ export interface IStorybookPluginOptions { startupModulePath?: string; /** - * The module entry point that Heft `build` command should use to launch the Storybook toolchain. + * The module entry point that Heft non-serve mode should use to launch the Storybook toolchain. * Typically it is the path loaded the `build-storybook` shell script. * * @example @@ -164,9 +164,7 @@ export class StorybookPlugin implements IHeftPlugin { { name: PLUGIN_NAME, stage: Number.MAX_SAFE_INTEGER }, (webpackConfiguration: unknown) => { // Discard Webpack's configuration to prevent Webpack from running only when starting a storybook server - return storybookParameters.actionAssociated && storybookParameters.value - ? null - : webpackConfiguration; + return build.properties.serveMode ? null : webpackConfiguration; } ); diff --git a/heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json b/heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json index bc88be031d7..b56d6588e1f 100644 --- a/heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json +++ b/heft-plugins/heft-storybook-plugin/src/schemas/heft-storybook-plugin.schema.json @@ -12,12 +12,12 @@ "type": "string" }, "startupModulePath": { - "title": "The module entry point that Heft `start` command should use to launch the Storybook toolchain.", + "title": "The module entry point that Heft serve mode should use to launch the Storybook toolchain.", "description": "Typically it is the path loaded the `start-storybook` shell script. For example, If you are using `@storybook/react`, then the startup path would be: `\"startupModulePath\": \"@storybook/react/bin/index.js\"`", "type": "string" }, "staticBuildModulePath": { - "title": "The module entry point that Heft `build` command should use to launch the Storybook toolchain.", + "title": "The module entry point that Heft non-serve mode should use to launch the Storybook toolchain.", "description": "Typically it is the path loaded the `build-storybook` shell script. For example, If you are using `@storybook/react`, then the static build path would be: `\"staticBuildModulePath\": \"@storybook/react/bin/build.js\"`", "type": "string" } From f0183fd67e660b0fe2353f421ddc70c7123f9f43 Mon Sep 17 00:00:00 2001 From: sherlockfeng Date: Wed, 21 Dec 2022 15:26:05 +0800 Subject: [PATCH 022/399] feat: Execute a shell command in scope of a project --- ...d-in-scope-of-a-project_2022-12-21-07-25.json | 10 ++++++++++ common/reviews/api/rush-lib.api.md | 1 + .../rush-lib/src/api/CommandLineConfiguration.ts | 8 +++++++- libraries/rush-lib/src/api/CommandLineJson.ts | 1 + .../operations/ShellOperationRunnerPlugin.ts | 16 +++++++++++----- 5 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 common/changes/@microsoft/rush/feat-execute-a-shell-command-in-scope-of-a-project_2022-12-21-07-25.json diff --git a/common/changes/@microsoft/rush/feat-execute-a-shell-command-in-scope-of-a-project_2022-12-21-07-25.json b/common/changes/@microsoft/rush/feat-execute-a-shell-command-in-scope-of-a-project_2022-12-21-07-25.json new file mode 100644 index 00000000000..27071dc4680 --- /dev/null +++ b/common/changes/@microsoft/rush/feat-execute-a-shell-command-in-scope-of-a-project_2022-12-21-07-25.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Execute a shell command in scope of a project", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/common/reviews/api/rush-lib.api.md b/common/reviews/api/rush-lib.api.md index 2a0de769dcd..72488a28692 100644 --- a/common/reviews/api/rush-lib.api.md +++ b/common/reviews/api/rush-lib.api.md @@ -449,6 +449,7 @@ export interface IPhase { isSynthetic: boolean; logFilenameIdentifier: string; name: string; + shellCommand?: string; } // @beta diff --git a/libraries/rush-lib/src/api/CommandLineConfiguration.ts b/libraries/rush-lib/src/api/CommandLineConfiguration.ts index e05587797cd..5509d35c098 100644 --- a/libraries/rush-lib/src/api/CommandLineConfiguration.ts +++ b/libraries/rush-lib/src/api/CommandLineConfiguration.ts @@ -70,6 +70,11 @@ export interface IPhase { * By default, Rush returns a nonzero exit code if errors or warnings occur during a command. If this option is set to \"true\", Rush will return a zero exit code if warnings occur during the execution of this phase. */ allowWarningsOnSuccess: boolean; + + /** + * If the \"shellCommand\" field is set in a bulk type command, rush will use this command instead of \"scripts\" entry matching that the phase name + */ + shellCommand?: string; } export interface ICommandWithParameters { @@ -658,7 +663,8 @@ export class CommandLineConfiguration { upstream: new Set() }, ignoreMissingScript: !!command.ignoreMissingScript, - allowWarningsOnSuccess: !!command.allowWarningsInSuccessfulBuild + allowWarningsOnSuccess: !!command.allowWarningsInSuccessfulBuild, + shellCommand: command.shellCommand }; if (!command.ignoreDependencyOrder) { diff --git a/libraries/rush-lib/src/api/CommandLineJson.ts b/libraries/rush-lib/src/api/CommandLineJson.ts index 3d140c9473f..c9abe5468b2 100644 --- a/libraries/rush-lib/src/api/CommandLineJson.ts +++ b/libraries/rush-lib/src/api/CommandLineJson.ts @@ -14,6 +14,7 @@ export interface IBaseCommandJson { description?: string; safeForSimultaneousRushProcesses: boolean; autoinstallerName?: string; + shellCommand?: string; } /** diff --git a/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts b/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts index 31129619a28..e3d0db662a8 100644 --- a/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts +++ b/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts @@ -61,7 +61,12 @@ function createShellOperations( // to specify a runner type requested in rush-project.json const customParameterValues: ReadonlyArray = getCustomParameterValuesForPhase(phase); - const commandToRun: string | undefined = getScriptToRun(project, phase.name, customParameterValues); + const commandToRun: string | undefined = getScriptToRun( + project, + phase.name, + customParameterValues, + phase.shellCommand + ); if (commandToRun === undefined && !phase.ignoreMissingScript) { throw new Error( @@ -71,10 +76,10 @@ function createShellOperations( const displayName: string = getDisplayName(phase, project); - if (commandToRun) { + if (commandToRun || phase.shellCommand) { operation.runner = new ShellOperationRunner({ buildCacheConfiguration, - commandToRun: commandToRun || '', + commandToRun: phase.shellCommand || commandToRun || '', displayName, isIncrementalBuildAllowed, phase, @@ -100,11 +105,12 @@ function createShellOperations( function getScriptToRun( rushProject: RushConfigurationProject, commandToRun: string, - customParameterValues: ReadonlyArray + customParameterValues: ReadonlyArray, + shellCommand?: string ): string | undefined { const { scripts } = rushProject.packageJson; - const rawCommand: string | undefined | null = scripts?.[commandToRun]; + const rawCommand: string | undefined | null = scripts?.[commandToRun] ?? shellCommand; if (rawCommand === undefined || rawCommand === null) { return undefined; From 58d13a5f80c1e5f94e5453737267154054a5ce00 Mon Sep 17 00:00:00 2001 From: sherlockfeng Date: Thu, 22 Dec 2022 15:22:53 +0800 Subject: [PATCH 023/399] feat: add test and fix conversation issue --- .../api/test/CommandLineConfiguration.test.ts | 34 +++++- .../operations/ShellOperationRunnerPlugin.ts | 6 +- .../test/ShellOperationRunnerPlugin.test.ts | 110 ++++++++++++++++++ .../ShellOperationRunnerPlugin.test.ts.snap | 27 +++++ .../a/package.json | 9 ++ .../b/package.json | 10 ++ .../common/config/rush/command-line.json | 21 ++++ .../rush.json | 17 +++ .../a/package.json | 9 ++ .../b/package.json | 9 ++ .../common/config/rush/command-line.json | 21 ++++ .../customShellCommandinBulkRepo/rush.json | 17 +++ .../src/schemas/command-line.schema.json | 3 +- 13 files changed, 288 insertions(+), 5 deletions(-) create mode 100644 libraries/rush-lib/src/logic/operations/test/ShellOperationRunnerPlugin.test.ts create mode 100644 libraries/rush-lib/src/logic/operations/test/__snapshots__/ShellOperationRunnerPlugin.test.ts.snap create mode 100644 libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/a/package.json create mode 100644 libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/b/package.json create mode 100644 libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/common/config/rush/command-line.json create mode 100644 libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/rush.json create mode 100644 libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/a/package.json create mode 100644 libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/b/package.json create mode 100644 libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/common/config/rush/command-line.json create mode 100644 libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/rush.json diff --git a/libraries/rush-lib/src/api/test/CommandLineConfiguration.test.ts b/libraries/rush-lib/src/api/test/CommandLineConfiguration.test.ts index ea069525820..7bb8fe2d795 100644 --- a/libraries/rush-lib/src/api/test/CommandLineConfiguration.test.ts +++ b/libraries/rush-lib/src/api/test/CommandLineConfiguration.test.ts @@ -2,7 +2,13 @@ // See LICENSE in the project root for license information. import { RushConstants } from '../../logic/RushConstants'; -import { Command, CommandLineConfiguration, IParameterJson, IPhase } from '../CommandLineConfiguration'; +import { + IPhasedCommandConfig, + CommandLineConfiguration, + IParameterJson, + IPhase, + Command +} from '../CommandLineConfiguration'; describe(CommandLineConfiguration.name, () => { it('Forbids a misnamed phase', () => { @@ -262,4 +268,30 @@ describe(CommandLineConfiguration.name, () => { expect(phaseParametersArray).toHaveLength(0); }); }); + + describe('shellCommand in bulk command', () => { + it('get "custom-shell-command-echo" command', () => { + const commandLineConfiguration: CommandLineConfiguration = new CommandLineConfiguration({ + commands: [ + { + commandKind: 'bulk', + name: 'custom-shell-command-echo', + summary: 'custom define bulk shellCommand echo', + enableParallelism: true, + safeForSimultaneousRushProcesses: false, + shellCommand: 'echo' + } + ] + }); + + const command: IPhasedCommandConfig | undefined = commandLineConfiguration.commands.get( + 'custom-shell-command-echo' + ) as IPhasedCommandConfig; + expect(command).toBeDefined(); + expect(command?.phases).toBeDefined(); + const phase = [...command?.phases][0]; + expect(phase.name).toEqual('custom-shell-command-echo'); + expect(phase.shellCommand).toEqual('echo'); + }); + }); }); diff --git a/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts b/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts index e3d0db662a8..f59a1d51b6e 100644 --- a/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts +++ b/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts @@ -76,10 +76,10 @@ function createShellOperations( const displayName: string = getDisplayName(phase, project); - if (commandToRun || phase.shellCommand) { + if (commandToRun) { operation.runner = new ShellOperationRunner({ buildCacheConfiguration, - commandToRun: phase.shellCommand || commandToRun || '', + commandToRun: commandToRun || '', displayName, isIncrementalBuildAllowed, phase, @@ -110,7 +110,7 @@ function getScriptToRun( ): string | undefined { const { scripts } = rushProject.packageJson; - const rawCommand: string | undefined | null = scripts?.[commandToRun] ?? shellCommand; + const rawCommand: string | undefined | null = shellCommand ?? scripts?.[commandToRun]; if (rawCommand === undefined || rawCommand === null) { return undefined; diff --git a/libraries/rush-lib/src/logic/operations/test/ShellOperationRunnerPlugin.test.ts b/libraries/rush-lib/src/logic/operations/test/ShellOperationRunnerPlugin.test.ts new file mode 100644 index 00000000000..66f95ffec73 --- /dev/null +++ b/libraries/rush-lib/src/logic/operations/test/ShellOperationRunnerPlugin.test.ts @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import path from 'path'; +import { JsonFile } from '@rushstack/node-core-library'; + +import { RushConfiguration } from '../../../api/RushConfiguration'; +import { CommandLineConfiguration, IPhasedCommandConfig } from '../../../api/CommandLineConfiguration'; +import { Operation } from '../Operation'; +import { ICommandLineJson } from '../../../api/CommandLineJson'; +import { PhasedOperationPlugin } from '../PhasedOperationPlugin'; +import { ShellOperationRunnerPlugin } from '../ShellOperationRunnerPlugin'; +import { ICreateOperationsContext, PhasedCommandHooks } from '../../../pluginFramework/PhasedCommandHooks'; +import { ShellOperationRunner } from '../ShellOperationRunner'; + +interface ISerializedOperation { + name: string; + commandToRun: string; +} + +function serializeOperation(operation: Operation): ISerializedOperation { + return { + name: operation.name!, + commandToRun: (operation.runner as ShellOperationRunner)['_commandToRun'] + }; +} + +describe(ShellOperationRunnerPlugin.name, () => { + it('shellCommand "echo custom shellCommand" should be set to commandToRun', async () => { + const rushJsonFile: string = path.resolve(__dirname, `../../test/customShellCommandinBulkRepo/rush.json`); + const commandLineJsonFile: string = path.resolve( + __dirname, + `../../test/customShellCommandinBulkRepo/common/config/rush/command-line.json` + ); + + const rushConfiguration = RushConfiguration.loadFromConfigurationFile(rushJsonFile); + const commandLineJson: ICommandLineJson = JsonFile.load(commandLineJsonFile); + + const commandLineConfiguration = new CommandLineConfiguration(commandLineJson); + + const echoCommand: IPhasedCommandConfig = commandLineConfiguration.commands.get( + 'echo' + )! as IPhasedCommandConfig; + + const fakeCreateOperationsContext: Pick< + ICreateOperationsContext, + 'phaseSelection' | 'projectSelection' | 'projectsInUnknownState' + > = { + phaseSelection: echoCommand.phases, + projectSelection: new Set(rushConfiguration.projects), + projectsInUnknownState: new Set(rushConfiguration.projects) + }; + + const hooks: PhasedCommandHooks = new PhasedCommandHooks(); + + // Generates the default operation graph + new PhasedOperationPlugin().apply(hooks); + // Applies the Shell Operation Runner to selected operations + new ShellOperationRunnerPlugin().apply(hooks); + + const operations: Set = await hooks.createOperations.promise( + new Set(), + fakeCreateOperationsContext as ICreateOperationsContext + ); + // All projects + expect(Array.from(operations, serializeOperation)).toMatchSnapshot(); + }); + + it('shellCommand priority should be higher than script name', async () => { + const rushJsonFile: string = path.resolve( + __dirname, + `../../test/customShellCommandinBulkOverrideScriptsRepo/rush.json` + ); + const commandLineJsonFile: string = path.resolve( + __dirname, + `../../test/customShellCommandinBulkOverrideScriptsRepo/common/config/rush/command-line.json` + ); + + const rushConfiguration = RushConfiguration.loadFromConfigurationFile(rushJsonFile); + const commandLineJson: ICommandLineJson = JsonFile.load(commandLineJsonFile); + + const commandLineConfiguration = new CommandLineConfiguration(commandLineJson); + const echoCommand: IPhasedCommandConfig = commandLineConfiguration.commands.get( + 'echo' + )! as IPhasedCommandConfig; + + const fakeCreateOperationsContext: Pick< + ICreateOperationsContext, + 'phaseSelection' | 'projectSelection' | 'projectsInUnknownState' + > = { + phaseSelection: echoCommand.phases, + projectSelection: new Set(rushConfiguration.projects), + projectsInUnknownState: new Set(rushConfiguration.projects) + }; + + const hooks: PhasedCommandHooks = new PhasedCommandHooks(); + + // Generates the default operation graph + new PhasedOperationPlugin().apply(hooks); + // Applies the Shell Operation Runner to selected operations + new ShellOperationRunnerPlugin().apply(hooks); + + const operations: Set = await hooks.createOperations.promise( + new Set(), + fakeCreateOperationsContext as ICreateOperationsContext + ); + // All projects + expect(Array.from(operations, serializeOperation)).toMatchSnapshot(); + }); +}); diff --git a/libraries/rush-lib/src/logic/operations/test/__snapshots__/ShellOperationRunnerPlugin.test.ts.snap b/libraries/rush-lib/src/logic/operations/test/__snapshots__/ShellOperationRunnerPlugin.test.ts.snap new file mode 100644 index 00000000000..f5990af4d43 --- /dev/null +++ b/libraries/rush-lib/src/logic/operations/test/__snapshots__/ShellOperationRunnerPlugin.test.ts.snap @@ -0,0 +1,27 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ShellOperationRunnerPlugin shellCommand "echo custom shellCommand" should be set to commandToRun 1`] = ` +Array [ + Object { + "commandToRun": "echo custom shellCommand ", + "name": "a", + }, + Object { + "commandToRun": "echo custom shellCommand ", + "name": "b", + }, +] +`; + +exports[`ShellOperationRunnerPlugin shellCommand priority should be higher than script name 1`] = ` +Array [ + Object { + "commandToRun": "echo custom shellCommand ", + "name": "a", + }, + Object { + "commandToRun": "echo custom shellCommand ", + "name": "b", + }, +] +`; diff --git a/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/a/package.json b/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/a/package.json new file mode 100644 index 00000000000..f00575e3099 --- /dev/null +++ b/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/a/package.json @@ -0,0 +1,9 @@ +{ + "name": "a", + "version": "1.0.0", + "description": "Test package a", + "scripts": { + "build": "fake_build_task_but_works_with_mock", + "rebuild": "fake_REbuild_task_but_works_with_mock" + } +} diff --git a/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/b/package.json b/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/b/package.json new file mode 100644 index 00000000000..8b915354e7c --- /dev/null +++ b/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/b/package.json @@ -0,0 +1,10 @@ +{ + "name": "b", + "version": "1.0.0", + "description": "Test package b", + "scripts": { + "build": "fake_build_task_but_works_with_mock", + "rebuild": "fake_REbuild_task_but_works_with_mock", + "echo": "fake_echo_task_but_works_with_mock" + } +} diff --git a/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/common/config/rush/command-line.json b/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/common/config/rush/command-line.json new file mode 100644 index 00000000000..4070ff96146 --- /dev/null +++ b/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/common/config/rush/command-line.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json", + "commands": [ + { + "commandKind": "bulk", + "name": "echo", + "summary": "execute 'echo' command", + "description": "execute 'echo' command for selected project", + "enableParallelism": true, + "shellCommand": "echo custom shellCommand" + } + ], + "parameters": [ + { + "longName": "--flag-for-echo", + "description": "This flag should be usable for build and rebuild commands.", + "parameterKind": "flag", + "associatedCommands": ["echo"] + } + ] +} diff --git a/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/rush.json b/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/rush.json new file mode 100644 index 00000000000..f39da1606c4 --- /dev/null +++ b/libraries/rush-lib/src/logic/test/customShellCommandinBulkOverrideScriptsRepo/rush.json @@ -0,0 +1,17 @@ +{ + "npmVersion": "6.4.1", + "rushVersion": "5.5.2", + "projectFolderMinDepth": 1, + "projectFolderMaxDepth": 99, + + "projects": [ + { + "packageName": "a", + "projectFolder": "a" + }, + { + "packageName": "b", + "projectFolder": "b" + } + ] +} diff --git a/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/a/package.json b/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/a/package.json new file mode 100644 index 00000000000..f00575e3099 --- /dev/null +++ b/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/a/package.json @@ -0,0 +1,9 @@ +{ + "name": "a", + "version": "1.0.0", + "description": "Test package a", + "scripts": { + "build": "fake_build_task_but_works_with_mock", + "rebuild": "fake_REbuild_task_but_works_with_mock" + } +} diff --git a/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/b/package.json b/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/b/package.json new file mode 100644 index 00000000000..8f203bb691d --- /dev/null +++ b/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/b/package.json @@ -0,0 +1,9 @@ +{ + "name": "b", + "version": "1.0.0", + "description": "Test package b", + "scripts": { + "build": "fake_build_task_but_works_with_mock", + "rebuild": "fake_REbuild_task_but_works_with_mock" + } +} diff --git a/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/common/config/rush/command-line.json b/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/common/config/rush/command-line.json new file mode 100644 index 00000000000..4070ff96146 --- /dev/null +++ b/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/common/config/rush/command-line.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json", + "commands": [ + { + "commandKind": "bulk", + "name": "echo", + "summary": "execute 'echo' command", + "description": "execute 'echo' command for selected project", + "enableParallelism": true, + "shellCommand": "echo custom shellCommand" + } + ], + "parameters": [ + { + "longName": "--flag-for-echo", + "description": "This flag should be usable for build and rebuild commands.", + "parameterKind": "flag", + "associatedCommands": ["echo"] + } + ] +} diff --git a/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/rush.json b/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/rush.json new file mode 100644 index 00000000000..f39da1606c4 --- /dev/null +++ b/libraries/rush-lib/src/logic/test/customShellCommandinBulkRepo/rush.json @@ -0,0 +1,17 @@ +{ + "npmVersion": "6.4.1", + "rushVersion": "5.5.2", + "projectFolderMinDepth": 1, + "projectFolderMaxDepth": 99, + + "projects": [ + { + "packageName": "a", + "projectFolder": "a" + }, + { + "packageName": "b", + "projectFolder": "b" + } + ] +} diff --git a/libraries/rush-lib/src/schemas/command-line.schema.json b/libraries/rush-lib/src/schemas/command-line.schema.json index a1a27511adb..ba71a255eca 100644 --- a/libraries/rush-lib/src/schemas/command-line.schema.json +++ b/libraries/rush-lib/src/schemas/command-line.schema.json @@ -109,7 +109,8 @@ "incremental": { "$ref": "#/definitions/anything" }, "allowWarningsInSuccessfulBuild": { "$ref": "#/definitions/anything" }, "watchForChanges": { "$ref": "#/definitions/anything" }, - "disableBuildCache": { "$ref": "#/definitions/anything" } + "disableBuildCache": { "$ref": "#/definitions/anything" }, + "shellCommand": { "$ref": "#/definitions/anything" } } } ] From 4b70181937244dc92cea9497beea948e5a4cf921 Mon Sep 17 00:00:00 2001 From: Elliot Nelson Date: Mon, 2 Jan 2023 15:58:28 -0500 Subject: [PATCH 024/399] File doc tickets to the rushstack-websites repo --- .github/workflows/file-doc-tickets.yml | 86 ++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .github/workflows/file-doc-tickets.yml diff --git a/.github/workflows/file-doc-tickets.yml b/.github/workflows/file-doc-tickets.yml new file mode 100644 index 00000000000..c80ecb79382 --- /dev/null +++ b/.github/workflows/file-doc-tickets.yml @@ -0,0 +1,86 @@ +################################################################################ +# When pull requests are merged to the main branch, evaluate the pull request +# body and file a documentation ticket against the rushstack-websites repo +# with a corresponding documentation task. +# +# The pull request body must contain non-comment, non-whitespace text below +# the "Impacted documentation" header in the PR template to file a +# documentation ticket. +################################################################################ +name: File Doc Tickets + +on: + pull_request: + branches: + - main + types: + - closed + +jobs: + file-tickets: + name: File Tickets + if: ${{ github.event.pull_request.merged }} + runs-on: ubuntu-latest + steps: + - name: Use nodejs + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Parse PR body + run: | + cat <<-"EOF" > event.json + ${{ toJson(github.event) }} + EOF + + cat <<-"EOF" | node + const fs = require('fs'); + + const EVENT_FILE = 'event.json'; + const RESULT_FILE = 'issue.md'; + const DELIMITER = '## Impacted documentation'; + + const event = JSON.parse(fs.readFileSync(EVENT_FILE, 'utf8')); + const strippedBody = event.pull_request.body.replace(//g, ''); + const delimIndex = strippedBody.indexOf(DELIMITER); + + if (delimIndex < 0) { + console.log('No documentation tasks detected -- skipping doc ticket.'); + process.exit(0); + } + + const delimBody = strippedBody.substring(delimIndex + DELIMITER.length).trim(); + + if (delimBody.length === 0) { + console.log('No documentation tasks detected -- skipping doc ticket.'); + process.exit(0); + } + + const quotedBody = delimBody.split('\n').map(line => `> ${line}`).join('\n'); + fs.writeFileSync(RESULT_FILE, [ + '### Summary', + '', + 'Follow up on documentation tasks from ' + event.pull_request.html_url + '.', + '', + '### Details', + '', + 'This ticket was generated automatically. Suggested documentation updates:', + '', + quotedBody, + '' + ].join('\n'), 'utf8'); + + EOF + + if [ -f issue.md ]; then + echo "FILE_TICKET=1" >> $GITHUB_ENV + fi + - name: File ticket + if: ${{ env.FILE_TICKET == '1' }} + uses: peter-evans/create-issue-from-file@af31b99c72f9e91877aea8a2d96fd613beafac84 # @v4 (locked) + with: + repository: microsoft/rushstack-websites + token: '${{ secrets.RUSHSTACK_WEBSITES_TOKEN }}' + title: '[doc] ${{ github.event.pull_request.title }}' + content-filepath: ./issue.md + labels: | + automated From 39f63b0acb1d113074679c8582bea879e0d89636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20S=CC=8Ctekl?= Date: Thu, 5 Jan 2023 11:37:12 +0100 Subject: [PATCH 025/399] [rush] Create custom git hooks instead of copy --- .../stekycz-git-hooks-exec_2023-01-05-10-36.json | 10 ++++++++++ .../rush-lib/src/logic/base/BaseInstallManager.ts | 15 +++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 common/changes/@microsoft/rush/stekycz-git-hooks-exec_2023-01-05-10-36.json diff --git a/common/changes/@microsoft/rush/stekycz-git-hooks-exec_2023-01-05-10-36.json b/common/changes/@microsoft/rush/stekycz-git-hooks-exec_2023-01-05-10-36.json new file mode 100644 index 00000000000..11653445111 --- /dev/null +++ b/common/changes/@microsoft/rush/stekycz-git-hooks-exec_2023-01-05-10-36.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "[rush] Create custom git hooks instead of copy", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts index 17c9a0dabb1..ac988115d16 100644 --- a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts +++ b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts @@ -449,11 +449,22 @@ export abstract class BaseInstallManager { // Clear the currently installed git hooks and install fresh copies FileSystem.ensureEmptyFolder(hookDestination); + // Find the relative path from Git hooks directory to the directory storing the actual scripts. + const hookRelativePath: string = path.relative(hookDestination, hookSource); + // Only copy files that look like Git hook names const filteredHookFilenames: string[] = hookFilenames.filter((x) => /^[a-z\-]+/.test(x)); for (const filename of filteredHookFilenames) { - // Copy the file. Important: For Bash scripts, the EOL must not be CRLF. - const hookFileContent: string = FileSystem.readFile(path.join(hookSource, filename)); + const hookFileContent: string = `#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +SCRIPT_IMPLEMENTATION_PATH="$SCRIPT_DIR/${hookRelativePath}/${filename}" +if [[ -f "$SCRIPT_IMPLEMENTATION_PATH" ]]; then + exec "$SCRIPT_IMPLEMENTATION_PATH" +else + echo "The ${filename} Git hook does not exist in your version of the repo. Either remove the ${filename} hook file (e.g. '.git/hooks/${filename}') in case this feature is not used anymore in main branch. Otherwise, updating your branch to current mainstream will solve the issue." +fi +`; + // Create the hook file. Important: For Bash scripts, the EOL must not be CRLF. FileSystem.writeFile(path.join(hookDestination, filename), hookFileContent, { convertLineEndings: NewlineKind.Lf }); From f9878ba1e3bf97498db72f8890f940a0ed3dc356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20S=CC=8Ctekl?= Date: Tue, 10 Jan 2023 15:42:26 +0100 Subject: [PATCH 026/399] Ensure hook relative path to always use slashes --- libraries/rush-lib/src/logic/base/BaseInstallManager.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts index ac988115d16..1dd39d612cf 100644 --- a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts +++ b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts @@ -16,7 +16,8 @@ import { FileSystemStats, ConsoleTerminalProvider, Terminal, - ITerminalProvider + ITerminalProvider, + Path } from '@rushstack/node-core-library'; import { PrintUtilities } from '@rushstack/terminal'; @@ -450,7 +451,7 @@ export abstract class BaseInstallManager { FileSystem.ensureEmptyFolder(hookDestination); // Find the relative path from Git hooks directory to the directory storing the actual scripts. - const hookRelativePath: string = path.relative(hookDestination, hookSource); + const hookRelativePath: string = Path.convertToSlashes(path.relative(hookDestination, hookSource)); // Only copy files that look like Git hook names const filteredHookFilenames: string[] = hookFilenames.filter((x) => /^[a-z\-]+/.test(x)); From c2fc78c917ff50fa8a9390e7ace0e25f591ed313 Mon Sep 17 00:00:00 2001 From: Lukas <4083977+lukaskl@users.noreply.github.com> Date: Wed, 11 Jan 2023 19:29:27 +0700 Subject: [PATCH 027/399] Code review: update getHashesForGlobsAsync function --- .../logic/buildCache/AdditionalFilesHasher.ts | 61 ------------------ .../buildCache/getHashesForGlobsAsync.ts | 62 +++++++++++++++++++ .../logic/operations/ShellOperationRunner.ts | 11 ++-- 3 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts create mode 100644 libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts diff --git a/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts b/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts deleted file mode 100644 index b6df5463101..00000000000 --- a/libraries/rush-lib/src/logic/buildCache/AdditionalFilesHasher.ts +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See LICENSE in the project root for license information. -import { Async, Import, LegacyAdapters } from '@rushstack/node-core-library'; -import { getGitHashForFiles } from '@rushstack/package-deps-hash'; - -import type { IOptions } from 'glob'; - -const glob: typeof import('glob') = Import.lazy('glob', require); - -const globAsync = (pattern: string, options: IOptions = {}): Promise => { - return LegacyAdapters.convertCallbackToPromise(glob, pattern, options); -}; - -export class AdditionalFilesHasher { - public static async getFileHashedFilesMap( - globPatterns: string[], - packagePath: string - ): Promise> { - const filePaths: string[] = await this._expandGlobPatterns(globPatterns, packagePath); - - return getGitHashForFiles(filePaths, packagePath); - } - - private static async _expandGlobPatterns(globPatterns: string[], packagePath: string): Promise { - const allMatches: Set = new Set(); - - await Async.forEachAsync( - globPatterns, - async (pattern) => { - const matches: string[] = await globAsync(pattern, { - cwd: packagePath, - nodir: true, - // We want to keep path's type unchanged, - // i.e. if the pattern was a relative path, then matched paths should also be relative paths - // if the pattern was an absolute path, then matched paths should also be absolute paths - // - // We are doing this because these paths are going to be used to calculate a hash for the build cache and some users - // might choose to depend on global files (e.g. `/etc/os-release`) and some might choose to depend on local files - // (e.g. `../path/to/workspace/file`) - // - // In both cases we want that path to the resource would be the same on all machines, - // regardless of what is the current working directory. - // - // That being said, we want to keep `realpath` and `absolute` options here as false: - realpath: false, - absolute: false - }); - matches.forEach((match) => allMatches.add(match)); - }, - { concurrency: 10 } - ); - - if (allMatches.size === 0) { - throw new Error( - `Couldn't find any files matching provided glob patterns: ["${globPatterns.join('", "')}"].` - ); - } - - return Array.from(allMatches); - } -} diff --git a/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts b/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts new file mode 100644 index 00000000000..59588a69363 --- /dev/null +++ b/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { Async, Import, LegacyAdapters } from '@rushstack/node-core-library'; +import { getGitHashForFiles } from '@rushstack/package-deps-hash'; + +import type { IOptions } from 'glob'; + +const glob: typeof import('glob') = Import.lazy('glob', require); + +const globAsync = (pattern: string, options: IOptions = {}): Promise => { + return LegacyAdapters.convertCallbackToPromise(glob, pattern, options); +}; + +async function expandGlobPatternsAsync( + globPatterns: Iterable, + packagePath: string +): Promise { + const allMatches: Set = new Set(); + + await Async.forEachAsync( + globPatterns, + async (pattern) => { + const matches: string[] = await globAsync(pattern, { + cwd: packagePath, + nodir: true, + // We want to keep path's type unchanged, + // i.e. if the pattern was a relative path, then matched paths should also be relative paths + // if the pattern was an absolute path, then matched paths should also be absolute paths + // + // We are doing this because these paths are going to be used to calculate a hash for the build cache and some users + // might choose to depend on global files (e.g. `/etc/os-release`) and some might choose to depend on local files + // (e.g. `../path/to/workspace/file`) + // + // In both cases we want that path to the resource would be the same on all machines, + // regardless of what is the current working directory. + // + // That being said, we want to keep `realpath` and `absolute` options here as false: + realpath: false, + absolute: false + }); + matches.forEach((match) => allMatches.add(match)); + }, + { concurrency: 10 } + ); + + if (allMatches.size === 0) { + throw new Error( + `Couldn't find any files matching provided glob patterns: ["${Array.from(globPatterns).join('", "')}"].` + ); + } + + return Array.from(allMatches); +} + +export async function getHashesForGlobsAsync( + globPatterns: Iterable, + packagePath: string +): Promise> { + const filePaths: string[] = await expandGlobPatternsAsync(globPatterns, packagePath); + + return getGitHashForFiles(filePaths, packagePath); +} diff --git a/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts b/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts index aef6e17f198..b9a62d7af59 100644 --- a/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts +++ b/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts @@ -29,7 +29,7 @@ import { OperationError } from './OperationError'; import { IOperationRunner, IOperationRunnerContext } from './IOperationRunner'; import { ProjectLogWritable } from './ProjectLogWritable'; import { ProjectBuildCache } from '../buildCache/ProjectBuildCache'; -import { AdditionalFilesHasher } from '../buildCache/AdditionalFilesHasher'; +import { getHashesForGlobsAsync } from '../buildCache/getHashesForGlobsAsync'; import { IOperationSettings, RushProjectConfiguration } from '../../api/RushProjectConfiguration'; import { CollatedTerminalProvider } from '../../utilities/CollatedTerminalProvider'; import { RushConstants } from '../RushConstants'; @@ -452,11 +452,10 @@ export class ShellOperationRunner implements IOperationRunner { } } if (operationSettings.dependsOnAdditionalFiles) { - const additionalFiles: Map = - await AdditionalFilesHasher.getFileHashedFilesMap( - operationSettings.dependsOnAdditionalFiles, - this._rushProject.projectFolder - ); + const additionalFiles: Map = await getHashesForGlobsAsync( + operationSettings.dependsOnAdditionalFiles, + this._rushProject.projectFolder + ); terminal.writeDebugLine( `Including additional files to calculate build cache hash:\n ${Array.from( From 989175b6d427b527d265705a2380bd5a46bf2611 Mon Sep 17 00:00:00 2001 From: Lukas <4083977+lukaskl@users.noreply.github.com> Date: Wed, 11 Jan 2023 23:14:10 +0700 Subject: [PATCH 028/399] Optimize "dependsOnAdditionalFiles" option by reusing known git hashes --- .../src/logic/ProjectChangeAnalyzer.ts | 12 +++- .../buildCache/getHashesForGlobsAsync.ts | 64 ++++++++++++++++++- .../logic/operations/ShellOperationRunner.ts | 9 ++- 3 files changed, 77 insertions(+), 8 deletions(-) diff --git a/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts b/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts index da0f2cd2413..f7353446860 100644 --- a/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts +++ b/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts @@ -51,9 +51,13 @@ interface IGitState { rootDir: string; } -interface IRawRepoState { +/** + * @internal + */ +export interface IRawRepoState { projectState: Map> | undefined; rootDir: string; + rawHashes: Map; } /** @@ -331,7 +335,8 @@ export class ProjectChangeAnalyzer { // Mark as resolved, but no data return { projectState: undefined, - rootDir: this._rushConfiguration.rushJsonFolder + rootDir: this._rushConfiguration.rushJsonFolder, + rawHashes: new Map() }; } @@ -416,7 +421,8 @@ export class ProjectChangeAnalyzer { return { projectState: projectHashDeps, - rootDir + rootDir, + rawHashes: repoState.hashes }; } diff --git a/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts b/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts index 59588a69363..4e3f136602a 100644 --- a/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts +++ b/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts @@ -2,8 +2,9 @@ // See LICENSE in the project root for license information. import { Async, Import, LegacyAdapters } from '@rushstack/node-core-library'; import { getGitHashForFiles } from '@rushstack/package-deps-hash'; - +import * as path from 'path'; import type { IOptions } from 'glob'; +import type { IRawRepoState } from '../ProjectChangeAnalyzer'; const glob: typeof import('glob') = Import.lazy('glob', require); @@ -52,11 +53,68 @@ async function expandGlobPatternsAsync( return Array.from(allMatches); } +interface IKnownHashesResult { + foundPaths: Map; + missingPaths: string[]; +} + +function getKnownHashes( + filePaths: string[], + packagePath: string, + repoState: IRawRepoState +): IKnownHashesResult { + const missingPaths: string[] = []; + const foundPaths: Map = new Map(); + + for (const filePath of filePaths) { + const absolutePath: string = path.isAbsolute(filePath) ? filePath : path.join(packagePath, filePath); + + /** + * We are using RegExp here to prevent false positives in the following string.replace function + * - `^` anchor makes sure that we are replacing only the beginning of the string + * - extra `/` makes sure that we are remove extra slash from the relative path + */ + const gitFilePath: string = absolutePath.replace(new RegExp('^' + repoState.rootDir + '/'), ''); + const foundHash: string | undefined = repoState.rawHashes.get(gitFilePath); + + if (foundHash) { + foundPaths.set(filePath, foundHash); + } else { + missingPaths.push(filePath); + } + } + + return { foundPaths, missingPaths }; +} + export async function getHashesForGlobsAsync( globPatterns: Iterable, - packagePath: string + packagePath: string, + repoState: IRawRepoState | undefined ): Promise> { const filePaths: string[] = await expandGlobPatternsAsync(globPatterns, packagePath); - return getGitHashForFiles(filePaths, packagePath); + if (!repoState) { + return getGitHashForFiles(filePaths, packagePath); + } + + const { foundPaths, missingPaths } = getKnownHashes(filePaths, packagePath, repoState); + const calculatedHashes: Map = getGitHashForFiles(missingPaths, packagePath); + + /** + * We want to keep the order of the output the same regardless whether the file was already + * hashed by git or not (as this can change, e.g. due to .gitignore). + * Therefore we will populate our final hashes map in the same order as `filePaths`. + */ + const result: Map = new Map(); + for (const filePath of filePaths) { + const hash: string | undefined = foundPaths.get(filePath) || calculatedHashes.get(filePath); + if (!hash) { + // Sanity check -- this should never happen + throw new Error(`Failed to calculate hash of file: "${filePath}"`); + } + result.set(filePath, hash); + } + + return result; } diff --git a/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts b/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts index b9a62d7af59..d5d57bbfbd3 100644 --- a/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts +++ b/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts @@ -38,7 +38,7 @@ import { OperationStateFile } from './OperationStateFile'; import type { RushConfiguration } from '../../api/RushConfiguration'; import type { RushConfigurationProject } from '../../api/RushConfigurationProject'; -import type { ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer'; +import type { ProjectChangeAnalyzer, IRawRepoState } from '../ProjectChangeAnalyzer'; import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration'; import type { IPhase } from '../../api/CommandLineConfiguration'; @@ -451,10 +451,15 @@ export class ShellOperationRunner implements IOperationRunner { additionalContext['$' + varName] = process.env[varName] || ''; } } + if (operationSettings.dependsOnAdditionalFiles) { + const repoState: IRawRepoState | undefined = + this._projectChangeAnalyzer._ensureInitialized(terminal); + const additionalFiles: Map = await getHashesForGlobsAsync( operationSettings.dependsOnAdditionalFiles, - this._rushProject.projectFolder + this._rushProject.projectFolder, + repoState ); terminal.writeDebugLine( From 205c834c6b47491e305d41c300f466a5d6880aae Mon Sep 17 00:00:00 2001 From: Will Huang Date: Wed, 21 Dec 2022 17:31:11 -0500 Subject: [PATCH 029/399] feat: added first component to rushstack components --- apps/lockfile-explorer-web/package.json | 3 +- apps/lockfile-explorer-web/src/App.tsx | 2 + .../containers/SelectedEntryPreview/index.tsx | 2 + apps/rush-components/.eslintrc.js | 7 + apps/rush-components/.npmignore | 30 ++++ apps/rush-components/LICENSE | 24 +++ apps/rush-components/README.md | 83 ++++++++++ apps/rush-components/assets/index.html | 12 ++ apps/rush-components/config/heft.json | 129 ++++++++++++++++ apps/rush-components/config/jest.config.json | 6 + apps/rush-components/config/rig.json | 6 + apps/rush-components/package.json | 31 ++++ .../src/components/Button/index.tsx | 5 + .../src/components/ScrollArea/index.tsx | 27 ++++ .../src/components/ScrollArea/styles.scss | 79 ++++++++++ apps/rush-components/src/start.ts | 2 + apps/rush-components/tsconfig.json | 8 + apps/rush-components/tsconfig.type.json | 7 + apps/rush-components/webpack.config.js | 40 +++++ .../rush/browser-approved-packages.json | 8 + common/config/rush/pnpm-lock.yaml | 145 ++++++++++++++++++ common/config/rush/repo-state.json | 2 +- rush.json | 5 + 23 files changed, 661 insertions(+), 2 deletions(-) create mode 100644 apps/rush-components/.eslintrc.js create mode 100644 apps/rush-components/.npmignore create mode 100644 apps/rush-components/LICENSE create mode 100644 apps/rush-components/README.md create mode 100644 apps/rush-components/assets/index.html create mode 100644 apps/rush-components/config/heft.json create mode 100644 apps/rush-components/config/jest.config.json create mode 100644 apps/rush-components/config/rig.json create mode 100644 apps/rush-components/package.json create mode 100644 apps/rush-components/src/components/Button/index.tsx create mode 100644 apps/rush-components/src/components/ScrollArea/index.tsx create mode 100644 apps/rush-components/src/components/ScrollArea/styles.scss create mode 100644 apps/rush-components/src/start.ts create mode 100644 apps/rush-components/tsconfig.json create mode 100644 apps/rush-components/tsconfig.type.json create mode 100644 apps/rush-components/webpack.config.js diff --git a/apps/lockfile-explorer-web/package.json b/apps/lockfile-explorer-web/package.json index 2a3564d9c03..083e84cf130 100644 --- a/apps/lockfile-explorer-web/package.json +++ b/apps/lockfile-explorer-web/package.json @@ -18,7 +18,8 @@ "@lifaon/path": "~2.1.0", "@reduxjs/toolkit": "~1.8.6", "react-redux": "~8.0.4", - "redux": "~4.2.0" + "redux": "~4.2.0", + "@rushstack/components": "workspace:*" }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", diff --git a/apps/lockfile-explorer-web/src/App.tsx b/apps/lockfile-explorer-web/src/App.tsx index e0d110a2c62..586019aed5c 100644 --- a/apps/lockfile-explorer-web/src/App.tsx +++ b/apps/lockfile-explorer-web/src/App.tsx @@ -13,6 +13,7 @@ import { BookmarksSidebar } from './containers/BookmarksSidebar'; import { SelectedEntryPreview } from './containers/SelectedEntryPreview'; import { LogoPanel } from './containers/LogoPanel'; import { ConnectionModal } from './components/ConnectionModal'; +import { ScrollArea } from '@rushstack/components'; /** * This React component renders the application page. @@ -43,6 +44,7 @@ export const App = (): JSX.Element => { +
diff --git a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx index 739afb5ceac..03f82679e3e 100644 --- a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx @@ -11,6 +11,7 @@ import { removeBookmark, selectCurrentEntry } from '../../store/slices/entrySlice'; +import { Button } from '@rushstack/components'; export const SelectedEntryPreview = (): JSX.Element => { const selectedEntry = useAppSelector(selectCurrentEntry); @@ -64,6 +65,7 @@ export const SelectedEntryPreview = (): JSX.Element => {
No Entry Selected
{renderButtonRow()} +
); diff --git a/apps/rush-components/.eslintrc.js b/apps/rush-components/.eslintrc.js new file mode 100644 index 00000000000..60160b354c4 --- /dev/null +++ b/apps/rush-components/.eslintrc.js @@ -0,0 +1,7 @@ +// This is a workaround for https://github.com/eslint/eslint/issues/3458 +require('@rushstack/eslint-config/patch/modern-module-resolution'); + +module.exports = { + extends: ['@rushstack/eslint-config/profile/node'], + parserOptions: { tsconfigRootDir: __dirname } +}; diff --git a/apps/rush-components/.npmignore b/apps/rush-components/.npmignore new file mode 100644 index 00000000000..302dbc5b019 --- /dev/null +++ b/apps/rush-components/.npmignore @@ -0,0 +1,30 @@ +# THIS IS A STANDARD TEMPLATE FOR .npmignore FILES IN THIS REPO. + +# Ignore all files by default, to avoid accidentally publishing unintended files. +* + +# Use negative patterns to bring back the specific things we want to publish. +!/bin/** +!/lib/** +!/lib-*/** +!/dist/** +!ThirdPartyNotice.txt + +# Ignore certain patterns that should not get published. +/dist/*.stats.* +/lib/**/test/ +/lib-*/**/test/ +*.test.js + +# NOTE: These don't need to be specified, because NPM includes them automatically. +# +# package.json +# README (and its variants) +# CHANGELOG (and its variants) +# LICENSE / LICENCE + +#-------------------------------------------- +# DO NOT MODIFY THE TEMPLATE ABOVE THIS LINE +#-------------------------------------------- + +# (Add your project-specific overrides here) \ No newline at end of file diff --git a/apps/rush-components/LICENSE b/apps/rush-components/LICENSE new file mode 100644 index 00000000000..e6b6c3080e6 --- /dev/null +++ b/apps/rush-components/LICENSE @@ -0,0 +1,24 @@ +@rushstack/lockfile-explorer + +Copyright (c) Microsoft Corporation. All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/apps/rush-components/README.md b/apps/rush-components/README.md new file mode 100644 index 00000000000..1643d5bdd27 --- /dev/null +++ b/apps/rush-components/README.md @@ -0,0 +1,83 @@ +# @rushstack/lockfile-explorer + +
+
+ + Rush Lockfile Explorer + +

+

+ +> 🚨 *EARLY PREVIEW RELEASE* 🚨 +> +> Please provide feedback by commenting on +> the [Design Proposal](https://github.com/microsoft/rushstack/issues/3695) +> or creating a GitHub issue. Thanks! + +**Rush Lockfile Explorer** helps you investigate and solve version conflicts when working +in a [Rush](https://rushjs.io) monorepo using the [PNPM package manager](https://pnpm.io/). + +Typical use cases: + +- After `rush update`, the app is reporting errors caused by duplicate instances of + a singleton object, probably introduced by a + [peer dependency doppelganger](https://rushjs.io/pages/advanced/npm_doppelgangers/) + -- how to find the likely culprits? + +- After `rush update`, the app's bundle size has increased significantly due to + side-by-side versions -- how to find which packages have extra versions? + +- When you identify the problematic package, it is an obscure indirect dependency of + your middleware -- how to work backwards in the dependency graph to determine which + **package.json** files should be patched in **.pnpmfile.cjs**? + +- Your project's installation footprint is unusually large because it has picked up + a lot of extra NPM dependencies that seem unnecessary, however `rush-pnpm why` prints + thousands of lines of output. How to filter this report to see the important + relationships? + + +## Usage + +```bash +# Install the NPM package globally: +npm install -g @rushstack/lockfile-explorer + +# Go to your monorepo folder +cd my-rush-repo + +# Run "rush install" to ensure common/temp/node_modules is up to date +rush install + +# Launch the Lockfile Explorer command line interface (CLI). +# It expects to find a Rush workspace in your shell's current working directory. +lockfile-explorer +``` + +The CLI will start a Node.js service on `http://localhost/` and try to launch your default web browser: + +screenshot
+*Lockfile Explorer main window* + + +## How it works + +The web app will expect to find a Rush workspace in the current working directory where the `lockfile-explorer` +command was invoked. It will read files such as: + +- **common/config/rush/pnpm-lock.yaml** - the PNPM lockfile for your monorepo +- **common/config/rush/.pnpmfile.cjs** - which transforms **package.json** files during installation +- The **package.json** files for your Rush projects +- The **package.json** files for packages installed under + + +## Links + +- [Documentation](https://lfx.rushstack.io/) on the Lockfile Explorer project website +- [CHANGELOG.md]( + https://github.com/microsoft/rushstack/blob/main/apps/lockfile-explorer/CHANGELOG.md) - Find + out what's new in the latest version +- [@rushstack/trace-import](https://www.npmjs.com/package/@rushstack/trace-import) - + a command-line tool for troubleshooting how modules are resolved by `import` and `require()` + +Rush Lockfile Explorer is part of the [Rush Stack](https://rushstack.io/) family of projects. diff --git a/apps/rush-components/assets/index.html b/apps/rush-components/assets/index.html new file mode 100644 index 00000000000..8e36d3d1016 --- /dev/null +++ b/apps/rush-components/assets/index.html @@ -0,0 +1,12 @@ + + + + + + Rush Components + + + +
+ + diff --git a/apps/rush-components/config/heft.json b/apps/rush-components/config/heft.json new file mode 100644 index 00000000000..f859f9c5abe --- /dev/null +++ b/apps/rush-components/config/heft.json @@ -0,0 +1,129 @@ +/** + * Defines configuration used by core Heft. + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/heft.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for standard + * settings to be shared across multiple projects. + */ + "extends": "@rushstack/heft-web-rig/profiles/app/config/heft.json", + + "eventActions": [ + // { + // /** + // * (Required) The kind of built-in operation that should be performed. + // * The "deleteGlobs" action deletes files or folders that match the specified glob patterns. + // */ + // "actionKind": "deleteGlobs", + // + // /** + // * (Required) The Heft stage when this action should be performed. Note that heft.json event actions + // * are scheduled after any plugin tasks have processed the event. For example, a "compile" event action + // * will be performed after the TypeScript compiler has been invoked. + // * + // * Options: "clean", "pre-compile", "compile", "bundle", "post-build" + // */ + // "heftEvent": "clean", + // + // /** + // * (Required) A user-defined tag whose purpose is to allow configs to replace/delete handlers that + // * were added by other configs. + // */ + // "actionId": "my-example-action", + // + // /** + // * (Required) Glob patterns to be deleted. The paths are resolved relative to the project folder. + // * Documentation for supported glob syntaxes: https://www.npmjs.com/package/fast-glob + // */ + // "globsToDelete": [ + // "dist", + // "lib", + // "lib-esnext", + // "temp" + // ] + // }, + // + // { + // /** + // * (Required) The kind of built-in operation that should be performed. + // * The "copyFiles" action copies files that match the specified patterns. + // */ + // "actionKind": "copyFiles", + // + // /** + // * (Required) The Heft stage when this action should be performed. Note that heft.json event actions + // * are scheduled after any plugin tasks have processed the event. For example, a "compile" event action + // * will be performed after the TypeScript compiler has been invoked. + // * + // * Options: "pre-compile", "compile", "bundle", "post-build" + // */ + // "heftEvent": "pre-compile", + // + // /** + // * (Required) A user-defined tag whose purpose is to allow configs to replace/delete handlers that + // * were added by other configs. + // */ + // "actionId": "my-example-action", + // + // /** + // * (Required) An array of copy operations to run perform during the specified Heft event. + // */ + // "copyOperations": [ + // { + // /** + // * (Required) The base folder that files will be copied from, relative to the project root. + // * Settings such as "includeGlobs" and "excludeGlobs" will be resolved relative + // * to this folder. + // * NOTE: Assigning "sourceFolder" does not by itself select any files to be copied. + // */ + // "sourceFolder": "src", + // + // /** + // * (Required) One or more folders that files will be copied into, relative to the project root. + // * If you specify more than one destination folder, Heft will read the input files only once, using + // * streams to efficiently write multiple outputs. + // */ + // "destinationFolders": ["dist/assets"], + // + // /** + // * If specified, this option recursively scans all folders under "sourceFolder" and includes any files + // * that match the specified extensions. (If "fileExtensions" and "includeGlobs" are both + // * specified, their selections are added together.) + // */ + // "fileExtensions": [".jpg", ".png"], + // + // /** + // * A list of glob patterns that select files to be copied. The paths are resolved relative + // * to "sourceFolder". + // * Documentation for supported glob syntaxes: https://www.npmjs.com/package/fast-glob + // */ + // "includeGlobs": ["assets/*.md"], + // + // /** + // * A list of glob patterns that exclude files/folders from being copied. The paths are resolved relative + // * to "sourceFolder". These exclusions eliminate items that were selected by the "includeGlobs" + // * or "fileExtensions" setting. + // */ + // "excludeGlobs": [], + // + // /** + // * Normally, when files are selected under a child folder, a corresponding folder will be created in + // * the destination folder. Specify flatten=true to discard the source path and copy all matching files + // * to the same folder. If two files have the same name an error will be reported. + // * The default value is false. + // */ + // "flatten": false, + // + // /** + // * If true, filesystem hard links will be created instead of copying the file. Depending on the + // * operating system, this may be faster. (But note that it may cause unexpected behavior if a tool + // * modifies the link.) The default value is false. + // */ + // "hardlink": false + // } + // ] + // } + ] +} diff --git a/apps/rush-components/config/jest.config.json b/apps/rush-components/config/jest.config.json new file mode 100644 index 00000000000..7f2f5dc42b6 --- /dev/null +++ b/apps/rush-components/config/jest.config.json @@ -0,0 +1,6 @@ +{ + "extends": "@rushstack/heft-web-rig/profiles/app/config/jest.config.json", + + // Load the initappcontext.js stub when running tests + "setupFiles": ["../lib-commonjs/stub/initappcontext.js"] +} diff --git a/apps/rush-components/config/rig.json b/apps/rush-components/config/rig.json new file mode 100644 index 00000000000..687fc2911bc --- /dev/null +++ b/apps/rush-components/config/rig.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", + + "rigPackageName": "@rushstack/heft-web-rig", + "rigProfile": "app" +} diff --git a/apps/rush-components/package.json b/apps/rush-components/package.json new file mode 100644 index 00000000000..55b50e33b81 --- /dev/null +++ b/apps/rush-components/package.json @@ -0,0 +1,31 @@ +{ + "name": "@rushstack/components", + "description": "Rush Component Library: a set of themed components for rush projects", + "version": "0.0.0", + "private": true, + "license": "MIT", + "module": "lib/start.js", + "types": "lib/start.d.ts", + "scripts": { + "build": "heft test --clean", + "start": "heft start", + "test": "heft test", + "_phase:build": "heft build --clean", + "_phase:test": "heft test --no-build" + }, + "dependencies": { + "react": "~16.13.1", + "react-dom": "~16.13.1" + }, + "devDependencies": { + "@rushstack/eslint-config": "workspace:*", + "@rushstack/heft-web-rig": "workspace:*", + "@rushstack/heft": "workspace:*", + "@types/heft-jest": "1.0.1", + "@types/react-dom": "16.9.14", + "@types/react": "16.14.23", + "@types/webpack-env": "1.13.0", + "@radix-ui/react-scroll-area": "~1.0.2", + "@radix-ui/colors": "~0.1.8" + } +} diff --git a/apps/rush-components/src/components/Button/index.tsx b/apps/rush-components/src/components/Button/index.tsx new file mode 100644 index 00000000000..f72ed78f607 --- /dev/null +++ b/apps/rush-components/src/components/Button/index.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export const Button = () => { + return ; +}; diff --git a/apps/rush-components/src/components/ScrollArea/index.tsx b/apps/rush-components/src/components/ScrollArea/index.tsx new file mode 100644 index 00000000000..439b11a8d89 --- /dev/null +++ b/apps/rush-components/src/components/ScrollArea/index.tsx @@ -0,0 +1,27 @@ +import React from 'react'; +import * as RadixScrollArea from '@radix-ui/react-scroll-area'; +import styles from './styles.scss'; + +const TAGS = Array.from({ length: 50 }).map((_, i, a) => `v1.2.0-beta.${a.length - i}`); + +export const ScrollArea = () => ( + + +
+
Tags
+ {TAGS.map((tag) => ( +
+ {tag} +
+ ))} +
+
+ + + + + + + +
+); diff --git a/apps/rush-components/src/components/ScrollArea/styles.scss b/apps/rush-components/src/components/ScrollArea/styles.scss new file mode 100644 index 00000000000..c896d38d7bf --- /dev/null +++ b/apps/rush-components/src/components/ScrollArea/styles.scss @@ -0,0 +1,79 @@ +@import '@radix-ui/colors/blackA.css'; +@import '@radix-ui/colors/mauve.css'; +@import '@radix-ui/colors/violet.css'; + +.ScrollAreaRoot { + width: 200px; + height: 225px; + border-radius: 4px; + overflow: hidden; + box-shadow: 0 2px 10px var(--blackA7); + background-color: white; + --scrollbar-size: 6px; +} + +.ScrollAreaViewport { + width: 100%; + height: 100%; + border-radius: inherit; +} + +.ScrollAreaScrollbar { + display: flex; + /* ensures no selection */ + user-select: none; + /* disable browser handling of all panning and zooming gestures on touch devices */ + touch-action: none; + padding: 2px; + background: var(--blackA6); + transition: background 160ms ease-out; +} +.ScrollAreaScrollbar:hover { + background: var(--blackA8); +} +.ScrollAreaScrollbar[data-orientation='vertical'] { + width: var(--scrollbar-size); +} +.ScrollAreaScrollbar[data-orientation='horizontal'] { + flex-direction: column; + height: var(--scrollbar-size); +} + +.ScrollAreaThumb { + flex: 1; + background: var(--mauve10); + border-radius: var(--scrollbar-size); + position: relative; +} +/* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */ +.ScrollAreaThumb::before { + content: ''; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 100%; + height: 100%; + min-width: 44px; + min-height: 44px; +} + +.ScrollAreaCorner { + background: var(--blackA8); +} + +.Text { + color: var(--violet11); + font-size: 15px; + line-height: 18px; + font-weight: 500; +} + +.Tag { + color: var(--mauve12); + font-size: 13px; + line-height: 18px; + margin-top: 10px; + border-top: 1px solid var(--mauve6); + padding-top: 10px; +} diff --git a/apps/rush-components/src/start.ts b/apps/rush-components/src/start.ts new file mode 100644 index 00000000000..96b2be9d808 --- /dev/null +++ b/apps/rush-components/src/start.ts @@ -0,0 +1,2 @@ +export * from './components/Button'; +export * from './components/ScrollArea'; diff --git a/apps/rush-components/tsconfig.json b/apps/rush-components/tsconfig.json new file mode 100644 index 00000000000..18d8c1a0dab --- /dev/null +++ b/apps/rush-components/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "./node_modules/@rushstack/heft-web-rig/profiles/app/tsconfig-base.json", + "compilerOptions": { + "types": ["heft-jest", "webpack-env"], + "target": "es2017", + "lib": ["es2017", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"] + } +} diff --git a/apps/rush-components/tsconfig.type.json b/apps/rush-components/tsconfig.type.json new file mode 100644 index 00000000000..112edd30eb0 --- /dev/null +++ b/apps/rush-components/tsconfig.type.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "emitDeclarationOnly": true + }, + "include": ["src/index.ts"] +} diff --git a/apps/rush-components/webpack.config.js b/apps/rush-components/webpack.config.js new file mode 100644 index 00000000000..3725a2ce687 --- /dev/null +++ b/apps/rush-components/webpack.config.js @@ -0,0 +1,40 @@ +'use strict'; + +const path = require('path'); +const createWebpackConfig = require('@rushstack/heft-web-rig/profiles/app/webpack-base.config'); + +module.exports = function createConfig(env, argv) { + return createWebpackConfig({ + env: env, + argv: argv, + projectRoot: __dirname, + // Documentation: https://webpack.js.org/configuration/ + configOverride: { + resolve: { + alias: { + // // Use the bundled library + // 'heft-web-rig-library-tutorial': + // 'heft-web-rig-library-tutorial/dist/heft-web-rig-library-tutorial.js' + } + }, + performance: { + hints: env.production ? 'error' : false + // This specifies the bundle size limit that will trigger Webpack's warning saying: + // "The following entrypoint(s) combined asset size exceeds the recommended limit." + // maxEntrypointSize: 500000, + // maxAssetSize: 500000 + }, + devServer: { + port: 8090, + static: { + directory: path.join(__dirname, 'dist') + }, + client: { + webSocketURL: { + port: 8090 + } + } + } + } + }); +}; diff --git a/common/config/rush/browser-approved-packages.json b/common/config/rush/browser-approved-packages.json index e81054b2c2c..42aabcf3362 100644 --- a/common/config/rush/browser-approved-packages.json +++ b/common/config/rush/browser-approved-packages.json @@ -10,10 +10,18 @@ "name": "@lifaon/path", "allowedCategories": [ "libraries" ] }, + { + "name": "@radix-ui/react-scroll-area", + "allowedCategories": [ "libraries" ] + }, { "name": "@reduxjs/toolkit", "allowedCategories": [ "libraries" ] }, + { + "name": "@rushstack/components", + "allowedCategories": [ "libraries" ] + }, { "name": "axios", "allowedCategories": [ "libraries" ] diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 97c81aa0b73..d3c2a89c774 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -186,6 +186,7 @@ importers: '@fluentui/react': ^8.96.1 '@lifaon/path': ~2.1.0 '@reduxjs/toolkit': ~1.8.6 + '@rushstack/components': workspace:* '@rushstack/eslint-config': workspace:* '@rushstack/heft': workspace:* '@rushstack/heft-web-rig': workspace:* @@ -202,6 +203,7 @@ importers: '@fluentui/react': 8.103.6_tlqvpdqnq63ssdllbmshthdmo4 '@lifaon/path': 2.1.0 '@reduxjs/toolkit': 1.8.6_qfynotfwlyrsyq662adyrweaoe + '@rushstack/components': link:../rush-components react: 16.13.1 react-dom: 16.13.1_react@16.13.1 react-redux: 8.0.5_6ue7j6tfp4xzdzadarjwzo6kwu @@ -266,6 +268,33 @@ importers: '@types/node': 12.20.24 '@types/semver': 7.3.5 + ../../apps/rush-components: + specifiers: + '@radix-ui/colors': ~0.1.8 + '@radix-ui/react-scroll-area': ~1.0.2 + '@rushstack/eslint-config': workspace:* + '@rushstack/heft': workspace:* + '@rushstack/heft-web-rig': workspace:* + '@types/heft-jest': 1.0.1 + '@types/react': 16.14.23 + '@types/react-dom': 16.9.14 + '@types/webpack-env': 1.13.0 + react: ~16.13.1 + react-dom: ~16.13.1 + dependencies: + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + devDependencies: + '@radix-ui/colors': 0.1.8 + '@radix-ui/react-scroll-area': 1.0.2_5owmthsvj5ictknaj3ev736ofq + '@rushstack/eslint-config': link:../../eslint/eslint-config + '@rushstack/heft': link:../heft + '@rushstack/heft-web-rig': link:../../rigs/heft-web-rig + '@types/heft-jest': 1.0.1 + '@types/react': 16.14.23 + '@types/react-dom': 16.9.14 + '@types/webpack-env': 1.13.0 + ../../apps/trace-import: specifiers: '@rushstack/eslint-config': workspace:* @@ -5796,6 +5825,122 @@ packages: resolution: {integrity: sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==} dev: true + /@radix-ui/colors/0.1.8: + resolution: {integrity: sha512-jwRMXYwC0hUo0mv6wGpuw254Pd9p/R6Td5xsRpOmaWkUHlooNWqVcadgyzlRumMq3xfOTXwJReU0Jv+EIy4Jbw==} + dev: true + + /@radix-ui/number/1.0.0: + resolution: {integrity: sha512-Ofwh/1HX69ZfJRiRBMTy7rgjAzHmwe4kW9C9Y99HTRUcYLUuVT0KESFj15rPjRgKJs20GPq8Bm5aEDJ8DuA3vA==} + dependencies: + '@babel/runtime': 7.20.6 + dev: true + + /@radix-ui/primitive/1.0.0: + resolution: {integrity: sha512-3e7rn8FDMin4CgeL7Z/49smCA3rFYY3Ha2rUQ7HRWFadS5iCRw08ZgVT1LaNTCNqgvrUiyczLflrVrF0SRQtNA==} + dependencies: + '@babel/runtime': 7.20.6 + dev: true + + /@radix-ui/react-compose-refs/1.0.0_react@16.13.1: + resolution: {integrity: sha512-0KaSv6sx787/hK3eF53iOkiSLwAGlFMx5lotrqD2pTjB18KbybKoEIgkNZTKC60YECDQTKGTRcDBILwZVqVKvA==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + react: 16.13.1 + dev: true + + /@radix-ui/react-context/1.0.0_react@16.13.1: + resolution: {integrity: sha512-1pVM9RfOQ+n/N5PJK33kRSKsr1glNxomxONs5c49MliinBY6Yw2Q995qfBUUo0/Mbg05B/sGA0gkgPI7kmSHBg==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + react: 16.13.1 + dev: true + + /@radix-ui/react-direction/1.0.0_react@16.13.1: + resolution: {integrity: sha512-2HV05lGUgYcA6xgLQ4BKPDmtL+QbIZYH5fCOTAOOcJ5O0QbWS3i9lKaurLzliYUDhORI2Qr3pyjhJh44lKA3rQ==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + react: 16.13.1 + dev: true + + /@radix-ui/react-presence/1.0.0_5owmthsvj5ictknaj3ev736ofq: + resolution: {integrity: sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + '@radix-ui/react-compose-refs': 1.0.0_react@16.13.1 + '@radix-ui/react-use-layout-effect': 1.0.0_react@16.13.1 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + dev: true + + /@radix-ui/react-primitive/1.0.1_5owmthsvj5ictknaj3ev736ofq: + resolution: {integrity: sha512-fHbmislWVkZaIdeF6GZxF0A/NH/3BjrGIYj+Ae6eTmTCr7EB0RQAAVEiqsXK6p3/JcRqVSBQoceZroj30Jj3XA==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + '@radix-ui/react-slot': 1.0.1_react@16.13.1 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + dev: true + + /@radix-ui/react-scroll-area/1.0.2_5owmthsvj5ictknaj3ev736ofq: + resolution: {integrity: sha512-k8VseTxI26kcKJaX0HPwkvlNBPTs56JRdYzcZ/vzrNUkDlvXBy8sMc7WvCpYzZkHgb+hd72VW9MqkqecGtuNgg==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + '@radix-ui/number': 1.0.0 + '@radix-ui/primitive': 1.0.0 + '@radix-ui/react-compose-refs': 1.0.0_react@16.13.1 + '@radix-ui/react-context': 1.0.0_react@16.13.1 + '@radix-ui/react-direction': 1.0.0_react@16.13.1 + '@radix-ui/react-presence': 1.0.0_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-primitive': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-use-callback-ref': 1.0.0_react@16.13.1 + '@radix-ui/react-use-layout-effect': 1.0.0_react@16.13.1 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + dev: true + + /@radix-ui/react-slot/1.0.1_react@16.13.1: + resolution: {integrity: sha512-avutXAFL1ehGvAXtPquu0YK5oz6ctS474iM3vNGQIkswrVhdrS52e3uoMQBzZhNRAIE0jBnUyXWNmSjGHhCFcw==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + '@radix-ui/react-compose-refs': 1.0.0_react@16.13.1 + react: 16.13.1 + dev: true + + /@radix-ui/react-use-callback-ref/1.0.0_react@16.13.1: + resolution: {integrity: sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + react: 16.13.1 + dev: true + + /@radix-ui/react-use-layout-effect/1.0.0_react@16.13.1: + resolution: {integrity: sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + react: 16.13.1 + dev: true + /@reduxjs/toolkit/1.8.6_qfynotfwlyrsyq662adyrweaoe: resolution: {integrity: sha512-4Ia/Loc6WLmdSOzi7k5ff7dLK8CgG2b8aqpLsCAJhazAzGdp//YBUSaj0ceW6a3kDBDNRrq5CRwyCS0wBiL1ig==} peerDependencies: diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index 9ffc520ad5c..b63f1f0aa7e 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "19975bf7cfd9dfef0de7b4b7767ac445a97816a4", + "pnpmShrinkwrapHash": "31a26a24c42ee3618684f9fcaaaf78303d12c6ae", "preferredVersionsHash": "5222ca779ae69ebfd201e39c17f48ce9eaf8c3c2" } diff --git a/rush.json b/rush.json index c6f0e591ab3..490f81bd126 100644 --- a/rush.json +++ b/rush.json @@ -430,6 +430,11 @@ "projectFolder": "apps/lockfile-explorer-web", "reviewCategory": "libraries" }, + { + "packageName": "@rushstack/components", + "projectFolder": "apps/rush-components", + "reviewCategory": "libraries" + }, { "packageName": "@rushstack/rundown", "projectFolder": "apps/rundown", From 5225780d0600728dcd37c346abc88ca3194b5635 Mon Sep 17 00:00:00 2001 From: Will Huang Date: Thu, 22 Dec 2022 14:10:03 -0500 Subject: [PATCH 030/399] feat: add tabs component --- .../src/containers/LockfileViewer/index.tsx | 25 ++++++ apps/rush-components/package.json | 3 +- .../src/components/Tabs/index.tsx | 25 ++++++ .../src/components/Tabs/styles.scss | 68 +++++++++++++++++ apps/rush-components/src/start.ts | 1 + .../rush/browser-approved-packages.json | 4 + common/config/rush/pnpm-lock.yaml | 76 +++++++++++++++++++ common/config/rush/repo-state.json | 2 +- 8 files changed, 202 insertions(+), 2 deletions(-) create mode 100644 apps/rush-components/src/components/Tabs/index.tsx create mode 100644 apps/rush-components/src/components/Tabs/styles.scss diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx index cfa247ba58c..5b343ac7297 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx @@ -15,6 +15,7 @@ import { } from '../../store/slices/entrySlice'; import { FilterBar } from '../../components/FilterBar'; import { getFilterFromLocalStorage, saveFilterToLocalStorage } from '../../helpers/localStorage'; +import { Tabs } from '@rushstack/components'; interface ILockfileEntryGroup { entryName: string; @@ -166,6 +167,30 @@ export const LockfileViewer = (): JSX.Element | ReactNull => { return (
+ + {getEntriesToShow().map((lockfileEntryGroup) => ( + + ))} +
+ ) + }, + { + header: 'Packages', + body: ( +
+ {getEntriesToShow().map((lockfileEntryGroup) => ( + + ))} +
+ ) + } + ]} + /> ( + + + {items.map((item) => ( + + {item.header} + + ))} + + {items.map((item) => ( + + {item.body}; + + ))} + +); diff --git a/apps/rush-components/src/components/Tabs/styles.scss b/apps/rush-components/src/components/Tabs/styles.scss new file mode 100644 index 00000000000..2b3e738f839 --- /dev/null +++ b/apps/rush-components/src/components/Tabs/styles.scss @@ -0,0 +1,68 @@ +@import '@radix-ui/colors/blackA.css'; +@import '@radix-ui/colors/green.css'; +@import '@radix-ui/colors/mauve.css'; +@import '@radix-ui/colors/violet.css'; + +/* reset */ +button, +fieldset, +input { + all: unset; +} + +.TabsRoot { + display: flex; + flex-direction: column; + width: 300px; + box-shadow: 0 2px 10px var(--blackA4); +} + +.TabsList { + flex-shrink: 0; + display: flex; + border-bottom: 1px solid var(--mauve6); +} + +.TabsTrigger { + font-family: inherit; + background-color: white; + padding: 0 20px; + height: 45px; + flex: 1; + display: flex; + align-items: center; + justify-content: center; + font-size: 15px; + line-height: 1; + color: var(--mauve11); + user-select: none; +} +.TabsTrigger:first-child { + border-top-left-radius: 6px; +} +.TabsTrigger:last-child { + border-top-right-radius: 6px; +} +.TabsTrigger:hover { + color: var(--violet11); +} +.TabsTrigger[data-state='active'] { + color: var(--violet11); + box-shadow: inset 0 -1px 0 0 currentColor, 0 1px 0 0 currentColor; +} +.TabsTrigger:focus { + position: relative; + box-shadow: 0 0 0 2px black; +} + +.TabsContent { + flex-grow: 1; + padding: 20px; + background-color: white; + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; + outline: none; +} +.TabsContent:focus { + box-shadow: 0 0 0 2px black; +} diff --git a/apps/rush-components/src/start.ts b/apps/rush-components/src/start.ts index 96b2be9d808..db9f62b35ac 100644 --- a/apps/rush-components/src/start.ts +++ b/apps/rush-components/src/start.ts @@ -1,2 +1,3 @@ export * from './components/Button'; export * from './components/ScrollArea'; +export * from './components/Tabs'; diff --git a/common/config/rush/browser-approved-packages.json b/common/config/rush/browser-approved-packages.json index 42aabcf3362..52737424ae9 100644 --- a/common/config/rush/browser-approved-packages.json +++ b/common/config/rush/browser-approved-packages.json @@ -10,6 +10,10 @@ "name": "@lifaon/path", "allowedCategories": [ "libraries" ] }, + { + "name": "@radix-ui/colors", + "allowedCategories": [ "libraries" ] + }, { "name": "@radix-ui/react-scroll-area", "allowedCategories": [ "libraries" ] diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index d3c2a89c774..3a646c53813 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -272,6 +272,7 @@ importers: specifiers: '@radix-ui/colors': ~0.1.8 '@radix-ui/react-scroll-area': ~1.0.2 + '@radix-ui/react-tabs': ~1.0.1 '@rushstack/eslint-config': workspace:* '@rushstack/heft': workspace:* '@rushstack/heft-web-rig': workspace:* @@ -287,6 +288,7 @@ importers: devDependencies: '@radix-ui/colors': 0.1.8 '@radix-ui/react-scroll-area': 1.0.2_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-tabs': 1.0.1_5owmthsvj5ictknaj3ev736ofq '@rushstack/eslint-config': link:../../eslint/eslint-config '@rushstack/heft': link:../heft '@rushstack/heft-web-rig': link:../../rigs/heft-web-rig @@ -5841,6 +5843,21 @@ packages: '@babel/runtime': 7.20.6 dev: true + /@radix-ui/react-collection/1.0.1_5owmthsvj5ictknaj3ev736ofq: + resolution: {integrity: sha512-uuiFbs+YCKjn3X1DTSx9G7BHApu4GHbi3kgiwsnFUbOKCrwejAJv4eE4Vc8C0Oaxt9T0aV4ox0WCOdx+39Xo+g==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + '@radix-ui/react-compose-refs': 1.0.0_react@16.13.1 + '@radix-ui/react-context': 1.0.0_react@16.13.1 + '@radix-ui/react-primitive': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-slot': 1.0.1_react@16.13.1 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + dev: true + /@radix-ui/react-compose-refs/1.0.0_react@16.13.1: resolution: {integrity: sha512-0KaSv6sx787/hK3eF53iOkiSLwAGlFMx5lotrqD2pTjB18KbybKoEIgkNZTKC60YECDQTKGTRcDBILwZVqVKvA==} peerDependencies: @@ -5868,6 +5885,16 @@ packages: react: 16.13.1 dev: true + /@radix-ui/react-id/1.0.0_react@16.13.1: + resolution: {integrity: sha512-Q6iAB/U7Tq3NTolBBQbHTgclPmGWE3OlktGGqrClPozSw4vkQ1DfQAOtzgRPecKsMdJINE05iaoDUG8tRzCBjw==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + '@radix-ui/react-use-layout-effect': 1.0.0_react@16.13.1 + react: 16.13.1 + dev: true + /@radix-ui/react-presence/1.0.0_5owmthsvj5ictknaj3ev736ofq: resolution: {integrity: sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==} peerDependencies: @@ -5893,6 +5920,26 @@ packages: react-dom: 16.13.1_react@16.13.1 dev: true + /@radix-ui/react-roving-focus/1.0.1_5owmthsvj5ictknaj3ev736ofq: + resolution: {integrity: sha512-TB76u5TIxKpqMpUAuYH2VqMhHYKa+4Vs1NHygo/llLvlffN6mLVsFhz0AnSFlSBAvTBYVHYAkHAyEt7x1gPJOA==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + '@radix-ui/primitive': 1.0.0 + '@radix-ui/react-collection': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-compose-refs': 1.0.0_react@16.13.1 + '@radix-ui/react-context': 1.0.0_react@16.13.1 + '@radix-ui/react-direction': 1.0.0_react@16.13.1 + '@radix-ui/react-id': 1.0.0_react@16.13.1 + '@radix-ui/react-primitive': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-use-callback-ref': 1.0.0_react@16.13.1 + '@radix-ui/react-use-controllable-state': 1.0.0_react@16.13.1 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + dev: true + /@radix-ui/react-scroll-area/1.0.2_5owmthsvj5ictknaj3ev736ofq: resolution: {integrity: sha512-k8VseTxI26kcKJaX0HPwkvlNBPTs56JRdYzcZ/vzrNUkDlvXBy8sMc7WvCpYzZkHgb+hd72VW9MqkqecGtuNgg==} peerDependencies: @@ -5923,6 +5970,25 @@ packages: react: 16.13.1 dev: true + /@radix-ui/react-tabs/1.0.1_5owmthsvj5ictknaj3ev736ofq: + resolution: {integrity: sha512-mVNEwHwgjy2G9F7b39f9VY+jF0QUZykTm0Sdv+Uz6KC4KOEIa4HLDiHU8MeEZluRtZE3aqGYDhl93O7QbJDwhg==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + '@radix-ui/primitive': 1.0.0 + '@radix-ui/react-context': 1.0.0_react@16.13.1 + '@radix-ui/react-direction': 1.0.0_react@16.13.1 + '@radix-ui/react-id': 1.0.0_react@16.13.1 + '@radix-ui/react-presence': 1.0.0_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-primitive': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-roving-focus': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-use-controllable-state': 1.0.0_react@16.13.1 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + dev: true + /@radix-ui/react-use-callback-ref/1.0.0_react@16.13.1: resolution: {integrity: sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==} peerDependencies: @@ -5932,6 +5998,16 @@ packages: react: 16.13.1 dev: true + /@radix-ui/react-use-controllable-state/1.0.0_react@16.13.1: + resolution: {integrity: sha512-FohDoZvk3mEXh9AWAVyRTYR4Sq7/gavuofglmiXB2g1aKyboUD4YtgWxKj8O5n+Uak52gXQ4wKz5IFST4vtJHg==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + '@radix-ui/react-use-callback-ref': 1.0.0_react@16.13.1 + react: 16.13.1 + dev: true + /@radix-ui/react-use-layout-effect/1.0.0_react@16.13.1: resolution: {integrity: sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==} peerDependencies: diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index b63f1f0aa7e..45e82167480 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "31a26a24c42ee3618684f9fcaaaf78303d12c6ae", + "pnpmShrinkwrapHash": "453bdd5fae52264d90a61dd77b78f037fc6244ed", "preferredVersionsHash": "5222ca779ae69ebfd201e39c17f48ce9eaf8c3c2" } From 601e75e386c98145be3c4504665c49f2bcdb506f Mon Sep 17 00:00:00 2001 From: Will Huang Date: Thu, 22 Dec 2022 15:34:50 -0500 Subject: [PATCH 031/399] feat: re-write left panel with components --- .../src/containers/LockfileViewer/index.tsx | 127 ++++++++---------- .../src/containers/LockfileViewer/styles.scss | 9 -- apps/rush-components/package.json | 8 +- .../src/components/Checkbox/index.tsx | 33 +++++ .../src/components/Checkbox/styles.scss | 36 +++++ .../src/components/Tabs/index.tsx | 35 +++-- .../src/components/Tabs/styles.scss | 3 +- apps/rush-components/src/start.ts | 1 + .../rush/browser-approved-packages.json | 4 + common/config/rush/pnpm-lock.yaml | 50 +++++++ common/config/rush/repo-state.json | 2 +- 11 files changed, 217 insertions(+), 91 deletions(-) create mode 100644 apps/rush-components/src/components/Checkbox/index.tsx create mode 100644 apps/rush-components/src/components/Checkbox/styles.scss diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx index 5b343ac7297..7e980a72cc2 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx @@ -15,7 +15,7 @@ import { } from '../../store/slices/entrySlice'; import { FilterBar } from '../../components/FilterBar'; import { getFilterFromLocalStorage, saveFilterToLocalStorage } from '../../helpers/localStorage'; -import { Tabs } from '@rushstack/components'; +import { Tabs, Checkbox } from '@rushstack/components'; interface ILockfileEntryGroup { entryName: string; @@ -115,6 +115,8 @@ export const LockfileViewer = (): JSX.Element | ReactNull => { if (!entries) return ReactNull; const getEntriesToShow = (): ILockfileEntryGroup[] => { + console.log('getting entries: ', activeFilters); + let filteredEntries: LockfileEntry[] = entries; if (projectFilter && activeFilters[LockfileEntryFilter.Project]) { filteredEntries = entries.filter((entry) => entry.entryPackageName.indexOf(projectFilter) !== -1); @@ -167,30 +169,61 @@ export const LockfileViewer = (): JSX.Element | ReactNull => { return (
- - {getEntriesToShow().map((lockfileEntryGroup) => ( - - ))} -
- ) - }, - { - header: 'Packages', - body: ( -
- {getEntriesToShow().map((lockfileEntryGroup) => ( - - ))} -
- ) - } - ]} - /> +
+ { + console.log(val); + togglePackageView(val === 'Projects' ? LockfileEntryFilter.Project : LockfileEntryFilter.Package); + }} + > +
+ +
+
+ {getEntriesToShow().map((lockfileEntryGroup) => ( + + ))} +
+ {activeFilters[LockfileEntryFilter.Package] ? ( +
+
Filters
+ + +
+ ) : null} +
+
{ } ]} /> -
-
- -
-
- {getEntriesToShow().map((lockfileEntryGroup) => ( - - ))} -
- {activeFilters[LockfileEntryFilter.Package] ? ( -
-
Filters
-
- -
Must have side-by-side versions
-
-
- -
Must have doppelgangers
-
-
- ) : null} -
); }; diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss b/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss index eef96b23180..e2034c20062 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss @@ -73,12 +73,3 @@ margin-top: 4px; } } - -.filterOption { - display: flex; - align-items: center; - cursor: pointer; - & > * + * { - margin-left: 4px; - } -} diff --git a/apps/rush-components/package.json b/apps/rush-components/package.json index b0eee736378..514e29b872e 100644 --- a/apps/rush-components/package.json +++ b/apps/rush-components/package.json @@ -22,11 +22,13 @@ "@rushstack/heft-web-rig": "workspace:*", "@rushstack/heft": "workspace:*", "@types/heft-jest": "1.0.1", - "@types/react-dom": "16.9.14", - "@types/react": "16.14.23", + "@types/react-dom": "16.13.1", + "@types/react": "16.13.1", "@types/webpack-env": "1.13.0", "@radix-ui/react-scroll-area": "~1.0.2", "@radix-ui/colors": "~0.1.8", - "@radix-ui/react-tabs": "~1.0.1" + "@radix-ui/react-tabs": "~1.0.1", + "@radix-ui/react-checkbox": "~1.0.1", + "@radix-ui/react-icons": "~1.1.1" } } diff --git a/apps/rush-components/src/components/Checkbox/index.tsx b/apps/rush-components/src/components/Checkbox/index.tsx new file mode 100644 index 00000000000..63319d0e4c3 --- /dev/null +++ b/apps/rush-components/src/components/Checkbox/index.tsx @@ -0,0 +1,33 @@ +import React from 'react'; +import * as RadixCheckbox from '@radix-ui/react-checkbox'; +import { CheckIcon } from '@radix-ui/react-icons'; +import styles from './styles.scss'; + +export const Checkbox = ({ + label, + isChecked, + onChecked +}: { + label: string; + isChecked: boolean; + onChecked: (checked: boolean) => void; +}) => ( +
+
+ + + + + + +
+
+); diff --git a/apps/rush-components/src/components/Checkbox/styles.scss b/apps/rush-components/src/components/Checkbox/styles.scss new file mode 100644 index 00000000000..7d9fd49f756 --- /dev/null +++ b/apps/rush-components/src/components/Checkbox/styles.scss @@ -0,0 +1,36 @@ +@import '@radix-ui/colors/blackA.css'; +@import '@radix-ui/colors/violet.css'; + +/* reset */ +button { + all: unset; +} + +.CheckboxRoot { + background-color: white; + width: 25px; + height: 25px; + border-radius: 4px; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 2px 10px var(--blackA7); +} +.CheckboxRoot:hover { + background-color: var(--violet3); +} +.CheckboxRoot:focus { + box-shadow: 0 0 0 2px black; +} + +.CheckboxIndicator { + color: var(--violet11); +} + +.Label { + color: white; + padding-left: 15px; + font-size: 15px; + line-height: 1; + user-select: none; +} diff --git a/apps/rush-components/src/components/Tabs/index.tsx b/apps/rush-components/src/components/Tabs/index.tsx index b3f8dbe5275..0e8717d9ecb 100644 --- a/apps/rush-components/src/components/Tabs/index.tsx +++ b/apps/rush-components/src/components/Tabs/index.tsx @@ -4,11 +4,28 @@ import styles from './styles.scss'; type TabsItem = { header: string; - body: any; + body?: any; }; -export const Tabs = ({ items, def }: { items: TabsItem[]; def?: string }) => ( - +export const Tabs = ({ + items, + def, + value, + onChange, + children +}: { + items: TabsItem[]; + def?: string; + value?: string; + onChange?: (value: string) => void; + children?: any; +}) => ( + {items.map((item) => ( @@ -16,10 +33,12 @@ export const Tabs = ({ items, def }: { items: TabsItem[]; def?: string }) => ( ))} - {items.map((item) => ( - - {item.body}; - - ))} + {children + ? children + : items.map((item) => ( + + {item.body} + + ))} ); diff --git a/apps/rush-components/src/components/Tabs/styles.scss b/apps/rush-components/src/components/Tabs/styles.scss index 2b3e738f839..e8675564c0d 100644 --- a/apps/rush-components/src/components/Tabs/styles.scss +++ b/apps/rush-components/src/components/Tabs/styles.scss @@ -13,8 +13,9 @@ input { .TabsRoot { display: flex; flex-direction: column; - width: 300px; + width: 100%; box-shadow: 0 2px 10px var(--blackA4); + overflow-y: scroll; } .TabsList { diff --git a/apps/rush-components/src/start.ts b/apps/rush-components/src/start.ts index db9f62b35ac..b1f55190801 100644 --- a/apps/rush-components/src/start.ts +++ b/apps/rush-components/src/start.ts @@ -1,3 +1,4 @@ export * from './components/Button'; export * from './components/ScrollArea'; export * from './components/Tabs'; +export * from './components/Checkbox'; diff --git a/common/config/rush/browser-approved-packages.json b/common/config/rush/browser-approved-packages.json index 52737424ae9..1922351270a 100644 --- a/common/config/rush/browser-approved-packages.json +++ b/common/config/rush/browser-approved-packages.json @@ -18,6 +18,10 @@ "name": "@radix-ui/react-scroll-area", "allowedCategories": [ "libraries" ] }, + { + "name": "@radix-ui/react-tabs", + "allowedCategories": [ "libraries" ] + }, { "name": "@reduxjs/toolkit", "allowedCategories": [ "libraries" ] diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 3a646c53813..04fbaddd497 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -271,6 +271,8 @@ importers: ../../apps/rush-components: specifiers: '@radix-ui/colors': ~0.1.8 + '@radix-ui/react-checkbox': ~1.0.1 + '@radix-ui/react-icons': ~1.1.1 '@radix-ui/react-scroll-area': ~1.0.2 '@radix-ui/react-tabs': ~1.0.1 '@rushstack/eslint-config': workspace:* @@ -287,6 +289,8 @@ importers: react-dom: 16.13.1_react@16.13.1 devDependencies: '@radix-ui/colors': 0.1.8 + '@radix-ui/react-checkbox': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-icons': 1.1.1_react@16.13.1 '@radix-ui/react-scroll-area': 1.0.2_5owmthsvj5ictknaj3ev736ofq '@radix-ui/react-tabs': 1.0.1_5owmthsvj5ictknaj3ev736ofq '@rushstack/eslint-config': link:../../eslint/eslint-config @@ -5843,6 +5847,25 @@ packages: '@babel/runtime': 7.20.6 dev: true + /@radix-ui/react-checkbox/1.0.1_5owmthsvj5ictknaj3ev736ofq: + resolution: {integrity: sha512-TisH0B8hWmYP3ONRduYCyN04rR9yLPIw/Rwyn1RoC1suSoGCa8Wn+YPdSSSarSszeIbcg3p2lBkDp2XXit4sZw==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + '@radix-ui/primitive': 1.0.0 + '@radix-ui/react-compose-refs': 1.0.0_react@16.13.1 + '@radix-ui/react-context': 1.0.0_react@16.13.1 + '@radix-ui/react-presence': 1.0.0_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-primitive': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-use-controllable-state': 1.0.0_react@16.13.1 + '@radix-ui/react-use-previous': 1.0.0_react@16.13.1 + '@radix-ui/react-use-size': 1.0.0_react@16.13.1 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + dev: true + /@radix-ui/react-collection/1.0.1_5owmthsvj5ictknaj3ev736ofq: resolution: {integrity: sha512-uuiFbs+YCKjn3X1DTSx9G7BHApu4GHbi3kgiwsnFUbOKCrwejAJv4eE4Vc8C0Oaxt9T0aV4ox0WCOdx+39Xo+g==} peerDependencies: @@ -5885,6 +5908,14 @@ packages: react: 16.13.1 dev: true + /@radix-ui/react-icons/1.1.1_react@16.13.1: + resolution: {integrity: sha512-xc3wQC59rsFylVbSusQCrrM+6695ppF730Q6yqzhRdqDcRNWIm2R6ngpzBoSOQMcwnq4p805F+Gr7xo4fmtN1A==} + peerDependencies: + react: ^16.x || ^17.x || ^18.x + dependencies: + react: 16.13.1 + dev: true + /@radix-ui/react-id/1.0.0_react@16.13.1: resolution: {integrity: sha512-Q6iAB/U7Tq3NTolBBQbHTgclPmGWE3OlktGGqrClPozSw4vkQ1DfQAOtzgRPecKsMdJINE05iaoDUG8tRzCBjw==} peerDependencies: @@ -6017,6 +6048,25 @@ packages: react: 16.13.1 dev: true + /@radix-ui/react-use-previous/1.0.0_react@16.13.1: + resolution: {integrity: sha512-RG2K8z/K7InnOKpq6YLDmT49HGjNmrK+fr82UCVKT2sW0GYfVnYp4wZWBooT/EYfQ5faA9uIjvsuMMhH61rheg==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + react: 16.13.1 + dev: true + + /@radix-ui/react-use-size/1.0.0_react@16.13.1: + resolution: {integrity: sha512-imZ3aYcoYCKhhgNpkNDh/aTiU05qw9hX+HHI1QDBTyIlcFjgeFlKKySNGMwTp7nYFLQg/j0VA2FmCY4WPDDHMg==} + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + dependencies: + '@babel/runtime': 7.20.6 + '@radix-ui/react-use-layout-effect': 1.0.0_react@16.13.1 + react: 16.13.1 + dev: true + /@reduxjs/toolkit/1.8.6_qfynotfwlyrsyq662adyrweaoe: resolution: {integrity: sha512-4Ia/Loc6WLmdSOzi7k5ff7dLK8CgG2b8aqpLsCAJhazAzGdp//YBUSaj0ceW6a3kDBDNRrq5CRwyCS0wBiL1ig==} peerDependencies: diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index 45e82167480..4ab073e623c 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "453bdd5fae52264d90a61dd77b78f037fc6244ed", + "pnpmShrinkwrapHash": "2d4113be0a631885212233ee12084088dd8b09f4", "preferredVersionsHash": "5222ca779ae69ebfd201e39c17f48ce9eaf8c3c2" } From e497d56d94edb9bc2dc7c4a58050679e43036c0e Mon Sep 17 00:00:00 2001 From: Will Huang Date: Thu, 29 Dec 2022 18:34:31 -0500 Subject: [PATCH 032/399] feat: re-write left panel and center panel with components --- apps/lockfile-explorer-web/src/App.tsx | 2 - .../src/components/FilterBar/index.tsx | 27 ----- .../src/components/FilterBar/styles.scss | 20 ---- .../src/containers/LockfileViewer/index.tsx | 98 ++++++++----------- .../src/containers/LockfileViewer/styles.scss | 37 +++---- .../containers/PackageJsonViewer/index.tsx | 26 ++--- .../src/styles/_base.scss | 7 ++ .../src/components/Checkbox/index.tsx | 2 +- .../src/components/Checkbox/styles.scss | 1 - .../src/components/Input/index.tsx | 24 +++++ .../src/components/Input/styles.scss | 5 + .../src/components/ScrollArea/index.tsx | 15 +-- .../src/components/ScrollArea/styles.scss | 21 +--- .../src/components/Tabs/index.tsx | 58 ++++++----- .../src/components/Tabs/styles.scss | 3 - apps/rush-components/src/start.ts | 1 + 16 files changed, 139 insertions(+), 208 deletions(-) delete mode 100644 apps/lockfile-explorer-web/src/components/FilterBar/index.tsx delete mode 100644 apps/lockfile-explorer-web/src/components/FilterBar/styles.scss create mode 100644 apps/lockfile-explorer-web/src/styles/_base.scss create mode 100644 apps/rush-components/src/components/Input/index.tsx create mode 100644 apps/rush-components/src/components/Input/styles.scss diff --git a/apps/lockfile-explorer-web/src/App.tsx b/apps/lockfile-explorer-web/src/App.tsx index 586019aed5c..e0d110a2c62 100644 --- a/apps/lockfile-explorer-web/src/App.tsx +++ b/apps/lockfile-explorer-web/src/App.tsx @@ -13,7 +13,6 @@ import { BookmarksSidebar } from './containers/BookmarksSidebar'; import { SelectedEntryPreview } from './containers/SelectedEntryPreview'; import { LogoPanel } from './containers/LogoPanel'; import { ConnectionModal } from './components/ConnectionModal'; -import { ScrollArea } from '@rushstack/components'; /** * This React component renders the application page. @@ -44,7 +43,6 @@ export const App = (): JSX.Element => { -
diff --git a/apps/lockfile-explorer-web/src/components/FilterBar/index.tsx b/apps/lockfile-explorer-web/src/components/FilterBar/index.tsx deleted file mode 100644 index 97e8c6752b3..00000000000 --- a/apps/lockfile-explorer-web/src/components/FilterBar/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See LICENSE in the project root for license information. - -import React from 'react'; -import styles from './styles.scss'; - -interface IFilterBarOption { - text: string; - active: boolean; - onClick: () => void; -} - -export const FilterBar = ({ options }: { options: IFilterBarOption[] }): JSX.Element => { - return ( -
- {options.map((opt: IFilterBarOption) => ( -
- {opt.text} -
- ))} -
- ); -}; diff --git a/apps/lockfile-explorer-web/src/components/FilterBar/styles.scss b/apps/lockfile-explorer-web/src/components/FilterBar/styles.scss deleted file mode 100644 index bbd2bcd1429..00000000000 --- a/apps/lockfile-explorer-web/src/components/FilterBar/styles.scss +++ /dev/null @@ -1,20 +0,0 @@ -@import 'office-ui-fabric-core/dist/sass/References'; - -.FilterBar { - display: flex; - box-shadow: $ms-depth-shadow-8; - width: fit-content; - & > * + * { - border-left: 1px solid $ms-color-gray20; - } -} - -.FilterItem { - background-color: $ms-color-gray10; - padding: 6px 12px; - cursor: pointer; -} - -.FilterItemActive { - border-bottom: 3px solid #107c10; -} diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx index 7e980a72cc2..f72f876054e 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx @@ -13,9 +13,8 @@ import { selectFilteredEntries, setFilter as selectFilter } from '../../store/slices/entrySlice'; -import { FilterBar } from '../../components/FilterBar'; import { getFilterFromLocalStorage, saveFilterToLocalStorage } from '../../helpers/localStorage'; -import { Tabs, Checkbox } from '@rushstack/components'; +import { Tabs, Checkbox, ScrollArea, Input } from '@rushstack/components'; interface ILockfileEntryGroup { entryName: string; @@ -115,8 +114,6 @@ export const LockfileViewer = (): JSX.Element | ReactNull => { if (!entries) return ReactNull; const getEntriesToShow = (): ILockfileEntryGroup[] => { - console.log('getting entries: ', activeFilters); - let filteredEntries: LockfileEntry[] = entries; if (projectFilter && activeFilters[LockfileEntryFilter.Project]) { filteredEntries = entries.filter((entry) => entry.entryPackageName.indexOf(projectFilter) !== -1); @@ -155,11 +152,15 @@ export const LockfileViewer = (): JSX.Element | ReactNull => { ); const togglePackageView = useCallback( - (selected: LockfileEntryFilter) => () => { + (selected: LockfileEntryFilter) => { if (selected === LockfileEntryFilter.Project) { + console.log('first'); + dispatch(selectFilter({ filter: LockfileEntryFilter.Project, state: true })); dispatch(selectFilter({ filter: LockfileEntryFilter.Package, state: false })); } else { + console.log('elsing'); + dispatch(selectFilter({ filter: LockfileEntryFilter.Package, state: true })); dispatch(selectFilter({ filter: LockfileEntryFilter.Project, state: false })); } @@ -179,65 +180,48 @@ export const LockfileViewer = (): JSX.Element | ReactNull => { header: 'Packages' } ]} + value={activeFilters[LockfileEntryFilter.Project] ? 'Projects' : 'Packages'} onChange={(val) => { - console.log(val); togglePackageView(val === 'Projects' ? LockfileEntryFilter.Project : LockfileEntryFilter.Package); }} - > -
- + + + {getEntriesToShow().map((lockfileEntryGroup) => ( + + ))} + + {activeFilters[LockfileEntryFilter.Package] ? ( +
+
Filters
+ +
-
- {getEntriesToShow().map((lockfileEntryGroup) => ( - - ))} -
- {activeFilters[LockfileEntryFilter.Package] ? ( -
-
Filters
- - -
- ) : null} - + ) : null}
-
); }; diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss b/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss index e2034c20062..52e06968c03 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss @@ -1,13 +1,20 @@ +@use '../../styles/base'; + .ViewWrapper { - height: calc(100% - 12px); - padding-top: 12px; + height: calc(100% - 24px); + @include base.card; + padding: 0 12px; + margin-top: 12px; } .ViewContents { display: flex; flex-direction: column; - min-height: calc(100% - 70px - 35px); - max-height: calc(100% - 70px - 35px); + min-height: calc(100% - 35px); + max-height: calc(100% - 35px); + & > * + * { + margin-top: 12px; + } } .LockfileEntryListViewWrapper { @@ -20,23 +27,6 @@ } } -.LockfileFilterBar { - display: flex; - align-items: center; - margin-bottom: 12px; - - input { - border: solid 1px #666; - border-radius: 4px; - padding: 0.4em; - width: 100%; - } - - & > * + * { - margin-left: 12px; - } -} - .packageGroup { h5 { margin: 0; @@ -59,11 +49,8 @@ } .lockfileEntriesWrapper { - overflow: scroll; flex: 1; - & > * + * { - margin-top: 12px; - } + height: 100%; } .filterSection { diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx index dbc733c9b16..40d44aa55d1 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx @@ -9,10 +9,10 @@ import { useAppDispatch, useAppSelector } from '../../store/hooks'; import { selectCurrentEntry } from '../../store/slices/entrySlice'; import { IPackageJson } from '../../types/IPackageJson'; import { compareSpec } from '../../parsing/compareSpec'; -import { FilterBar } from '../../components/FilterBar'; import { loadSpecChanges } from '../../store/slices/workspaceSlice'; import { displaySpecChanges } from '../../helpers/displaySpecChanges'; import { isEntryModified } from '../../helpers/isEntryModified'; +import { Tabs } from '@rushstack/components'; enum PackageView { PACKAGE_JSON, @@ -31,7 +31,8 @@ export const PackageJsonViewer = (): JSX.Element => { const [selection, setSelection] = useState(PackageView.PARSED_PACKAGE_JSON); - const cb = useCallback((s: PackageView) => () => setSelection(s), []); + const cb = useCallback((s: PackageView) => setSelection(s), []); + console.log('selection: ', selection); useEffect(() => { async function loadPnpmFileAsync(): Promise { @@ -196,24 +197,23 @@ export const PackageJsonViewer = (): JSX.Element => { return (
-
{renderFile()}
diff --git a/apps/lockfile-explorer-web/src/styles/_base.scss b/apps/lockfile-explorer-web/src/styles/_base.scss new file mode 100644 index 00000000000..5799704e1e3 --- /dev/null +++ b/apps/lockfile-explorer-web/src/styles/_base.scss @@ -0,0 +1,7 @@ +$shadow: 0 2px 10px hsla(0, 0%, 0%, 0.141); +$background-primary: white; + +@mixin card { + box-shadow: $shadow; + background-color: $background-primary; +} diff --git a/apps/rush-components/src/components/Checkbox/index.tsx b/apps/rush-components/src/components/Checkbox/index.tsx index 63319d0e4c3..ce6c7b60002 100644 --- a/apps/rush-components/src/components/Checkbox/index.tsx +++ b/apps/rush-components/src/components/Checkbox/index.tsx @@ -25,7 +25,7 @@ export const Checkbox = ({ -
diff --git a/apps/rush-components/src/components/Checkbox/styles.scss b/apps/rush-components/src/components/Checkbox/styles.scss index 7d9fd49f756..fc6821b2674 100644 --- a/apps/rush-components/src/components/Checkbox/styles.scss +++ b/apps/rush-components/src/components/Checkbox/styles.scss @@ -28,7 +28,6 @@ button { } .Label { - color: white; padding-left: 15px; font-size: 15px; line-height: 1; diff --git a/apps/rush-components/src/components/Input/index.tsx b/apps/rush-components/src/components/Input/index.tsx new file mode 100644 index 00000000000..a56b6804662 --- /dev/null +++ b/apps/rush-components/src/components/Input/index.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import styles from './styles.scss'; + +export const Input = ({ + value, + placeholder, + onChange, + type = 'text' +}: { + value: string; + onChange: (e: React.ChangeEvent) => void; + type?: string; + placeholder?: string; +}) => { + return ( + + ); +}; diff --git a/apps/rush-components/src/components/Input/styles.scss b/apps/rush-components/src/components/Input/styles.scss new file mode 100644 index 00000000000..dc7520862af --- /dev/null +++ b/apps/rush-components/src/components/Input/styles.scss @@ -0,0 +1,5 @@ +.InputWrapper { + border: solid 1px #666; + border-radius: 4px; + padding: 0.4em; +} diff --git a/apps/rush-components/src/components/ScrollArea/index.tsx b/apps/rush-components/src/components/ScrollArea/index.tsx index 439b11a8d89..6033ad05825 100644 --- a/apps/rush-components/src/components/ScrollArea/index.tsx +++ b/apps/rush-components/src/components/ScrollArea/index.tsx @@ -2,20 +2,9 @@ import React from 'react'; import * as RadixScrollArea from '@radix-ui/react-scroll-area'; import styles from './styles.scss'; -const TAGS = Array.from({ length: 50 }).map((_, i, a) => `v1.2.0-beta.${a.length - i}`); - -export const ScrollArea = () => ( +export const ScrollArea = ({ children }: { children: any }) => ( - -
-
Tags
- {TAGS.map((tag) => ( -
- {tag} -
- ))} -
-
+ {children} diff --git a/apps/rush-components/src/components/ScrollArea/styles.scss b/apps/rush-components/src/components/ScrollArea/styles.scss index c896d38d7bf..75c99b239c5 100644 --- a/apps/rush-components/src/components/ScrollArea/styles.scss +++ b/apps/rush-components/src/components/ScrollArea/styles.scss @@ -3,13 +3,10 @@ @import '@radix-ui/colors/violet.css'; .ScrollAreaRoot { - width: 200px; - height: 225px; border-radius: 4px; overflow: hidden; - box-shadow: 0 2px 10px var(--blackA7); - background-color: white; --scrollbar-size: 6px; + height: 100vh; } .ScrollAreaViewport { @@ -61,19 +58,3 @@ .ScrollAreaCorner { background: var(--blackA8); } - -.Text { - color: var(--violet11); - font-size: 15px; - line-height: 18px; - font-weight: 500; -} - -.Tag { - color: var(--mauve12); - font-size: 13px; - line-height: 18px; - margin-top: 10px; - border-top: 1px solid var(--mauve6); - padding-top: 10px; -} diff --git a/apps/rush-components/src/components/Tabs/index.tsx b/apps/rush-components/src/components/Tabs/index.tsx index 0e8717d9ecb..e1834c434a7 100644 --- a/apps/rush-components/src/components/Tabs/index.tsx +++ b/apps/rush-components/src/components/Tabs/index.tsx @@ -4,6 +4,7 @@ import styles from './styles.scss'; type TabsItem = { header: string; + value?: string | number; body?: any; }; @@ -12,33 +13,38 @@ export const Tabs = ({ def, value, onChange, - children + renderChildren }: { items: TabsItem[]; def?: string; - value?: string; - onChange?: (value: string) => void; - children?: any; -}) => ( - - - {items.map((item) => ( - - {item.header} - - ))} - - {children - ? children - : items.map((item) => ( - - {item.body} - + value?: string | number; + onChange?: (value: any) => void; + renderChildren?: () => JSX.Element; +}) => { + const getItemValue = (item: TabsItem) => (item.value === undefined ? item.header : item.value); + return ( + + + {items.map((item) => ( + + {item.header} + ))} - -); + + {renderChildren + ? renderChildren() + : items.map((item) => + item.body ? ( + + {item.body} + + ) : null + )} + + ); +}; diff --git a/apps/rush-components/src/components/Tabs/styles.scss b/apps/rush-components/src/components/Tabs/styles.scss index e8675564c0d..af7b25d9928 100644 --- a/apps/rush-components/src/components/Tabs/styles.scss +++ b/apps/rush-components/src/components/Tabs/styles.scss @@ -14,8 +14,6 @@ input { display: flex; flex-direction: column; width: 100%; - box-shadow: 0 2px 10px var(--blackA4); - overflow-y: scroll; } .TabsList { @@ -26,7 +24,6 @@ input { .TabsTrigger { font-family: inherit; - background-color: white; padding: 0 20px; height: 45px; flex: 1; diff --git a/apps/rush-components/src/start.ts b/apps/rush-components/src/start.ts index b1f55190801..523b0c611f1 100644 --- a/apps/rush-components/src/start.ts +++ b/apps/rush-components/src/start.ts @@ -2,3 +2,4 @@ export * from './components/Button'; export * from './components/ScrollArea'; export * from './components/Tabs'; export * from './components/Checkbox'; +export * from './components/Input'; From 79ee887ccd490a01312d392738f04c097c7cffee Mon Sep 17 00:00:00 2001 From: William Huang Date: Wed, 4 Jan 2023 13:49:15 -0500 Subject: [PATCH 033/399] feat: update buttons, update packages --- .../src/containers/BookmarksSidebar/index.tsx | 3 ++- .../containers/SelectedEntryPreview/index.tsx | 17 ++++++++--------- apps/rush-components/package.json | 4 ++-- .../src/components/Button/index.tsx | 15 +++++++++++++-- .../src/components/Button/styles.scss | 11 +++++++++++ apps/rush-components/src/styles/_base.scss | 7 +++++++ .../config/rush/browser-approved-packages.json | 8 ++++++++ 7 files changed, 51 insertions(+), 14 deletions(-) create mode 100644 apps/rush-components/src/components/Button/styles.scss create mode 100644 apps/rush-components/src/styles/_base.scss diff --git a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx index a42522c021f..7f0ef49e04c 100644 --- a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx @@ -7,6 +7,7 @@ import styles from './styles.scss'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; import { LockfileEntry } from '../../parsing/LockfileEntry'; import { clearStackAndPush, removeBookmark } from '../../store/slices/entrySlice'; +import { Button } from '@rushstack/components'; export const BookmarksSidebar = (): JSX.Element => { const bookmarks = useAppSelector((state) => state.entry.bookmarkedEntries); @@ -32,7 +33,7 @@ export const BookmarksSidebar = (): JSX.Element => { {bookmarks.map((bookmarkedEntry) => (

{bookmarkedEntry.displayText}

- +
))}
diff --git a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx index 03f82679e3e..414e446636c 100644 --- a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx @@ -40,20 +40,20 @@ export const SelectedEntryPreview = (): JSX.Element => { const renderButtonRow = (): JSX.Element => { return (
- - + + {isBookmarked ? ( - + ) : ( - + )}
); @@ -65,7 +65,6 @@ export const SelectedEntryPreview = (): JSX.Element => {
No Entry Selected
{renderButtonRow()} -
); diff --git a/apps/rush-components/package.json b/apps/rush-components/package.json index 514e29b872e..ef52d8451ea 100644 --- a/apps/rush-components/package.json +++ b/apps/rush-components/package.json @@ -22,8 +22,8 @@ "@rushstack/heft-web-rig": "workspace:*", "@rushstack/heft": "workspace:*", "@types/heft-jest": "1.0.1", - "@types/react-dom": "16.13.1", - "@types/react": "16.13.1", + "@types/react-dom": "16.9.14", + "@types/react": "16.14.23", "@types/webpack-env": "1.13.0", "@radix-ui/react-scroll-area": "~1.0.2", "@radix-ui/colors": "~0.1.8", diff --git a/apps/rush-components/src/components/Button/index.tsx b/apps/rush-components/src/components/Button/index.tsx index f72ed78f607..8401c7c863c 100644 --- a/apps/rush-components/src/components/Button/index.tsx +++ b/apps/rush-components/src/components/Button/index.tsx @@ -1,5 +1,16 @@ import React from 'react'; +import styles from './styles.scss'; -export const Button = () => { - return ; +type ButtonProps = { + children: JSX.Element | string; + disabled?: boolean; + onClick: () => void; +}; + +export const Button = ({ children, disabled = false }: ButtonProps) => { + return ( + + ); }; diff --git a/apps/rush-components/src/components/Button/styles.scss b/apps/rush-components/src/components/Button/styles.scss new file mode 100644 index 00000000000..08945eebf03 --- /dev/null +++ b/apps/rush-components/src/components/Button/styles.scss @@ -0,0 +1,11 @@ +@use '../../styles/base'; + +.ButtonWrapper { + padding: 4px 8px; + border: 1px solid base.$active-primary; + border-radius: 2px; + &:hover { + cursor: pointer; + background-color: base.$active-background; + } +} diff --git a/apps/rush-components/src/styles/_base.scss b/apps/rush-components/src/styles/_base.scss new file mode 100644 index 00000000000..ff8fa2863e6 --- /dev/null +++ b/apps/rush-components/src/styles/_base.scss @@ -0,0 +1,7 @@ +$shadow: 0 2px 10px hsla(0, 0%, 0%, 0.141); + +$background-primary: white; +$background-secondary: #f3f2f1; + +$active-primary: #107c10; +$active-background: #dff6dd; diff --git a/common/config/rush/browser-approved-packages.json b/common/config/rush/browser-approved-packages.json index 1922351270a..d9e0585a56c 100644 --- a/common/config/rush/browser-approved-packages.json +++ b/common/config/rush/browser-approved-packages.json @@ -14,6 +14,14 @@ "name": "@radix-ui/colors", "allowedCategories": [ "libraries" ] }, + { + "name": "@radix-ui/react-checkbox", + "allowedCategories": [ "libraries" ] + }, + { + "name": "@radix-ui/react-icons", + "allowedCategories": [ "libraries" ] + }, { "name": "@radix-ui/react-scroll-area", "allowedCategories": [ "libraries" ] From aa5eaa7d16629e144cbb497c949957ebee9b9eb3 Mon Sep 17 00:00:00 2001 From: William Huang Date: Fri, 6 Jan 2023 13:56:07 -0500 Subject: [PATCH 034/399] chore: tweak styles --- apps/lockfile-explorer-web/src/App.scss | 11 +++----- .../LockfileEntryDetailsView/styles.scss | 2 +- .../src/containers/LockfileViewer/index.tsx | 1 - .../containers/PackageJsonViewer/index.tsx | 4 +-- .../containers/PackageJsonViewer/styles.scss | 4 +++ .../SelectedEntryPreview/styles.scss | 5 ++-- .../src/components/Button/styles.scss | 6 ++--- .../src/components/Checkbox/styles.scss | 12 ++++----- .../src/components/Input/styles.scss | 4 ++- .../src/components/ScrollArea/styles.scss | 12 ++++----- .../src/components/Tabs/styles.scss | 25 ++++++------------- apps/rush-components/src/styles/_base.scss | 6 ----- apps/rush-components/src/styles/_colors.scss | 10 ++++++++ common/config/rush/repo-state.json | 2 +- 14 files changed, 47 insertions(+), 57 deletions(-) create mode 100644 apps/rush-components/src/styles/_colors.scss diff --git a/apps/lockfile-explorer-web/src/App.scss b/apps/lockfile-explorer-web/src/App.scss index cc5f9906fae..3cf4dce5e1b 100644 --- a/apps/lockfile-explorer-web/src/App.scss +++ b/apps/lockfile-explorer-web/src/App.scss @@ -1,13 +1,8 @@ -@import 'office-ui-fabric-core/dist/sass/References'; - -@mixin card { - box-shadow: $ms-depth-shadow-8; - background-color: $ms-color-gray10; - padding: 24px; -} +@use './styles/base'; .ContainerCard { - @include card; + padding: 24px; + @include base.card; } .AppContainer { diff --git a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss index 700eb3702fa..3526efbafdb 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss @@ -1,4 +1,4 @@ -@import 'office-ui-fabric-core/dist/sass/References'; +@use '../../styles/base'; .LockfileEntryListView { display: flex; diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx index f72f876054e..fa21040d791 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx @@ -2,7 +2,6 @@ // See LICENSE in the project root for license information. import React, { useCallback, useEffect, useRef, useState } from 'react'; -import appStyles from '../../App.scss'; import styles from './styles.scss'; import { LockfileEntry, LockfileEntryFilter } from '../../parsing/LockfileEntry'; import { ReactNull } from '../../types/ReactNull'; diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx index 40d44aa55d1..46e4c348af5 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx @@ -215,9 +215,7 @@ export const PackageJsonViewer = (): JSX.Element => { value={selection} onChange={cb} /> -
-
{renderFile()}
-
+
{renderFile()}
); }; diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss index 3b8c866609e..662721382f6 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss @@ -1,4 +1,7 @@ +@use '../../styles/base'; + .PackageJsonWrapper { + @include base.card; height: 30%; margin-top: 12px; } @@ -6,6 +9,7 @@ .FileContents { height: calc(25vh - 35px); overflow: scroll; + padding: 12px; } @mixin SpecWrapper { diff --git a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss index b816c5a6770..65cb3dfb722 100644 --- a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss @@ -1,9 +1,8 @@ -@import 'office-ui-fabric-core/dist/sass/References'; +@use '../../styles/base'; .SelectedEntryCard { margin-top: 12px; - box-shadow: $ms-depth-shadow-8; - background-color: $ms-color-gray10; + @include base.card; padding: 12px 24px; height: 8%; overflow: scroll; diff --git a/apps/rush-components/src/components/Button/styles.scss b/apps/rush-components/src/components/Button/styles.scss index 08945eebf03..acba5f1a2d4 100644 --- a/apps/rush-components/src/components/Button/styles.scss +++ b/apps/rush-components/src/components/Button/styles.scss @@ -1,11 +1,11 @@ -@use '../../styles/base'; +@use '../../styles/colors'; .ButtonWrapper { padding: 4px 8px; - border: 1px solid base.$active-primary; + border: 1px solid colors.$primary-active; border-radius: 2px; &:hover { cursor: pointer; - background-color: base.$active-background; + background-color: colors.$primary-background; } } diff --git a/apps/rush-components/src/components/Checkbox/styles.scss b/apps/rush-components/src/components/Checkbox/styles.scss index fc6821b2674..ebcc1cafd26 100644 --- a/apps/rush-components/src/components/Checkbox/styles.scss +++ b/apps/rush-components/src/components/Checkbox/styles.scss @@ -1,5 +1,4 @@ -@import '@radix-ui/colors/blackA.css'; -@import '@radix-ui/colors/violet.css'; +@use '../../styles/colors'; /* reset */ button { @@ -14,17 +13,18 @@ button { display: flex; align-items: center; justify-content: center; - box-shadow: 0 2px 10px var(--blackA7); + box-shadow: 0 2px 10px colors.$black; + cursor: pointer; } .CheckboxRoot:hover { - background-color: var(--violet3); + background-color: colors.$primary-background; } .CheckboxRoot:focus { - box-shadow: 0 0 0 2px black; + box-shadow: 0 0 0 2px colors.$primary-active; } .CheckboxIndicator { - color: var(--violet11); + color: colors.$primary-active; } .Label { diff --git a/apps/rush-components/src/components/Input/styles.scss b/apps/rush-components/src/components/Input/styles.scss index dc7520862af..41c05e58483 100644 --- a/apps/rush-components/src/components/Input/styles.scss +++ b/apps/rush-components/src/components/Input/styles.scss @@ -1,5 +1,7 @@ +@use '../../styles/colors'; + .InputWrapper { - border: solid 1px #666; + border: solid 1px colors.$gray; border-radius: 4px; padding: 0.4em; } diff --git a/apps/rush-components/src/components/ScrollArea/styles.scss b/apps/rush-components/src/components/ScrollArea/styles.scss index 75c99b239c5..3c2a13317f1 100644 --- a/apps/rush-components/src/components/ScrollArea/styles.scss +++ b/apps/rush-components/src/components/ScrollArea/styles.scss @@ -1,6 +1,4 @@ -@import '@radix-ui/colors/blackA.css'; -@import '@radix-ui/colors/mauve.css'; -@import '@radix-ui/colors/violet.css'; +@use '../../styles/colors'; .ScrollAreaRoot { border-radius: 4px; @@ -22,11 +20,11 @@ /* disable browser handling of all panning and zooming gestures on touch devices */ touch-action: none; padding: 2px; - background: var(--blackA6); + background: colors.$black; transition: background 160ms ease-out; } .ScrollAreaScrollbar:hover { - background: var(--blackA8); + background: colors.$black; } .ScrollAreaScrollbar[data-orientation='vertical'] { width: var(--scrollbar-size); @@ -38,7 +36,7 @@ .ScrollAreaThumb { flex: 1; - background: var(--mauve10); + background: colors.$primary-active; border-radius: var(--scrollbar-size); position: relative; } @@ -56,5 +54,5 @@ } .ScrollAreaCorner { - background: var(--blackA8); + background: colors.$black; } diff --git a/apps/rush-components/src/components/Tabs/styles.scss b/apps/rush-components/src/components/Tabs/styles.scss index af7b25d9928..5fd7204463e 100644 --- a/apps/rush-components/src/components/Tabs/styles.scss +++ b/apps/rush-components/src/components/Tabs/styles.scss @@ -1,7 +1,4 @@ -@import '@radix-ui/colors/blackA.css'; -@import '@radix-ui/colors/green.css'; -@import '@radix-ui/colors/mauve.css'; -@import '@radix-ui/colors/violet.css'; +@use '../../styles/colors'; /* reset */ button, @@ -19,7 +16,7 @@ input { .TabsList { flex-shrink: 0; display: flex; - border-bottom: 1px solid var(--mauve6); + border-bottom: 1px solid colors.$primary-active; } .TabsTrigger { @@ -32,31 +29,25 @@ input { justify-content: center; font-size: 15px; line-height: 1; - color: var(--mauve11); + color: colors.$black; user-select: none; } -.TabsTrigger:first-child { - border-top-left-radius: 6px; -} -.TabsTrigger:last-child { - border-top-right-radius: 6px; -} .TabsTrigger:hover { - color: var(--violet11); + color: colors.$primary-active; + cursor: pointer; } .TabsTrigger[data-state='active'] { - color: var(--violet11); + color: colors.$primary-active; box-shadow: inset 0 -1px 0 0 currentColor, 0 1px 0 0 currentColor; } .TabsTrigger:focus { position: relative; - box-shadow: 0 0 0 2px black; + box-shadow: 0 0 0 2px colors.$primary-active; } .TabsContent { flex-grow: 1; - padding: 20px; - background-color: white; + padding: 12px; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; outline: none; diff --git a/apps/rush-components/src/styles/_base.scss b/apps/rush-components/src/styles/_base.scss index ff8fa2863e6..c8610b0ae5f 100644 --- a/apps/rush-components/src/styles/_base.scss +++ b/apps/rush-components/src/styles/_base.scss @@ -1,7 +1 @@ $shadow: 0 2px 10px hsla(0, 0%, 0%, 0.141); - -$background-primary: white; -$background-secondary: #f3f2f1; - -$active-primary: #107c10; -$active-background: #dff6dd; diff --git a/apps/rush-components/src/styles/_colors.scss b/apps/rush-components/src/styles/_colors.scss new file mode 100644 index 00000000000..e7b9f8273f1 --- /dev/null +++ b/apps/rush-components/src/styles/_colors.scss @@ -0,0 +1,10 @@ +$background-primary: white; +$background-secondary: #f3f2f1; + +$primary-active: #107c10; +$primary-background: #dff6dd; + +$secondary-active: #ab9e8e; + +$black: #000000; +$gray: #666; diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index 4ab073e623c..fec1d2b4360 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "2d4113be0a631885212233ee12084088dd8b09f4", + "pnpmShrinkwrapHash": "c0a0517f72a77533ef59a0226421b18cfb4c3738", "preferredVersionsHash": "5222ca779ae69ebfd201e39c17f48ce9eaf8c3c2" } From fa052f97819709457e3013ae8f31db09c25afbe3 Mon Sep 17 00:00:00 2001 From: William Huang Date: Mon, 9 Jan 2023 10:26:22 -0500 Subject: [PATCH 035/399] feat: tweak styles to fit scroll area --- apps/lockfile-explorer-web/src/App.scss | 2 +- .../src/containers/BookmarksSidebar/index.tsx | 20 +- .../containers/BookmarksSidebar/styles.scss | 2 +- .../LockfileEntryDetailsView/index.tsx | 177 +++++++++--------- .../LockfileEntryDetailsView/styles.scss | 7 +- .../src/containers/LockfileViewer/styles.scss | 1 + .../containers/PackageJsonViewer/index.tsx | 7 +- .../containers/PackageJsonViewer/styles.scss | 6 +- .../containers/SelectedEntryPreview/index.tsx | 24 +-- .../SelectedEntryPreview/styles.scss | 3 +- .../src/components/Button/index.tsx | 4 +- .../src/components/Checkbox/styles.scss | 5 +- .../src/components/ScrollArea/styles.scss | 11 +- 13 files changed, 141 insertions(+), 128 deletions(-) diff --git a/apps/lockfile-explorer-web/src/App.scss b/apps/lockfile-explorer-web/src/App.scss index 3cf4dce5e1b..01c58049d37 100644 --- a/apps/lockfile-explorer-web/src/App.scss +++ b/apps/lockfile-explorer-web/src/App.scss @@ -1,7 +1,7 @@ @use './styles/base'; .ContainerCard { - padding: 24px; + padding: 12px; @include base.card; } diff --git a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx index 7f0ef49e04c..f77266cd947 100644 --- a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx @@ -7,7 +7,7 @@ import styles from './styles.scss'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; import { LockfileEntry } from '../../parsing/LockfileEntry'; import { clearStackAndPush, removeBookmark } from '../../store/slices/entrySlice'; -import { Button } from '@rushstack/components'; +import { Button, ScrollArea } from '@rushstack/components'; export const BookmarksSidebar = (): JSX.Element => { const bookmarks = useAppSelector((state) => state.entry.bookmarkedEntries); @@ -28,14 +28,16 @@ export const BookmarksSidebar = (): JSX.Element => { return (
-
Bookmarks
-
- {bookmarks.map((bookmarkedEntry) => ( -
-

{bookmarkedEntry.displayText}

- -
- ))} + +
Bookmarks
+
+ {bookmarks.map((bookmarkedEntry) => ( +
+

{bookmarkedEntry.displayText}

+ +
+ ))} +
); }; diff --git a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/styles.scss b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/styles.scss index 329508f3696..0e95ded19f2 100644 --- a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/styles.scss @@ -1,6 +1,6 @@ .BookmarksWrapper { - flex: 1; margin: 12px 0; + height: calc(100vh - 94px - 44px); } .BookmarkEntry { diff --git a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx index 14cbd190e32..4a5abf08884 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx @@ -2,6 +2,7 @@ // See LICENSE in the project root for license information. import React, { useCallback, useEffect, useState } from 'react'; +import { ScrollArea } from '@rushstack/components'; import styles from './styles.scss'; import appStyles from '../../App.scss'; import { IDependencyType, LockfileDependency } from '../../parsing/LockfileDependency'; @@ -132,30 +133,32 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => { } return (
-
-
Selected Dependency:
- - {inspectDependency.name}: {inspectDependency.version} - -
-
-
package.json spec:
- - {inspectDependency.dependencyType === IDependencyType.PEER_DEPENDENCY - ? `"${inspectDependency.peerDependencyMeta.version}" ${ - inspectDependency.peerDependencyMeta.optional ? 'Optional' : 'Required' - } Peer` - : inspectDependency.version} - -
-
-
.pnpmfile.cjs:
- - {specChanges.has(inspectDependency.name) - ? displaySpecChanges(specChanges, inspectDependency.name) - : 'No Effect'} - -
+ +
+
Selected Dependency:
+ + {inspectDependency.name}: {inspectDependency.version} + +
+
+
package.json spec:
+ + {inspectDependency.dependencyType === IDependencyType.PEER_DEPENDENCY + ? `"${inspectDependency.peerDependencyMeta.version}" ${ + inspectDependency.peerDependencyMeta.optional ? 'Optional' : 'Required' + } Peer` + : inspectDependency.version} + +
+
+
.pnpmfile.cjs:
+ + {specChanges.has(inspectDependency.name) + ? displaySpecChanges(specChanges, inspectDependency.name) + : 'No Effect'} + +
+
); }; @@ -185,34 +188,36 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => { return (
-
Determinants:
- {determinants.length ? ( - determinants.map(({ entry }) => ( - - {entry.displayText} - - )) - ) : ( -

(none)

- )} -
Transitive Referencers:
- {transitiveReferrers.length ? ( - transitiveReferrers.map(({ entry }) => ( - - {entry.displayText} - - )) - ) : ( -

(none)

- )} + +
Determinants:
+ {determinants.length ? ( + determinants.map(({ entry }) => ( + + {entry.displayText} + + )) + ) : ( +

(none)

+ )} +
Transitive Referencers:
+ {transitiveReferrers.length ? ( + transitiveReferrers.map(({ entry }) => ( + + {entry.displayText} + + )) + ) : ( +

(none)

+ )} +
); }; @@ -231,45 +236,49 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => {
Direct Referrers
- {selectedEntry.referrers?.map((referrer: LockfileEntry) => ( -
-
Name: {referrer.displayText}
-
-

Entry ID: {referrer.rawEntryId}

+ + {selectedEntry.referrers?.map((referrer: LockfileEntry) => ( +
+
Name: {referrer.displayText}
+
+

Entry ID: {referrer.rawEntryId}

+
-
- ))} + ))} +
Direct Dependencies
- {selectedEntry.dependencies?.map((dependency: LockfileDependency) => ( -
-
- Name: {dependency.name}{' '} - {dependency.dependencyType === IDependencyType.PEER_DEPENDENCY - ? `${ - dependency.peerDependencyMeta.optional ? '(Optional)' : '(Non-optional)' - } Peer Dependency` - : ''} -
-
-

Version: {dependency.version}

-

Entry ID: {dependency.entryId}

+ + {selectedEntry.dependencies?.map((dependency: LockfileDependency) => ( +
+
+ Name: {dependency.name}{' '} + {dependency.dependencyType === IDependencyType.PEER_DEPENDENCY + ? `${ + dependency.peerDependencyMeta.optional ? '(Optional)' : '(Non-optional)' + } Peer Dependency` + : ''} +
+
+

Version: {dependency.version}

+

Entry ID: {dependency.entryId}

+
-
- ))} + ))} +
diff --git a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss index 3526efbafdb..14a3a3ce406 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss @@ -6,7 +6,7 @@ height: 30%; padding-top: 12px; & > * { - width: calc(50% - 48px - 12px); + width: calc(50% - 24px - 12px); } h5 { margin: 0; @@ -15,8 +15,7 @@ .DependencyListWrapper { margin-top: 8px; - height: calc(25vh - 24px); - overflow: scroll; + height: calc(100% - 24px); } .DependencyItem { @@ -41,13 +40,11 @@ .InfluencerList { margin-top: 12px; height: 10%; - overflow: scroll; } .DependencyDetails { margin-top: 12px; height: 4%; - overflow: scroll; } .InfluencerEntry { diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss b/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss index 52e06968c03..0267029e7ed 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss @@ -12,6 +12,7 @@ flex-direction: column; min-height: calc(100% - 35px); max-height: calc(100% - 35px); + height: calc(100% - 35px); & > * + * { margin-top: 12px; } diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx index 46e4c348af5..5ee30ba28a5 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx @@ -12,7 +12,7 @@ import { compareSpec } from '../../parsing/compareSpec'; import { loadSpecChanges } from '../../store/slices/workspaceSlice'; import { displaySpecChanges } from '../../helpers/displaySpecChanges'; import { isEntryModified } from '../../helpers/isEntryModified'; -import { Tabs } from '@rushstack/components'; +import { ScrollArea, Tabs } from '@rushstack/components'; enum PackageView { PACKAGE_JSON, @@ -215,7 +215,10 @@ export const PackageJsonViewer = (): JSX.Element => { value={selection} onChange={cb} /> -
{renderFile()}
+ +
+ {renderFile()} +
); }; diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss index 662721382f6..9936a81c208 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss @@ -7,9 +7,9 @@ } .FileContents { - height: calc(25vh - 35px); - overflow: scroll; - padding: 12px; + height: calc(100% - 46px); + padding: 0 12px; + overflow: hidden; } @mixin SpecWrapper { diff --git a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx index 414e446636c..befe2e861b7 100644 --- a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx @@ -11,7 +11,7 @@ import { removeBookmark, selectCurrentEntry } from '../../store/slices/entrySlice'; -import { Button } from '@rushstack/components'; +import { Button, ScrollArea } from '@rushstack/components'; export const SelectedEntryPreview = (): JSX.Element => { const selectedEntry = useAppSelector(selectCurrentEntry); @@ -72,17 +72,19 @@ export const SelectedEntryPreview = (): JSX.Element => { return (
-
-
-
Selected entry:
- {selectedEntry.displayText} + +
+
+
Selected entry:
+ {selectedEntry.displayText} +
+ {renderButtonRow()}
- {renderButtonRow()} -
-
-

Package Entry: {selectedEntry.rawEntryId}

-

Package JSON path: {selectedEntry.packageJsonFolderPath}

-
+
+

Package Entry: {selectedEntry.rawEntryId}

+

Package JSON path: {selectedEntry.packageJsonFolderPath}

+
+
); }; diff --git a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss index 65cb3dfb722..751a2f7fb09 100644 --- a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss @@ -3,9 +3,8 @@ .SelectedEntryCard { margin-top: 12px; @include base.card; - padding: 12px 24px; + padding: 12px; height: 8%; - overflow: scroll; p { font-size: 12px; } diff --git a/apps/rush-components/src/components/Button/index.tsx b/apps/rush-components/src/components/Button/index.tsx index 8401c7c863c..363d423c4dd 100644 --- a/apps/rush-components/src/components/Button/index.tsx +++ b/apps/rush-components/src/components/Button/index.tsx @@ -7,9 +7,9 @@ type ButtonProps = { onClick: () => void; }; -export const Button = ({ children, disabled = false }: ButtonProps) => { +export const Button = ({ children, disabled = false, onClick }: ButtonProps) => { return ( - ); diff --git a/apps/rush-components/src/components/Checkbox/styles.scss b/apps/rush-components/src/components/Checkbox/styles.scss index ebcc1cafd26..b2f05d9dafa 100644 --- a/apps/rush-components/src/components/Checkbox/styles.scss +++ b/apps/rush-components/src/components/Checkbox/styles.scss @@ -13,15 +13,12 @@ button { display: flex; align-items: center; justify-content: center; - box-shadow: 0 2px 10px colors.$black; + border: 1px solid colors.$black; cursor: pointer; } .CheckboxRoot:hover { background-color: colors.$primary-background; } -.CheckboxRoot:focus { - box-shadow: 0 0 0 2px colors.$primary-active; -} .CheckboxIndicator { color: colors.$primary-active; diff --git a/apps/rush-components/src/components/ScrollArea/styles.scss b/apps/rush-components/src/components/ScrollArea/styles.scss index 3c2a13317f1..d20d04d2920 100644 --- a/apps/rush-components/src/components/ScrollArea/styles.scss +++ b/apps/rush-components/src/components/ScrollArea/styles.scss @@ -4,13 +4,16 @@ border-radius: 4px; overflow: hidden; --scrollbar-size: 6px; - height: 100vh; + height: 100%; } .ScrollAreaViewport { width: 100%; height: 100%; border-radius: inherit; + & > * { + padding-right: 8px; + } } .ScrollAreaScrollbar { @@ -20,11 +23,11 @@ /* disable browser handling of all panning and zooming gestures on touch devices */ touch-action: none; padding: 2px; - background: colors.$black; + background: colors.$background-secondary; transition: background 160ms ease-out; } .ScrollAreaScrollbar:hover { - background: colors.$black; + background: colors.$background-secondary; } .ScrollAreaScrollbar[data-orientation='vertical'] { width: var(--scrollbar-size); @@ -54,5 +57,5 @@ } .ScrollAreaCorner { - background: colors.$black; + background: colors.$background-secondary; } From 1eb908870eb213f61db7bd6311658e5cb527dd97 Mon Sep 17 00:00:00 2001 From: William Huang Date: Wed, 11 Jan 2023 13:37:51 -0800 Subject: [PATCH 036/399] feat: Add Text component --- .../src/components/ConnectionModal/index.tsx | 19 +++- .../src/containers/BookmarksSidebar/index.tsx | 8 +- .../containers/BookmarksSidebar/styles.scss | 9 +- .../LockfileEntryDetailsView/index.tsx | 69 +++++++----- .../LockfileEntryDetailsView/styles.scss | 7 -- .../src/containers/LockfileViewer/index.tsx | 20 ++-- .../src/containers/LockfileViewer/styles.scss | 3 - .../containers/PackageJsonViewer/index.tsx | 105 ++++++++++++------ .../containers/SelectedEntryPreview/index.tsx | 14 ++- .../SelectedEntryPreview/styles.scss | 3 - apps/lockfile-explorer-web/src/start.css | 6 - .../src/components/Text/index.tsx | 73 ++++++++++++ .../src/components/Text/styles.scss | 41 +++++++ apps/rush-components/src/start.ts | 1 + 14 files changed, 273 insertions(+), 105 deletions(-) create mode 100644 apps/rush-components/src/components/Text/index.tsx create mode 100644 apps/rush-components/src/components/Text/styles.scss diff --git a/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx b/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx index 52aabafa96a..661cbb9af03 100644 --- a/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx +++ b/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx @@ -2,6 +2,7 @@ // See LICENSE in the project root for license information. import React, { useCallback, useEffect, useState } from 'react'; +import { Button, Text } from '@rushstack/components'; import styles from './styles.scss'; import appStyles from '../../App.scss'; import { checkAliveAsync } from '../../parsing/getPackageFiles'; @@ -41,17 +42,23 @@ export const ConnectionModal = (): JSX.Element | ReactNull => { return (
-
The server has disconnected!
+ + The server has disconnected! + {manualChecked ? ( -

We were still not able to establish a connection to the server. Are you sure it is running?

+ + We were still not able to establish a connection to the server. Are you sure it is running? + ) : ( -

Please re-start the local development server to continue using this application.

+ + Please re-start the local development server to continue using this application. + )}
- - {checking ?

Checking...

: null} + + {checking ? Checking... : null}
diff --git a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx index f77266cd947..749b084ba9e 100644 --- a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx @@ -7,7 +7,7 @@ import styles from './styles.scss'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; import { LockfileEntry } from '../../parsing/LockfileEntry'; import { clearStackAndPush, removeBookmark } from '../../store/slices/entrySlice'; -import { Button, ScrollArea } from '@rushstack/components'; +import { Button, ScrollArea, Text } from '@rushstack/components'; export const BookmarksSidebar = (): JSX.Element => { const bookmarks = useAppSelector((state) => state.entry.bookmarkedEntries); @@ -29,11 +29,13 @@ export const BookmarksSidebar = (): JSX.Element => { return (
-
Bookmarks
+ Bookmarks
{bookmarks.map((bookmarkedEntry) => (
-

{bookmarkedEntry.displayText}

+
+ {bookmarkedEntry.displayText} +
))} diff --git a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/styles.scss b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/styles.scss index 0e95ded19f2..08b03e0a3b4 100644 --- a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/styles.scss @@ -7,10 +7,13 @@ padding: 4px 0; margin-top: 8px; cursor: pointer; - &:hover { - background: #dff6dd; - } & > * + * { margin-top: 8px; } } + +.BookmarkLabel { + &:hover { + background: #dff6dd; + } +} diff --git a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx index 4a5abf08884..913e906b5b0 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import React, { useCallback, useEffect, useState } from 'react'; -import { ScrollArea } from '@rushstack/components'; +import { ScrollArea, Text } from '@rushstack/components'; import styles from './styles.scss'; import appStyles from '../../App.scss'; import { IDependencyType, LockfileDependency } from '../../parsing/LockfileDependency'; @@ -121,7 +121,6 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => { const selectResolvedReferencer = useCallback( (referrer) => () => { - console.log('going to entry: ', referrer); dispatch(pushToStack(referrer)); }, [selectedEntry] @@ -135,28 +134,34 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => {
-
Selected Dependency:
- + + Selected Dependency:{' '} + + {inspectDependency.name}: {inspectDependency.version} - +
-
package.json spec:
- + + package.json spec:{' '} + + {inspectDependency.dependencyType === IDependencyType.PEER_DEPENDENCY ? `"${inspectDependency.peerDependencyMeta.version}" ${ inspectDependency.peerDependencyMeta.optional ? 'Optional' : 'Required' } Peer` : inspectDependency.version} - +
-
.pnpmfile.cjs:
- + + .pnpmfile.cjs:{' '} + + {specChanges.has(inspectDependency.name) ? displaySpecChanges(specChanges, inspectDependency.name) : 'No Effect'} - +
@@ -171,14 +176,14 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => { if (!peerDeps.length) { return (
-
No peer dependencies.
+ No peer dependencies.
); } if (!inspectDependency || inspectDependency.dependencyType !== IDependencyType.PEER_DEPENDENCY) { return (
-
Select a peer dependency to view its influencers
+ Select a peer dependency to view its influencers
); } @@ -189,7 +194,9 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => { return (
-
Determinants:
+ + Determinants: + {determinants.length ? ( determinants.map(({ entry }) => ( { )) ) : ( -

(none)

+ (none) )} -
Transitive Referencers:
+ + Transitive Referencers: + {transitiveReferrers.length ? ( transitiveReferrers.map(({ entry }) => ( { )) ) : ( -

(none)

+ (none) )}
@@ -225,7 +234,9 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => { if (!selectedEntry) { return (
-
Select an entry to view its details
+ + Select an entry to view its details +
); } @@ -234,7 +245,9 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => { <>
-
Direct Referrers
+ + Direct Referrers +
{selectedEntry.referrers?.map((referrer: LockfileEntry) => ( @@ -243,9 +256,11 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => { key={referrer.rawEntryId} onClick={selectResolvedReferencer(referrer)} > -
Name: {referrer.displayText}
+ + Name: {referrer.displayText} +
-

Entry ID: {referrer.rawEntryId}

+ Entry ID: {referrer.rawEntryId}
))} @@ -253,7 +268,9 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => {
-
Direct Dependencies
+ + Direct Dependencies +
{selectedEntry.dependencies?.map((dependency: LockfileDependency) => ( @@ -264,17 +281,17 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => { key={dependency.entryId || dependency.name} onClick={selectResolvedEntry(dependency)} > -
+ Name: {dependency.name}{' '} {dependency.dependencyType === IDependencyType.PEER_DEPENDENCY ? `${ dependency.peerDependencyMeta.optional ? '(Optional)' : '(Non-optional)' } Peer Dependency` : ''} -
+
-

Version: {dependency.version}

-

Entry ID: {dependency.entryId}

+ Version: {dependency.version} + Entry ID: {dependency.entryId}
))} diff --git a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss index 14a3a3ce406..c871eabd2c2 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss @@ -8,9 +8,6 @@ & > * { width: calc(50% - 24px - 12px); } - h5 { - margin: 0; - } } .DependencyListWrapper { @@ -25,9 +22,6 @@ &:hover { border: 1px solid #107c10; } - p { - margin: 0; - } & > * + * { margin-top: 8px; } @@ -60,7 +54,6 @@ display: flex; align-items: center; span { - font-size: 12px; margin-left: 4px; } } diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx index fa21040d791..24fec95c688 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx @@ -13,7 +13,7 @@ import { setFilter as selectFilter } from '../../store/slices/entrySlice'; import { getFilterFromLocalStorage, saveFilterToLocalStorage } from '../../helpers/localStorage'; -import { Tabs, Checkbox, ScrollArea, Input } from '@rushstack/components'; +import { Tabs, Checkbox, ScrollArea, Input, Text } from '@rushstack/components'; interface ILockfileEntryGroup { entryName: string; @@ -51,7 +51,7 @@ const LockfileEntryLi = ({ group }: { group: ILockfileEntryGroup }): JSX.Element selectedEntry?.rawEntryId === entry.rawEntryId ? styles.lockfileSelectedEntry : '' }`} > -
{entry.entryPackageName}
+ {entry.entryPackageName}
))}
@@ -60,7 +60,9 @@ const LockfileEntryLi = ({ group }: { group: ILockfileEntryGroup }): JSX.Element return (
-
{group.entryName}
+ + {group.entryName} + {group.versions.map((entry) => (
-

+ {entry.entryPackageVersion} {entry.entrySuffix && `[${entry.entrySuffix}]`} -

+
))}
@@ -153,13 +155,9 @@ export const LockfileViewer = (): JSX.Element | ReactNull => { const togglePackageView = useCallback( (selected: LockfileEntryFilter) => { if (selected === LockfileEntryFilter.Project) { - console.log('first'); - dispatch(selectFilter({ filter: LockfileEntryFilter.Project, state: true })); dispatch(selectFilter({ filter: LockfileEntryFilter.Package, state: false })); } else { - console.log('elsing'); - dispatch(selectFilter({ filter: LockfileEntryFilter.Package, state: true })); dispatch(selectFilter({ filter: LockfileEntryFilter.Project, state: false })); } @@ -201,7 +199,9 @@ export const LockfileViewer = (): JSX.Element | ReactNull => { {activeFilters[LockfileEntryFilter.Package] ? (
-
Filters
+ + Filters + * + * { margin-top: 4px; } diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx index 5ee30ba28a5..fe479515110 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx @@ -4,7 +4,6 @@ import React, { useCallback, useEffect, useState } from 'react'; import { readPnpmfileAsync, readPackageSpecAsync, readPackageJsonAsync } from '../../parsing/getPackageFiles'; import styles from './styles.scss'; -import appStyles from '../../App.scss'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; import { selectCurrentEntry } from '../../store/slices/entrySlice'; import { IPackageJson } from '../../types/IPackageJson'; @@ -12,7 +11,7 @@ import { compareSpec } from '../../parsing/compareSpec'; import { loadSpecChanges } from '../../store/slices/workspaceSlice'; import { displaySpecChanges } from '../../helpers/displaySpecChanges'; import { isEntryModified } from '../../helpers/isEntryModified'; -import { ScrollArea, Tabs } from '@rushstack/components'; +import { ScrollArea, Tabs, Text } from '@rushstack/components'; enum PackageView { PACKAGE_JSON, @@ -32,7 +31,6 @@ export const PackageJsonViewer = (): JSX.Element => { const [selection, setSelection] = useState(PackageView.PARSED_PACKAGE_JSON); const cb = useCallback((s: PackageView) => setSelection(s), []); - console.log('selection: ', selection); useEffect(() => { async function loadPnpmFileAsync(): Promise { @@ -77,57 +75,73 @@ export const PackageJsonViewer = (): JSX.Element => { case 'add': if (name) { return ( -

+ {dep} -

+ ); } else { return ( -

+ {version} {displaySpecChanges(specChanges, dep)} -

+ ); } case 'diff': if (name) { return ( -

+ {dep} -

+ ); } else { return ( -

+ {version} {displaySpecChanges(specChanges, dep)} -

+ ); } case 'remove': if (name) { return ( -

+ {dep} -

+ ); } else { return ( -

+ {version} {displaySpecChanges(specChanges, dep)} -

+ ); } default: if (name) { - return

{dep}:

; + return ( + + {dep}: + + ); } else { - return

{version}

; + return ( + + {version} + + ); } } } else { if (name) { - return

{dep}:

; + return ( + + {dep}: + + ); } else { - return

{version}

; + return ( + + {version} + + ); } } }; @@ -135,55 +149,80 @@ export const PackageJsonViewer = (): JSX.Element => { const renderFile = (): JSX.Element | null => { switch (selection) { case PackageView.PACKAGE_JSON: - if (!packageJSON) return
Please select a Project or Package to view it's package.json
; + if (!packageJSON) + return ( + + Please select a Project or Package to view it's package.json + + ); return
{JSON.stringify(packageJSON, null, 2)}
; case PackageView.PACKAGE_SPEC: if (!pnpmfile) { return ( -
+ Couldn't load the pnpmfile.cjs file - does it exist in the expected location? (/common/config/rush/.pnpmfile.cjs) -
+ ); } return
{pnpmfile}
; case PackageView.PARSED_PACKAGE_JSON: if (!parsedPackageJSON) - return
Please select a Project or Package to view the parsed package.json
; + return ( + + Please select a Project or Package to view the parsed package.json + + ); return (
-
Package Name:
-

{selectedEntry?.displayText}

+ + Package Name: + + {selectedEntry?.displayText}
-
Version:
-

{selectedEntry?.entryPackageVersion}

+ + Version: + + {selectedEntry?.entryPackageVersion}
-
Dependencies
+ + Dependencies + {parsedPackageJSON.dependencies && Object.entries(parsedPackageJSON.dependencies).map(renderDep(true))} -
Dev Dependencies
+ + Dev Dependencies + {parsedPackageJSON.devDependencies && Object.entries(parsedPackageJSON.devDependencies).map(renderDep(true))} -
Peer Dependencies
+ + Peer Dependencies + {parsedPackageJSON.peerDependencies && Object.entries(parsedPackageJSON.peerDependencies).map(renderDep(true))}
-
 
+ +   + {parsedPackageJSON.dependencies && Object.entries(parsedPackageJSON.dependencies).map(renderDep(false))} -
 
+ +   + {parsedPackageJSON.devDependencies && Object.entries(parsedPackageJSON.devDependencies).map(renderDep(false))} -
 
+ +   + {parsedPackageJSON.peerDependencies && Object.entries(parsedPackageJSON.peerDependencies).map(renderDep(false))}
diff --git a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx index befe2e861b7..c429f13d3f1 100644 --- a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx @@ -11,7 +11,7 @@ import { removeBookmark, selectCurrentEntry } from '../../store/slices/entrySlice'; -import { Button, ScrollArea } from '@rushstack/components'; +import { Button, ScrollArea, Text } from '@rushstack/components'; export const SelectedEntryPreview = (): JSX.Element => { const selectedEntry = useAppSelector(selectCurrentEntry); @@ -63,7 +63,9 @@ export const SelectedEntryPreview = (): JSX.Element => { return (
-
No Entry Selected
+ + No Entry Selected + {renderButtonRow()}
@@ -75,14 +77,16 @@ export const SelectedEntryPreview = (): JSX.Element => {
-
Selected entry:
+ + Selected entry: + {selectedEntry.displayText}
{renderButtonRow()}
-

Package Entry: {selectedEntry.rawEntryId}

-

Package JSON path: {selectedEntry.packageJsonFolderPath}

+ Package Entry: {selectedEntry.rawEntryId} + Package JSON path: {selectedEntry.packageJsonFolderPath}
diff --git a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss index 751a2f7fb09..7a605fc4d94 100644 --- a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss @@ -5,9 +5,6 @@ @include base.card; padding: 12px; height: 8%; - p { - font-size: 12px; - } & > * + * { margin-top: 8px; } diff --git a/apps/lockfile-explorer-web/src/start.css b/apps/lockfile-explorer-web/src/start.css index c7d2f557200..43f0b44e3f4 100644 --- a/apps/lockfile-explorer-web/src/start.css +++ b/apps/lockfile-explorer-web/src/start.css @@ -10,9 +10,3 @@ body { font-family: Tahoma, sans-serif; box-sizing: border-box; } - -h5, -p { - margin: 0; - font-size: 14px; -} diff --git a/apps/rush-components/src/components/Text/index.tsx b/apps/rush-components/src/components/Text/index.tsx new file mode 100644 index 00000000000..29b7f373ac9 --- /dev/null +++ b/apps/rush-components/src/components/Text/index.tsx @@ -0,0 +1,73 @@ +import React from 'react'; +import styles from './styles.scss'; + +export type TextType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span'; + +type TextProps = { + type: TextType; + bold?: boolean; + children: React.ReactNode; + className?: string; +}; +export const Text = ({ type, bold = false, children, className }: TextProps): JSX.Element => { + const generalStyles: { [key in string]: string | number } = { + ['fontWeight']: bold ? 'bold' : 'normal' + }; + + switch (type) { + case 'h1': + return ( +

+ {children} +

+ ); + case 'h2': + return ( +

+ {children} +

+ ); + case 'h3': + return ( +

+ {children} +

+ ); + case 'h4': + return ( +

+ {children} +

+ ); + case 'h5': + return ( + + {children} + + ); + case 'h6': + return ( +
+ {children} +
+ ); + case 'p': + return ( +

+ {children} +

+ ); + case 'span': + return ( + + {children} + + ); + default: + return ( +

+ {children} +

+ ); + } +}; diff --git a/apps/rush-components/src/components/Text/styles.scss b/apps/rush-components/src/components/Text/styles.scss new file mode 100644 index 00000000000..447b18b15ea --- /dev/null +++ b/apps/rush-components/src/components/Text/styles.scss @@ -0,0 +1,41 @@ +@mixin HeadingStyles { + font-weight: bold; + line-height: 1.2; + margin: 0; +} + +.H1 { + @include HeadingStyles; + font-size: 24px; +} +.H2 { + @include HeadingStyles; + font-size: 21px; +} +.H3 { + @include HeadingStyles; + font-size: 19px; +} +.H4 { + @include HeadingStyles; + font-size: 16px; +} +.H5 { + @include HeadingStyles; + font-size: 14px; +} +.H6 { + @include HeadingStyles; + font-size: 12px; +} + +.ParagraphStyles { + margin: 0; + font-weight: normal; + line-height: 1.5; + font-size: 14px; +} + +.SpanStyles { + font-size: 12px; +} diff --git a/apps/rush-components/src/start.ts b/apps/rush-components/src/start.ts index 523b0c611f1..b5fda3a0476 100644 --- a/apps/rush-components/src/start.ts +++ b/apps/rush-components/src/start.ts @@ -3,3 +3,4 @@ export * from './components/ScrollArea'; export * from './components/Tabs'; export * from './components/Checkbox'; export * from './components/Input'; +export * from './components/Text'; From 2c111c5bfaedae63930f7006a30ab08b846579e4 Mon Sep 17 00:00:00 2001 From: William Huang Date: Wed, 11 Jan 2023 15:07:14 -0800 Subject: [PATCH 037/399] chore: fix eslint error --- .../src/containers/LockfileViewer/index.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx index 24fec95c688..7c233021956 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx @@ -153,8 +153,8 @@ export const LockfileViewer = (): JSX.Element | ReactNull => { ); const togglePackageView = useCallback( - (selected: LockfileEntryFilter) => { - if (selected === LockfileEntryFilter.Project) { + (selected: string) => { + if (selected === 'Projects') { dispatch(selectFilter({ filter: LockfileEntryFilter.Project, state: true })); dispatch(selectFilter({ filter: LockfileEntryFilter.Package, state: false })); } else { @@ -178,9 +178,7 @@ export const LockfileViewer = (): JSX.Element | ReactNull => { } ]} value={activeFilters[LockfileEntryFilter.Project] ? 'Projects' : 'Packages'} - onChange={(val) => { - togglePackageView(val === 'Projects' ? LockfileEntryFilter.Project : LockfileEntryFilter.Package); - }} + onChange={togglePackageView} /> Date: Wed, 11 Jan 2023 17:17:39 -0800 Subject: [PATCH 038/399] feat: fix build errors in lockfile explorer --- apps/rush-components/config/jest.config.json | 5 +---- .../src/components/Button/index.tsx | 6 +++--- .../src/components/Checkbox/index.tsx | 2 +- .../rush-components/src/components/Input/index.tsx | 2 +- .../src/components/ScrollArea/index.tsx | 2 +- apps/rush-components/src/components/Tabs/index.tsx | 14 ++++++++------ apps/rush-components/src/components/Text/index.tsx | 10 +++++----- apps/rush-components/tsconfig.json | 3 ++- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/apps/rush-components/config/jest.config.json b/apps/rush-components/config/jest.config.json index 7f2f5dc42b6..7ee087ffe19 100644 --- a/apps/rush-components/config/jest.config.json +++ b/apps/rush-components/config/jest.config.json @@ -1,6 +1,3 @@ { - "extends": "@rushstack/heft-web-rig/profiles/app/config/jest.config.json", - - // Load the initappcontext.js stub when running tests - "setupFiles": ["../lib-commonjs/stub/initappcontext.js"] + "extends": "@rushstack/heft-web-rig/profiles/app/config/jest.config.json" } diff --git a/apps/rush-components/src/components/Button/index.tsx b/apps/rush-components/src/components/Button/index.tsx index 363d423c4dd..7fc50f0350e 100644 --- a/apps/rush-components/src/components/Button/index.tsx +++ b/apps/rush-components/src/components/Button/index.tsx @@ -1,13 +1,13 @@ import React from 'react'; import styles from './styles.scss'; -type ButtonProps = { +interface IButtonProps { children: JSX.Element | string; disabled?: boolean; onClick: () => void; -}; +} -export const Button = ({ children, disabled = false, onClick }: ButtonProps) => { +export const Button = ({ children, disabled = false, onClick }: IButtonProps): JSX.Element => { return ( ); }; diff --git a/apps/rush-components/src/components/Text/index.tsx b/apps/rush-components/src/components/Text/index.tsx index 21a3da12053..a45babcb996 100644 --- a/apps/rush-components/src/components/Text/index.tsx +++ b/apps/rush-components/src/components/Text/index.tsx @@ -8,10 +8,12 @@ interface ITextProps { bold?: boolean; children: React.ReactNode; className?: string; + size?: number; } -export const Text = ({ type, bold = false, children, className }: ITextProps): JSX.Element => { +export const Text = ({ type, bold = false, children, className, size }: ITextProps): JSX.Element => { const generalStyles: { [key in string]: string | number } = { - ['fontWeight']: bold ? 'bold' : 'normal' + ['fontWeight']: bold ? 'bold' : 'normal', + ...(size ? { fontSize: size } : {}) }; switch (type) { diff --git a/apps/rush-components/src/components/Text/styles.scss b/apps/rush-components/src/components/Text/styles.scss index 447b18b15ea..0c3c8369670 100644 --- a/apps/rush-components/src/components/Text/styles.scss +++ b/apps/rush-components/src/components/Text/styles.scss @@ -1,7 +1,13 @@ +@mixin TextStyles { + font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, + 'Open Sans', 'Helvetica Neue', sans-serif; +} + @mixin HeadingStyles { font-weight: bold; line-height: 1.2; margin: 0; + @include TextStyles; } .H1 { @@ -30,6 +36,7 @@ } .ParagraphStyles { + @include TextStyles; margin: 0; font-weight: normal; line-height: 1.5; @@ -37,5 +44,6 @@ } .SpanStyles { + @include TextStyles; font-size: 12px; } From 534c869af26687f3ea116ba7d095d7fd8cab1e1f Mon Sep 17 00:00:00 2001 From: Cheng Liu Date: Wed, 11 Jan 2023 16:24:56 +0000 Subject: [PATCH 040/399] feat(rush): restore log files when cache hit --- common/reviews/api/rush-lib.api.md | 46 +++++- libraries/rush-lib/src/index.ts | 5 + .../src/logic/operations/IOperationRunner.ts | 6 +- .../operations/OperationExecutionRecord.ts | 8 +- .../operations/OperationMetadataManager.ts | 149 ++++++++++++++++++ .../logic/operations/OperationStateFile.ts | 43 +++-- .../logic/operations/ProjectLogWritable.ts | 63 +++++--- .../logic/operations/ShellOperationRunner.ts | 54 ++++--- 8 files changed, 298 insertions(+), 76 deletions(-) create mode 100644 libraries/rush-lib/src/logic/operations/OperationMetadataManager.ts diff --git a/common/reviews/api/rush-lib.api.md b/common/reviews/api/rush-lib.api.md index 2a0de769dcd..1771603bbe2 100644 --- a/common/reviews/api/rush-lib.api.md +++ b/common/reviews/api/rush-lib.api.md @@ -389,6 +389,24 @@ export interface IOperationExecutionResult { readonly stopwatch: IStopwatchResult; } +// @internal (undocumented) +export interface _IOperationMetadata { + // (undocumented) + durationInSeconds: number; + // (undocumented) + errorLogPath: string; + // (undocumented) + logPath: string; +} + +// @internal (undocumented) +export interface _IOperationMetadataManagerOptions { + // (undocumented) + phase: IPhase; + // (undocumented) + rushProject: RushConfigurationProject; +} + // @alpha export interface IOperationOptions { phase?: IPhase | undefined; @@ -412,7 +430,7 @@ export interface IOperationRunnerContext { collatedWriter: CollatedWriter; debugMode: boolean; // @internal - _operationStateFile?: _OperationStateFile; + _operationMetadataManager?: _OperationMetadataManager; quietMode: boolean; stdioSummarizer: StdioSummarizer; stopwatch: IStopwatchResult; @@ -421,9 +439,9 @@ export interface IOperationRunnerContext { // @internal (undocumented) export interface _IOperationStateFileOptions { // (undocumented) - phase: IPhase; + metadataFolder: string; // (undocumented) - rushProject: RushConfigurationProject; + projectFolder: string; } // @internal (undocumented) @@ -615,11 +633,29 @@ export class Operation { weight: number; } +// @internal +export class _OperationMetadataManager { + constructor(options: _IOperationMetadataManagerOptions); + get relativeFilepaths(): string[]; + // (undocumented) + saveAsync({ durationInSeconds, logPath, errorLogPath }: _IOperationMetadata): Promise; + // (undocumented) + readonly stateFile: _OperationStateFile; + // (undocumented) + tryRestoreAsync({ terminal, logPath, errorLogPath }: { + terminal: ITerminal; + logPath: string; + errorLogPath: string; + }): Promise; +} + // @internal export class _OperationStateFile { constructor(options: _IOperationStateFileOptions); - readonly filename: string; - static getFilenameRelativeToProjectRoot(phase: IPhase): string; + // (undocumented) + static filename: string; + readonly filepath: string; + readonly relativeFilepath: string; // (undocumented) get state(): _IOperationStateJson | undefined; // (undocumented) diff --git a/libraries/rush-lib/src/index.ts b/libraries/rush-lib/src/index.ts index f969c51adb4..c7ccd5474a8 100644 --- a/libraries/rush-lib/src/index.ts +++ b/libraries/rush-lib/src/index.ts @@ -126,3 +126,8 @@ export { IOperationStateFileOptions as _IOperationStateFileOptions, IOperationStateJson as _IOperationStateJson } from './logic/operations/OperationStateFile'; +export { + OperationMetadataManager as _OperationMetadataManager, + IOperationMetadataManagerOptions as _IOperationMetadataManagerOptions, + IOperationMetaData as _IOperationMetadata +} from './logic/operations/OperationMetadataManager'; diff --git a/libraries/rush-lib/src/logic/operations/IOperationRunner.ts b/libraries/rush-lib/src/logic/operations/IOperationRunner.ts index 82bcae1ef00..22062e82b71 100644 --- a/libraries/rush-lib/src/logic/operations/IOperationRunner.ts +++ b/libraries/rush-lib/src/logic/operations/IOperationRunner.ts @@ -5,7 +5,7 @@ import type { StdioSummarizer } from '@rushstack/terminal'; import type { CollatedWriter } from '@rushstack/stream-collator'; import type { OperationStatus } from './OperationStatus'; -import type { OperationStateFile } from './OperationStateFile'; +import type { OperationMetadataManager } from './OperationMetadataManager'; import type { IStopwatchResult } from '../../utilities/Stopwatch'; /** @@ -31,11 +31,11 @@ export interface IOperationRunnerContext { */ stdioSummarizer: StdioSummarizer; /** - * Object used to record state of the operation. + * Object used to manage metadata of the operation. * * @internal */ - _operationStateFile?: OperationStateFile; + _operationMetadataManager?: OperationMetadataManager; /** * Object used to track elapsed time. */ diff --git a/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts b/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts index c285d9b6371..11cd208e8bd 100644 --- a/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts +++ b/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts @@ -9,7 +9,7 @@ import { OperationStatus } from './OperationStatus'; import { IOperationRunner, IOperationRunnerContext } from './IOperationRunner'; import { Operation } from './Operation'; import { Stopwatch } from '../../utilities/Stopwatch'; -import { OperationStateFile } from './OperationStateFile'; +import { OperationMetadataManager } from './OperationMetadataManager'; export interface IOperationExecutionRecordContext { streamCollator: StreamCollator; @@ -81,7 +81,7 @@ export class OperationExecutionRecord implements IOperationRunnerContext { public readonly runner: IOperationRunner; public readonly weight: number; - public readonly _operationStateFile: OperationStateFile | undefined; + public readonly _operationMetadataManager: OperationMetadataManager | undefined; private readonly _context: IOperationExecutionRecordContext; @@ -99,7 +99,7 @@ export class OperationExecutionRecord implements IOperationRunnerContext { this.runner = runner; this.weight = operation.weight; if (operation.associatedPhase && operation.associatedProject) { - this._operationStateFile = new OperationStateFile({ + this._operationMetadataManager = new OperationMetadataManager({ phase: operation.associatedPhase, rushProject: operation.associatedProject }); @@ -129,7 +129,7 @@ export class OperationExecutionRecord implements IOperationRunnerContext { public get nonCachedDurationMs(): number | undefined { // Lazy calculated because the state file is created/restored later on - return this._operationStateFile?.state?.nonCachedDurationMs; + return this._operationMetadataManager?.stateFile.state?.nonCachedDurationMs; } public async executeAsync(onResult: (record: OperationExecutionRecord) => void): Promise { diff --git a/libraries/rush-lib/src/logic/operations/OperationMetadataManager.ts b/libraries/rush-lib/src/logic/operations/OperationMetadataManager.ts new file mode 100644 index 00000000000..5dd098daafa --- /dev/null +++ b/libraries/rush-lib/src/logic/operations/OperationMetadataManager.ts @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import * as fs from 'fs'; +import { FileSystem, ITerminal } from '@rushstack/node-core-library'; + +import { OperationStateFile } from './OperationStateFile'; +import { RushConstants } from '../RushConstants'; + +import type { IPhase } from '../../api/CommandLineConfiguration'; +import type { RushConfigurationProject } from '../../api/RushConfigurationProject'; +import type { IOperationStateJson } from './OperationStateFile'; + +/** + * @internal + */ +export interface IOperationMetadataManagerOptions { + rushProject: RushConfigurationProject; + phase: IPhase; +} + +/** + * @internal + */ +export interface IOperationMetaData { + durationInSeconds: number; + logPath: string; + errorLogPath: string; +} + +/** + * A helper class for managing the meta files of a operation. + * + * @internal + */ +export class OperationMetadataManager { + public readonly stateFile: OperationStateFile; + private _metadataFolder: string; + private _logPath: string; + private _errorLogPath: string; + private _relativeLogPath: string; + private _relativeErrorLogPath: string; + + public constructor(options: IOperationMetadataManagerOptions) { + const { rushProject, phase } = options; + const { projectFolder } = rushProject; + + const identifier: string = phase.logFilenameIdentifier; + this._metadataFolder = `${RushConstants.projectRushFolderName}/${RushConstants.rushTempFolderName}/operation/${identifier}`; + + this.stateFile = new OperationStateFile({ + projectFolder: projectFolder, + metadataFolder: this._metadataFolder + }); + + this._relativeLogPath = `${this._metadataFolder}/all.log`; + this._relativeErrorLogPath = `${this._metadataFolder}/error.log`; + this._logPath = `${projectFolder}/${this._relativeLogPath}`; + this._errorLogPath = `${projectFolder}/${this._relativeErrorLogPath}`; + } + + /** + * Returns the relative paths of the metadata files to project folder. + * + * Example: `.rush/temp/operation/_phase_build/state.json` + * Example: `.rush/temp/operation/_phase_build/all.log` + * Example: `.rush/temp/operation/_phase_build/error.log` + */ + public get relativeFilepaths(): string[] { + return [this.stateFile.relativeFilepath, this._relativeLogPath, this._relativeErrorLogPath]; + } + + public async saveAsync({ durationInSeconds, logPath, errorLogPath }: IOperationMetaData): Promise { + const state: IOperationStateJson = { + nonCachedDurationMs: durationInSeconds * 1000 + }; + await this.stateFile.writeAsync(state); + + try { + await FileSystem.copyFileAsync({ + sourcePath: logPath, + destinationPath: this._logPath + }); + } catch (e) { + if (!FileSystem.isNotExistError(e)) { + throw e; + } + } + try { + await FileSystem.copyFileAsync({ + sourcePath: errorLogPath, + destinationPath: this._relativeLogPath + }); + } catch (e) { + if (!FileSystem.isNotExistError(e)) { + throw e; + } + } + } + + public async tryRestoreAsync({ + terminal, + logPath, + errorLogPath + }: { + terminal: ITerminal; + logPath: string; + errorLogPath: string; + }): Promise { + await this.stateFile.tryRestoreAsync(); + + // Append cached log into current log file + terminal.writeLine(''); + terminal.writeLine(`Restoring cached log file at ${this._logPath}`); + try { + await new Promise((resolve, reject) => { + const logReadStream: fs.ReadStream = fs.createReadStream(this._logPath, { + encoding: 'utf-8' + }); + + logReadStream.on('data', (data) => { + terminal.write(data); + }); + logReadStream.on('end', () => { + resolve(); + }); + logReadStream.on('error', (e) => { + reject(e); + }); + }); + } catch (e) { + if (!FileSystem.isNotExistError(e)) { + throw e; + } + } + + // Try to restore cached error log as error log file + try { + await FileSystem.copyFileAsync({ + sourcePath: this._errorLogPath, + destinationPath: errorLogPath + }); + } catch (e) { + if (!FileSystem.isNotExistError(e)) { + throw e; + } + } + } +} diff --git a/libraries/rush-lib/src/logic/operations/OperationStateFile.ts b/libraries/rush-lib/src/logic/operations/OperationStateFile.ts index cb6c9f82335..de8b6ed7321 100644 --- a/libraries/rush-lib/src/logic/operations/OperationStateFile.ts +++ b/libraries/rush-lib/src/logic/operations/OperationStateFile.ts @@ -2,17 +2,13 @@ // See LICENSE in the project root for license information. import { FileSystem, InternalError, JsonFile } from '@rushstack/node-core-library'; -import { RushConstants } from '../RushConstants'; - -import type { IPhase } from '../../api/CommandLineConfiguration'; -import type { RushConfigurationProject } from '../../api/RushConfigurationProject'; /** * @internal */ export interface IOperationStateFileOptions { - rushProject: RushConfigurationProject; - phase: IPhase; + projectFolder: string; + metadataFolder: string; } /** @@ -31,28 +27,25 @@ export class OperationStateFile { private _state: IOperationStateJson | undefined; /** - * Returns the filename of the metadata file. + * The path of the state json file. + * + * Example: `/code/repo/my-project/.rush/temp/operation/_phase_build/state.json` */ - public readonly filename: string; - - public constructor(options: IOperationStateFileOptions) { - const { rushProject, phase } = options; - this.filename = OperationStateFile._getFilename(phase, rushProject); - } - - private static _getFilename(phase: IPhase, project: RushConfigurationProject): string { - const relativeFilename: string = OperationStateFile.getFilenameRelativeToProjectRoot(phase); - return `${project.projectFolder}/${relativeFilename}`; - } + public readonly filepath: string; /** - * ProjectBuildCache expects the relative path for better logging + * The relative path of the state json file to project folder * - * @internal + * Example: `.rush/temp/operation/_phase_build/state.json` */ - public static getFilenameRelativeToProjectRoot(phase: IPhase): string { - const identifier: string = phase.logFilenameIdentifier; - return `${RushConstants.projectRushFolderName}/${RushConstants.rushTempFolderName}/operation/${identifier}/state.json`; + public readonly relativeFilepath: string; + + public static filename: string = 'state.json'; + + public constructor(options: IOperationStateFileOptions) { + const { projectFolder, metadataFolder } = options; + this.relativeFilepath = `${metadataFolder}/${OperationStateFile.filename}`; + this.filepath = `${projectFolder}/${this.relativeFilepath}`; } public get state(): IOperationStateJson | undefined { @@ -60,13 +53,13 @@ export class OperationStateFile { } public async writeAsync(json: IOperationStateJson): Promise { - await JsonFile.saveAsync(json, this.filename, { ensureFolderExists: true, updateExistingFile: true }); + await JsonFile.saveAsync(json, this.filepath, { ensureFolderExists: true, updateExistingFile: true }); this._state = json; } public async tryRestoreAsync(): Promise { try { - this._state = await JsonFile.loadAsync(this.filename); + this._state = await JsonFile.loadAsync(this.filepath); } catch (error) { if (FileSystem.isNotExistError(error as Error)) { this._state = undefined; diff --git a/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts b/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts index 0310f0c6269..838811c41e4 100644 --- a/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts +++ b/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts @@ -13,8 +13,10 @@ export class ProjectLogWritable extends TerminalWritable { private readonly _project: RushConfigurationProject; private readonly _terminal: CollatedTerminal; - private _logPath: string; - private _errorLogPath: string; + public readonly logPath: string; + public readonly errorLogPath: string; + public readonly relativeLogPath: string; + public readonly relativeErrorLogPath: string; private _logWriter: FileWriter | undefined = undefined; private _errorLogWriter: FileWriter | undefined = undefined; @@ -29,22 +31,35 @@ export class ProjectLogWritable extends TerminalWritable { this._terminal = terminal; function getLogFilePaths( - basePath: string, - logFilenameIdentifier: string - ): { logPath: string; errorLogPath: string } { + projectFolder: string, + logFilenameIdentifier: string, + logFolder?: string + ): { logPath: string; errorLogPath: string; relativeLogPath: string; relativeErrorLogPath: string } { const unscopedProjectName: string = PackageNameParsers.permissive.getUnscopedName(project.packageName); + const logFilename: string = `${unscopedProjectName}.${logFilenameIdentifier}.log`; + const errorLogFilename: string = `${unscopedProjectName}.${logFilenameIdentifier}.error.log`; + + const relativeLogPath: string = logFolder ? `${logFolder}/${logFilename}` : logFilename; + const relativeErrorLogPath: string = logFolder ? `${logFolder}/${errorLogFilename}` : errorLogFilename; + + const logPath: string = `${projectFolder}/${relativeLogPath}`; + const errorLogPath: string = `${projectFolder}/${relativeErrorLogPath}`; return { - logPath: `${basePath}/${unscopedProjectName}.${logFilenameIdentifier}.log`, - errorLogPath: `${basePath}/${unscopedProjectName}.${logFilenameIdentifier}.error.log` + logPath, + errorLogPath, + relativeLogPath, + relativeErrorLogPath }; } const projectFolder: string = this._project.projectFolder; - const { logPath: legacyLogPath, errorLogPath: legacyErrorLogPath } = getLogFilePaths( - projectFolder, - 'build' - ); + const { + logPath: legacyLogPath, + errorLogPath: legacyErrorLogPath, + relativeLogPath: legacyRelativeLogPath, + relativeErrorLogPath: legacyRelativeErrorLogPath + } = getLogFilePaths(projectFolder, 'build'); // If the phased commands experiment is enabled, put logs under `rush-logs` if (project.rushConfiguration.experimentsConfiguration.configuration.phasedCommands) { // Delete the legacy logs @@ -54,18 +69,26 @@ export class ProjectLogWritable extends TerminalWritable { const logPathPrefix: string = `${projectFolder}/${RushConstants.rushLogsFolderName}`; FileSystem.ensureFolder(logPathPrefix); - const { logPath, errorLogPath } = getLogFilePaths(logPathPrefix, logFilenameIdentifier); - this._logPath = logPath; - this._errorLogPath = errorLogPath; + const { logPath, errorLogPath, relativeLogPath, relativeErrorLogPath } = getLogFilePaths( + projectFolder, + logFilenameIdentifier, + RushConstants.rushLogsFolderName + ); + this.logPath = logPath; + this.errorLogPath = errorLogPath; + this.relativeLogPath = relativeLogPath; + this.relativeErrorLogPath = relativeErrorLogPath; } else { - this._logPath = legacyLogPath; - this._errorLogPath = legacyErrorLogPath; + this.logPath = legacyLogPath; + this.errorLogPath = legacyErrorLogPath; + this.relativeLogPath = legacyRelativeLogPath; + this.relativeErrorLogPath = legacyRelativeErrorLogPath; } - FileSystem.deleteFile(this._logPath); - FileSystem.deleteFile(this._errorLogPath); + FileSystem.deleteFile(this.logPath); + FileSystem.deleteFile(this.errorLogPath); - this._logWriter = FileWriter.open(this._logPath); + this._logWriter = FileWriter.open(this.logPath); } protected onWriteChunk(chunk: ITerminalChunk): void { @@ -78,7 +101,7 @@ export class ProjectLogWritable extends TerminalWritable { if (chunk.kind === TerminalChunkKind.Stderr) { // Only stderr gets written to *..error.log if (!this._errorLogWriter) { - this._errorLogWriter = FileWriter.open(this._errorLogPath); + this._errorLogWriter = FileWriter.open(this.errorLogPath); } this._errorLogWriter.write(chunk.text); } diff --git a/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts b/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts index 147b5609d5d..094a78e526f 100644 --- a/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts +++ b/libraries/rush-lib/src/logic/operations/ShellOperationRunner.ts @@ -33,7 +33,7 @@ import { IOperationSettings, RushProjectConfiguration } from '../../api/RushProj import { CollatedTerminalProvider } from '../../utilities/CollatedTerminalProvider'; import { RushConstants } from '../RushConstants'; import { EnvironmentConfiguration } from '../../api/EnvironmentConfiguration'; -import { OperationStateFile } from './OperationStateFile'; +import { OperationMetadataManager } from './OperationMetadataManager'; import type { RushConfiguration } from '../../api/RushConfiguration'; import type { RushConfigurationProject } from '../../api/RushConfigurationProject'; @@ -208,17 +208,17 @@ export class ShellOperationRunner implements IOperationRunner { } let projectDeps: IProjectDeps | undefined; - let trackedFiles: string[] | undefined; + let trackedProjectFiles: string[] | undefined; try { const fileHashes: Map | undefined = await this._projectChangeAnalyzer._tryGetProjectDependenciesAsync(this._rushProject, terminal); if (fileHashes) { const files: { [filePath: string]: string } = {}; - trackedFiles = []; + trackedProjectFiles = []; for (const [filePath, fileHash] of fileHashes) { files[filePath] = fileHash; - trackedFiles.push(filePath); + trackedProjectFiles.push(filePath); } projectDeps = { @@ -264,10 +264,11 @@ export class ShellOperationRunner implements IOperationRunner { // let buildCacheReadAttempted: boolean = false; if (this._isCacheReadAllowed) { - const projectBuildCache: ProjectBuildCache | undefined = await this._tryGetProjectBuildCacheAsync( + const projectBuildCache: ProjectBuildCache | undefined = await this._tryGetProjectBuildCacheAsync({ terminal, - trackedFiles - ); + trackedProjectFiles, + operationMetadataManager: context._operationMetadataManager + }); buildCacheReadAttempted = !!projectBuildCache; const restoreFromCacheSuccess: boolean | undefined = @@ -275,7 +276,11 @@ export class ShellOperationRunner implements IOperationRunner { if (restoreFromCacheSuccess) { // Restore the original state of the operation without cache - await context._operationStateFile?.tryRestoreAsync(); + await context._operationMetadataManager?.tryRestoreAsync({ + terminal, + logPath: projectLogWritable.logPath, + errorLogPath: projectLogWritable.errorLogPath + }); return OperationStatus.FromCache; } } @@ -373,18 +378,24 @@ export class ShellOperationRunner implements IOperationRunner { ensureFolderExists: true }); - // If the operation without cache was successful, we can save the state to disk + // If the operation without cache was successful, we can save the metadata to disk const { duration: durationInSeconds } = context.stopwatch; - await context._operationStateFile?.writeAsync({ - nonCachedDurationMs: durationInSeconds * 1000 + await context._operationMetadataManager?.saveAsync({ + durationInSeconds, + logPath: projectLogWritable.logPath, + errorLogPath: projectLogWritable.errorLogPath }); // If the command is successful, we can calculate project hash, and no dependencies were skipped, // write a new cache entry. const setCacheEntryPromise: Promise | undefined = this.isCacheWriteAllowed - ? (await this._tryGetProjectBuildCacheAsync(terminal, trackedFiles))?.trySetCacheEntryAsync( - terminal - ) + ? ( + await this._tryGetProjectBuildCacheAsync({ + terminal, + trackedProjectFiles, + operationMetadataManager: context._operationMetadataManager + }) + )?.trySetCacheEntryAsync(terminal) : undefined; const [, cacheWriteSuccess] = await Promise.all([writeProjectStatePromise, setCacheEntryPromise]); @@ -410,10 +421,15 @@ export class ShellOperationRunner implements IOperationRunner { } } - private async _tryGetProjectBuildCacheAsync( - terminal: ITerminal, - trackedProjectFiles: string[] | undefined - ): Promise { + private async _tryGetProjectBuildCacheAsync({ + terminal, + trackedProjectFiles, + operationMetadataManager + }: { + terminal: ITerminal; + trackedProjectFiles: string[] | undefined; + operationMetadataManager: OperationMetadataManager | undefined; + }): Promise { if (this._projectBuildCache === UNINITIALIZED) { this._projectBuildCache = undefined; @@ -442,7 +458,7 @@ export class ShellOperationRunner implements IOperationRunner { const projectOutputFolderNames: ReadonlyArray = operationSettings.outputFolderNames || []; const additionalProjectOutputFilePaths: ReadonlyArray = [ - OperationStateFile.getFilenameRelativeToProjectRoot(this._phase) + ...(operationMetadataManager?.relativeFilepaths || []) ]; const additionalContext: Record = {}; if (operationSettings.dependsOnEnvVars) { From 03eaf2f1732689a95d0645caafd8abe9481d3ddd Mon Sep 17 00:00:00 2001 From: Cheng Liu Date: Wed, 11 Jan 2023 16:26:14 +0000 Subject: [PATCH 041/399] chore: rush change --- .../rush/feat-build-cache-log_2023-01-11-16-25.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@microsoft/rush/feat-build-cache-log_2023-01-11-16-25.json diff --git a/common/changes/@microsoft/rush/feat-build-cache-log_2023-01-11-16-25.json b/common/changes/@microsoft/rush/feat-build-cache-log_2023-01-11-16-25.json new file mode 100644 index 00000000000..02a323f8d92 --- /dev/null +++ b/common/changes/@microsoft/rush/feat-build-cache-log_2023-01-11-16-25.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Restore log files when cache hit", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file From 42578bde93e761a04589852b3660dbb74cb54699 Mon Sep 17 00:00:00 2001 From: Rongqi Zhou Date: Thu, 12 Jan 2023 17:43:12 +0800 Subject: [PATCH 042/399] add support for storybook options --- common/reviews/api/heft-storybook-plugin.api.md | 7 ++++--- .../heft-storybook-plugin/src/StorybookPlugin.ts | 14 ++++++++++++++ .../heft-storybook-plugin/src/StorybookRunner.ts | 5 +++++ .../src/schemas/heft-storybook-plugin.schema.json | 5 +++++ 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/common/reviews/api/heft-storybook-plugin.api.md b/common/reviews/api/heft-storybook-plugin.api.md index 368eb5c255a..3cfd97c0198 100644 --- a/common/reviews/api/heft-storybook-plugin.api.md +++ b/common/reviews/api/heft-storybook-plugin.api.md @@ -12,9 +12,10 @@ export default _default; // @public export interface IStorybookPluginOptions { - startupModulePath?: string; - staticBuildModulePath?: string; - storykitPackageName: string; + options?: string[]; + startupModulePath?: string; + staticBuildModulePath?: string; + storykitPackageName: string; } ``` diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts index 398735d866b..108b1829b96 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts @@ -77,6 +77,17 @@ export interface IStorybookPluginOptions { * `"staticBuildModulePath": "@storybook/react/bin/build.js"` */ staticBuildModulePath?: string; + + /** + * The storybook defined cli options for start and build storybook. + * If this is empty, then it will use the default options config. + * + * @example + * If you want to change the static build output dir to staticBuildDir, then the cli option would be: + * + * `"options": [ "--output-dir=staticBuildDir" ]` + */ + options?: string[]; } /** @public */ @@ -88,6 +99,7 @@ export class StorybookPlugin implements IHeftPlugin { private _storykitPackageName!: string; private _modulePath!: string; private _resolvedModulePath!: string; + private _options?: string[]; /** * Generate typings for Sass files before TypeScript compilation. @@ -115,6 +127,7 @@ export class StorybookPlugin implements IHeftPlugin { ); } this._storykitPackageName = options.storykitPackageName; + this._options = options.options; if (!options.startupModulePath && !options.staticBuildModulePath) { throw new Error( @@ -242,6 +255,7 @@ export class StorybookPlugin implements IHeftPlugin { heftConfiguration.terminalProvider, { buildFolder: heftConfiguration.buildFolder, + options: this._options, resolvedStartupModulePath: this._resolvedModulePath }, // TODO: Extract SubprocessRunnerBase into a public API diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts b/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts index cc60d2ab598..f614cabc2e2 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts @@ -11,6 +11,7 @@ import { export interface IStorybookRunnerConfiguration extends ISubprocessRunnerBaseConfiguration { resolvedStartupModulePath: string; + options?: string[]; } // TODO: Why must this be a different name from the logger in StorybookPlugin.ts? @@ -29,6 +30,10 @@ export class StorybookRunner extends SubprocessRunnerBase Date: Thu, 12 Jan 2023 14:22:24 +0100 Subject: [PATCH 043/399] Apply suggestions from code review Co-authored-by: Ian Clanton-Thuon --- .../rush/stekycz-git-hooks-exec_2023-01-05-10-36.json | 2 +- libraries/rush-lib/src/logic/base/BaseInstallManager.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/changes/@microsoft/rush/stekycz-git-hooks-exec_2023-01-05-10-36.json b/common/changes/@microsoft/rush/stekycz-git-hooks-exec_2023-01-05-10-36.json index 11653445111..f583b5c77a2 100644 --- a/common/changes/@microsoft/rush/stekycz-git-hooks-exec_2023-01-05-10-36.json +++ b/common/changes/@microsoft/rush/stekycz-git-hooks-exec_2023-01-05-10-36.json @@ -2,7 +2,7 @@ "changes": [ { "packageName": "@microsoft/rush", - "comment": "[rush] Create custom git hooks instead of copy", + "comment": "Generate scripts in the Git hooks folder referring to the actual hook implementations in-place in the Rush `common/git-hooks/` folder instead of copying the scripts to the Git hooks folder.", "type": "none" } ], diff --git a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts index 1dd39d612cf..0f09638079f 100644 --- a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts +++ b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts @@ -462,7 +462,7 @@ SCRIPT_IMPLEMENTATION_PATH="$SCRIPT_DIR/${hookRelativePath}/${filename}" if [[ -f "$SCRIPT_IMPLEMENTATION_PATH" ]]; then exec "$SCRIPT_IMPLEMENTATION_PATH" else - echo "The ${filename} Git hook does not exist in your version of the repo. Either remove the ${filename} hook file (e.g. '.git/hooks/${filename}') in case this feature is not used anymore in main branch. Otherwise, updating your branch to current mainstream will solve the issue." + echo "The ${filename} Git hook no longer exists in your version of the repo. Run 'rush install' or 'rush update' to refresh your installed Git hooks." fi `; // Create the hook file. Important: For Bash scripts, the EOL must not be CRLF. From 8a18dec0ca8c7b815f70e430fda6f3d8f0f9c030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C5=A0tekl?= Date: Thu, 12 Jan 2023 14:29:41 +0100 Subject: [PATCH 044/399] Redirect the warning message to stderr instead of stdout --- libraries/rush-lib/src/logic/base/BaseInstallManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts index 0f09638079f..da32cdc46d0 100644 --- a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts +++ b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts @@ -462,7 +462,7 @@ SCRIPT_IMPLEMENTATION_PATH="$SCRIPT_DIR/${hookRelativePath}/${filename}" if [[ -f "$SCRIPT_IMPLEMENTATION_PATH" ]]; then exec "$SCRIPT_IMPLEMENTATION_PATH" else - echo "The ${filename} Git hook no longer exists in your version of the repo. Run 'rush install' or 'rush update' to refresh your installed Git hooks." + echo "The ${filename} Git hook no longer exists in your version of the repo. Run 'rush install' or 'rush update' to refresh your installed Git hooks." >&2 fi `; // Create the hook file. Important: For Bash scripts, the EOL must not be CRLF. From f0410f062b3e2d49c39bb293c1eb8c462e3ea92e Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 12 Jan 2023 09:48:19 -0800 Subject: [PATCH 045/399] chore: clean up typing in components --- .../src/components/Checkbox/index.tsx | 10 ++++------ .../rush-components/src/components/Input/index.tsx | 11 ++++------- .../src/components/ScrollArea/index.tsx | 7 ++++++- apps/rush-components/src/components/Tabs/index.tsx | 14 +++++--------- apps/rush-components/src/components/Text/index.tsx | 3 ++- 5 files changed, 21 insertions(+), 24 deletions(-) diff --git a/apps/rush-components/src/components/Checkbox/index.tsx b/apps/rush-components/src/components/Checkbox/index.tsx index 84e452f0374..1aac392cba2 100644 --- a/apps/rush-components/src/components/Checkbox/index.tsx +++ b/apps/rush-components/src/components/Checkbox/index.tsx @@ -3,15 +3,13 @@ import * as RadixCheckbox from '@radix-ui/react-checkbox'; import { CheckIcon } from '@radix-ui/react-icons'; import styles from './styles.scss'; -export const Checkbox = ({ - label, - isChecked, - onChecked -}: { +export interface ICheckboxProps { label: string; isChecked: boolean; onChecked: (checked: boolean) => void; -}): JSX.Element => ( +} + +export const Checkbox = ({ label, isChecked, onChecked }: ICheckboxProps): JSX.Element => (
) => void; type?: string; placeholder?: string; -}): JSX.Element => { +} + +export const Input = ({ value, placeholder, onChange, type = 'text' }: IInputProps): JSX.Element => { return ( ( +export interface IScrollAreaProps { + children: React.ReactNode; +} + +// Note: the height of the scroll area's parent must be fixed +export const ScrollArea = ({ children }: IScrollAreaProps): JSX.Element => ( {children} diff --git a/apps/rush-components/src/components/Tabs/index.tsx b/apps/rush-components/src/components/Tabs/index.tsx index ecd70b9a72f..1973d635610 100644 --- a/apps/rush-components/src/components/Tabs/index.tsx +++ b/apps/rush-components/src/components/Tabs/index.tsx @@ -2,26 +2,22 @@ import React from 'react'; import * as RadixTabs from '@radix-ui/react-tabs'; import styles from './styles.scss'; -interface ITabsItem { +export interface ITabsItem { header: string; value?: string | number; body?: React.ReactNode; } -export const Tabs = ({ - items, - def, - value, - onChange, - renderChildren -}: { +export interface ITabsProps { items: ITabsItem[]; def?: string; value?: string | number; // eslint-disable-next-line @typescript-eslint/no-explicit-any onChange?: (value: any) => void; renderChildren?: () => JSX.Element; -}): JSX.Element => { +} + +export const Tabs = ({ items, def, value, onChange, renderChildren }: ITabsProps): JSX.Element => { const getItemValue = (item: ITabsItem): string | number => item.value === undefined ? item.header : item.value; return ( diff --git a/apps/rush-components/src/components/Text/index.tsx b/apps/rush-components/src/components/Text/index.tsx index a45babcb996..a2f3f37a512 100644 --- a/apps/rush-components/src/components/Text/index.tsx +++ b/apps/rush-components/src/components/Text/index.tsx @@ -3,13 +3,14 @@ import styles from './styles.scss'; export type TextType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span'; -interface ITextProps { +export interface ITextProps { type: TextType; bold?: boolean; children: React.ReactNode; className?: string; size?: number; } + export const Text = ({ type, bold = false, children, className, size }: ITextProps): JSX.Element => { const generalStyles: { [key in string]: string | number } = { ['fontWeight']: bold ? 'bold' : 'normal', From cf5dc13fe345e967251115c06e0d57cf5a39870b Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 12 Jan 2023 10:09:10 -0800 Subject: [PATCH 046/399] chore: update README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 988e395797c..907fc0a896f 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ These GitHub repositories provide supplementary resources for Rush Stack: | Folder | Description | | ------ | -----------| | [/apps/lockfile-explorer-web](./apps/lockfile-explorer-web/) | Rush Lockfile Explorer: helper project for building the React web application component | +| [/apps/rush-components](./apps/rush-components/) | Rush Component Library: a set of themed components for rush projects | | [/build-tests-samples/heft-node-basic-tutorial](./build-tests-samples/heft-node-basic-tutorial/) | (Copy of sample project) Building this project is a regression test for Heft | | [/build-tests-samples/heft-node-jest-tutorial](./build-tests-samples/heft-node-jest-tutorial/) | (Copy of sample project) Building this project is a regression test for Heft | | [/build-tests-samples/heft-node-rig-tutorial](./build-tests-samples/heft-node-rig-tutorial/) | (Copy of sample project) Building this project is a regression test for Heft | From 1252d7e32ee9049f1fd42aeaa07e32e232a8c538 Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 12 Jan 2023 10:49:59 -0800 Subject: [PATCH 047/399] fix: pnpm file is now read correctly --- apps/lockfile-explorer/src/start.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/lockfile-explorer/src/start.ts b/apps/lockfile-explorer/src/start.ts index 4d7e325d888..2a4fcd61b36 100644 --- a/apps/lockfile-explorer/src/start.ts +++ b/apps/lockfile-explorer/src/start.ts @@ -98,9 +98,9 @@ app.post( ); app.get('/api/pnpmfile', async (req: express.Request, res: express.Response) => { - let pnpmLockfile: string; + let pnpmfile: string; try { - pnpmLockfile = await FileSystem.readFileAsync(appState.pnpmLockfileLocation); + pnpmfile = await FileSystem.readFileAsync(appState.pnpmfileLocation); } catch (e) { if (FileSystem.isNotExistError(e)) { return res.status(404).send({ @@ -112,7 +112,7 @@ app.get('/api/pnpmfile', async (req: express.Request, res: express.Response) => } } - res.send(pnpmLockfile); + res.send(pnpmfile); }); app.post( From 65a9c562b97b96719fa0d603678973e8daf31430 Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 12 Jan 2023 10:50:43 -0800 Subject: [PATCH 048/399] chore: add change file --- ...-lockfile-explorer-components_2023-01-12-18-50.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@rushstack/lockfile-explorer/will-lockfile-explorer-components_2023-01-12-18-50.json diff --git a/common/changes/@rushstack/lockfile-explorer/will-lockfile-explorer-components_2023-01-12-18-50.json b/common/changes/@rushstack/lockfile-explorer/will-lockfile-explorer-components_2023-01-12-18-50.json new file mode 100644 index 00000000000..7bf2d546151 --- /dev/null +++ b/common/changes/@rushstack/lockfile-explorer/will-lockfile-explorer-components_2023-01-12-18-50.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/lockfile-explorer", + "comment": "Add support for rush components", + "type": "patch" + } + ], + "packageName": "@rushstack/lockfile-explorer" +} \ No newline at end of file From 3ee639b219c52aade7b43f5c72d452df512d25c8 Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 12 Jan 2023 14:44:32 -0800 Subject: [PATCH 049/399] chore: remove office ui dependency --- apps/lockfile-explorer-web/package.json | 3 +-- common/config/rush/pnpm-lock.yaml | 6 ------ common/config/rush/repo-state.json | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/apps/lockfile-explorer-web/package.json b/apps/lockfile-explorer-web/package.json index 083e84cf130..24fa4692110 100644 --- a/apps/lockfile-explorer-web/package.json +++ b/apps/lockfile-explorer-web/package.json @@ -28,7 +28,6 @@ "@types/heft-jest": "1.0.1", "@types/react-dom": "16.9.14", "@types/react": "16.14.23", - "@types/webpack-env": "1.13.0", - "office-ui-fabric-core": "~11.0.1" + "@types/webpack-env": "1.13.0" } } diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 04fbaddd497..347f38d9b69 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -194,7 +194,6 @@ importers: '@types/react': 16.14.23 '@types/react-dom': 16.9.14 '@types/webpack-env': 1.13.0 - office-ui-fabric-core: ~11.0.1 react: ~16.13.1 react-dom: ~16.13.1 react-redux: ~8.0.4 @@ -216,7 +215,6 @@ importers: '@types/react': 16.14.23 '@types/react-dom': 16.9.14 '@types/webpack-env': 1.13.0 - office-ui-fabric-core: 11.0.1 ../../apps/rundown: specifiers: @@ -16528,10 +16526,6 @@ packages: /obuf/1.1.2: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} - /office-ui-fabric-core/11.0.1: - resolution: {integrity: sha512-jcfycbVOm2aUoI+AGtHW24HvM7nUVFr44hR5NIE56EobK67bVwbNAQL15CJj3vNz5PBrnitsV9ROOB+KOEWn8g==} - dev: true - /on-finished/2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index fec1d2b4360..e17b4494b34 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "c0a0517f72a77533ef59a0226421b18cfb4c3738", + "pnpmShrinkwrapHash": "e855e70720fd11b2a139811470cd6e5221293693", "preferredVersionsHash": "5222ca779ae69ebfd201e39c17f48ce9eaf8c3c2" } From abb2a24a9d7a12f5739e82f260ea505cf1770fe4 Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 12 Jan 2023 14:50:32 -0800 Subject: [PATCH 050/399] chore: add copyright --- .../src/containers/LockfileViewer/styles.scss | 2 -- .../src/containers/PackageJsonViewer/styles.scss | 1 - apps/rush-components/src/components/Button/index.tsx | 3 +++ apps/rush-components/src/components/Checkbox/index.tsx | 3 +++ apps/rush-components/src/components/Input/index.tsx | 3 +++ apps/rush-components/src/components/ScrollArea/index.tsx | 3 +++ apps/rush-components/src/components/Tabs/index.tsx | 3 +++ apps/rush-components/src/components/Text/index.tsx | 3 +++ apps/rush-components/src/start.ts | 3 +++ 9 files changed, 21 insertions(+), 3 deletions(-) diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss b/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss index b8775d35c47..51321ffa193 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/styles.scss @@ -10,8 +10,6 @@ .ViewContents { display: flex; flex-direction: column; - min-height: calc(100% - 35px); - max-height: calc(100% - 35px); height: calc(100% - 35px); & > * + * { margin-top: 12px; diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss index 9936a81c208..817b9052ce8 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss @@ -9,7 +9,6 @@ .FileContents { height: calc(100% - 46px); padding: 0 12px; - overflow: hidden; } @mixin SpecWrapper { diff --git a/apps/rush-components/src/components/Button/index.tsx b/apps/rush-components/src/components/Button/index.tsx index 9d987e4f6ca..4561664fa67 100644 --- a/apps/rush-components/src/components/Button/index.tsx +++ b/apps/rush-components/src/components/Button/index.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + import React from 'react'; import { Text } from '../Text'; import styles from './styles.scss'; diff --git a/apps/rush-components/src/components/Checkbox/index.tsx b/apps/rush-components/src/components/Checkbox/index.tsx index 1aac392cba2..021378e0d71 100644 --- a/apps/rush-components/src/components/Checkbox/index.tsx +++ b/apps/rush-components/src/components/Checkbox/index.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + import React from 'react'; import * as RadixCheckbox from '@radix-ui/react-checkbox'; import { CheckIcon } from '@radix-ui/react-icons'; diff --git a/apps/rush-components/src/components/Input/index.tsx b/apps/rush-components/src/components/Input/index.tsx index 981e4c4a04f..47c56069053 100644 --- a/apps/rush-components/src/components/Input/index.tsx +++ b/apps/rush-components/src/components/Input/index.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + import React from 'react'; import styles from './styles.scss'; diff --git a/apps/rush-components/src/components/ScrollArea/index.tsx b/apps/rush-components/src/components/ScrollArea/index.tsx index 8fd754cb449..4aef5767ce5 100644 --- a/apps/rush-components/src/components/ScrollArea/index.tsx +++ b/apps/rush-components/src/components/ScrollArea/index.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + import React from 'react'; import * as RadixScrollArea from '@radix-ui/react-scroll-area'; import styles from './styles.scss'; diff --git a/apps/rush-components/src/components/Tabs/index.tsx b/apps/rush-components/src/components/Tabs/index.tsx index 1973d635610..0c956236b7f 100644 --- a/apps/rush-components/src/components/Tabs/index.tsx +++ b/apps/rush-components/src/components/Tabs/index.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + import React from 'react'; import * as RadixTabs from '@radix-ui/react-tabs'; import styles from './styles.scss'; diff --git a/apps/rush-components/src/components/Text/index.tsx b/apps/rush-components/src/components/Text/index.tsx index a2f3f37a512..5dbd7991572 100644 --- a/apps/rush-components/src/components/Text/index.tsx +++ b/apps/rush-components/src/components/Text/index.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + import React from 'react'; import styles from './styles.scss'; diff --git a/apps/rush-components/src/start.ts b/apps/rush-components/src/start.ts index b5fda3a0476..d0e9617ac72 100644 --- a/apps/rush-components/src/start.ts +++ b/apps/rush-components/src/start.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + export * from './components/Button'; export * from './components/ScrollArea'; export * from './components/Tabs'; From 0a2061c72ad8b9a33a1ab88b8078cd7ea9bf76d3 Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 12 Jan 2023 14:58:47 -0800 Subject: [PATCH 051/399] chore: update rush component readme --- apps/rush-components/README.md | 84 ++-------------------------------- 1 file changed, 3 insertions(+), 81 deletions(-) diff --git a/apps/rush-components/README.md b/apps/rush-components/README.md index 1643d5bdd27..f67430bd265 100644 --- a/apps/rush-components/README.md +++ b/apps/rush-components/README.md @@ -1,83 +1,5 @@ -# @rushstack/lockfile-explorer +# @rushstack/components -
-
- - Rush Lockfile Explorer - -

-

+**Rush Components** provides a suite of styled components that can be used in rush applications to ensure a consistent look and feel among all rushstack helper applications. -> 🚨 *EARLY PREVIEW RELEASE* 🚨 -> -> Please provide feedback by commenting on -> the [Design Proposal](https://github.com/microsoft/rushstack/issues/3695) -> or creating a GitHub issue. Thanks! - -**Rush Lockfile Explorer** helps you investigate and solve version conflicts when working -in a [Rush](https://rushjs.io) monorepo using the [PNPM package manager](https://pnpm.io/). - -Typical use cases: - -- After `rush update`, the app is reporting errors caused by duplicate instances of - a singleton object, probably introduced by a - [peer dependency doppelganger](https://rushjs.io/pages/advanced/npm_doppelgangers/) - -- how to find the likely culprits? - -- After `rush update`, the app's bundle size has increased significantly due to - side-by-side versions -- how to find which packages have extra versions? - -- When you identify the problematic package, it is an obscure indirect dependency of - your middleware -- how to work backwards in the dependency graph to determine which - **package.json** files should be patched in **.pnpmfile.cjs**? - -- Your project's installation footprint is unusually large because it has picked up - a lot of extra NPM dependencies that seem unnecessary, however `rush-pnpm why` prints - thousands of lines of output. How to filter this report to see the important - relationships? - - -## Usage - -```bash -# Install the NPM package globally: -npm install -g @rushstack/lockfile-explorer - -# Go to your monorepo folder -cd my-rush-repo - -# Run "rush install" to ensure common/temp/node_modules is up to date -rush install - -# Launch the Lockfile Explorer command line interface (CLI). -# It expects to find a Rush workspace in your shell's current working directory. -lockfile-explorer -``` - -The CLI will start a Node.js service on `http://localhost/` and try to launch your default web browser: - -screenshot
-*Lockfile Explorer main window* - - -## How it works - -The web app will expect to find a Rush workspace in the current working directory where the `lockfile-explorer` -command was invoked. It will read files such as: - -- **common/config/rush/pnpm-lock.yaml** - the PNPM lockfile for your monorepo -- **common/config/rush/.pnpmfile.cjs** - which transforms **package.json** files during installation -- The **package.json** files for your Rush projects -- The **package.json** files for packages installed under - - -## Links - -- [Documentation](https://lfx.rushstack.io/) on the Lockfile Explorer project website -- [CHANGELOG.md]( - https://github.com/microsoft/rushstack/blob/main/apps/lockfile-explorer/CHANGELOG.md) - Find - out what's new in the latest version -- [@rushstack/trace-import](https://www.npmjs.com/package/@rushstack/trace-import) - - a command-line tool for troubleshooting how modules are resolved by `import` and `require()` - -Rush Lockfile Explorer is part of the [Rush Stack](https://rushstack.io/) family of projects. +Rush Components is part of the [Rush Stack](https://rushstack.io/) family of projects. From 0ef4d0ce4862b2b932f6e21eba8af60257a05068 Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 12 Jan 2023 15:01:51 -0800 Subject: [PATCH 052/399] feat: move rushstack components to libraries --- .../src/components/ConnectionModal/index.tsx | 2 +- .../src/containers/BookmarksSidebar/index.tsx | 2 +- .../LockfileEntryDetailsView/index.tsx | 2 +- .../src/containers/LockfileViewer/index.tsx | 2 +- .../containers/PackageJsonViewer/index.tsx | 2 +- .../containers/SelectedEntryPreview/index.tsx | 2 +- common/config/rush/pnpm-lock.yaml | 68 +++++++++---------- .../rush-components/.eslintrc.js | 0 .../rush-components/.npmignore | 0 {apps => libraries}/rush-components/LICENSE | 0 {apps => libraries}/rush-components/README.md | 0 .../rush-components/assets/index.html | 0 .../rush-components/config/heft.json | 0 .../rush-components/config/jest.config.json | 0 .../rush-components/config/rig.json | 0 .../rush-components/package.json | 0 .../src/components/Button/index.tsx | 0 .../src/components/Button/styles.scss | 0 .../src/components/Checkbox/index.tsx | 0 .../src/components/Checkbox/styles.scss | 0 .../src/components/Input/index.tsx | 0 .../src/components/Input/styles.scss | 0 .../src/components/ScrollArea/index.tsx | 0 .../src/components/ScrollArea/styles.scss | 0 .../src/components/Tabs/index.tsx | 0 .../src/components/Tabs/styles.scss | 0 .../src/components/Text/index.tsx | 0 .../src/components/Text/styles.scss | 0 .../rush-components/src/start.ts | 0 .../rush-components/src/styles/_base.scss | 0 .../rush-components/src/styles/_colors.scss | 0 .../rush-components/tsconfig.json | 0 .../rush-components/tsconfig.type.json | 0 .../rush-components/webpack.config.js | 0 rush.json | 2 +- 35 files changed, 41 insertions(+), 41 deletions(-) rename {apps => libraries}/rush-components/.eslintrc.js (100%) rename {apps => libraries}/rush-components/.npmignore (100%) rename {apps => libraries}/rush-components/LICENSE (100%) rename {apps => libraries}/rush-components/README.md (100%) rename {apps => libraries}/rush-components/assets/index.html (100%) rename {apps => libraries}/rush-components/config/heft.json (100%) rename {apps => libraries}/rush-components/config/jest.config.json (100%) rename {apps => libraries}/rush-components/config/rig.json (100%) rename {apps => libraries}/rush-components/package.json (100%) rename {apps => libraries}/rush-components/src/components/Button/index.tsx (100%) rename {apps => libraries}/rush-components/src/components/Button/styles.scss (100%) rename {apps => libraries}/rush-components/src/components/Checkbox/index.tsx (100%) rename {apps => libraries}/rush-components/src/components/Checkbox/styles.scss (100%) rename {apps => libraries}/rush-components/src/components/Input/index.tsx (100%) rename {apps => libraries}/rush-components/src/components/Input/styles.scss (100%) rename {apps => libraries}/rush-components/src/components/ScrollArea/index.tsx (100%) rename {apps => libraries}/rush-components/src/components/ScrollArea/styles.scss (100%) rename {apps => libraries}/rush-components/src/components/Tabs/index.tsx (100%) rename {apps => libraries}/rush-components/src/components/Tabs/styles.scss (100%) rename {apps => libraries}/rush-components/src/components/Text/index.tsx (100%) rename {apps => libraries}/rush-components/src/components/Text/styles.scss (100%) rename {apps => libraries}/rush-components/src/start.ts (100%) rename {apps => libraries}/rush-components/src/styles/_base.scss (100%) rename {apps => libraries}/rush-components/src/styles/_colors.scss (100%) rename {apps => libraries}/rush-components/tsconfig.json (100%) rename {apps => libraries}/rush-components/tsconfig.type.json (100%) rename {apps => libraries}/rush-components/webpack.config.js (100%) diff --git a/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx b/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx index 661cbb9af03..36c606b624b 100644 --- a/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx +++ b/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import React, { useCallback, useEffect, useState } from 'react'; -import { Button, Text } from '@rushstack/components'; +import { Button, Text } from '../../../../../libraries/rush-components/lib/start'; import styles from './styles.scss'; import appStyles from '../../App.scss'; import { checkAliveAsync } from '../../parsing/getPackageFiles'; diff --git a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx index 749b084ba9e..66e490682b3 100644 --- a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx @@ -7,7 +7,7 @@ import styles from './styles.scss'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; import { LockfileEntry } from '../../parsing/LockfileEntry'; import { clearStackAndPush, removeBookmark } from '../../store/slices/entrySlice'; -import { Button, ScrollArea, Text } from '@rushstack/components'; +import { Button, ScrollArea, Text } from '../../../../../libraries/rush-components/lib/start'; export const BookmarksSidebar = (): JSX.Element => { const bookmarks = useAppSelector((state) => state.entry.bookmarkedEntries); diff --git a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx index 913e906b5b0..9b8659eec94 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import React, { useCallback, useEffect, useState } from 'react'; -import { ScrollArea, Text } from '@rushstack/components'; +import { ScrollArea, Text } from '../../../../../libraries/rush-components/lib/start'; import styles from './styles.scss'; import appStyles from '../../App.scss'; import { IDependencyType, LockfileDependency } from '../../parsing/LockfileDependency'; diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx index 7c233021956..8ed9f415311 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx @@ -13,7 +13,7 @@ import { setFilter as selectFilter } from '../../store/slices/entrySlice'; import { getFilterFromLocalStorage, saveFilterToLocalStorage } from '../../helpers/localStorage'; -import { Tabs, Checkbox, ScrollArea, Input, Text } from '@rushstack/components'; +import { Tabs, Checkbox, ScrollArea, Input, Text } from '../../../../../libraries/rush-components/lib/start'; interface ILockfileEntryGroup { entryName: string; diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx index fe479515110..f0500159f75 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx @@ -11,7 +11,7 @@ import { compareSpec } from '../../parsing/compareSpec'; import { loadSpecChanges } from '../../store/slices/workspaceSlice'; import { displaySpecChanges } from '../../helpers/displaySpecChanges'; import { isEntryModified } from '../../helpers/isEntryModified'; -import { ScrollArea, Tabs, Text } from '@rushstack/components'; +import { ScrollArea, Tabs, Text } from '../../../../../libraries/rush-components/lib/start'; enum PackageView { PACKAGE_JSON, diff --git a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx index c429f13d3f1..4321b4ba447 100644 --- a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx @@ -11,7 +11,7 @@ import { removeBookmark, selectCurrentEntry } from '../../store/slices/entrySlice'; -import { Button, ScrollArea, Text } from '@rushstack/components'; +import { Button, ScrollArea, Text } from '../../../../../libraries/rush-components/lib/start'; export const SelectedEntryPreview = (): JSX.Element => { const selectedEntry = useAppSelector(selectCurrentEntry); diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 347f38d9b69..b1a070c44d2 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -202,7 +202,7 @@ importers: '@fluentui/react': 8.103.6_tlqvpdqnq63ssdllbmshthdmo4 '@lifaon/path': 2.1.0 '@reduxjs/toolkit': 1.8.6_qfynotfwlyrsyq662adyrweaoe - '@rushstack/components': link:../rush-components + '@rushstack/components': link:../../libraries/rush-components react: 16.13.1 react-dom: 16.13.1_react@16.13.1 react-redux: 8.0.5_6ue7j6tfp4xzdzadarjwzo6kwu @@ -266,39 +266,6 @@ importers: '@types/node': 12.20.24 '@types/semver': 7.3.5 - ../../apps/rush-components: - specifiers: - '@radix-ui/colors': ~0.1.8 - '@radix-ui/react-checkbox': ~1.0.1 - '@radix-ui/react-icons': ~1.1.1 - '@radix-ui/react-scroll-area': ~1.0.2 - '@radix-ui/react-tabs': ~1.0.1 - '@rushstack/eslint-config': workspace:* - '@rushstack/heft': workspace:* - '@rushstack/heft-web-rig': workspace:* - '@types/heft-jest': 1.0.1 - '@types/react': 16.14.23 - '@types/react-dom': 16.9.14 - '@types/webpack-env': 1.13.0 - react: ~16.13.1 - react-dom: ~16.13.1 - dependencies: - react: 16.13.1 - react-dom: 16.13.1_react@16.13.1 - devDependencies: - '@radix-ui/colors': 0.1.8 - '@radix-ui/react-checkbox': 1.0.1_5owmthsvj5ictknaj3ev736ofq - '@radix-ui/react-icons': 1.1.1_react@16.13.1 - '@radix-ui/react-scroll-area': 1.0.2_5owmthsvj5ictknaj3ev736ofq - '@radix-ui/react-tabs': 1.0.1_5owmthsvj5ictknaj3ev736ofq - '@rushstack/eslint-config': link:../../eslint/eslint-config - '@rushstack/heft': link:../heft - '@rushstack/heft-web-rig': link:../../rigs/heft-web-rig - '@types/heft-jest': 1.0.1 - '@types/react': 16.14.23 - '@types/react-dom': 16.9.14 - '@types/webpack-env': 1.13.0 - ../../apps/trace-import: specifiers: '@rushstack/eslint-config': workspace:* @@ -1905,6 +1872,39 @@ importers: '@types/resolve': 1.20.2 ajv: 6.12.6 + ../../libraries/rush-components: + specifiers: + '@radix-ui/colors': ~0.1.8 + '@radix-ui/react-checkbox': ~1.0.1 + '@radix-ui/react-icons': ~1.1.1 + '@radix-ui/react-scroll-area': ~1.0.2 + '@radix-ui/react-tabs': ~1.0.1 + '@rushstack/eslint-config': workspace:* + '@rushstack/heft': workspace:* + '@rushstack/heft-web-rig': workspace:* + '@types/heft-jest': 1.0.1 + '@types/react': 16.14.23 + '@types/react-dom': 16.9.14 + '@types/webpack-env': 1.13.0 + react: ~16.13.1 + react-dom: ~16.13.1 + dependencies: + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + devDependencies: + '@radix-ui/colors': 0.1.8 + '@radix-ui/react-checkbox': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-icons': 1.1.1_react@16.13.1 + '@radix-ui/react-scroll-area': 1.0.2_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-tabs': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@rushstack/eslint-config': link:../../eslint/eslint-config + '@rushstack/heft': link:../../apps/heft + '@rushstack/heft-web-rig': link:../../rigs/heft-web-rig + '@types/heft-jest': 1.0.1 + '@types/react': 16.14.23 + '@types/react-dom': 16.9.14 + '@types/webpack-env': 1.13.0 + ../../libraries/rush-lib: specifiers: '@pnpm/link-bins': ~5.3.7 diff --git a/apps/rush-components/.eslintrc.js b/libraries/rush-components/.eslintrc.js similarity index 100% rename from apps/rush-components/.eslintrc.js rename to libraries/rush-components/.eslintrc.js diff --git a/apps/rush-components/.npmignore b/libraries/rush-components/.npmignore similarity index 100% rename from apps/rush-components/.npmignore rename to libraries/rush-components/.npmignore diff --git a/apps/rush-components/LICENSE b/libraries/rush-components/LICENSE similarity index 100% rename from apps/rush-components/LICENSE rename to libraries/rush-components/LICENSE diff --git a/apps/rush-components/README.md b/libraries/rush-components/README.md similarity index 100% rename from apps/rush-components/README.md rename to libraries/rush-components/README.md diff --git a/apps/rush-components/assets/index.html b/libraries/rush-components/assets/index.html similarity index 100% rename from apps/rush-components/assets/index.html rename to libraries/rush-components/assets/index.html diff --git a/apps/rush-components/config/heft.json b/libraries/rush-components/config/heft.json similarity index 100% rename from apps/rush-components/config/heft.json rename to libraries/rush-components/config/heft.json diff --git a/apps/rush-components/config/jest.config.json b/libraries/rush-components/config/jest.config.json similarity index 100% rename from apps/rush-components/config/jest.config.json rename to libraries/rush-components/config/jest.config.json diff --git a/apps/rush-components/config/rig.json b/libraries/rush-components/config/rig.json similarity index 100% rename from apps/rush-components/config/rig.json rename to libraries/rush-components/config/rig.json diff --git a/apps/rush-components/package.json b/libraries/rush-components/package.json similarity index 100% rename from apps/rush-components/package.json rename to libraries/rush-components/package.json diff --git a/apps/rush-components/src/components/Button/index.tsx b/libraries/rush-components/src/components/Button/index.tsx similarity index 100% rename from apps/rush-components/src/components/Button/index.tsx rename to libraries/rush-components/src/components/Button/index.tsx diff --git a/apps/rush-components/src/components/Button/styles.scss b/libraries/rush-components/src/components/Button/styles.scss similarity index 100% rename from apps/rush-components/src/components/Button/styles.scss rename to libraries/rush-components/src/components/Button/styles.scss diff --git a/apps/rush-components/src/components/Checkbox/index.tsx b/libraries/rush-components/src/components/Checkbox/index.tsx similarity index 100% rename from apps/rush-components/src/components/Checkbox/index.tsx rename to libraries/rush-components/src/components/Checkbox/index.tsx diff --git a/apps/rush-components/src/components/Checkbox/styles.scss b/libraries/rush-components/src/components/Checkbox/styles.scss similarity index 100% rename from apps/rush-components/src/components/Checkbox/styles.scss rename to libraries/rush-components/src/components/Checkbox/styles.scss diff --git a/apps/rush-components/src/components/Input/index.tsx b/libraries/rush-components/src/components/Input/index.tsx similarity index 100% rename from apps/rush-components/src/components/Input/index.tsx rename to libraries/rush-components/src/components/Input/index.tsx diff --git a/apps/rush-components/src/components/Input/styles.scss b/libraries/rush-components/src/components/Input/styles.scss similarity index 100% rename from apps/rush-components/src/components/Input/styles.scss rename to libraries/rush-components/src/components/Input/styles.scss diff --git a/apps/rush-components/src/components/ScrollArea/index.tsx b/libraries/rush-components/src/components/ScrollArea/index.tsx similarity index 100% rename from apps/rush-components/src/components/ScrollArea/index.tsx rename to libraries/rush-components/src/components/ScrollArea/index.tsx diff --git a/apps/rush-components/src/components/ScrollArea/styles.scss b/libraries/rush-components/src/components/ScrollArea/styles.scss similarity index 100% rename from apps/rush-components/src/components/ScrollArea/styles.scss rename to libraries/rush-components/src/components/ScrollArea/styles.scss diff --git a/apps/rush-components/src/components/Tabs/index.tsx b/libraries/rush-components/src/components/Tabs/index.tsx similarity index 100% rename from apps/rush-components/src/components/Tabs/index.tsx rename to libraries/rush-components/src/components/Tabs/index.tsx diff --git a/apps/rush-components/src/components/Tabs/styles.scss b/libraries/rush-components/src/components/Tabs/styles.scss similarity index 100% rename from apps/rush-components/src/components/Tabs/styles.scss rename to libraries/rush-components/src/components/Tabs/styles.scss diff --git a/apps/rush-components/src/components/Text/index.tsx b/libraries/rush-components/src/components/Text/index.tsx similarity index 100% rename from apps/rush-components/src/components/Text/index.tsx rename to libraries/rush-components/src/components/Text/index.tsx diff --git a/apps/rush-components/src/components/Text/styles.scss b/libraries/rush-components/src/components/Text/styles.scss similarity index 100% rename from apps/rush-components/src/components/Text/styles.scss rename to libraries/rush-components/src/components/Text/styles.scss diff --git a/apps/rush-components/src/start.ts b/libraries/rush-components/src/start.ts similarity index 100% rename from apps/rush-components/src/start.ts rename to libraries/rush-components/src/start.ts diff --git a/apps/rush-components/src/styles/_base.scss b/libraries/rush-components/src/styles/_base.scss similarity index 100% rename from apps/rush-components/src/styles/_base.scss rename to libraries/rush-components/src/styles/_base.scss diff --git a/apps/rush-components/src/styles/_colors.scss b/libraries/rush-components/src/styles/_colors.scss similarity index 100% rename from apps/rush-components/src/styles/_colors.scss rename to libraries/rush-components/src/styles/_colors.scss diff --git a/apps/rush-components/tsconfig.json b/libraries/rush-components/tsconfig.json similarity index 100% rename from apps/rush-components/tsconfig.json rename to libraries/rush-components/tsconfig.json diff --git a/apps/rush-components/tsconfig.type.json b/libraries/rush-components/tsconfig.type.json similarity index 100% rename from apps/rush-components/tsconfig.type.json rename to libraries/rush-components/tsconfig.type.json diff --git a/apps/rush-components/webpack.config.js b/libraries/rush-components/webpack.config.js similarity index 100% rename from apps/rush-components/webpack.config.js rename to libraries/rush-components/webpack.config.js diff --git a/rush.json b/rush.json index 490f81bd126..56c6fe5bec2 100644 --- a/rush.json +++ b/rush.json @@ -432,7 +432,7 @@ }, { "packageName": "@rushstack/components", - "projectFolder": "apps/rush-components", + "projectFolder": "libraries/rush-components", "reviewCategory": "libraries" }, { From 7127185a5ab463353fea1618b3a321329461dbca Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 12 Jan 2023 15:04:03 -0800 Subject: [PATCH 053/399] chore: fix imports --- .../src/components/ConnectionModal/index.tsx | 2 +- .../src/containers/BookmarksSidebar/index.tsx | 2 +- .../src/containers/LockfileEntryDetailsView/index.tsx | 2 +- .../src/containers/LockfileViewer/index.tsx | 2 +- .../src/containers/PackageJsonViewer/index.tsx | 2 +- .../src/containers/SelectedEntryPreview/index.tsx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx b/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx index 36c606b624b..661cbb9af03 100644 --- a/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx +++ b/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import React, { useCallback, useEffect, useState } from 'react'; -import { Button, Text } from '../../../../../libraries/rush-components/lib/start'; +import { Button, Text } from '@rushstack/components'; import styles from './styles.scss'; import appStyles from '../../App.scss'; import { checkAliveAsync } from '../../parsing/getPackageFiles'; diff --git a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx index 66e490682b3..749b084ba9e 100644 --- a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx @@ -7,7 +7,7 @@ import styles from './styles.scss'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; import { LockfileEntry } from '../../parsing/LockfileEntry'; import { clearStackAndPush, removeBookmark } from '../../store/slices/entrySlice'; -import { Button, ScrollArea, Text } from '../../../../../libraries/rush-components/lib/start'; +import { Button, ScrollArea, Text } from '@rushstack/components'; export const BookmarksSidebar = (): JSX.Element => { const bookmarks = useAppSelector((state) => state.entry.bookmarkedEntries); diff --git a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx index 9b8659eec94..913e906b5b0 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import React, { useCallback, useEffect, useState } from 'react'; -import { ScrollArea, Text } from '../../../../../libraries/rush-components/lib/start'; +import { ScrollArea, Text } from '@rushstack/components'; import styles from './styles.scss'; import appStyles from '../../App.scss'; import { IDependencyType, LockfileDependency } from '../../parsing/LockfileDependency'; diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx index 8ed9f415311..7c233021956 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx @@ -13,7 +13,7 @@ import { setFilter as selectFilter } from '../../store/slices/entrySlice'; import { getFilterFromLocalStorage, saveFilterToLocalStorage } from '../../helpers/localStorage'; -import { Tabs, Checkbox, ScrollArea, Input, Text } from '../../../../../libraries/rush-components/lib/start'; +import { Tabs, Checkbox, ScrollArea, Input, Text } from '@rushstack/components'; interface ILockfileEntryGroup { entryName: string; diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx index f0500159f75..fe479515110 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx @@ -11,7 +11,7 @@ import { compareSpec } from '../../parsing/compareSpec'; import { loadSpecChanges } from '../../store/slices/workspaceSlice'; import { displaySpecChanges } from '../../helpers/displaySpecChanges'; import { isEntryModified } from '../../helpers/isEntryModified'; -import { ScrollArea, Tabs, Text } from '../../../../../libraries/rush-components/lib/start'; +import { ScrollArea, Tabs, Text } from '@rushstack/components'; enum PackageView { PACKAGE_JSON, diff --git a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx index 4321b4ba447..c429f13d3f1 100644 --- a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx @@ -11,7 +11,7 @@ import { removeBookmark, selectCurrentEntry } from '../../store/slices/entrySlice'; -import { Button, ScrollArea, Text } from '../../../../../libraries/rush-components/lib/start'; +import { Button, ScrollArea, Text } from '@rushstack/components'; export const SelectedEntryPreview = (): JSX.Element => { const selectedEntry = useAppSelector(selectCurrentEntry); From 68a1188555f23bde42e8b9931be601ba933d8af7 Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 12 Jan 2023 15:06:01 -0800 Subject: [PATCH 054/399] chore: update rush components license --- libraries/rush-components/LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/rush-components/LICENSE b/libraries/rush-components/LICENSE index e6b6c3080e6..52b5a97c6ff 100644 --- a/libraries/rush-components/LICENSE +++ b/libraries/rush-components/LICENSE @@ -1,4 +1,4 @@ -@rushstack/lockfile-explorer +@rushstack/components Copyright (c) Microsoft Corporation. All rights reserved. From 11eaa7b14bf9b225d78dc4489a54c65a82306504 Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 12 Jan 2023 15:24:07 -0800 Subject: [PATCH 055/399] chore: update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 907fc0a896f..2970f83e81f 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,6 @@ These GitHub repositories provide supplementary resources for Rush Stack: | Folder | Description | | ------ | -----------| | [/apps/lockfile-explorer-web](./apps/lockfile-explorer-web/) | Rush Lockfile Explorer: helper project for building the React web application component | -| [/apps/rush-components](./apps/rush-components/) | Rush Component Library: a set of themed components for rush projects | | [/build-tests-samples/heft-node-basic-tutorial](./build-tests-samples/heft-node-basic-tutorial/) | (Copy of sample project) Building this project is a regression test for Heft | | [/build-tests-samples/heft-node-jest-tutorial](./build-tests-samples/heft-node-jest-tutorial/) | (Copy of sample project) Building this project is a regression test for Heft | | [/build-tests-samples/heft-node-rig-tutorial](./build-tests-samples/heft-node-rig-tutorial/) | (Copy of sample project) Building this project is a regression test for Heft | @@ -153,6 +152,7 @@ These GitHub repositories provide supplementary resources for Rush Stack: | [/build-tests/rush-project-change-analyzer-test](./build-tests/rush-project-change-analyzer-test/) | This is an example project that uses rush-lib's ProjectChangeAnalyzer to | | [/build-tests/set-webpack-public-path-plugin-webpack4-test](./build-tests/set-webpack-public-path-plugin-webpack4-test/) | Building this project tests the set-webpack-public-path-plugin using Webpack 4 | | [/build-tests/ts-command-line-test](./build-tests/ts-command-line-test/) | Building this project is a regression test for ts-command-line | +| [/libraries/rush-components](./libraries/rush-components/) | Rush Component Library: a set of themed components for rush projects | | [/libraries/rushell](./libraries/rushell/) | Execute shell commands using a consistent syntax on every platform | | [/repo-scripts/doc-plugin-rush-stack](./repo-scripts/doc-plugin-rush-stack/) | API Documenter plugin used with the rushstack.io website | | [/repo-scripts/generate-api-docs](./repo-scripts/generate-api-docs/) | Used to generate API docs for the rushstack.io website | From b5a64af661b4f9e8f1f1755d05dc91efbbe865fe Mon Sep 17 00:00:00 2001 From: William Huang Date: Fri, 13 Jan 2023 12:16:39 -0800 Subject: [PATCH 056/399] chore: minor style tweaks --- .../src/containers/LockfileEntryDetailsView/index.tsx | 4 ++-- .../src/containers/PackageJsonViewer/index.tsx | 4 +++- .../src/containers/PackageJsonViewer/styles.scss | 4 ++++ .../src/containers/SelectedEntryPreview/styles.scss | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx index 913e906b5b0..ea82093d4e6 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx @@ -245,7 +245,7 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => { <>
- + Direct Referrers
@@ -268,7 +268,7 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => {
- + Direct Dependencies
diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx index fe479515110..db4e94949a1 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx @@ -256,7 +256,9 @@ export const PackageJsonViewer = (): JSX.Element => { />
- {renderFile()} + +
{renderFile()}
+
); diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss index 817b9052ce8..a684d302d98 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/styles.scss @@ -11,6 +11,10 @@ padding: 0 12px; } +.FileInnerContent { + padding-top: 12px; +} + @mixin SpecWrapper { padding: 2px 4px; border-radius: 2px; diff --git a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss index 7a605fc4d94..8811d0bc86f 100644 --- a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/styles.scss @@ -3,7 +3,7 @@ .SelectedEntryCard { margin-top: 12px; @include base.card; - padding: 12px; + padding: 12px 12px 0; height: 8%; & > * + * { margin-top: 8px; From 6fb345c4befeaf01822609b6ef1eaf945dec85a3 Mon Sep 17 00:00:00 2001 From: Rongqi Zhou Date: Mon, 16 Jan 2023 11:33:39 +0800 Subject: [PATCH 057/399] add support for storybook static build output dir --- .../heft-storybook-react-tutorial/package.json | 1 + common/reviews/api/heft-storybook-plugin.api.md | 8 ++++---- .../heft-storybook-plugin/src/StorybookPlugin.ts | 16 ++++++++-------- .../heft-storybook-plugin/src/StorybookRunner.ts | 8 +++++--- .../schemas/heft-storybook-plugin.schema.json | 8 ++++---- 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/build-tests-samples/heft-storybook-react-tutorial/package.json b/build-tests-samples/heft-storybook-react-tutorial/package.json index d6d9f35fc4a..6c7c16b64d5 100644 --- a/build-tests-samples/heft-storybook-react-tutorial/package.json +++ b/build-tests-samples/heft-storybook-react-tutorial/package.json @@ -33,6 +33,7 @@ "source-map-loader": "~1.1.3", "style-loader": "~2.0.0", "typescript": "~4.8.4", + "@storybook/react": "~6.4.18", "webpack": "~4.44.2" } } diff --git a/common/reviews/api/heft-storybook-plugin.api.md b/common/reviews/api/heft-storybook-plugin.api.md index 3cfd97c0198..ebc8afef1a5 100644 --- a/common/reviews/api/heft-storybook-plugin.api.md +++ b/common/reviews/api/heft-storybook-plugin.api.md @@ -12,10 +12,10 @@ export default _default; // @public export interface IStorybookPluginOptions { - options?: string[]; - startupModulePath?: string; - staticBuildModulePath?: string; - storykitPackageName: string; + startupModulePath?: string; + staticBuildModulePath?: string; + staticBuildOutputDir?: string; + storykitPackageName: string; } ``` diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts index 108b1829b96..cb8d1a976d1 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts @@ -79,15 +79,15 @@ export interface IStorybookPluginOptions { staticBuildModulePath?: string; /** - * The storybook defined cli options for start and build storybook. - * If this is empty, then it will use the default options config. + * The customized output dir for storybook static build. + * If this is empty, then it will use the storybook default output dir. * * @example - * If you want to change the static build output dir to staticBuildDir, then the cli option would be: + * If you want to change the static build output dir to staticBuildDir, then the static build output dir would be: * - * `"options": [ "--output-dir=staticBuildDir" ]` + * `"staticBuildOutputDir": "newStaticBuildDir"` */ - options?: string[]; + staticBuildOutputDir?: string; } /** @public */ @@ -99,7 +99,7 @@ export class StorybookPlugin implements IHeftPlugin { private _storykitPackageName!: string; private _modulePath!: string; private _resolvedModulePath!: string; - private _options?: string[]; + private _staticBuildOutputDir?: string; /** * Generate typings for Sass files before TypeScript compilation. @@ -127,7 +127,7 @@ export class StorybookPlugin implements IHeftPlugin { ); } this._storykitPackageName = options.storykitPackageName; - this._options = options.options; + this._staticBuildOutputDir = options.staticBuildOutputDir; if (!options.startupModulePath && !options.staticBuildModulePath) { throw new Error( @@ -255,7 +255,7 @@ export class StorybookPlugin implements IHeftPlugin { heftConfiguration.terminalProvider, { buildFolder: heftConfiguration.buildFolder, - options: this._options, + staticBuildOutputDir: this._staticBuildOutputDir, resolvedStartupModulePath: this._resolvedModulePath }, // TODO: Extract SubprocessRunnerBase into a public API diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts b/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts index f614cabc2e2..85d93a1ba01 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts @@ -11,7 +11,7 @@ import { export interface IStorybookRunnerConfiguration extends ISubprocessRunnerBaseConfiguration { resolvedStartupModulePath: string; - options?: string[]; + staticBuildOutputDir?: string; } // TODO: Why must this be a different name from the logger in StorybookPlugin.ts? @@ -30,9 +30,11 @@ export class StorybookRunner extends SubprocessRunnerBase Date: Mon, 16 Jan 2023 23:24:26 +0800 Subject: [PATCH 058/399] add missing packages --- .../package.json | 4 +- .../workspace/common/pnpm-lock.yaml | 66 ++- common/config/rush/pnpm-lock.yaml | 462 +++++++++++++++++- common/config/rush/repo-state.json | 2 +- 4 files changed, 492 insertions(+), 42 deletions(-) diff --git a/build-tests-samples/heft-storybook-react-tutorial/package.json b/build-tests-samples/heft-storybook-react-tutorial/package.json index 6c7c16b64d5..51aa6fb9752 100644 --- a/build-tests-samples/heft-storybook-react-tutorial/package.json +++ b/build-tests-samples/heft-storybook-react-tutorial/package.json @@ -17,12 +17,15 @@ "tslib": "~2.3.1" }, "devDependencies": { + "@babel/core": "~7.17.0", "@rushstack/eslint-config": "workspace:*", "@rushstack/heft-jest-plugin": "workspace:*", "@rushstack/heft-storybook-plugin": "workspace:*", "@rushstack/heft-webpack4-plugin": "workspace:*", "@rushstack/heft": "workspace:*", + "@storybook/react": "~6.4.18", "@types/heft-jest": "1.0.1", + "@types/node": "12.20.24", "@types/react-dom": "16.9.14", "@types/react": "16.14.23", "@types/webpack-env": "1.13.0", @@ -33,7 +36,6 @@ "source-map-loader": "~1.1.3", "style-loader": "~2.0.0", "typescript": "~4.8.4", - "@storybook/react": "~6.4.18", "webpack": "~4.44.2" } } diff --git a/build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml b/build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml index d96583f7831..ddc9a293cae 100644 --- a/build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml +++ b/build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml @@ -5,13 +5,13 @@ importers: typescript-newest-test: specifiers: '@rushstack/eslint-config': file:rushstack-eslint-config-3.1.1.tgz - '@rushstack/heft': file:rushstack-heft-0.48.8.tgz + '@rushstack/heft': file:rushstack-heft-0.48.9.tgz eslint: ~8.7.0 tslint: ~5.20.1 typescript: ~4.8.4 devDependencies: '@rushstack/eslint-config': file:../temp/tarballs/rushstack-eslint-config-3.1.1.tgz_esueefhpt5ql6xiqdj4wcgwfzi - '@rushstack/heft': file:../temp/tarballs/rushstack-heft-0.48.8.tgz + '@rushstack/heft': file:../temp/tarballs/rushstack-heft-0.48.9.tgz eslint: 8.7.0 tslint: 5.20.1_typescript@4.8.4 typescript: 4.8.4 @@ -19,13 +19,13 @@ importers: typescript-v3-test: specifiers: '@rushstack/eslint-config': file:rushstack-eslint-config-3.1.1.tgz - '@rushstack/heft': file:rushstack-heft-0.48.8.tgz + '@rushstack/heft': file:rushstack-heft-0.48.9.tgz eslint: ~8.7.0 tslint: ~5.20.1 typescript: ~4.8.4 devDependencies: '@rushstack/eslint-config': file:../temp/tarballs/rushstack-eslint-config-3.1.1.tgz_esueefhpt5ql6xiqdj4wcgwfzi - '@rushstack/heft': file:../temp/tarballs/rushstack-heft-0.48.8.tgz + '@rushstack/heft': file:../temp/tarballs/rushstack-heft-0.48.9.tgz eslint: 8.7.0 tslint: 5.20.1_typescript@4.8.4 typescript: 4.8.4 @@ -144,7 +144,7 @@ packages: optional: true dependencies: '@typescript-eslint/parser': 5.38.1_esueefhpt5ql6xiqdj4wcgwfzi - '@typescript-eslint/scope-manager': 5.38.1_typescript@4.8.4 + '@typescript-eslint/scope-manager': 5.38.1 '@typescript-eslint/type-utils': 5.38.1_esueefhpt5ql6xiqdj4wcgwfzi '@typescript-eslint/utils': 5.38.1_esueefhpt5ql6xiqdj4wcgwfzi debug: 4.3.4 @@ -181,8 +181,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.38.1_typescript@4.8.4 - '@typescript-eslint/types': 5.38.1_typescript@4.8.4 + '@typescript-eslint/scope-manager': 5.38.1 + '@typescript-eslint/types': 5.38.1 '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.8.4 debug: 4.3.4 eslint: 8.7.0 @@ -191,14 +191,12 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager/5.38.1_typescript@4.8.4: + /@typescript-eslint/scope-manager/5.38.1: resolution: {integrity: sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.38.1_typescript@4.8.4 - '@typescript-eslint/visitor-keys': 5.38.1_typescript@4.8.4 - transitivePeerDependencies: - - typescript + '@typescript-eslint/types': 5.38.1 + '@typescript-eslint/visitor-keys': 5.38.1 dev: true /@typescript-eslint/type-utils/5.38.1_esueefhpt5ql6xiqdj4wcgwfzi: @@ -221,13 +219,9 @@ packages: - supports-color dev: true - /@typescript-eslint/types/5.38.1_typescript@4.8.4: + /@typescript-eslint/types/5.38.1: resolution: {integrity: sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - dependencies: - typescript: 4.8.4 dev: true /@typescript-eslint/typescript-estree/5.38.1_typescript@4.8.4: @@ -239,8 +233,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.38.1_typescript@4.8.4 - '@typescript-eslint/visitor-keys': 5.38.1_typescript@4.8.4 + '@typescript-eslint/types': 5.38.1 + '@typescript-eslint/visitor-keys': 5.38.1 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -258,8 +252,8 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.38.1_typescript@4.8.4 - '@typescript-eslint/types': 5.38.1_typescript@4.8.4 + '@typescript-eslint/scope-manager': 5.38.1 + '@typescript-eslint/types': 5.38.1 '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.8.4 eslint: 8.7.0 eslint-scope: 5.1.1 @@ -269,14 +263,12 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys/5.38.1_typescript@4.8.4: + /@typescript-eslint/visitor-keys/5.38.1: resolution: {integrity: sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.38.1_typescript@4.8.4 + '@typescript-eslint/types': 5.38.1 eslint-visitor-keys: 3.3.0 - transitivePeerDependencies: - - typescript dev: true /acorn-jsx/5.3.2_acorn@8.7.1: @@ -1821,15 +1813,15 @@ packages: - typescript dev: true - file:../temp/tarballs/rushstack-heft-0.48.8.tgz: - resolution: {tarball: file:../temp/tarballs/rushstack-heft-0.48.8.tgz} + file:../temp/tarballs/rushstack-heft-0.48.9.tgz: + resolution: {tarball: file:../temp/tarballs/rushstack-heft-0.48.9.tgz} name: '@rushstack/heft' - version: 0.48.8 + version: 0.48.9 engines: {node: '>=10.13.0'} hasBin: true dependencies: - '@rushstack/heft-config-file': file:../temp/tarballs/rushstack-heft-config-file-0.11.3.tgz - '@rushstack/node-core-library': file:../temp/tarballs/rushstack-node-core-library-3.53.2.tgz + '@rushstack/heft-config-file': file:../temp/tarballs/rushstack-heft-config-file-0.11.4.tgz + '@rushstack/node-core-library': file:../temp/tarballs/rushstack-node-core-library-3.53.3.tgz '@rushstack/rig-package': file:../temp/tarballs/rushstack-rig-package-0.3.17.tgz '@rushstack/ts-command-line': file:../temp/tarballs/rushstack-ts-command-line-4.13.1.tgz '@types/tapable': 1.0.6 @@ -1844,21 +1836,21 @@ packages: true-case-path: 2.2.1 dev: true - file:../temp/tarballs/rushstack-heft-config-file-0.11.3.tgz: - resolution: {tarball: file:../temp/tarballs/rushstack-heft-config-file-0.11.3.tgz} + file:../temp/tarballs/rushstack-heft-config-file-0.11.4.tgz: + resolution: {tarball: file:../temp/tarballs/rushstack-heft-config-file-0.11.4.tgz} name: '@rushstack/heft-config-file' - version: 0.11.3 + version: 0.11.4 engines: {node: '>=10.13.0'} dependencies: - '@rushstack/node-core-library': file:../temp/tarballs/rushstack-node-core-library-3.53.2.tgz + '@rushstack/node-core-library': file:../temp/tarballs/rushstack-node-core-library-3.53.3.tgz '@rushstack/rig-package': file:../temp/tarballs/rushstack-rig-package-0.3.17.tgz jsonpath-plus: 4.0.0 dev: true - file:../temp/tarballs/rushstack-node-core-library-3.53.2.tgz: - resolution: {tarball: file:../temp/tarballs/rushstack-node-core-library-3.53.2.tgz} + file:../temp/tarballs/rushstack-node-core-library-3.53.3.tgz: + resolution: {tarball: file:../temp/tarballs/rushstack-node-core-library-3.53.3.tgz} name: '@rushstack/node-core-library' - version: 3.53.2 + version: 3.53.3 dependencies: '@types/node': 12.20.24 colors: 1.2.5 diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9db2b040789..0ed550be900 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -377,12 +377,15 @@ importers: ../../build-tests-samples/heft-storybook-react-tutorial: specifiers: + '@babel/core': ~7.17.0 '@rushstack/eslint-config': workspace:* '@rushstack/heft': workspace:* '@rushstack/heft-jest-plugin': workspace:* '@rushstack/heft-storybook-plugin': workspace:* '@rushstack/heft-webpack4-plugin': workspace:* + '@storybook/react': ~6.4.18 '@types/heft-jest': 1.0.1 + '@types/node': 12.20.24 '@types/react': 16.14.23 '@types/react-dom': 16.9.14 '@types/webpack-env': 1.13.0 @@ -402,12 +405,15 @@ importers: react-dom: 16.13.1_react@16.13.1 tslib: 2.3.1 devDependencies: + '@babel/core': 7.17.12 '@rushstack/eslint-config': link:../../eslint/eslint-config '@rushstack/heft': link:../../apps/heft '@rushstack/heft-jest-plugin': link:../../heft-plugins/heft-jest-plugin '@rushstack/heft-storybook-plugin': link:../../heft-plugins/heft-storybook-plugin '@rushstack/heft-webpack4-plugin': link:../../heft-plugins/heft-webpack4-plugin + '@storybook/react': 6.4.22_bx375rorklyz35x5nyxbxd5l3u '@types/heft-jest': 1.0.1 + '@types/node': 12.20.24 '@types/react': 16.14.23 '@types/react-dom': 16.9.14 '@types/webpack-env': 1.13.0 @@ -2688,6 +2694,9 @@ packages: /@aws-cdk/cloud-assembly-schema/2.7.0: resolution: {integrity: sha512-vKTKLMPvzUhsYo3c4/EbMJq+bwIgHkwK0lV9fc5mQlnTUTyHe6nGIvyzmWWMd5BVEkgNzw+QdecxeeYJNu/doA==} engines: {node: '>= 14.15.0'} + dependencies: + jsonschema: 1.4.1 + semver: 7.3.8 dev: true bundledDependencies: - jsonschema @@ -2711,6 +2720,7 @@ packages: engines: {node: '>= 14.15.0'} dependencies: '@aws-cdk/cloud-assembly-schema': 2.7.0 + semver: 7.3.8 dev: true bundledDependencies: - semver @@ -4319,6 +4329,10 @@ packages: '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 + /@balena/dockerignore/1.0.2: + resolution: {integrity: sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==} + dev: true + /@base2/pretty-print-object/1.0.1: resolution: {integrity: sha512-4iri8i1AqYHJE2DstZYkyEprg6Pq6sKx3xn5FpySk9sNhH7qN2LLlHJCfDTZRILNwQNPD7mATWM0TBui7uC1pA==} dev: true @@ -6501,6 +6515,97 @@ packages: util-deprecate: 1.0.2 dev: true + /@storybook/builder-webpack4/6.4.22_bdyrplxautjia6yrmekhzrb64q: + resolution: {integrity: sha512-A+GgGtKGnBneRFSFkDarUIgUTI8pYFdLmUVKEAGdh2hL+vLXAz9A46sEY7C8LQ85XWa8TKy3OTDxqR4+4iWj3A==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 + react-dom: ^16.8.0 || ^17.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@babel/core': 7.17.12 + '@babel/plugin-proposal-class-properties': 7.18.6_@babel+core@7.17.12 + '@babel/plugin-proposal-decorators': 7.20.5_@babel+core@7.17.12 + '@babel/plugin-proposal-export-default-from': 7.18.10_@babel+core@7.17.12 + '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6_@babel+core@7.17.12 + '@babel/plugin-proposal-object-rest-spread': 7.20.2_@babel+core@7.17.12 + '@babel/plugin-proposal-optional-chaining': 7.18.9_@babel+core@7.17.12 + '@babel/plugin-proposal-private-methods': 7.18.6_@babel+core@7.17.12 + '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.17.12 + '@babel/plugin-transform-arrow-functions': 7.18.6_@babel+core@7.17.12 + '@babel/plugin-transform-block-scoping': 7.20.5_@babel+core@7.17.12 + '@babel/plugin-transform-classes': 7.20.2_@babel+core@7.17.12 + '@babel/plugin-transform-destructuring': 7.20.2_@babel+core@7.17.12 + '@babel/plugin-transform-for-of': 7.18.8_@babel+core@7.17.12 + '@babel/plugin-transform-parameters': 7.20.5_@babel+core@7.17.12 + '@babel/plugin-transform-shorthand-properties': 7.18.6_@babel+core@7.17.12 + '@babel/plugin-transform-spread': 7.19.0_@babel+core@7.17.12 + '@babel/plugin-transform-template-literals': 7.18.9_@babel+core@7.17.12 + '@babel/preset-env': 7.20.2_@babel+core@7.17.12 + '@babel/preset-react': 7.18.6_@babel+core@7.17.12 + '@babel/preset-typescript': 7.18.6_@babel+core@7.17.12 + '@storybook/addons': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@storybook/api': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@storybook/channel-postmessage': 6.4.22 + '@storybook/channels': 6.4.22 + '@storybook/client-api': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@storybook/client-logger': 6.4.22 + '@storybook/components': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@storybook/core-common': 6.4.22_rvw4ma2iutwk6zwdf7hk54htde + '@storybook/core-events': 6.4.22 + '@storybook/node-logger': 6.4.22 + '@storybook/preview-web': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@storybook/router': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@storybook/semver': 7.3.2 + '@storybook/store': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@storybook/theming': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@storybook/ui': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@types/node': 14.18.34 + '@types/webpack': 4.41.32 + autoprefixer: 9.8.8 + babel-loader: 8.2.5_4bf35c6ryl6gwyrcrj2ykng7ny + babel-plugin-macros: 2.8.0 + babel-plugin-polyfill-corejs3: 0.1.7_@babel+core@7.17.12 + case-sensitive-paths-webpack-plugin: 2.4.0 + core-js: 3.26.1 + css-loader: 3.6.0_webpack@4.44.2 + file-loader: 6.2.0_webpack@4.44.2 + find-up: 5.0.0 + fork-ts-checker-webpack-plugin: 4.1.6 + glob: 7.2.3 + glob-promise: 3.4.0_glob@7.2.3 + global: 4.4.0 + html-webpack-plugin: 4.5.2_webpack@4.44.2 + pnp-webpack-plugin: 1.6.4_typescript@4.8.4 + postcss: 7.0.39 + postcss-flexbugs-fixes: 4.2.1 + postcss-loader: 4.3.0_4a2i7aa2i6hzz4ngguaxzo4tzi + raw-loader: 4.0.2_webpack@4.44.2 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + stable: 0.1.8 + style-loader: 1.3.0_webpack@4.44.2 + terser-webpack-plugin: 4.2.3_webpack@4.44.2 + ts-dedent: 2.2.0 + typescript: 4.8.4 + url-loader: 4.1.1_zmzwotvrfu62vdeozbyveyswza + util-deprecate: 1.0.2 + webpack: 4.44.2 + webpack-dev-middleware: 3.7.3_2jhnw6fokymnjfoumvhvkjoyjq + webpack-filter-warnings-plugin: 1.2.1_webpack@4.44.2 + webpack-hot-middleware: 2.25.3 + webpack-virtual-modules: 0.2.2 + transitivePeerDependencies: + - '@types/react' + - eslint + - supports-color + - vue-template-compiler + - webpack-cli + - webpack-command + dev: true + /@storybook/builder-webpack4/6.4.22_xf6r4yukfywdkj47txjlawutqi: resolution: {integrity: sha512-A+GgGtKGnBneRFSFkDarUIgUTI8pYFdLmUVKEAGdh2hL+vLXAz9A46sEY7C8LQ85XWa8TKy3OTDxqR4+4iWj3A==} peerDependencies: @@ -6873,12 +6978,155 @@ packages: - webpack-command dev: true + /@storybook/core-common/6.4.22_rvw4ma2iutwk6zwdf7hk54htde: + resolution: {integrity: sha512-PD3N/FJXPNRHeQS2zdgzYFtqPLdi3MLwAicbnw+U3SokcsspfsAuyYHZOYZgwO8IAEKy6iCc7TpBdiSJZ/vAKQ==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 + react-dom: ^16.8.0 || ^17.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@babel/core': 7.17.12 + '@babel/plugin-proposal-class-properties': 7.18.6_@babel+core@7.17.12 + '@babel/plugin-proposal-decorators': 7.20.5_@babel+core@7.17.12 + '@babel/plugin-proposal-export-default-from': 7.18.10_@babel+core@7.17.12 + '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6_@babel+core@7.17.12 + '@babel/plugin-proposal-object-rest-spread': 7.20.2_@babel+core@7.17.12 + '@babel/plugin-proposal-optional-chaining': 7.18.9_@babel+core@7.17.12 + '@babel/plugin-proposal-private-methods': 7.18.6_@babel+core@7.17.12 + '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.17.12 + '@babel/plugin-transform-arrow-functions': 7.18.6_@babel+core@7.17.12 + '@babel/plugin-transform-block-scoping': 7.20.5_@babel+core@7.17.12 + '@babel/plugin-transform-classes': 7.20.2_@babel+core@7.17.12 + '@babel/plugin-transform-destructuring': 7.20.2_@babel+core@7.17.12 + '@babel/plugin-transform-for-of': 7.18.8_@babel+core@7.17.12 + '@babel/plugin-transform-parameters': 7.20.5_@babel+core@7.17.12 + '@babel/plugin-transform-shorthand-properties': 7.18.6_@babel+core@7.17.12 + '@babel/plugin-transform-spread': 7.19.0_@babel+core@7.17.12 + '@babel/preset-env': 7.20.2_@babel+core@7.17.12 + '@babel/preset-react': 7.18.6_@babel+core@7.17.12 + '@babel/preset-typescript': 7.18.6_@babel+core@7.17.12 + '@babel/register': 7.18.9_@babel+core@7.17.12 + '@storybook/node-logger': 6.4.22 + '@storybook/semver': 7.3.2 + '@types/node': 14.18.34 + '@types/pretty-hrtime': 1.0.1 + babel-loader: 8.2.5_4bf35c6ryl6gwyrcrj2ykng7ny + babel-plugin-macros: 3.1.0 + babel-plugin-polyfill-corejs3: 0.1.7_@babel+core@7.17.12 + chalk: 4.1.2 + core-js: 3.26.1 + express: 4.18.1 + file-system-cache: 1.1.0 + find-up: 5.0.0 + fork-ts-checker-webpack-plugin: 6.5.2_l3j2csrdyqgod4lcwxvazi2dg4 + fs-extra: 9.1.0 + glob: 7.2.3 + handlebars: 4.7.7 + interpret: 2.2.0 + json5: 2.2.1 + lazy-universal-dotenv: 3.0.1 + picomatch: 2.3.1 + pkg-dir: 5.0.0 + pretty-hrtime: 1.0.3 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + resolve-from: 5.0.0 + slash: 3.0.0 + telejson: 5.3.3 + ts-dedent: 2.2.0 + typescript: 4.8.4 + util-deprecate: 1.0.2 + webpack: 4.44.2 + transitivePeerDependencies: + - eslint + - supports-color + - vue-template-compiler + - webpack-cli + - webpack-command + dev: true + /@storybook/core-events/6.4.22: resolution: {integrity: sha512-5GYY5+1gd58Gxjqex27RVaX6qbfIQmJxcbzbNpXGNSqwqAuIIepcV1rdCVm6I4C3Yb7/AQ3cN5dVbf33QxRIwA==} dependencies: core-js: 3.26.1 dev: true + /@storybook/core-server/6.4.22_bdyrplxautjia6yrmekhzrb64q: + resolution: {integrity: sha512-wFh3e2fa0un1d4+BJP+nd3FVWUO7uHTqv3OGBfOmzQMKp4NU1zaBNdSQG7Hz6mw0fYPBPZgBjPfsJRwIYLLZyw==} + peerDependencies: + '@storybook/builder-webpack5': 6.4.22 + '@storybook/manager-webpack5': 6.4.22 + react: ^16.8.0 || ^17.0.0 + react-dom: ^16.8.0 || ^17.0.0 + typescript: '*' + peerDependenciesMeta: + '@storybook/builder-webpack5': + optional: true + '@storybook/manager-webpack5': + optional: true + typescript: + optional: true + dependencies: + '@discoveryjs/json-ext': 0.5.7 + '@storybook/builder-webpack4': 6.4.22_bdyrplxautjia6yrmekhzrb64q + '@storybook/core-client': 6.4.22_m2ha4wqgs5y6chnytfqlahqmme + '@storybook/core-common': 6.4.22_rvw4ma2iutwk6zwdf7hk54htde + '@storybook/core-events': 6.4.22 + '@storybook/csf': 0.0.2--canary.87bc651.0 + '@storybook/csf-tools': 6.4.22 + '@storybook/manager-webpack4': 6.4.22_bdyrplxautjia6yrmekhzrb64q + '@storybook/node-logger': 6.4.22 + '@storybook/semver': 7.3.2 + '@storybook/store': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@types/node': 14.18.34 + '@types/node-fetch': 2.6.2 + '@types/pretty-hrtime': 1.0.1 + '@types/webpack': 4.41.32 + better-opn: 2.1.1 + boxen: 5.1.2 + chalk: 4.1.2 + cli-table3: 0.6.3 + commander: 6.2.1 + compression: 1.7.4 + core-js: 3.26.1 + cpy: 8.1.2 + detect-port: 1.5.1 + express: 4.18.1 + file-system-cache: 1.1.0 + fs-extra: 9.1.0 + globby: 11.1.0 + ip: 1.1.8 + lodash: 4.17.21 + node-fetch: 2.6.7 + pretty-hrtime: 1.0.3 + prompts: 2.4.2 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + regenerator-runtime: 0.13.11 + serve-favicon: 2.5.0 + slash: 3.0.0 + telejson: 5.3.3 + ts-dedent: 2.2.0 + typescript: 4.8.4 + util-deprecate: 1.0.2 + watchpack: 2.4.0 + webpack: 4.44.2 + ws: 8.11.0 + transitivePeerDependencies: + - '@types/react' + - bufferutil + - encoding + - eslint + - supports-color + - utf-8-validate + - vue-template-compiler + - webpack-cli + - webpack-command + dev: true + /@storybook/core-server/6.4.22_xf6r4yukfywdkj47txjlawutqi: resolution: {integrity: sha512-wFh3e2fa0un1d4+BJP+nd3FVWUO7uHTqv3OGBfOmzQMKp4NU1zaBNdSQG7Hz6mw0fYPBPZgBjPfsJRwIYLLZyw==} peerDependencies: @@ -6952,6 +7200,39 @@ packages: - webpack-command dev: true + /@storybook/core/6.4.22_alscxlewyk2uyylj2zm57mo5wy: + resolution: {integrity: sha512-KZYJt7GM5NgKFXbPRZZZPEONZ5u/tE/cRbMdkn/zWN3He8+VP+65/tz8hbriI/6m91AWVWkBKrODSkeq59NgRA==} + peerDependencies: + '@storybook/builder-webpack5': 6.4.22 + react: ^16.8.0 || ^17.0.0 + react-dom: ^16.8.0 || ^17.0.0 + typescript: '*' + webpack: '*' + peerDependenciesMeta: + '@storybook/builder-webpack5': + optional: true + typescript: + optional: true + dependencies: + '@storybook/core-client': 6.4.22_m2ha4wqgs5y6chnytfqlahqmme + '@storybook/core-server': 6.4.22_bdyrplxautjia6yrmekhzrb64q + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + typescript: 4.8.4 + webpack: 4.44.2 + transitivePeerDependencies: + - '@storybook/manager-webpack5' + - '@types/react' + - bufferutil + - encoding + - eslint + - supports-color + - utf-8-validate + - vue-template-compiler + - webpack-cli + - webpack-command + dev: true + /@storybook/core/6.4.22_m2ha4wqgs5y6chnytfqlahqmme: resolution: {integrity: sha512-KZYJt7GM5NgKFXbPRZZZPEONZ5u/tE/cRbMdkn/zWN3He8+VP+65/tz8hbriI/6m91AWVWkBKrODSkeq59NgRA==} peerDependencies: @@ -7015,6 +7296,65 @@ packages: lodash: 4.17.21 dev: true + /@storybook/manager-webpack4/6.4.22_bdyrplxautjia6yrmekhzrb64q: + resolution: {integrity: sha512-nzhDMJYg0vXdcG0ctwE6YFZBX71+5NYaTGkxg3xT7gbgnP1YFXn9gVODvgq3tPb3gcRapjyOIxUa20rV+r8edA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 + react-dom: ^16.8.0 || ^17.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@babel/core': 7.17.12 + '@babel/plugin-transform-template-literals': 7.18.9_@babel+core@7.17.12 + '@babel/preset-react': 7.18.6_@babel+core@7.17.12 + '@storybook/addons': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@storybook/core-client': 6.4.22_m2ha4wqgs5y6chnytfqlahqmme + '@storybook/core-common': 6.4.22_rvw4ma2iutwk6zwdf7hk54htde + '@storybook/node-logger': 6.4.22 + '@storybook/theming': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@storybook/ui': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@types/node': 14.18.34 + '@types/webpack': 4.41.32 + babel-loader: 8.2.5_4bf35c6ryl6gwyrcrj2ykng7ny + case-sensitive-paths-webpack-plugin: 2.4.0 + chalk: 4.1.2 + core-js: 3.26.1 + css-loader: 3.6.0_webpack@4.44.2 + express: 4.18.1 + file-loader: 6.2.0_webpack@4.44.2 + file-system-cache: 1.1.0 + find-up: 5.0.0 + fs-extra: 9.1.0 + html-webpack-plugin: 4.5.2_webpack@4.44.2 + node-fetch: 2.6.7 + pnp-webpack-plugin: 1.6.4_typescript@4.8.4 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + read-pkg-up: 7.0.1 + regenerator-runtime: 0.13.11 + resolve-from: 5.0.0 + style-loader: 1.3.0_webpack@4.44.2 + telejson: 5.3.3 + terser-webpack-plugin: 4.2.3_webpack@4.44.2 + ts-dedent: 2.2.0 + typescript: 4.8.4 + url-loader: 4.1.1_zmzwotvrfu62vdeozbyveyswza + util-deprecate: 1.0.2 + webpack: 4.44.2 + webpack-dev-middleware: 3.7.3_2jhnw6fokymnjfoumvhvkjoyjq + webpack-virtual-modules: 0.2.2 + transitivePeerDependencies: + - '@types/react' + - encoding + - eslint + - supports-color + - vue-template-compiler + - webpack-cli + - webpack-command + dev: true + /@storybook/manager-webpack4/6.4.22_xf6r4yukfywdkj47txjlawutqi: resolution: {integrity: sha512-nzhDMJYg0vXdcG0ctwE6YFZBX71+5NYaTGkxg3xT7gbgnP1YFXn9gVODvgq3tPb3gcRapjyOIxUa20rV+r8edA==} peerDependencies: @@ -7203,6 +7543,72 @@ packages: - webpack-plugin-serve dev: true + /@storybook/react/6.4.22_bx375rorklyz35x5nyxbxd5l3u: + resolution: {integrity: sha512-5BFxtiguOcePS5Ty/UoH7C6odmvBYIZutfiy4R3Ua6FYmtxac5vP9r5KjCz1IzZKT8mCf4X+PuK1YvDrPPROgQ==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + '@babel/core': ^7.11.5 + '@types/node': '>=12' + '@types/react': '>=16' + react: ^16.8.0 || ^17.0.0 + react-dom: ^16.8.0 || ^17.0.0 + typescript: '*' + peerDependenciesMeta: + '@babel/core': + optional: true + typescript: + optional: true + dependencies: + '@babel/core': 7.17.12 + '@babel/preset-flow': 7.18.6_@babel+core@7.17.12 + '@babel/preset-react': 7.18.6_@babel+core@7.17.12 + '@pmmmwh/react-refresh-webpack-plugin': 0.5.10_yceubsmjd6jm3woocckpqejnhy + '@storybook/addons': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@storybook/core': 6.4.22_alscxlewyk2uyylj2zm57mo5wy + '@storybook/core-common': 6.4.22_rvw4ma2iutwk6zwdf7hk54htde + '@storybook/csf': 0.0.2--canary.87bc651.0 + '@storybook/node-logger': 6.4.22 + '@storybook/react-docgen-typescript-plugin': 1.0.2-canary.253f8c1.0_l2tljvf7qg4dnwbeffjdh4wj4e + '@storybook/semver': 7.3.2 + '@storybook/store': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma + '@types/node': 12.20.24 + '@types/react': 16.14.23 + '@types/webpack-env': 1.18.0 + babel-plugin-add-react-displayname: 0.0.5 + babel-plugin-named-asset-import: 0.3.8_@babel+core@7.17.12 + babel-plugin-react-docgen: 4.2.1 + core-js: 3.26.1 + global: 4.4.0 + lodash: 4.17.21 + prop-types: 15.8.1 + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + react-refresh: 0.11.0 + read-pkg-up: 7.0.1 + regenerator-runtime: 0.13.11 + ts-dedent: 2.2.0 + typescript: 4.8.4 + webpack: 4.44.2 + transitivePeerDependencies: + - '@storybook/builder-webpack5' + - '@storybook/manager-webpack5' + - '@types/webpack' + - bufferutil + - encoding + - eslint + - sockjs-client + - supports-color + - type-fest + - utf-8-validate + - vue-template-compiler + - webpack-cli + - webpack-command + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + /@storybook/router/6.4.22_e4p5kqppx5gth2ijr2xdvk24ma: resolution: {integrity: sha512-zeuE8ZgFhNerQX8sICQYNYL65QEi3okyzw7ynF58Ud6nRw4fMxSOHcj2T+nZCIU5ufozRL4QWD/Rg9P2s/HtLw==} peerDependencies: @@ -8940,7 +9346,16 @@ packages: peerDependencies: constructs: ^10.0.0 dependencies: + '@balena/dockerignore': 1.0.2 + case: 1.6.3 constructs: 10.0.130 + fs-extra: 9.1.0 + ignore: 5.2.1 + jsonschema: 1.4.1 + minimatch: 3.1.2 + punycode: 2.1.1 + semver: 7.3.8 + yaml: 1.10.2 dev: true bundledDependencies: - '@balena/dockerignore' @@ -9691,6 +10106,11 @@ packages: engines: {node: '>=4'} dev: true + /case/1.6.3: + resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==} + engines: {node: '>= 0.8.0'} + dev: true + /ccount/1.1.0: resolution: {integrity: sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==} dev: true @@ -10779,12 +11199,12 @@ packages: cosmiconfig: 7.1.0 debug: 4.3.4 deps-regex: 0.1.4 - ignore: 5.1.9 + ignore: 5.2.1 is-core-module: 2.11.0 js-yaml: 3.14.1 json5: 2.2.1 lodash: 4.17.21 - minimatch: 3.0.8 + minimatch: 3.1.2 multimatch: 5.0.0 please-upgrade-node: 3.2.0 query-ast: 1.0.4 @@ -12480,6 +12900,38 @@ packages: webpack: 4.44.2 dev: true + /fork-ts-checker-webpack-plugin/6.5.2_l3j2csrdyqgod4lcwxvazi2dg4: + resolution: {integrity: sha512-m5cUmF30xkZ7h4tWUgTAcEaKmUW7tfyUyTqNNOz7OxWJ0v1VWKTcOvH8FWHUwSjlW/356Ijc9vi3XfcPstpQKA==} + engines: {node: '>=10', yarn: '>=1.0.0'} + peerDependencies: + eslint: '>= 6' + typescript: '>= 2.7' + vue-template-compiler: '*' + webpack: '>= 4' + peerDependenciesMeta: + eslint: + optional: true + vue-template-compiler: + optional: true + dependencies: + '@babel/code-frame': 7.18.6 + '@types/json-schema': 7.0.11 + chalk: 4.1.2 + chokidar: 3.5.3 + cosmiconfig: 6.0.0 + deepmerge: 4.2.2 + eslint: 8.7.0 + fs-extra: 9.1.0 + glob: 7.2.3 + memfs: 3.4.3 + minimatch: 3.1.2 + schema-utils: 2.7.0 + semver: 7.3.8 + tapable: 1.1.3 + typescript: 4.8.4 + webpack: 4.44.2 + dev: true + /form-data/3.0.1: resolution: {integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==} engines: {node: '>= 6'} @@ -14896,6 +15348,10 @@ packages: resolution: {integrity: sha512-e0Jtg4KAzDJKKwzbLaUtinCn0RZseWBVRTRGihSpvFlM3wTR7ExSp+PTdeTsDrLNJUe7L7JYJe8mblHX5SCT6A==} engines: {node: '>=10.0'} + /jsonschema/1.4.1: + resolution: {integrity: sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==} + dev: true + /jsonwebtoken/8.5.1: resolution: {integrity: sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==} engines: {node: '>=4', npm: '>=1.4.28'} @@ -15750,7 +16206,7 @@ packages: array-differ: 3.0.0 array-union: 2.1.0 arrify: 2.0.1 - minimatch: 3.0.8 + minimatch: 3.1.2 dev: false /mute-stream/0.0.8: diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index 2469dd05674..f2f3dd8a114 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "cd1d804210c5b488b169e789ce7afca275baea08", + "pnpmShrinkwrapHash": "c9c9cff87e949cc1373c2bee18dca4fe42b7d06d", "preferredVersionsHash": "5222ca779ae69ebfd201e39c17f48ce9eaf8c3c2" } From 4f15a3ce70f2925be93790e3aa2822a832d96bb5 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 16 Jan 2023 14:38:44 -0800 Subject: [PATCH 059/399] Use ts.getCheckFlags to fix TS 5.0 --- apps/api-extractor/src/analyzer/TypeScriptInternals.ts | 2 +- .../api-extractor/check-flags_2023-01-16-22-41.json | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json diff --git a/apps/api-extractor/src/analyzer/TypeScriptInternals.ts b/apps/api-extractor/src/analyzer/TypeScriptInternals.ts index 32ab70795bd..e8b74f8844a 100644 --- a/apps/api-extractor/src/analyzer/TypeScriptInternals.ts +++ b/apps/api-extractor/src/analyzer/TypeScriptInternals.ts @@ -48,7 +48,7 @@ export class TypeScriptInternals { if ( // eslint-disable-next-line no-bitwise symbol.flags & ts.SymbolFlags.Transient && - (symbol as any).checkFlags === (ts as any).CheckFlags.Late + (ts as any).getCheckFlags(symbol) === (ts as any).CheckFlags.Late ) { return true; } diff --git a/common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json b/common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json new file mode 100644 index 00000000000..917484fe346 --- /dev/null +++ b/common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/api-extractor", + "comment": "Use ts.getCheckFlags to fix TS 5.0", + "type": "patch" + } + ], + "packageName": "@microsoft/api-extractor" +} \ No newline at end of file From 2781adc2176d936f4827414b75ce557fa9500ef9 Mon Sep 17 00:00:00 2001 From: Rongqi Zhou Date: Wed, 18 Jan 2023 10:34:26 +0800 Subject: [PATCH 060/399] fix error for start storybook --- .../heft-storybook-react-tutorial/config/heft.json | 3 ++- heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts | 2 +- heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build-tests-samples/heft-storybook-react-tutorial/config/heft.json b/build-tests-samples/heft-storybook-react-tutorial/config/heft.json index 659d24ddb98..9c76b5277b3 100644 --- a/build-tests-samples/heft-storybook-react-tutorial/config/heft.json +++ b/build-tests-samples/heft-storybook-react-tutorial/config/heft.json @@ -56,7 +56,8 @@ "options": { "storykitPackageName": "heft-storybook-react-tutorial-storykit", "startupModulePath": "@storybook/react/bin/index.js", - "staticBuildModulePath": "@storybook/react/bin/build.js" + "staticBuildModulePath": "@storybook/react/bin/build.js", + "staticBuildOutputDir": "static-build-dir" } } ] diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts index cb8d1a976d1..7b44b2942b1 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts @@ -127,7 +127,6 @@ export class StorybookPlugin implements IHeftPlugin { ); } this._storykitPackageName = options.storykitPackageName; - this._staticBuildOutputDir = options.staticBuildOutputDir; if (!options.startupModulePath && !options.staticBuildModulePath) { throw new Error( @@ -151,6 +150,7 @@ export class StorybookPlugin implements IHeftPlugin { return; } + this._staticBuildOutputDir = build.properties.serveMode ? undefined : options.staticBuildModulePath; const modulePath: string | undefined = build.properties.serveMode ? options.startupModulePath : options.staticBuildModulePath; diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts b/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts index 85d93a1ba01..5ec9f5d6901 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookRunner.ts @@ -30,11 +30,11 @@ export class StorybookRunner extends SubprocessRunnerBase Date: Mon, 16 Jan 2023 11:01:12 -0600 Subject: [PATCH 061/399] [heft-jest-plugin] Upgrade Jest from `~27.4.2` to `~29.3.1` --- .../package.json | 2 +- .../api-documenter-scenarios/package.json | 2 +- build-tests/api-documenter-test/package.json | 2 +- .../api-extractor-lib2-test/package.json | 2 +- .../api-extractor-lib3-test/package.json | 2 +- .../api-extractor-scenarios/package.json | 2 +- .../api-extractor-test-01/package.json | 2 +- .../api-extractor-test-03/package.json | 2 +- .../heft-jest-reporters-test/package.json | 4 +- .../src/test/customJestReporter.ts | 4 +- .../heft-jest-reporters-test/tsconfig.json | 2 +- .../package.json | 2 +- .../update-jest-29.3.1_2023-01-16-20-48.json | 10 + .../update-jest-29.3.1_2023-01-16-20-48.json | 10 + .../update-jest-29.3.1_2023-01-16-20-48.json | 10 + common/config/rush/pnpm-lock.yaml | 1105 ++++++++++++++--- .../includes/jest-shared.config.json | 10 +- heft-plugins/heft-jest-plugin/package.json | 17 +- .../heft-jest-plugin/src/HeftJestReporter.ts | 4 +- .../heft-jest-plugin/src/HeftJestResolver.ts | 12 +- .../heft-jest-plugin/src/JestPlugin.ts | 1 + .../heft-jest-plugin/src/JestUtils.ts | 11 +- .../src/transformers/BuildTransformer.ts | 12 +- .../transformers/IdentityMockTransformer.ts | 7 +- .../src/transformers/StringMockTransformer.ts | 7 +- rigs/heft-node-rig/package.json | 3 +- rigs/heft-web-rig/package.json | 2 +- 27 files changed, 1051 insertions(+), 198 deletions(-) create mode 100644 common/changes/@rushstack/heft-jest-plugin/update-jest-29.3.1_2023-01-16-20-48.json create mode 100644 common/changes/@rushstack/heft-node-rig/update-jest-29.3.1_2023-01-16-20-48.json create mode 100644 common/changes/@rushstack/heft-web-rig/update-jest-29.3.1_2023-01-16-20-48.json diff --git a/build-tests-samples/heft-storybook-react-tutorial-storykit/package.json b/build-tests-samples/heft-storybook-react-tutorial-storykit/package.json index d718ffdc9f1..3f2428360b0 100644 --- a/build-tests-samples/heft-storybook-react-tutorial-storykit/package.json +++ b/build-tests-samples/heft-storybook-react-tutorial-storykit/package.json @@ -27,7 +27,7 @@ "@types/webpack-env": "1.13.0", "babel-loader": "~8.2.3", "css-loader": "~5.2.7", - "jest": "~27.4.2", + "jest": "~29.3.1", "react-dom": "~16.13.1", "react": "~16.13.1", "style-loader": "~2.0.0", diff --git a/build-tests/api-documenter-scenarios/package.json b/build-tests/api-documenter-scenarios/package.json index 0504036e34d..7a69c215508 100644 --- a/build-tests/api-documenter-scenarios/package.json +++ b/build-tests/api-documenter-scenarios/package.json @@ -13,7 +13,7 @@ "@microsoft/api-extractor": "workspace:*", "@microsoft/teams-js": "1.3.0-beta.4", "@rushstack/node-core-library": "workspace:*", - "@types/jest": "27.4.0", + "@types/jest": "29.2.5", "@types/node": "12.20.24", "fs-extra": "~7.0.1", "typescript": "~4.8.4" diff --git a/build-tests/api-documenter-test/package.json b/build-tests/api-documenter-test/package.json index 2e60c0a209a..c9638bdcce9 100644 --- a/build-tests/api-documenter-test/package.json +++ b/build-tests/api-documenter-test/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@microsoft/api-documenter": "workspace:*", "@microsoft/api-extractor": "workspace:*", - "@types/jest": "27.4.0", + "@types/jest": "29.2.5", "@types/node": "12.20.24", "fs-extra": "~7.0.1", "typescript": "~4.8.4" diff --git a/build-tests/api-extractor-lib2-test/package.json b/build-tests/api-extractor-lib2-test/package.json index 82f96a8d80d..2ff63ff313a 100644 --- a/build-tests/api-extractor-lib2-test/package.json +++ b/build-tests/api-extractor-lib2-test/package.json @@ -11,7 +11,7 @@ }, "devDependencies": { "@microsoft/api-extractor": "workspace:*", - "@types/jest": "27.4.0", + "@types/jest": "29.2.5", "@types/node": "12.20.24", "fs-extra": "~7.0.1", "typescript": "~4.8.4" diff --git a/build-tests/api-extractor-lib3-test/package.json b/build-tests/api-extractor-lib3-test/package.json index 3286071f3fb..58458a62241 100644 --- a/build-tests/api-extractor-lib3-test/package.json +++ b/build-tests/api-extractor-lib3-test/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@microsoft/api-extractor": "workspace:*", - "@types/jest": "27.4.0", + "@types/jest": "29.2.5", "@types/node": "12.20.24", "fs-extra": "~7.0.1", "typescript": "~4.8.4" diff --git a/build-tests/api-extractor-scenarios/package.json b/build-tests/api-extractor-scenarios/package.json index ace19ad9ce3..6140a0d3cce 100644 --- a/build-tests/api-extractor-scenarios/package.json +++ b/build-tests/api-extractor-scenarios/package.json @@ -13,7 +13,7 @@ "@microsoft/api-extractor": "workspace:*", "@microsoft/teams-js": "1.3.0-beta.4", "@rushstack/node-core-library": "workspace:*", - "@types/jest": "27.4.0", + "@types/jest": "29.2.5", "@types/node": "12.20.24", "api-extractor-lib1-test": "workspace:*", "api-extractor-lib2-test": "workspace:*", diff --git a/build-tests/api-extractor-test-01/package.json b/build-tests/api-extractor-test-01/package.json index 0f4ae7d368b..d992bca8529 100644 --- a/build-tests/api-extractor-test-01/package.json +++ b/build-tests/api-extractor-test-01/package.json @@ -10,7 +10,7 @@ "_phase:build": "node build.js" }, "dependencies": { - "@types/jest": "27.4.0", + "@types/jest": "29.2.5", "@types/long": "4.0.0", "long": "^4.0.0" }, diff --git a/build-tests/api-extractor-test-03/package.json b/build-tests/api-extractor-test-03/package.json index 5f9d8bf84a5..534a8b3bed5 100644 --- a/build-tests/api-extractor-test-03/package.json +++ b/build-tests/api-extractor-test-03/package.json @@ -8,7 +8,7 @@ "_phase:build": "node build.js" }, "devDependencies": { - "@types/jest": "27.4.0", + "@types/jest": "29.2.5", "@types/node": "12.20.24", "api-extractor-test-02": "workspace:*", "fs-extra": "~7.0.1", diff --git a/build-tests/heft-jest-reporters-test/package.json b/build-tests/heft-jest-reporters-test/package.json index d62e74ac22e..dc07a7d9b18 100644 --- a/build-tests/heft-jest-reporters-test/package.json +++ b/build-tests/heft-jest-reporters-test/package.json @@ -10,8 +10,8 @@ "_phase:test": "heft test --no-build" }, "devDependencies": { - "@jest/reporters": "~27.4.2", - "@jest/types": "~27.4.2", + "@jest/reporters": "~29.3.1", + "@jest/types": "29.3.1", "@rushstack/eslint-config": "workspace:*", "@rushstack/heft": "workspace:*", "@rushstack/heft-jest-plugin": "workspace:*", diff --git a/build-tests/heft-jest-reporters-test/src/test/customJestReporter.ts b/build-tests/heft-jest-reporters-test/src/test/customJestReporter.ts index b1910c87c6a..8c0ec66138e 100644 --- a/build-tests/heft-jest-reporters-test/src/test/customJestReporter.ts +++ b/build-tests/heft-jest-reporters-test/src/test/customJestReporter.ts @@ -6,7 +6,7 @@ import type { Test, TestResult, AggregatedResult, - Context, + TestContext, ReporterOnStartOptions } from '@jest/reporters'; @@ -28,7 +28,7 @@ module.exports = class CustomJestReporter implements Reporter { } } - public onRunComplete(contexts: Set, results: AggregatedResult): void | Promise { + public onRunComplete(contexts: Set, results: AggregatedResult): void | Promise { console.log('################# Completing test run #################'); console.log(); } diff --git a/build-tests/heft-jest-reporters-test/tsconfig.json b/build-tests/heft-jest-reporters-test/tsconfig.json index 16141ce861e..e1589c3d4fd 100644 --- a/build-tests/heft-jest-reporters-test/tsconfig.json +++ b/build-tests/heft-jest-reporters-test/tsconfig.json @@ -17,7 +17,7 @@ "module": "esnext", "moduleResolution": "node", - "target": "es5", + "target": "ES2015", "lib": ["es5"] }, "include": ["src/**/*.ts", "src/**/*.tsx"], diff --git a/build-tests/heft-typescript-composite-test/package.json b/build-tests/heft-typescript-composite-test/package.json index 9860d7725a3..791e4cd92b1 100644 --- a/build-tests/heft-typescript-composite-test/package.json +++ b/build-tests/heft-typescript-composite-test/package.json @@ -15,7 +15,7 @@ "@rushstack/heft-jest-plugin": "workspace:*", "@types/heft-jest": "1.0.1", "@types/webpack-env": "1.13.0", - "@types/jest": "27.4.0", + "@types/jest": "29.2.5", "eslint": "~8.7.0", "tslint": "~5.20.1", "tslint-microsoft-contrib": "~6.2.0", diff --git a/common/changes/@rushstack/heft-jest-plugin/update-jest-29.3.1_2023-01-16-20-48.json b/common/changes/@rushstack/heft-jest-plugin/update-jest-29.3.1_2023-01-16-20-48.json new file mode 100644 index 00000000000..2340aafe275 --- /dev/null +++ b/common/changes/@rushstack/heft-jest-plugin/update-jest-29.3.1_2023-01-16-20-48.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/heft-jest-plugin", + "comment": "Upgrade Jest from `~27.4.2` to `~29.3.1`", + "type": "minor" + } + ], + "packageName": "@rushstack/heft-jest-plugin" +} \ No newline at end of file diff --git a/common/changes/@rushstack/heft-node-rig/update-jest-29.3.1_2023-01-16-20-48.json b/common/changes/@rushstack/heft-node-rig/update-jest-29.3.1_2023-01-16-20-48.json new file mode 100644 index 00000000000..6d9c365a2ea --- /dev/null +++ b/common/changes/@rushstack/heft-node-rig/update-jest-29.3.1_2023-01-16-20-48.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/heft-node-rig", + "comment": "Upgrade Jest from `~27.4.2` to `~29.3.1`", + "type": "minor" + } + ], + "packageName": "@rushstack/heft-node-rig" +} \ No newline at end of file diff --git a/common/changes/@rushstack/heft-web-rig/update-jest-29.3.1_2023-01-16-20-48.json b/common/changes/@rushstack/heft-web-rig/update-jest-29.3.1_2023-01-16-20-48.json new file mode 100644 index 00000000000..60a82d4a404 --- /dev/null +++ b/common/changes/@rushstack/heft-web-rig/update-jest-29.3.1_2023-01-16-20-48.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/heft-web-rig", + "comment": "Upgrade Jest from `~27.4.2` to `~29.3.1`", + "type": "minor" + } + ], + "packageName": "@rushstack/heft-web-rig" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e080e050100..358fd1ac51a 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -446,7 +446,7 @@ importers: '@types/webpack-env': 1.13.0 babel-loader: ~8.2.3 css-loader: ~5.2.7 - jest: ~27.4.2 + jest: ~29.3.1 react: ~16.13.1 react-dom: ~16.13.1 style-loader: ~2.0.0 @@ -458,7 +458,7 @@ importers: '@storybook/addon-actions': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma '@storybook/addon-essentials': 6.4.22_q2qw673im4ojqxzlijezcm3cd4 '@storybook/addon-links': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma - '@storybook/cli': 6.4.22_qrag5zyjgmrwa7rjqjc5fiwide + '@storybook/cli': 6.4.22_ucjucjjwhnbpf3qpr4bgjq3ada '@storybook/components': 6.4.22_e4p5kqppx5gth2ijr2xdvk24ma '@storybook/core-events': 6.4.22 '@storybook/react': 6.4.22_6pxnn2xtr5yph4wackblrq76km @@ -470,7 +470,7 @@ importers: '@types/webpack-env': 1.13.0 babel-loader: 8.2.5_4bf35c6ryl6gwyrcrj2ykng7ny css-loader: 5.2.7_webpack@4.44.2 - jest: 27.4.7_@types+node@12.20.24 + jest: 29.3.1_@types+node@12.20.24 react: 16.13.1 react-dom: 16.13.1_react@16.13.1 style-loader: 2.0.0_webpack@4.44.2 @@ -595,7 +595,7 @@ importers: '@microsoft/api-extractor': workspace:* '@microsoft/teams-js': 1.3.0-beta.4 '@rushstack/node-core-library': workspace:* - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 fs-extra: ~7.0.1 typescript: ~4.8.4 @@ -604,7 +604,7 @@ importers: '@microsoft/api-extractor': link:../../apps/api-extractor '@microsoft/teams-js': 1.3.0-beta.4 '@rushstack/node-core-library': link:../../libraries/node-core-library - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 fs-extra: 7.0.1 typescript: 4.8.4 @@ -613,14 +613,14 @@ importers: specifiers: '@microsoft/api-documenter': workspace:* '@microsoft/api-extractor': workspace:* - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 fs-extra: ~7.0.1 typescript: ~4.8.4 devDependencies: '@microsoft/api-documenter': link:../../apps/api-documenter '@microsoft/api-extractor': link:../../apps/api-extractor - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 fs-extra: 7.0.1 typescript: 4.8.4 @@ -638,13 +638,13 @@ importers: ../../build-tests/api-extractor-lib2-test: specifiers: '@microsoft/api-extractor': workspace:* - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 fs-extra: ~7.0.1 typescript: ~4.8.4 devDependencies: '@microsoft/api-extractor': link:../../apps/api-extractor - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 fs-extra: 7.0.1 typescript: 4.8.4 @@ -652,7 +652,7 @@ importers: ../../build-tests/api-extractor-lib3-test: specifiers: '@microsoft/api-extractor': workspace:* - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 api-extractor-lib1-test: workspace:* fs-extra: ~7.0.1 @@ -661,7 +661,7 @@ importers: api-extractor-lib1-test: link:../api-extractor-lib1-test devDependencies: '@microsoft/api-extractor': link:../../apps/api-extractor - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 fs-extra: 7.0.1 typescript: 4.8.4 @@ -671,7 +671,7 @@ importers: '@microsoft/api-extractor': workspace:* '@microsoft/teams-js': 1.3.0-beta.4 '@rushstack/node-core-library': workspace:* - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 api-extractor-lib1-test: workspace:* api-extractor-lib2-test: workspace:* @@ -683,7 +683,7 @@ importers: '@microsoft/api-extractor': link:../../apps/api-extractor '@microsoft/teams-js': 1.3.0-beta.4 '@rushstack/node-core-library': link:../../libraries/node-core-library - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 api-extractor-lib1-test: link:../api-extractor-lib1-test api-extractor-lib2-test: link:../api-extractor-lib2-test @@ -696,14 +696,14 @@ importers: specifiers: '@microsoft/api-extractor': workspace:* '@types/heft-jest': 1.0.1 - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/long': 4.0.0 '@types/node': 12.20.24 fs-extra: ~7.0.1 long: ^4.0.0 typescript: ~4.8.4 dependencies: - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/long': 4.0.0 long: 4.0.0 devDependencies: @@ -734,13 +734,13 @@ importers: ../../build-tests/api-extractor-test-03: specifiers: - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 api-extractor-test-02: workspace:* fs-extra: ~7.0.1 typescript: ~4.8.4 devDependencies: - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/node': 12.20.24 api-extractor-test-02: link:../api-extractor-test-02 fs-extra: 7.0.1 @@ -905,8 +905,8 @@ importers: ../../build-tests/heft-jest-reporters-test: specifiers: - '@jest/reporters': ~27.4.2 - '@jest/types': ~27.4.2 + '@jest/reporters': ~29.3.1 + '@jest/types': 29.3.1 '@rushstack/eslint-config': workspace:* '@rushstack/heft': workspace:* '@rushstack/heft-jest-plugin': workspace:* @@ -914,8 +914,8 @@ importers: eslint: ~8.7.0 typescript: ~4.8.4 devDependencies: - '@jest/reporters': 27.4.6 - '@jest/types': 27.4.2 + '@jest/reporters': 29.3.1 + '@jest/types': 29.3.1 '@rushstack/eslint-config': link:../../eslint/eslint-config '@rushstack/heft': link:../../apps/heft '@rushstack/heft-jest-plugin': link:../../heft-plugins/heft-jest-plugin @@ -1093,7 +1093,7 @@ importers: '@rushstack/heft': workspace:* '@rushstack/heft-jest-plugin': workspace:* '@types/heft-jest': 1.0.1 - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/webpack-env': 1.13.0 eslint: ~8.7.0 tslint: ~5.20.1 @@ -1104,7 +1104,7 @@ importers: '@rushstack/heft': link:../../apps/heft '@rushstack/heft-jest-plugin': link:../../heft-plugins/heft-jest-plugin '@types/heft-jest': 1.0.1 - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 '@types/webpack-env': 1.13.0 eslint: 8.7.0 tslint: 5.20.1_typescript@4.8.4 @@ -1526,10 +1526,10 @@ importers: ../../heft-plugins/heft-jest-plugin: specifiers: - '@jest/core': ~27.4.2 - '@jest/reporters': ~27.4.2 - '@jest/transform': ~27.4.2 - '@jest/types': ~27.4.2 + '@jest/core': ~29.3.1 + '@jest/reporters': ~29.3.1 + '@jest/transform': ~29.3.1 + '@jest/types': 29.3.1 '@microsoft/api-extractor': workspace:* '@rushstack/eslint-config': workspace:* '@rushstack/heft': workspace:* @@ -1539,25 +1539,26 @@ importers: '@types/lodash': 4.14.116 '@types/node': 12.20.24 eslint: ~8.7.0 - jest-config: ~27.4.2 - jest-environment-node: ~27.4.2 - jest-resolve: ~27.4.2 - jest-snapshot: ~27.4.2 + jest-config: ~29.3.1 + jest-environment-jsdom: ~29.3.1 + jest-environment-node: ~29.3.1 + jest-resolve: ~29.3.1 + jest-snapshot: ~29.3.1 jest-watch-select-projects: 2.0.0 lodash: ~4.17.15 typescript: ~4.8.4 dependencies: - '@jest/core': 27.4.7 - '@jest/reporters': 27.4.6 - '@jest/transform': 27.4.6 + '@jest/core': 29.3.1 + '@jest/reporters': 29.3.1 + '@jest/transform': 29.3.1 '@rushstack/heft-config-file': link:../../libraries/heft-config-file '@rushstack/node-core-library': link:../../libraries/node-core-library - jest-config: 27.4.7_@types+node@12.20.24 - jest-resolve: 27.4.6 - jest-snapshot: 27.4.6 + jest-config: 29.3.1_@types+node@12.20.24 + jest-resolve: 29.3.1 + jest-snapshot: 29.3.1 lodash: 4.17.21 devDependencies: - '@jest/types': 27.4.2 + '@jest/types': 29.3.1 '@microsoft/api-extractor': link:../../apps/api-extractor '@rushstack/eslint-config': link:../../eslint/eslint-config '@rushstack/heft': link:../../apps/heft @@ -1565,7 +1566,8 @@ importers: '@types/lodash': 4.14.116 '@types/node': 12.20.24 eslint: 8.7.0 - jest-environment-node: 27.4.6 + jest-environment-jsdom: 29.3.1 + jest-environment-node: 29.3.1 jest-watch-select-projects: 2.0.0 typescript: 4.8.4 @@ -2232,13 +2234,15 @@ importers: '@rushstack/heft': workspace:* '@rushstack/heft-jest-plugin': workspace:* eslint: ~8.7.0 - jest-environment-node: ~27.4.2 + jest-environment-jsdom: ~29.3.1 + jest-environment-node: ~29.3.1 typescript: ~4.8.4 dependencies: '@microsoft/api-extractor': link:../../apps/api-extractor '@rushstack/heft-jest-plugin': link:../../heft-plugins/heft-jest-plugin eslint: 8.7.0 - jest-environment-node: 27.4.6 + jest-environment-jsdom: 29.3.1 + jest-environment-node: 29.3.1 typescript: 4.8.4 devDependencies: '@rushstack/heft': link:../../apps/heft @@ -2255,7 +2259,7 @@ importers: css-minimizer-webpack-plugin: ~3.4.1 eslint: ~8.7.0 html-webpack-plugin: ~5.5.0 - jest-environment-jsdom: ~27.4.2 + jest-environment-jsdom: ~29.3.1 mini-css-extract-plugin: ~2.5.3 postcss: ~8.4.6 postcss-loader: ~6.2.1 @@ -2279,7 +2283,7 @@ importers: css-minimizer-webpack-plugin: 3.4.1_webpack@5.68.0 eslint: 8.7.0 html-webpack-plugin: 5.5.0_webpack@5.68.0 - jest-environment-jsdom: 27.4.6 + jest-environment-jsdom: 29.3.1 mini-css-extract-plugin: 2.5.3_webpack@5.68.0 postcss: 8.4.19 postcss-loader: 6.2.1_otbl66ncbxio5b4wlrri4josmi @@ -3465,7 +3469,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 + '@babel/helper-plugin-utils': 7.20.2 '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.12.9 '@babel/plugin-transform-parameters': 7.20.5_@babel+core@7.12.9 dev: true @@ -3671,7 +3675,6 @@ packages: dependencies: '@babel/core': 7.17.12 '@babel/helper-plugin-utils': 7.20.2 - dev: true /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.17.12: resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} @@ -5133,6 +5136,18 @@ packages: jest-message-util: 27.5.1 jest-util: 27.5.1 slash: 3.0.0 + dev: true + + /@jest/console/29.3.1: + resolution: {integrity: sha512-IRE6GD47KwcqA09RIWrabKdHPiKDGgtAL31xDxbi/RjQMsr+lY+ppxmHwY0dUEV3qvvxZzoe5Hl0RXZJOjQNUg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + '@types/node': 12.20.24 + chalk: 4.1.2 + jest-message-util: 29.3.1 + jest-util: 29.3.1 + slash: 3.0.0 /@jest/core/27.4.7: resolution: {integrity: sha512-n181PurSJkVMS+kClIFSX/LLvw9ExSb+4IMtD6YnfxZVerw9ANYtW0bPrm0MJu2pfe9SY9FJ9FtQ+MdZkrZwjg==} @@ -5144,10 +5159,10 @@ packages: optional: true dependencies: '@jest/console': 27.5.1 - '@jest/reporters': 27.4.6 + '@jest/reporters': 27.5.1 '@jest/test-result': 27.5.1_@types+node@12.20.24 - '@jest/transform': 27.4.6 - '@jest/types': 27.4.2 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 '@types/node': 12.20.24 ansi-escapes: 4.3.2 chalk: 4.1.2 @@ -5155,15 +5170,15 @@ packages: exit: 0.1.2 graceful-fs: 4.2.10 jest-changed-files: 27.5.1 - jest-config: 27.4.7_@types+node@12.20.24 + jest-config: 27.5.1_@types+node@12.20.24 jest-haste-map: 27.5.1 jest-message-util: 27.5.1 jest-regex-util: 27.5.1 - jest-resolve: 27.4.6 + jest-resolve: 27.5.1 jest-resolve-dependencies: 27.5.1 jest-runner: 27.5.1 jest-runtime: 27.5.1_@types+node@12.20.24 - jest-snapshot: 27.4.6 + jest-snapshot: 27.5.1 jest-util: 27.5.1 jest-validate: 27.5.1 jest-watcher: 27.5.1 @@ -5177,51 +5192,48 @@ packages: - supports-color - ts-node - utf-8-validate + dev: true - /@jest/core/27.5.1: - resolution: {integrity: sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + /@jest/core/29.3.1: + resolution: {integrity: sha512-0ohVjjRex985w5MmO5L3u5GR1O30DexhBSpuwx2P+9ftyqHdJXnk7IUWiP80oHMvt7ubHCJHxV0a0vlKVuZirw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: node-notifier: optional: true dependencies: - '@jest/console': 27.5.1 - '@jest/reporters': 27.5.1 - '@jest/test-result': 27.5.1_@types+node@12.20.24 - '@jest/transform': 27.5.1 - '@jest/types': 27.5.1 + '@jest/console': 29.3.1 + '@jest/reporters': 29.3.1 + '@jest/test-result': 29.3.1_@types+node@12.20.24 + '@jest/transform': 29.3.1 + '@jest/types': 29.3.1 '@types/node': 12.20.24 ansi-escapes: 4.3.2 chalk: 4.1.2 - emittery: 0.8.1 + ci-info: 3.7.0 exit: 0.1.2 graceful-fs: 4.2.10 - jest-changed-files: 27.5.1 - jest-config: 27.5.1_@types+node@12.20.24 - jest-haste-map: 27.5.1 - jest-message-util: 27.5.1 - jest-regex-util: 27.5.1 - jest-resolve: 27.5.1 - jest-resolve-dependencies: 27.5.1 - jest-runner: 27.5.1 - jest-runtime: 27.5.1_@types+node@12.20.24 - jest-snapshot: 27.5.1 - jest-util: 27.5.1 - jest-validate: 27.5.1 - jest-watcher: 27.5.1 + jest-changed-files: 29.2.0 + jest-config: 29.3.1_@types+node@12.20.24 + jest-haste-map: 29.3.1 + jest-message-util: 29.3.1 + jest-regex-util: 29.2.0 + jest-resolve: 29.3.1 + jest-resolve-dependencies: 29.3.1 + jest-runner: 29.3.1 + jest-runtime: 29.3.1 + jest-snapshot: 29.3.1 + jest-util: 29.3.1 + jest-validate: 29.3.1 + jest-watcher: 29.3.1 micromatch: 4.0.5 - rimraf: 3.0.2 + pretty-format: 29.3.1 slash: 3.0.0 strip-ansi: 6.0.1 transitivePeerDependencies: - - bufferutil - - canvas - supports-color - ts-node - - utf-8-validate - dev: true /@jest/environment/27.5.1: resolution: {integrity: sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==} @@ -5231,6 +5243,31 @@ packages: '@jest/types': 27.5.1 '@types/node': 12.20.24 jest-mock: 27.5.1 + dev: true + + /@jest/environment/29.3.1: + resolution: {integrity: sha512-pMmvfOPmoa1c1QpfFW0nXYtNLpofqo4BrCIk6f2kW4JFeNlHV2t3vd+3iDLf31e2ot2Mec0uqZfmI+U0K2CFag==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/fake-timers': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 12.20.24 + jest-mock: 29.3.1 + + /@jest/expect-utils/29.3.1: + resolution: {integrity: sha512-wlrznINZI5sMjwvUoLVk617ll/UYfGIZNxmbU+Pa7wmkL4vYzhV9R2pwVqUh4NWWuLQWkI8+8mOkxs//prKQ3g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + jest-get-type: 29.2.0 + + /@jest/expect/29.3.1: + resolution: {integrity: sha512-QivM7GlSHSsIAWzgfyP8dgeExPRZ9BIe2LsdPyEhCGkZkoyA+kGsoIzbKAfZCvvRzfZioKwPtCZIt5SaoxYCvg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + expect: 29.3.1 + jest-snapshot: 29.3.1 + transitivePeerDependencies: + - supports-color /@jest/fake-timers/27.5.1: resolution: {integrity: sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==} @@ -5242,6 +5279,18 @@ packages: jest-message-util: 27.5.1 jest-mock: 27.5.1 jest-util: 27.5.1 + dev: true + + /@jest/fake-timers/29.3.1: + resolution: {integrity: sha512-iHTL/XpnDlFki9Tq0Q1GGuVeQ8BHZGIYsvCO5eN/O/oJaRzofG9Xndd9HuSDBI/0ZS79pg0iwn07OMTQ7ngF2A==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + '@sinonjs/fake-timers': 9.1.2 + '@types/node': 12.20.24 + jest-message-util: 29.3.1 + jest-mock: 29.3.1 + jest-util: 29.3.1 /@jest/globals/27.5.1: resolution: {integrity: sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==} @@ -5250,6 +5299,18 @@ packages: '@jest/environment': 27.5.1 '@jest/types': 27.5.1 expect: 27.5.1 + dev: true + + /@jest/globals/29.3.1: + resolution: {integrity: sha512-cTicd134vOcwO59OPaB6AmdHQMCtWOe+/DitpTZVxWgMJ+YvXL1HNAmPyiGbSHmF/mXVBkvlm8YYtQhyHPnV6Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/environment': 29.3.1 + '@jest/expect': 29.3.1 + '@jest/types': 29.3.1 + jest-mock: 29.3.1 + transitivePeerDependencies: + - supports-color /@jest/reporters/27.4.6: resolution: {integrity: sha512-+Zo9gV81R14+PSq4wzee4GC2mhAN9i9a7qgJWL90Gpx7fHYkWpTBvwWNZUXvJByYR9tAVBdc8VxDWqfJyIUrIQ==} @@ -5263,8 +5324,8 @@ packages: '@bcoe/v8-coverage': 0.2.3 '@jest/console': 27.5.1 '@jest/test-result': 27.5.1_@types+node@12.20.24 - '@jest/transform': 27.4.6 - '@jest/types': 27.4.2 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 '@types/istanbul-lib-coverage': 2.0.4 '@types/node': 12.20.24 chalk: 4.1.2 @@ -5278,7 +5339,7 @@ packages: istanbul-lib-source-maps: 4.0.1 istanbul-reports: 3.1.5 jest-haste-map: 27.5.1 - jest-resolve: 27.4.6 + jest-resolve: 27.5.1 jest-util: 27.5.1 jest-worker: 27.5.1 slash: 3.0.0 @@ -5288,6 +5349,7 @@ packages: v8-to-istanbul: 8.1.1 transitivePeerDependencies: - supports-color + dev: true /@jest/reporters/27.5.1: resolution: {integrity: sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==} @@ -5328,6 +5390,49 @@ packages: - supports-color dev: true + /@jest/reporters/29.3.1: + resolution: {integrity: sha512-GhBu3YFuDrcAYW/UESz1JphEAbvUjaY2vShRZRoRY1mxpCMB3yGSJ4j9n0GxVlEOdCf7qjvUfBCrTUUqhVfbRA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@bcoe/v8-coverage': 0.2.3 + '@jest/console': 29.3.1 + '@jest/test-result': 29.3.1_@types+node@12.20.24 + '@jest/transform': 29.3.1 + '@jest/types': 29.3.1 + '@jridgewell/trace-mapping': 0.3.17 + '@types/istanbul-lib-coverage': 2.0.4 + '@types/node': 12.20.24 + chalk: 4.1.2 + collect-v8-coverage: 1.0.1_@types+node@12.20.24 + exit: 0.1.2 + glob: 7.2.3 + graceful-fs: 4.2.10 + istanbul-lib-coverage: 3.2.0 + istanbul-lib-instrument: 5.2.1 + istanbul-lib-report: 3.0.0 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.5 + jest-message-util: 29.3.1 + jest-util: 29.3.1 + jest-worker: 29.3.1 + slash: 3.0.0 + string-length: 4.0.2 + strip-ansi: 6.0.1 + v8-to-istanbul: 9.0.1 + transitivePeerDependencies: + - supports-color + + /@jest/schemas/29.0.0: + resolution: {integrity: sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@sinclair/typebox': 0.24.51 + /@jest/source-map/27.5.1: resolution: {integrity: sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} @@ -5335,6 +5440,15 @@ packages: callsites: 3.1.0 graceful-fs: 4.2.10 source-map: 0.6.1 + dev: true + + /@jest/source-map/29.2.0: + resolution: {integrity: sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jridgewell/trace-mapping': 0.3.17 + callsites: 3.1.0 + graceful-fs: 4.2.10 /@jest/test-result/27.5.1_@types+node@12.20.24: resolution: {integrity: sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==} @@ -5348,6 +5462,20 @@ packages: jest-resolve: 27.5.1 transitivePeerDependencies: - '@types/node' + dev: true + + /@jest/test-result/29.3.1_@types+node@12.20.24: + resolution: {integrity: sha512-qeLa6qc0ddB0kuOZyZIhfN5q0e2htngokyTWsGriedsDhItisW7SDYZ7ceOe57Ii03sL988/03wAcBh3TChMGw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/console': 29.3.1 + '@jest/types': 29.3.1 + '@types/istanbul-lib-coverage': 2.0.4 + collect-v8-coverage: 1.0.1_@types+node@12.20.24 + jest-haste-map: 29.3.1 + jest-resolve: 29.3.1 + transitivePeerDependencies: + - '@types/node' /@jest/test-sequencer/27.5.1_@types+node@12.20.24: resolution: {integrity: sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==} @@ -5360,6 +5488,18 @@ packages: transitivePeerDependencies: - '@types/node' - supports-color + dev: true + + /@jest/test-sequencer/29.3.1_@types+node@12.20.24: + resolution: {integrity: sha512-IqYvLbieTv20ArgKoAMyhLHNrVHJfzO6ARZAbQRlY4UGWfdDnLlZEF0BvKOMd77uIiIjSZRwq3Jb3Fa3I8+2UA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/test-result': 29.3.1_@types+node@12.20.24 + graceful-fs: 4.2.10 + jest-haste-map: 29.3.1 + slash: 3.0.0 + transitivePeerDependencies: + - '@types/node' /@jest/transform/26.6.2: resolution: {integrity: sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==} @@ -5389,7 +5529,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@babel/core': 7.17.12 - '@jest/types': 27.4.2 + '@jest/types': 27.5.1 babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 convert-source-map: 1.9.0 @@ -5405,6 +5545,7 @@ packages: write-file-atomic: 3.0.3 transitivePeerDependencies: - supports-color + dev: true /@jest/transform/27.5.1: resolution: {integrity: sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==} @@ -5427,6 +5568,29 @@ packages: write-file-atomic: 3.0.3 transitivePeerDependencies: - supports-color + dev: true + + /@jest/transform/29.3.1: + resolution: {integrity: sha512-8wmCFBTVGYqFNLWfcOWoVuMuKYPUBTnTMDkdvFtAYELwDOl9RGwOsvQWGPFxDJ8AWY9xM/8xCXdqmPK3+Q5Lug==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@babel/core': 7.17.12 + '@jest/types': 29.3.1 + '@jridgewell/trace-mapping': 0.3.17 + babel-plugin-istanbul: 6.1.1 + chalk: 4.1.2 + convert-source-map: 2.0.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.10 + jest-haste-map: 29.3.1 + jest-regex-util: 29.2.0 + jest-util: 29.3.1 + micromatch: 4.0.5 + pirates: 4.0.5 + slash: 3.0.0 + write-file-atomic: 4.0.2 + transitivePeerDependencies: + - supports-color /@jest/types/26.6.2: resolution: {integrity: sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==} @@ -5439,8 +5603,8 @@ packages: chalk: 4.1.2 dev: true - /@jest/types/27.4.2: - resolution: {integrity: sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==} + /@jest/types/27.5.1: + resolution: {integrity: sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@types/istanbul-lib-coverage': 2.0.4 @@ -5448,15 +5612,17 @@ packages: '@types/node': 12.20.24 '@types/yargs': 16.0.4 chalk: 4.1.2 + dev: true - /@jest/types/27.5.1: - resolution: {integrity: sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + /@jest/types/29.3.1: + resolution: {integrity: sha512-d0S0jmmTpjnhCmNpApgX3jrUZgZ22ivKJRvL2lli5hpCRoNnp1f85r2/wpKfXuYu8E7Jjh1hGfhPyup1NM5AmA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: + '@jest/schemas': 29.0.0 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 '@types/node': 12.20.24 - '@types/yargs': 16.0.4 + '@types/yargs': 17.0.19 chalk: 4.1.2 /@jridgewell/gen-mapping/0.1.1: @@ -6100,6 +6266,9 @@ packages: - supports-color dev: true + /@sinclair/typebox/0.24.51: + resolution: {integrity: sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==} + /@sindresorhus/is/0.14.0: resolution: {integrity: sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==} engines: {node: '>=6'} @@ -6113,6 +6282,12 @@ packages: resolution: {integrity: sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==} dependencies: '@sinonjs/commons': 1.8.6 + dev: true + + /@sinonjs/fake-timers/9.1.2: + resolution: {integrity: sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==} + dependencies: + '@sinonjs/commons': 1.8.6 /@storybook/addon-actions/6.4.22_e4p5kqppx5gth2ijr2xdvk24ma: resolution: {integrity: sha512-t2w3iLXFul+R/1ekYxIEzUOZZmvEa7EzUAVAuCHP4i6x0jBnTTZ7sAIUVRaxVREPguH5IqI/2OklYhKanty2Yw==} @@ -6698,7 +6873,7 @@ packages: util-deprecate: 1.0.2 dev: true - /@storybook/cli/6.4.22_qrag5zyjgmrwa7rjqjc5fiwide: + /@storybook/cli/6.4.22_ucjucjjwhnbpf3qpr4bgjq3ada: resolution: {integrity: sha512-Paj5JtiYG6HjYYEiLm0SGg6GJ+ebJSvfbbYx5W+MNiojyMwrzkof+G2VEGk5AbE2JSkXvDQJ/9B8/SuS94yqvA==} hasBin: true peerDependencies: @@ -6722,7 +6897,7 @@ packages: fs-extra: 9.1.0 get-port: 5.1.1 globby: 11.1.0 - jest: 27.4.7_@types+node@12.20.24 + jest: 29.3.1_@types+node@12.20.24 jscodeshift: 0.13.1_@babel+preset-env@7.20.2 json5: 2.2.1 leven: 3.1.0 @@ -7435,11 +7610,11 @@ packages: /@tootallnate/once/1.1.2: resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} engines: {node: '>= 6'} + dev: true /@tootallnate/once/2.0.0: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} - dev: false /@trpc/server/9.27.4: resolution: {integrity: sha512-yw0omUrxGp8+gEAuieZFeXB4bCqFvmyCDL3GOBv+Q6+cK0m5824ViHZKPgK5DYG1ijN/lbi1hP3UVKywPN7rbQ==} @@ -7608,7 +7783,7 @@ packages: /@types/heft-jest/1.0.1: resolution: {integrity: sha512-cF2iEUpvGh2WgLowHVAdjI05xuDo+GwCA8hGV3Q5PBl8apjd6BTcpPFQ2uPlfUM7BLpgur2xpYo8VeBXopMI4A==} dependencies: - '@types/jest': 27.4.0 + '@types/jest': 29.2.5 dev: true /@types/hoist-non-react-statics/3.3.1: @@ -7653,11 +7828,11 @@ packages: dependencies: '@types/istanbul-lib-report': 3.0.0 - /@types/jest/27.4.0: - resolution: {integrity: sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ==} + /@types/jest/29.2.5: + resolution: {integrity: sha512-H2cSxkKgVmqNHXP7TC2L/WUorrZu8ZigyRywfVzv6EyBlxj39n4C00hjXYQWsbwqgElaj/CiAeSRmk5GoaKTgw==} dependencies: - jest-diff: 27.5.1 - pretty-format: 27.5.1 + expect: 29.3.1 + pretty-format: 29.3.1 /@types/jju/1.4.1: resolution: {integrity: sha512-LFt+YA7Lv2IZROMwokZKiPNORAV5N3huMs3IKnzlE430HWhWYZ8b+78HiwJXJJP1V2IEjinyJURuRJfGoaFSIA==} @@ -7667,6 +7842,13 @@ packages: resolution: {integrity: sha512-SGGAhXLHDx+PK4YLNcNGa6goPf9XRWQNAUUbffkwVGGXIxmDKWyGGL4inzq2sPmExu431Ekb9aEMn9BkPqEYFA==} dev: true + /@types/jsdom/20.0.1: + resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} + dependencies: + '@types/node': 12.20.24 + '@types/tough-cookie': 4.0.2 + parse5: 7.1.2 + /@types/json-schema/7.0.11: resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} @@ -7872,6 +8054,9 @@ packages: '@types/node': 12.20.24 dev: true + /@types/tough-cookie/4.0.2: + resolution: {integrity: sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==} + /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: @@ -7948,6 +8133,12 @@ packages: resolution: {integrity: sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==} dependencies: '@types/yargs-parser': 21.0.0 + dev: true + + /@types/yargs/17.0.19: + resolution: {integrity: sha512-cAx3qamwaYX9R0fzOIZAlFpo4A+1uBVCxqpKz9D26uTF4srRXaGTTsikQmaotCtNdbhzyUH7ft6p9ktz9s6UNQ==} + dependencies: + '@types/yargs-parser': 21.0.0 /@typescript-eslint/eslint-plugin/5.38.1_dgdlt47nc666rkw3n5usybcqsa: resolution: {integrity: sha512-ky7EFzPhqz3XlhS7vPOoMDaQnQMn+9o5ICR9CPr/6bw8HrFkzhMSxuA3gRfiJVvs7geYrSeawGJjZoZQKCOglQ==} @@ -8191,7 +8382,7 @@ packages: /@vue/compiler-core/3.2.45: resolution: {integrity: sha512-rcMj7H+PYe5wBV3iYeUgbCglC+pbpN8hBLTJvRiK2eKQiWqu+fG9F+8sW99JdL4LQi7Re178UOxn09puSXvn4A==} dependencies: - '@babel/parser': 7.16.4 + '@babel/parser': 7.20.5 '@vue/shared': 3.2.45 estree-walker: 2.0.2 source-map: 0.6.1 @@ -8207,7 +8398,7 @@ packages: /@vue/compiler-sfc/3.2.45: resolution: {integrity: sha512-1jXDuWah1ggsnSAOGsec8cFjT/K6TMZ0sPL3o3d84Ft2AYZi2jWJgRMjw4iaK0rBfA89L5gw427H4n1RZQBu6Q==} dependencies: - '@babel/parser': 7.16.4 + '@babel/parser': 7.20.5 '@vue/compiler-core': 3.2.45 '@vue/compiler-dom': 3.2.45 '@vue/compiler-ssr': 3.2.45 @@ -8229,7 +8420,7 @@ packages: /@vue/reactivity-transform/3.2.45: resolution: {integrity: sha512-BHVmzYAvM7vcU5WmuYqXpwaBHjsS8T63jlKGWVtHxAHIoMIlmaMyurUSEs1Zcg46M4AYT5MtB1U274/2aNzjJQ==} dependencies: - '@babel/parser': 7.16.4 + '@babel/parser': 7.20.5 '@vue/compiler-core': 3.2.45 '@vue/shared': 3.2.45 estree-walker: 2.0.2 @@ -8481,6 +8672,13 @@ packages: dependencies: acorn: 7.4.1 acorn-walk: 7.2.0 + dev: true + + /acorn-globals/7.0.1: + resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} + dependencies: + acorn: 8.8.1 + acorn-walk: 8.2.0 /acorn-import-assertions/1.8.0_acorn@8.8.1: resolution: {integrity: sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==} @@ -8507,6 +8705,7 @@ packages: /acorn-walk/7.2.0: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} engines: {node: '>=0.4.0'} + dev: true /acorn-walk/8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} @@ -8521,6 +8720,7 @@ packages: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} engines: {node: '>=0.4.0'} hasBin: true + dev: true /acorn/8.8.1: resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==} @@ -9135,6 +9335,24 @@ packages: slash: 3.0.0 transitivePeerDependencies: - supports-color + dev: true + + /babel-jest/29.3.1_@babel+core@7.17.12: + resolution: {integrity: sha512-aard+xnMoxgjwV70t0L6wkW/3HQQtV+O0PEimxKgzNqCJnbYmroPojdP2tqKSOAt8QAKV/uSZU8851M7B5+fcA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.8.0 + dependencies: + '@babel/core': 7.17.12 + '@jest/transform': 29.3.1 + '@types/babel__core': 7.1.20 + babel-plugin-istanbul: 6.1.1 + babel-preset-jest: 29.2.0_@babel+core@7.17.12 + chalk: 4.1.2 + graceful-fs: 4.2.10 + slash: 3.0.0 + transitivePeerDependencies: + - supports-color /babel-loader/8.2.5_4bf35c6ryl6gwyrcrj2ykng7ny: resolution: {integrity: sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ==} @@ -9206,6 +9424,16 @@ packages: '@babel/types': 7.20.5 '@types/babel__core': 7.1.20 '@types/babel__traverse': 7.18.3 + dev: true + + /babel-plugin-jest-hoist/29.2.0: + resolution: {integrity: sha512-TnspP2WNiR3GLfCsUNHqeXw0RoQ2f9U5hQ5L3XFpwuO8htQmSrhh8qsB6vi5Yi8+kuynN1yjDjQsPfkebmB6ZA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@babel/template': 7.18.10 + '@babel/types': 7.20.5 + '@types/babel__core': 7.1.20 + '@types/babel__traverse': 7.18.3 /babel-plugin-macros/2.8.0: resolution: {integrity: sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==} @@ -9322,6 +9550,17 @@ packages: '@babel/core': 7.17.12 babel-plugin-jest-hoist: 27.5.1 babel-preset-current-node-syntax: 1.0.1_@babel+core@7.17.12 + dev: true + + /babel-preset-jest/29.2.0_@babel+core@7.17.12: + resolution: {integrity: sha512-z9JmMJppMxNv8N7fNRHvhMg9cvIkMxQBXgFkane3yKVEvEOP+kB50lk8DFRvF9PGqbyXxlmebKWhuDORO8RgdA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.17.12 + babel-plugin-jest-hoist: 29.2.0 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.17.12 /bail/1.0.5: resolution: {integrity: sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==} @@ -9519,6 +9758,7 @@ packages: /browser-process-hrtime/1.0.0: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} + dev: true /browserify-aes/1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} @@ -10078,6 +10318,15 @@ packages: strip-ansi: 6.0.1 wrap-ansi: 7.0.0 + /cliui/8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + dev: true + /clone-deep/4.0.1: resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} engines: {node: '>=6'} @@ -10319,6 +10568,9 @@ packages: /convert-source-map/1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} + /convert-source-map/2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + /cookie-signature/1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} @@ -10708,6 +10960,10 @@ packages: /cssom/0.4.4: resolution: {integrity: sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==} + dev: true + + /cssom/0.5.0: + resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} /cssstyle/2.3.0: resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==} @@ -10744,6 +11000,15 @@ packages: abab: 2.0.6 whatwg-mimetype: 2.3.0 whatwg-url: 8.7.0 + dev: true + + /data-urls/3.0.2: + resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} + engines: {node: '>=12'} + dependencies: + abab: 2.0.6 + whatwg-mimetype: 3.0.0 + whatwg-url: 11.0.0 /dataloader/2.1.0: resolution: {integrity: sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==} @@ -11013,6 +11278,11 @@ packages: /diff-sequences/27.5.1: resolution: {integrity: sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dev: true + + /diff-sequences/29.3.1: + resolution: {integrity: sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} /diff/4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} @@ -11098,6 +11368,13 @@ packages: engines: {node: '>=8'} dependencies: webidl-conversions: 5.0.0 + dev: true + + /domexception/4.0.0: + resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} + engines: {node: '>=12'} + dependencies: + webidl-conversions: 7.0.0 /domhandler/4.3.1: resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==} @@ -11212,9 +11489,14 @@ packages: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + /emittery/0.13.1: + resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} + engines: {node: '>=12'} + /emittery/0.8.1: resolution: {integrity: sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==} engines: {node: '>=10'} + dev: true /emoji-regex/7.0.3: resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} @@ -11296,6 +11578,10 @@ packages: /entities/2.2.0: resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} + /entities/4.4.0: + resolution: {integrity: sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==} + engines: {node: '>=0.12'} + /env-paths/2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -12168,6 +12454,17 @@ packages: jest-get-type: 27.5.1 jest-matcher-utils: 27.5.1 jest-message-util: 27.5.1 + dev: true + + /expect/29.3.1: + resolution: {integrity: sha512-gGb1yTgU30Q0O/tQq+z30KBWv24ApkMgFUpvKBkyLUBL68Wv8dHdJxTBZFl/iT8K/bqDHvUYRH6IIN3rToopPA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/expect-utils': 29.3.1 + jest-get-type: 29.2.0 + jest-matcher-utils: 29.3.1 + jest-message-util: 29.3.1 + jest-util: 29.3.1 /express/4.18.1: resolution: {integrity: sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==} @@ -12643,7 +12940,6 @@ packages: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 - dev: false /format/0.2.2: resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} @@ -13347,6 +13643,13 @@ packages: engines: {node: '>=10'} dependencies: whatwg-encoding: 1.0.5 + dev: true + + /html-encoding-sniffer/3.0.0: + resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} + engines: {node: '>=12'} + dependencies: + whatwg-encoding: 2.0.0 /html-entities/2.3.3: resolution: {integrity: sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==} @@ -13482,6 +13785,7 @@ packages: debug: 4.3.4 transitivePeerDependencies: - supports-color + dev: true /http-proxy-agent/5.0.0: resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} @@ -13492,7 +13796,6 @@ packages: debug: 4.3.4 transitivePeerDependencies: - supports-color - dev: false /http-proxy-middleware/2.0.6: resolution: {integrity: sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==} @@ -14233,6 +14536,14 @@ packages: '@jest/types': 27.5.1 execa: 5.1.1 throat: 6.0.1 + dev: true + + /jest-changed-files/29.2.0: + resolution: {integrity: sha512-qPVmLLyBmvF5HJrY7krDisx6Voi8DmlV3GZYX0aFNbaQsZeoz1hfxcCMbqDGuQCxU1dJy9eYc2xscE8QrCCYaA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + execa: 5.1.1 + p-limit: 3.1.0 /jest-circus/27.5.1: resolution: {integrity: sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==} @@ -14259,36 +14570,60 @@ packages: throat: 6.0.1 transitivePeerDependencies: - supports-color + dev: true - /jest-cli/27.5.1_@types+node@12.20.24: - resolution: {integrity: sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} - hasBin: true - peerDependencies: + /jest-circus/29.3.1: + resolution: {integrity: sha512-wpr26sEvwb3qQQbdlmei+gzp6yoSSoSL6GsLPxnuayZSMrSd5Ka7IjAvatpIernBvT2+Ic6RLTg+jSebScmasg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/environment': 29.3.1 + '@jest/expect': 29.3.1 + '@jest/test-result': 29.3.1_@types+node@12.20.24 + '@jest/types': 29.3.1 + '@types/node': 12.20.24 + chalk: 4.1.2 + co: 4.6.0 + dedent: 0.7.0 + is-generator-fn: 2.1.0 + jest-each: 29.3.1 + jest-matcher-utils: 29.3.1 + jest-message-util: 29.3.1 + jest-runtime: 29.3.1 + jest-snapshot: 29.3.1 + jest-util: 29.3.1 + p-limit: 3.1.0 + pretty-format: 29.3.1 + slash: 3.0.0 + stack-utils: 2.0.6 + transitivePeerDependencies: + - supports-color + + /jest-cli/29.3.1_@types+node@12.20.24: + resolution: {integrity: sha512-TO/ewvwyvPOiBBuWZ0gm04z3WWP8TIK8acgPzE4IxgsLKQgb377NYGrQLc3Wl/7ndWzIH2CDNNsUjGxwLL43VQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: node-notifier: optional: true dependencies: - '@jest/core': 27.5.1 - '@jest/test-result': 27.5.1_@types+node@12.20.24 - '@jest/types': 27.5.1 + '@jest/core': 29.3.1 + '@jest/test-result': 29.3.1_@types+node@12.20.24 + '@jest/types': 29.3.1 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.10 import-local: 3.1.0 - jest-config: 27.5.1_@types+node@12.20.24 - jest-util: 27.5.1 - jest-validate: 27.5.1 + jest-config: 29.3.1_@types+node@12.20.24 + jest-util: 29.3.1 + jest-validate: 29.3.1 prompts: 2.4.2 - yargs: 16.2.0 + yargs: 17.6.2 transitivePeerDependencies: - '@types/node' - - bufferutil - - canvas - supports-color - ts-node - - utf-8-validate dev: true /jest-config/27.4.7_@types+node@12.20.24: @@ -14302,7 +14637,7 @@ packages: dependencies: '@babel/core': 7.17.12 '@jest/test-sequencer': 27.5.1_@types+node@12.20.24 - '@jest/types': 27.4.2 + '@jest/types': 27.5.1 babel-jest: 27.5.1_@babel+core@7.17.12 chalk: 4.1.2 ci-info: 3.7.0 @@ -14311,11 +14646,11 @@ packages: graceful-fs: 4.2.10 jest-circus: 27.5.1 jest-environment-jsdom: 27.5.1 - jest-environment-node: 27.4.6 + jest-environment-node: 27.5.1 jest-get-type: 27.5.1 jest-jasmine2: 27.5.1 jest-regex-util: 27.5.1 - jest-resolve: 27.4.6 + jest-resolve: 27.5.1 jest-runner: 27.5.1 jest-util: 27.5.1 jest-validate: 27.5.1 @@ -14328,6 +14663,7 @@ packages: - canvas - supports-color - utf-8-validate + dev: true /jest-config/27.5.1_@types+node@12.20.24: resolution: {integrity: sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==} @@ -14370,6 +14706,44 @@ packages: - utf-8-validate dev: true + /jest-config/29.3.1_@types+node@12.20.24: + resolution: {integrity: sha512-y0tFHdj2WnTEhxmGUK1T7fgLen7YK4RtfvpLFBXfQkh2eMJAQq24Vx9472lvn5wg0MAO6B+iPfJfzdR9hJYalg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + dependencies: + '@babel/core': 7.17.12 + '@jest/test-sequencer': 29.3.1_@types+node@12.20.24 + '@jest/types': 29.3.1 + '@types/node': 12.20.24 + babel-jest: 29.3.1_@babel+core@7.17.12 + chalk: 4.1.2 + ci-info: 3.7.0 + deepmerge: 4.2.2 + glob: 7.2.3 + graceful-fs: 4.2.10 + jest-circus: 29.3.1 + jest-environment-node: 29.3.1 + jest-get-type: 29.2.0 + jest-regex-util: 29.2.0 + jest-resolve: 29.3.1 + jest-runner: 29.3.1 + jest-util: 29.3.1 + jest-validate: 29.3.1 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.3.1 + slash: 3.0.0 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + /jest-diff/27.5.1: resolution: {integrity: sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} @@ -14378,12 +14752,29 @@ packages: diff-sequences: 27.5.1 jest-get-type: 27.5.1 pretty-format: 27.5.1 + dev: true + + /jest-diff/29.3.1: + resolution: {integrity: sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + chalk: 4.1.2 + diff-sequences: 29.3.1 + jest-get-type: 29.2.0 + pretty-format: 29.3.1 /jest-docblock/27.5.1: resolution: {integrity: sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: detect-newline: 3.1.0 + dev: true + + /jest-docblock/29.2.0: + resolution: {integrity: sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + detect-newline: 3.1.0 /jest-each/27.5.1: resolution: {integrity: sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==} @@ -14394,14 +14785,25 @@ packages: jest-get-type: 27.5.1 jest-util: 27.5.1 pretty-format: 27.5.1 + dev: true + + /jest-each/29.3.1: + resolution: {integrity: sha512-qrZH7PmFB9rEzCSl00BWjZYuS1BSOH8lLuC0azQE9lQrAx3PWGKHTDudQiOSwIy5dGAJh7KA0ScYlCP7JxvFYA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + chalk: 4.1.2 + jest-get-type: 29.2.0 + jest-util: 29.3.1 + pretty-format: 29.3.1 - /jest-environment-jsdom/27.4.6: - resolution: {integrity: sha512-o3dx5p/kHPbUlRvSNjypEcEtgs6LmvESMzgRFQE6c+Prwl2JLA4RZ7qAnxc5VM8kutsGRTB15jXeeSbJsKN9iA==} + /jest-environment-jsdom/27.5.1: + resolution: {integrity: sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 - '@jest/types': 27.4.2 + '@jest/types': 27.5.1 '@types/node': 12.20.24 jest-mock: 27.5.1 jest-util: 27.5.1 @@ -14411,22 +14813,27 @@ packages: - canvas - supports-color - utf-8-validate - dev: false + dev: true - /jest-environment-jsdom/27.5.1: - resolution: {integrity: sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + /jest-environment-jsdom/29.3.1: + resolution: {integrity: sha512-G46nKgiez2Gy4zvYNhayfMEAFlVHhWfncqvqS6yCd0i+a4NsSUD2WtrKSaYQrYiLQaupHXxCRi8xxVL2M9PbhA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + canvas: ^2.5.0 + peerDependenciesMeta: + canvas: + optional: true dependencies: - '@jest/environment': 27.5.1 - '@jest/fake-timers': 27.5.1 - '@jest/types': 27.5.1 + '@jest/environment': 29.3.1 + '@jest/fake-timers': 29.3.1 + '@jest/types': 29.3.1 + '@types/jsdom': 20.0.1 '@types/node': 12.20.24 - jest-mock: 27.5.1 - jest-util: 27.5.1 - jsdom: 16.7.0 + jest-mock: 29.3.1 + jest-util: 29.3.1 + jsdom: 20.0.3 transitivePeerDependencies: - bufferutil - - canvas - supports-color - utf-8-validate @@ -14436,10 +14843,11 @@ packages: dependencies: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 - '@jest/types': 27.4.2 + '@jest/types': 27.5.1 '@types/node': 12.20.24 jest-mock: 27.5.1 jest-util: 27.5.1 + dev: true /jest-environment-node/27.5.1: resolution: {integrity: sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==} @@ -14451,10 +14859,27 @@ packages: '@types/node': 12.20.24 jest-mock: 27.5.1 jest-util: 27.5.1 + dev: true + + /jest-environment-node/29.3.1: + resolution: {integrity: sha512-xm2THL18Xf5sIHoU7OThBPtuH6Lerd+Y1NLYiZJlkE3hbE+7N7r8uvHIl/FkZ5ymKXJe/11SQuf3fv4v6rUMag==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/environment': 29.3.1 + '@jest/fake-timers': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 12.20.24 + jest-mock: 29.3.1 + jest-util: 29.3.1 /jest-get-type/27.5.1: resolution: {integrity: sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dev: true + + /jest-get-type/29.2.0: + resolution: {integrity: sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} /jest-haste-map/26.6.2: resolution: {integrity: sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==} @@ -14495,6 +14920,25 @@ packages: walker: 1.0.8 optionalDependencies: fsevents: 2.3.2 + dev: true + + /jest-haste-map/29.3.1: + resolution: {integrity: sha512-/FFtvoG1xjbbPXQLFef+WSU4yrc0fc0Dds6aRPBojUid7qlPqZvxdUBA03HW0fnVHXVCnCdkuoghYItKNzc/0A==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + '@types/graceful-fs': 4.1.5 + '@types/node': 12.20.24 + anymatch: 3.1.3 + fb-watchman: 2.0.2 + graceful-fs: 4.2.10 + jest-regex-util: 29.2.0 + jest-util: 29.3.1 + jest-worker: 29.3.1 + micromatch: 4.0.5 + walker: 1.0.8 + optionalDependencies: + fsevents: 2.3.2 /jest-jasmine2/27.5.1: resolution: {integrity: sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==} @@ -14519,6 +14963,7 @@ packages: throat: 6.0.1 transitivePeerDependencies: - supports-color + dev: true /jest-leak-detector/27.5.1: resolution: {integrity: sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==} @@ -14526,6 +14971,14 @@ packages: dependencies: jest-get-type: 27.5.1 pretty-format: 27.5.1 + dev: true + + /jest-leak-detector/29.3.1: + resolution: {integrity: sha512-3DA/VVXj4zFOPagGkuqHnSQf1GZBmmlagpguxEERO6Pla2g84Q1MaVIB3YMxgUaFIaYag8ZnTyQgiZ35YEqAQA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + jest-get-type: 29.2.0 + pretty-format: 29.3.1 /jest-matcher-utils/27.5.1: resolution: {integrity: sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==} @@ -14535,6 +14988,16 @@ packages: jest-diff: 27.5.1 jest-get-type: 27.5.1 pretty-format: 27.5.1 + dev: true + + /jest-matcher-utils/29.3.1: + resolution: {integrity: sha512-fkRMZUAScup3txIKfMe3AIZZmPEjWEdsPJFK3AIy5qRohWqQFg1qrmKfYXR9qEkNc7OdAu2N4KPHibEmy4HPeQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + chalk: 4.1.2 + jest-diff: 29.3.1 + jest-get-type: 29.2.0 + pretty-format: 29.3.1 /jest-message-util/27.5.1: resolution: {integrity: sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==} @@ -14549,6 +15012,21 @@ packages: pretty-format: 27.5.1 slash: 3.0.0 stack-utils: 2.0.6 + dev: true + + /jest-message-util/29.3.1: + resolution: {integrity: sha512-lMJTbgNcDm5z+6KDxWtqOFWlGQxD6XaYwBqHR8kmpkP+WWWG90I35kdtQHY67Ay5CSuydkTBbJG+tH9JShFCyA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@babel/code-frame': 7.18.6 + '@jest/types': 29.3.1 + '@types/stack-utils': 2.0.1 + chalk: 4.1.2 + graceful-fs: 4.2.10 + micromatch: 4.0.5 + pretty-format: 29.3.1 + slash: 3.0.0 + stack-utils: 2.0.6 /jest-mock/27.5.1: resolution: {integrity: sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==} @@ -14556,6 +15034,15 @@ packages: dependencies: '@jest/types': 27.5.1 '@types/node': 12.20.24 + dev: true + + /jest-mock/29.3.1: + resolution: {integrity: sha512-H8/qFDtDVMFvFP4X8NuOT3XRDzOUTz+FeACjufHzsOIBAxivLqkB1PoLCaJx9iPPQ8dZThHPp/G3WRWyMgA3JA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + '@types/node': 12.20.24 + jest-util: 29.3.1 /jest-pnp-resolver/1.2.3_jest-resolve@27.4.6: resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} @@ -14567,6 +15054,7 @@ packages: optional: true dependencies: jest-resolve: 27.4.6 + dev: true /jest-pnp-resolver/1.2.3_jest-resolve@27.5.1: resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} @@ -14578,6 +15066,18 @@ packages: optional: true dependencies: jest-resolve: 27.5.1 + dev: true + + /jest-pnp-resolver/1.2.3_jest-resolve@29.3.1: + resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} + engines: {node: '>=6'} + peerDependencies: + jest-resolve: '*' + peerDependenciesMeta: + jest-resolve: + optional: true + dependencies: + jest-resolve: 29.3.1 /jest-regex-util/26.0.0: resolution: {integrity: sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==} @@ -14587,6 +15087,11 @@ packages: /jest-regex-util/27.5.1: resolution: {integrity: sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dev: true + + /jest-regex-util/29.2.0: + resolution: {integrity: sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} /jest-resolve-dependencies/27.5.1: resolution: {integrity: sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==} @@ -14597,12 +15102,22 @@ packages: jest-snapshot: 27.5.1 transitivePeerDependencies: - supports-color + dev: true + + /jest-resolve-dependencies/29.3.1: + resolution: {integrity: sha512-Vk0cYq0byRw2WluNmNWGqPeRnZ3p3hHmjJMp2dyyZeYIfiBskwq4rpiuGFR6QGAdbj58WC7HN4hQHjf2mpvrLA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + jest-regex-util: 29.2.0 + jest-snapshot: 29.3.1 + transitivePeerDependencies: + - supports-color /jest-resolve/27.4.6: resolution: {integrity: sha512-SFfITVApqtirbITKFAO7jOVN45UgFzcRdQanOFzjnbd+CACDoyeX7206JyU92l4cRr73+Qy/TlW51+4vHGt+zw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@jest/types': 27.4.2 + '@jest/types': 27.5.1 chalk: 4.1.2 graceful-fs: 4.2.10 jest-haste-map: 27.5.1 @@ -14612,6 +15127,7 @@ packages: resolve: 1.22.1 resolve.exports: 1.1.0 slash: 3.0.0 + dev: true /jest-resolve/27.5.1: resolution: {integrity: sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==} @@ -14627,6 +15143,21 @@ packages: resolve: 1.22.1 resolve.exports: 1.1.0 slash: 3.0.0 + dev: true + + /jest-resolve/29.3.1: + resolution: {integrity: sha512-amXJgH/Ng712w3Uz5gqzFBBjxV8WFLSmNjoreBGMqxgCz5cH7swmBZzgBaCIOsvb0NbpJ0vgaSFdJqMdT+rADw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + chalk: 4.1.2 + graceful-fs: 4.2.10 + jest-haste-map: 29.3.1 + jest-pnp-resolver: 1.2.3_jest-resolve@29.3.1 + jest-util: 29.3.1 + jest-validate: 29.3.1 + resolve: 1.22.1 + resolve.exports: 1.1.0 + slash: 3.0.0 /jest-runner/27.5.1: resolution: {integrity: sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==} @@ -14658,6 +15189,35 @@ packages: - canvas - supports-color - utf-8-validate + dev: true + + /jest-runner/29.3.1: + resolution: {integrity: sha512-oFvcwRNrKMtE6u9+AQPMATxFcTySyKfLhvso7Sdk/rNpbhg4g2GAGCopiInk1OP4q6gz3n6MajW4+fnHWlU3bA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/console': 29.3.1 + '@jest/environment': 29.3.1 + '@jest/test-result': 29.3.1_@types+node@12.20.24 + '@jest/transform': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 12.20.24 + chalk: 4.1.2 + emittery: 0.13.1 + graceful-fs: 4.2.10 + jest-docblock: 29.2.0 + jest-environment-node: 29.3.1 + jest-haste-map: 29.3.1 + jest-leak-detector: 29.3.1 + jest-message-util: 29.3.1 + jest-resolve: 29.3.1 + jest-runtime: 29.3.1 + jest-util: 29.3.1 + jest-watcher: 29.3.1 + jest-worker: 29.3.1 + p-limit: 3.1.0 + source-map-support: 0.5.13 + transitivePeerDependencies: + - supports-color /jest-runtime/27.5.1_@types+node@12.20.24: resolution: {integrity: sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==} @@ -14688,6 +15248,36 @@ packages: transitivePeerDependencies: - '@types/node' - supports-color + dev: true + + /jest-runtime/29.3.1: + resolution: {integrity: sha512-jLzkIxIqXwBEOZx7wx9OO9sxoZmgT2NhmQKzHQm1xwR1kNW/dn0OjxR424VwHHf1SPN6Qwlb5pp1oGCeFTQ62A==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/environment': 29.3.1 + '@jest/fake-timers': 29.3.1 + '@jest/globals': 29.3.1 + '@jest/source-map': 29.2.0 + '@jest/test-result': 29.3.1_@types+node@12.20.24 + '@jest/transform': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 12.20.24 + chalk: 4.1.2 + cjs-module-lexer: 1.2.2 + collect-v8-coverage: 1.0.1_@types+node@12.20.24 + glob: 7.2.3 + graceful-fs: 4.2.10 + jest-haste-map: 29.3.1 + jest-message-util: 29.3.1 + jest-mock: 29.3.1 + jest-regex-util: 29.2.0 + jest-resolve: 29.3.1 + jest-snapshot: 29.3.1 + jest-util: 29.3.1 + slash: 3.0.0 + strip-bom: 4.0.0 + transitivePeerDependencies: + - supports-color /jest-serializer/26.6.2: resolution: {integrity: sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==} @@ -14703,6 +15293,7 @@ packages: dependencies: '@types/node': 12.20.24 graceful-fs: 4.2.10 + dev: true /jest-snapshot/27.4.6: resolution: {integrity: sha512-fafUCDLQfzuNP9IRcEqaFAMzEe7u5BF7mude51wyWv7VRex60WznZIC7DfKTgSIlJa8aFzYmXclmN328aqSDmQ==} @@ -14713,8 +15304,8 @@ packages: '@babel/plugin-syntax-typescript': 7.20.0_@babel+core@7.17.12 '@babel/traverse': 7.20.5 '@babel/types': 7.20.5 - '@jest/transform': 27.4.6 - '@jest/types': 27.4.2 + '@jest/transform': 27.5.1 + '@jest/types': 27.5.1 '@types/babel__traverse': 7.18.3 '@types/prettier': 2.7.1 babel-preset-current-node-syntax: 1.0.1_@babel+core@7.17.12 @@ -14732,6 +15323,7 @@ packages: semver: 7.3.8 transitivePeerDependencies: - supports-color + dev: true /jest-snapshot/27.5.1: resolution: {integrity: sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==} @@ -14761,6 +15353,38 @@ packages: semver: 7.3.8 transitivePeerDependencies: - supports-color + dev: true + + /jest-snapshot/29.3.1: + resolution: {integrity: sha512-+3JOc+s28upYLI2OJM4PWRGK9AgpsMs/ekNryUV0yMBClT9B1DF2u2qay8YxcQd338PPYSFNb0lsar1B49sLDA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@babel/core': 7.17.12 + '@babel/generator': 7.20.5 + '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.17.12 + '@babel/plugin-syntax-typescript': 7.20.0_@babel+core@7.17.12 + '@babel/traverse': 7.20.5 + '@babel/types': 7.20.5 + '@jest/expect-utils': 29.3.1 + '@jest/transform': 29.3.1 + '@jest/types': 29.3.1 + '@types/babel__traverse': 7.18.3 + '@types/prettier': 2.7.1 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.17.12 + chalk: 4.1.2 + expect: 29.3.1 + graceful-fs: 4.2.10 + jest-diff: 29.3.1 + jest-get-type: 29.2.0 + jest-haste-map: 29.3.1 + jest-matcher-utils: 29.3.1 + jest-message-util: 29.3.1 + jest-util: 29.3.1 + natural-compare: 1.4.0 + pretty-format: 29.3.1 + semver: 7.3.8 + transitivePeerDependencies: + - supports-color /jest-util/26.6.2: resolution: {integrity: sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==} @@ -14784,6 +15408,18 @@ packages: ci-info: 3.7.0 graceful-fs: 4.2.10 picomatch: 2.3.1 + dev: true + + /jest-util/29.3.1: + resolution: {integrity: sha512-7YOVZaiX7RJLv76ZfHt4nbNEzzTRiMW/IiOG7ZOKmTXmoGBxUDefgMAxQubu6WPVqP5zSzAdZG0FfLcC7HOIFQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + '@types/node': 12.20.24 + chalk: 4.1.2 + ci-info: 3.7.0 + graceful-fs: 4.2.10 + picomatch: 2.3.1 /jest-validate/27.5.1: resolution: {integrity: sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==} @@ -14795,6 +15431,18 @@ packages: jest-get-type: 27.5.1 leven: 3.1.0 pretty-format: 27.5.1 + dev: true + + /jest-validate/29.3.1: + resolution: {integrity: sha512-N9Lr3oYR2Mpzuelp1F8negJR3YE+L1ebk1rYA5qYo9TTY3f9OWdptLoNSPP9itOCBIRBqjt/S5XHlzYglLN67g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + camelcase: 6.3.0 + chalk: 4.1.2 + jest-get-type: 29.2.0 + leven: 3.1.0 + pretty-format: 29.3.1 /jest-watch-select-projects/2.0.0: resolution: {integrity: sha512-j00nW4dXc2NiCW6znXgFLF9g8PJ0zP25cpQ1xRro/HU2GBfZQFZD0SoXnAlaoKkIY4MlfTMkKGbNXFpvCdjl1w==} @@ -14815,6 +15463,20 @@ packages: chalk: 4.1.2 jest-util: 27.5.1 string-length: 4.0.2 + dev: true + + /jest-watcher/29.3.1: + resolution: {integrity: sha512-RspXG2BQFDsZSRKGCT/NiNa8RkQ1iKAjrO0//soTMWx/QUt+OcxMqMSBxz23PYGqUuWm2+m2mNNsmj0eIoOaFg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/test-result': 29.3.1_@types+node@12.20.24 + '@jest/types': 29.3.1 + '@types/node': 12.20.24 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + emittery: 0.13.1 + jest-util: 29.3.1 + string-length: 4.0.2 /jest-worker/26.6.2: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} @@ -14833,9 +15495,18 @@ packages: merge-stream: 2.0.0 supports-color: 8.1.1 - /jest/27.4.7_@types+node@12.20.24: - resolution: {integrity: sha512-8heYvsx7nV/m8m24Vk26Y87g73Ba6ueUd0MWed/NXMhSZIm62U/llVbS0PJe1SHunbyXjJ/BqG1z9bFjGUIvTg==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + /jest-worker/29.3.1: + resolution: {integrity: sha512-lY4AnnmsEWeiXirAIA0c9SDPbuCBq8IYuDVL8PMm0MZ2PEs2yPvRA/J64QBXuZp7CYKrDM/rmNrc9/i3KJQncw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@types/node': 12.20.24 + jest-util: 29.3.1 + merge-stream: 2.0.0 + supports-color: 8.1.1 + + /jest/29.3.1_@types+node@12.20.24: + resolution: {integrity: sha512-6iWfL5DTT0Np6UYs/y5Niu7WIfNv/wRTtN5RSXt2DIEft3dx3zPuw/3WJQBCJfmEzvDiEKwoqMbGD9n49+qLSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -14843,16 +15514,14 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 27.5.1 + '@jest/core': 29.3.1 + '@jest/types': 29.3.1 import-local: 3.1.0 - jest-cli: 27.5.1_@types+node@12.20.24 + jest-cli: 29.3.1_@types+node@12.20.24 transitivePeerDependencies: - '@types/node' - - bufferutil - - canvas - supports-color - ts-node - - utf-8-validate dev: true /jju/1.4.0: @@ -14970,6 +15639,47 @@ packages: - bufferutil - supports-color - utf-8-validate + dev: true + + /jsdom/20.0.3: + resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} + engines: {node: '>=14'} + peerDependencies: + canvas: ^2.5.0 + peerDependenciesMeta: + canvas: + optional: true + dependencies: + abab: 2.0.6 + acorn: 8.8.1 + acorn-globals: 7.0.1 + cssom: 0.5.0 + cssstyle: 2.3.0 + data-urls: 3.0.2 + decimal.js: 10.4.3 + domexception: 4.0.0 + escodegen: 2.0.0 + form-data: 4.0.0 + html-encoding-sniffer: 3.0.0 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 + is-potential-custom-element-name: 1.0.1 + nwsapi: 2.2.2 + parse5: 7.1.2 + saxes: 6.0.0 + symbol-tree: 3.2.4 + tough-cookie: 4.1.2 + w3c-xmlserializer: 4.0.0 + webidl-conversions: 7.0.0 + whatwg-encoding: 2.0.0 + whatwg-mimetype: 3.0.0 + whatwg-url: 11.0.0 + ws: 8.11.0 + xml-name-validator: 4.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate /jsesc/0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} @@ -16628,6 +17338,12 @@ packages: /parse5/6.0.1: resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} + dev: true + + /parse5/7.1.2: + resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} + dependencies: + entities: 4.4.0 /parseurl/1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} @@ -17333,6 +18049,15 @@ packages: ansi-regex: 5.0.1 ansi-styles: 5.2.0 react-is: 17.0.2 + dev: true + + /pretty-format/29.3.1: + resolution: {integrity: sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/schemas': 29.0.0 + ansi-styles: 5.2.0 + react-is: 18.2.0 /pretty-hrtime/1.0.3: resolution: {integrity: sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==} @@ -17751,10 +18476,10 @@ packages: /react-is/17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} + dev: true /react-is/18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - dev: false /react-popper-tooltip/3.1.1_5owmthsvj5ictknaj3ev736ofq: resolution: {integrity: sha512-EnERAnnKRptQBJyaee5GJScWNUKQPDD2ywvzZyUjst/wj5U64C8/CnSYLNEmP2hG0IJ3ZhtDxE8oDN+KOyavXQ==} @@ -18547,6 +19272,13 @@ packages: engines: {node: '>=10'} dependencies: xmlchars: 2.2.0 + dev: true + + /saxes/6.0.0: + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} + engines: {node: '>=v12.22.7'} + dependencies: + xmlchars: 2.2.0 /scheduler/0.19.1: resolution: {integrity: sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==} @@ -18945,6 +19677,12 @@ packages: source-map-url: 0.4.1 urix: 0.1.0 + /source-map-support/0.5.13: + resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + /source-map-support/0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: @@ -19394,6 +20132,7 @@ packages: dependencies: has-flag: 4.0.0 supports-color: 7.2.0 + dev: true /supports-preserve-symlinks-flag/1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} @@ -19497,6 +20236,7 @@ packages: dependencies: ansi-escapes: 4.3.2 supports-hyperlinks: 2.3.0 + dev: true /terser-webpack-plugin/1.4.5_webpack@4.44.2: resolution: {integrity: sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==} @@ -19749,6 +20489,13 @@ packages: engines: {node: '>=8'} dependencies: punycode: 2.1.1 + dev: true + + /tr46/3.0.0: + resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} + engines: {node: '>=12'} + dependencies: + punycode: 2.1.1 /trim-newlines/3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} @@ -20339,6 +21086,7 @@ packages: '@types/istanbul-lib-coverage': 2.0.4 convert-source-map: 1.9.0 source-map: 0.7.4 + dev: true /v8-to-istanbul/9.0.1: resolution: {integrity: sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==} @@ -20347,7 +21095,6 @@ packages: '@jridgewell/trace-mapping': 0.3.17 '@types/istanbul-lib-coverage': 2.0.4 convert-source-map: 1.9.0 - dev: true /validate-npm-package-license/3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} @@ -20411,12 +21158,20 @@ packages: deprecated: Use your platform's native performance.now() and performance.timeOrigin. dependencies: browser-process-hrtime: 1.0.0 + dev: true /w3c-xmlserializer/2.0.0: resolution: {integrity: sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==} engines: {node: '>=10'} dependencies: xml-name-validator: 3.0.0 + dev: true + + /w3c-xmlserializer/4.0.0: + resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} + engines: {node: '>=14'} + dependencies: + xml-name-validator: 4.0.0 /walker/1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} @@ -20473,10 +21228,16 @@ packages: /webidl-conversions/5.0.0: resolution: {integrity: sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==} engines: {node: '>=8'} + dev: true /webidl-conversions/6.1.0: resolution: {integrity: sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==} engines: {node: '>=10.4'} + dev: true + + /webidl-conversions/7.0.0: + resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} + engines: {node: '>=12'} /webpack-bundle-analyzer/4.5.0: resolution: {integrity: sha512-GUMZlM3SKwS8Z+CKeIFx7CVoHn3dXFcUAjT/dcZQQmfSZGvitPfMob2ipjai7ovFFqPvTqkEZ/leL4O0YOdAYQ==} @@ -20930,9 +21691,28 @@ packages: resolution: {integrity: sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==} dependencies: iconv-lite: 0.4.24 + dev: true + + /whatwg-encoding/2.0.0: + resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} + engines: {node: '>=12'} + dependencies: + iconv-lite: 0.6.3 /whatwg-mimetype/2.3.0: resolution: {integrity: sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==} + dev: true + + /whatwg-mimetype/3.0.0: + resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} + engines: {node: '>=12'} + + /whatwg-url/11.0.0: + resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} + engines: {node: '>=12'} + dependencies: + tr46: 3.0.0 + webidl-conversions: 7.0.0 /whatwg-url/5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} @@ -20947,6 +21727,7 @@ packages: lodash: 4.17.21 tr46: 2.1.0 webidl-conversions: 6.1.0 + dev: true /which-boxed-primitive/1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -21088,6 +21869,13 @@ packages: signal-exit: 3.0.7 typedarray-to-buffer: 3.1.5 + /write-file-atomic/4.0.2: + resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + imurmurhash: 0.1.4 + signal-exit: 3.0.7 + /write-yaml-file/4.2.0: resolution: {integrity: sha512-LwyucHy0uhWqbrOkh9cBluZBeNVxzHjDaE9mwepZG3n3ZlbM4v3ndrFw51zW/NXYFFqP+QWZ72ihtLWTh05e4Q==} engines: {node: '>=10.13'} @@ -21132,6 +21920,11 @@ packages: /xml-name-validator/3.0.0: resolution: {integrity: sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==} + dev: true + + /xml-name-validator/4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} /xml2js/0.4.19: resolution: {integrity: sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==} @@ -21215,6 +22008,11 @@ packages: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} + /yargs-parser/21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + dev: true + /yargs/13.3.2: resolution: {integrity: sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==} dependencies: @@ -21259,6 +22057,19 @@ packages: y18n: 5.0.8 yargs-parser: 20.2.9 + /yargs/17.6.2: + resolution: {integrity: sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==} + engines: {node: '>=12'} + dependencies: + cliui: 8.0.1 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + dev: true + /yauzl/2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} dependencies: diff --git a/heft-plugins/heft-jest-plugin/includes/jest-shared.config.json b/heft-plugins/heft-jest-plugin/includes/jest-shared.config.json index e31b45ce345..f8060da5192 100644 --- a/heft-plugins/heft-jest-plugin/includes/jest-shared.config.json +++ b/heft-plugins/heft-jest-plugin/includes/jest-shared.config.json @@ -18,7 +18,15 @@ // "Adding '/src' here enables src/__mocks__ to be used for mocking Node.js system modules "roots": ["/src"], - "testURL": "http://localhost/", + // Retain pre-Jest 29 snapshot behavior + "snapshotFormat": { + "escapeString": true, + "printBasicPrototype": true + }, + + "testEnvironmentOptions": { + "url": "http://localhost/" + }, "testMatch": ["/src/**/*.test.{ts,tsx}"], "testPathIgnorePatterns": ["/node_modules/"], diff --git a/heft-plugins/heft-jest-plugin/package.json b/heft-plugins/heft-jest-plugin/package.json index 88a40c2888a..a2d0dd551e1 100644 --- a/heft-plugins/heft-jest-plugin/package.json +++ b/heft-plugins/heft-jest-plugin/package.json @@ -21,18 +21,18 @@ "@rushstack/heft": "^0.49.0" }, "dependencies": { - "@jest/core": "~27.4.2", - "@jest/reporters": "~27.4.2", - "@jest/transform": "~27.4.2", + "@jest/core": "~29.3.1", + "@jest/reporters": "~29.3.1", + "@jest/transform": "~29.3.1", "@rushstack/heft-config-file": "workspace:*", "@rushstack/node-core-library": "workspace:*", - "jest-config": "~27.4.2", - "jest-resolve": "~27.4.2", - "jest-snapshot": "~27.4.2", + "jest-config": "~29.3.1", + "jest-resolve": "~29.3.1", + "jest-snapshot": "~29.3.1", "lodash": "~4.17.15" }, "devDependencies": { - "@jest/types": "~27.4.2", + "@jest/types": "29.3.1", "@microsoft/api-extractor": "workspace:*", "@rushstack/eslint-config": "workspace:*", "@rushstack/heft": "workspace:*", @@ -40,7 +40,8 @@ "@types/lodash": "4.14.116", "@types/node": "12.20.24", "eslint": "~8.7.0", - "jest-environment-node": "~27.4.2", + "jest-environment-jsdom": "~29.3.1", + "jest-environment-node": "~29.3.1", "jest-watch-select-projects": "2.0.0", "typescript": "~4.8.4" } diff --git a/heft-plugins/heft-jest-plugin/src/HeftJestReporter.ts b/heft-plugins/heft-jest-plugin/src/HeftJestReporter.ts index 6490dc95d41..4798daa19ee 100644 --- a/heft-plugins/heft-jest-plugin/src/HeftJestReporter.ts +++ b/heft-plugins/heft-jest-plugin/src/HeftJestReporter.ts @@ -8,7 +8,7 @@ import { Test, TestResult, AggregatedResult, - Context, + TestContext, ReporterOnStartOptions, Config } from '@jest/reporters'; @@ -177,7 +177,7 @@ export default class HeftJestReporter implements Reporter { ); } - public async onRunComplete(contexts: Set, results: AggregatedResult): Promise { + public async onRunComplete(contexts: Set, results: AggregatedResult): Promise { const { numPassedTests, numFailedTests, numTotalTests, numRuntimeErrorTestSuites } = results; this._terminal.writeLine(); diff --git a/heft-plugins/heft-jest-plugin/src/HeftJestResolver.ts b/heft-plugins/heft-jest-plugin/src/HeftJestResolver.ts index ffa3157bce0..6168a667f40 100644 --- a/heft-plugins/heft-jest-plugin/src/HeftJestResolver.ts +++ b/heft-plugins/heft-jest-plugin/src/HeftJestResolver.ts @@ -1,19 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import type { Config } from '@jest/types'; - // This signature is declared here: // https://github.com/facebook/jest/blob/c76f9a7c8eb2fab1a15dfe8952d125a8607d1bbe/packages/jest-resolve/src/defaultResolver.ts#L26 interface IResolverOptions { - basedir: Config.Path; + basedir: string; browser?: boolean; conditions?: Array; - defaultResolver: (path: Config.Path, options: IResolverOptions) => Config.Path; + defaultResolver: (path: string, options: IResolverOptions) => string; extensions?: Array; moduleDirectory?: Array; - paths?: Array; - rootDir?: Config.Path; + paths?: Array; + rootDir?: string; packageFilter?: unknown; // (pkg: PkgJson, dir: string) => PkgJson pathFilter?: unknown; // (pkg: PkgJson, path: string, relativePath: string) => string } @@ -30,7 +28,7 @@ interface IResolverOptions { // NO: some-package/__mocks__/Thing const mockPathRegExp: RegExp = /^(\..*[\/])__mocks__\/([^\/]+)$/; -function resolve(request: Config.Path, options: IResolverOptions): Config.Path { +function resolve(request: string, options: IResolverOptions): string { let newRequest: string = request; // Jest's manual mock feature works by looking for a matching filename in a "__mocks__" subfolder, diff --git a/heft-plugins/heft-jest-plugin/src/JestPlugin.ts b/heft-plugins/heft-jest-plugin/src/JestPlugin.ts index 50866153d1f..09e1c57a9e7 100644 --- a/heft-plugins/heft-jest-plugin/src/JestPlugin.ts +++ b/heft-plugins/heft-jest-plugin/src/JestPlugin.ts @@ -203,6 +203,7 @@ export class JestPlugin implements IHeftPlugin { if (!options?.debugHeftReporter) { // Extract the reporters and transform to include the Heft reporter by default + // @ts-expect-error `argv.reporters` is typed as a string array, but works with array of configs via direct call to runCLI jestArgv.reporters = JestPlugin._extractHeftJestReporters( scopedLogger, heftConfiguration, diff --git a/heft-plugins/heft-jest-plugin/src/JestUtils.ts b/heft-plugins/heft-jest-plugin/src/JestUtils.ts index 1f6949ca526..dc92937d473 100644 --- a/heft-plugins/heft-jest-plugin/src/JestUtils.ts +++ b/heft-plugins/heft-jest-plugin/src/JestUtils.ts @@ -5,7 +5,6 @@ import * as path from 'path'; import { createHash } from 'crypto'; import { default as JestResolver } from 'jest-resolve'; import type { TransformOptions } from '@jest/transform'; -import type { Config } from '@jest/types'; import { FileSystem } from '@rushstack/node-core-library'; @@ -15,21 +14,21 @@ export type CacheKeyOptions = Pick string; // See: https://github.com/facebook/jest/blob/3093c18c428d962eb959437b322c6a5b0ae0e7a2/packages/jest-config/src/utils.ts#L14 export interface IResolveOptions { - rootDir: Config.Path; + rootDir: string; key: string; - filePath: Config.Path; + filePath: string; optional?: boolean; } // Adapted from Jest to expose non-exported resolve function // See: https://github.com/facebook/jest/blob/3093c18c428d962eb959437b322c6a5b0ae0e7a2/packages/jest-config/src/utils.ts#L58 -export const replaceRootDirInPath = (rootDir: Config.Path, filePath: Config.Path): string => { +export const replaceRootDirInPath = (rootDir: string, filePath: string): string => { if (!/^/.test(filePath)) { return filePath; } @@ -117,7 +116,7 @@ const getGlobalCacheKeyAsync = async (files: string[], values: string[]): Promis // See: https://github.com/facebook/jest/blob/86e64611c98dd3a6656be27dc5c342d53f8e7c30/packages/jest-create-cache-key-function/src/index.ts#L57 const createCacheKeyFunctionInternal = (globalCacheKey: string): GetCacheKeyFunction => { - return (sourceText: string, sourcePath: Config.Path, options: CacheKeyOptions): string => { + return (sourceText: string, sourcePath: string, options: CacheKeyOptions): string => { const { config, instrument } = options; return createHash('md5') .update(globalCacheKey) diff --git a/heft-plugins/heft-jest-plugin/src/transformers/BuildTransformer.ts b/heft-plugins/heft-jest-plugin/src/transformers/BuildTransformer.ts index e157c8bc87e..87976802cd4 100644 --- a/heft-plugins/heft-jest-plugin/src/transformers/BuildTransformer.ts +++ b/heft-plugins/heft-jest-plugin/src/transformers/BuildTransformer.ts @@ -181,7 +181,9 @@ export class BuildTransformer implements AsyncTransformer, SyncTransformer { transpiledTextWithSourceMap = transpiledText + sourceMapComment; } - return transpiledTextWithSourceMap; + return { + code: transpiledTextWithSourceMap + }; } private static _waitForTranspiledFile(sourcePath: string, transpiledPath: string): void { @@ -311,7 +313,7 @@ export class BuildTransformer implements AsyncTransformer, SyncTransformer { /** * @override */ - public getCacheKey(sourceText: string, sourcePath: Config.Path, options: TransformOptions): string { + public getCacheKey(sourceText: string, sourcePath: string, options: TransformOptions): string { const heftJestDataFile: IHeftJestDataFileJson = BuildTransformer._getHeftJestDataFileJson( options.config.rootDir ); @@ -327,7 +329,7 @@ export class BuildTransformer implements AsyncTransformer, SyncTransformer { */ public async getCacheKeyAsync( sourceText: string, - sourcePath: Config.Path, + sourcePath: string, options: TransformOptions ): Promise { const heftJestDataFile: IHeftJestDataFileJson = await BuildTransformer._getHeftJestDataFileJsonAsync( @@ -343,7 +345,7 @@ export class BuildTransformer implements AsyncTransformer, SyncTransformer { /** * @override */ - public process(sourceText: string, sourcePath: Config.Path, options: TransformOptions): TransformedSource { + public process(sourceText: string, sourcePath: string, options: TransformOptions): TransformedSource { const jestOptions: Config.ProjectConfig = options.config; const heftJestDataFile: IHeftJestDataFileJson = BuildTransformer._getHeftJestDataFileJson( jestOptions.rootDir @@ -394,7 +396,7 @@ export class BuildTransformer implements AsyncTransformer, SyncTransformer { */ public async processAsync( sourceText: string, - sourcePath: Config.Path, + sourcePath: string, options: TransformOptions ): Promise { const jestOptions: Config.ProjectConfig = options.config; diff --git a/heft-plugins/heft-jest-plugin/src/transformers/IdentityMockTransformer.ts b/heft-plugins/heft-jest-plugin/src/transformers/IdentityMockTransformer.ts index 0c122a15579..b076523f52b 100644 --- a/heft-plugins/heft-jest-plugin/src/transformers/IdentityMockTransformer.ts +++ b/heft-plugins/heft-jest-plugin/src/transformers/IdentityMockTransformer.ts @@ -4,7 +4,6 @@ import * as path from 'path'; import { FileSystem } from '@rushstack/node-core-library'; import type { SyncTransformer, TransformedSource, TransformOptions } from '@jest/transform'; -import type { Config } from '@jest/types'; // The transpiled output for IdentityMockProxy.ts const proxyCode: string = FileSystem.readFile(path.join(__dirname, '..', 'identityMock.js')).toString(); @@ -22,7 +21,9 @@ const proxyCode: string = FileSystem.readFile(path.join(__dirname, '..', 'identi * to the target project folder, not Heft's folder.) */ export class IdentityMockTransformer implements SyncTransformer { - public process(sourceText: string, sourcePath: Config.Path, options: TransformOptions): TransformedSource { - return proxyCode; + public process(sourceText: string, sourcePath: string, options: TransformOptions): TransformedSource { + return { + code: proxyCode + }; } } diff --git a/heft-plugins/heft-jest-plugin/src/transformers/StringMockTransformer.ts b/heft-plugins/heft-jest-plugin/src/transformers/StringMockTransformer.ts index 42a09a6f741..7b2d587f7cd 100644 --- a/heft-plugins/heft-jest-plugin/src/transformers/StringMockTransformer.ts +++ b/heft-plugins/heft-jest-plugin/src/transformers/StringMockTransformer.ts @@ -2,7 +2,6 @@ // See LICENSE in the project root for license information. import type { SyncTransformer, TransformedSource, TransformOptions } from '@jest/transform'; -import type { Config } from '@jest/types'; /** * This Jest transform handles imports of data files (e.g. .png, .jpg) that would normally be @@ -11,8 +10,10 @@ import type { Config } from '@jest/types'; * environment. */ export class StringMockTransformer implements SyncTransformer { - public process(sourceText: string, sourcePath: Config.Path, options: TransformOptions): TransformedSource { + public process(sourceText: string, sourcePath: string, options: TransformOptions): TransformedSource { // For a file called "myImage.png", this will generate a JS module that exports the literal string "myImage.png" - return `module.exports = ${JSON.stringify(sourcePath)};`; + return { + code: `module.exports = ${JSON.stringify(sourcePath)};` + }; } } diff --git a/rigs/heft-node-rig/package.json b/rigs/heft-node-rig/package.json index e9119e10dc4..4c5a7d4af6d 100644 --- a/rigs/heft-node-rig/package.json +++ b/rigs/heft-node-rig/package.json @@ -19,7 +19,8 @@ "@microsoft/api-extractor": "workspace:*", "@rushstack/heft-jest-plugin": "workspace:*", "eslint": "~8.7.0", - "jest-environment-node": "~27.4.2", + "jest-environment-jsdom": "~29.3.1", + "jest-environment-node": "~29.3.1", "typescript": "~4.8.4" }, "devDependencies": { diff --git a/rigs/heft-web-rig/package.json b/rigs/heft-web-rig/package.json index 672d18bf69e..3bd607418f5 100644 --- a/rigs/heft-web-rig/package.json +++ b/rigs/heft-web-rig/package.json @@ -25,7 +25,7 @@ "css-minimizer-webpack-plugin": "~3.4.1", "eslint": "~8.7.0", "html-webpack-plugin": "~5.5.0", - "jest-environment-jsdom": "~27.4.2", + "jest-environment-jsdom": "~29.3.1", "mini-css-extract-plugin": "~2.5.3", "postcss-loader": "~6.2.1", "postcss": "~8.4.6", From 830c8d2c1fc832e7d220967c18eb7587f7f7aaa1 Mon Sep 17 00:00:00 2001 From: Tomi Blinnikka <60748911+tomi-bigpi@users.noreply.github.com> Date: Tue, 17 Jan 2023 16:45:20 -0600 Subject: [PATCH 062/399] Address review feedback * Remove unnecessary js-dom from node rig * Bump lib to ES2015 in heft-jest-reporters-test --- build-tests/heft-jest-reporters-test/tsconfig.json | 2 +- rigs/heft-node-rig/package.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build-tests/heft-jest-reporters-test/tsconfig.json b/build-tests/heft-jest-reporters-test/tsconfig.json index e1589c3d4fd..0ad08cab8f8 100644 --- a/build-tests/heft-jest-reporters-test/tsconfig.json +++ b/build-tests/heft-jest-reporters-test/tsconfig.json @@ -18,7 +18,7 @@ "module": "esnext", "moduleResolution": "node", "target": "ES2015", - "lib": ["es5"] + "lib": ["ES2015"] }, "include": ["src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules", "lib"] diff --git a/rigs/heft-node-rig/package.json b/rigs/heft-node-rig/package.json index 4c5a7d4af6d..93ef0c78915 100644 --- a/rigs/heft-node-rig/package.json +++ b/rigs/heft-node-rig/package.json @@ -19,7 +19,6 @@ "@microsoft/api-extractor": "workspace:*", "@rushstack/heft-jest-plugin": "workspace:*", "eslint": "~8.7.0", - "jest-environment-jsdom": "~29.3.1", "jest-environment-node": "~29.3.1", "typescript": "~4.8.4" }, From ea5750f4c1b0feacda768cdd3f197b663215979f Mon Sep 17 00:00:00 2001 From: Tomi Blinnikka <60748911+tomi-bigpi@users.noreply.github.com> Date: Tue, 17 Jan 2023 16:51:01 -0600 Subject: [PATCH 063/399] Add updated pnpm lock file and repo state. * Also fixes conflict with `main` from latest changes. --- common/config/rush/pnpm-lock.yaml | 2 -- common/config/rush/repo-state.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 358fd1ac51a..434d4ab9e78 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2234,14 +2234,12 @@ importers: '@rushstack/heft': workspace:* '@rushstack/heft-jest-plugin': workspace:* eslint: ~8.7.0 - jest-environment-jsdom: ~29.3.1 jest-environment-node: ~29.3.1 typescript: ~4.8.4 dependencies: '@microsoft/api-extractor': link:../../apps/api-extractor '@rushstack/heft-jest-plugin': link:../../heft-plugins/heft-jest-plugin eslint: 8.7.0 - jest-environment-jsdom: 29.3.1 jest-environment-node: 29.3.1 typescript: 4.8.4 devDependencies: diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index 39d9fca00be..6d33c3328d0 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "2de3fb9632c9527e29f02298c4020efa6926157e", + "pnpmShrinkwrapHash": "5fa54730872bcac8700175daa33564b548068a0d", "preferredVersionsHash": "5222ca779ae69ebfd201e39c17f48ce9eaf8c3c2" } From a2fbefe8206d90f91059c52fc0f5a9c2644dbe02 Mon Sep 17 00:00:00 2001 From: Ian Clanton-Thuon Date: Wed, 18 Jan 2023 11:47:42 -0800 Subject: [PATCH 064/399] Fix missing create-scripts.js file. --- .../rush/fix-create-scripts_2023-01-18-19-47.json | 10 ++++++++++ libraries/rush-lib/src/logic/deploy/DeployManager.ts | 4 ++-- libraries/rush-lib/src/utilities/PathConstants.ts | 3 ++- libraries/rush-lib/webpack.config.js | 4 ++++ 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 common/changes/@microsoft/rush/fix-create-scripts_2023-01-18-19-47.json diff --git a/common/changes/@microsoft/rush/fix-create-scripts_2023-01-18-19-47.json b/common/changes/@microsoft/rush/fix-create-scripts_2023-01-18-19-47.json new file mode 100644 index 00000000000..ca5afd7d589 --- /dev/null +++ b/common/changes/@microsoft/rush/fix-create-scripts_2023-01-18-19-47.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Fix an issue where `create-scripts.js` does not exist during `rush deploy`.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/libraries/rush-lib/src/logic/deploy/DeployManager.ts b/libraries/rush-lib/src/logic/deploy/DeployManager.ts index 78175e3f9a8..ce4d392bcef 100644 --- a/libraries/rush-lib/src/logic/deploy/DeployManager.ts +++ b/libraries/rush-lib/src/logic/deploy/DeployManager.ts @@ -31,7 +31,7 @@ import { RushConfigurationProject } from '../../api/RushConfigurationProject'; import { DeployScenarioConfiguration, IDeployScenarioProjectJson } from './DeployScenarioConfiguration'; import { PnpmfileConfiguration } from '../pnpm/PnpmfileConfiguration'; import { matchesWithStar } from './Utils'; -import { scriptsFolderName } from '../../utilities/PathConstants'; +import { createLinksScriptFilename, scriptsFolderPath } from '../../utilities/PathConstants'; // (@types/npm-packlist is missing this API) declare module 'npm-packlist' { @@ -665,7 +665,7 @@ export class DeployManager { if (deployState.scenarioConfiguration.json.linkCreation === 'script') { console.log('Copying create-links.js'); FileSystem.copyFile({ - sourcePath: `${scriptsFolderName}/create-links.js`, + sourcePath: `${scriptsFolderPath}/${createLinksScriptFilename}`, destinationPath: path.join(deployState.targetRootFolder, 'create-links.js'), alreadyExistsBehavior: AlreadyExistsBehavior.Error }); diff --git a/libraries/rush-lib/src/utilities/PathConstants.ts b/libraries/rush-lib/src/utilities/PathConstants.ts index 167bdb8af24..b49e828502b 100644 --- a/libraries/rush-lib/src/utilities/PathConstants.ts +++ b/libraries/rush-lib/src/utilities/PathConstants.ts @@ -16,13 +16,14 @@ export const assetsFolderPath: string = `${rushLibFolderRootPath}/assets`; /** * The folder name ("scripts") where the scripts in rush-lib are built. */ -export const scriptsFolderName: string = 'scripts'; +const scriptsFolderName: string = 'scripts'; export const pnpmfileShimFilename: string = 'PnpmfileShim.js'; export const installRunScriptFilename: string = 'install-run.js'; export const installRunRushScriptFilename: string = 'install-run-rush.js'; export const installRunRushxScriptFilename: string = 'install-run-rushx.js'; export const installRunRushPnpmScriptFilename: string = 'install-run-rush-pnpm.js'; +export const createLinksScriptFilename: string = 'create-links.js'; /** * The path to the scripts folder in rush-lib/dist. diff --git a/libraries/rush-lib/webpack.config.js b/libraries/rush-lib/webpack.config.js index 9857e2de4ea..8b47dcf2478 100644 --- a/libraries/rush-lib/webpack.config.js +++ b/libraries/rush-lib/webpack.config.js @@ -121,6 +121,10 @@ module.exports = () => { [PathConstants.installRunRushPnpmScriptFilename]: { import: `${__dirname}/lib-esnext/scripts/install-run-rush-pnpm.js`, ...SCRIPT_ENTRY_OPTIONS + }, + [PathConstants.createLinksScriptFilename]: { + import: `${__dirname}/lib-esnext/scripts/create-links.js`, + ...SCRIPT_ENTRY_OPTIONS } }) ]; From 29cde4ce9fd2b5bec7946df7341f64a224d850e4 Mon Sep 17 00:00:00 2001 From: David Michon Date: Wed, 18 Jan 2023 13:53:32 -0800 Subject: [PATCH 065/399] [module-minifier] Update to terser@5.16.1 --- .../bump-terser_2023-01-18-21-53.json | 10 ++++++++++ common/config/rush/pnpm-lock.yaml | 15 +++------------ common/config/rush/repo-state.json | 2 +- libraries/module-minifier/package.json | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 common/changes/@rushstack/module-minifier/bump-terser_2023-01-18-21-53.json diff --git a/common/changes/@rushstack/module-minifier/bump-terser_2023-01-18-21-53.json b/common/changes/@rushstack/module-minifier/bump-terser_2023-01-18-21-53.json new file mode 100644 index 00000000000..9a7a664dbae --- /dev/null +++ b/common/changes/@rushstack/module-minifier/bump-terser_2023-01-18-21-53.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/module-minifier", + "comment": "Update to terser 5.16.1", + "type": "patch" + } + ], + "packageName": "@rushstack/module-minifier" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 0cf2d5d6cc9..e24bf9f247d 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1785,13 +1785,13 @@ importers: '@types/serialize-javascript': 5.0.2 serialize-javascript: 6.0.0 source-map: ~0.7.3 - terser: 5.9.0 + terser: 5.16.1 dependencies: '@rushstack/worker-pool': link:../worker-pool '@types/node': 12.20.24 serialize-javascript: 6.0.0 source-map: 0.7.4 - terser: 5.9.0 + terser: 5.16.1 devDependencies: '@rushstack/eslint-config': link:../../eslint/eslint-config '@rushstack/heft': link:../../apps/heft @@ -19546,7 +19546,7 @@ packages: schema-utils: 3.1.1 serialize-javascript: 5.0.1 source-map: 0.6.1 - terser: 5.9.0 + terser: 5.16.1 webpack: 4.44.2 webpack-sources: 1.4.3 dev: true @@ -19593,15 +19593,6 @@ packages: commander: 2.20.3 source-map-support: 0.5.21 - /terser/5.9.0: - resolution: {integrity: sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - commander: 2.20.3 - source-map: 0.7.4 - source-map-support: 0.5.21 - /test-exclude/6.0.0: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index 530ff0fc82f..ae39d578b00 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "ccb00fdbe9254645066d7369c7640e6b9c859e5f", + "pnpmShrinkwrapHash": "046e9f54bcf081fbaf58b9e157b561be6b89e53d", "preferredVersionsHash": "5222ca779ae69ebfd201e39c17f48ce9eaf8c3c2" } diff --git a/libraries/module-minifier/package.json b/libraries/module-minifier/package.json index b3f4fb3a160..33e4c82caa5 100644 --- a/libraries/module-minifier/package.json +++ b/libraries/module-minifier/package.json @@ -20,7 +20,7 @@ "@rushstack/worker-pool": "workspace:*", "serialize-javascript": "6.0.0", "source-map": "~0.7.3", - "terser": "5.9.0" + "terser": "5.16.1" }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", From 6834905b64779d85bfc2224bf05abb4404d180a7 Mon Sep 17 00:00:00 2001 From: David Michon Date: Fri, 9 Dec 2022 16:44:59 -0800 Subject: [PATCH 066/399] Parallelize getRepoState --- ...po-state-performance_2022-12-10-00-54.json | 10 ++ ...po-state-performance_2022-12-10-00-54.json | 10 ++ common/reviews/api/package-deps-hash.api.md | 3 + common/reviews/api/rush-lib.api.md | 2 +- .../package-deps-hash/src/getRepoState.ts | 154 +++++++++++++++++- libraries/package-deps-hash/src/index.ts | 1 + .../cli/scriptActions/PhasedScriptAction.ts | 2 +- .../cli/test/RushCommandLineParser.test.ts | 69 +++++--- .../src/logic/ProjectChangeAnalyzer.ts | 92 +++++------ .../logic/test/ProjectChangeAnalyzer.test.ts | 8 +- 10 files changed, 267 insertions(+), 84 deletions(-) create mode 100644 common/changes/@microsoft/rush/repo-state-performance_2022-12-10-00-54.json create mode 100644 common/changes/@rushstack/package-deps-hash/repo-state-performance_2022-12-10-00-54.json diff --git a/common/changes/@microsoft/rush/repo-state-performance_2022-12-10-00-54.json b/common/changes/@microsoft/rush/repo-state-performance_2022-12-10-00-54.json new file mode 100644 index 00000000000..3a7fa0e4ba8 --- /dev/null +++ b/common/changes/@microsoft/rush/repo-state-performance_2022-12-10-00-54.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Use getRepoStateAsync to optimize performance of calculating repository state.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/common/changes/@rushstack/package-deps-hash/repo-state-performance_2022-12-10-00-54.json b/common/changes/@rushstack/package-deps-hash/repo-state-performance_2022-12-10-00-54.json new file mode 100644 index 00000000000..3eb6e0f7a23 --- /dev/null +++ b/common/changes/@rushstack/package-deps-hash/repo-state-performance_2022-12-10-00-54.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/package-deps-hash", + "comment": "Add getRepoStateAsync API for faster repository state calculation.", + "type": "minor" + } + ], + "packageName": "@rushstack/package-deps-hash" +} \ No newline at end of file diff --git a/common/reviews/api/package-deps-hash.api.md b/common/reviews/api/package-deps-hash.api.md index cd2808a61ee..372ad9455f0 100644 --- a/common/reviews/api/package-deps-hash.api.md +++ b/common/reviews/api/package-deps-hash.api.md @@ -22,6 +22,9 @@ export function getRepoRoot(currentWorkingDirectory: string, gitPath?: string): // @beta export function getRepoState(currentWorkingDirectory: string, gitPath?: string): Map; +// @beta +export function getRepoStateAsync(rootDirectory: string, additionalRelativePathsToHash?: string[], gitPath?: string): Promise>; + // @beta export interface IFileDiffStatus { // (undocumented) diff --git a/common/reviews/api/rush-lib.api.md b/common/reviews/api/rush-lib.api.md index 2a0de769dcd..446bd8539f1 100644 --- a/common/reviews/api/rush-lib.api.md +++ b/common/reviews/api/rush-lib.api.md @@ -740,7 +740,7 @@ export class ProjectChangeAnalyzer { // Warning: (ae-forgotten-export) The symbol "IRawRepoState" needs to be exported by the entry point index.d.ts // // @internal (undocumented) - _ensureInitialized(terminal: ITerminal): IRawRepoState | undefined; + _ensureInitializedAsync(terminal: ITerminal): Promise; // (undocumented) _filterProjectDataAsync(project: RushConfigurationProject, unfilteredProjectData: Map, rootDir: string, terminal: ITerminal): Promise>; getChangedProjectsAsync(options: IGetChangedProjectsOptions): Promise>; diff --git a/libraries/package-deps-hash/src/getRepoState.ts b/libraries/package-deps-hash/src/getRepoState.ts index ed316401d65..75c0d81350a 100644 --- a/libraries/package-deps-hash/src/getRepoState.ts +++ b/libraries/package-deps-hash/src/getRepoState.ts @@ -2,7 +2,10 @@ // See LICENSE in the project root for license information. import type * as child_process from 'child_process'; -import { Executable, FileSystem } from '@rushstack/node-core-library'; +import { once } from 'events'; +import { Readable } from 'stream'; + +import { Executable, FileSystem, IExecutableSpawnOptions } from '@rushstack/node-core-library'; export interface IGitVersion { major: number; @@ -190,7 +193,11 @@ export function getRepoRoot(currentWorkingDirectory: string, gitPath?: string): throw new Error(`git rev-parse exited with status ${result.status}: ${result.stderr}`); } - repoRootCache.set(currentWorkingDirectory, (cachedResult = result.stdout.trim())); + cachedResult = result.stdout.trim(); + + repoRootCache.set(currentWorkingDirectory, cachedResult); + // To ensure that calling getRepoRoot on the result is a no-op. + repoRootCache.set(cachedResult, cachedResult); } return cachedResult; @@ -270,6 +277,149 @@ export function applyWorkingTreeState( } } +/** + * Helper function for async process invocation with optional stdin support. + * @param gitPath - Path to the Git executable + * @param args - The process arguments + * @param currentWorkingDirectory - The working directory. Should be the repository root. + * @param stdin - An optional Readable stream to use as stdin to the process. + */ +async function spawnGitAsync( + gitPath: string | undefined, + args: string[], + currentWorkingDirectory: string, + stdin?: Readable +): Promise { + const spawnOptions: IExecutableSpawnOptions = { + currentWorkingDirectory, + stdio: ['pipe', 'pipe', 'pipe'] + }; + + let stdout: string = ''; + let stderr: string = ''; + + const proc: child_process.ChildProcess = Executable.spawn(gitPath || 'git', args, spawnOptions); + proc.stdout!.setEncoding('utf-8'); + proc.stderr!.setEncoding('utf-8'); + + proc.stdout!.on('data', (chunk: string) => { + stdout += chunk.toString(); + }); + proc.stderr!.on('data', (chunk: string) => { + stderr += chunk.toString(); + }); + + if (stdin) { + stdin.pipe(proc.stdin!); + } + + const [status] = await once(proc, 'exit'); + if (status !== 0) { + throw new Error(`git ${args[0]} exited with code ${status}: ${stderr}`); + } + + return stdout; +} + +/** + * Gets the object hashes for all files in the Git repo, combining the current commit with working tree state. + * Uses async operations and runs all primary Git calls in parallel. + * @param rootDirectory - The root directory of the Git repository + * @param additionalRelativePathsToHash - Root-relative file paths to have Git hash and include in the results + * @param gitPath - The path to the Git executable + * @beta + */ +export async function getRepoStateAsync( + rootDirectory: string, + additionalRelativePathsToHash?: string[], + gitPath?: string +): Promise> { + const statePromise: Promise = spawnGitAsync( + gitPath, + ['--no-optional-locks', 'ls-tree', '-r', '-z', '--full-name', 'HEAD', '--'], + rootDirectory + ).then(parseGitLsTree); + const locallyModifiedPromise: Promise> = spawnGitAsync( + gitPath, + ['--no-optional-locks', 'status', '-z', '-u', '--no-renames', '--ignore-submodules', '--'], + rootDirectory + ).then(parseGitStatus); + + const hashPaths: string[] = []; + async function* getFilesToHash(): AsyncIterableIterator { + if (additionalRelativePathsToHash) { + for (const file of additionalRelativePathsToHash) { + hashPaths.push(file); + yield `${file}\n`; + } + } + + const [{ files }, locallyModified] = await Promise.all([statePromise, locallyModifiedPromise]); + + for (const [filePath, exists] of locallyModified) { + if (exists) { + hashPaths.push(filePath); + yield `${filePath}\n`; + } else { + files.delete(filePath); + } + } + } + + const hashObjectPromise: Promise = spawnGitAsync( + gitPath, + ['--no-optional-locks', 'hash-object', '--stdin-paths'], + rootDirectory, + Readable.from(getFilesToHash(), { + encoding: 'utf-8', + objectMode: false, + autoDestroy: true + }) + ); + + const [{ files, submodules }, hashObject] = await Promise.all([ + statePromise, + hashObjectPromise, + locallyModifiedPromise + ]); + + // Existence check for the .gitmodules file + const hasSubmodules: boolean = submodules.size > 0 && FileSystem.exists(`${rootDirectory}/.gitmodules`); + + if (hasSubmodules) { + // Submodules are not the normal critical path. Accept serial performance rather than investing in complexity. + // Can revisit if submodules become more commonly used. + for (const submodulePath of submodules.keys()) { + const submoduleState: Map = await getRepoStateAsync( + `${rootDirectory}/${submodulePath}`, + [], + gitPath + ); + for (const [filePath, hash] of submoduleState) { + files.set(`${submodulePath}/${filePath}`, hash); + } + } + } + + // The result of "git hash-object" will be a list of file hashes delimited by newlines + const hashes: string[] = hashObject.trim().split('\n'); + + if (hashes.length !== hashPaths.length) { + throw new Error( + `Passed ${hashPaths.length} file paths to Git to hash, but received ${hashes.length} hashes.` + ); + } + + const len: number = hashes.length; + for (let i: number = 0; i < len; i++) { + const hash: string = hashes[i]; + const filePath: string = hashPaths[i]; + files.set(filePath, hash); + } + + return files; +} + /** * Gets the object hashes for all files in the Git repo, combining the current commit with working tree state. * @param currentWorkingDirectory - The working directory. Only used to find the repository root. diff --git a/libraries/package-deps-hash/src/index.ts b/libraries/package-deps-hash/src/index.ts index 855573b8589..49aa25f813e 100644 --- a/libraries/package-deps-hash/src/index.ts +++ b/libraries/package-deps-hash/src/index.ts @@ -19,5 +19,6 @@ export { getRepoChanges, getRepoRoot, getRepoState, + getRepoStateAsync, ensureGitMinimumVersion } from './getRepoState'; diff --git a/libraries/rush-lib/src/cli/scriptActions/PhasedScriptAction.ts b/libraries/rush-lib/src/cli/scriptActions/PhasedScriptAction.ts index 7e56d27454d..67c14ff22a5 100644 --- a/libraries/rush-lib/src/cli/scriptActions/PhasedScriptAction.ts +++ b/libraries/rush-lib/src/cli/scriptActions/PhasedScriptAction.ts @@ -353,7 +353,7 @@ export class PhasedScriptAction extends BaseScriptAction { terminal.write('Analyzing repo state... '); const repoStateStopwatch: Stopwatch = new Stopwatch(); repoStateStopwatch.start(); - projectChangeAnalyzer._ensureInitialized(terminal); + await projectChangeAnalyzer._ensureInitializedAsync(terminal); repoStateStopwatch.stop(); terminal.writeLine(`DONE (${repoStateStopwatch.toString()})`); terminal.writeLine(); diff --git a/libraries/rush-lib/src/cli/test/RushCommandLineParser.test.ts b/libraries/rush-lib/src/cli/test/RushCommandLineParser.test.ts index a458406ef6e..2ca62a05d0a 100644 --- a/libraries/rush-lib/src/cli/test/RushCommandLineParser.test.ts +++ b/libraries/rush-lib/src/cli/test/RushCommandLineParser.test.ts @@ -1,11 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. +jest.mock(`@rushstack/package-deps-hash`, () => { + return { + getRepoRoot(dir: string): string { + return dir; + }, + getRepoStateAsync(): ReadonlyMap { + return new Map(); + }, + getRepoChangesAsync(): ReadonlyMap { + return new Map(); + } + }; +}); + import './mockRushCommandLineParser'; import * as path from 'path'; import { FileSystem, JsonFile, Path, PackageJsonLookup } from '@rushstack/node-core-library'; -import { RushCommandLineParser } from '../RushCommandLineParser'; +import type { RushCommandLineParser as RushCommandLineParserType } from '../RushCommandLineParser'; import { LastLinkFlagFactory } from '../../api/LastLinkFlag'; import { Autoinstaller } from '../../logic/Autoinstaller'; import { ITelemetryData } from '../../logic/Telemetry'; @@ -31,7 +45,7 @@ interface IChildProcessModuleMock { * Interface definition for a test instance for the RushCommandLineParser. */ interface IParserTestInstance { - parser: RushCommandLineParser; + parser: RushCommandLineParserType; spawnMock: jest.Mock; } @@ -66,7 +80,10 @@ const __dirnameInLib: string = getDirnameInLib(); /** * Helper to set up a test instance for RushCommandLineParser. */ -function getCommandLineParserInstance(repoName: string, taskName: string): IParserTestInstance { +async function getCommandLineParserInstanceAsync( + repoName: string, + taskName: string +): Promise { // Run these tests in the /lib folder because some of them require compiled output // Point to the test repo folder const startPath: string = `${__dirnameInLib}/${repoName}`; @@ -76,11 +93,13 @@ function getCommandLineParserInstance(repoName: string, taskName: string): IPars FileSystem.deleteFolder(`${startPath}/a/.rush/temp`); FileSystem.deleteFolder(`${startPath}/b/.rush/temp`); + const { RushCommandLineParser } = await import('../RushCommandLineParser'); + // Create a Rush CLI instance. This instance is heavy-weight and relies on setting process.exit // to exit and clear the Rush file lock. So running multiple `it` or `describe` test blocks over the same test // repo will fail due to contention over the same lock which is kept until the test runner process // ends. - const parser: RushCommandLineParser = new RushCommandLineParser({ cwd: startPath }); + const parser: RushCommandLineParserType = new RushCommandLineParser({ cwd: startPath }); // Bulk tasks are hard-coded to expect install to have been completed. So, ensure the last-link.flag // file exists and is valid @@ -104,8 +123,8 @@ function pathEquals(actual: string, expected: string): void { const SPAWN_ARG_ARGS: number = 1; const SPAWN_ARG_OPTIONS: number = 2; -describe(RushCommandLineParser.name, () => { - describe(RushCommandLineParser.prototype.execute.name, () => { +describe('RushCommandLineParser', () => { + describe('execute', () => { afterEach(() => { jest.clearAllMocks(); }); @@ -114,7 +133,7 @@ describe(RushCommandLineParser.name, () => { describe("'build' action", () => { it(`executes the package's 'build' script`, async () => { const repoName: string = 'basicAndRunBuildActionRepo'; - const instance: IParserTestInstance = getCommandLineParserInstance(repoName, 'build'); + const instance: IParserTestInstance = await getCommandLineParserInstanceAsync(repoName, 'build'); await expect(instance.parser.execute()).resolves.toEqual(true); @@ -146,7 +165,7 @@ describe(RushCommandLineParser.name, () => { describe("'rebuild' action", () => { it(`executes the package's 'build' script`, async () => { const repoName: string = 'basicAndRunRebuildActionRepo'; - const instance: IParserTestInstance = getCommandLineParserInstance(repoName, 'rebuild'); + const instance: IParserTestInstance = await getCommandLineParserInstanceAsync(repoName, 'rebuild'); await expect(instance.parser.execute()).resolves.toEqual(true); @@ -180,7 +199,7 @@ describe(RushCommandLineParser.name, () => { describe("'build' action", () => { it(`executes the package's 'build' script`, async () => { const repoName: string = 'overrideRebuildAndRunBuildActionRepo'; - const instance: IParserTestInstance = getCommandLineParserInstance(repoName, 'build'); + const instance: IParserTestInstance = await getCommandLineParserInstanceAsync(repoName, 'build'); await expect(instance.parser.execute()).resolves.toEqual(true); @@ -212,7 +231,7 @@ describe(RushCommandLineParser.name, () => { describe("'rebuild' action", () => { it(`executes the package's 'rebuild' script`, async () => { const repoName: string = 'overrideRebuildAndRunRebuildActionRepo'; - const instance: IParserTestInstance = getCommandLineParserInstance(repoName, 'rebuild'); + const instance: IParserTestInstance = await getCommandLineParserInstanceAsync(repoName, 'rebuild'); await expect(instance.parser.execute()).resolves.toEqual(true); @@ -246,7 +265,7 @@ describe(RushCommandLineParser.name, () => { describe("'build' action", () => { it(`executes the package's 'build' script`, async () => { const repoName: string = 'overrideAndDefaultBuildActionRepo'; - const instance: IParserTestInstance = getCommandLineParserInstance(repoName, 'build'); + const instance: IParserTestInstance = await getCommandLineParserInstanceAsync(repoName, 'build'); await expect(instance.parser.execute()).resolves.toEqual(true); // There should be 1 build per package @@ -278,7 +297,7 @@ describe(RushCommandLineParser.name, () => { it(`executes the package's 'build' script`, async () => { // broken const repoName: string = 'overrideAndDefaultRebuildActionRepo'; - const instance: IParserTestInstance = getCommandLineParserInstance(repoName, 'rebuild'); + const instance: IParserTestInstance = await getCommandLineParserInstanceAsync(repoName, 'rebuild'); await expect(instance.parser.execute()).resolves.toEqual(true); // There should be 1 build per package @@ -311,9 +330,9 @@ describe(RushCommandLineParser.name, () => { it(`throws an error when starting Rush`, async () => { const repoName: string = 'overrideBuildAsGlobalCommandRepo'; - await expect(() => { - getCommandLineParserInstance(repoName, 'doesnt-matter'); - }).toThrowErrorMatchingInlineSnapshot( + await expect(async () => { + await getCommandLineParserInstanceAsync(repoName, 'doesnt-matter'); + }).rejects.toThrowErrorMatchingInlineSnapshot( `"command-line.json defines a command \\"build\\" using the command kind \\"global\\". This command can only be designated as a command kind \\"bulk\\" or \\"phased\\"."` ); }); @@ -323,9 +342,9 @@ describe(RushCommandLineParser.name, () => { it(`throws an error when starting Rush`, async () => { const repoName: string = 'overrideRebuildAsGlobalCommandRepo'; - await expect(() => { - getCommandLineParserInstance(repoName, 'doesnt-matter'); - }).toThrowErrorMatchingInlineSnapshot( + await expect(async () => { + await getCommandLineParserInstanceAsync(repoName, 'doesnt-matter'); + }).rejects.toThrowErrorMatchingInlineSnapshot( `"command-line.json defines a command \\"rebuild\\" using the command kind \\"global\\". This command can only be designated as a command kind \\"bulk\\" or \\"phased\\"."` ); }); @@ -335,9 +354,9 @@ describe(RushCommandLineParser.name, () => { it(`throws an error when starting Rush`, async () => { const repoName: string = 'overrideBuildWithSimultaneousProcessesRepo'; - await expect(() => { - getCommandLineParserInstance(repoName, 'doesnt-matter'); - }).toThrowErrorMatchingInlineSnapshot( + await expect(async () => { + await getCommandLineParserInstanceAsync(repoName, 'doesnt-matter'); + }).rejects.toThrowErrorMatchingInlineSnapshot( `"command-line.json defines a command \\"build\\" using \\"safeForSimultaneousRushProcesses=true\\". This configuration is not supported for \\"build\\"."` ); }); @@ -347,9 +366,9 @@ describe(RushCommandLineParser.name, () => { it(`throws an error when starting Rush`, async () => { const repoName: string = 'overrideRebuildWithSimultaneousProcessesRepo'; - await expect(() => { - getCommandLineParserInstance(repoName, 'doesnt-matter'); - }).toThrowErrorMatchingInlineSnapshot( + await expect(async () => { + await getCommandLineParserInstanceAsync(repoName, 'doesnt-matter'); + }).rejects.toThrowErrorMatchingInlineSnapshot( `"command-line.json defines a command \\"rebuild\\" using \\"safeForSimultaneousRushProcesses=true\\". This configuration is not supported for \\"rebuild\\"."` ); }); @@ -358,7 +377,7 @@ describe(RushCommandLineParser.name, () => { describe('in repo plugin custom flushTelemetry', () => { it('creates a custom telemetry file', async () => { const repoName: string = 'tapFlushTelemetryAndRunBuildActionRepo'; - const instance: IParserTestInstance = getCommandLineParserInstance(repoName, 'build'); + const instance: IParserTestInstance = await getCommandLineParserInstanceAsync(repoName, 'build'); const telemetryFilePath: string = `${instance.parser.rushConfiguration.commonTempFolder}/test-telemetry.json`; FileSystem.deleteFile(telemetryFilePath); diff --git a/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts b/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts index da0f2cd2413..d18edcc709d 100644 --- a/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts +++ b/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts @@ -8,11 +8,10 @@ import ignore, { Ignore } from 'ignore'; import { getRepoChanges, getRepoRoot, - getRepoState, - getGitHashForFiles, + getRepoStateAsync, IFileDiffStatus } from '@rushstack/package-deps-hash'; -import { Path, InternalError, FileSystem, ITerminal, Async } from '@rushstack/node-core-library'; +import { Path, FileSystem, ITerminal, Async } from '@rushstack/node-core-library'; import { RushConfiguration } from '../api/RushConfiguration'; import { RushProjectConfiguration } from '../api/RushProjectConfiguration'; @@ -93,7 +92,7 @@ export class ProjectChangeAnalyzer { return filteredProjectData; } - const data: IRawRepoState | undefined = this._ensureInitialized(terminal); + const data: IRawRepoState | undefined = await this._ensureInitializedAsync(terminal); if (!data) { return undefined; @@ -124,9 +123,9 @@ export class ProjectChangeAnalyzer { /** * @internal */ - public _ensureInitialized(terminal: ITerminal): IRawRepoState | undefined { + public async _ensureInitializedAsync(terminal: ITerminal): Promise { if (this._data === UNINITIALIZED) { - this._data = this._getData(terminal); + this._data = await this._getDataAsync(terminal); } return this._data; @@ -325,8 +324,8 @@ export class ProjectChangeAnalyzer { return changedProjects; } - private _getData(terminal: ITerminal): IRawRepoState { - const repoState: IGitState | undefined = this._getRepoDeps(terminal); + private async _getDataAsync(terminal: ITerminal): Promise { + const repoState: IGitState | undefined = await this._getRepoDepsAsync(terminal); if (!repoState) { // Mark as resolved, but no data return { @@ -347,44 +346,7 @@ export class ProjectChangeAnalyzer { const { hashes: repoDeps, rootDir } = repoState; // Currently, only pnpm handles project shrinkwraps - if (this._rushConfiguration.packageManager === 'pnpm') { - const projectDependencyManifestPaths: string[] = []; - - for (const project of projectHashDeps.keys()) { - const projectShrinkwrapFilePath: string = BaseProjectShrinkwrapFile.getFilePathForProject(project); - const relativeProjectShrinkwrapFilePath: string = Path.convertToSlashes( - path.relative(rootDir, projectShrinkwrapFilePath) - ); - - if (!FileSystem.exists(projectShrinkwrapFilePath)) { - throw new Error( - `A project dependency file (${relativeProjectShrinkwrapFilePath}) is missing. You may need to run ` + - '"rush install" or "rush update".' - ); - } - - projectDependencyManifestPaths.push(relativeProjectShrinkwrapFilePath); - } - - const gitPath: string = this._git.getGitPathOrThrow(); - const hashes: Map = getGitHashForFiles( - projectDependencyManifestPaths, - rootDir, - gitPath - ); - - let i: number = 0; - for (const projectDeps of projectHashDeps.values()) { - const projectDependencyManifestPath: string = projectDependencyManifestPaths[i]; - const hash: string | undefined = hashes.get(projectDependencyManifestPath); - if (hash === undefined) { - throw new InternalError(`Expected to get a hash for ${projectDependencyManifestPath}`); - } - - projectDeps.set(projectDependencyManifestPath, hash); - i++; - } - } else { + if (this._rushConfiguration.packageManager !== 'pnpm') { // Determine the current variant from the link JSON. const variant: string | undefined = this._rushConfiguration.currentInstalledVariant; @@ -434,13 +396,41 @@ export class ProjectChangeAnalyzer { } } - private _getRepoDeps(terminal: ITerminal): IGitState | undefined { + private async _getRepoDepsAsync(terminal: ITerminal): Promise { try { - if (this._git.isPathUnderGitWorkingTree()) { + const gitPath: string = this._git.getGitPathOrThrow(); + const rootDir: string | undefined = this._git.getGitInfo()?.root; + + if (rootDir) { // Load the package deps hash for the whole repository - const gitPath: string = this._git.getGitPathOrThrow(); - const rootDir: string = getRepoRoot(this._rushConfiguration.rushJsonFolder, gitPath); - const hashes: Map = getRepoState(rootDir, gitPath); + // Include project shrinkwrap files as part of the computation + const additionalFilesToHash: string[] = []; + + if (this._rushConfiguration.packageManager === 'pnpm') { + const absoluteFilePathsToCheck: string[] = []; + + for (const project of this._rushConfiguration.projects) { + const projectShrinkwrapFilePath: string = + BaseProjectShrinkwrapFile.getFilePathForProject(project); + absoluteFilePathsToCheck.push(projectShrinkwrapFilePath); + const relativeProjectShrinkwrapFilePath: string = Path.convertToSlashes( + path.relative(rootDir, projectShrinkwrapFilePath) + ); + + additionalFilesToHash.push(relativeProjectShrinkwrapFilePath); + } + + await Async.forEachAsync(absoluteFilePathsToCheck, async (filePath: string) => { + if (!(await FileSystem.existsAsync(filePath))) { + throw new Error( + `A project dependency file (${filePath}) is missing. You may need to run ` + + '"rush install" or "rush update".' + ); + } + }); + } + + const hashes: Map = await getRepoStateAsync(rootDir, additionalFilesToHash, gitPath); return { gitPath, hashes, diff --git a/libraries/rush-lib/src/logic/test/ProjectChangeAnalyzer.test.ts b/libraries/rush-lib/src/logic/test/ProjectChangeAnalyzer.test.ts index 47a5818cd52..326e1d09006 100644 --- a/libraries/rush-lib/src/logic/test/ProjectChangeAnalyzer.test.ts +++ b/libraries/rush-lib/src/logic/test/ProjectChangeAnalyzer.test.ts @@ -46,12 +46,12 @@ describe(ProjectChangeAnalyzer.name, () => { const subject: ProjectChangeAnalyzer = new ProjectChangeAnalyzer(rushConfiguration); - subject['_getRepoDeps'] = jest.fn(() => { - return { + subject['_getRepoDepsAsync'] = jest.fn(() => { + return Promise.resolve({ gitPath: 'git', hashes: files, rootDir: '' - }; + }); }); return subject; @@ -255,7 +255,7 @@ describe(ProjectChangeAnalyzer.name, () => { expect(await subject._tryGetProjectDependenciesAsync(projects[0], terminal)).toEqual( new Map([['apps/apple/core.js', 'a101']]) ); - expect(subject['_getRepoDeps']).toHaveBeenCalledTimes(1); + expect(subject['_getRepoDepsAsync']).toHaveBeenCalledTimes(1); }); }); From 230a79062cf4496a44ff45b7ca411e433b55ab75 Mon Sep 17 00:00:00 2001 From: David Michon Date: Mon, 12 Dec 2022 14:58:58 -0800 Subject: [PATCH 067/399] Remove synchronous getRepoState --- ...po-state-performance_2022-12-10-00-54.json | 4 +- common/reviews/api/package-deps-hash.api.md | 3 - .../package-deps-hash/src/getRepoState.ts | 173 ++++-------------- libraries/package-deps-hash/src/index.ts | 1 - .../src/test/getRepoDeps.test.ts | 60 ++++-- 5 files changed, 87 insertions(+), 154 deletions(-) diff --git a/common/changes/@rushstack/package-deps-hash/repo-state-performance_2022-12-10-00-54.json b/common/changes/@rushstack/package-deps-hash/repo-state-performance_2022-12-10-00-54.json index 3eb6e0f7a23..0f9b074d244 100644 --- a/common/changes/@rushstack/package-deps-hash/repo-state-performance_2022-12-10-00-54.json +++ b/common/changes/@rushstack/package-deps-hash/repo-state-performance_2022-12-10-00-54.json @@ -2,8 +2,8 @@ "changes": [ { "packageName": "@rushstack/package-deps-hash", - "comment": "Add getRepoStateAsync API for faster repository state calculation.", - "type": "minor" + "comment": "Add getRepoStateAsync API for faster repository state calculation. Remove synchronous getRepoState API.", + "type": "major" } ], "packageName": "@rushstack/package-deps-hash" diff --git a/common/reviews/api/package-deps-hash.api.md b/common/reviews/api/package-deps-hash.api.md index 372ad9455f0..def3204392e 100644 --- a/common/reviews/api/package-deps-hash.api.md +++ b/common/reviews/api/package-deps-hash.api.md @@ -19,9 +19,6 @@ export function getRepoChanges(currentWorkingDirectory: string, revision?: strin // @beta export function getRepoRoot(currentWorkingDirectory: string, gitPath?: string): string; -// @beta -export function getRepoState(currentWorkingDirectory: string, gitPath?: string): Map; - // @beta export function getRepoStateAsync(rootDirectory: string, additionalRelativePathsToHash?: string[], gitPath?: string): Promise>; diff --git a/libraries/package-deps-hash/src/getRepoState.ts b/libraries/package-deps-hash/src/getRepoState.ts index 75c0d81350a..83e59e01406 100644 --- a/libraries/package-deps-hash/src/getRepoState.ts +++ b/libraries/package-deps-hash/src/getRepoState.ts @@ -75,6 +75,40 @@ export function parseGitLsTree(output: string): IGitTreeState { }; } +/** + * Parses the output of `git hash-object` + * yields [filePath, hash] pairs. + * @internal + */ +export function* parseGitHashObject( + output: string, + filePaths: ReadonlyArray +): Iterable<[string, string]> { + output = output.trim(); + + let last: number = 0; + let i: number = 0; + let index: number = output.indexOf('\n', last); + const expected: number = filePaths.length; + for (; i < expected && index > 0; i++) { + const hash: string = output.slice(last, index); + yield [filePaths[i], hash]; + last = index + 1; + index = output.indexOf('\n', last); + } + + // Handle last line + if (index < 0) { + const hash: string = output.slice(last); + yield [filePaths[i], hash]; + i++; + } + + if (i < expected) { + throw new Error(`Expected ${expected} hashes from "git hash-object" but only received ${i}`); + } +} + /** * Information about the changes to a file. * @beta @@ -203,80 +237,6 @@ export function getRepoRoot(currentWorkingDirectory: string, gitPath?: string): return cachedResult; } -/** - * Augments the state value with modifications that are not in the index. - * @param rootDirectory - The root directory of the Git repository - * @param state - The current map of git path -> object hash. Will be mutated. - * @param gitPath - The path to the Git executable - * @internal - */ -export function applyWorkingTreeState( - rootDirectory: string, - state: Map, - gitPath?: string -): void { - const statusResult: child_process.SpawnSyncReturns = Executable.spawnSync( - gitPath || 'git', - ['--no-optional-locks', 'status', '-z', '-u', '--no-renames', '--ignore-submodules', '--'], - { - currentWorkingDirectory: rootDirectory - } - ); - - if (statusResult.status !== 0) { - ensureGitMinimumVersion(gitPath); - - throw new Error(`git status exited with status ${statusResult.status}: ${statusResult.stderr}`); - } - - const locallyModified: Map = parseGitStatus(statusResult.stdout); - - const filesToHash: string[] = []; - for (const [filePath, exists] of locallyModified) { - if (exists) { - filesToHash.push(filePath); - } else { - state.delete(filePath); - } - } - - if (filesToHash.length) { - // Use --stdin-paths arg to pass the list of files to git in order to avoid issues with - // command length - const hashObjectResult: child_process.SpawnSyncReturns = Executable.spawnSync( - gitPath || 'git', - ['hash-object', '--stdin-paths'], - { currentWorkingDirectory: rootDirectory, input: filesToHash.join('\n') } - ); - - if (hashObjectResult.status !== 0) { - ensureGitMinimumVersion(gitPath); - - throw new Error( - `git hash-object exited with status ${hashObjectResult.status}: ${hashObjectResult.stderr}` - ); - } - - const hashStdout: string = hashObjectResult.stdout.trim(); - - // The result of "git hash-object" will be a list of file hashes delimited by newlines - const hashes: string[] = hashStdout.split('\n'); - - if (hashes.length !== filesToHash.length) { - throw new Error( - `Passed ${filesToHash.length} file paths to Git to hash, but received ${hashes.length} hashes.` - ); - } - - const len: number = hashes.length; - for (let i: number = 0; i < len; i++) { - const hash: string = hashes[i]; - const filePath: string = filesToHash[i]; - state.set(filePath, hash); - } - } -} - /** * Helper function for async process invocation with optional stdin support. * @param gitPath - Path to the Git executable @@ -383,6 +343,11 @@ export async function getRepoStateAsync( locallyModifiedPromise ]); + // The result of "git hash-object" will be a list of file hashes delimited by newlines + for (const [filePath, hash] of parseGitHashObject(hashObject, hashPaths)) { + files.set(filePath, hash); + } + // Existence check for the .gitmodules file const hasSubmodules: boolean = submodules.size > 0 && FileSystem.exists(`${rootDirectory}/.gitmodules`); @@ -401,69 +366,9 @@ export async function getRepoStateAsync( } } - // The result of "git hash-object" will be a list of file hashes delimited by newlines - const hashes: string[] = hashObject.trim().split('\n'); - - if (hashes.length !== hashPaths.length) { - throw new Error( - `Passed ${hashPaths.length} file paths to Git to hash, but received ${hashes.length} hashes.` - ); - } - - const len: number = hashes.length; - for (let i: number = 0; i < len; i++) { - const hash: string = hashes[i]; - const filePath: string = hashPaths[i]; - files.set(filePath, hash); - } - return files; } -/** - * Gets the object hashes for all files in the Git repo, combining the current commit with working tree state. - * @param currentWorkingDirectory - The working directory. Only used to find the repository root. - * @param gitPath - The path to the Git executable - * @beta - */ -export function getRepoState(currentWorkingDirectory: string, gitPath?: string): Map { - const rootDirectory: string = getRepoRoot(currentWorkingDirectory, gitPath); - - const lsTreeResult: child_process.SpawnSyncReturns = Executable.spawnSync( - gitPath || 'git', - ['--no-optional-locks', 'ls-tree', '-r', '-z', '--full-name', 'HEAD', '--'], - { - currentWorkingDirectory: rootDirectory - } - ); - - if (lsTreeResult.status !== 0) { - ensureGitMinimumVersion(gitPath); - - throw new Error(`git ls-tree exited with status ${lsTreeResult.status}: ${lsTreeResult.stderr}`); - } - - const { files, submodules } = parseGitLsTree(lsTreeResult.stdout); - - applyWorkingTreeState(rootDirectory, files, gitPath); - - const state: Map = files; - - // Existence check for the .gitmodules file - const hasSubmodules: boolean = submodules.size > 0 && FileSystem.exists(`${rootDirectory}/.gitmodules`); - - if (hasSubmodules) { - for (const submodulePath of submodules.keys()) { - const submoduleState: Map = getRepoState(`${rootDirectory}/${submodulePath}`, gitPath); - for (const [filePath, hash] of submoduleState) { - state.set(`${submodulePath}/${filePath}`, hash); - } - } - } - - return state; -} - /** * Find all changed files tracked by Git, their current hashes, and the nature of the change. Only useful if all changes are staged or committed. * @param currentWorkingDirectory - The working directory. Only used to find the repository root. diff --git a/libraries/package-deps-hash/src/index.ts b/libraries/package-deps-hash/src/index.ts index 49aa25f813e..2135572b5b7 100644 --- a/libraries/package-deps-hash/src/index.ts +++ b/libraries/package-deps-hash/src/index.ts @@ -18,7 +18,6 @@ export { IFileDiffStatus, getRepoChanges, getRepoRoot, - getRepoState, getRepoStateAsync, ensureGitMinimumVersion } from './getRepoState'; diff --git a/libraries/package-deps-hash/src/test/getRepoDeps.test.ts b/libraries/package-deps-hash/src/test/getRepoDeps.test.ts index ffcf20f6141..ad300570af6 100644 --- a/libraries/package-deps-hash/src/test/getRepoDeps.test.ts +++ b/libraries/package-deps-hash/src/test/getRepoDeps.test.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import { execSync } from 'child_process'; -import { getRepoState, parseGitLsTree, getRepoRoot } from '../getRepoState'; +import { getRepoStateAsync, parseGitLsTree, getRepoRoot } from '../getRepoState'; import { FileSystem, FileConstants } from '@rushstack/node-core-library'; @@ -83,9 +83,9 @@ describe(parseGitLsTree.name, () => { }); }); -describe(getRepoState.name, () => { - it('can parse committed files', () => { - const results: Map = getRepoState(__dirname); +describe(getRepoStateAsync.name, () => { + it('can parse committed files', async () => { + const results: Map = await getRepoStateAsync(__dirname); const filteredResults: Map = getRelevantEntries(results); const expectedFiles: Map = new Map( Object.entries({ @@ -104,12 +104,12 @@ describe(getRepoState.name, () => { expect(filteredResults.size).toEqual(expectedFiles.size); }); - it('can handle adding one file', () => { + it('can handle adding one file', async () => { const tempFilePath: string = path.join(TEST_PROJECT_PATH, 'a.txt'); FileSystem.writeFile(tempFilePath, 'a'); - const results: Map = getRepoState(__dirname); + const results: Map = await getRepoStateAsync(__dirname); const filteredResults: Map = getRelevantEntries(results); try { @@ -134,14 +134,14 @@ describe(getRepoState.name, () => { } }); - it('can handle adding two files', () => { + it('can handle adding two files', async () => { const tempFilePath1: string = path.join(TEST_PROJECT_PATH, 'a.txt'); const tempFilePath2: string = path.join(TEST_PROJECT_PATH, 'b.txt'); FileSystem.writeFile(tempFilePath1, 'a'); FileSystem.writeFile(tempFilePath2, 'a'); - const results: Map = getRepoState(__dirname); + const results: Map = await getRepoStateAsync(__dirname); const filteredResults: Map = getRelevantEntries(results); try { @@ -168,12 +168,12 @@ describe(getRepoState.name, () => { } }); - it('can handle removing one file', () => { + it('can handle removing one file', async () => { const testFilePath: string = path.join(TEST_PROJECT_PATH, 'file1.txt'); FileSystem.deleteFile(testFilePath); - const results: Map = getRepoState(__dirname); + const results: Map = await getRepoStateAsync(__dirname); const filteredResults: Map = getRelevantEntries(results); try { @@ -199,12 +199,12 @@ describe(getRepoState.name, () => { } }); - it('can handle changing one file', () => { + it('can handle changing one file', async () => { const testFilePath: string = path.join(TEST_PROJECT_PATH, 'file1.txt'); FileSystem.writeFile(testFilePath, 'abc'); - const results: Map = getRepoState(__dirname); + const results: Map = await getRepoStateAsync(__dirname); const filteredResults: Map = getRelevantEntries(results); try { @@ -231,7 +231,7 @@ describe(getRepoState.name, () => { } }); - it('can handle uncommitted filenames with spaces and non-ASCII characters', () => { + it('can handle uncommitted filenames with spaces and non-ASCII characters', async () => { const tempFilePath1: string = path.join(TEST_PROJECT_PATH, 'a file.txt'); const tempFilePath2: string = path.join(TEST_PROJECT_PATH, 'a file name.txt'); const tempFilePath3: string = path.join(TEST_PROJECT_PATH, 'newFile批把.txt'); @@ -240,7 +240,7 @@ describe(getRepoState.name, () => { FileSystem.writeFile(tempFilePath2, 'a'); FileSystem.writeFile(tempFilePath3, 'a'); - const results: Map = getRepoState(__dirname); + const results: Map = await getRepoStateAsync(__dirname); const filteredResults: Map = getRelevantEntries(results); try { @@ -268,4 +268,36 @@ describe(getRepoState.name, () => { FileSystem.deleteFile(tempFilePath3); } }); + + it('handles requests for additional files', async () => { + const tempFilePath1: string = path.join(TEST_PROJECT_PATH, 'log.log'); + + FileSystem.writeFile(tempFilePath1, 'a'); + + const results: Map = await getRepoStateAsync(__dirname, [ + `${TEST_PREFIX}testProject/log.log` + ]); + const filteredResults: Map = getRelevantEntries(results); + + try { + const expectedFiles: Map = new Map( + Object.entries({ + 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', + [`nestedTestProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576', + 'testProject/file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', + 'testProject/file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb', + 'testProject/file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba', + 'testProject/log.log': '2e65efe2a145dda7ee51d1741299f848e5bf752e', + [`testProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576' + }) + ); + + for (const [filePath, hash] of expectedFiles) { + expect(filteredResults.get(filePath)).toEqual(hash); + } + expect(filteredResults.size).toEqual(expectedFiles.size); + } finally { + FileSystem.deleteFile(tempFilePath1); + } + }); }); From bcabf3f7051daf1b8162ef0d8d5496594ec8accd Mon Sep 17 00:00:00 2001 From: David Michon Date: Wed, 18 Jan 2023 14:11:31 -0800 Subject: [PATCH 068/399] Fix root directory in unit test --- .../src/test/getRepoDeps.test.ts | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/libraries/package-deps-hash/src/test/getRepoDeps.test.ts b/libraries/package-deps-hash/src/test/getRepoDeps.test.ts index ad300570af6..1c0eb9832ea 100644 --- a/libraries/package-deps-hash/src/test/getRepoDeps.test.ts +++ b/libraries/package-deps-hash/src/test/getRepoDeps.test.ts @@ -85,7 +85,8 @@ describe(parseGitLsTree.name, () => { describe(getRepoStateAsync.name, () => { it('can parse committed files', async () => { - const results: Map = await getRepoStateAsync(__dirname); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot); const filteredResults: Map = getRelevantEntries(results); const expectedFiles: Map = new Map( Object.entries({ @@ -109,7 +110,8 @@ describe(getRepoStateAsync.name, () => { FileSystem.writeFile(tempFilePath, 'a'); - const results: Map = await getRepoStateAsync(__dirname); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot); const filteredResults: Map = getRelevantEntries(results); try { @@ -141,7 +143,8 @@ describe(getRepoStateAsync.name, () => { FileSystem.writeFile(tempFilePath1, 'a'); FileSystem.writeFile(tempFilePath2, 'a'); - const results: Map = await getRepoStateAsync(__dirname); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot); const filteredResults: Map = getRelevantEntries(results); try { @@ -173,7 +176,8 @@ describe(getRepoStateAsync.name, () => { FileSystem.deleteFile(testFilePath); - const results: Map = await getRepoStateAsync(__dirname); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot); const filteredResults: Map = getRelevantEntries(results); try { @@ -204,7 +208,8 @@ describe(getRepoStateAsync.name, () => { FileSystem.writeFile(testFilePath, 'abc'); - const results: Map = await getRepoStateAsync(__dirname); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot); const filteredResults: Map = getRelevantEntries(results); try { @@ -240,7 +245,8 @@ describe(getRepoStateAsync.name, () => { FileSystem.writeFile(tempFilePath2, 'a'); FileSystem.writeFile(tempFilePath3, 'a'); - const results: Map = await getRepoStateAsync(__dirname); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot); const filteredResults: Map = getRelevantEntries(results); try { @@ -274,7 +280,8 @@ describe(getRepoStateAsync.name, () => { FileSystem.writeFile(tempFilePath1, 'a'); - const results: Map = await getRepoStateAsync(__dirname, [ + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot, [ `${TEST_PREFIX}testProject/log.log` ]); const filteredResults: Map = getRelevantEntries(results); From bfa85fcf5d8134ef23e3bcfb24bc2b26e38538cf Mon Sep 17 00:00:00 2001 From: Rushbot Date: Wed, 18 Jan 2023 22:44:13 +0000 Subject: [PATCH 069/399] Update changelogs [skip ci] --- apps/api-documenter/CHANGELOG.json | 15 +++++++++++ apps/api-documenter/CHANGELOG.md | 7 ++++- apps/api-extractor/CHANGELOG.json | 12 +++++++++ apps/api-extractor/CHANGELOG.md | 9 ++++++- apps/heft/CHANGELOG.json | 12 +++++++++ apps/heft/CHANGELOG.md | 7 ++++- apps/lockfile-explorer/CHANGELOG.json | 15 +++++++++++ apps/lockfile-explorer/CHANGELOG.md | 7 ++++- apps/rundown/CHANGELOG.json | 15 +++++++++++ apps/rundown/CHANGELOG.md | 7 ++++- apps/trace-import/CHANGELOG.json | 15 +++++++++++ apps/trace-import/CHANGELOG.md | 7 ++++- .../check-flags_2023-01-16-22-41.json | 10 ------- .../bump-terser_2023-01-18-21-53.json | 10 ------- .../heft-dev-cert-plugin/CHANGELOG.json | 24 +++++++++++++++++ .../heft-dev-cert-plugin/CHANGELOG.md | 7 ++++- heft-plugins/heft-jest-plugin/CHANGELOG.json | 18 +++++++++++++ heft-plugins/heft-jest-plugin/CHANGELOG.md | 7 ++++- heft-plugins/heft-sass-plugin/CHANGELOG.json | 24 +++++++++++++++++ heft-plugins/heft-sass-plugin/CHANGELOG.md | 7 ++++- .../CHANGELOG.json | 18 +++++++++++++ .../heft-serverless-stack-plugin/CHANGELOG.md | 7 ++++- .../heft-storybook-plugin/CHANGELOG.json | 18 +++++++++++++ .../heft-storybook-plugin/CHANGELOG.md | 7 ++++- .../heft-webpack4-plugin/CHANGELOG.json | 18 +++++++++++++ .../heft-webpack4-plugin/CHANGELOG.md | 7 ++++- .../heft-webpack5-plugin/CHANGELOG.json | 18 +++++++++++++ .../heft-webpack5-plugin/CHANGELOG.md | 7 ++++- .../debug-certificate-manager/CHANGELOG.json | 15 +++++++++++ .../debug-certificate-manager/CHANGELOG.md | 7 ++++- libraries/load-themed-styles/CHANGELOG.json | 15 +++++++++++ libraries/load-themed-styles/CHANGELOG.md | 7 ++++- .../localization-utilities/CHANGELOG.json | 18 +++++++++++++ libraries/localization-utilities/CHANGELOG.md | 7 ++++- libraries/module-minifier/CHANGELOG.json | 23 ++++++++++++++++ libraries/module-minifier/CHANGELOG.md | 9 ++++++- libraries/package-deps-hash/CHANGELOG.json | 15 +++++++++++ libraries/package-deps-hash/CHANGELOG.md | 7 ++++- libraries/stream-collator/CHANGELOG.json | 18 +++++++++++++ libraries/stream-collator/CHANGELOG.md | 7 ++++- libraries/terminal/CHANGELOG.json | 15 +++++++++++ libraries/terminal/CHANGELOG.md | 7 ++++- libraries/typings-generator/CHANGELOG.json | 15 +++++++++++ libraries/typings-generator/CHANGELOG.md | 7 ++++- libraries/worker-pool/CHANGELOG.json | 15 +++++++++++ libraries/worker-pool/CHANGELOG.md | 7 ++++- rigs/heft-node-rig/CHANGELOG.json | 21 +++++++++++++++ rigs/heft-node-rig/CHANGELOG.md | 7 ++++- rigs/heft-web-rig/CHANGELOG.json | 27 +++++++++++++++++++ rigs/heft-web-rig/CHANGELOG.md | 7 ++++- rush-plugins/rush-serve-plugin/CHANGELOG.json | 18 +++++++++++++ rush-plugins/rush-serve-plugin/CHANGELOG.md | 7 ++++- .../hashed-folder-copy-plugin/CHANGELOG.json | 21 +++++++++++++++ .../hashed-folder-copy-plugin/CHANGELOG.md | 7 ++++- .../loader-load-themed-styles/CHANGELOG.json | 21 +++++++++++++++ .../loader-load-themed-styles/CHANGELOG.md | 7 ++++- webpack/loader-raw-script/CHANGELOG.json | 15 +++++++++++ webpack/loader-raw-script/CHANGELOG.md | 7 ++++- .../CHANGELOG.json | 15 +++++++++++ .../CHANGELOG.md | 7 ++++- .../CHANGELOG.json | 21 +++++++++++++++ .../CHANGELOG.md | 7 ++++- .../webpack-plugin-utilities/CHANGELOG.json | 15 +++++++++++ webpack/webpack-plugin-utilities/CHANGELOG.md | 7 ++++- .../CHANGELOG.json | 24 +++++++++++++++++ .../webpack4-localization-plugin/CHANGELOG.md | 7 ++++- .../CHANGELOG.json | 21 +++++++++++++++ .../CHANGELOG.md | 7 ++++- .../CHANGELOG.json | 21 +++++++++++++++ .../CHANGELOG.md | 7 ++++- .../CHANGELOG.json | 18 +++++++++++++ .../webpack5-localization-plugin/CHANGELOG.md | 7 ++++- .../CHANGELOG.json | 24 +++++++++++++++++ .../CHANGELOG.md | 7 ++++- 74 files changed, 873 insertions(+), 56 deletions(-) delete mode 100644 common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json delete mode 100644 common/changes/@rushstack/module-minifier/bump-terser_2023-01-18-21-53.json diff --git a/apps/api-documenter/CHANGELOG.json b/apps/api-documenter/CHANGELOG.json index 9260ca79cc4..5c9cd718816 100644 --- a/apps/api-documenter/CHANGELOG.json +++ b/apps/api-documenter/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@microsoft/api-documenter", "entries": [ + { + "version": "7.19.28", + "tag": "@microsoft/api-documenter_v7.19.28", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "7.19.27", "tag": "@microsoft/api-documenter_v7.19.27", diff --git a/apps/api-documenter/CHANGELOG.md b/apps/api-documenter/CHANGELOG.md index 8cfe0f04a3f..60b8108497f 100644 --- a/apps/api-documenter/CHANGELOG.md +++ b/apps/api-documenter/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @microsoft/api-documenter -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 7.19.28 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 7.19.27 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/apps/api-extractor/CHANGELOG.json b/apps/api-extractor/CHANGELOG.json index 3679966fc7f..69964670c9c 100644 --- a/apps/api-extractor/CHANGELOG.json +++ b/apps/api-extractor/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@microsoft/api-extractor", "entries": [ + { + "version": "7.33.8", + "tag": "@microsoft/api-extractor_v7.33.8", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "patch": [ + { + "comment": "Use ts.getCheckFlags to fix TS 5.0" + } + ] + } + }, { "version": "7.33.7", "tag": "@microsoft/api-extractor_v7.33.7", diff --git a/apps/api-extractor/CHANGELOG.md b/apps/api-extractor/CHANGELOG.md index 63c4803d815..cc531ba4ef2 100644 --- a/apps/api-extractor/CHANGELOG.md +++ b/apps/api-extractor/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @microsoft/api-extractor -This log was last generated on Fri, 09 Dec 2022 16:18:28 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 7.33.8 +Wed, 18 Jan 2023 22:44:12 GMT + +### Patches + +- Use ts.getCheckFlags to fix TS 5.0 ## 7.33.7 Fri, 09 Dec 2022 16:18:28 GMT diff --git a/apps/heft/CHANGELOG.json b/apps/heft/CHANGELOG.json index 285854c3793..de2976036cb 100644 --- a/apps/heft/CHANGELOG.json +++ b/apps/heft/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@rushstack/heft", "entries": [ + { + "version": "0.49.1", + "tag": "@rushstack/heft_v0.49.1", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.33.8`" + } + ] + } + }, { "version": "0.49.0", "tag": "@rushstack/heft_v0.49.0", diff --git a/apps/heft/CHANGELOG.md b/apps/heft/CHANGELOG.md index 4e52b927b8d..48d9148cb95 100644 --- a/apps/heft/CHANGELOG.md +++ b/apps/heft/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/heft -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.49.1 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.49.0 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/apps/lockfile-explorer/CHANGELOG.json b/apps/lockfile-explorer/CHANGELOG.json index 68b323a757a..de29747386d 100644 --- a/apps/lockfile-explorer/CHANGELOG.json +++ b/apps/lockfile-explorer/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@rushstack/lockfile-explorer", "entries": [ + { + "version": "0.1.8", + "tag": "@rushstack/lockfile-explorer_v0.1.8", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + } + ] + } + }, { "version": "0.1.7", "tag": "@rushstack/lockfile-explorer_v0.1.7", diff --git a/apps/lockfile-explorer/CHANGELOG.md b/apps/lockfile-explorer/CHANGELOG.md index ade516ab586..3157147c98d 100644 --- a/apps/lockfile-explorer/CHANGELOG.md +++ b/apps/lockfile-explorer/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/lockfile-explorer -This log was last generated on Wed, 18 Jan 2023 05:02:16 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.1.8 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.1.7 Wed, 18 Jan 2023 05:02:16 GMT diff --git a/apps/rundown/CHANGELOG.json b/apps/rundown/CHANGELOG.json index 6c4c4e702da..5d1ccf0016e 100644 --- a/apps/rundown/CHANGELOG.json +++ b/apps/rundown/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@rushstack/rundown", "entries": [ + { + "version": "1.0.235", + "tag": "@rushstack/rundown_v1.0.235", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "1.0.234", "tag": "@rushstack/rundown_v1.0.234", diff --git a/apps/rundown/CHANGELOG.md b/apps/rundown/CHANGELOG.md index bd7420f94f5..32a9bd3a1df 100644 --- a/apps/rundown/CHANGELOG.md +++ b/apps/rundown/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/rundown -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 1.0.235 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 1.0.234 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/apps/trace-import/CHANGELOG.json b/apps/trace-import/CHANGELOG.json index b2373c2095d..3de96b3404f 100644 --- a/apps/trace-import/CHANGELOG.json +++ b/apps/trace-import/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@rushstack/trace-import", "entries": [ + { + "version": "0.1.3", + "tag": "@rushstack/trace-import_v0.1.3", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "0.1.2", "tag": "@rushstack/trace-import_v0.1.2", diff --git a/apps/trace-import/CHANGELOG.md b/apps/trace-import/CHANGELOG.md index 994d8bd875b..9ce804f40c6 100644 --- a/apps/trace-import/CHANGELOG.md +++ b/apps/trace-import/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/trace-import -This log was last generated on Tue, 20 Dec 2022 01:18:23 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.1.3 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.1.2 Tue, 20 Dec 2022 01:18:23 GMT diff --git a/common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json b/common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json deleted file mode 100644 index 917484fe346..00000000000 --- a/common/changes/@microsoft/api-extractor/check-flags_2023-01-16-22-41.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@microsoft/api-extractor", - "comment": "Use ts.getCheckFlags to fix TS 5.0", - "type": "patch" - } - ], - "packageName": "@microsoft/api-extractor" -} \ No newline at end of file diff --git a/common/changes/@rushstack/module-minifier/bump-terser_2023-01-18-21-53.json b/common/changes/@rushstack/module-minifier/bump-terser_2023-01-18-21-53.json deleted file mode 100644 index 9a7a664dbae..00000000000 --- a/common/changes/@rushstack/module-minifier/bump-terser_2023-01-18-21-53.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@rushstack/module-minifier", - "comment": "Update to terser 5.16.1", - "type": "patch" - } - ], - "packageName": "@rushstack/module-minifier" -} \ No newline at end of file diff --git a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json index 0c027eaf816..8acf80f94ca 100644 --- a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json +++ b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json @@ -1,6 +1,30 @@ { "name": "@rushstack/heft-dev-cert-plugin", "entries": [ + { + "version": "0.2.10", + "tag": "@rushstack/heft-dev-cert-plugin_v0.2.10", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.2.9`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.33.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.49.0` to `^0.49.1`" + } + ] + } + }, { "version": "0.2.9", "tag": "@rushstack/heft-dev-cert-plugin_v0.2.9", diff --git a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md index c46b3d6c57a..817ff6ca076 100644 --- a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md +++ b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/heft-dev-cert-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.2.10 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.2.9 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/heft-plugins/heft-jest-plugin/CHANGELOG.json b/heft-plugins/heft-jest-plugin/CHANGELOG.json index a4ff6a13c19..3553217290f 100644 --- a/heft-plugins/heft-jest-plugin/CHANGELOG.json +++ b/heft-plugins/heft-jest-plugin/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@rushstack/heft-jest-plugin", "entries": [ + { + "version": "0.4.3", + "tag": "@rushstack/heft-jest-plugin_v0.4.3", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.33.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.49.0` to `^0.49.1`" + } + ] + } + }, { "version": "0.4.2", "tag": "@rushstack/heft-jest-plugin_v0.4.2", diff --git a/heft-plugins/heft-jest-plugin/CHANGELOG.md b/heft-plugins/heft-jest-plugin/CHANGELOG.md index 2312dca96f4..693cb587b9d 100644 --- a/heft-plugins/heft-jest-plugin/CHANGELOG.md +++ b/heft-plugins/heft-jest-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/heft-jest-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.4.3 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.4.2 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/heft-plugins/heft-sass-plugin/CHANGELOG.json b/heft-plugins/heft-sass-plugin/CHANGELOG.json index 3d7c63a12a8..984494a049c 100644 --- a/heft-plugins/heft-sass-plugin/CHANGELOG.json +++ b/heft-plugins/heft-sass-plugin/CHANGELOG.json @@ -1,6 +1,30 @@ { "name": "@rushstack/heft-sass-plugin", "entries": [ + { + "version": "0.7.6", + "tag": "@rushstack/heft-sass-plugin_v0.7.6", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.8.15`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.33.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.49.0` to `^0.49.1`" + } + ] + } + }, { "version": "0.7.5", "tag": "@rushstack/heft-sass-plugin_v0.7.5", diff --git a/heft-plugins/heft-sass-plugin/CHANGELOG.md b/heft-plugins/heft-sass-plugin/CHANGELOG.md index 4b8897d9897..77bffca8609 100644 --- a/heft-plugins/heft-sass-plugin/CHANGELOG.md +++ b/heft-plugins/heft-sass-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/heft-sass-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.7.6 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.7.5 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json index 2465f4bb05e..9dae037a7db 100644 --- a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json +++ b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@rushstack/heft-serverless-stack-plugin", "entries": [ + { + "version": "0.1.61", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.1.61", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.49.0` to `^0.49.1`" + } + ] + } + }, { "version": "0.1.60", "tag": "@rushstack/heft-serverless-stack-plugin_v0.1.60", diff --git a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md index 6bfeeafb037..27c1d5b6b22 100644 --- a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md +++ b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/heft-serverless-stack-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.1.61 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.1.60 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/heft-plugins/heft-storybook-plugin/CHANGELOG.json b/heft-plugins/heft-storybook-plugin/CHANGELOG.json index 9b3637929f9..7883e31b3b9 100644 --- a/heft-plugins/heft-storybook-plugin/CHANGELOG.json +++ b/heft-plugins/heft-storybook-plugin/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@rushstack/heft-storybook-plugin", "entries": [ + { + "version": "0.1.95", + "tag": "@rushstack/heft-storybook-plugin_v0.1.95", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.49.0` to `^0.49.1`" + } + ] + } + }, { "version": "0.1.94", "tag": "@rushstack/heft-storybook-plugin_v0.1.94", diff --git a/heft-plugins/heft-storybook-plugin/CHANGELOG.md b/heft-plugins/heft-storybook-plugin/CHANGELOG.md index 5dbc6750a66..b4102fa1db4 100644 --- a/heft-plugins/heft-storybook-plugin/CHANGELOG.md +++ b/heft-plugins/heft-storybook-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/heft-storybook-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.1.95 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.1.94 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/heft-plugins/heft-webpack4-plugin/CHANGELOG.json b/heft-plugins/heft-webpack4-plugin/CHANGELOG.json index 857753e9c1f..4a576b60f7e 100644 --- a/heft-plugins/heft-webpack4-plugin/CHANGELOG.json +++ b/heft-plugins/heft-webpack4-plugin/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@rushstack/heft-webpack4-plugin", "entries": [ + { + "version": "0.5.32", + "tag": "@rushstack/heft-webpack4-plugin_v0.5.32", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.49.0` to `^0.49.1`" + } + ] + } + }, { "version": "0.5.31", "tag": "@rushstack/heft-webpack4-plugin_v0.5.31", diff --git a/heft-plugins/heft-webpack4-plugin/CHANGELOG.md b/heft-plugins/heft-webpack4-plugin/CHANGELOG.md index 526036c966f..abe0412e37e 100644 --- a/heft-plugins/heft-webpack4-plugin/CHANGELOG.md +++ b/heft-plugins/heft-webpack4-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/heft-webpack4-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.5.32 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.5.31 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/heft-plugins/heft-webpack5-plugin/CHANGELOG.json b/heft-plugins/heft-webpack5-plugin/CHANGELOG.json index 272f48d8f9f..c9e3b51bbcd 100644 --- a/heft-plugins/heft-webpack5-plugin/CHANGELOG.json +++ b/heft-plugins/heft-webpack5-plugin/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@rushstack/heft-webpack5-plugin", "entries": [ + { + "version": "0.5.66", + "tag": "@rushstack/heft-webpack5-plugin_v0.5.66", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.49.0` to `^0.49.1`" + } + ] + } + }, { "version": "0.5.65", "tag": "@rushstack/heft-webpack5-plugin_v0.5.65", diff --git a/heft-plugins/heft-webpack5-plugin/CHANGELOG.md b/heft-plugins/heft-webpack5-plugin/CHANGELOG.md index 7972895dd04..f63a9a0c37a 100644 --- a/heft-plugins/heft-webpack5-plugin/CHANGELOG.md +++ b/heft-plugins/heft-webpack5-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/heft-webpack5-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.5.66 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.5.65 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/libraries/debug-certificate-manager/CHANGELOG.json b/libraries/debug-certificate-manager/CHANGELOG.json index 96939d4a332..1d55e4ff504 100644 --- a/libraries/debug-certificate-manager/CHANGELOG.json +++ b/libraries/debug-certificate-manager/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@rushstack/debug-certificate-manager", "entries": [ + { + "version": "1.2.9", + "tag": "@rushstack/debug-certificate-manager_v1.2.9", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "1.2.8", "tag": "@rushstack/debug-certificate-manager_v1.2.8", diff --git a/libraries/debug-certificate-manager/CHANGELOG.md b/libraries/debug-certificate-manager/CHANGELOG.md index 38e0e443d03..f857335780b 100644 --- a/libraries/debug-certificate-manager/CHANGELOG.md +++ b/libraries/debug-certificate-manager/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/debug-certificate-manager -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 1.2.9 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 1.2.8 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/libraries/load-themed-styles/CHANGELOG.json b/libraries/load-themed-styles/CHANGELOG.json index 3287617c0f7..0dcc2acd5b9 100644 --- a/libraries/load-themed-styles/CHANGELOG.json +++ b/libraries/load-themed-styles/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@microsoft/load-themed-styles", "entries": [ + { + "version": "2.0.20", + "tag": "@microsoft/load-themed-styles_v2.0.20", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-web-rig\" to `0.12.17`" + } + ] + } + }, { "version": "2.0.19", "tag": "@microsoft/load-themed-styles_v2.0.19", diff --git a/libraries/load-themed-styles/CHANGELOG.md b/libraries/load-themed-styles/CHANGELOG.md index 76ff4762a85..b6b676d7e9d 100644 --- a/libraries/load-themed-styles/CHANGELOG.md +++ b/libraries/load-themed-styles/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @microsoft/load-themed-styles -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 2.0.20 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 2.0.19 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/libraries/localization-utilities/CHANGELOG.json b/libraries/localization-utilities/CHANGELOG.json index 92ed6732347..ac7a2692408 100644 --- a/libraries/localization-utilities/CHANGELOG.json +++ b/libraries/localization-utilities/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@rushstack/localization-utilities", "entries": [ + { + "version": "0.8.39", + "tag": "@rushstack/localization-utilities_v0.8.39", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.8.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "0.8.38", "tag": "@rushstack/localization-utilities_v0.8.38", diff --git a/libraries/localization-utilities/CHANGELOG.md b/libraries/localization-utilities/CHANGELOG.md index 81bba60d764..2ef3ce010fe 100644 --- a/libraries/localization-utilities/CHANGELOG.md +++ b/libraries/localization-utilities/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/localization-utilities -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.8.39 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.8.38 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/libraries/module-minifier/CHANGELOG.json b/libraries/module-minifier/CHANGELOG.json index d0eabbb98c3..ed9120976f7 100644 --- a/libraries/module-minifier/CHANGELOG.json +++ b/libraries/module-minifier/CHANGELOG.json @@ -1,6 +1,29 @@ { "name": "@rushstack/module-minifier", "entries": [ + { + "version": "0.1.45", + "tag": "@rushstack/module-minifier_v0.1.45", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "patch": [ + { + "comment": "Update to terser 5.16.1" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.1.45`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "0.1.44", "tag": "@rushstack/module-minifier_v0.1.44", diff --git a/libraries/module-minifier/CHANGELOG.md b/libraries/module-minifier/CHANGELOG.md index c208b81f2dd..4d290ad6007 100644 --- a/libraries/module-minifier/CHANGELOG.md +++ b/libraries/module-minifier/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @rushstack/module-minifier -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.1.45 +Wed, 18 Jan 2023 22:44:12 GMT + +### Patches + +- Update to terser 5.16.1 ## 0.1.44 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/libraries/package-deps-hash/CHANGELOG.json b/libraries/package-deps-hash/CHANGELOG.json index c50d888d71c..6e576041eb0 100644 --- a/libraries/package-deps-hash/CHANGELOG.json +++ b/libraries/package-deps-hash/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@rushstack/package-deps-hash", "entries": [ + { + "version": "3.2.67", + "tag": "@rushstack/package-deps-hash_v3.2.67", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "3.2.66", "tag": "@rushstack/package-deps-hash_v3.2.66", diff --git a/libraries/package-deps-hash/CHANGELOG.md b/libraries/package-deps-hash/CHANGELOG.md index 70ba9b64e80..e33ddd7582d 100644 --- a/libraries/package-deps-hash/CHANGELOG.md +++ b/libraries/package-deps-hash/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/package-deps-hash -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 3.2.67 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 3.2.66 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/libraries/stream-collator/CHANGELOG.json b/libraries/stream-collator/CHANGELOG.json index f2e5592ed5c..df2cb8776b7 100644 --- a/libraries/stream-collator/CHANGELOG.json +++ b/libraries/stream-collator/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@rushstack/stream-collator", "entries": [ + { + "version": "4.0.220", + "tag": "@rushstack/stream-collator_v4.0.220", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.3.89`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "4.0.219", "tag": "@rushstack/stream-collator_v4.0.219", diff --git a/libraries/stream-collator/CHANGELOG.md b/libraries/stream-collator/CHANGELOG.md index 1a45d24d6e6..642da910ad9 100644 --- a/libraries/stream-collator/CHANGELOG.md +++ b/libraries/stream-collator/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/stream-collator -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 4.0.220 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 4.0.219 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/libraries/terminal/CHANGELOG.json b/libraries/terminal/CHANGELOG.json index dd514c09bfa..f298085eb37 100644 --- a/libraries/terminal/CHANGELOG.json +++ b/libraries/terminal/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@rushstack/terminal", "entries": [ + { + "version": "0.3.89", + "tag": "@rushstack/terminal_v0.3.89", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "0.3.88", "tag": "@rushstack/terminal_v0.3.88", diff --git a/libraries/terminal/CHANGELOG.md b/libraries/terminal/CHANGELOG.md index 187c8426d09..b343d7f9fe3 100644 --- a/libraries/terminal/CHANGELOG.md +++ b/libraries/terminal/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/terminal -This log was last generated on Tue, 20 Dec 2022 01:18:23 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.3.89 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.3.88 Tue, 20 Dec 2022 01:18:23 GMT diff --git a/libraries/typings-generator/CHANGELOG.json b/libraries/typings-generator/CHANGELOG.json index ed24eecd5d2..5e1c6c098e1 100644 --- a/libraries/typings-generator/CHANGELOG.json +++ b/libraries/typings-generator/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@rushstack/typings-generator", "entries": [ + { + "version": "0.8.15", + "tag": "@rushstack/typings-generator_v0.8.15", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "0.8.14", "tag": "@rushstack/typings-generator_v0.8.14", diff --git a/libraries/typings-generator/CHANGELOG.md b/libraries/typings-generator/CHANGELOG.md index 63424ecfa66..5c17f26fe8e 100644 --- a/libraries/typings-generator/CHANGELOG.md +++ b/libraries/typings-generator/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/typings-generator -This log was last generated on Tue, 20 Dec 2022 01:18:23 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.8.15 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.8.14 Tue, 20 Dec 2022 01:18:23 GMT diff --git a/libraries/worker-pool/CHANGELOG.json b/libraries/worker-pool/CHANGELOG.json index fef2a01dc17..aadd05e9a98 100644 --- a/libraries/worker-pool/CHANGELOG.json +++ b/libraries/worker-pool/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@rushstack/worker-pool", "entries": [ + { + "version": "0.1.45", + "tag": "@rushstack/worker-pool_v0.1.45", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "0.1.44", "tag": "@rushstack/worker-pool_v0.1.44", diff --git a/libraries/worker-pool/CHANGELOG.md b/libraries/worker-pool/CHANGELOG.md index b8048b32f3e..4cbb5b69800 100644 --- a/libraries/worker-pool/CHANGELOG.md +++ b/libraries/worker-pool/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/worker-pool -This log was last generated on Tue, 20 Dec 2022 01:18:23 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.1.45 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.1.44 Tue, 20 Dec 2022 01:18:23 GMT diff --git a/rigs/heft-node-rig/CHANGELOG.json b/rigs/heft-node-rig/CHANGELOG.json index 4a9cc8e7c47..a08cc4a2a7a 100644 --- a/rigs/heft-node-rig/CHANGELOG.json +++ b/rigs/heft-node-rig/CHANGELOG.json @@ -1,6 +1,27 @@ { "name": "@rushstack/heft-node-rig", "entries": [ + { + "version": "1.11.12", + "tag": "@rushstack/heft-node-rig_v1.11.12", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.33.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.4.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.49.0` to `^0.49.1`" + } + ] + } + }, { "version": "1.11.11", "tag": "@rushstack/heft-node-rig_v1.11.11", diff --git a/rigs/heft-node-rig/CHANGELOG.md b/rigs/heft-node-rig/CHANGELOG.md index a0f0dcb9f96..7ec10c897f6 100644 --- a/rigs/heft-node-rig/CHANGELOG.md +++ b/rigs/heft-node-rig/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/heft-node-rig -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 1.11.12 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 1.11.11 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/rigs/heft-web-rig/CHANGELOG.json b/rigs/heft-web-rig/CHANGELOG.json index 51cdc028060..d6c8bed900b 100644 --- a/rigs/heft-web-rig/CHANGELOG.json +++ b/rigs/heft-web-rig/CHANGELOG.json @@ -1,6 +1,33 @@ { "name": "@rushstack/heft-web-rig", "entries": [ + { + "version": "0.12.17", + "tag": "@rushstack/heft-web-rig_v0.12.17", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.33.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.4.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.7.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.5.66`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.49.0` to `^0.49.1`" + } + ] + } + }, { "version": "0.12.16", "tag": "@rushstack/heft-web-rig_v0.12.16", diff --git a/rigs/heft-web-rig/CHANGELOG.md b/rigs/heft-web-rig/CHANGELOG.md index 849aa158884..eaf7796577a 100644 --- a/rigs/heft-web-rig/CHANGELOG.md +++ b/rigs/heft-web-rig/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/heft-web-rig -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.12.17 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.12.16 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/rush-plugins/rush-serve-plugin/CHANGELOG.json b/rush-plugins/rush-serve-plugin/CHANGELOG.json index 146ac7242a4..a9890ed94a2 100644 --- a/rush-plugins/rush-serve-plugin/CHANGELOG.json +++ b/rush-plugins/rush-serve-plugin/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@rushstack/rush-serve-plugin", "entries": [ + { + "version": "0.3.9", + "tag": "@rushstack/rush-serve-plugin_v0.3.9", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.2.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "0.3.8", "tag": "@rushstack/rush-serve-plugin_v0.3.8", diff --git a/rush-plugins/rush-serve-plugin/CHANGELOG.md b/rush-plugins/rush-serve-plugin/CHANGELOG.md index 927c86ff357..ae42e7e70df 100644 --- a/rush-plugins/rush-serve-plugin/CHANGELOG.md +++ b/rush-plugins/rush-serve-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/rush-serve-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.3.9 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.3.8 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/webpack/hashed-folder-copy-plugin/CHANGELOG.json b/webpack/hashed-folder-copy-plugin/CHANGELOG.json index 46db3868c98..c87656452eb 100644 --- a/webpack/hashed-folder-copy-plugin/CHANGELOG.json +++ b/webpack/hashed-folder-copy-plugin/CHANGELOG.json @@ -1,6 +1,27 @@ { "name": "@rushstack/hashed-folder-copy-plugin", "entries": [ + { + "version": "0.1.53", + "tag": "@rushstack/hashed-folder-copy-plugin_v0.1.53", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.1.49`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.5.66`" + } + ] + } + }, { "version": "0.1.52", "tag": "@rushstack/hashed-folder-copy-plugin_v0.1.52", diff --git a/webpack/hashed-folder-copy-plugin/CHANGELOG.md b/webpack/hashed-folder-copy-plugin/CHANGELOG.md index a5371db42bc..838a23cfe37 100644 --- a/webpack/hashed-folder-copy-plugin/CHANGELOG.md +++ b/webpack/hashed-folder-copy-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/hashed-folder-copy-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.1.53 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.1.52 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/webpack/loader-load-themed-styles/CHANGELOG.json b/webpack/loader-load-themed-styles/CHANGELOG.json index da85e9ed9af..1f1abcb1cf3 100644 --- a/webpack/loader-load-themed-styles/CHANGELOG.json +++ b/webpack/loader-load-themed-styles/CHANGELOG.json @@ -1,6 +1,27 @@ { "name": "@microsoft/loader-load-themed-styles", "entries": [ + { + "version": "2.0.18", + "tag": "@microsoft/loader-load-themed-styles_v2.0.18", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.20`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.19` to `^2.0.20`" + } + ] + } + }, { "version": "2.0.17", "tag": "@microsoft/loader-load-themed-styles_v2.0.17", diff --git a/webpack/loader-load-themed-styles/CHANGELOG.md b/webpack/loader-load-themed-styles/CHANGELOG.md index eef9d2d164d..27da63a644d 100644 --- a/webpack/loader-load-themed-styles/CHANGELOG.md +++ b/webpack/loader-load-themed-styles/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @microsoft/loader-load-themed-styles -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 2.0.18 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 2.0.17 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/webpack/loader-raw-script/CHANGELOG.json b/webpack/loader-raw-script/CHANGELOG.json index 45bae0b301f..8a8e7817518 100644 --- a/webpack/loader-raw-script/CHANGELOG.json +++ b/webpack/loader-raw-script/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@rushstack/loader-raw-script", "entries": [ + { + "version": "1.3.274", + "tag": "@rushstack/loader-raw-script_v1.3.274", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "1.3.273", "tag": "@rushstack/loader-raw-script_v1.3.273", diff --git a/webpack/loader-raw-script/CHANGELOG.md b/webpack/loader-raw-script/CHANGELOG.md index 4653ce6e383..cc5e5bc9e23 100644 --- a/webpack/loader-raw-script/CHANGELOG.md +++ b/webpack/loader-raw-script/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/loader-raw-script -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 1.3.274 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 1.3.273 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/webpack/preserve-dynamic-require-plugin/CHANGELOG.json b/webpack/preserve-dynamic-require-plugin/CHANGELOG.json index d14cafbc68b..ca69a8f04f4 100644 --- a/webpack/preserve-dynamic-require-plugin/CHANGELOG.json +++ b/webpack/preserve-dynamic-require-plugin/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@rushstack/webpack-preserve-dynamic-require-plugin", "entries": [ + { + "version": "0.9.49", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.9.49", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "0.9.48", "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.9.48", diff --git a/webpack/preserve-dynamic-require-plugin/CHANGELOG.md b/webpack/preserve-dynamic-require-plugin/CHANGELOG.md index e82e1d77169..03cd2625715 100644 --- a/webpack/preserve-dynamic-require-plugin/CHANGELOG.md +++ b/webpack/preserve-dynamic-require-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/webpack-preserve-dynamic-require-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:23 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.9.49 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.9.48 Tue, 20 Dec 2022 01:18:23 GMT diff --git a/webpack/set-webpack-public-path-plugin/CHANGELOG.json b/webpack/set-webpack-public-path-plugin/CHANGELOG.json index e6bf57cfb7f..392a04cf153 100644 --- a/webpack/set-webpack-public-path-plugin/CHANGELOG.json +++ b/webpack/set-webpack-public-path-plugin/CHANGELOG.json @@ -1,6 +1,27 @@ { "name": "@rushstack/set-webpack-public-path-plugin", "entries": [ + { + "version": "3.3.84", + "tag": "@rushstack/set-webpack-public-path-plugin_v3.3.84", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.1.49`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.5.66`" + } + ] + } + }, { "version": "3.3.83", "tag": "@rushstack/set-webpack-public-path-plugin_v3.3.83", diff --git a/webpack/set-webpack-public-path-plugin/CHANGELOG.md b/webpack/set-webpack-public-path-plugin/CHANGELOG.md index 78cc696ace8..edb9c51c190 100644 --- a/webpack/set-webpack-public-path-plugin/CHANGELOG.md +++ b/webpack/set-webpack-public-path-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/set-webpack-public-path-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 3.3.84 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 3.3.83 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/webpack/webpack-plugin-utilities/CHANGELOG.json b/webpack/webpack-plugin-utilities/CHANGELOG.json index 8fa46649190..b961cc86ae6 100644 --- a/webpack/webpack-plugin-utilities/CHANGELOG.json +++ b/webpack/webpack-plugin-utilities/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@rushstack/webpack-plugin-utilities", "entries": [ + { + "version": "0.1.49", + "tag": "@rushstack/webpack-plugin-utilities_v0.1.49", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "0.1.48", "tag": "@rushstack/webpack-plugin-utilities_v0.1.48", diff --git a/webpack/webpack-plugin-utilities/CHANGELOG.md b/webpack/webpack-plugin-utilities/CHANGELOG.md index 696e5d7064a..9da7b28bc7f 100644 --- a/webpack/webpack-plugin-utilities/CHANGELOG.md +++ b/webpack/webpack-plugin-utilities/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/webpack-plugin-utilities -This log was last generated on Tue, 20 Dec 2022 01:18:23 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.1.49 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.1.48 Tue, 20 Dec 2022 01:18:23 GMT diff --git a/webpack/webpack4-localization-plugin/CHANGELOG.json b/webpack/webpack4-localization-plugin/CHANGELOG.json index 66a55363c55..f4d3222e491 100644 --- a/webpack/webpack4-localization-plugin/CHANGELOG.json +++ b/webpack/webpack4-localization-plugin/CHANGELOG.json @@ -1,6 +1,30 @@ { "name": "@rushstack/webpack4-localization-plugin", "entries": [ + { + "version": "0.15.42", + "tag": "@rushstack/webpack4-localization-plugin_v0.15.42", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.39`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" to `3.3.84`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" from `^3.3.83` to `^3.3.84`" + } + ] + } + }, { "version": "0.15.41", "tag": "@rushstack/webpack4-localization-plugin_v0.15.41", diff --git a/webpack/webpack4-localization-plugin/CHANGELOG.md b/webpack/webpack4-localization-plugin/CHANGELOG.md index 47408537714..c8d8a1dffba 100644 --- a/webpack/webpack4-localization-plugin/CHANGELOG.md +++ b/webpack/webpack4-localization-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/webpack4-localization-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.15.42 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.15.41 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/webpack/webpack4-module-minifier-plugin/CHANGELOG.json b/webpack/webpack4-module-minifier-plugin/CHANGELOG.json index 1bcd2a429a6..7bffa1bd330 100644 --- a/webpack/webpack4-module-minifier-plugin/CHANGELOG.json +++ b/webpack/webpack4-module-minifier-plugin/CHANGELOG.json @@ -1,6 +1,27 @@ { "name": "@rushstack/webpack4-module-minifier-plugin", "entries": [ + { + "version": "0.9.44", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.9.44", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.1.45`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.1.45`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "0.9.43", "tag": "@rushstack/webpack4-module-minifier-plugin_v0.9.43", diff --git a/webpack/webpack4-module-minifier-plugin/CHANGELOG.md b/webpack/webpack4-module-minifier-plugin/CHANGELOG.md index e9d2757da01..c8fbad12b10 100644 --- a/webpack/webpack4-module-minifier-plugin/CHANGELOG.md +++ b/webpack/webpack4-module-minifier-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/webpack4-module-minifier-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.9.44 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.9.43 Tue, 20 Dec 2022 01:18:22 GMT diff --git a/webpack/webpack5-load-themed-styles-loader/CHANGELOG.json b/webpack/webpack5-load-themed-styles-loader/CHANGELOG.json index d9da6b10a2c..5bb3acc5090 100644 --- a/webpack/webpack5-load-themed-styles-loader/CHANGELOG.json +++ b/webpack/webpack5-load-themed-styles-loader/CHANGELOG.json @@ -1,6 +1,27 @@ { "name": "@microsoft/webpack5-load-themed-styles-loader", "entries": [ + { + "version": "0.1.2", + "tag": "@microsoft/webpack5-load-themed-styles-loader_v0.1.2", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.20`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.19` to `^2.0.20`" + } + ] + } + }, { "version": "0.1.1", "tag": "@microsoft/webpack5-load-themed-styles-loader_v0.1.1", diff --git a/webpack/webpack5-load-themed-styles-loader/CHANGELOG.md b/webpack/webpack5-load-themed-styles-loader/CHANGELOG.md index a09b04534a4..3efd6b9a5c3 100644 --- a/webpack/webpack5-load-themed-styles-loader/CHANGELOG.md +++ b/webpack/webpack5-load-themed-styles-loader/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @microsoft/webpack5-load-themed-styles-loader -This log was last generated on Wed, 11 Jan 2023 05:17:04 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.1.2 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.1.1 Wed, 11 Jan 2023 05:17:04 GMT diff --git a/webpack/webpack5-localization-plugin/CHANGELOG.json b/webpack/webpack5-localization-plugin/CHANGELOG.json index d5b7cff302b..9e3ebb186d7 100644 --- a/webpack/webpack5-localization-plugin/CHANGELOG.json +++ b/webpack/webpack5-localization-plugin/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@rushstack/webpack5-localization-plugin", "entries": [ + { + "version": "0.2.1", + "tag": "@rushstack/webpack5-localization-plugin_v0.2.1", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.39`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + } + ] + } + }, { "version": "0.2.0", "tag": "@rushstack/webpack5-localization-plugin_v0.2.0", diff --git a/webpack/webpack5-localization-plugin/CHANGELOG.md b/webpack/webpack5-localization-plugin/CHANGELOG.md index 2c27b22c94f..06a61c8fb67 100644 --- a/webpack/webpack5-localization-plugin/CHANGELOG.md +++ b/webpack/webpack5-localization-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/webpack5-localization-plugin -This log was last generated on Tue, 20 Dec 2022 21:56:32 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 0.2.1 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 0.2.0 Tue, 20 Dec 2022 21:56:32 GMT diff --git a/webpack/webpack5-module-minifier-plugin/CHANGELOG.json b/webpack/webpack5-module-minifier-plugin/CHANGELOG.json index 2643cf37118..8347fac006d 100644 --- a/webpack/webpack5-module-minifier-plugin/CHANGELOG.json +++ b/webpack/webpack5-module-minifier-plugin/CHANGELOG.json @@ -1,6 +1,30 @@ { "name": "@rushstack/webpack5-module-minifier-plugin", "entries": [ + { + "version": "5.1.45", + "tag": "@rushstack/webpack5-module-minifier-plugin_v5.1.45", + "date": "Wed, 18 Jan 2023 22:44:12 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.1.45`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.1.45`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" from `*` to `*`" + } + ] + } + }, { "version": "5.1.44", "tag": "@rushstack/webpack5-module-minifier-plugin_v5.1.44", diff --git a/webpack/webpack5-module-minifier-plugin/CHANGELOG.md b/webpack/webpack5-module-minifier-plugin/CHANGELOG.md index 77e16cc8953..8048f402f6b 100644 --- a/webpack/webpack5-module-minifier-plugin/CHANGELOG.md +++ b/webpack/webpack5-module-minifier-plugin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/webpack5-module-minifier-plugin -This log was last generated on Tue, 20 Dec 2022 01:18:22 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:12 GMT and should not be manually modified. + +## 5.1.45 +Wed, 18 Jan 2023 22:44:12 GMT + +_Version update only_ ## 5.1.44 Tue, 20 Dec 2022 01:18:22 GMT From 5f78cf57f66cc8e4592049c68e92911f83c1c3f9 Mon Sep 17 00:00:00 2001 From: Rushbot Date: Wed, 18 Jan 2023 22:44:16 +0000 Subject: [PATCH 070/399] Bump versions [skip ci] --- apps/api-documenter/package.json | 2 +- apps/api-extractor/package.json | 2 +- apps/heft/package.json | 2 +- apps/lockfile-explorer/package.json | 2 +- apps/rundown/package.json | 2 +- apps/trace-import/package.json | 2 +- heft-plugins/heft-dev-cert-plugin/package.json | 4 ++-- heft-plugins/heft-jest-plugin/package.json | 4 ++-- heft-plugins/heft-sass-plugin/package.json | 4 ++-- heft-plugins/heft-serverless-stack-plugin/package.json | 4 ++-- heft-plugins/heft-storybook-plugin/package.json | 4 ++-- heft-plugins/heft-webpack4-plugin/package.json | 4 ++-- heft-plugins/heft-webpack5-plugin/package.json | 4 ++-- libraries/debug-certificate-manager/package.json | 2 +- libraries/load-themed-styles/package.json | 2 +- libraries/localization-utilities/package.json | 2 +- libraries/module-minifier/package.json | 2 +- libraries/package-deps-hash/package.json | 2 +- libraries/stream-collator/package.json | 2 +- libraries/terminal/package.json | 2 +- libraries/typings-generator/package.json | 2 +- libraries/worker-pool/package.json | 2 +- rigs/heft-node-rig/package.json | 4 ++-- rigs/heft-web-rig/package.json | 4 ++-- rush-plugins/rush-serve-plugin/package.json | 2 +- webpack/hashed-folder-copy-plugin/package.json | 2 +- webpack/loader-load-themed-styles/package.json | 4 ++-- webpack/loader-raw-script/package.json | 2 +- webpack/preserve-dynamic-require-plugin/package.json | 2 +- webpack/set-webpack-public-path-plugin/package.json | 2 +- webpack/webpack-plugin-utilities/package.json | 2 +- webpack/webpack4-localization-plugin/package.json | 4 ++-- webpack/webpack4-module-minifier-plugin/package.json | 2 +- webpack/webpack5-load-themed-styles-loader/package.json | 4 ++-- webpack/webpack5-localization-plugin/package.json | 2 +- webpack/webpack5-module-minifier-plugin/package.json | 2 +- 36 files changed, 48 insertions(+), 48 deletions(-) diff --git a/apps/api-documenter/package.json b/apps/api-documenter/package.json index d49bdbba493..818f00b2a2c 100644 --- a/apps/api-documenter/package.json +++ b/apps/api-documenter/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/api-documenter", - "version": "7.19.27", + "version": "7.19.28", "description": "Read JSON files from api-extractor, generate documentation pages", "repository": { "type": "git", diff --git a/apps/api-extractor/package.json b/apps/api-extractor/package.json index dbc1372be64..58df9517b0c 100644 --- a/apps/api-extractor/package.json +++ b/apps/api-extractor/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/api-extractor", - "version": "7.33.7", + "version": "7.33.8", "description": "Analyze the exported API for a TypeScript library and generate reviews, documentation, and .d.ts rollups", "keywords": [ "typescript", diff --git a/apps/heft/package.json b/apps/heft/package.json index fda3aae8c08..5e815ee53b8 100644 --- a/apps/heft/package.json +++ b/apps/heft/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft", - "version": "0.49.0", + "version": "0.49.1", "description": "Build all your JavaScript projects the same way: A way that works.", "keywords": [ "toolchain", diff --git a/apps/lockfile-explorer/package.json b/apps/lockfile-explorer/package.json index b6c56d682f6..abfe8910947 100644 --- a/apps/lockfile-explorer/package.json +++ b/apps/lockfile-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/lockfile-explorer", - "version": "0.1.7", + "version": "0.1.8", "description": "Rush Lockfile Explorer: The UI for solving version conflicts quickly in a large monorepo", "keywords": [ "conflict", diff --git a/apps/rundown/package.json b/apps/rundown/package.json index 55a9e9bebf7..285b90bdcb7 100644 --- a/apps/rundown/package.json +++ b/apps/rundown/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rundown", - "version": "1.0.234", + "version": "1.0.235", "description": "Detect load time regressions by running an app, tracing require() calls, and generating a deterministic report", "repository": { "type": "git", diff --git a/apps/trace-import/package.json b/apps/trace-import/package.json index de68342d14c..5b94d30bd84 100644 --- a/apps/trace-import/package.json +++ b/apps/trace-import/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/trace-import", - "version": "0.1.2", + "version": "0.1.3", "description": "CLI tool for understanding how require() and \"import\" statements get resolved", "repository": { "type": "git", diff --git a/heft-plugins/heft-dev-cert-plugin/package.json b/heft-plugins/heft-dev-cert-plugin/package.json index 42c4b2b3559..3fb38825f80 100644 --- a/heft-plugins/heft-dev-cert-plugin/package.json +++ b/heft-plugins/heft-dev-cert-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-dev-cert-plugin", - "version": "0.2.9", + "version": "0.2.10", "description": "A Heft plugin for generating and using local development certificates", "repository": { "type": "git", @@ -18,7 +18,7 @@ "_phase:test": "heft test --no-build" }, "peerDependencies": { - "@rushstack/heft": "^0.49.0" + "@rushstack/heft": "^0.49.1" }, "dependencies": { "@rushstack/debug-certificate-manager": "workspace:*", diff --git a/heft-plugins/heft-jest-plugin/package.json b/heft-plugins/heft-jest-plugin/package.json index 88a40c2888a..eefa40e0d9d 100644 --- a/heft-plugins/heft-jest-plugin/package.json +++ b/heft-plugins/heft-jest-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-jest-plugin", - "version": "0.4.2", + "version": "0.4.3", "description": "Heft plugin for Jest", "repository": { "type": "git", @@ -18,7 +18,7 @@ "_phase:test": "heft test --no-build" }, "peerDependencies": { - "@rushstack/heft": "^0.49.0" + "@rushstack/heft": "^0.49.1" }, "dependencies": { "@jest/core": "~27.4.2", diff --git a/heft-plugins/heft-sass-plugin/package.json b/heft-plugins/heft-sass-plugin/package.json index af87978e12c..b87a6eaab61 100644 --- a/heft-plugins/heft-sass-plugin/package.json +++ b/heft-plugins/heft-sass-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-sass-plugin", - "version": "0.7.5", + "version": "0.7.6", "description": "Heft plugin for SASS", "repository": { "type": "git", @@ -18,7 +18,7 @@ "_phase:test": "heft test --no-build" }, "peerDependencies": { - "@rushstack/heft": "^0.49.0" + "@rushstack/heft": "^0.49.1" }, "dependencies": { "@rushstack/heft-config-file": "workspace:*", diff --git a/heft-plugins/heft-serverless-stack-plugin/package.json b/heft-plugins/heft-serverless-stack-plugin/package.json index 1e37d70ad58..6b4de35e12f 100644 --- a/heft-plugins/heft-serverless-stack-plugin/package.json +++ b/heft-plugins/heft-serverless-stack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-serverless-stack-plugin", - "version": "0.1.60", + "version": "0.1.61", "description": "Heft plugin for building apps using the Serverless Stack (SST) framework", "repository": { "type": "git", @@ -17,7 +17,7 @@ "_phase:test": "heft test --no-build" }, "peerDependencies": { - "@rushstack/heft": "^0.49.0" + "@rushstack/heft": "^0.49.1" }, "dependencies": { "@rushstack/node-core-library": "workspace:*" diff --git a/heft-plugins/heft-storybook-plugin/package.json b/heft-plugins/heft-storybook-plugin/package.json index 4b37ad22474..fae47576a7d 100644 --- a/heft-plugins/heft-storybook-plugin/package.json +++ b/heft-plugins/heft-storybook-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-storybook-plugin", - "version": "0.1.94", + "version": "0.1.95", "description": "Heft plugin for supporting UI development using Storybook", "repository": { "type": "git", @@ -18,7 +18,7 @@ "_phase:test": "heft test --no-build" }, "peerDependencies": { - "@rushstack/heft": "^0.49.0" + "@rushstack/heft": "^0.49.1" }, "dependencies": { "@rushstack/node-core-library": "workspace:*" diff --git a/heft-plugins/heft-webpack4-plugin/package.json b/heft-plugins/heft-webpack4-plugin/package.json index c9ef4d4ad4f..1b447b45981 100644 --- a/heft-plugins/heft-webpack4-plugin/package.json +++ b/heft-plugins/heft-webpack4-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-webpack4-plugin", - "version": "0.5.31", + "version": "0.5.32", "description": "Heft plugin for Webpack 4", "repository": { "type": "git", @@ -23,7 +23,7 @@ } }, "peerDependencies": { - "@rushstack/heft": "^0.49.0", + "@rushstack/heft": "^0.49.1", "@types/webpack": "^4", "webpack": "~4.44.2" }, diff --git a/heft-plugins/heft-webpack5-plugin/package.json b/heft-plugins/heft-webpack5-plugin/package.json index 08838fc974d..169c1020055 100644 --- a/heft-plugins/heft-webpack5-plugin/package.json +++ b/heft-plugins/heft-webpack5-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-webpack5-plugin", - "version": "0.5.65", + "version": "0.5.66", "description": "Heft plugin for Webpack 5", "repository": { "type": "git", @@ -18,7 +18,7 @@ "_phase:test": "heft test --no-build" }, "peerDependencies": { - "@rushstack/heft": "^0.49.0", + "@rushstack/heft": "^0.49.1", "webpack": "~5.68.0" }, "dependencies": { diff --git a/libraries/debug-certificate-manager/package.json b/libraries/debug-certificate-manager/package.json index d484a8d09ed..d58b94ac5a3 100644 --- a/libraries/debug-certificate-manager/package.json +++ b/libraries/debug-certificate-manager/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/debug-certificate-manager", - "version": "1.2.8", + "version": "1.2.9", "description": "Cross-platform functionality to create debug ssl certificates.", "main": "lib/index.js", "typings": "dist/debug-certificate-manager.d.ts", diff --git a/libraries/load-themed-styles/package.json b/libraries/load-themed-styles/package.json index cc53db94db2..9a2b20bcda0 100644 --- a/libraries/load-themed-styles/package.json +++ b/libraries/load-themed-styles/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/load-themed-styles", - "version": "2.0.19", + "version": "2.0.20", "description": "Loads themed styles.", "license": "MIT", "repository": { diff --git a/libraries/localization-utilities/package.json b/libraries/localization-utilities/package.json index bc60904fefa..6c73132651a 100644 --- a/libraries/localization-utilities/package.json +++ b/libraries/localization-utilities/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/localization-utilities", - "version": "0.8.38", + "version": "0.8.39", "description": "This plugin contains some useful functions for localization.", "main": "lib/index.js", "typings": "dist/localization-utilities.d.ts", diff --git a/libraries/module-minifier/package.json b/libraries/module-minifier/package.json index 33e4c82caa5..b777432643d 100644 --- a/libraries/module-minifier/package.json +++ b/libraries/module-minifier/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/module-minifier", - "version": "0.1.44", + "version": "0.1.45", "description": "Wrapper for terser to support bulk parallel minification.", "main": "lib/index.js", "typings": "dist/module-minifier.d.ts", diff --git a/libraries/package-deps-hash/package.json b/libraries/package-deps-hash/package.json index 60ee49d59a0..9591919b501 100644 --- a/libraries/package-deps-hash/package.json +++ b/libraries/package-deps-hash/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/package-deps-hash", - "version": "3.2.66", + "version": "3.2.67", "description": "", "main": "lib/index.js", "typings": "dist/package-deps-hash.d.ts", diff --git a/libraries/stream-collator/package.json b/libraries/stream-collator/package.json index 1116d64f0ec..206c2f3be87 100644 --- a/libraries/stream-collator/package.json +++ b/libraries/stream-collator/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/stream-collator", - "version": "4.0.219", + "version": "4.0.220", "description": "Display intelligible realtime output from concurrent processes", "repository": { "type": "git", diff --git a/libraries/terminal/package.json b/libraries/terminal/package.json index 9090748bf41..badc4a3f374 100644 --- a/libraries/terminal/package.json +++ b/libraries/terminal/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/terminal", - "version": "0.3.88", + "version": "0.3.89", "description": "User interface primitives for console applications", "main": "lib/index.js", "typings": "dist/terminal.d.ts", diff --git a/libraries/typings-generator/package.json b/libraries/typings-generator/package.json index 2b8673ad9db..336ead02789 100644 --- a/libraries/typings-generator/package.json +++ b/libraries/typings-generator/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/typings-generator", - "version": "0.8.14", + "version": "0.8.15", "description": "This library provides functionality for automatically generating typings for non-TS files.", "keywords": [ "dts", diff --git a/libraries/worker-pool/package.json b/libraries/worker-pool/package.json index da9c447af71..54def9ad7be 100644 --- a/libraries/worker-pool/package.json +++ b/libraries/worker-pool/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/worker-pool", - "version": "0.1.44", + "version": "0.1.45", "description": "Lightweight worker pool using NodeJS worker_threads", "main": "lib/index.js", "typings": "dist/worker-pool.d.ts", diff --git a/rigs/heft-node-rig/package.json b/rigs/heft-node-rig/package.json index e9119e10dc4..8ae8eed9abd 100644 --- a/rigs/heft-node-rig/package.json +++ b/rigs/heft-node-rig/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-node-rig", - "version": "1.11.11", + "version": "1.11.12", "description": "A rig package for Node.js projects that build using Heft", "license": "MIT", "scripts": { @@ -13,7 +13,7 @@ "directory": "rigs/heft-node-rig" }, "peerDependencies": { - "@rushstack/heft": "^0.49.0" + "@rushstack/heft": "^0.49.1" }, "dependencies": { "@microsoft/api-extractor": "workspace:*", diff --git a/rigs/heft-web-rig/package.json b/rigs/heft-web-rig/package.json index 672d18bf69e..48893a08d27 100644 --- a/rigs/heft-web-rig/package.json +++ b/rigs/heft-web-rig/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-web-rig", - "version": "0.12.16", + "version": "0.12.17", "description": "A rig package for web browser projects that build using Heft", "license": "MIT", "scripts": { @@ -13,7 +13,7 @@ "directory": "rigs/heft-web-rig" }, "peerDependencies": { - "@rushstack/heft": "^0.49.0" + "@rushstack/heft": "^0.49.1" }, "dependencies": { "@microsoft/api-extractor": "workspace:*", diff --git a/rush-plugins/rush-serve-plugin/package.json b/rush-plugins/rush-serve-plugin/package.json index 7f2be8c1721..1ca325eaa07 100644 --- a/rush-plugins/rush-serve-plugin/package.json +++ b/rush-plugins/rush-serve-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-serve-plugin", - "version": "0.3.8", + "version": "0.3.9", "description": "A Rush plugin that hooks into a rush action and serves output folders from all projects in the repository.", "license": "MIT", "repository": { diff --git a/webpack/hashed-folder-copy-plugin/package.json b/webpack/hashed-folder-copy-plugin/package.json index c1d20c899e2..5c603524e13 100644 --- a/webpack/hashed-folder-copy-plugin/package.json +++ b/webpack/hashed-folder-copy-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/hashed-folder-copy-plugin", - "version": "0.1.52", + "version": "0.1.53", "description": "Webpack plugin for copying a folder to the output directory with a hash in the folder name.", "typings": "dist/hashed-folder-copy-plugin.d.ts", "main": "lib/index.js", diff --git a/webpack/loader-load-themed-styles/package.json b/webpack/loader-load-themed-styles/package.json index 7903c4b0364..ce80cc3a2d7 100644 --- a/webpack/loader-load-themed-styles/package.json +++ b/webpack/loader-load-themed-styles/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/loader-load-themed-styles", - "version": "2.0.17", + "version": "2.0.18", "description": "This simple loader wraps the loading of CSS in script equivalent to `require('load-themed-styles').loadStyles( /* css text */ )`. It is designed to be a replacement for style-loader.", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -22,7 +22,7 @@ }, "peerDependencies": { "@types/webpack": "^4", - "@microsoft/load-themed-styles": "^2.0.19" + "@microsoft/load-themed-styles": "^2.0.20" }, "dependencies": { "loader-utils": "1.4.2" diff --git a/webpack/loader-raw-script/package.json b/webpack/loader-raw-script/package.json index 8ffcd9ab3c3..c51ef456ce8 100644 --- a/webpack/loader-raw-script/package.json +++ b/webpack/loader-raw-script/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/loader-raw-script", - "version": "1.3.273", + "version": "1.3.274", "description": "", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/webpack/preserve-dynamic-require-plugin/package.json b/webpack/preserve-dynamic-require-plugin/package.json index 795317170a6..d8ee99933c3 100644 --- a/webpack/preserve-dynamic-require-plugin/package.json +++ b/webpack/preserve-dynamic-require-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack-preserve-dynamic-require-plugin", - "version": "0.9.48", + "version": "0.9.49", "description": "This plugin tells webpack to leave dynamic calls to \"require\" as-is instead of trying to bundle them.", "main": "lib/index.js", "typings": "dist/webpack-preserve-dynamic-require-plugin.d.ts", diff --git a/webpack/set-webpack-public-path-plugin/package.json b/webpack/set-webpack-public-path-plugin/package.json index 3a15ea44988..ce03174e35f 100644 --- a/webpack/set-webpack-public-path-plugin/package.json +++ b/webpack/set-webpack-public-path-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/set-webpack-public-path-plugin", - "version": "3.3.83", + "version": "3.3.84", "description": "This plugin sets the webpack public path at runtime.", "main": "lib/index.js", "typings": "dist/set-webpack-public-path-plugin.d.ts", diff --git a/webpack/webpack-plugin-utilities/package.json b/webpack/webpack-plugin-utilities/package.json index d0daf23a21d..5ed18a90743 100644 --- a/webpack/webpack-plugin-utilities/package.json +++ b/webpack/webpack-plugin-utilities/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack-plugin-utilities", - "version": "0.1.48", + "version": "0.1.49", "description": "This plugin sets the webpack public path at runtime.", "main": "lib/index.js", "typings": "dist/webpack-plugin-utilities.d.ts", diff --git a/webpack/webpack4-localization-plugin/package.json b/webpack/webpack4-localization-plugin/package.json index 301d80b5dcb..cf10a9c52bb 100644 --- a/webpack/webpack4-localization-plugin/package.json +++ b/webpack/webpack4-localization-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack4-localization-plugin", - "version": "0.15.41", + "version": "0.15.42", "description": "This plugin facilitates localization with Webpack.", "main": "lib/index.js", "typings": "dist/webpack4-localization-plugin.d.ts", @@ -15,7 +15,7 @@ "_phase:build": "heft build --clean" }, "peerDependencies": { - "@rushstack/set-webpack-public-path-plugin": "^3.3.83", + "@rushstack/set-webpack-public-path-plugin": "^3.3.84", "@types/webpack": "^4.39.0", "webpack": "^4.31.0" }, diff --git a/webpack/webpack4-module-minifier-plugin/package.json b/webpack/webpack4-module-minifier-plugin/package.json index 1bd4f6e94a6..5fc4e8fd6cd 100644 --- a/webpack/webpack4-module-minifier-plugin/package.json +++ b/webpack/webpack4-module-minifier-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack4-module-minifier-plugin", - "version": "0.9.43", + "version": "0.9.44", "description": "This plugin splits minification of webpack compilations into smaller units.", "main": "lib/index.js", "typings": "dist/webpack4-module-minifier-plugin.d.ts", diff --git a/webpack/webpack5-load-themed-styles-loader/package.json b/webpack/webpack5-load-themed-styles-loader/package.json index 12aa3e98af0..48898b5faa1 100644 --- a/webpack/webpack5-load-themed-styles-loader/package.json +++ b/webpack/webpack5-load-themed-styles-loader/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/webpack5-load-themed-styles-loader", - "version": "0.1.1", + "version": "0.1.2", "description": "This simple loader wraps the loading of CSS in script equivalent to `require('load-themed-styles').loadStyles( /* css text */ )`. It is designed to be a replacement for style-loader.", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -16,7 +16,7 @@ "_phase:test": "heft test --no-build" }, "peerDependencies": { - "@microsoft/load-themed-styles": "^2.0.19", + "@microsoft/load-themed-styles": "^2.0.20", "webpack": "^5" }, "peerDependenciesMeta": { diff --git a/webpack/webpack5-localization-plugin/package.json b/webpack/webpack5-localization-plugin/package.json index 5e1e268bc51..c7694cb14e2 100644 --- a/webpack/webpack5-localization-plugin/package.json +++ b/webpack/webpack5-localization-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack5-localization-plugin", - "version": "0.2.0", + "version": "0.2.1", "description": "This plugin facilitates localization with Webpack.", "main": "lib/index.js", "typings": "dist/webpack5-localization-plugin.d.ts", diff --git a/webpack/webpack5-module-minifier-plugin/package.json b/webpack/webpack5-module-minifier-plugin/package.json index 647b67372e8..428bc370d83 100644 --- a/webpack/webpack5-module-minifier-plugin/package.json +++ b/webpack/webpack5-module-minifier-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack5-module-minifier-plugin", - "version": "5.1.44", + "version": "5.1.45", "description": "This plugin splits minification of webpack compilations into smaller units.", "main": "lib/index.js", "typings": "dist/webpack5-module-minifier-plugin.d.ts", From 31950c4c82872d27af9c52ea7b2c683023e45691 Mon Sep 17 00:00:00 2001 From: Rushbot Date: Wed, 18 Jan 2023 22:44:31 +0000 Subject: [PATCH 071/399] Update changelogs [skip ci] --- apps/rush/CHANGELOG.json | 18 ++++++++++++++++++ apps/rush/CHANGELOG.md | 11 ++++++++++- .../fix-create-scripts_2023-01-18-19-47.json | 10 ---------- ...install-run-rush-pnpm_2023-01-05-09-13.json | 10 ---------- .../rush/update-jszip_2023-01-18-19-27.json | 10 ---------- 5 files changed, 28 insertions(+), 31 deletions(-) delete mode 100644 common/changes/@microsoft/rush/fix-create-scripts_2023-01-18-19-47.json delete mode 100644 common/changes/@microsoft/rush/stekycz-install-run-rush-pnpm_2023-01-05-09-13.json delete mode 100644 common/changes/@microsoft/rush/update-jszip_2023-01-18-19-27.json diff --git a/apps/rush/CHANGELOG.json b/apps/rush/CHANGELOG.json index 609c16529d3..da624e2e328 100644 --- a/apps/rush/CHANGELOG.json +++ b/apps/rush/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@microsoft/rush", "entries": [ + { + "version": "5.88.1", + "tag": "@microsoft/rush_v5.88.1", + "date": "Wed, 18 Jan 2023 22:44:31 GMT", + "comments": { + "none": [ + { + "comment": "Fix an issue where `create-scripts.js` does not exist during `rush deploy`." + }, + { + "comment": "Add install-run-rush-pnpm.js script" + }, + { + "comment": "Update JSZip to 3.8.0." + } + ] + } + }, { "version": "5.88.0", "tag": "@microsoft/rush_v5.88.0", diff --git a/apps/rush/CHANGELOG.md b/apps/rush/CHANGELOG.md index 5ffd7f87b52..1b5a500f33a 100644 --- a/apps/rush/CHANGELOG.md +++ b/apps/rush/CHANGELOG.md @@ -1,6 +1,15 @@ # Change Log - @microsoft/rush -This log was last generated on Thu, 22 Dec 2022 20:11:58 GMT and should not be manually modified. +This log was last generated on Wed, 18 Jan 2023 22:44:31 GMT and should not be manually modified. + +## 5.88.1 +Wed, 18 Jan 2023 22:44:31 GMT + +### Updates + +- Fix an issue where `create-scripts.js` does not exist during `rush deploy`. +- Add install-run-rush-pnpm.js script +- Update JSZip to 3.8.0. ## 5.88.0 Thu, 22 Dec 2022 20:11:58 GMT diff --git a/common/changes/@microsoft/rush/fix-create-scripts_2023-01-18-19-47.json b/common/changes/@microsoft/rush/fix-create-scripts_2023-01-18-19-47.json deleted file mode 100644 index ca5afd7d589..00000000000 --- a/common/changes/@microsoft/rush/fix-create-scripts_2023-01-18-19-47.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@microsoft/rush", - "comment": "Fix an issue where `create-scripts.js` does not exist during `rush deploy`.", - "type": "none" - } - ], - "packageName": "@microsoft/rush" -} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/stekycz-install-run-rush-pnpm_2023-01-05-09-13.json b/common/changes/@microsoft/rush/stekycz-install-run-rush-pnpm_2023-01-05-09-13.json deleted file mode 100644 index d7dbe8fa2bc..00000000000 --- a/common/changes/@microsoft/rush/stekycz-install-run-rush-pnpm_2023-01-05-09-13.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@microsoft/rush", - "comment": "Add install-run-rush-pnpm.js script", - "type": "none" - } - ], - "packageName": "@microsoft/rush" -} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/update-jszip_2023-01-18-19-27.json b/common/changes/@microsoft/rush/update-jszip_2023-01-18-19-27.json deleted file mode 100644 index 19345bfc2d7..00000000000 --- a/common/changes/@microsoft/rush/update-jszip_2023-01-18-19-27.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@microsoft/rush", - "comment": "Update JSZip to 3.8.0.", - "type": "none" - } - ], - "packageName": "@microsoft/rush" -} \ No newline at end of file From 0df203de2236b475c1ff83bf30a0eaf44e77d2a3 Mon Sep 17 00:00:00 2001 From: Rushbot Date: Wed, 18 Jan 2023 22:44:32 +0000 Subject: [PATCH 072/399] Bump versions [skip ci] --- apps/rush/package.json | 2 +- common/config/rush/version-policies.json | 2 +- libraries/rush-lib/package.json | 2 +- libraries/rush-sdk/package.json | 2 +- rush-plugins/rush-amazon-s3-build-cache-plugin/package.json | 2 +- rush-plugins/rush-azure-storage-build-cache-plugin/package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/rush/package.json b/apps/rush/package.json index a9abc5c5586..f599b3c6022 100644 --- a/apps/rush/package.json +++ b/apps/rush/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/rush", - "version": "5.88.0", + "version": "5.88.1", "description": "A professional solution for consolidating all your JavaScript projects in one Git repo", "keywords": [ "install", diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json index d5c0cdd25a8..d3c684e9797 100644 --- a/common/config/rush/version-policies.json +++ b/common/config/rush/version-policies.json @@ -102,7 +102,7 @@ { "policyName": "rush", "definitionName": "lockStepVersion", - "version": "5.88.0", + "version": "5.88.1", "nextBump": "patch", "mainProject": "@microsoft/rush" } diff --git a/libraries/rush-lib/package.json b/libraries/rush-lib/package.json index 807247012cc..0667c2ae330 100644 --- a/libraries/rush-lib/package.json +++ b/libraries/rush-lib/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/rush-lib", - "version": "5.88.0", + "version": "5.88.1", "description": "A library for writing scripts that interact with the Rush tool", "repository": { "type": "git", diff --git a/libraries/rush-sdk/package.json b/libraries/rush-sdk/package.json index d278ee443da..bfe3ac0475e 100644 --- a/libraries/rush-sdk/package.json +++ b/libraries/rush-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-sdk", - "version": "5.88.0", + "version": "5.88.1", "description": "An API for interacting with the Rush engine", "repository": { "type": "git", diff --git a/rush-plugins/rush-amazon-s3-build-cache-plugin/package.json b/rush-plugins/rush-amazon-s3-build-cache-plugin/package.json index 54f9920e75d..4d93a66343a 100644 --- a/rush-plugins/rush-amazon-s3-build-cache-plugin/package.json +++ b/rush-plugins/rush-amazon-s3-build-cache-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-amazon-s3-build-cache-plugin", - "version": "5.88.0", + "version": "5.88.1", "description": "Rush plugin for Amazon S3 cloud build cache", "repository": { "type": "git", diff --git a/rush-plugins/rush-azure-storage-build-cache-plugin/package.json b/rush-plugins/rush-azure-storage-build-cache-plugin/package.json index 2e56cf3184a..a1a07c68cdf 100644 --- a/rush-plugins/rush-azure-storage-build-cache-plugin/package.json +++ b/rush-plugins/rush-azure-storage-build-cache-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-azure-storage-build-cache-plugin", - "version": "5.88.0", + "version": "5.88.1", "description": "Rush plugin for Azure storage cloud build cache", "repository": { "type": "git", From ea6716581f4bad81980e3649359aea5273991a3c Mon Sep 17 00:00:00 2001 From: William Huang Date: Wed, 18 Jan 2023 18:00:05 -0800 Subject: [PATCH 073/399] chore: fix minor styling --- .../src/containers/LockfileEntryDetailsView/index.tsx | 2 +- .../src/containers/LockfileEntryDetailsView/styles.scss | 3 +++ libraries/rush-components/src/components/Checkbox/styles.scss | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx index ea82093d4e6..e28020c3e69 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx @@ -131,7 +131,7 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => { return ReactNull; } return ( -
+
diff --git a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss index c871eabd2c2..052aba67feb 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss +++ b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/styles.scss @@ -37,8 +37,11 @@ } .DependencyDetails { + @include base.card; + padding: 0 12px; margin-top: 12px; height: 4%; + min-height: 64px; } .InfluencerEntry { diff --git a/libraries/rush-components/src/components/Checkbox/styles.scss b/libraries/rush-components/src/components/Checkbox/styles.scss index b2f05d9dafa..1d67e3398a8 100644 --- a/libraries/rush-components/src/components/Checkbox/styles.scss +++ b/libraries/rush-components/src/components/Checkbox/styles.scss @@ -8,6 +8,7 @@ button { .CheckboxRoot { background-color: white; width: 25px; + min-width: 25px; height: 25px; border-radius: 4px; display: flex; From 099c5677f9cf3750d8c7d7d89e91e5b0f93f8634 Mon Sep 17 00:00:00 2001 From: William Huang Date: Wed, 18 Jan 2023 18:01:57 -0800 Subject: [PATCH 074/399] chore: update repo state --- common/config/rush/repo-state.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index e17b4494b34..e124f953492 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "e855e70720fd11b2a139811470cd6e5221293693", + "pnpmShrinkwrapHash": "c8e43d9ff3f6e5aec0e928563ddf4a9cdf02d96b", "preferredVersionsHash": "5222ca779ae69ebfd201e39c17f48ce9eaf8c3c2" } From 06c6089918b2f79020d235297edeb186e56b9734 Mon Sep 17 00:00:00 2001 From: William Huang Date: Wed, 18 Jan 2023 18:03:29 -0800 Subject: [PATCH 075/399] chore: update repo state --- common/config/rush/repo-state.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index e124f953492..f8c06135e1a 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "c8e43d9ff3f6e5aec0e928563ddf4a9cdf02d96b", + "pnpmShrinkwrapHash": "d5d87294f303d7751845bc9af924afb4e0c73142", "preferredVersionsHash": "5222ca779ae69ebfd201e39c17f48ce9eaf8c3c2" } From a8d8f89d66537f7deac6524cf40d24239a9a42b0 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Thu, 19 Jan 2023 22:03:07 +0000 Subject: [PATCH 076/399] [rush-lib] react to pnpm v7 local install path breaking change In pnpm v7, the format of local installation paths and the hashing algorithm used to shorten paths have been changed. This PR add handling logic for pnpm v7. --- .../rush/browser-approved-packages.json | 4 +++ common/config/rush/pnpm-lock.yaml | 6 ++++ common/config/rush/repo-state.json | 2 +- libraries/rush-lib/package.json | 1 + .../src/logic/pnpm/PnpmLinkManager.ts | 34 +++++++++++++++++-- 5 files changed, 44 insertions(+), 3 deletions(-) diff --git a/common/config/rush/browser-approved-packages.json b/common/config/rush/browser-approved-packages.json index f5946fe8d28..e9b04ef6b92 100644 --- a/common/config/rush/browser-approved-packages.json +++ b/common/config/rush/browser-approved-packages.json @@ -42,6 +42,10 @@ "name": "redux", "allowedCategories": [ "libraries" ] }, + { + "name": "rfc4648", + "allowedCategories": [ "libraries" ] + }, { "name": "rxjs", "allowedCategories": [ "libraries" ] diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e24bf9f247d..9842a61ce2a 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1930,6 +1930,7 @@ importers: npm-packlist: ~2.1.2 read-package-tree: ~5.1.5 resolve: ~1.22.1 + rfc4648: ^1.5.1 rxjs: ~6.6.7 semver: ~7.3.0 ssri: ~8.0.0 @@ -1968,6 +1969,7 @@ importers: npm-packlist: 2.1.5 read-package-tree: 5.1.6 resolve: 1.22.1 + rfc4648: 1.5.2 rxjs: 6.6.7 semver: 7.3.8 ssri: 8.0.1 @@ -18369,6 +18371,10 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + /rfc4648/1.5.2: + resolution: {integrity: sha512-tLOizhR6YGovrEBLatX1sdcuhoSCXddw3mqNVAcKxGJ+J0hFeJ+SjeWCv5UPA/WU3YzWPPuCVYgXBKZUPGpKtg==} + dev: false + /rfdc/1.3.0: resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index ae39d578b00..ca32541cf24 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "046e9f54bcf081fbaf58b9e157b561be6b89e53d", + "pnpmShrinkwrapHash": "bded36f65e5bf1cca13f0dd5af44d701697472bf", "preferredVersionsHash": "5222ca779ae69ebfd201e39c17f48ce9eaf8c3c2" } diff --git a/libraries/rush-lib/package.json b/libraries/rush-lib/package.json index 0667c2ae330..529026eb396 100644 --- a/libraries/rush-lib/package.json +++ b/libraries/rush-lib/package.json @@ -51,6 +51,7 @@ "npm-packlist": "~2.1.2", "read-package-tree": "~5.1.5", "resolve": "~1.22.1", + "rfc4648": "^1.5.1", "rxjs": "~6.6.7", "semver": "~7.3.0", "ssri": "~8.0.0", diff --git a/libraries/rush-lib/src/logic/pnpm/PnpmLinkManager.ts b/libraries/rush-lib/src/logic/pnpm/PnpmLinkManager.ts index 273221771be..c63106fafd5 100644 --- a/libraries/rush-lib/src/logic/pnpm/PnpmLinkManager.ts +++ b/libraries/rush-lib/src/logic/pnpm/PnpmLinkManager.ts @@ -6,6 +6,7 @@ import * as crypto from 'crypto'; import uriEncode from 'strict-uri-encode'; import pnpmLinkBins from '@pnpm/link-bins'; import * as semver from 'semver'; +import { base32 } from 'rfc4648'; import colors from 'colors/safe'; import { @@ -217,6 +218,7 @@ export class PnpmLinkManager extends BaseLinkManager { // e.g.: C:\wbt\common\temp\node_modules\.local\C%3A%2Fwbt%2Fcommon%2Ftemp%2Fprojects%2Fapi-documenter.tgz\node_modules const pathToLocalInstallation: string = this._getPathToLocalInstallation( + tarballEntry, absolutePathToTgzFile, folderNameSuffix ); @@ -272,8 +274,12 @@ export class PnpmLinkManager extends BaseLinkManager { }); } - private _getPathToLocalInstallation(absolutePathToTgzFile: string, folderSuffix: string): string { - if (this._pnpmVersion.major >= 6) { + private _getPathToLocalInstallation( + tarballEntry: string, + absolutePathToTgzFile: string, + folderSuffix: string + ): string { + if (this._pnpmVersion.major === 6) { // PNPM 6 changed formatting to replace all ':' and '/' chars with '+'. Additionally, folder names > 120 // are trimmed and hashed. NOTE: PNPM internally uses fs.realpath.native, which will cause additional // issues in environments that do not support long paths. @@ -294,6 +300,26 @@ export class PnpmLinkManager extends BaseLinkManager { .digest('hex')}`; } + return path.join( + this._rushConfiguration.commonTempFolder, + RushConstants.nodeModulesFolderName, + '.pnpm', + folderName, + RushConstants.nodeModulesFolderName + ); + } else if (this._pnpmVersion.major >= 7) { + // PNPM 7 changed the local path format again and the hashing algorithm + // See https://github.com/pnpm/pnpm/releases/tag/v7.0.0 + // e.g.: + // file+projects+presentation-integration-tests.tgz_jsdom@11.12.0 + const specialCharRegex: RegExp = /\/|:/g; + const escapedLocalPath: string = Path.convertToSlashes(tarballEntry).replace(specialCharRegex, '+'); + let folderName: string = `${escapedLocalPath}${folderSuffix}`; + // https://github.com/pnpm/pnpm/blob/v7.0.0/packages/dependency-path/src/index.ts#L136 + if (folderName.length > 120) { + folderName = `${folderName.substring(0, 50)}_${createBase32Hash(folderName)}`; + } + return path.join( this._rushConfiguration.commonTempFolder, RushConstants.nodeModulesFolderName, @@ -377,3 +403,7 @@ export class PnpmLinkManager extends BaseLinkManager { return newLocalPackage; } } + +function createBase32Hash(str: string): string { + return base32.stringify(crypto.createHash('md5').update(str).digest()).replace(/(=+)$/, '').toLowerCase(); +} From cac2db75788037ee6560d6571b13703c8e3b0668 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Thu, 19 Jan 2023 22:07:48 +0000 Subject: [PATCH 077/399] rush change --- .../fix-pnpm-v7-local-path-3652_2023-01-19-22-06.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@microsoft/rush/fix-pnpm-v7-local-path-3652_2023-01-19-22-06.json diff --git a/common/changes/@microsoft/rush/fix-pnpm-v7-local-path-3652_2023-01-19-22-06.json b/common/changes/@microsoft/rush/fix-pnpm-v7-local-path-3652_2023-01-19-22-06.json new file mode 100644 index 00000000000..fbc33f49ffe --- /dev/null +++ b/common/changes/@microsoft/rush/fix-pnpm-v7-local-path-3652_2023-01-19-22-06.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Fix linking error due to PNPM v7 local install path breaking change", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file From d1ebe015c18f6c80ef2216792d749a8db6e3f41a Mon Sep 17 00:00:00 2001 From: David Michon Date: Thu, 19 Jan 2023 16:43:12 -0800 Subject: [PATCH 078/399] Add snapshot --- .../__snapshots__/getRepoDeps.test.ts.snap | 84 +++++++++++++++++++ .../src/test/getRepoDeps.test.ts | 16 ++++ 2 files changed, 100 insertions(+) create mode 100644 libraries/package-deps-hash/src/test/__snapshots__/getRepoDeps.test.ts.snap diff --git a/libraries/package-deps-hash/src/test/__snapshots__/getRepoDeps.test.ts.snap b/libraries/package-deps-hash/src/test/__snapshots__/getRepoDeps.test.ts.snap new file mode 100644 index 00000000000..bd9b31f19cc --- /dev/null +++ b/libraries/package-deps-hash/src/test/__snapshots__/getRepoDeps.test.ts.snap @@ -0,0 +1,84 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`getRepoStateAsync can handle adding one file 1`] = ` +Object { + "nestedTestProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", + "nestedTestProject/src/file 1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/a.txt": "2e65efe2a145dda7ee51d1741299f848e5bf752e", + "testProject/file 2.txt": "a385f754ec4fede884a4864d090064d9aeef8ccb", + "testProject/file1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/file蝴蝶.txt": "ae814af81e16cb2ae8c57503c77e2cab6b5462ba", + "testProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", +} +`; + +exports[`getRepoStateAsync can handle adding two files 1`] = ` +Object { + "nestedTestProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", + "nestedTestProject/src/file 1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/a.txt": "2e65efe2a145dda7ee51d1741299f848e5bf752e", + "testProject/b.txt": "2e65efe2a145dda7ee51d1741299f848e5bf752e", + "testProject/file 2.txt": "a385f754ec4fede884a4864d090064d9aeef8ccb", + "testProject/file1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/file蝴蝶.txt": "ae814af81e16cb2ae8c57503c77e2cab6b5462ba", + "testProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", +} +`; + +exports[`getRepoStateAsync can handle changing one file 1`] = ` +Object { + "nestedTestProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", + "nestedTestProject/src/file 1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/file 2.txt": "a385f754ec4fede884a4864d090064d9aeef8ccb", + "testProject/file1.txt": "f2ba8f84ab5c1bce84a7b441cb1959cfc7093b7f", + "testProject/file蝴蝶.txt": "ae814af81e16cb2ae8c57503c77e2cab6b5462ba", + "testProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", +} +`; + +exports[`getRepoStateAsync can handle removing one file 1`] = ` +Object { + "nestedTestProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", + "nestedTestProject/src/file 1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/file 2.txt": "a385f754ec4fede884a4864d090064d9aeef8ccb", + "testProject/file蝴蝶.txt": "ae814af81e16cb2ae8c57503c77e2cab6b5462ba", + "testProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", +} +`; + +exports[`getRepoStateAsync can handle uncommitted filenames with spaces and non-ASCII characters 1`] = ` +Object { + "nestedTestProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", + "nestedTestProject/src/file 1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/a file name.txt": "2e65efe2a145dda7ee51d1741299f848e5bf752e", + "testProject/a file.txt": "2e65efe2a145dda7ee51d1741299f848e5bf752e", + "testProject/file 2.txt": "a385f754ec4fede884a4864d090064d9aeef8ccb", + "testProject/file1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/file蝴蝶.txt": "ae814af81e16cb2ae8c57503c77e2cab6b5462ba", + "testProject/newFile批把.txt": "2e65efe2a145dda7ee51d1741299f848e5bf752e", + "testProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", +} +`; + +exports[`getRepoStateAsync can parse committed files 1`] = ` +Object { + "nestedTestProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", + "nestedTestProject/src/file 1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/file 2.txt": "a385f754ec4fede884a4864d090064d9aeef8ccb", + "testProject/file1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/file蝴蝶.txt": "ae814af81e16cb2ae8c57503c77e2cab6b5462ba", + "testProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", +} +`; + +exports[`getRepoStateAsync handles requests for additional files 1`] = ` +Object { + "nestedTestProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", + "nestedTestProject/src/file 1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/file 2.txt": "a385f754ec4fede884a4864d090064d9aeef8ccb", + "testProject/file1.txt": "c7b2f707ac99ca522f965210a7b6b0b109863f34", + "testProject/file蝴蝶.txt": "ae814af81e16cb2ae8c57503c77e2cab6b5462ba", + "testProject/log.log": "2e65efe2a145dda7ee51d1741299f848e5bf752e", + "testProject/package.json": "18a1e415e56220fa5122428a4ef8eb8874756576", +} +`; diff --git a/libraries/package-deps-hash/src/test/getRepoDeps.test.ts b/libraries/package-deps-hash/src/test/getRepoDeps.test.ts index 1c0eb9832ea..7005b2f50f3 100644 --- a/libraries/package-deps-hash/src/test/getRepoDeps.test.ts +++ b/libraries/package-deps-hash/src/test/getRepoDeps.test.ts @@ -30,6 +30,14 @@ function getRelevantEntries(results: Map): Map { return relevantResults; } +function checkSnapshot(results: Map): void { + const asObject: Record = {}; + for (const [key, value] of results) { + asObject[key] = value; + } + expect(asObject).toMatchSnapshot(); +} + describe(getRepoRoot.name, () => { it(`returns the correct directory`, () => { const root: string = getRepoRoot(__dirname); @@ -88,6 +96,7 @@ describe(getRepoStateAsync.name, () => { const repoRoot: string = getRepoRoot(__dirname); const results: Map = await getRepoStateAsync(repoRoot); const filteredResults: Map = getRelevantEntries(results); + checkSnapshot(filteredResults); const expectedFiles: Map = new Map( Object.entries({ 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', @@ -115,6 +124,7 @@ describe(getRepoStateAsync.name, () => { const filteredResults: Map = getRelevantEntries(results); try { + checkSnapshot(filteredResults); const expectedFiles: Map = new Map( Object.entries({ 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', @@ -148,6 +158,7 @@ describe(getRepoStateAsync.name, () => { const filteredResults: Map = getRelevantEntries(results); try { + checkSnapshot(filteredResults); const expectedFiles: Map = new Map( Object.entries({ 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', @@ -181,6 +192,7 @@ describe(getRepoStateAsync.name, () => { const filteredResults: Map = getRelevantEntries(results); try { + checkSnapshot(filteredResults); const expectedFiles: Map = new Map( Object.entries({ 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', @@ -213,6 +225,7 @@ describe(getRepoStateAsync.name, () => { const filteredResults: Map = getRelevantEntries(results); try { + checkSnapshot(filteredResults); const expectedFiles: Map = new Map( Object.entries({ 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', @@ -250,6 +263,8 @@ describe(getRepoStateAsync.name, () => { const filteredResults: Map = getRelevantEntries(results); try { + checkSnapshot(filteredResults); + const expectedFiles: Map = new Map( Object.entries({ 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', @@ -287,6 +302,7 @@ describe(getRepoStateAsync.name, () => { const filteredResults: Map = getRelevantEntries(results); try { + checkSnapshot(filteredResults); const expectedFiles: Map = new Map( Object.entries({ 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', From b0e0ee082702f1735122115769750b381068cb8d Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 19 Jan 2023 17:34:59 -0800 Subject: [PATCH 079/399] chore: rename to rush-themed-ui --- apps/lockfile-explorer-web/package.json | 2 +- .../src/components/ConnectionModal/index.tsx | 2 +- .../src/containers/BookmarksSidebar/index.tsx | 2 +- .../LockfileEntryDetailsView/index.tsx | 2 +- .../src/containers/LockfileViewer/index.tsx | 2 +- .../containers/PackageJsonViewer/index.tsx | 2 +- .../containers/SelectedEntryPreview/index.tsx | 2 +- .../rush/browser-approved-packages.json | 2 +- common/config/rush/pnpm-lock.yaml | 70 +++++++++---------- .../.eslintrc.js | 0 .../.npmignore | 0 .../LICENSE | 2 +- .../README.md | 2 +- .../assets/index.html | 0 .../config/heft.json | 0 .../config/jest.config.json | 0 .../config/rig.json | 0 .../package.json | 2 +- .../src/components/Button/index.tsx | 0 .../src/components/Button/styles.scss | 0 .../src/components/Checkbox/index.tsx | 0 .../src/components/Checkbox/styles.scss | 0 .../src/components/Input/index.tsx | 0 .../src/components/Input/styles.scss | 0 .../src/components/ScrollArea/index.tsx | 0 .../src/components/ScrollArea/styles.scss | 0 .../src/components/Tabs/index.tsx | 0 .../src/components/Tabs/styles.scss | 0 .../src/components/Text/index.tsx | 0 .../src/components/Text/styles.scss | 0 .../src/start.ts | 0 .../src/styles/_base.scss | 0 .../src/styles/_colors.scss | 0 .../tsconfig.json | 0 .../tsconfig.type.json | 0 .../webpack.config.js | 0 rush.json | 4 +- 37 files changed, 48 insertions(+), 48 deletions(-) rename libraries/{rush-components => rush-themed-ui}/.eslintrc.js (100%) rename libraries/{rush-components => rush-themed-ui}/.npmignore (100%) rename libraries/{rush-components => rush-themed-ui}/LICENSE (97%) rename libraries/{rush-components => rush-themed-ui}/README.md (90%) rename libraries/{rush-components => rush-themed-ui}/assets/index.html (100%) rename libraries/{rush-components => rush-themed-ui}/config/heft.json (100%) rename libraries/{rush-components => rush-themed-ui}/config/jest.config.json (100%) rename libraries/{rush-components => rush-themed-ui}/config/rig.json (100%) rename libraries/{rush-components => rush-themed-ui}/package.json (96%) rename libraries/{rush-components => rush-themed-ui}/src/components/Button/index.tsx (100%) rename libraries/{rush-components => rush-themed-ui}/src/components/Button/styles.scss (100%) rename libraries/{rush-components => rush-themed-ui}/src/components/Checkbox/index.tsx (100%) rename libraries/{rush-components => rush-themed-ui}/src/components/Checkbox/styles.scss (100%) rename libraries/{rush-components => rush-themed-ui}/src/components/Input/index.tsx (100%) rename libraries/{rush-components => rush-themed-ui}/src/components/Input/styles.scss (100%) rename libraries/{rush-components => rush-themed-ui}/src/components/ScrollArea/index.tsx (100%) rename libraries/{rush-components => rush-themed-ui}/src/components/ScrollArea/styles.scss (100%) rename libraries/{rush-components => rush-themed-ui}/src/components/Tabs/index.tsx (100%) rename libraries/{rush-components => rush-themed-ui}/src/components/Tabs/styles.scss (100%) rename libraries/{rush-components => rush-themed-ui}/src/components/Text/index.tsx (100%) rename libraries/{rush-components => rush-themed-ui}/src/components/Text/styles.scss (100%) rename libraries/{rush-components => rush-themed-ui}/src/start.ts (100%) rename libraries/{rush-components => rush-themed-ui}/src/styles/_base.scss (100%) rename libraries/{rush-components => rush-themed-ui}/src/styles/_colors.scss (100%) rename libraries/{rush-components => rush-themed-ui}/tsconfig.json (100%) rename libraries/{rush-components => rush-themed-ui}/tsconfig.type.json (100%) rename libraries/{rush-components => rush-themed-ui}/webpack.config.js (100%) diff --git a/apps/lockfile-explorer-web/package.json b/apps/lockfile-explorer-web/package.json index 24fa4692110..435e90fac14 100644 --- a/apps/lockfile-explorer-web/package.json +++ b/apps/lockfile-explorer-web/package.json @@ -19,7 +19,7 @@ "@reduxjs/toolkit": "~1.8.6", "react-redux": "~8.0.4", "redux": "~4.2.0", - "@rushstack/components": "workspace:*" + "@rushstack/rush-themed-ui": "workspace:*" }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", diff --git a/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx b/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx index 661cbb9af03..34235d795d9 100644 --- a/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx +++ b/apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import React, { useCallback, useEffect, useState } from 'react'; -import { Button, Text } from '@rushstack/components'; +import { Button, Text } from '@rushstack/rush-themed-ui'; import styles from './styles.scss'; import appStyles from '../../App.scss'; import { checkAliveAsync } from '../../parsing/getPackageFiles'; diff --git a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx index 749b084ba9e..eebd3c54643 100644 --- a/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/BookmarksSidebar/index.tsx @@ -7,7 +7,7 @@ import styles from './styles.scss'; import { useAppDispatch, useAppSelector } from '../../store/hooks'; import { LockfileEntry } from '../../parsing/LockfileEntry'; import { clearStackAndPush, removeBookmark } from '../../store/slices/entrySlice'; -import { Button, ScrollArea, Text } from '@rushstack/components'; +import { Button, ScrollArea, Text } from '@rushstack/rush-themed-ui'; export const BookmarksSidebar = (): JSX.Element => { const bookmarks = useAppSelector((state) => state.entry.bookmarkedEntries); diff --git a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx index e28020c3e69..8eb049e2043 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import React, { useCallback, useEffect, useState } from 'react'; -import { ScrollArea, Text } from '@rushstack/components'; +import { ScrollArea, Text } from '@rushstack/rush-themed-ui'; import styles from './styles.scss'; import appStyles from '../../App.scss'; import { IDependencyType, LockfileDependency } from '../../parsing/LockfileDependency'; diff --git a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx index 7c233021956..e03a47c1f17 100644 --- a/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/LockfileViewer/index.tsx @@ -13,7 +13,7 @@ import { setFilter as selectFilter } from '../../store/slices/entrySlice'; import { getFilterFromLocalStorage, saveFilterToLocalStorage } from '../../helpers/localStorage'; -import { Tabs, Checkbox, ScrollArea, Input, Text } from '@rushstack/components'; +import { Tabs, Checkbox, ScrollArea, Input, Text } from '@rushstack/rush-themed-ui'; interface ILockfileEntryGroup { entryName: string; diff --git a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx index db4e94949a1..d159dd7d342 100644 --- a/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx @@ -11,7 +11,7 @@ import { compareSpec } from '../../parsing/compareSpec'; import { loadSpecChanges } from '../../store/slices/workspaceSlice'; import { displaySpecChanges } from '../../helpers/displaySpecChanges'; import { isEntryModified } from '../../helpers/isEntryModified'; -import { ScrollArea, Tabs, Text } from '@rushstack/components'; +import { ScrollArea, Tabs, Text } from '@rushstack/rush-themed-ui'; enum PackageView { PACKAGE_JSON, diff --git a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx index c429f13d3f1..14c5ca393f9 100644 --- a/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx +++ b/apps/lockfile-explorer-web/src/containers/SelectedEntryPreview/index.tsx @@ -11,7 +11,7 @@ import { removeBookmark, selectCurrentEntry } from '../../store/slices/entrySlice'; -import { Button, ScrollArea, Text } from '@rushstack/components'; +import { Button, ScrollArea, Text } from '@rushstack/rush-themed-ui'; export const SelectedEntryPreview = (): JSX.Element => { const selectedEntry = useAppSelector(selectCurrentEntry); diff --git a/common/config/rush/browser-approved-packages.json b/common/config/rush/browser-approved-packages.json index 9daf9d4a53e..06d244c0c97 100644 --- a/common/config/rush/browser-approved-packages.json +++ b/common/config/rush/browser-approved-packages.json @@ -35,7 +35,7 @@ "allowedCategories": [ "libraries" ] }, { - "name": "@rushstack/components", + "name": "@rushstack/rush-themed-ui", "allowedCategories": [ "libraries" ] }, { diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7500be3b9bf..41f9ffe1fdf 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -190,10 +190,10 @@ importers: '@fluentui/react': ^8.96.1 '@lifaon/path': ~2.1.0 '@reduxjs/toolkit': ~1.8.6 - '@rushstack/components': workspace:* '@rushstack/eslint-config': workspace:* '@rushstack/heft': workspace:* '@rushstack/heft-web-rig': workspace:* + '@rushstack/rush-themed-ui': workspace:* '@types/heft-jest': 1.0.1 '@types/react': 16.14.23 '@types/react-dom': 16.9.14 @@ -206,7 +206,7 @@ importers: '@fluentui/react': 8.103.6_tlqvpdqnq63ssdllbmshthdmo4 '@lifaon/path': 2.1.0 '@reduxjs/toolkit': 1.8.6_qfynotfwlyrsyq662adyrweaoe - '@rushstack/components': link:../../libraries/rush-components + '@rushstack/rush-themed-ui': link:../../libraries/rush-themed-ui react: 16.13.1 react-dom: 16.13.1_react@16.13.1 react-redux: 8.0.5_6ue7j6tfp4xzdzadarjwzo6kwu @@ -1876,39 +1876,6 @@ importers: '@types/resolve': 1.20.2 ajv: 6.12.6 - ../../libraries/rush-components: - specifiers: - '@radix-ui/colors': ~0.1.8 - '@radix-ui/react-checkbox': ~1.0.1 - '@radix-ui/react-icons': ~1.1.1 - '@radix-ui/react-scroll-area': ~1.0.2 - '@radix-ui/react-tabs': ~1.0.1 - '@rushstack/eslint-config': workspace:* - '@rushstack/heft': workspace:* - '@rushstack/heft-web-rig': workspace:* - '@types/heft-jest': 1.0.1 - '@types/react': 16.14.23 - '@types/react-dom': 16.9.14 - '@types/webpack-env': 1.13.0 - react: ~16.13.1 - react-dom: ~16.13.1 - dependencies: - react: 16.13.1 - react-dom: 16.13.1_react@16.13.1 - devDependencies: - '@radix-ui/colors': 0.1.8 - '@radix-ui/react-checkbox': 1.0.1_5owmthsvj5ictknaj3ev736ofq - '@radix-ui/react-icons': 1.1.1_react@16.13.1 - '@radix-ui/react-scroll-area': 1.0.2_5owmthsvj5ictknaj3ev736ofq - '@radix-ui/react-tabs': 1.0.1_5owmthsvj5ictknaj3ev736ofq - '@rushstack/eslint-config': link:../../eslint/eslint-config - '@rushstack/heft': link:../../apps/heft - '@rushstack/heft-web-rig': link:../../rigs/heft-web-rig - '@types/heft-jest': 1.0.1 - '@types/react': 16.14.23 - '@types/react-dom': 16.9.14 - '@types/webpack-env': 1.13.0 - ../../libraries/rush-lib: specifiers: '@pnpm/link-bins': ~5.3.7 @@ -2065,6 +2032,39 @@ importers: '@types/semver': 7.3.5 '@types/webpack-env': 1.13.0 + ../../libraries/rush-themed-ui: + specifiers: + '@radix-ui/colors': ~0.1.8 + '@radix-ui/react-checkbox': ~1.0.1 + '@radix-ui/react-icons': ~1.1.1 + '@radix-ui/react-scroll-area': ~1.0.2 + '@radix-ui/react-tabs': ~1.0.1 + '@rushstack/eslint-config': workspace:* + '@rushstack/heft': workspace:* + '@rushstack/heft-web-rig': workspace:* + '@types/heft-jest': 1.0.1 + '@types/react': 16.14.23 + '@types/react-dom': 16.9.14 + '@types/webpack-env': 1.13.0 + react: ~16.13.1 + react-dom: ~16.13.1 + dependencies: + react: 16.13.1 + react-dom: 16.13.1_react@16.13.1 + devDependencies: + '@radix-ui/colors': 0.1.8 + '@radix-ui/react-checkbox': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-icons': 1.1.1_react@16.13.1 + '@radix-ui/react-scroll-area': 1.0.2_5owmthsvj5ictknaj3ev736ofq + '@radix-ui/react-tabs': 1.0.1_5owmthsvj5ictknaj3ev736ofq + '@rushstack/eslint-config': link:../../eslint/eslint-config + '@rushstack/heft': link:../../apps/heft + '@rushstack/heft-web-rig': link:../../rigs/heft-web-rig + '@types/heft-jest': 1.0.1 + '@types/react': 16.14.23 + '@types/react-dom': 16.9.14 + '@types/webpack-env': 1.13.0 + ../../libraries/rushell: specifiers: '@rushstack/eslint-config': workspace:* diff --git a/libraries/rush-components/.eslintrc.js b/libraries/rush-themed-ui/.eslintrc.js similarity index 100% rename from libraries/rush-components/.eslintrc.js rename to libraries/rush-themed-ui/.eslintrc.js diff --git a/libraries/rush-components/.npmignore b/libraries/rush-themed-ui/.npmignore similarity index 100% rename from libraries/rush-components/.npmignore rename to libraries/rush-themed-ui/.npmignore diff --git a/libraries/rush-components/LICENSE b/libraries/rush-themed-ui/LICENSE similarity index 97% rename from libraries/rush-components/LICENSE rename to libraries/rush-themed-ui/LICENSE index 52b5a97c6ff..e08fddbd337 100644 --- a/libraries/rush-components/LICENSE +++ b/libraries/rush-themed-ui/LICENSE @@ -1,4 +1,4 @@ -@rushstack/components +@rushstack/rush-themed-ui Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/libraries/rush-components/README.md b/libraries/rush-themed-ui/README.md similarity index 90% rename from libraries/rush-components/README.md rename to libraries/rush-themed-ui/README.md index f67430bd265..9681cf99c86 100644 --- a/libraries/rush-components/README.md +++ b/libraries/rush-themed-ui/README.md @@ -1,4 +1,4 @@ -# @rushstack/components +# @rushstack/rush-themed-ui **Rush Components** provides a suite of styled components that can be used in rush applications to ensure a consistent look and feel among all rushstack helper applications. diff --git a/libraries/rush-components/assets/index.html b/libraries/rush-themed-ui/assets/index.html similarity index 100% rename from libraries/rush-components/assets/index.html rename to libraries/rush-themed-ui/assets/index.html diff --git a/libraries/rush-components/config/heft.json b/libraries/rush-themed-ui/config/heft.json similarity index 100% rename from libraries/rush-components/config/heft.json rename to libraries/rush-themed-ui/config/heft.json diff --git a/libraries/rush-components/config/jest.config.json b/libraries/rush-themed-ui/config/jest.config.json similarity index 100% rename from libraries/rush-components/config/jest.config.json rename to libraries/rush-themed-ui/config/jest.config.json diff --git a/libraries/rush-components/config/rig.json b/libraries/rush-themed-ui/config/rig.json similarity index 100% rename from libraries/rush-components/config/rig.json rename to libraries/rush-themed-ui/config/rig.json diff --git a/libraries/rush-components/package.json b/libraries/rush-themed-ui/package.json similarity index 96% rename from libraries/rush-components/package.json rename to libraries/rush-themed-ui/package.json index ef52d8451ea..14056910b5d 100644 --- a/libraries/rush-components/package.json +++ b/libraries/rush-themed-ui/package.json @@ -1,5 +1,5 @@ { - "name": "@rushstack/components", + "name": "@rushstack/rush-themed-ui", "description": "Rush Component Library: a set of themed components for rush projects", "version": "0.0.0", "private": true, diff --git a/libraries/rush-components/src/components/Button/index.tsx b/libraries/rush-themed-ui/src/components/Button/index.tsx similarity index 100% rename from libraries/rush-components/src/components/Button/index.tsx rename to libraries/rush-themed-ui/src/components/Button/index.tsx diff --git a/libraries/rush-components/src/components/Button/styles.scss b/libraries/rush-themed-ui/src/components/Button/styles.scss similarity index 100% rename from libraries/rush-components/src/components/Button/styles.scss rename to libraries/rush-themed-ui/src/components/Button/styles.scss diff --git a/libraries/rush-components/src/components/Checkbox/index.tsx b/libraries/rush-themed-ui/src/components/Checkbox/index.tsx similarity index 100% rename from libraries/rush-components/src/components/Checkbox/index.tsx rename to libraries/rush-themed-ui/src/components/Checkbox/index.tsx diff --git a/libraries/rush-components/src/components/Checkbox/styles.scss b/libraries/rush-themed-ui/src/components/Checkbox/styles.scss similarity index 100% rename from libraries/rush-components/src/components/Checkbox/styles.scss rename to libraries/rush-themed-ui/src/components/Checkbox/styles.scss diff --git a/libraries/rush-components/src/components/Input/index.tsx b/libraries/rush-themed-ui/src/components/Input/index.tsx similarity index 100% rename from libraries/rush-components/src/components/Input/index.tsx rename to libraries/rush-themed-ui/src/components/Input/index.tsx diff --git a/libraries/rush-components/src/components/Input/styles.scss b/libraries/rush-themed-ui/src/components/Input/styles.scss similarity index 100% rename from libraries/rush-components/src/components/Input/styles.scss rename to libraries/rush-themed-ui/src/components/Input/styles.scss diff --git a/libraries/rush-components/src/components/ScrollArea/index.tsx b/libraries/rush-themed-ui/src/components/ScrollArea/index.tsx similarity index 100% rename from libraries/rush-components/src/components/ScrollArea/index.tsx rename to libraries/rush-themed-ui/src/components/ScrollArea/index.tsx diff --git a/libraries/rush-components/src/components/ScrollArea/styles.scss b/libraries/rush-themed-ui/src/components/ScrollArea/styles.scss similarity index 100% rename from libraries/rush-components/src/components/ScrollArea/styles.scss rename to libraries/rush-themed-ui/src/components/ScrollArea/styles.scss diff --git a/libraries/rush-components/src/components/Tabs/index.tsx b/libraries/rush-themed-ui/src/components/Tabs/index.tsx similarity index 100% rename from libraries/rush-components/src/components/Tabs/index.tsx rename to libraries/rush-themed-ui/src/components/Tabs/index.tsx diff --git a/libraries/rush-components/src/components/Tabs/styles.scss b/libraries/rush-themed-ui/src/components/Tabs/styles.scss similarity index 100% rename from libraries/rush-components/src/components/Tabs/styles.scss rename to libraries/rush-themed-ui/src/components/Tabs/styles.scss diff --git a/libraries/rush-components/src/components/Text/index.tsx b/libraries/rush-themed-ui/src/components/Text/index.tsx similarity index 100% rename from libraries/rush-components/src/components/Text/index.tsx rename to libraries/rush-themed-ui/src/components/Text/index.tsx diff --git a/libraries/rush-components/src/components/Text/styles.scss b/libraries/rush-themed-ui/src/components/Text/styles.scss similarity index 100% rename from libraries/rush-components/src/components/Text/styles.scss rename to libraries/rush-themed-ui/src/components/Text/styles.scss diff --git a/libraries/rush-components/src/start.ts b/libraries/rush-themed-ui/src/start.ts similarity index 100% rename from libraries/rush-components/src/start.ts rename to libraries/rush-themed-ui/src/start.ts diff --git a/libraries/rush-components/src/styles/_base.scss b/libraries/rush-themed-ui/src/styles/_base.scss similarity index 100% rename from libraries/rush-components/src/styles/_base.scss rename to libraries/rush-themed-ui/src/styles/_base.scss diff --git a/libraries/rush-components/src/styles/_colors.scss b/libraries/rush-themed-ui/src/styles/_colors.scss similarity index 100% rename from libraries/rush-components/src/styles/_colors.scss rename to libraries/rush-themed-ui/src/styles/_colors.scss diff --git a/libraries/rush-components/tsconfig.json b/libraries/rush-themed-ui/tsconfig.json similarity index 100% rename from libraries/rush-components/tsconfig.json rename to libraries/rush-themed-ui/tsconfig.json diff --git a/libraries/rush-components/tsconfig.type.json b/libraries/rush-themed-ui/tsconfig.type.json similarity index 100% rename from libraries/rush-components/tsconfig.type.json rename to libraries/rush-themed-ui/tsconfig.type.json diff --git a/libraries/rush-components/webpack.config.js b/libraries/rush-themed-ui/webpack.config.js similarity index 100% rename from libraries/rush-components/webpack.config.js rename to libraries/rush-themed-ui/webpack.config.js diff --git a/rush.json b/rush.json index 56c6fe5bec2..bd6da771095 100644 --- a/rush.json +++ b/rush.json @@ -431,8 +431,8 @@ "reviewCategory": "libraries" }, { - "packageName": "@rushstack/components", - "projectFolder": "libraries/rush-components", + "packageName": "@rushstack/rush-themed-ui", + "projectFolder": "libraries/rush-themed-ui", "reviewCategory": "libraries" }, { From d215d36ad4b83df1a1c5b1a735ff0f5465c6339e Mon Sep 17 00:00:00 2001 From: David Michon Date: Thu, 19 Jan 2023 17:39:33 -0800 Subject: [PATCH 080/399] remove baseline --- .../src/test/getRepoDeps.test.ts | 184 +++--------------- 1 file changed, 26 insertions(+), 158 deletions(-) diff --git a/libraries/package-deps-hash/src/test/getRepoDeps.test.ts b/libraries/package-deps-hash/src/test/getRepoDeps.test.ts index 7005b2f50f3..a47d01c8a92 100644 --- a/libraries/package-deps-hash/src/test/getRepoDeps.test.ts +++ b/libraries/package-deps-hash/src/test/getRepoDeps.test.ts @@ -6,7 +6,7 @@ import { execSync } from 'child_process'; import { getRepoStateAsync, parseGitLsTree, getRepoRoot } from '../getRepoState'; -import { FileSystem, FileConstants } from '@rushstack/node-core-library'; +import { FileSystem } from '@rushstack/node-core-library'; const SOURCE_PATH: string = path.join(__dirname).replace(path.join('lib', 'test'), path.join('src', 'test')); @@ -15,27 +15,20 @@ const TEST_PROJECT_PATH: string = path.join(SOURCE_PATH, 'testProject'); const FILTERS: string[] = [`testProject/`, `nestedTestProject/`]; -function getRelevantEntries(results: Map): Map { - const relevantResults: Map = new Map(); +function checkSnapshot(results: Map): void { + const relevantResults: Record = {}; for (const [key, hash] of results) { if (key.startsWith(TEST_PREFIX)) { const partialKey: string = key.slice(TEST_PREFIX.length); for (const filter of FILTERS) { if (partialKey.startsWith(filter)) { - relevantResults.set(partialKey, hash); + relevantResults[partialKey] = hash; } } } } - return relevantResults; -} -function checkSnapshot(results: Map): void { - const asObject: Record = {}; - for (const [key, value] of results) { - asObject[key] = value; - } - expect(asObject).toMatchSnapshot(); + expect(relevantResults).toMatchSnapshot(); } describe(getRepoRoot.name, () => { @@ -95,23 +88,7 @@ describe(getRepoStateAsync.name, () => { it('can parse committed files', async () => { const repoRoot: string = getRepoRoot(__dirname); const results: Map = await getRepoStateAsync(repoRoot); - const filteredResults: Map = getRelevantEntries(results); - checkSnapshot(filteredResults); - const expectedFiles: Map = new Map( - Object.entries({ - 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - [`nestedTestProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576', - 'testProject/file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - 'testProject/file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb', - 'testProject/file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba', - [`testProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576' - }) - ); - - for (const [filePath, hash] of expectedFiles) { - expect(filteredResults.get(filePath)).toEqual(hash); - } - expect(filteredResults.size).toEqual(expectedFiles.size); + checkSnapshot(results); }); it('can handle adding one file', async () => { @@ -119,28 +96,10 @@ describe(getRepoStateAsync.name, () => { FileSystem.writeFile(tempFilePath, 'a'); - const repoRoot: string = getRepoRoot(__dirname); - const results: Map = await getRepoStateAsync(repoRoot); - const filteredResults: Map = getRelevantEntries(results); - try { - checkSnapshot(filteredResults); - const expectedFiles: Map = new Map( - Object.entries({ - 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - [`nestedTestProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576', - 'testProject/a.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e', - 'testProject/file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - 'testProject/file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb', - 'testProject/file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba', - [`testProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576' - }) - ); - - for (const [filePath, hash] of expectedFiles) { - expect(filteredResults.get(filePath)).toEqual(hash); - } - expect(filteredResults.size).toEqual(expectedFiles.size); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot); + checkSnapshot(results); } finally { FileSystem.deleteFile(tempFilePath); } @@ -153,29 +112,10 @@ describe(getRepoStateAsync.name, () => { FileSystem.writeFile(tempFilePath1, 'a'); FileSystem.writeFile(tempFilePath2, 'a'); - const repoRoot: string = getRepoRoot(__dirname); - const results: Map = await getRepoStateAsync(repoRoot); - const filteredResults: Map = getRelevantEntries(results); - try { - checkSnapshot(filteredResults); - const expectedFiles: Map = new Map( - Object.entries({ - 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - [`nestedTestProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576', - 'testProject/a.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e', - 'testProject/b.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e', - 'testProject/file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - 'testProject/file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb', - 'testProject/file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba', - [`testProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576' - }) - ); - - for (const [filePath, hash] of expectedFiles) { - expect(filteredResults.get(filePath)).toEqual(hash); - } - expect(filteredResults.size).toEqual(expectedFiles.size); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot); + checkSnapshot(results); } finally { FileSystem.deleteFile(tempFilePath1); FileSystem.deleteFile(tempFilePath2); @@ -187,26 +127,10 @@ describe(getRepoStateAsync.name, () => { FileSystem.deleteFile(testFilePath); - const repoRoot: string = getRepoRoot(__dirname); - const results: Map = await getRepoStateAsync(repoRoot); - const filteredResults: Map = getRelevantEntries(results); - try { - checkSnapshot(filteredResults); - const expectedFiles: Map = new Map( - Object.entries({ - 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - [`nestedTestProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576', - 'testProject/file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb', - 'testProject/file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba', - [`testProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576' - }) - ); - - for (const [filePath, hash] of expectedFiles) { - expect(filteredResults.get(filePath)).toEqual(hash); - } - expect(filteredResults.size).toEqual(expectedFiles.size); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot); + checkSnapshot(results); } finally { execSync(`git checkout --force HEAD -- ${TEST_PREFIX}testProject/file1.txt`, { stdio: 'ignore', @@ -220,27 +144,10 @@ describe(getRepoStateAsync.name, () => { FileSystem.writeFile(testFilePath, 'abc'); - const repoRoot: string = getRepoRoot(__dirname); - const results: Map = await getRepoStateAsync(repoRoot); - const filteredResults: Map = getRelevantEntries(results); - try { - checkSnapshot(filteredResults); - const expectedFiles: Map = new Map( - Object.entries({ - 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - [`nestedTestProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576', - 'testProject/file1.txt': 'f2ba8f84ab5c1bce84a7b441cb1959cfc7093b7f', - 'testProject/file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb', - 'testProject/file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba', - [`testProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576' - }) - ); - - for (const [filePath, hash] of expectedFiles) { - expect(filteredResults.get(filePath)).toEqual(hash); - } - expect(filteredResults.size).toEqual(expectedFiles.size); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot); + checkSnapshot(results); } finally { execSync(`git checkout --force HEAD -- ${TEST_PREFIX}testProject/file1.txt`, { stdio: 'ignore', @@ -258,31 +165,10 @@ describe(getRepoStateAsync.name, () => { FileSystem.writeFile(tempFilePath2, 'a'); FileSystem.writeFile(tempFilePath3, 'a'); - const repoRoot: string = getRepoRoot(__dirname); - const results: Map = await getRepoStateAsync(repoRoot); - const filteredResults: Map = getRelevantEntries(results); - try { - checkSnapshot(filteredResults); - - const expectedFiles: Map = new Map( - Object.entries({ - 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - [`nestedTestProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576', - 'testProject/a file.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e', - 'testProject/a file name.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e', - 'testProject/file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - 'testProject/file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb', - 'testProject/file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba', - 'testProject/newFile批把.txt': '2e65efe2a145dda7ee51d1741299f848e5bf752e', - [`testProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576' - }) - ); - - for (const [filePath, hash] of expectedFiles) { - expect(filteredResults.get(filePath)).toEqual(hash); - } - expect(filteredResults.size).toEqual(expectedFiles.size); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot); + checkSnapshot(results); } finally { FileSystem.deleteFile(tempFilePath1); FileSystem.deleteFile(tempFilePath2); @@ -295,30 +181,12 @@ describe(getRepoStateAsync.name, () => { FileSystem.writeFile(tempFilePath1, 'a'); - const repoRoot: string = getRepoRoot(__dirname); - const results: Map = await getRepoStateAsync(repoRoot, [ - `${TEST_PREFIX}testProject/log.log` - ]); - const filteredResults: Map = getRelevantEntries(results); - try { - checkSnapshot(filteredResults); - const expectedFiles: Map = new Map( - Object.entries({ - 'nestedTestProject/src/file 1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - [`nestedTestProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576', - 'testProject/file1.txt': 'c7b2f707ac99ca522f965210a7b6b0b109863f34', - 'testProject/file 2.txt': 'a385f754ec4fede884a4864d090064d9aeef8ccb', - 'testProject/file蝴蝶.txt': 'ae814af81e16cb2ae8c57503c77e2cab6b5462ba', - 'testProject/log.log': '2e65efe2a145dda7ee51d1741299f848e5bf752e', - [`testProject/${FileConstants.PackageJson}`]: '18a1e415e56220fa5122428a4ef8eb8874756576' - }) - ); - - for (const [filePath, hash] of expectedFiles) { - expect(filteredResults.get(filePath)).toEqual(hash); - } - expect(filteredResults.size).toEqual(expectedFiles.size); + const repoRoot: string = getRepoRoot(__dirname); + const results: Map = await getRepoStateAsync(repoRoot, [ + `${TEST_PREFIX}testProject/log.log` + ]); + checkSnapshot(results); } finally { FileSystem.deleteFile(tempFilePath1); } From 550ed8cb4f9476da97dc0577bf0bb4402d7da293 Mon Sep 17 00:00:00 2001 From: William Huang Date: Thu, 19 Jan 2023 19:48:28 -0800 Subject: [PATCH 081/399] chore: update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2970f83e81f..093550ef5a1 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ These GitHub repositories provide supplementary resources for Rush Stack: | [/build-tests/rush-project-change-analyzer-test](./build-tests/rush-project-change-analyzer-test/) | This is an example project that uses rush-lib's ProjectChangeAnalyzer to | | [/build-tests/set-webpack-public-path-plugin-webpack4-test](./build-tests/set-webpack-public-path-plugin-webpack4-test/) | Building this project tests the set-webpack-public-path-plugin using Webpack 4 | | [/build-tests/ts-command-line-test](./build-tests/ts-command-line-test/) | Building this project is a regression test for ts-command-line | -| [/libraries/rush-components](./libraries/rush-components/) | Rush Component Library: a set of themed components for rush projects | +| [/libraries/rush-themed-ui](./libraries/rush-themed-ui/) | Rush Component Library: a set of themed components for rush projects | | [/libraries/rushell](./libraries/rushell/) | Execute shell commands using a consistent syntax on every platform | | [/repo-scripts/doc-plugin-rush-stack](./repo-scripts/doc-plugin-rush-stack/) | API Documenter plugin used with the rushstack.io website | | [/repo-scripts/generate-api-docs](./repo-scripts/generate-api-docs/) | Used to generate API docs for the rushstack.io website | From 0388bd471345b96e4309eeb07fff62300d6cc307 Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Thu, 19 Jan 2023 22:36:01 -0800 Subject: [PATCH 082/399] Convert rush-themed-ui to use the "library" profile from "@rushstack/heft-web-rig" and enable API Extractor --- apps/lockfile-explorer-web/config/heft.json | 5 + apps/lockfile-explorer-web/webpack.config.js | 5 +- common/reviews/api/rush-themed-ui.api.md | 101 +++++ libraries/rush-themed-ui/.eslintrc.js | 2 +- .../rush-themed-ui/config/api-extractor.json | 427 ++++++++++++++++++ libraries/rush-themed-ui/config/heft.json | 129 ------ .../rush-themed-ui/config/jest.config.json | 2 +- libraries/rush-themed-ui/config/rig.json | 2 +- libraries/rush-themed-ui/package.json | 6 +- .../rush-themed-ui/src/{start.ts => index.ts} | 0 libraries/rush-themed-ui/webpack.config.js | 24 +- 11 files changed, 545 insertions(+), 158 deletions(-) create mode 100644 common/reviews/api/rush-themed-ui.api.md create mode 100644 libraries/rush-themed-ui/config/api-extractor.json delete mode 100644 libraries/rush-themed-ui/config/heft.json rename libraries/rush-themed-ui/src/{start.ts => index.ts} (100%) diff --git a/apps/lockfile-explorer-web/config/heft.json b/apps/lockfile-explorer-web/config/heft.json index 166072d9581..68cac9d5d8f 100644 --- a/apps/lockfile-explorer-web/config/heft.json +++ b/apps/lockfile-explorer-web/config/heft.json @@ -134,6 +134,11 @@ "sourceFolder": "lib/stub", "destinationFolders": ["dist"], "fileExtensions": [".js"] + }, + { + "sourceFolder": "node_modules/@rushstack/rush-themed-ui/dist", + "destinationFolders": ["dist"], + "fileExtensions": [".js", ".map"] } ] } diff --git a/apps/lockfile-explorer-web/webpack.config.js b/apps/lockfile-explorer-web/webpack.config.js index 5d8baf21a38..db1db2d8a01 100644 --- a/apps/lockfile-explorer-web/webpack.config.js +++ b/apps/lockfile-explorer-web/webpack.config.js @@ -12,9 +12,8 @@ module.exports = function createConfig(env, argv) { configOverride: { resolve: { alias: { - // // Use the bundled library - // 'heft-web-rig-library-tutorial': - // 'heft-web-rig-library-tutorial/dist/heft-web-rig-library-tutorial.js' + // Don't rebundle this large library + '@rushstack/rush-themed-ui': '@rushstack/rush-themed-ui/dist/rush-themed-ui.js' } }, performance: { diff --git a/common/reviews/api/rush-themed-ui.api.md b/common/reviews/api/rush-themed-ui.api.md new file mode 100644 index 00000000000..dd873e1a57f --- /dev/null +++ b/common/reviews/api/rush-themed-ui.api.md @@ -0,0 +1,101 @@ +## API Report File for "@rushstack/rush-themed-ui" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { default as React_2 } from 'react'; + +// Warning: (ae-forgotten-export) The symbol "IButtonProps" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export const Button: ({ children, disabled, onClick }: IButtonProps) => JSX.Element; + +// @public (undocumented) +export const Checkbox: ({ label, isChecked, onChecked }: ICheckboxProps) => JSX.Element; + +// @public (undocumented) +export interface ICheckboxProps { + // (undocumented) + isChecked: boolean; + // (undocumented) + label: string; + // (undocumented) + onChecked: (checked: boolean) => void; +} + +// @public (undocumented) +export interface IInputProps { + // (undocumented) + onChange: (e: React_2.ChangeEvent) => void; + // (undocumented) + placeholder?: string; + // (undocumented) + type?: string; + // (undocumented) + value: string; +} + +// @public (undocumented) +export const Input: ({ value, placeholder, onChange, type }: IInputProps) => JSX.Element; + +// @public (undocumented) +export interface IScrollAreaProps { + // (undocumented) + children: React_2.ReactNode; +} + +// @public (undocumented) +export interface ITabsItem { + // (undocumented) + body?: React_2.ReactNode; + // (undocumented) + header: string; + // (undocumented) + value?: string | number; +} + +// @public (undocumented) +export interface ITabsProps { + // (undocumented) + def?: string; + // (undocumented) + items: ITabsItem[]; + // (undocumented) + onChange?: (value: any) => void; + // (undocumented) + renderChildren?: () => JSX.Element; + // (undocumented) + value?: string | number; +} + +// @public (undocumented) +export interface ITextProps { + // (undocumented) + bold?: boolean; + // (undocumented) + children: React_2.ReactNode; + // (undocumented) + className?: string; + // (undocumented) + size?: number; + // (undocumented) + type: TextType; +} + +// @public (undocumented) +export const ScrollArea: ({ children }: IScrollAreaProps) => JSX.Element; + +// @public (undocumented) +export const Tabs: ({ items, def, value, onChange, renderChildren }: ITabsProps) => JSX.Element; + +// @public (undocumented) +const Text_2: ({ type, bold, children, className, size }: ITextProps) => JSX.Element; +export { Text_2 as Text } + +// @public (undocumented) +export type TextType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span'; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/libraries/rush-themed-ui/.eslintrc.js b/libraries/rush-themed-ui/.eslintrc.js index 60160b354c4..288eaa16364 100644 --- a/libraries/rush-themed-ui/.eslintrc.js +++ b/libraries/rush-themed-ui/.eslintrc.js @@ -2,6 +2,6 @@ require('@rushstack/eslint-config/patch/modern-module-resolution'); module.exports = { - extends: ['@rushstack/eslint-config/profile/node'], + extends: ['@rushstack/eslint-config/profile/web-app', '@rushstack/eslint-config/mixins/react'], parserOptions: { tsconfigRootDir: __dirname } }; diff --git a/libraries/rush-themed-ui/config/api-extractor.json b/libraries/rush-themed-ui/config/api-extractor.json new file mode 100644 index 00000000000..cafe285cb0d --- /dev/null +++ b/libraries/rush-themed-ui/config/api-extractor.json @@ -0,0 +1,427 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/lib/index.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [], + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Set to true when invoking API Extractor's test harness. When `testMode` is true, the `toolVersion` field in the + * .api.json file is assigned an empty string to prevent spurious diffs in output files tracked for tests. + * + * DEFAULT VALUE: "false" + */ + // "testMode": false, + + /** + * Specifies how API Extractor sorts members of an enum when generating the .api.json file. By default, the output + * files will be sorted alphabetically, which is "by-name". To keep the ordering in the source code, specify + * "preserve". + * + * DEFAULT VALUE: "by-name" + */ + // "enumMemberOrder": "by-name", + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true, + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + "reportFolder": "../../../common/reviews/api" + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/", + + /** + * Whether "forgotten exports" should be included in the API report file. Forgotten exports are declarations + * flagged with `ae-forgotten-export` warnings. See https://api-extractor.com/pages/messages/ae-forgotten-export/ to + * learn more. + * + * DEFAULT VALUE: "false" + */ + // "includeForgottenExports": false + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": false + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json", + + /** + * Whether "forgotten exports" should be included in the doc model file. Forgotten exports are declarations + * flagged with `ae-forgotten-export` warnings. See https://api-extractor.com/pages/messages/ae-forgotten-export/ to + * learn more. + * + * DEFAULT VALUE: "false" + */ + // "includeForgottenExports": false, + + /** + * The base URL where the project's source code can be viewed on a website such as GitHub or + * Azure DevOps. This URL path corresponds to the `` path on disk. + * + * This URL is concatenated with the file paths serialized to the doc model to produce URL file paths to individual API items. + * For example, if the `projectFolderUrl` is "https://github.com/microsoft/rushstack/tree/main/apps/api-extractor" and an API + * item's file path is "api/ExtractorConfig.ts", the full URL file path would be + * "https://github.com/microsoft/rushstack/tree/main/apps/api-extractor/api/ExtractorConfig.js". + * + * Can be omitted if you don't need source code links in your API documentation reference. + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "projectFolderUrl": "http://github.com/path/to/your/projectFolder" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for an "alpha" release. + * This file will include only declarations that are marked as "@public", "@beta", or "@alpha". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "alphaTrimmedFilePath": "/dist/-alpha.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning" + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + } + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning" + // "addToApiReportFile": false + } + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning" + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } +} diff --git a/libraries/rush-themed-ui/config/heft.json b/libraries/rush-themed-ui/config/heft.json deleted file mode 100644 index f859f9c5abe..00000000000 --- a/libraries/rush-themed-ui/config/heft.json +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Defines configuration used by core Heft. - */ -{ - "$schema": "https://developer.microsoft.com/json-schemas/heft/heft.schema.json", - - /** - * Optionally specifies another JSON config file that this file extends from. This provides a way for standard - * settings to be shared across multiple projects. - */ - "extends": "@rushstack/heft-web-rig/profiles/app/config/heft.json", - - "eventActions": [ - // { - // /** - // * (Required) The kind of built-in operation that should be performed. - // * The "deleteGlobs" action deletes files or folders that match the specified glob patterns. - // */ - // "actionKind": "deleteGlobs", - // - // /** - // * (Required) The Heft stage when this action should be performed. Note that heft.json event actions - // * are scheduled after any plugin tasks have processed the event. For example, a "compile" event action - // * will be performed after the TypeScript compiler has been invoked. - // * - // * Options: "clean", "pre-compile", "compile", "bundle", "post-build" - // */ - // "heftEvent": "clean", - // - // /** - // * (Required) A user-defined tag whose purpose is to allow configs to replace/delete handlers that - // * were added by other configs. - // */ - // "actionId": "my-example-action", - // - // /** - // * (Required) Glob patterns to be deleted. The paths are resolved relative to the project folder. - // * Documentation for supported glob syntaxes: https://www.npmjs.com/package/fast-glob - // */ - // "globsToDelete": [ - // "dist", - // "lib", - // "lib-esnext", - // "temp" - // ] - // }, - // - // { - // /** - // * (Required) The kind of built-in operation that should be performed. - // * The "copyFiles" action copies files that match the specified patterns. - // */ - // "actionKind": "copyFiles", - // - // /** - // * (Required) The Heft stage when this action should be performed. Note that heft.json event actions - // * are scheduled after any plugin tasks have processed the event. For example, a "compile" event action - // * will be performed after the TypeScript compiler has been invoked. - // * - // * Options: "pre-compile", "compile", "bundle", "post-build" - // */ - // "heftEvent": "pre-compile", - // - // /** - // * (Required) A user-defined tag whose purpose is to allow configs to replace/delete handlers that - // * were added by other configs. - // */ - // "actionId": "my-example-action", - // - // /** - // * (Required) An array of copy operations to run perform during the specified Heft event. - // */ - // "copyOperations": [ - // { - // /** - // * (Required) The base folder that files will be copied from, relative to the project root. - // * Settings such as "includeGlobs" and "excludeGlobs" will be resolved relative - // * to this folder. - // * NOTE: Assigning "sourceFolder" does not by itself select any files to be copied. - // */ - // "sourceFolder": "src", - // - // /** - // * (Required) One or more folders that files will be copied into, relative to the project root. - // * If you specify more than one destination folder, Heft will read the input files only once, using - // * streams to efficiently write multiple outputs. - // */ - // "destinationFolders": ["dist/assets"], - // - // /** - // * If specified, this option recursively scans all folders under "sourceFolder" and includes any files - // * that match the specified extensions. (If "fileExtensions" and "includeGlobs" are both - // * specified, their selections are added together.) - // */ - // "fileExtensions": [".jpg", ".png"], - // - // /** - // * A list of glob patterns that select files to be copied. The paths are resolved relative - // * to "sourceFolder". - // * Documentation for supported glob syntaxes: https://www.npmjs.com/package/fast-glob - // */ - // "includeGlobs": ["assets/*.md"], - // - // /** - // * A list of glob patterns that exclude files/folders from being copied. The paths are resolved relative - // * to "sourceFolder". These exclusions eliminate items that were selected by the "includeGlobs" - // * or "fileExtensions" setting. - // */ - // "excludeGlobs": [], - // - // /** - // * Normally, when files are selected under a child folder, a corresponding folder will be created in - // * the destination folder. Specify flatten=true to discard the source path and copy all matching files - // * to the same folder. If two files have the same name an error will be reported. - // * The default value is false. - // */ - // "flatten": false, - // - // /** - // * If true, filesystem hard links will be created instead of copying the file. Depending on the - // * operating system, this may be faster. (But note that it may cause unexpected behavior if a tool - // * modifies the link.) The default value is false. - // */ - // "hardlink": false - // } - // ] - // } - ] -} diff --git a/libraries/rush-themed-ui/config/jest.config.json b/libraries/rush-themed-ui/config/jest.config.json index 7ee087ffe19..600ba9ea39a 100644 --- a/libraries/rush-themed-ui/config/jest.config.json +++ b/libraries/rush-themed-ui/config/jest.config.json @@ -1,3 +1,3 @@ { - "extends": "@rushstack/heft-web-rig/profiles/app/config/jest.config.json" + "extends": "@rushstack/heft-web-rig/profiles/library/config/jest.config.json" } diff --git a/libraries/rush-themed-ui/config/rig.json b/libraries/rush-themed-ui/config/rig.json index 687fc2911bc..d72946b5042 100644 --- a/libraries/rush-themed-ui/config/rig.json +++ b/libraries/rush-themed-ui/config/rig.json @@ -2,5 +2,5 @@ "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", "rigPackageName": "@rushstack/heft-web-rig", - "rigProfile": "app" + "rigProfile": "library" } diff --git a/libraries/rush-themed-ui/package.json b/libraries/rush-themed-ui/package.json index 14056910b5d..1dc92f6ee56 100644 --- a/libraries/rush-themed-ui/package.json +++ b/libraries/rush-themed-ui/package.json @@ -4,11 +4,11 @@ "version": "0.0.0", "private": true, "license": "MIT", - "module": "lib/start.js", - "types": "lib/start.d.ts", + "module": "dist/rush-themed-ui.js", + "types": "dist/rush-themed-ui.d.ts", "scripts": { "build": "heft test --clean", - "start": "heft start", + "start": "heft build --watch", "test": "heft test", "_phase:build": "heft build --clean", "_phase:test": "heft test --no-build" diff --git a/libraries/rush-themed-ui/src/start.ts b/libraries/rush-themed-ui/src/index.ts similarity index 100% rename from libraries/rush-themed-ui/src/start.ts rename to libraries/rush-themed-ui/src/index.ts diff --git a/libraries/rush-themed-ui/webpack.config.js b/libraries/rush-themed-ui/webpack.config.js index 3725a2ce687..1215f0c5c1f 100644 --- a/libraries/rush-themed-ui/webpack.config.js +++ b/libraries/rush-themed-ui/webpack.config.js @@ -1,39 +1,23 @@ 'use strict'; -const path = require('path'); -const createWebpackConfig = require('@rushstack/heft-web-rig/profiles/app/webpack-base.config'); +const createWebpackConfig = require('@rushstack/heft-web-rig/profiles/library/webpack-base.config'); module.exports = function createConfig(env, argv) { return createWebpackConfig({ env: env, argv: argv, projectRoot: __dirname, + // Documentation: https://webpack.js.org/configuration/ configOverride: { - resolve: { - alias: { - // // Use the bundled library - // 'heft-web-rig-library-tutorial': - // 'heft-web-rig-library-tutorial/dist/heft-web-rig-library-tutorial.js' - } - }, + externals: ['react', 'react-dom', 'tslib'], + performance: { hints: env.production ? 'error' : false // This specifies the bundle size limit that will trigger Webpack's warning saying: // "The following entrypoint(s) combined asset size exceeds the recommended limit." // maxEntrypointSize: 500000, // maxAssetSize: 500000 - }, - devServer: { - port: 8090, - static: { - directory: path.join(__dirname, 'dist') - }, - client: { - webSocketURL: { - port: 8090 - } - } } } }); From a2f2e56c94bb6115f997d6fc0de8303e86d1a8ab Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Thu, 19 Jan 2023 22:46:54 -0800 Subject: [PATCH 083/399] Fix API Extractor warnings --- common/reviews/api/rush-themed-ui.api.md | 40 +++++++++++-------- .../src/components/Button/index.tsx | 10 ++++- .../src/components/Checkbox/index.tsx | 8 ++++ .../src/components/Input/index.tsx | 8 ++++ .../src/components/ScrollArea/index.tsx | 12 +++++- .../src/components/Tabs/index.tsx | 12 ++++++ .../src/components/Text/index.tsx | 12 ++++++ libraries/rush-themed-ui/src/index.ts | 12 ++++++ 8 files changed, 95 insertions(+), 19 deletions(-) diff --git a/common/reviews/api/rush-themed-ui.api.md b/common/reviews/api/rush-themed-ui.api.md index dd873e1a57f..351a31c0ba0 100644 --- a/common/reviews/api/rush-themed-ui.api.md +++ b/common/reviews/api/rush-themed-ui.api.md @@ -6,15 +6,23 @@ import { default as React_2 } from 'react'; -// Warning: (ae-forgotten-export) The symbol "IButtonProps" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) +// @public export const Button: ({ children, disabled, onClick }: IButtonProps) => JSX.Element; -// @public (undocumented) +// @public export const Checkbox: ({ label, isChecked, onChecked }: ICheckboxProps) => JSX.Element; -// @public (undocumented) +// @public +export interface IButtonProps { + // (undocumented) + children: JSX.Element | string; + // (undocumented) + disabled?: boolean; + // (undocumented) + onClick: () => void; +} + +// @public export interface ICheckboxProps { // (undocumented) isChecked: boolean; @@ -24,7 +32,7 @@ export interface ICheckboxProps { onChecked: (checked: boolean) => void; } -// @public (undocumented) +// @public export interface IInputProps { // (undocumented) onChange: (e: React_2.ChangeEvent) => void; @@ -36,16 +44,16 @@ export interface IInputProps { value: string; } -// @public (undocumented) +// @public export const Input: ({ value, placeholder, onChange, type }: IInputProps) => JSX.Element; -// @public (undocumented) +// @public export interface IScrollAreaProps { // (undocumented) children: React_2.ReactNode; } -// @public (undocumented) +// @public export interface ITabsItem { // (undocumented) body?: React_2.ReactNode; @@ -55,7 +63,7 @@ export interface ITabsItem { value?: string | number; } -// @public (undocumented) +// @public export interface ITabsProps { // (undocumented) def?: string; @@ -69,7 +77,7 @@ export interface ITabsProps { value?: string | number; } -// @public (undocumented) +// @public export interface ITextProps { // (undocumented) bold?: boolean; @@ -83,19 +91,17 @@ export interface ITextProps { type: TextType; } -// @public (undocumented) +// @public export const ScrollArea: ({ children }: IScrollAreaProps) => JSX.Element; -// @public (undocumented) +// @public export const Tabs: ({ items, def, value, onChange, renderChildren }: ITabsProps) => JSX.Element; -// @public (undocumented) +// @public const Text_2: ({ type, bold, children, className, size }: ITextProps) => JSX.Element; export { Text_2 as Text } -// @public (undocumented) +// @public export type TextType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span'; -// (No @packageDocumentation comment for this package) - ``` diff --git a/libraries/rush-themed-ui/src/components/Button/index.tsx b/libraries/rush-themed-ui/src/components/Button/index.tsx index 4561664fa67..5fccc974bdc 100644 --- a/libraries/rush-themed-ui/src/components/Button/index.tsx +++ b/libraries/rush-themed-ui/src/components/Button/index.tsx @@ -5,12 +5,20 @@ import React from 'react'; import { Text } from '../Text'; import styles from './styles.scss'; -interface IButtonProps { +/** + * React props for {@link Button} + * @public + */ +export interface IButtonProps { children: JSX.Element | string; disabled?: boolean; onClick: () => void; } +/** + * A button UI component + * @public + */ export const Button = ({ children, disabled = false, onClick }: IButtonProps): JSX.Element => { return (