Merge "Clean up plugin loading mocks"
diff --git a/.gitignore b/.gitignore
index bcafbb4..8a41786 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,3 +48,5 @@
!/plugins/webhooks
/test_site
/tools/format
+/.ts-out/*
+!/.ts-out/README.md
diff --git a/.ts-out/README.md b/.ts-out/README.md
new file mode 100644
index 0000000..dada30d
--- /dev/null
+++ b/.ts-out/README.md
@@ -0,0 +1,4 @@
+This directory contains compiled js code. Typescript uses subdirectories
+as output directories when runs under IDE.
+
+Bazel doesn't use this directory
diff --git a/Documentation/rest-api-projects.txt b/Documentation/rest-api-projects.txt
index a4e27b3..723b45a 100644
--- a/Documentation/rest-api-projects.txt
+++ b/Documentation/rest-api-projects.txt
@@ -3586,7 +3586,7 @@
|`plugin_config` |optional|
Plugin configuration as map which maps the plugin name to a map of
parameter names to link:#config-parameter-info[ConfigParameterInfo]
-entities.
+entities. Only filled for users who have read access to `refs/meta/config`.
|`actions` |optional|
Actions the caller might be able to perform on this project. The
information is a map of view names to
diff --git a/WORKSPACE b/WORKSPACE
index 47c3e9c..41d6ef8 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -49,49 +49,25 @@
# otherwise refer to RBE docs.
rbe_autoconfig(name = "rbe_default")
-# TODO(davido): Switch to upstream again, when this PR is merged:
-# https://github.com/bazelbuild/rules_closure/pull/478
http_archive(
- name = "io_bazel_rules_closure",
- sha256 = "b9c2bc6ba377aa497eb7c31681d34404febf9d4e3c9c7d98ce0d78238a0af20f",
- strip_prefix = "rules_closure-0.31",
+ name = "com_google_protobuf",
+ sha256 = "71030a04aedf9f612d2991c1c552317038c3c5a2b578ac4745267a45e7037c29",
+ strip_prefix = "protobuf-3.12.3",
urls = [
- "https://github.com/davido/rules_closure/archive/V0.31.tar.gz",
- "https://gerrit-ci.gerritforge.com/lib/V0.31.tar.gz",
+ "https://github.com/protocolbuffers/protobuf/archive/v3.12.3.tar.gz",
],
)
+load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
+
+protobuf_deps()
+
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "84abf7ac4234a70924628baa9a73a5a5cbad944c4358cf9abdb4aab29c9a5b77",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.7.0/rules_nodejs-1.7.0.tar.gz"],
)
-# File is specific to Polymer and copied from the Closure Github -- should be
-# synced any time there are major changes to Polymer.
-# https://github.com/google/closure-compiler/blob/master/contrib/externs/polymer-1.0.js
-http_file(
- name = "polymer_closure",
- downloaded_file_path = "polymer_closure.js",
- sha256 = "4d63a36dcca040475bd6deb815b9a600bd686e1413ac1ebd4b04516edd675020",
- urls = ["https://raw.githubusercontent.com/google/closure-compiler/35d2b3340ff23a69441f10fa3bc820691c2942f2/contrib/externs/polymer-1.0.js"],
-)
-
-load("@io_bazel_rules_closure//closure:repositories.bzl", "rules_closure_dependencies", "rules_closure_toolchains")
-
-# Prevent redundant loading of dependencies.
-# TODO(davido): Omit re-fetching ancient args4j version when these PRs are merged:
-# https://github.com/bazelbuild/rules_closure/pull/262
-# https://github.com/google/closure-templates/pull/155
-rules_closure_dependencies(
- omit_aopalliance = True,
- omit_bazel_skylib = True,
- omit_javax_inject = True,
- omit_rules_cc = True,
-)
-
-rules_closure_toolchains()
-
# Golang support for PolyGerrit local dev server.
http_archive(
name = "io_bazel_rules_go",
@@ -328,7 +304,7 @@
)
maven_jar(
- name = "args4j-intern",
+ name = "args4j",
artifact = "args4j:args4j:2.33",
sha1 = "bd87a75374a6d6523de82fef51fc3cfe9baf9fc9",
)
@@ -993,6 +969,45 @@
sha1 = "639033469776fd37c08358c6b92a4761feb2af4b",
)
+load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
+
+yarn_install(
+ name = "npm",
+ package_json = "//:package.json",
+ yarn_lock = "//:yarn.lock",
+)
+
+yarn_install(
+ name = "ui_npm",
+ args = ["--prod"],
+ package_json = "//:polygerrit-ui/app/package.json",
+ yarn_lock = "//:polygerrit-ui/app/yarn.lock",
+)
+
+yarn_install(
+ name = "ui_dev_npm",
+ package_json = "//:polygerrit-ui/package.json",
+ yarn_lock = "//:polygerrit-ui/yarn.lock",
+)
+
+yarn_install(
+ name = "tools_npm",
+ package_json = "//:tools/node_tools/package.json",
+ yarn_lock = "//:tools/node_tools/yarn.lock",
+)
+
+yarn_install(
+ name = "plugins_npm",
+ args = ["--prod"],
+ package_json = "//:plugins/package.json",
+ yarn_lock = "//:plugins/yarn.lock",
+)
+
+# Install all Bazel dependencies needed for npm packages that supply Bazel rules
+load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
+
+install_bazel_dependencies()
+
load("//tools/bzl:js.bzl", "bower_archive", "npm_binary")
# NPM binaries bundled along with their dependencies.
@@ -1184,45 +1199,6 @@
version = "6.5.1",
)
-load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
-
-yarn_install(
- name = "npm",
- package_json = "//:package.json",
- yarn_lock = "//:yarn.lock",
-)
-
-yarn_install(
- name = "ui_npm",
- args = ["--prod"],
- package_json = "//:polygerrit-ui/app/package.json",
- yarn_lock = "//:polygerrit-ui/app/yarn.lock",
-)
-
-yarn_install(
- name = "ui_dev_npm",
- package_json = "//:polygerrit-ui/package.json",
- yarn_lock = "//:polygerrit-ui/yarn.lock",
-)
-
-yarn_install(
- name = "tools_npm",
- package_json = "//:tools/node_tools/package.json",
- yarn_lock = "//:tools/node_tools/yarn.lock",
-)
-
-yarn_install(
- name = "plugins_npm",
- args = ["--prod"],
- package_json = "//:plugins/package.json",
- yarn_lock = "//:plugins/yarn.lock",
-)
-
-# Install all Bazel dependencies needed for npm packages that supply Bazel rules
-load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
-
-install_bazel_dependencies()
-
load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")
ts_setup_workspace()
diff --git a/java/com/google/gerrit/acceptance/AbstractDaemonTest.java b/java/com/google/gerrit/acceptance/AbstractDaemonTest.java
index 89cc724..dfb7a55 100644
--- a/java/com/google/gerrit/acceptance/AbstractDaemonTest.java
+++ b/java/com/google/gerrit/acceptance/AbstractDaemonTest.java
@@ -983,7 +983,7 @@
protected void setUseSignedOffBy(InheritableBoolean value) throws Exception {
try (MetaDataUpdate md = metaDataUpdateFactory.create(project)) {
ProjectConfig config = projectConfigFactory.read(md);
- config.getProject().setBooleanConfig(BooleanProjectConfig.USE_SIGNED_OFF_BY, value);
+ config.updateProject(p -> p.setBooleanConfig(BooleanProjectConfig.USE_SIGNED_OFF_BY, value));
config.commit(md);
projectCache.evict(config.getProject());
}
@@ -992,7 +992,7 @@
protected void setRequireChangeId(InheritableBoolean value) throws Exception {
try (MetaDataUpdate md = metaDataUpdateFactory.create(project)) {
ProjectConfig config = projectConfigFactory.read(md);
- config.getProject().setBooleanConfig(BooleanProjectConfig.REQUIRE_CHANGE_ID, value);
+ config.updateProject(p -> p.setBooleanConfig(BooleanProjectConfig.REQUIRE_CHANGE_ID, value));
config.commit(md);
projectCache.evict(config.getProject());
}
@@ -1257,7 +1257,7 @@
protected GroupReference groupRef(AccountGroup.UUID groupUuid) {
GroupDescription.Basic groupDescription = groupBackend.get(groupUuid);
- return new GroupReference(groupDescription.getGroupUUID(), groupDescription.getName());
+ return GroupReference.create(groupDescription.getGroupUUID(), groupDescription.getName());
}
protected InternalGroup group(String groupName) {
@@ -1269,7 +1269,7 @@
protected GroupReference groupRef(String groupName) {
InternalGroup group = groupCache.get(AccountGroup.nameKey(groupName)).orElse(null);
assertThat(group).isNotNull();
- return new GroupReference(group.getGroupUUID(), group.getName());
+ return GroupReference.create(group.getGroupUUID(), group.getName());
}
protected AccountGroup.UUID groupUuid(String groupName) {
@@ -1442,10 +1442,10 @@
LabelValue... value)
throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = label(label, value);
+ LabelType.Builder labelType = label(label, value).toBuilder();
labelType.setFunction(func);
- labelType.setRefPatterns(refPatterns);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ labelType.setRefPatterns(ImmutableList.copyOf(refPatterns));
+ u.getConfig().upsertLabelType(labelType.build());
u.save();
}
}
@@ -1453,10 +1453,11 @@
protected void enableCreateNewChangeForAllNotInTarget() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
u.getConfig()
- .getProject()
- .setBooleanConfig(
- BooleanProjectConfig.CREATE_NEW_CHANGE_FOR_ALL_NOT_IN_TARGET,
- InheritableBoolean.TRUE);
+ .updateProject(
+ p ->
+ p.setBooleanConfig(
+ BooleanProjectConfig.CREATE_NEW_CHANGE_FOR_ALL_NOT_IN_TARGET,
+ InheritableBoolean.TRUE));
u.save();
}
}
diff --git a/java/com/google/gerrit/acceptance/BUILD b/java/com/google/gerrit/acceptance/BUILD
index 9d8bc57..db0dc84 100644
--- a/java/com/google/gerrit/acceptance/BUILD
+++ b/java/com/google/gerrit/acceptance/BUILD
@@ -64,6 +64,7 @@
"//java/com/google/gerrit/acceptance/config",
"//java/com/google/gerrit/acceptance/testsuite/project",
"//java/com/google/gerrit/server/fixes/testing",
+ "//java/com/google/gerrit/server/data",
"//java/com/google/gerrit/server/group/testing",
"//java/com/google/gerrit/server/project/testing:project-test-util",
"//java/com/google/gerrit/testing:gerrit-test-util",
diff --git a/java/com/google/gerrit/acceptance/ExtensionRegistry.java b/java/com/google/gerrit/acceptance/ExtensionRegistry.java
index cfe7964..a5d8d19 100644
--- a/java/com/google/gerrit/acceptance/ExtensionRegistry.java
+++ b/java/com/google/gerrit/acceptance/ExtensionRegistry.java
@@ -36,6 +36,7 @@
import com.google.gerrit.server.ExceptionHook;
import com.google.gerrit.server.account.GroupBackend;
import com.google.gerrit.server.change.ChangeETagComputation;
+import com.google.gerrit.server.config.ProjectConfigEntry;
import com.google.gerrit.server.git.ChangeMessageModifier;
import com.google.gerrit.server.git.validators.CommitValidationListener;
import com.google.gerrit.server.git.validators.OnSubmitValidationListener;
@@ -79,6 +80,7 @@
private final DynamicSet<WorkInProgressStateChangedListener> workInProgressStateChangedListeners;
private final DynamicMap<CapabilityDefinition> capabilityDefinitions;
private final DynamicMap<PluginProjectPermissionDefinition> pluginProjectPermissionDefinitions;
+ private final DynamicMap<ProjectConfigEntry> pluginConfigEntries;
@Inject
ExtensionRegistry(
@@ -107,7 +109,8 @@
DynamicSet<OnSubmitValidationListener> onSubmitValidationListeners,
DynamicSet<WorkInProgressStateChangedListener> workInProgressStateChangedListeners,
DynamicMap<CapabilityDefinition> capabilityDefinitions,
- DynamicMap<PluginProjectPermissionDefinition> pluginProjectPermissionDefinitions) {
+ DynamicMap<PluginProjectPermissionDefinition> pluginProjectPermissionDefinitions,
+ DynamicMap<ProjectConfigEntry> pluginConfigEntries) {
this.accountIndexedListeners = accountIndexedListeners;
this.changeIndexedListeners = changeIndexedListeners;
this.groupIndexedListeners = groupIndexedListeners;
@@ -134,6 +137,7 @@
this.workInProgressStateChangedListeners = workInProgressStateChangedListeners;
this.capabilityDefinitions = capabilityDefinitions;
this.pluginProjectPermissionDefinitions = pluginProjectPermissionDefinitions;
+ this.pluginConfigEntries = pluginConfigEntries;
}
public Registration newRegistration() {
@@ -254,6 +258,10 @@
return add(pluginProjectPermissionDefinitions, pluginProjectPermissionDefinition, exportName);
}
+ public Registration add(ProjectConfigEntry pluginConfigEntry, String exportName) {
+ return add(pluginConfigEntries, pluginConfigEntry, exportName);
+ }
+
private <T> Registration add(DynamicSet<T> dynamicSet, T extension) {
return add(dynamicSet, extension, "gerrit");
}
diff --git a/java/com/google/gerrit/acceptance/testsuite/project/ProjectOperationsImpl.java b/java/com/google/gerrit/acceptance/testsuite/project/ProjectOperationsImpl.java
index 21bfcd1..de83cff 100644
--- a/java/com/google/gerrit/acceptance/testsuite/project/ProjectOperationsImpl.java
+++ b/java/com/google/gerrit/acceptance/testsuite/project/ProjectOperationsImpl.java
@@ -154,7 +154,7 @@
Permission permission =
projectConfig.getAccessSection(p.section(), true).getPermission(p.name(), true);
if (p.group().isPresent()) {
- GroupReference group = new GroupReference(p.group().get(), p.group().get().get());
+ GroupReference group = GroupReference.create(p.group().get(), p.group().get().get());
group = projectConfig.resolve(group);
permission.removeRule(group);
} else {
@@ -325,7 +325,7 @@
}
private static PermissionRule newRule(ProjectConfig project, AccountGroup.UUID groupUUID) {
- GroupReference group = new GroupReference(groupUUID, groupUUID.get());
+ GroupReference group = GroupReference.create(groupUUID, groupUUID.get());
group = project.resolve(group);
return new PermissionRule(group);
}
diff --git a/java/com/google/gerrit/common/data/GroupReference.java b/java/com/google/gerrit/common/data/GroupReference.java
index 0af088e..2620138 100644
--- a/java/com/google/gerrit/common/data/GroupReference.java
+++ b/java/com/google/gerrit/common/data/GroupReference.java
@@ -16,16 +16,18 @@
import static java.util.Objects.requireNonNull;
+import com.google.auto.value.AutoValue;
import com.google.gerrit.common.Nullable;
import com.google.gerrit.entities.AccountGroup;
/** Describes a group within a projects {@link AccessSection}s. */
-public class GroupReference implements Comparable<GroupReference> {
+@AutoValue
+public abstract class GroupReference implements Comparable<GroupReference> {
private static final String PREFIX = "group ";
public static GroupReference forGroup(GroupDescription.Basic group) {
- return new GroupReference(group.getGroupUUID(), group.getName());
+ return GroupReference.create(group.getGroupUUID(), group.getName());
}
public static boolean isGroupReference(String configValue) {
@@ -40,10 +42,10 @@
return configValue.substring(PREFIX.length()).trim();
}
- protected String uuid;
- protected String name;
+ @Nullable
+ public abstract AccountGroup.UUID getUUID();
- protected GroupReference() {}
+ public abstract String getName();
/**
* Create a group reference.
@@ -51,9 +53,8 @@
* @param uuid UUID of the group, must not be {@code null}
* @param name the group name, must not be {@code null}
*/
- public GroupReference(AccountGroup.UUID uuid, String name) {
- setUUID(requireNonNull(uuid));
- setName(name);
+ public static GroupReference create(AccountGroup.UUID uuid, String name) {
+ return new AutoValue_GroupReference(requireNonNull(uuid), requireNonNull(name));
}
/**
@@ -61,33 +62,12 @@
*
* @param name the group name, must not be {@code null}
*/
- public GroupReference(String name) {
- setUUID(null);
- setName(name);
- }
-
- @Nullable
- public AccountGroup.UUID getUUID() {
- return uuid != null ? AccountGroup.uuid(uuid) : null;
- }
-
- public void setUUID(@Nullable AccountGroup.UUID newUUID) {
- uuid = newUUID != null ? newUUID.get() : null;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String newName) {
- if (newName == null) {
- throw new NullPointerException();
- }
- this.name = newName;
+ public static GroupReference create(String name) {
+ return new AutoValue_GroupReference(null, name);
}
@Override
- public int compareTo(GroupReference o) {
+ public final int compareTo(GroupReference o) {
return uuid(this).compareTo(uuid(o));
}
@@ -100,21 +80,21 @@
}
@Override
- public int hashCode() {
+ public final int hashCode() {
return uuid(this).hashCode();
}
@Override
- public boolean equals(Object o) {
+ public final boolean equals(Object o) {
return o instanceof GroupReference && compareTo((GroupReference) o) == 0;
}
- public String toConfigValue() {
- return PREFIX + name;
+ @Override
+ public final String toString() {
+ return "Group[" + getName() + " / " + getUUID() + "]";
}
- @Override
- public String toString() {
- return "Group[" + getName() + " / " + getUUID() + "]";
+ public String toConfigValue() {
+ return PREFIX + getName();
}
}
diff --git a/java/com/google/gerrit/common/data/LabelType.java b/java/com/google/gerrit/common/data/LabelType.java
index 3a68414..9c1423d 100644
--- a/java/com/google/gerrit/common/data/LabelType.java
+++ b/java/com/google/gerrit/common/data/LabelType.java
@@ -14,23 +14,21 @@
package com.google.gerrit.common.data;
-import static com.google.common.collect.ImmutableList.toImmutableList;
import static java.util.Comparator.comparing;
-import static java.util.stream.Collectors.collectingAndThen;
import static java.util.stream.Collectors.toList;
+import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
import com.google.gerrit.common.Nullable;
import com.google.gerrit.entities.LabelId;
import com.google.gerrit.entities.PatchSetApproval;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
-public class LabelType {
+@AutoValue
+public abstract class LabelType {
public static final boolean DEF_ALLOW_POST_SUBMIT = true;
public static final boolean DEF_CAN_OVERRIDE = true;
public static final boolean DEF_COPY_ALL_SCORES_IF_NO_CHANGE = true;
@@ -46,12 +44,12 @@
public static LabelType withDefaultValues(String name) {
checkName(name);
List<LabelValue> values = new ArrayList<>(2);
- values.add(new LabelValue((short) 0, "Rejected"));
- values.add(new LabelValue((short) 1, "Approved"));
- return new LabelType(name, values);
+ values.add(LabelValue.create((short) 0, "Rejected"));
+ values.add(LabelValue.create((short) 1, "Approved"));
+ return create(name, values);
}
- public static String checkName(String name) {
+ public static String checkName(String name) throws IllegalArgumentException {
checkNameInternal(name);
if ("SUBM".equals(name)) {
throw new IllegalArgumentException("Reserved label name \"" + name + "\"");
@@ -59,7 +57,7 @@
return name;
}
- public static String checkNameInternal(String name) {
+ public static String checkNameInternal(String name) throws IllegalArgumentException {
if (name == null || name.isEmpty()) {
throw new IllegalArgumentException("Empty label name");
}
@@ -76,270 +74,135 @@
return name;
}
- private static List<LabelValue> sortValues(List<LabelValue> values) {
- values = new ArrayList<>(values);
+ private static ImmutableList<LabelValue> sortValues(List<LabelValue> values) {
if (values.isEmpty()) {
- return Collections.emptyList();
+ return ImmutableList.of();
}
values = values.stream().sorted(comparing(LabelValue::getValue)).collect(toList());
short v = values.get(0).getValue();
short i = 0;
- ArrayList<LabelValue> result = new ArrayList<>();
+ ImmutableList.Builder<LabelValue> result = ImmutableList.builder();
// Fill in any missing values with empty text.
while (i < values.size()) {
while (v < values.get(i).getValue()) {
- result.add(new LabelValue(v++, ""));
+ result.add(LabelValue.create(v++, ""));
}
v++;
result.add(values.get(i++));
}
- result.trimToSize();
- return Collections.unmodifiableList(result);
+ return result.build();
}
- protected String name;
+ public abstract String getName();
- protected LabelFunction function;
+ public abstract LabelFunction getFunction();
- protected boolean copyAnyScore;
- protected boolean copyMinScore;
- protected boolean copyMaxScore;
- protected boolean copyAllScoresOnMergeFirstParentUpdate;
- protected boolean copyAllScoresOnTrivialRebase;
- protected boolean copyAllScoresIfNoCodeChange;
- protected boolean copyAllScoresIfNoChange;
- protected ImmutableList<Short> copyValues;
- protected boolean allowPostSubmit;
- protected boolean ignoreSelfApproval;
- protected short defaultValue;
+ public abstract boolean isCopyAnyScore();
- protected List<LabelValue> values;
- protected short maxNegative;
- protected short maxPositive;
+ public abstract boolean isCopyMinScore();
- private transient boolean canOverride;
- private transient List<String> refPatterns;
- private transient Map<Short, LabelValue> byValue;
+ public abstract boolean isCopyMaxScore();
- protected LabelType() {}
+ public abstract boolean isCopyAllScoresOnMergeFirstParentUpdate();
- public LabelType(String name, List<LabelValue> valueList) {
- this.name = checkName(name);
- canOverride = true;
- values = sortValues(valueList);
- defaultValue = 0;
+ public abstract boolean isCopyAllScoresOnTrivialRebase();
- function = LabelFunction.MAX_WITH_BLOCK;
+ public abstract boolean isCopyAllScoresIfNoCodeChange();
- maxNegative = Short.MIN_VALUE;
- maxPositive = Short.MAX_VALUE;
- if (!values.isEmpty()) {
- if (values.get(0).getValue() < 0) {
- maxNegative = values.get(0).getValue();
- }
- if (values.get(values.size() - 1).getValue() > 0) {
- maxPositive = values.get(values.size() - 1).getValue();
- }
- }
- setCanOverride(DEF_CAN_OVERRIDE);
- setCopyAllScoresIfNoChange(DEF_COPY_ALL_SCORES_IF_NO_CHANGE);
- setCopyAllScoresIfNoCodeChange(DEF_COPY_ALL_SCORES_IF_NO_CODE_CHANGE);
- setCopyAllScoresOnTrivialRebase(DEF_COPY_ALL_SCORES_ON_TRIVIAL_REBASE);
- setCopyAllScoresOnMergeFirstParentUpdate(DEF_COPY_ALL_SCORES_ON_MERGE_FIRST_PARENT_UPDATE);
- setCopyAnyScore(DEF_COPY_ANY_SCORE);
- setCopyMaxScore(DEF_COPY_MAX_SCORE);
- setCopyMinScore(DEF_COPY_MIN_SCORE);
- setCopyValues(DEF_COPY_VALUES);
- setAllowPostSubmit(DEF_ALLOW_POST_SUBMIT);
- setIgnoreSelfApproval(DEF_IGNORE_SELF_APPROVAL);
+ public abstract boolean isCopyAllScoresIfNoChange();
- byValue = new HashMap<>();
- for (LabelValue v : values) {
- byValue.put(v.getValue(), v);
- }
+ public abstract ImmutableList<Short> getCopyValues();
+
+ public abstract boolean isAllowPostSubmit();
+
+ public abstract boolean isIgnoreSelfApproval();
+
+ public abstract short getDefaultValue();
+
+ public abstract ImmutableList<LabelValue> getValues();
+
+ public abstract short getMaxNegative();
+
+ public abstract short getMaxPositive();
+
+ public abstract boolean isCanOverride();
+
+ @Nullable
+ public abstract ImmutableList<String> getRefPatterns();
+
+ public abstract ImmutableMap<Short, LabelValue> getByValue();
+
+ public static LabelType create(String name, List<LabelValue> valueList) {
+ return LabelType.builder(name, valueList).build();
}
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = checkName(name);
+ public static LabelType.Builder builder(String name, List<LabelValue> valueList) {
+ return (new AutoValue_LabelType.Builder())
+ .setName(name)
+ .setValues(valueList)
+ .setDefaultValue((short) 0)
+ .setFunction(LabelFunction.MAX_WITH_BLOCK)
+ .setMaxNegative(Short.MIN_VALUE)
+ .setMaxPositive(Short.MAX_VALUE)
+ .setCanOverride(DEF_CAN_OVERRIDE)
+ .setCopyAllScoresIfNoChange(DEF_COPY_ALL_SCORES_IF_NO_CHANGE)
+ .setCopyAllScoresIfNoCodeChange(DEF_COPY_ALL_SCORES_IF_NO_CODE_CHANGE)
+ .setCopyAllScoresOnTrivialRebase(DEF_COPY_ALL_SCORES_ON_TRIVIAL_REBASE)
+ .setCopyAllScoresOnMergeFirstParentUpdate(DEF_COPY_ALL_SCORES_ON_MERGE_FIRST_PARENT_UPDATE)
+ .setCopyAnyScore(DEF_COPY_ANY_SCORE)
+ .setCopyMaxScore(DEF_COPY_MAX_SCORE)
+ .setCopyMinScore(DEF_COPY_MIN_SCORE)
+ .setCopyValues(DEF_COPY_VALUES)
+ .setAllowPostSubmit(DEF_ALLOW_POST_SUBMIT)
+ .setIgnoreSelfApproval(DEF_IGNORE_SELF_APPROVAL);
}
public boolean matches(PatchSetApproval psa) {
- return psa.labelId().get().equalsIgnoreCase(name);
- }
-
- public LabelFunction getFunction() {
- return function;
- }
-
- public void setFunction(@Nullable LabelFunction function) {
- this.function = function;
- }
-
- public boolean canOverride() {
- return canOverride;
- }
-
- @Nullable
- public List<String> getRefPatterns() {
- return refPatterns;
- }
-
- public void setCanOverride(boolean canOverride) {
- this.canOverride = canOverride;
- }
-
- public boolean allowPostSubmit() {
- return allowPostSubmit;
- }
-
- public void setAllowPostSubmit(boolean allowPostSubmit) {
- this.allowPostSubmit = allowPostSubmit;
- }
-
- public boolean ignoreSelfApproval() {
- return ignoreSelfApproval;
- }
-
- public void setIgnoreSelfApproval(boolean ignoreSelfApproval) {
- this.ignoreSelfApproval = ignoreSelfApproval;
- }
-
- public void setRefPatterns(List<String> refPatterns) {
- if (refPatterns != null && !refPatterns.isEmpty()) {
- this.refPatterns =
- refPatterns.stream().collect(collectingAndThen(toList(), Collections::unmodifiableList));
- } else {
- this.refPatterns = null;
- }
- }
-
- public List<LabelValue> getValues() {
- return values;
- }
-
- public void setValues(List<LabelValue> values) {
- this.values = sortValues(values);
+ return psa.labelId().get().equalsIgnoreCase(getName());
}
public LabelValue getMin() {
- if (values.isEmpty()) {
+ if (getValues().isEmpty()) {
return null;
}
- return values.get(0);
+ return getValues().get(0);
}
public LabelValue getMax() {
- if (values.isEmpty()) {
+ if (getValues().isEmpty()) {
return null;
}
- return values.get(values.size() - 1);
- }
-
- public short getDefaultValue() {
- return defaultValue;
- }
-
- public void setDefaultValue(short defaultValue) {
- this.defaultValue = defaultValue;
- }
-
- public boolean isCopyAnyScore() {
- return copyAnyScore;
- }
-
- public void setCopyAnyScore(boolean copyAnyScore) {
- this.copyAnyScore = copyAnyScore;
- }
-
- public boolean isCopyMinScore() {
- return copyMinScore;
- }
-
- public void setCopyMinScore(boolean copyMinScore) {
- this.copyMinScore = copyMinScore;
- }
-
- public boolean isCopyMaxScore() {
- return copyMaxScore;
- }
-
- public void setCopyMaxScore(boolean copyMaxScore) {
- this.copyMaxScore = copyMaxScore;
- }
-
- public boolean isCopyAllScoresOnMergeFirstParentUpdate() {
- return copyAllScoresOnMergeFirstParentUpdate;
- }
-
- public void setCopyAllScoresOnMergeFirstParentUpdate(
- boolean copyAllScoresOnMergeFirstParentUpdate) {
- this.copyAllScoresOnMergeFirstParentUpdate = copyAllScoresOnMergeFirstParentUpdate;
- }
-
- public boolean isCopyAllScoresOnTrivialRebase() {
- return copyAllScoresOnTrivialRebase;
- }
-
- public void setCopyAllScoresOnTrivialRebase(boolean copyAllScoresOnTrivialRebase) {
- this.copyAllScoresOnTrivialRebase = copyAllScoresOnTrivialRebase;
- }
-
- public boolean isCopyAllScoresIfNoCodeChange() {
- return copyAllScoresIfNoCodeChange;
- }
-
- public void setCopyAllScoresIfNoCodeChange(boolean copyAllScoresIfNoCodeChange) {
- this.copyAllScoresIfNoCodeChange = copyAllScoresIfNoCodeChange;
- }
-
- public boolean isCopyAllScoresIfNoChange() {
- return copyAllScoresIfNoChange;
- }
-
- public void setCopyAllScoresIfNoChange(boolean copyAllScoresIfNoChange) {
- this.copyAllScoresIfNoChange = copyAllScoresIfNoChange;
- }
-
- public ImmutableList<Short> getCopyValues() {
- return copyValues;
- }
-
- public void setCopyValues(Collection<Short> copyValues) {
- this.copyValues = copyValues.stream().sorted().collect(toImmutableList());
+ return getValues().get(getValues().size() - 1);
}
public boolean isMaxNegative(PatchSetApproval ca) {
- return maxNegative == ca.value();
+ return getMaxNegative() == ca.value();
}
public boolean isMaxPositive(PatchSetApproval ca) {
- return maxPositive == ca.value();
+ return getMaxPositive() == ca.value();
}
public LabelValue getValue(short value) {
- return byValue.get(value);
+ return getByValue().get(value);
}
public LabelValue getValue(PatchSetApproval ca) {
- return byValue.get(ca.value());
+ return getByValue().get(ca.value());
}
public LabelId getLabelId() {
- return LabelId.create(name);
+ return LabelId.create(getName());
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder(name).append('[');
+ public final String toString() {
+ StringBuilder sb = new StringBuilder(getName()).append('[');
LabelValue min = getMin();
LabelValue max = getMax();
if (min != null && max != null) {
sb.append(
- new PermissionRange(Permission.forLabel(name), min.getValue(), max.getValue())
+ new PermissionRange(Permission.forLabel(getName()), min.getValue(), max.getValue())
.toString()
.trim());
} else if (min != null) {
@@ -350,4 +213,84 @@
sb.append(']');
return sb.toString();
}
+
+ public abstract Builder toBuilder();
+
+ @AutoValue.Builder
+ public abstract static class Builder {
+ public abstract Builder setName(String name);
+
+ public abstract Builder setFunction(LabelFunction function);
+
+ public abstract Builder setCanOverride(boolean canOverride);
+
+ public abstract Builder setAllowPostSubmit(boolean allowPostSubmit);
+
+ public abstract Builder setIgnoreSelfApproval(boolean ignoreSelfApproval);
+
+ public abstract Builder setRefPatterns(@Nullable ImmutableList<String> refPatterns);
+
+ public abstract Builder setValues(List<LabelValue> values);
+
+ public abstract Builder setDefaultValue(short defaultValue);
+
+ public abstract Builder setCopyAnyScore(boolean copyAnyScore);
+
+ public abstract Builder setCopyMinScore(boolean copyMinScore);
+
+ public abstract Builder setCopyMaxScore(boolean copyMaxScore);
+
+ public abstract Builder setCopyAllScoresOnMergeFirstParentUpdate(
+ boolean copyAllScoresOnMergeFirstParentUpdate);
+
+ public abstract Builder setCopyAllScoresOnTrivialRebase(boolean copyAllScoresOnTrivialRebase);
+
+ public abstract Builder setCopyAllScoresIfNoCodeChange(boolean copyAllScoresIfNoCodeChange);
+
+ public abstract Builder setCopyAllScoresIfNoChange(boolean copyAllScoresIfNoChange);
+
+ public abstract Builder setCopyValues(Collection<Short> copyValues);
+
+ public abstract Builder setMaxNegative(short maxNegative);
+
+ public abstract Builder setMaxPositive(short maxPositive);
+
+ public abstract ImmutableList<LabelValue> getValues();
+
+ protected abstract String getName();
+
+ protected abstract Builder setByValue(ImmutableMap<Short, LabelValue> byValue);
+
+ @Nullable
+ protected abstract ImmutableList<String> getRefPatterns();
+
+ protected abstract LabelType autoBuild();
+
+ public LabelType build() throws IllegalArgumentException {
+ setName(checkName(getName()));
+ if (getRefPatterns() == null || getRefPatterns().isEmpty()) {
+ // Empty to null
+ setRefPatterns(null);
+ }
+
+ List<LabelValue> valueList = sortValues(getValues());
+ setValues(valueList);
+ if (!valueList.isEmpty()) {
+ if (valueList.get(0).getValue() < 0) {
+ setMaxNegative(valueList.get(0).getValue());
+ }
+ if (valueList.get(valueList.size() - 1).getValue() > 0) {
+ setMaxPositive(valueList.get(valueList.size() - 1).getValue());
+ }
+ }
+
+ ImmutableMap.Builder<Short, LabelValue> byValue = ImmutableMap.builder();
+ for (LabelValue v : valueList) {
+ byValue.put(v.getValue(), v);
+ }
+ setByValue(byValue.build());
+
+ return autoBuild();
+ }
+ }
}
diff --git a/java/com/google/gerrit/common/data/LabelValue.java b/java/com/google/gerrit/common/data/LabelValue.java
index c0ba781..ec16fb2 100644
--- a/java/com/google/gerrit/common/data/LabelValue.java
+++ b/java/com/google/gerrit/common/data/LabelValue.java
@@ -14,65 +14,42 @@
package com.google.gerrit.common.data;
-import java.util.Objects;
+import com.google.auto.value.AutoValue;
-public class LabelValue {
+@AutoValue
+public abstract class LabelValue {
public static String formatValue(short value) {
if (value < 0) {
return Short.toString(value);
} else if (value == 0) {
return " 0";
} else {
- return "+" + Short.toString(value);
+ return "+" + value;
}
}
- protected short value;
- protected String text;
+ public abstract short getValue();
- public LabelValue(short value, String text) {
- this.value = value;
- this.text = text;
- }
+ public abstract String getText();
- protected LabelValue() {}
-
- public short getValue() {
- return value;
- }
-
- public String getText() {
- return text;
+ public static LabelValue create(short value, String text) {
+ return new AutoValue_LabelValue(value, text);
}
public String formatValue() {
- return formatValue(value);
+ return formatValue(getValue());
}
public String format() {
StringBuilder sb = new StringBuilder(formatValue());
- if (!text.isEmpty()) {
- sb.append(' ').append(text);
+ if (!getText().isEmpty()) {
+ sb.append(' ').append(getText());
}
return sb.toString();
}
@Override
- public boolean equals(Object o) {
- if (!(o instanceof LabelValue)) {
- return false;
- }
- LabelValue v = (LabelValue) o;
- return value == v.value && Objects.equals(text, v.text);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(value, text);
- }
-
- @Override
- public String toString() {
+ public final String toString() {
return format();
}
}
diff --git a/java/com/google/gerrit/common/data/PermissionRule.java b/java/com/google/gerrit/common/data/PermissionRule.java
index 8ab0a55..ce94695 100644
--- a/java/com/google/gerrit/common/data/PermissionRule.java
+++ b/java/com/google/gerrit/common/data/PermissionRule.java
@@ -255,8 +255,7 @@
String groupName = GroupReference.extractGroupName(src);
if (groupName != null) {
- GroupReference group = new GroupReference();
- group.setName(groupName);
+ GroupReference group = GroupReference.create(groupName);
rule.setGroup(group);
} else {
throw new IllegalArgumentException("Rule must include group: " + orig);
diff --git a/java/com/google/gerrit/common/data/SubscribeSection.java b/java/com/google/gerrit/common/data/SubscribeSection.java
index 6ac4695..533a2f0 100644
--- a/java/com/google/gerrit/common/data/SubscribeSection.java
+++ b/java/com/google/gerrit/common/data/SubscribeSection.java
@@ -14,43 +14,58 @@
package com.google.gerrit.common.data;
+import static com.google.common.collect.ImmutableList.toImmutableList;
+
+import com.google.auto.value.AutoValue;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.flogger.FluentLogger;
import com.google.gerrit.entities.BranchNameKey;
import com.google.gerrit.entities.Project;
-import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.transport.RefSpec;
/** Portion of a {@link Project} describing superproject subscription rules. */
-public class SubscribeSection {
+@AutoValue
+public abstract class SubscribeSection {
+ private static final FluentLogger logger = FluentLogger.forEnclosingClass();
- private final List<RefSpec> multiMatchRefSpecs;
- private final List<RefSpec> matchingRefSpecs;
- private final Project.NameKey project;
+ public abstract Project.NameKey project();
- public SubscribeSection(Project.NameKey p) {
- project = p;
- matchingRefSpecs = new ArrayList<>();
- multiMatchRefSpecs = new ArrayList<>();
+ protected abstract ImmutableList<RefSpec> matchingRefSpecs();
+
+ protected abstract ImmutableList<RefSpec> multiMatchRefSpecs();
+
+ public static Builder builder(Project.NameKey project) {
+ return new AutoValue_SubscribeSection.Builder().project(project);
}
- public void addMatchingRefSpec(RefSpec spec) {
- matchingRefSpecs.add(spec);
- }
+ public abstract Builder toBuilder();
- public void addMatchingRefSpec(String spec) {
- RefSpec r = new RefSpec(spec);
- matchingRefSpecs.add(r);
- }
+ @AutoValue.Builder
+ public abstract static class Builder {
+ public abstract Builder project(Project.NameKey project);
- public void addMultiMatchRefSpec(String spec) {
- RefSpec r = new RefSpec(spec, RefSpec.WildcardMode.ALLOW_MISMATCH);
- multiMatchRefSpecs.add(r);
- }
+ abstract ImmutableList.Builder<RefSpec> matchingRefSpecsBuilder();
- public Project.NameKey getProject() {
- return project;
+ abstract ImmutableList.Builder<RefSpec> multiMatchRefSpecsBuilder();
+
+ public Builder addMatchingRefSpec(String matchingRefSpec) {
+ matchingRefSpecsBuilder()
+ .add(new RefSpec(matchingRefSpec, RefSpec.WildcardMode.REQUIRE_MATCH));
+ return this;
+ }
+
+ public Builder addMultiMatchRefSpec(String multiMatchRefSpec) {
+ multiMatchRefSpecsBuilder()
+ .add(new RefSpec(multiMatchRefSpec, RefSpec.WildcardMode.ALLOW_MISMATCH));
+ return this;
+ }
+
+ public abstract SubscribeSection build();
}
/**
@@ -61,12 +76,12 @@
* @return if the branch could trigger a superproject update
*/
public boolean appliesTo(BranchNameKey branch) {
- for (RefSpec r : matchingRefSpecs) {
+ for (RefSpec r : matchingRefSpecs()) {
if (r.matchSource(branch.branch())) {
return true;
}
}
- for (RefSpec r : multiMatchRefSpecs) {
+ for (RefSpec r : multiMatchRefSpecs()) {
if (r.matchSource(branch.branch())) {
return true;
}
@@ -74,29 +89,71 @@
return false;
}
- public Collection<RefSpec> getMatchingRefSpecs() {
- return Collections.unmodifiableCollection(matchingRefSpecs);
+ public Collection<String> matchingRefSpecsAsString() {
+ return matchingRefSpecs().stream().map(RefSpec::toString).collect(toImmutableList());
}
- public Collection<RefSpec> getMultiMatchRefSpecs() {
- return Collections.unmodifiableCollection(multiMatchRefSpecs);
+ public Collection<String> multiMatchRefSpecsAsString() {
+ return multiMatchRefSpecs().stream().map(RefSpec::toString).collect(toImmutableList());
+ }
+
+ /** Evaluates what the destination branches for the subscription are. */
+ public ImmutableSet<BranchNameKey> getDestinationBranches(
+ BranchNameKey src, Collection<Ref> allRefsInRefsHeads) {
+ Set<BranchNameKey> ret = new HashSet<>();
+ logger.atFine().log("Inspecting SubscribeSection %s", this);
+ for (RefSpec r : matchingRefSpecs()) {
+ logger.atFine().log("Inspecting [matching] ref %s", r);
+ if (!r.matchSource(src.branch())) {
+ continue;
+ }
+ if (r.isWildcard()) {
+ // refs/heads/*[:refs/somewhere/*]
+ ret.add(BranchNameKey.create(project(), r.expandFromSource(src.branch()).getDestination()));
+ } else {
+ // e.g. refs/heads/master[:refs/heads/stable]
+ String dest = r.getDestination();
+ if (dest == null) {
+ dest = r.getSource();
+ }
+ ret.add(BranchNameKey.create(project(), dest));
+ }
+ }
+
+ for (RefSpec r : multiMatchRefSpecs()) {
+ logger.atFine().log("Inspecting [all] ref %s", r);
+ if (!r.matchSource(src.branch())) {
+ continue;
+ }
+ for (Ref ref : allRefsInRefsHeads) {
+ if (r.getDestination() != null && !r.matchDestination(ref.getName())) {
+ continue;
+ }
+ BranchNameKey b = BranchNameKey.create(project(), ref.getName());
+ if (!ret.contains(b)) {
+ ret.add(b);
+ }
+ }
+ }
+ logger.atFine().log("Returning possible branches: %s for project %s", ret, project());
+ return ImmutableSet.copyOf(ret);
}
@Override
- public String toString() {
+ public final String toString() {
StringBuilder ret = new StringBuilder();
ret.append("[SubscribeSection, project=");
- ret.append(project);
- if (!matchingRefSpecs.isEmpty()) {
+ ret.append(project());
+ if (!matchingRefSpecs().isEmpty()) {
ret.append(", matching=[");
- for (RefSpec r : matchingRefSpecs) {
+ for (RefSpec r : matchingRefSpecs()) {
ret.append(r.toString());
ret.append(", ");
}
}
- if (!multiMatchRefSpecs.isEmpty()) {
+ if (!multiMatchRefSpecs().isEmpty()) {
ret.append(", all=[");
- for (RefSpec r : multiMatchRefSpecs) {
+ for (RefSpec r : multiMatchRefSpecs()) {
ret.append(r.toString());
ret.append(", ");
}
diff --git a/java/com/google/gerrit/entities/Project.java b/java/com/google/gerrit/entities/Project.java
index 867b14d..759d50a 100644
--- a/java/com/google/gerrit/entities/Project.java
+++ b/java/com/google/gerrit/entities/Project.java
@@ -16,6 +16,10 @@
import static java.util.Objects.requireNonNull;
+import com.google.auto.value.AutoValue;
+import com.google.common.collect.ImmutableMap;
+import com.google.errorprone.annotations.Immutable;
+import com.google.gerrit.common.Nullable;
import com.google.gerrit.extensions.client.InheritableBoolean;
import com.google.gerrit.extensions.client.ProjectState;
import com.google.gerrit.extensions.client.SubmitType;
@@ -26,7 +30,8 @@
import java.util.Optional;
/** Projects match a source code repository managed by Gerrit */
-public final class Project {
+@AutoValue
+public abstract class Project {
/** Default submit type for new projects. */
public static final SubmitType DEFAULT_SUBMIT_TYPE = SubmitType.MERGE_IF_NECESSARY;
@@ -47,7 +52,10 @@
* <p>Because of this unusual subclassing behavior, this class is not an {@code @AutoValue},
* unlike other key types in this package. However, this is strictly an implementation detail; its
* interface and semantics are otherwise analogous to the {@code @AutoValue} types.
+ *
+ * <p>This class is immutable and thread safe.
*/
+ @Immutable
public static class NameKey implements Serializable, Comparable<NameKey> {
private static final long serialVersionUID = 1L;
@@ -56,10 +64,6 @@
return nameKey(KeyUtil.decode(str));
}
- public static String asStringOrNull(NameKey key) {
- return key == null ? null : key.get();
- }
-
private final String name;
protected NameKey(String name) {
@@ -72,140 +76,86 @@
@Override
public final int hashCode() {
- return get().hashCode();
+ return name.hashCode();
}
@Override
public final boolean equals(Object b) {
if (b instanceof NameKey) {
- return get().equals(((NameKey) b).get());
+ return name.equals(((NameKey) b).get());
}
return false;
}
@Override
public final int compareTo(NameKey o) {
- return get().compareTo(o.get());
+ return name.compareTo(o.get());
}
@Override
public final String toString() {
- return KeyUtil.encode(get());
+ return KeyUtil.encode(name);
}
}
- protected NameKey name;
+ public abstract NameKey getNameKey();
- protected String description;
+ @Nullable
+ public abstract String getDescription();
- protected Map<BooleanProjectConfig, InheritableBoolean> booleanConfigs;
-
- protected SubmitType submitType;
-
- protected ProjectState state;
-
- protected NameKey parent;
-
- protected String maxObjectSizeLimit;
-
- protected String defaultDashboardId;
-
- protected String localDefaultDashboardId;
-
- protected String configRefState;
-
- protected Project() {}
-
- public Project(Project.NameKey nameKey) {
- name = nameKey;
- submitType = SubmitType.MERGE_IF_NECESSARY;
- state = ProjectState.ACTIVE;
-
- booleanConfigs = new HashMap<>();
- Arrays.stream(BooleanProjectConfig.values())
- .forEach(c -> booleanConfigs.put(c, InheritableBoolean.INHERIT));
- }
-
- public Project.NameKey getNameKey() {
- return name;
- }
-
- public String getName() {
- return name != null ? name.get() : null;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String d) {
- description = d;
- }
-
- public String getMaxObjectSizeLimit() {
- return maxObjectSizeLimit;
- }
-
- public InheritableBoolean getBooleanConfig(BooleanProjectConfig config) {
- return booleanConfigs.get(config);
- }
-
- public void setBooleanConfig(BooleanProjectConfig config, InheritableBoolean val) {
- booleanConfigs.replace(config, val);
- }
-
- public void setMaxObjectSizeLimit(String limit) {
- maxObjectSizeLimit = limit;
- }
+ protected abstract ImmutableMap<BooleanProjectConfig, InheritableBoolean> getBooleanConfigs();
/**
* Submit type as configured in {@code project.config}.
*
* <p>Does not take inheritance into account, i.e. may return {@link SubmitType#INHERIT}.
- *
- * @return submit type.
*/
- public SubmitType getConfiguredSubmitType() {
- return submitType;
- }
+ public abstract SubmitType getSubmitType();
- public void setSubmitType(SubmitType type) {
- submitType = type;
- }
-
- public ProjectState getState() {
- return state;
- }
-
- public void setState(ProjectState newState) {
- state = newState;
- }
-
- public String getDefaultDashboard() {
- return defaultDashboardId;
- }
-
- public void setDefaultDashboard(String defaultDashboardId) {
- this.defaultDashboardId = defaultDashboardId;
- }
-
- public String getLocalDefaultDashboard() {
- return localDefaultDashboardId;
- }
-
- public void setLocalDefaultDashboard(String localDefaultDashboardId) {
- this.localDefaultDashboardId = localDefaultDashboardId;
- }
+ public abstract ProjectState getState();
/**
- * Returns the name key of the parent project.
+ * Name key of the parent project.
*
- * @return name key of the parent project, {@code null} if this project is the wild project,
- * {@code null} or the name key of the wild project if this project is a direct child of the
- * wild project
+ * <p>{@code null} if this project is the wild project, {@code null} or the name key of the wild
+ * project if this project is a direct child of the wild project.
*/
- public Project.NameKey getParent() {
- return parent;
+ @Nullable
+ public abstract NameKey getParent();
+
+ @Nullable
+ public abstract String getMaxObjectSizeLimit();
+
+ @Nullable
+ public abstract String getDefaultDashboard();
+
+ @Nullable
+ public abstract String getLocalDefaultDashboard();
+
+ /** The {@code ObjectId} as 40 digit hex of {@code refs/meta/config}'s HEAD. */
+ @Nullable
+ public abstract String getConfigRefState();
+
+ public static Builder builder(Project.NameKey nameKey) {
+ Builder builder =
+ new AutoValue_Project.Builder()
+ .setNameKey(nameKey)
+ .setSubmitType(SubmitType.MERGE_IF_NECESSARY)
+ .setState(ProjectState.ACTIVE);
+ ImmutableMap.Builder<BooleanProjectConfig, InheritableBoolean> booleans =
+ ImmutableMap.builder();
+ Arrays.stream(BooleanProjectConfig.values())
+ .forEach(b -> booleans.put(b, InheritableBoolean.INHERIT));
+ builder.setBooleanConfigs(booleans.build());
+ return builder;
+ }
+
+ public String getName() {
+ return getNameKey() != null ? getNameKey().get() : null;
+ }
+
+ public InheritableBoolean getBooleanConfig(BooleanProjectConfig config) {
+ return getBooleanConfigs().get(config);
}
/**
@@ -216,11 +166,11 @@
* project
*/
public Project.NameKey getParent(Project.NameKey allProjectsName) {
- if (parent != null) {
- return parent;
+ if (getParent() != null) {
+ return getParent();
}
- if (name.equals(allProjectsName)) {
+ if (getNameKey().equals(allProjectsName)) {
return null;
}
@@ -228,29 +178,53 @@
}
public String getParentName() {
- return parent != null ? parent.get() : null;
- }
-
- public void setParentName(String n) {
- parent = n != null ? nameKey(n) : null;
- }
-
- public void setParentName(NameKey n) {
- parent = n;
- }
-
- /** Returns the {@code ObjectId} as 40 digit hex of {@code refs/meta/config}'s HEAD. */
- public String getConfigRefState() {
- return configRefState;
- }
-
- /** Sets the {@code ObjectId} as 40 digit hex of {@code refs/meta/config}'s HEAD. */
- public void setConfigRefState(String state) {
- configRefState = state;
+ return getParent() != null ? getParent().get() : null;
}
@Override
- public String toString() {
+ public final String toString() {
return Optional.of(getName()).orElse("<null>");
}
+
+ public abstract Builder toBuilder();
+
+ @AutoValue.Builder
+ public abstract static class Builder {
+ public abstract Builder setDescription(String description);
+
+ public Builder setBooleanConfig(BooleanProjectConfig config, InheritableBoolean val) {
+ Map<BooleanProjectConfig, InheritableBoolean> map = new HashMap<>(getBooleanConfigs());
+ map.replace(config, val);
+ setBooleanConfigs(ImmutableMap.copyOf(map));
+ return this;
+ }
+
+ public abstract Builder setMaxObjectSizeLimit(String limit);
+
+ public abstract Builder setSubmitType(SubmitType type);
+
+ public abstract Builder setState(ProjectState newState);
+
+ public abstract Builder setDefaultDashboard(String defaultDashboardId);
+
+ public abstract Builder setLocalDefaultDashboard(String localDefaultDashboard);
+
+ public abstract Builder setParent(NameKey n);
+
+ public Builder setParent(String n) {
+ return setParent(n != null ? nameKey(n) : null);
+ }
+
+ /** Sets the {@code ObjectId} as 40 digit hex of {@code refs/meta/config}'s HEAD. */
+ public abstract Builder setConfigRefState(String state);
+
+ public abstract Project build();
+
+ protected abstract Builder setNameKey(Project.NameKey nameKey);
+
+ protected abstract ImmutableMap<BooleanProjectConfig, InheritableBoolean> getBooleanConfigs();
+
+ protected abstract Builder setBooleanConfigs(
+ ImmutableMap<BooleanProjectConfig, InheritableBoolean> booleanConfigs);
+ }
}
diff --git a/java/com/google/gerrit/httpd/init/WebAppInitializer.java b/java/com/google/gerrit/httpd/init/WebAppInitializer.java
index 0c3b7b0..c5f97a3 100644
--- a/java/com/google/gerrit/httpd/init/WebAppInitializer.java
+++ b/java/com/google/gerrit/httpd/init/WebAppInitializer.java
@@ -96,6 +96,7 @@
import com.google.gerrit.server.ssh.NoSshModule;
import com.google.gerrit.server.ssh.SshAddressesModule;
import com.google.gerrit.server.submit.LocalMergeSuperSetComputation;
+import com.google.gerrit.server.submit.SubscriptionGraph;
import com.google.gerrit.sshd.SshHostKeyModule;
import com.google.gerrit.sshd.SshKeyCacheImpl;
import com.google.gerrit.sshd.SshModule;
@@ -322,6 +323,7 @@
}
modules.add(new RestApiModule());
+ modules.add(new SubscriptionGraph.Module());
modules.add(new WorkQueue.Module());
modules.add(new GerritInstanceNameModule());
modules.add(
diff --git a/java/com/google/gerrit/pgm/Daemon.java b/java/com/google/gerrit/pgm/Daemon.java
index 57bec71..63278c1 100644
--- a/java/com/google/gerrit/pgm/Daemon.java
+++ b/java/com/google/gerrit/pgm/Daemon.java
@@ -107,6 +107,7 @@
import com.google.gerrit.server.ssh.NoSshModule;
import com.google.gerrit.server.ssh.SshAddressesModule;
import com.google.gerrit.server.submit.LocalMergeSuperSetComputation;
+import com.google.gerrit.server.submit.SubscriptionGraph;
import com.google.gerrit.sshd.SshHostKeyModule;
import com.google.gerrit.sshd.SshKeyCacheImpl;
import com.google.gerrit.sshd.SshModule;
@@ -411,6 +412,7 @@
// work queue can get stuck waiting on index futures that will never return.
modules.add(createIndexModule());
+ modules.add(new SubscriptionGraph.Module());
modules.add(new WorkQueue.Module());
modules.add(new StreamEventsApiListener.Module());
modules.add(new EventBroker.Module());
diff --git a/java/com/google/gerrit/server/BUILD b/java/com/google/gerrit/server/BUILD
index 1c46ed6..291ba6d 100644
--- a/java/com/google/gerrit/server/BUILD
+++ b/java/com/google/gerrit/server/BUILD
@@ -54,6 +54,7 @@
"//java/com/google/gerrit/prettify:server",
"//java/com/google/gerrit/proto",
"//java/com/google/gerrit/server/cache/serialize",
+ "//java/com/google/gerrit/server/data",
"//java/com/google/gerrit/server/git/receive:ref_cache",
"//java/com/google/gerrit/server/ioutil",
"//java/com/google/gerrit/server/logging",
diff --git a/java/com/google/gerrit/server/account/ProjectWatches.java b/java/com/google/gerrit/server/account/ProjectWatches.java
index cf63346..6d84f20 100644
--- a/java/com/google/gerrit/server/account/ProjectWatches.java
+++ b/java/com/google/gerrit/server/account/ProjectWatches.java
@@ -219,7 +219,7 @@
int i = notifyValue.lastIndexOf('[');
if (i < 0 || notifyValue.charAt(notifyValue.length() - 1) != ']') {
validationErrorSink.error(
- new ValidationError(
+ ValidationError.create(
WATCH_CONFIG,
String.format(
"Invalid project watch of account %d for project %s: %s",
@@ -240,7 +240,7 @@
NotifyType notifyType = Enums.getIfPresent(NotifyType.class, nt).orNull();
if (notifyType == null) {
validationErrorSink.error(
- new ValidationError(
+ ValidationError.create(
WATCH_CONFIG,
String.format(
"Invalid notify type %s in project watch "
diff --git a/java/com/google/gerrit/server/account/StoredPreferences.java b/java/com/google/gerrit/server/account/StoredPreferences.java
index 573c619..79be9e5 100644
--- a/java/com/google/gerrit/server/account/StoredPreferences.java
+++ b/java/com/google/gerrit/server/account/StoredPreferences.java
@@ -183,7 +183,7 @@
return PreferencesParserUtil.parseGeneralPreferences(cfg, defaultCfg, input);
} catch (ConfigInvalidException e) {
validationErrorSink.error(
- new ValidationError(
+ ValidationError.create(
PREFERENCES_CONFIG,
String.format(
"Invalid general preferences for account %d: %s",
@@ -197,7 +197,7 @@
return PreferencesParserUtil.parseDiffPreferences(cfg, defaultCfg, input);
} catch (ConfigInvalidException e) {
validationErrorSink.error(
- new ValidationError(
+ ValidationError.create(
PREFERENCES_CONFIG,
String.format(
"Invalid diff preferences for account %d: %s", accountId.get(), e.getMessage())));
@@ -210,7 +210,7 @@
return PreferencesParserUtil.parseEditPreferences(cfg, defaultCfg, input);
} catch (ConfigInvalidException e) {
validationErrorSink.error(
- new ValidationError(
+ ValidationError.create(
PREFERENCES_CONFIG,
String.format(
"Invalid edit preferences for account %d: %s", accountId.get(), e.getMessage())));
diff --git a/java/com/google/gerrit/server/auth/ldap/LdapGroupBackend.java b/java/com/google/gerrit/server/auth/ldap/LdapGroupBackend.java
index 1d85a5e..e86439a 100644
--- a/java/com/google/gerrit/server/auth/ldap/LdapGroupBackend.java
+++ b/java/com/google/gerrit/server/auth/ldap/LdapGroupBackend.java
@@ -91,7 +91,7 @@
private static GroupReference groupReference(ParameterizedString p, LdapQuery.Result res)
throws NamingException {
- return new GroupReference(
+ return GroupReference.create(
AccountGroup.uuid(LDAP_UUID + res.getDN()), LDAP_NAME + LdapRealm.apply(p, res));
}
diff --git a/java/com/google/gerrit/server/change/LabelsJson.java b/java/com/google/gerrit/server/change/LabelsJson.java
index 2db17d6..739e263 100644
--- a/java/com/google/gerrit/server/change/LabelsJson.java
+++ b/java/com/google/gerrit/server/change/LabelsJson.java
@@ -122,7 +122,7 @@
if (rec.labels != null) {
for (SubmitRecord.Label r : rec.labels) {
LabelType type = labelTypes.byLabel(r.label);
- if (type != null && (!isMerged || type.allowPostSubmit())) {
+ if (type != null && (!isMerged || type.isAllowPostSubmit())) {
toCheck.put(type.getName(), type);
}
}
@@ -139,7 +139,7 @@
}
for (SubmitRecord.Label r : rec.labels) {
LabelType type = labelTypes.byLabel(r.label);
- if (type == null || (isMerged && !type.allowPostSubmit())) {
+ if (type == null || (isMerged && !type.isAllowPostSubmit())) {
continue;
}
diff --git a/java/com/google/gerrit/server/config/AllProjectsName.java b/java/com/google/gerrit/server/config/AllProjectsName.java
index 6d5525c..3a13a58 100644
--- a/java/com/google/gerrit/server/config/AllProjectsName.java
+++ b/java/com/google/gerrit/server/config/AllProjectsName.java
@@ -14,9 +14,15 @@
package com.google.gerrit.server.config;
+import com.google.errorprone.annotations.Immutable;
import com.google.gerrit.entities.Project;
-/** Special name of the project that all projects derive from. */
+/**
+ * Special name of the project that all projects derive from.
+ *
+ * <p>This class is immutable and thread safe.
+ */
+@Immutable
public class AllProjectsName extends Project.NameKey {
private static final long serialVersionUID = 1L;
diff --git a/java/com/google/gerrit/server/config/AllUsersName.java b/java/com/google/gerrit/server/config/AllUsersName.java
index aa92db8..393fb6b 100644
--- a/java/com/google/gerrit/server/config/AllUsersName.java
+++ b/java/com/google/gerrit/server/config/AllUsersName.java
@@ -14,9 +14,15 @@
package com.google.gerrit.server.config;
+import com.google.errorprone.annotations.Immutable;
import com.google.gerrit.entities.Project;
-/** Special name of the project in which meta data for all users is stored. */
+/**
+ * Special name of the project in which meta data for all users is stored.
+ *
+ * <p>This class is immutable and thread safe.
+ */
+@Immutable
public class AllUsersName extends Project.NameKey {
private static final long serialVersionUID = 1L;
diff --git a/java/com/google/gerrit/server/data/BUILD b/java/com/google/gerrit/server/data/BUILD
new file mode 100644
index 0000000..c3dc672
--- /dev/null
+++ b/java/com/google/gerrit/server/data/BUILD
@@ -0,0 +1,15 @@
+load("@rules_java//java:defs.bzl", "java_library")
+
+java_library(
+ name = "data",
+ srcs = glob(
+ ["*.java"],
+ ),
+ visibility = ["//visibility:public"],
+ deps = [
+ "//java/com/google/gerrit/entities",
+ "//java/com/google/gerrit/extensions:api",
+ "//java/org/apache/commons/net",
+ "//lib:gson",
+ ],
+)
diff --git a/java/com/google/gerrit/server/git/BranchOrderSection.java b/java/com/google/gerrit/server/git/BranchOrderSection.java
index 0266655..826067f 100644
--- a/java/com/google/gerrit/server/git/BranchOrderSection.java
+++ b/java/com/google/gerrit/server/git/BranchOrderSection.java
@@ -14,9 +14,12 @@
package com.google.gerrit.server.git;
+import static com.google.common.collect.ImmutableList.toImmutableList;
+
+import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import com.google.gerrit.entities.RefNames;
-import java.util.List;
+import java.util.Collection;
/**
* An ordering of branches by stability.
@@ -25,33 +28,36 @@
* into stable branches. This is configured by the {@code branchOrder.branch} project setting. This
* class represents the ordered list of branches, by increasing stability.
*/
-public class BranchOrderSection {
+@AutoValue
+public abstract class BranchOrderSection {
/**
* Branch names ordered from least to the most stable.
*
* <p>Typically the order will be like: master, stable-M.N, stable-M.N-1, ...
+ *
+ * <p>Ref names in this list are exactly as they appear in {@code project.config}
*/
- private final ImmutableList<String> order;
+ public abstract ImmutableList<String> order();
- public BranchOrderSection(String[] order) {
- if (order.length == 0) {
- this.order = ImmutableList.of();
- } else {
- ImmutableList.Builder<String> builder = ImmutableList.builder();
- for (String b : order) {
- builder.add(RefNames.fullName(b));
- }
- this.order = builder.build();
- }
+ public static BranchOrderSection create(Collection<String> order) {
+ // Do not mutate the given list as this will be written back to disk when ProjectConfig is
+ // stored.
+ return new AutoValue_BranchOrderSection(ImmutableList.copyOf(order));
}
- public String[] getMoreStable(String branch) {
- int i = order.indexOf(RefNames.fullName(branch));
+ /**
+ * Returns the tail list of branches that are more stable - so lower in the entire list ordered by
+ * priority compared to the provided branch. Always returns a fully qualified ref name (including
+ * the refs/heads/ prefix).
+ */
+ public ImmutableList<String> getMoreStable(String branch) {
+ ImmutableList<String> fullyQualifiedOrder =
+ order().stream().map(RefNames::fullName).collect(toImmutableList());
+ int i = fullyQualifiedOrder.indexOf(RefNames.fullName(branch));
if (0 <= i) {
- List<String> r = order.subList(i + 1, order.size());
- return r.toArray(new String[r.size()]);
+ return fullyQualifiedOrder.subList(i + 1, fullyQualifiedOrder.size());
}
- return new String[] {};
+ return ImmutableList.of();
}
}
diff --git a/java/com/google/gerrit/server/git/NotifyConfig.java b/java/com/google/gerrit/server/git/NotifyConfig.java
index 429f15a..1a1bbb6 100644
--- a/java/com/google/gerrit/server/git/NotifyConfig.java
+++ b/java/com/google/gerrit/server/git/NotifyConfig.java
@@ -14,113 +14,101 @@
package com.google.gerrit.server.git;
-import com.google.common.base.MoreObjects;
+import com.google.auto.value.AutoValue;
import com.google.common.base.Strings;
+import com.google.common.collect.ImmutableSet;
import com.google.gerrit.common.data.GroupReference;
import com.google.gerrit.mail.Address;
import com.google.gerrit.server.account.ProjectWatches.NotifyType;
import java.util.EnumSet;
-import java.util.HashSet;
import java.util.Set;
+import org.eclipse.jgit.annotations.Nullable;
-public class NotifyConfig implements Comparable<NotifyConfig> {
+@AutoValue
+public abstract class NotifyConfig implements Comparable<NotifyConfig> {
public enum Header {
TO,
CC,
BCC
}
- private String name;
- private EnumSet<NotifyType> types = EnumSet.of(NotifyType.ALL);
- private String filter;
+ @Nullable
+ public abstract String getName();
- private Header header;
- private Set<GroupReference> groups = new HashSet<>();
- private Set<Address> addresses = new HashSet<>();
+ public abstract ImmutableSet<NotifyType> getNotify();
- public String getName() {
- return name;
- }
+ @Nullable
+ public abstract String getFilter();
- public void setName(String name) {
- this.name = name;
- }
+ @Nullable
+ public abstract Header getHeader();
+
+ public abstract ImmutableSet<GroupReference> getGroups();
+
+ public abstract ImmutableSet<Address> getAddresses();
public boolean isNotify(NotifyType type) {
- return types.contains(type) || types.contains(NotifyType.ALL);
+ return getNotify().contains(type) || getNotify().contains(NotifyType.ALL);
}
- public Set<NotifyType> getNotify() {
- return types;
+ public static Builder builder() {
+ return new AutoValue_NotifyConfig.Builder()
+ .setNotify(ImmutableSet.copyOf(EnumSet.of(NotifyType.ALL)));
}
- public void setTypes(Set<NotifyType> newTypes) {
- types = EnumSet.copyOf(newTypes);
- }
+ @AutoValue.Builder
+ public abstract static class Builder {
+ public abstract Builder setName(String name);
- public String getFilter() {
- return filter;
- }
+ public abstract Builder setNotify(Set<NotifyType> newTypes);
- public void setFilter(String filter) {
- if ("*".equals(filter)) {
- this.filter = null;
- } else {
- this.filter = Strings.emptyToNull(filter);
+ public abstract Builder setFilter(@Nullable String filter);
+
+ public abstract Builder setHeader(Header hdr);
+
+ public Builder addGroup(GroupReference group) {
+ groupsBuilder().add(group);
+ return this;
+ }
+
+ public Builder addAddress(Address address) {
+ addressesBuilder().add(address);
+ return this;
+ }
+
+ protected abstract ImmutableSet.Builder<GroupReference> groupsBuilder();
+
+ protected abstract ImmutableSet.Builder<Address> addressesBuilder();
+
+ protected abstract NotifyConfig autoBuild();
+
+ protected abstract String getFilter();
+
+ public NotifyConfig build() {
+ if ("*".equals(getFilter())) {
+ setFilter(null);
+ } else {
+ setFilter(Strings.emptyToNull(getFilter()));
+ }
+ return autoBuild();
}
}
- public Header getHeader() {
- return header;
- }
-
- public void setHeader(Header hdr) {
- header = hdr;
- }
-
- public Set<GroupReference> getGroups() {
- return groups;
- }
-
- public Set<Address> getAddresses() {
- return addresses;
- }
-
- public void addEmail(GroupReference group) {
- groups.add(group);
- }
-
- public void addEmail(Address address) {
- addresses.add(address);
+ @Override
+ public final int compareTo(NotifyConfig o) {
+ return getName().compareTo(o.getName());
}
@Override
- public int compareTo(NotifyConfig o) {
- return name.compareTo(o.name);
+ public final int hashCode() {
+ return getName().hashCode();
}
@Override
- public int hashCode() {
- return name.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
+ public final boolean equals(Object obj) {
if (obj instanceof NotifyConfig) {
return compareTo((NotifyConfig) obj) == 0;
}
return false;
}
-
- @Override
- public String toString() {
- return MoreObjects.toStringHelper(this)
- .add("name", name)
- .add("addresses", addresses)
- .add("groups", groups)
- .add("header", header)
- .add("types", types)
- .add("filter", filter)
- .toString();
- }
}
diff --git a/java/com/google/gerrit/server/git/ValidationError.java b/java/com/google/gerrit/server/git/ValidationError.java
index 28d5171..3606c42 100644
--- a/java/com/google/gerrit/server/git/ValidationError.java
+++ b/java/com/google/gerrit/server/git/ValidationError.java
@@ -14,51 +14,26 @@
package com.google.gerrit.server.git;
-import java.util.Objects;
+import com.google.auto.value.AutoValue;
/** Indicates a problem with Git based data. */
-public class ValidationError {
- private final String message;
+@AutoValue
+public abstract class ValidationError {
+ public abstract String getMessage();
- public ValidationError(String file, String message) {
- this(file + ": " + message);
+ public static ValidationError create(String file, String message) {
+ return create(file + ": " + message);
}
- public ValidationError(String file, int line, String message) {
- this(file + ":" + line + ": " + message);
+ public static ValidationError create(String file, int line, String message) {
+ return create(file + ":" + line + ": " + message);
}
- public ValidationError(String message) {
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-
- @Override
- public String toString() {
- return "ValidationError[" + message + "]";
+ public static ValidationError create(String message) {
+ return new AutoValue_ValidationError(message);
}
public interface Sink {
void error(ValidationError error);
}
-
- @Override
- public boolean equals(Object o) {
- if (o == this) {
- return true;
- }
- if (o instanceof ValidationError) {
- ValidationError that = (ValidationError) o;
- return Objects.equals(this.message, that.message);
- }
- return false;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(message);
- }
}
diff --git a/java/com/google/gerrit/server/git/meta/TabFile.java b/java/com/google/gerrit/server/git/meta/TabFile.java
index c9a8e77..80570a5 100644
--- a/java/com/google/gerrit/server/git/meta/TabFile.java
+++ b/java/com/google/gerrit/server/git/meta/TabFile.java
@@ -59,7 +59,7 @@
int tab = s.indexOf('\t');
if (tab < 0) {
- errors.error(new ValidationError(filename, lineNumber, "missing tab delimiter"));
+ errors.error(ValidationError.create(filename, lineNumber, "missing tab delimiter"));
continue;
}
diff --git a/java/com/google/gerrit/server/group/SystemGroupBackend.java b/java/com/google/gerrit/server/group/SystemGroupBackend.java
index 7821a01..a446718 100644
--- a/java/com/google/gerrit/server/group/SystemGroupBackend.java
+++ b/java/com/google/gerrit/server/group/SystemGroupBackend.java
@@ -104,7 +104,7 @@
reservedNamesBuilder.add(defaultName);
String configuredName = cfg.getString("groups", uuid.get(), "name");
GroupReference ref =
- new GroupReference(uuid, MoreObjects.firstNonNull(configuredName, defaultName));
+ GroupReference.create(uuid, MoreObjects.firstNonNull(configuredName, defaultName));
n.put(ref.getName().toLowerCase(Locale.US), ref);
u.put(ref.getUUID(), ref);
}
diff --git a/java/com/google/gerrit/server/group/db/GroupNameNotes.java b/java/com/google/gerrit/server/group/db/GroupNameNotes.java
index 70d7a1a..b75670d 100644
--- a/java/com/google/gerrit/server/group/db/GroupNameNotes.java
+++ b/java/com/google/gerrit/server/group/db/GroupNameNotes.java
@@ -443,7 +443,7 @@
throw new ConfigInvalidException(String.format("UUID for group '%s' must be defined", name));
}
- return new GroupReference(AccountGroup.uuid(uuid), name);
+ return GroupReference.create(AccountGroup.uuid(uuid), name);
}
private String getCommitMessage() {
diff --git a/java/com/google/gerrit/server/group/db/RenameGroupOp.java b/java/com/google/gerrit/server/group/db/RenameGroupOp.java
index 420dd33e..4cc6138 100644
--- a/java/com/google/gerrit/server/group/db/RenameGroupOp.java
+++ b/java/com/google/gerrit/server/group/db/RenameGroupOp.java
@@ -125,7 +125,7 @@
return;
}
- ref.setName(newName);
+ config.renameGroup(uuid, newName);
md.getCommitBuilder().setAuthor(author);
md.setMessage("Rename group " + oldName + " to " + newName + "\n");
try {
diff --git a/java/com/google/gerrit/server/logging/BUILD b/java/com/google/gerrit/server/logging/BUILD
index 7af34f7..c60af0d 100644
--- a/java/com/google/gerrit/server/logging/BUILD
+++ b/java/com/google/gerrit/server/logging/BUILD
@@ -3,7 +3,7 @@
java_library(
name = "logging",
srcs = glob(
- ["**/*.java"],
+ ["*.java"],
),
visibility = ["//visibility:public"],
deps = [
diff --git a/java/com/google/gerrit/server/notedb/ChangeUpdate.java b/java/com/google/gerrit/server/notedb/ChangeUpdate.java
index 348ab7d..1c81694 100644
--- a/java/com/google/gerrit/server/notedb/ChangeUpdate.java
+++ b/java/com/google/gerrit/server/notedb/ChangeUpdate.java
@@ -659,7 +659,9 @@
addFooter(msg, e.getValue().getFooterKey());
noteUtil.appendAccountIdIdentString(msg, e.getKey()).append('\n');
}
+
applyReviewerUpdatesToAttentionSet();
+
for (Map.Entry<Address, ReviewerStateInternal> e : reviewersByEmail.entrySet()) {
addFooter(msg, e.getValue().getByEmailFooterKey(), e.getKey().toString());
}
@@ -766,8 +768,10 @@
private void applyReviewerUpdatesToAttentionSet() {
if ((workInProgress != null && workInProgress == true)
- || getNotes().getChange().isWorkInProgress()) {
- // Users shouldn't be added to the attention set if the change is work in progress.
+ || getNotes().getChange().isWorkInProgress()
+ || status == Change.Status.MERGED) {
+ // Attention set shouldn't change here for changes that are work in progress or are about to
+ // be submitted.
return;
}
Set<Account.Id> currentReviewers =
diff --git a/java/com/google/gerrit/server/project/CommentLinkInfoImpl.java b/java/com/google/gerrit/server/project/CommentLinkInfoImpl.java
deleted file mode 100644
index 35de963..0000000
--- a/java/com/google/gerrit/server/project/CommentLinkInfoImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (C) 2012 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gerrit.server.project;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-import com.google.common.base.Strings;
-import com.google.gerrit.extensions.api.projects.CommentLinkInfo;
-
-/** Info about a single commentlink section in a config. */
-public class CommentLinkInfoImpl extends CommentLinkInfo {
- public static class Enabled extends CommentLinkInfoImpl {
- public Enabled(String name) {
- super(name, true);
- }
-
- @Override
- boolean isOverrideOnly() {
- return true;
- }
- }
-
- public static class Disabled extends CommentLinkInfoImpl {
- public Disabled(String name) {
- super(name, false);
- }
-
- @Override
- boolean isOverrideOnly() {
- return true;
- }
- }
-
- public CommentLinkInfoImpl(String name, String match, String link, String html, Boolean enabled) {
- checkArgument(name != null, "invalid commentlink.name");
- checkArgument(!Strings.isNullOrEmpty(match), "invalid commentlink.%s.match", name);
- link = Strings.emptyToNull(link);
- html = Strings.emptyToNull(html);
- checkArgument(
- (link != null && html == null) || (link == null && html != null),
- "commentlink.%s must have either link or html",
- name);
- this.name = name;
- this.match = match;
- this.link = link;
- this.html = html;
- this.enabled = enabled;
- }
-
- private CommentLinkInfoImpl(CommentLinkInfo src, boolean enabled) {
- this.name = src.name;
- this.match = src.match;
- this.link = src.link;
- this.html = src.html;
- this.enabled = enabled;
- }
-
- private CommentLinkInfoImpl(String name, boolean enabled) {
- this.name = name;
- this.match = null;
- this.link = null;
- this.html = null;
- this.enabled = enabled;
- }
-
- boolean isOverrideOnly() {
- return false;
- }
-
- CommentLinkInfo inherit(CommentLinkInfo src) {
- return new CommentLinkInfoImpl(src, enabled);
- }
-}
diff --git a/java/com/google/gerrit/server/project/CommentLinkProvider.java b/java/com/google/gerrit/server/project/CommentLinkProvider.java
index 4987d00..500e163 100644
--- a/java/com/google/gerrit/server/project/CommentLinkProvider.java
+++ b/java/com/google/gerrit/server/project/CommentLinkProvider.java
@@ -47,12 +47,12 @@
List<CommentLinkInfo> cls = Lists.newArrayListWithCapacity(subsections.size());
for (String name : subsections) {
try {
- CommentLinkInfoImpl cl = ProjectConfig.buildCommentLink(cfg, name, true);
- if (cl.isOverrideOnly()) {
+ StoredCommentLinkInfo cl = ProjectConfig.buildCommentLink(cfg, name, true);
+ if (cl.getOverrideOnly()) {
logger.atWarning().log("commentlink %s empty except for \"enabled\"", name);
continue;
}
- cls.add(cl);
+ cls.add(cl.toInfo());
} catch (IllegalArgumentException e) {
logger.atWarning().log("invalid commentlink: %s", e.getMessage());
}
diff --git a/java/com/google/gerrit/server/project/ConfiguredMimeTypes.java b/java/com/google/gerrit/server/project/ConfiguredMimeTypes.java
index a6661f7..0447edb 100644
--- a/java/com/google/gerrit/server/project/ConfiguredMimeTypes.java
+++ b/java/com/google/gerrit/server/project/ConfiguredMimeTypes.java
@@ -14,35 +14,38 @@
package com.google.gerrit.server.project;
+import com.google.auto.value.AutoValue;
+import com.google.common.collect.ImmutableList;
import com.google.common.flogger.FluentLogger;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
+import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.errors.InvalidPatternException;
import org.eclipse.jgit.fnmatch.FileNameMatcher;
import org.eclipse.jgit.lib.Config;
-public class ConfiguredMimeTypes {
+@AutoValue
+public abstract class ConfiguredMimeTypes {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
private static final String MIMETYPE = "mimetype";
private static final String KEY_PATH = "path";
- private final List<TypeMatcher> matchers;
+ protected abstract ImmutableList<TypeMatcher> matchers();
- ConfiguredMimeTypes(String projectName, Config rc) {
+ static ConfiguredMimeTypes create(String projectName, Config rc) {
Set<String> types = rc.getSubsections(MIMETYPE);
- if (types.isEmpty()) {
- matchers = Collections.emptyList();
- } else {
- matchers = new ArrayList<>();
+ ImmutableList.Builder<TypeMatcher> matchers = ImmutableList.builder();
+ if (!types.isEmpty()) {
for (String typeName : types) {
for (String path : rc.getStringList(MIMETYPE, typeName, KEY_PATH)) {
try {
- add(typeName, path);
+ if (path.startsWith("^")) {
+ matchers.add(new ReType(typeName, path));
+ } else {
+ matchers.add(new FnType(typeName, path));
+ }
} catch (PatternSyntaxException | InvalidPatternException e) {
logger.atWarning().log(
"Ignoring invalid %s.%s.%s = %s in project %s: %s",
@@ -51,19 +54,12 @@
}
}
}
+ return new AutoValue_ConfiguredMimeTypes(matchers.build());
}
- private void add(String typeName, String path)
- throws PatternSyntaxException, InvalidPatternException {
- if (path.startsWith("^")) {
- matchers.add(new ReType(typeName, path));
- } else {
- matchers.add(new FnType(typeName, path));
- }
- }
-
+ @Nullable
public String getMimeType(String path) {
- for (TypeMatcher m : matchers) {
+ for (TypeMatcher m : matchers()) {
if (m.matches(path)) {
return m.type;
}
@@ -71,42 +67,42 @@
return null;
}
- private abstract static class TypeMatcher {
- final String type;
+ protected abstract static class TypeMatcher {
+ private final String type;
- TypeMatcher(String type) {
+ private TypeMatcher(String type) {
this.type = type;
}
- abstract boolean matches(String path);
+ protected abstract boolean matches(String path);
}
- private static class FnType extends TypeMatcher {
+ protected static class FnType extends TypeMatcher {
private final FileNameMatcher matcher;
- FnType(String type, String pattern) throws InvalidPatternException {
+ private FnType(String type, String pattern) throws InvalidPatternException {
super(type);
this.matcher = new FileNameMatcher(pattern, null);
}
@Override
- boolean matches(String input) {
+ protected boolean matches(String input) {
FileNameMatcher m = new FileNameMatcher(matcher);
m.append(input);
return m.isMatch();
}
}
- private static class ReType extends TypeMatcher {
+ protected static class ReType extends TypeMatcher {
private final Pattern re;
- ReType(String type, String pattern) throws PatternSyntaxException {
+ private ReType(String type, String pattern) throws PatternSyntaxException {
super(type);
this.re = Pattern.compile(pattern);
}
@Override
- boolean matches(String input) {
+ protected boolean matches(String input) {
return re.matcher(input).matches();
}
}
diff --git a/java/com/google/gerrit/server/project/GroupList.java b/java/com/google/gerrit/server/project/GroupList.java
index ba7dc95..7237bb6 100644
--- a/java/com/google/gerrit/server/project/GroupList.java
+++ b/java/com/google/gerrit/server/project/GroupList.java
@@ -15,6 +15,7 @@
package com.google.gerrit.server.project;
import com.google.common.flogger.FluentLogger;
+import com.google.gerrit.common.Nullable;
import com.google.gerrit.common.data.GroupReference;
import com.google.gerrit.entities.AccountGroup;
import com.google.gerrit.entities.Project;
@@ -56,7 +57,7 @@
}
AccountGroup.UUID uuid = AccountGroup.uuid(row.left);
String name = row.right;
- GroupReference ref = new GroupReference(uuid, name);
+ GroupReference ref = GroupReference.create(uuid, name);
groupsByUUID.put(uuid, ref);
}
@@ -64,10 +65,26 @@
return new GroupList(groupsByUUID);
}
+ @Nullable
public GroupReference byUUID(AccountGroup.UUID uuid) {
return byUUID.get(uuid);
}
+ @Nullable
+ public GroupReference byName(String name) {
+ return byUUID.entrySet().stream()
+ .map(Map.Entry::getValue)
+ .filter(groupReference -> name.equals(groupReference.getName()))
+ .findAny()
+ .orElse(null);
+ }
+
+ /**
+ * Returns the {@link GroupReference} instance that {@link GroupList} holds on to that has the
+ * same {@link com.google.gerrit.entities.AccountGroup.UUID} as the argument. Will store the
+ * argument internally, if no group with this {@link com.google.gerrit.entities.AccountGroup.UUID}
+ * was stored previously.
+ */
public GroupReference resolve(GroupReference group) {
if (group != null) {
if (group.getUUID() == null || group.getUUID().get() == null) {
@@ -86,6 +103,10 @@
return group;
}
+ public void renameGroup(AccountGroup.UUID uuid, String name) {
+ byUUID.replace(uuid, GroupReference.create(uuid, name));
+ }
+
public Collection<GroupReference> references() {
return byUUID.values();
}
diff --git a/java/com/google/gerrit/server/project/LabelDefinitionJson.java b/java/com/google/gerrit/server/project/LabelDefinitionJson.java
index 0452d0b..9ff079f 100644
--- a/java/com/google/gerrit/server/project/LabelDefinitionJson.java
+++ b/java/com/google/gerrit/server/project/LabelDefinitionJson.java
@@ -31,7 +31,7 @@
labelType.getValues().stream().collect(toMap(LabelValue::formatValue, LabelValue::getText));
label.defaultValue = labelType.getDefaultValue();
label.branches = labelType.getRefPatterns() != null ? labelType.getRefPatterns() : null;
- label.canOverride = toBoolean(labelType.canOverride());
+ label.canOverride = toBoolean(labelType.isCanOverride());
label.copyAnyScore = toBoolean(labelType.isCopyAnyScore());
label.copyMinScore = toBoolean(labelType.isCopyMinScore());
label.copyMaxScore = toBoolean(labelType.isCopyMaxScore());
@@ -41,8 +41,8 @@
label.copyAllScoresOnMergeFirstParentUpdate =
toBoolean(labelType.isCopyAllScoresOnMergeFirstParentUpdate());
label.copyValues = labelType.getCopyValues().isEmpty() ? null : labelType.getCopyValues();
- label.allowPostSubmit = toBoolean(labelType.allowPostSubmit());
- label.ignoreSelfApproval = toBoolean(labelType.ignoreSelfApproval());
+ label.allowPostSubmit = toBoolean(labelType.isAllowPostSubmit());
+ label.ignoreSelfApproval = toBoolean(labelType.isIgnoreSelfApproval());
return label;
}
diff --git a/java/com/google/gerrit/server/project/ProjectConfig.java b/java/com/google/gerrit/server/project/ProjectConfig.java
index 4ab583d..35257ef 100644
--- a/java/com/google/gerrit/server/project/ProjectConfig.java
+++ b/java/com/google/gerrit/server/project/ProjectConfig.java
@@ -15,6 +15,7 @@
package com.google.gerrit.server.project;
import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.gerrit.common.data.Permission.isPermission;
import static com.google.gerrit.entities.Project.DEFAULT_SUBMIT_TYPE;
@@ -81,6 +82,7 @@
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
+import java.util.function.Consumer;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import org.eclipse.jgit.errors.ConfigInvalidException;
@@ -91,7 +93,6 @@
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.storage.file.FileBasedConfig;
-import org.eclipse.jgit.transport.RefSpec;
import org.eclipse.jgit.util.FS;
public class ProjectConfig extends VersionedMetaData implements ValidationError.Sink {
@@ -241,7 +242,7 @@
private Map<String, LabelType> labelSections;
private ConfiguredMimeTypes mimeTypes;
private Map<Project.NameKey, SubscribeSection> subscribeSections;
- private Map<String, CommentLinkInfoImpl> commentLinkSections;
+ private Map<String, StoredCommentLinkInfo> commentLinkSections;
private List<ValidationError> validationErrors;
private ObjectId rulesId;
private long maxObjectSizeLimit;
@@ -250,9 +251,8 @@
private Set<String> sectionsWithUnknownPermissions;
private boolean hasLegacyPermissions;
private Map<String, List<String>> extensionPanelSections;
- private Map<String, GroupReference> groupsByName;
- public static CommentLinkInfoImpl buildCommentLink(Config cfg, String name, boolean allowRaw)
+ public static StoredCommentLinkInfo buildCommentLink(Config cfg, String name, boolean allowRaw)
throws IllegalArgumentException {
String match = cfg.getString(COMMENTLINK, name, KEY_MATCH);
if (match != null) {
@@ -282,15 +282,21 @@
&& !hasHtml
&& enabled != null) {
if (enabled) {
- return new CommentLinkInfoImpl.Enabled(name);
+ return StoredCommentLinkInfo.enabled(name);
}
- return new CommentLinkInfoImpl.Disabled(name);
+ return StoredCommentLinkInfo.disabled(name);
}
- return new CommentLinkInfoImpl(name, match, link, html, enabled);
+ return StoredCommentLinkInfo.builder(name)
+ .setMatch(match)
+ .setLink(link)
+ .setHtml(html)
+ .setEnabled(enabled)
+ .setOverrideOnly(false)
+ .build();
}
- public void addCommentLinkSection(CommentLinkInfoImpl commentLink) {
- commentLinkSections.put(commentLink.name, commentLink);
+ public void addCommentLinkSection(StoredCommentLinkInfo commentLink) {
+ commentLinkSections.put(commentLink.getName(), commentLink);
}
public void removeCommentLinkSection(String name) {
@@ -325,6 +331,16 @@
return project;
}
+ public void setProject(Project.Builder project) {
+ this.project = project.build();
+ }
+
+ public void updateProject(Consumer<Project.Builder> update) {
+ Project.Builder builder = project.toBuilder();
+ update.accept(builder);
+ project = builder.build();
+ }
+
public AccountsSection getAccountsSection() {
return accountsSection;
}
@@ -358,6 +374,10 @@
return branchOrderSection;
}
+ public void setBranchOrderSection(BranchOrderSection branchOrderSection) {
+ this.branchOrderSection = branchOrderSection;
+ }
+
public Map<Project.NameKey, SubscribeSection> getSubscribeSections() {
return subscribeSections;
}
@@ -373,7 +393,7 @@
}
public void addSubscribeSection(SubscribeSection s) {
- subscribeSections.put(s.getProject(), s);
+ subscribeSections.put(s.project(), s);
}
public void remove(AccessSection section) {
@@ -476,7 +496,21 @@
return labelSections;
}
- public Collection<CommentLinkInfoImpl> getCommentLinkSections() {
+ /** Adds or replaces the given {@link LabelType} in this config. */
+ public void upsertLabelType(LabelType labelType) {
+ labelSections.put(labelType.getName(), labelType);
+ }
+
+ /** Allows a mutation of an existing {@link LabelType}. */
+ public void updateLabelType(String name, Consumer<LabelType.Builder> update) {
+ LabelType labelType = labelSections.get(name);
+ checkState(labelType != null, "labelType must not be null");
+ LabelType.Builder builder = labelSections.get(name).toBuilder();
+ update.accept(builder);
+ upsertLabelType(builder.build());
+ }
+
+ public Collection<StoredCommentLinkInfo> getCommentLinkSections() {
return commentLinkSections.values();
}
@@ -485,13 +519,11 @@
}
public GroupReference resolve(GroupReference group) {
- GroupReference groupRef = groupList.resolve(group);
- if (groupRef != null
- && groupRef.getUUID() != null
- && !groupsByName.containsKey(groupRef.getName())) {
- groupsByName.put(groupRef.getName(), groupRef);
- }
- return groupRef;
+ return groupList.resolve(group);
+ }
+
+ public void renameGroup(AccountGroup.UUID uuid, String newName) {
+ groupList.renameGroup(uuid, newName);
}
/** @return the group reference, if the group is used by at least one rule. */
@@ -504,7 +536,7 @@
* at least one rule or plugin value.
*/
public GroupReference getGroup(String groupName) {
- return groupsByName.get(groupName);
+ return groupList.byName(groupName);
}
/** @return set of all groups used by this configuration. */
@@ -541,7 +573,7 @@
GroupDescription.Basic g = groupBackend.get(ref.getUUID());
if (g != null && !g.getName().equals(ref.getName())) {
dirty = true;
- ref.setName(g.getName());
+ groupList.renameGroup(ref.getUUID(), g.getName());
}
}
return dirty;
@@ -570,17 +602,11 @@
baseConfig.load();
}
readGroupList();
- groupsByName = mapGroupReferences();
rulesId = getObjectId("rules.pl");
Config rc = readConfig(PROJECT_CONFIG, baseConfig);
- project = new Project(projectName);
-
- Project p = project;
- p.setDescription(rc.getString(PROJECT, null, KEY_DESCRIPTION));
- if (p.getDescription() == null) {
- p.setDescription("");
- }
+ Project.Builder p = Project.builder(projectName);
+ p.setDescription(Strings.nullToEmpty(rc.getString(PROJECT, null, KEY_DESCRIPTION)));
if (revision != null) {
p.setConfigRefState(revision.toObjectId().name());
}
@@ -588,9 +614,9 @@
if (rc.getStringList(ACCESS, null, KEY_INHERIT_FROM).length > 1) {
// The config must not contain more than one parent to inherit from
// as there is no guarantee which of the parents would be used then.
- error(new ValidationError(PROJECT_CONFIG, "Cannot inherit from multiple projects"));
+ error(ValidationError.create(PROJECT_CONFIG, "Cannot inherit from multiple projects"));
}
- p.setParentName(rc.getString(ACCESS, null, KEY_INHERIT_FROM));
+ p.setParent(rc.getString(ACCESS, null, KEY_INHERIT_FROM));
for (BooleanProjectConfig config : BooleanProjectConfig.values()) {
p.setBooleanConfig(
@@ -610,6 +636,7 @@
p.setDefaultDashboard(rc.getString(DASHBOARD, null, KEY_DEFAULT));
p.setLocalDefaultDashboard(rc.getString(DASHBOARD, null, KEY_LOCAL_DEFAULT));
+ this.project = p.build();
loadAccountsSection(rc);
loadContributorAgreements(rc);
@@ -619,7 +646,7 @@
loadLabelSections(rc);
loadCommentLinkSections(rc);
loadSubscribeSections(rc);
- mimeTypes = new ConfiguredMimeTypes(projectName.get(), rc);
+ mimeTypes = ConfiguredMimeTypes.create(projectName.get(), rc);
loadPluginSections(rc);
loadReceiveSection(rc);
loadExtensionPanelSections(rc);
@@ -628,7 +655,7 @@
private void loadAccountsSection(Config rc) {
accountsSection = new AccountsSection();
accountsSection.setSameGroupVisibility(
- loadPermissionRules(rc, ACCOUNTS, null, KEY_SAME_GROUP_VISIBILITY, groupsByName, false));
+ loadPermissionRules(rc, ACCOUNTS, null, KEY_SAME_GROUP_VISIBILITY, false));
}
private void loadExtensionPanelSections(Config rc) {
@@ -638,7 +665,7 @@
String lower = name.toLowerCase();
if (lowerNames.containsKey(lower)) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
String.format(
"Extension Panels \"%s\" conflicts with \"%s\"", name, lowerNames.get(lower))));
@@ -656,20 +683,18 @@
ContributorAgreement ca = getContributorAgreement(name, true);
ca.setDescription(rc.getString(CONTRIBUTOR_AGREEMENT, name, KEY_DESCRIPTION));
ca.setAgreementUrl(rc.getString(CONTRIBUTOR_AGREEMENT, name, KEY_AGREEMENT_URL));
- ca.setAccepted(
- loadPermissionRules(rc, CONTRIBUTOR_AGREEMENT, name, KEY_ACCEPTED, groupsByName, false));
+ ca.setAccepted(loadPermissionRules(rc, CONTRIBUTOR_AGREEMENT, name, KEY_ACCEPTED, false));
ca.setExcludeProjectsRegexes(
loadPatterns(rc, CONTRIBUTOR_AGREEMENT, name, KEY_EXCLUDE_PROJECTS));
ca.setMatchProjectsRegexes(loadPatterns(rc, CONTRIBUTOR_AGREEMENT, name, KEY_MATCH_PROJECTS));
List<PermissionRule> rules =
- loadPermissionRules(
- rc, CONTRIBUTOR_AGREEMENT, name, KEY_AUTO_VERIFY, groupsByName, false);
+ loadPermissionRules(rc, CONTRIBUTOR_AGREEMENT, name, KEY_AUTO_VERIFY, false);
if (rules.isEmpty()) {
ca.setAutoVerify(null);
} else if (rules.size() > 1) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
"Invalid rule in "
+ CONTRIBUTOR_AGREEMENT
@@ -680,7 +705,7 @@
+ ": at most one group may be set"));
} else if (rules.get(0).getAction() != Action.ALLOW) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
"Invalid rule in "
+ CONTRIBUTOR_AGREEMENT
@@ -716,45 +741,44 @@
private void loadNotifySections(Config rc) {
notifySections = new HashMap<>();
for (String sectionName : rc.getSubsections(NOTIFY)) {
- NotifyConfig n = new NotifyConfig();
+ NotifyConfig.Builder n = NotifyConfig.builder();
n.setName(sectionName);
n.setFilter(rc.getString(NOTIFY, sectionName, KEY_FILTER));
EnumSet<NotifyType> types = EnumSet.noneOf(NotifyType.class);
types.addAll(ConfigUtil.getEnumList(rc, NOTIFY, sectionName, KEY_TYPE, NotifyType.ALL));
- n.setTypes(types);
+ n.setNotify(types);
n.setHeader(rc.getEnum(NOTIFY, sectionName, KEY_HEADER, NotifyConfig.Header.BCC));
for (String dst : rc.getStringList(NOTIFY, sectionName, KEY_EMAIL)) {
String groupName = GroupReference.extractGroupName(dst);
if (groupName != null) {
- GroupReference ref = groupsByName.get(groupName);
+ GroupReference ref = groupList.byName(groupName);
if (ref == null) {
- ref = new GroupReference(groupName);
- groupsByName.put(ref.getName(), ref);
+ ref = groupList.resolve(GroupReference.create(groupName));
}
if (ref.getUUID() != null) {
- n.addEmail(ref);
+ n.addGroup(ref);
} else {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
"group \"" + ref.getName() + "\" not in " + GroupList.FILE_NAME));
}
} else if (dst.startsWith("user ")) {
- error(new ValidationError(PROJECT_CONFIG, dst + " not supported"));
+ error(ValidationError.create(PROJECT_CONFIG, dst + " not supported"));
} else {
try {
- n.addEmail(Address.parse(dst));
+ n.addAddress(Address.parse(dst));
} catch (IllegalArgumentException err) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
"notify section \"" + sectionName + "\" has invalid email \"" + dst + "\""));
}
}
}
- notifySections.put(sectionName, n);
+ notifySections.put(sectionName, n.build());
}
}
@@ -779,13 +803,7 @@
if (isCoreOrPluginPermission(convertedName)) {
Permission perm = as.getPermission(convertedName, true);
loadPermissionRules(
- rc,
- ACCESS,
- refName,
- varName,
- groupsByName,
- perm,
- Permission.hasRange(convertedName));
+ rc, ACCESS, refName, varName, perm, Permission.hasRange(convertedName));
} else {
sectionsWithUnknownPermissions.add(as.getName());
}
@@ -800,8 +818,7 @@
accessSections.put(AccessSection.GLOBAL_CAPABILITIES, capability);
}
Permission perm = capability.getPermission(varName, true);
- loadPermissionRules(
- rc, CAPABILITY, null, varName, groupsByName, perm, GlobalCapability.hasRange(varName));
+ loadPermissionRules(rc, CAPABILITY, null, varName, perm, GlobalCapability.hasRange(varName));
}
}
@@ -815,7 +832,7 @@
try {
RefPattern.validateRegExp(refPattern);
} catch (InvalidNameException e) {
- error(new ValidationError(PROJECT_CONFIG, "Invalid ref name: " + e.getMessage()));
+ error(ValidationError.create(PROJECT_CONFIG, "Invalid ref name: " + e.getMessage()));
return false;
}
return true;
@@ -823,7 +840,14 @@
private void loadBranchOrderSection(Config rc) {
if (rc.getSections().contains(BRANCH_ORDER)) {
- branchOrderSection = new BranchOrderSection(rc.getStringList(BRANCH_ORDER, null, BRANCH));
+ branchOrderSection =
+ BranchOrderSection.create(Arrays.asList(rc.getStringList(BRANCH_ORDER, null, BRANCH)));
+ }
+ }
+
+ private void saveBranchOrderSection(Config rc) {
+ if (branchOrderSection != null) {
+ rc.setStringList(BRANCH_ORDER, null, BRANCH, branchOrderSection.order());
}
}
@@ -836,7 +860,9 @@
// to fail fast if any of the patterns are invalid.
patterns.add(Pattern.compile(patternString).pattern());
} catch (PatternSyntaxException e) {
- error(new ValidationError(PROJECT_CONFIG, "Invalid regular expression: " + e.getMessage()));
+ error(
+ ValidationError.create(
+ PROJECT_CONFIG, "Invalid regular expression: " + e.getMessage()));
continue;
}
}
@@ -844,14 +870,9 @@
}
private ImmutableList<PermissionRule> loadPermissionRules(
- Config rc,
- String section,
- String subsection,
- String varName,
- Map<String, GroupReference> groupsByName,
- boolean useRange) {
+ Config rc, String section, String subsection, String varName, boolean useRange) {
Permission perm = new Permission(varName);
- loadPermissionRules(rc, section, subsection, varName, groupsByName, perm, useRange);
+ loadPermissionRules(rc, section, subsection, varName, perm, useRange);
return ImmutableList.copyOf(perm.getRules());
}
@@ -860,7 +881,6 @@
String section,
String subsection,
String varName,
- Map<String, GroupReference> groupsByName,
Permission perm,
boolean useRange) {
for (String ruleString : rc.getStringList(section, subsection, varName)) {
@@ -869,7 +889,7 @@
rule = PermissionRule.fromString(ruleString, useRange);
} catch (IllegalArgumentException notRule) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
"Invalid rule in "
+ section
@@ -881,16 +901,15 @@
continue;
}
- GroupReference ref = groupsByName.get(rule.getGroup().getName());
+ GroupReference ref = groupList.byName(rule.getGroup().getName());
if (ref == null) {
// The group wasn't mentioned in the groups table, so there is
// no valid UUID for it. Pool the reference anyway so at least
// all rules in the same file share the same GroupReference.
//
- ref = rule.getGroup();
- groupsByName.put(ref.getName(), ref);
+ ref = groupList.resolve(rule.getGroup());
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG, "group \"" + ref.getName() + "\" not in " + GroupList.FILE_NAME));
}
@@ -907,7 +926,7 @@
throw new IllegalArgumentException("empty value");
}
String valueText = parts.size() > 1 ? parts.get(1) : "";
- return new LabelValue(Shorts.checkedCast(PermissionRule.parseInt(parts.get(0))), valueText);
+ return LabelValue.create(Shorts.checkedCast(PermissionRule.parseInt(parts.get(0))), valueText);
}
private void loadLabelSections(Config rc) {
@@ -917,7 +936,7 @@
String lower = name.toLowerCase();
if (lowerNames.containsKey(lower)) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
String.format("Label \"%s\" conflicts with \"%s\"", name, lowerNames.get(lower))));
}
@@ -932,13 +951,13 @@
values.add(labelValue);
} else {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
String.format("Duplicate %s \"%s\" for label \"%s\"", KEY_VALUE, value, name)));
}
} catch (IllegalArgumentException notValue) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
String.format(
"Invalid %s \"%s\" for label \"%s\": %s",
@@ -946,11 +965,11 @@
}
}
- LabelType label;
+ LabelType.Builder label;
try {
- label = new LabelType(name, values);
+ label = LabelType.builder(name, values);
} catch (IllegalArgumentException badName) {
- error(new ValidationError(PROJECT_CONFIG, String.format("Invalid label \"%s\"", name)));
+ error(ValidationError.create(PROJECT_CONFIG, String.format("Invalid label \"%s\"", name)));
continue;
}
@@ -961,7 +980,7 @@
: Optional.of(LabelFunction.MAX_WITH_BLOCK);
if (!function.isPresent()) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
String.format(
"Invalid %s for label \"%s\". Valid names are: %s",
@@ -975,7 +994,7 @@
label.setDefaultValue(dv);
} else {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
String.format(
"Invalid %s \"%s\" for label \"%s\"", KEY_DEFAULT_VALUE, dv, name)));
@@ -1021,14 +1040,14 @@
short copyValue = Shorts.checkedCast(PermissionRule.parseInt(value));
if (!copyValues.add(copyValue)) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
String.format(
"Duplicate %s \"%s\" for label \"%s\"", KEY_COPY_VALUE, value, name)));
}
} catch (IllegalArgumentException notValue) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
String.format(
"Invalid %s \"%s\" for label \"%s\": %s",
@@ -1038,8 +1057,9 @@
label.setCopyValues(copyValues);
label.setCanOverride(
rc.getBoolean(LABEL, name, KEY_CAN_OVERRIDE, LabelType.DEF_CAN_OVERRIDE));
- label.setRefPatterns(getStringListOrNull(rc, LABEL, name, KEY_BRANCH));
- labelSections.put(name, label);
+ List<String> refPatterns = getStringListOrNull(rc, LABEL, name, KEY_BRANCH);
+ label.setRefPatterns(refPatterns == null ? null : ImmutableList.copyOf(refPatterns));
+ labelSections.put(name, label.build());
}
}
@@ -1066,14 +1086,14 @@
commentLinkSections.put(name, buildCommentLink(rc, name, false));
} catch (PatternSyntaxException e) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
String.format(
"Invalid pattern \"%s\" in commentlink.%s.match: %s",
rc.getString(COMMENTLINK, name, KEY_MATCH), name, e.getMessage())));
} catch (IllegalArgumentException e) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG,
String.format(
"Error in pattern \"%s\" in commentlink.%s.match: %s",
@@ -1088,7 +1108,7 @@
try {
for (String projectName : subsections) {
Project.NameKey p = Project.nameKey(projectName);
- SubscribeSection ss = new SubscribeSection(p);
+ SubscribeSection.Builder ss = SubscribeSection.builder(p);
for (String s :
rc.getStringList(SUBSCRIBE_SECTION, projectName, SUBSCRIBE_MULTI_MATCH_REFS)) {
ss.addMultiMatchRefSpec(s);
@@ -1096,7 +1116,7 @@
for (String s : rc.getStringList(SUBSCRIBE_SECTION, projectName, SUBSCRIBE_MATCH_REFS)) {
ss.addMatchingRefSpec(s);
}
- subscribeSections.put(p, ss);
+ subscribeSections.put(p, ss.build());
}
} catch (IllegalArgumentException e) {
throw new ConfigInvalidException(e.getMessage());
@@ -1117,10 +1137,10 @@
String value = rc.getString(PLUGIN, plugin, name);
String groupName = GroupReference.extractGroupName(value);
if (groupName != null) {
- GroupReference ref = groupsByName.get(groupName);
+ GroupReference ref = groupList.byName(groupName);
if (ref == null) {
error(
- new ValidationError(
+ ValidationError.create(
PROJECT_CONFIG, "group \"" + groupName + "\" not in " + GroupList.FILE_NAME));
}
rc.setString(PLUGIN, plugin, name, value);
@@ -1144,16 +1164,6 @@
groupList = GroupList.parse(projectName, readUTF8(GroupList.FILE_NAME), this);
}
- private Map<String, GroupReference> mapGroupReferences() {
- Collection<GroupReference> references = groupList.references();
- Map<String, GroupReference> result = new HashMap<>(references.size());
- for (GroupReference ref : references) {
- result.put(ref.getName(), ref);
- }
-
- return result;
- }
-
@Override
protected boolean onSave(CommitBuilder commit) throws IOException, ConfigInvalidException {
if (commit.getMessage() == null || "".equals(commit.getMessage())) {
@@ -1187,7 +1197,7 @@
KEY_MAX_OBJECT_SIZE_LIMIT,
validMaxObjectSizeLimit(p.getMaxObjectSizeLimit()));
- set(rc, SUBMIT, null, KEY_ACTION, p.getConfiguredSubmitType(), DEFAULT_SUBMIT_TYPE);
+ set(rc, SUBMIT, null, KEY_ACTION, p.getSubmitType(), DEFAULT_SUBMIT_TYPE);
set(rc, PROJECT, null, KEY_STATE, p.getState(), DEFAULT_STATE_VALUE);
@@ -1204,6 +1214,7 @@
saveLabelSections(rc);
saveCommentLinkSections(rc);
saveSubscribeSections(rc);
+ saveBranchOrderSection(rc);
saveConfig(PROJECT_CONFIG, rc);
saveGroupList();
@@ -1252,16 +1263,16 @@
private void saveCommentLinkSections(Config rc) {
unsetSection(rc, COMMENTLINK);
if (commentLinkSections != null) {
- for (CommentLinkInfoImpl cm : commentLinkSections.values()) {
- rc.setString(COMMENTLINK, cm.name, KEY_MATCH, cm.match);
- if (!Strings.isNullOrEmpty(cm.html)) {
- rc.setString(COMMENTLINK, cm.name, KEY_HTML, cm.html);
+ for (StoredCommentLinkInfo cm : commentLinkSections.values()) {
+ rc.setString(COMMENTLINK, cm.getName(), KEY_MATCH, cm.getMatch());
+ if (!Strings.isNullOrEmpty(cm.getHtml())) {
+ rc.setString(COMMENTLINK, cm.getName(), KEY_HTML, cm.getHtml());
}
- if (!Strings.isNullOrEmpty(cm.link)) {
- rc.setString(COMMENTLINK, cm.name, KEY_LINK, cm.link);
+ if (!Strings.isNullOrEmpty(cm.getLink())) {
+ rc.setString(COMMENTLINK, cm.getName(), KEY_LINK, cm.getLink());
}
- if (cm.enabled != null && !cm.enabled) {
- rc.setBoolean(COMMENTLINK, cm.name, KEY_ENABLED, cm.enabled);
+ if (cm.getEnabled() != null && !cm.getEnabled()) {
+ rc.setBoolean(COMMENTLINK, cm.getName(), KEY_ENABLED, cm.getEnabled());
}
}
}
@@ -1456,14 +1467,14 @@
LABEL,
name,
KEY_ALLOW_POST_SUBMIT,
- label.allowPostSubmit(),
+ label.isAllowPostSubmit(),
LabelType.DEF_ALLOW_POST_SUBMIT);
setBooleanConfigKey(
rc,
LABEL,
name,
KEY_IGNORE_SELF_APPROVAL,
- label.ignoreSelfApproval(),
+ label.isIgnoreSelfApproval(),
LabelType.DEF_IGNORE_SELF_APPROVAL);
setBooleanConfigKey(
rc,
@@ -1520,7 +1531,7 @@
KEY_COPY_VALUE,
label.getCopyValues().stream().map(LabelValue::formatValue).collect(toList()));
setBooleanConfigKey(
- rc, LABEL, name, KEY_CAN_OVERRIDE, label.canOverride(), LabelType.DEF_CAN_OVERRIDE);
+ rc, LABEL, name, KEY_CAN_OVERRIDE, label.isCanOverride(), LabelType.DEF_CAN_OVERRIDE);
List<String> values = new ArrayList<>(label.getValues().size());
for (LabelValue value : label.getValues()) {
values.add(value.format().trim());
@@ -1558,7 +1569,7 @@
String value = pluginConfig.getString(PLUGIN, plugin, name);
String groupName = GroupReference.extractGroupName(value);
if (groupName != null) {
- GroupReference ref = groupsByName.get(groupName);
+ GroupReference ref = groupList.byName(groupName);
if (ref != null && ref.getUUID() != null) {
keepGroups.add(ref.getUUID());
pluginConfig.setString(PLUGIN, plugin, name, "group " + ref.getName());
@@ -1578,14 +1589,14 @@
for (Project.NameKey p : subscribeSections.keySet()) {
SubscribeSection s = subscribeSections.get(p);
List<String> matchings = new ArrayList<>();
- for (RefSpec r : s.getMatchingRefSpecs()) {
- matchings.add(r.toString());
+ for (String r : s.matchingRefSpecsAsString()) {
+ matchings.add(r);
}
rc.setStringList(SUBSCRIBE_SECTION, p.get(), SUBSCRIBE_MATCH_REFS, matchings);
List<String> multimatchs = new ArrayList<>();
- for (RefSpec r : s.getMultiMatchRefSpecs()) {
- multimatchs.add(r.toString());
+ for (String r : s.multiMatchRefSpecsAsString()) {
+ multimatchs.add(r);
}
rc.setStringList(SUBSCRIBE_SECTION, p.get(), SUBSCRIBE_MULTI_MATCH_REFS, multimatchs);
}
@@ -1603,7 +1614,7 @@
try {
return rc.getEnum(section, subsection, name, defaultValue);
} catch (IllegalArgumentException err) {
- error(new ValidationError(PROJECT_CONFIG, err.getMessage()));
+ error(ValidationError.create(PROJECT_CONFIG, err.getMessage()));
return defaultValue;
}
}
diff --git a/java/com/google/gerrit/server/project/ProjectCreator.java b/java/com/google/gerrit/server/project/ProjectCreator.java
index cc10f27..6ffbdef 100644
--- a/java/com/google/gerrit/server/project/ProjectCreator.java
+++ b/java/com/google/gerrit/server/project/ProjectCreator.java
@@ -17,6 +17,7 @@
import static com.google.gerrit.server.project.ProjectCache.illegalState;
import com.google.common.base.MoreObjects;
+import com.google.common.base.Strings;
import com.google.common.flogger.FluentLogger;
import com.google.gerrit.common.data.AccessSection;
import com.google.gerrit.common.data.GroupDescription;
@@ -150,26 +151,32 @@
try (MetaDataUpdate md = metaDataUpdateFactory.create(args.getProject())) {
ProjectConfig config = projectConfigFactory.read(md);
- Project newProject = config.getProject();
- newProject.setDescription(args.projectDescription);
- newProject.setSubmitType(
- MoreObjects.firstNonNull(
- args.submitType, repositoryCfg.getDefaultSubmitType(args.getProject())));
- newProject.setBooleanConfig(
- BooleanProjectConfig.USE_CONTRIBUTOR_AGREEMENTS, args.contributorAgreements);
- newProject.setBooleanConfig(BooleanProjectConfig.USE_SIGNED_OFF_BY, args.signedOffBy);
- newProject.setBooleanConfig(BooleanProjectConfig.USE_CONTENT_MERGE, args.contentMerge);
- newProject.setBooleanConfig(
- BooleanProjectConfig.CREATE_NEW_CHANGE_FOR_ALL_NOT_IN_TARGET,
- args.newChangeForAllNotInTarget);
- newProject.setBooleanConfig(BooleanProjectConfig.REQUIRE_CHANGE_ID, args.changeIdRequired);
- newProject.setBooleanConfig(BooleanProjectConfig.REJECT_EMPTY_COMMIT, args.rejectEmptyCommit);
- newProject.setMaxObjectSizeLimit(args.maxObjectSizeLimit);
- newProject.setBooleanConfig(BooleanProjectConfig.ENABLE_SIGNED_PUSH, args.enableSignedPush);
- newProject.setBooleanConfig(BooleanProjectConfig.REQUIRE_SIGNED_PUSH, args.requireSignedPush);
- if (args.newParent != null) {
- newProject.setParentName(args.newParent);
- }
+ config.updateProject(
+ newProject -> {
+ newProject.setDescription(Strings.nullToEmpty(args.projectDescription));
+ newProject.setSubmitType(
+ MoreObjects.firstNonNull(
+ args.submitType, repositoryCfg.getDefaultSubmitType(args.getProject())));
+ newProject.setBooleanConfig(
+ BooleanProjectConfig.USE_CONTRIBUTOR_AGREEMENTS, args.contributorAgreements);
+ newProject.setBooleanConfig(BooleanProjectConfig.USE_SIGNED_OFF_BY, args.signedOffBy);
+ newProject.setBooleanConfig(BooleanProjectConfig.USE_CONTENT_MERGE, args.contentMerge);
+ newProject.setBooleanConfig(
+ BooleanProjectConfig.CREATE_NEW_CHANGE_FOR_ALL_NOT_IN_TARGET,
+ args.newChangeForAllNotInTarget);
+ newProject.setBooleanConfig(
+ BooleanProjectConfig.REQUIRE_CHANGE_ID, args.changeIdRequired);
+ newProject.setBooleanConfig(
+ BooleanProjectConfig.REJECT_EMPTY_COMMIT, args.rejectEmptyCommit);
+ newProject.setMaxObjectSizeLimit(args.maxObjectSizeLimit);
+ newProject.setBooleanConfig(
+ BooleanProjectConfig.ENABLE_SIGNED_PUSH, args.enableSignedPush);
+ newProject.setBooleanConfig(
+ BooleanProjectConfig.REQUIRE_SIGNED_PUSH, args.requireSignedPush);
+ if (args.newParent != null) {
+ newProject.setParent(args.newParent);
+ }
+ });
if (!args.ownerIds.isEmpty()) {
AccessSection all = config.getAccessSection(AccessSection.ALL, true);
diff --git a/java/com/google/gerrit/server/project/ProjectState.java b/java/com/google/gerrit/server/project/ProjectState.java
index efadcc8..6353103 100644
--- a/java/com/google/gerrit/server/project/ProjectState.java
+++ b/java/com/google/gerrit/server/project/ProjectState.java
@@ -402,7 +402,7 @@
for (LabelType type : s.getConfig().getLabelSections().values()) {
String lower = type.getName().toLowerCase();
LabelType old = types.get(lower);
- if (old == null || old.canOverride()) {
+ if (old == null || old.isCanOverride()) {
types.put(lower, type);
}
}
@@ -457,16 +457,16 @@
cls.put(cl.name.toLowerCase(), cl);
}
for (ProjectState s : treeInOrder()) {
- for (CommentLinkInfoImpl cl : s.getConfig().getCommentLinkSections()) {
- String name = cl.name.toLowerCase();
- if (cl.isOverrideOnly()) {
+ for (StoredCommentLinkInfo cl : s.getConfig().getCommentLinkSections()) {
+ String name = cl.getName().toLowerCase();
+ if (cl.getOverrideOnly()) {
CommentLinkInfo parent = cls.get(name);
if (parent == null) {
continue; // Ignore invalid overrides.
}
- cls.put(name, cl.inherit(parent));
+ cls.put(name, StoredCommentLinkInfo.fromInfo(parent, cl.getEnabled()).toInfo());
} else {
- cls.put(name, cl);
+ cls.put(name, cl.toInfo());
}
}
}
@@ -501,7 +501,7 @@
public SubmitType getSubmitType() {
for (ProjectState s : tree()) {
- SubmitType t = s.getProject().getConfiguredSubmitType();
+ SubmitType t = s.getProject().getSubmitType();
if (t != SubmitType.INHERIT) {
return t;
}
diff --git a/java/com/google/gerrit/server/project/RefValidationHelper.java b/java/com/google/gerrit/server/project/RefValidationHelper.java
index 9b297f9..1912660 100644
--- a/java/com/google/gerrit/server/project/RefValidationHelper.java
+++ b/java/com/google/gerrit/server/project/RefValidationHelper.java
@@ -43,7 +43,7 @@
throws ResourceConflictException {
RefOperationValidators refValidators =
refValidatorsFactory.create(
- new Project(Project.nameKey(projectName)),
+ Project.builder(Project.nameKey(projectName)).build(),
user,
RefOperationValidators.getCommand(update, operationType));
try {
diff --git a/java/com/google/gerrit/server/project/StoredCommentLinkInfo.java b/java/com/google/gerrit/server/project/StoredCommentLinkInfo.java
new file mode 100644
index 0000000..4e311b8
--- /dev/null
+++ b/java/com/google/gerrit/server/project/StoredCommentLinkInfo.java
@@ -0,0 +1,133 @@
+// Copyright (C) 2012 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.project;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+import com.google.auto.value.AutoValue;
+import com.google.common.base.Strings;
+import com.google.gerrit.common.Nullable;
+import com.google.gerrit.extensions.api.projects.CommentLinkInfo;
+
+/** Info about a single commentlink section in a config. */
+@AutoValue
+public abstract class StoredCommentLinkInfo {
+ public abstract String getName();
+
+ /** A regular expression to match for the commentlink to apply. */
+ @Nullable
+ public abstract String getMatch();
+
+ /** The link to replace the match with. This can only be set if html is {@code null}. */
+ @Nullable
+ public abstract String getLink();
+
+ /** The html to replace the match with. This can only be set if link is {@code null}. */
+ @Nullable
+ public abstract String getHtml();
+
+ /** Weather this comment link is active. {@code null} means true. */
+ @Nullable
+ public abstract Boolean getEnabled();
+
+ /** If set, {@link StoredCommentLinkInfo} has to be overriden to take any effect. */
+ public abstract boolean getOverrideOnly();
+
+ /**
+ * Creates an enabled {@link StoredCommentLinkInfo} that can be overriden but doesn't do anything
+ * on its own.
+ */
+ public static StoredCommentLinkInfo enabled(String name) {
+ return builder(name).setOverrideOnly(true).build();
+ }
+
+ /**
+ * Creates a disabled {@link StoredCommentLinkInfo} that can be overriden but doesn't do anything
+ * on it's own.
+ */
+ public static StoredCommentLinkInfo disabled(String name) {
+ return builder(name).setOverrideOnly(true).build();
+ }
+
+ /** Creates and returns a new {@link StoredCommentLinkInfo.Builder} instance. */
+ public static Builder builder(String name) {
+ checkArgument(name != null, "invalid commentlink.name");
+ return new AutoValue_StoredCommentLinkInfo.Builder().setName(name).setOverrideOnly(false);
+ }
+
+ /** Creates and returns a new {@link StoredCommentLinkInfo} instance with the same values. */
+ static StoredCommentLinkInfo fromInfo(CommentLinkInfo src, boolean enabled) {
+ return builder(src.name)
+ .setMatch(src.match)
+ .setLink(src.link)
+ .setHtml(src.html)
+ .setEnabled(enabled)
+ .setOverrideOnly(false)
+ .build();
+ }
+
+ /** Returns an {@link CommentLinkInfo} instance with the same values. */
+ CommentLinkInfo toInfo() {
+ CommentLinkInfo info = new CommentLinkInfo();
+ info.name = getName();
+ info.match = getMatch();
+ info.link = getLink();
+ info.html = getHtml();
+ info.enabled = getEnabled();
+ return info;
+ }
+
+ @AutoValue.Builder
+ public abstract static class Builder {
+ public abstract Builder setName(String value);
+
+ public abstract Builder setMatch(@Nullable String value);
+
+ public abstract Builder setLink(@Nullable String value);
+
+ public abstract Builder setHtml(@Nullable String value);
+
+ public abstract Builder setEnabled(@Nullable Boolean value);
+
+ public abstract Builder setOverrideOnly(boolean value);
+
+ public StoredCommentLinkInfo build() {
+ checkArgument(getName() != null, "invalid commentlink.name");
+ setLink(Strings.emptyToNull(getLink()));
+ setHtml(Strings.emptyToNull(getHtml()));
+ if (!getOverrideOnly()) {
+ checkArgument(
+ !Strings.isNullOrEmpty(getMatch()), "invalid commentlink.%s.match", getName());
+ checkArgument(
+ (getLink() != null && getHtml() == null) || (getLink() == null && getHtml() != null),
+ "commentlink.%s must have either link or html",
+ getName());
+ }
+ return autoBuild();
+ }
+
+ protected abstract StoredCommentLinkInfo autoBuild();
+
+ protected abstract String getName();
+
+ protected abstract String getMatch();
+
+ protected abstract String getLink();
+
+ protected abstract String getHtml();
+
+ protected abstract boolean getOverrideOnly();
+ }
+}
diff --git a/java/com/google/gerrit/server/project/testing/TestLabels.java b/java/com/google/gerrit/server/project/testing/TestLabels.java
index 6c2ddde..2c0b23c 100644
--- a/java/com/google/gerrit/server/project/testing/TestLabels.java
+++ b/java/com/google/gerrit/server/project/testing/TestLabels.java
@@ -35,18 +35,23 @@
}
public static LabelType patchSetLock() {
- LabelType label =
- label("Patch-Set-Lock", value(1, "Patch Set Locked"), value(0, "Patch Set Unlocked"));
+ LabelType.Builder label =
+ labelBuilder(
+ "Patch-Set-Lock", value(1, "Patch Set Locked"), value(0, "Patch Set Unlocked"));
label.setFunction(LabelFunction.PATCH_SET_LOCK);
- return label;
+ return label.build();
}
public static LabelValue value(int value, String text) {
- return new LabelValue((short) value, text);
+ return LabelValue.create((short) value, text);
}
public static LabelType label(String name, LabelValue... values) {
- return new LabelType(name, Arrays.asList(values));
+ return labelBuilder(name, values).build();
+ }
+
+ public static LabelType.Builder labelBuilder(String name, LabelValue... values) {
+ return LabelType.builder(name, Arrays.asList(values));
}
private TestLabels() {}
diff --git a/java/com/google/gerrit/server/restapi/change/Mergeable.java b/java/com/google/gerrit/server/restapi/change/Mergeable.java
index b84b5e3..6fccdd1 100644
--- a/java/com/google/gerrit/server/restapi/change/Mergeable.java
+++ b/java/com/google/gerrit/server/restapi/change/Mergeable.java
@@ -41,6 +41,7 @@
import com.google.inject.Inject;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.Future;
@@ -118,8 +119,9 @@
BranchOrderSection branchOrder = projectState.getBranchOrderSection();
if (branchOrder != null) {
int prefixLen = Constants.R_HEADS.length();
- String[] names = branchOrder.getMoreStable(ref.getName());
- Map<String, Ref> refs = git.getRefDatabase().exactRef(names);
+ List<String> names = branchOrder.getMoreStable(ref.getName());
+ Map<String, Ref> refs =
+ git.getRefDatabase().exactRef(names.toArray(new String[names.size()]));
for (String n : names) {
Ref other = refs.get(n);
if (other == null) {
diff --git a/java/com/google/gerrit/server/restapi/change/PostReview.java b/java/com/google/gerrit/server/restapi/change/PostReview.java
index 6edbdb0..85079e2 100644
--- a/java/com/google/gerrit/server/restapi/change/PostReview.java
+++ b/java/com/google/gerrit/server/restapi/change/PostReview.java
@@ -1319,7 +1319,7 @@
for (PatchSetApproval psa : del) {
LabelType lt = requireNonNull(labelTypes.byLabel(psa.label()));
String normName = lt.getName();
- if (!lt.allowPostSubmit()) {
+ if (!lt.isAllowPostSubmit()) {
disallowed.add(normName);
}
Short prev = previous.get(normName);
@@ -1331,7 +1331,7 @@
for (PatchSetApproval psa : ups) {
LabelType lt = requireNonNull(labelTypes.byLabel(psa.label()));
String normName = lt.getName();
- if (!lt.allowPostSubmit()) {
+ if (!lt.isAllowPostSubmit()) {
disallowed.add(normName);
}
Short prev = previous.get(normName);
diff --git a/java/com/google/gerrit/server/restapi/change/PostReviewAttentionSet.java b/java/com/google/gerrit/server/restapi/change/PostReviewAttentionSet.java
index 3541ef0..aeb2c2e 100644
--- a/java/com/google/gerrit/server/restapi/change/PostReviewAttentionSet.java
+++ b/java/com/google/gerrit/server/restapi/change/PostReviewAttentionSet.java
@@ -158,7 +158,7 @@
private void processManualUpdates(BatchUpdate bu, RevisionResource revision, ReviewInput input)
throws BadRequestException, IOException, PermissionBackendException,
UnprocessableEntityException, ConfigInvalidException {
- Set<Account.Id> accountsChangedInCommit = new HashSet();
+ Set<Account.Id> accountsChangedInCommit = new HashSet<>();
// If we specify a user to remove, and the user is in the attention set, we remove it.
if (input.removeFromAttentionSet != null) {
for (AttentionSetInput remove : input.removeFromAttentionSet) {
diff --git a/java/com/google/gerrit/server/restapi/project/ConfigInfoImpl.java b/java/com/google/gerrit/server/restapi/project/ConfigInfoImpl.java
index 5deace9..783b39b 100644
--- a/java/com/google/gerrit/server/restapi/project/ConfigInfoImpl.java
+++ b/java/com/google/gerrit/server/restapi/project/ConfigInfoImpl.java
@@ -77,8 +77,7 @@
this.defaultSubmitType.value = projectState.getSubmitType();
this.defaultSubmitType.configuredValue =
MoreObjects.firstNonNull(
- projectState.getConfig().getProject().getConfiguredSubmitType(),
- Project.DEFAULT_SUBMIT_TYPE);
+ projectState.getConfig().getProject().getSubmitType(), Project.DEFAULT_SUBMIT_TYPE);
ProjectState parent =
projectState.isAllProjects() ? projectState : projectState.parents().get(0);
this.defaultSubmitType.inheritedValue = parent.getSubmitType();
diff --git a/java/com/google/gerrit/server/restapi/project/CreateLabel.java b/java/com/google/gerrit/server/restapi/project/CreateLabel.java
index a85ad39..1c19eb0 100644
--- a/java/com/google/gerrit/server/restapi/project/CreateLabel.java
+++ b/java/com/google/gerrit/server/restapi/project/CreateLabel.java
@@ -134,15 +134,15 @@
throw new BadRequestException("values are required");
}
- List<LabelValue> values = LabelDefinitionInputParser.parseValues(input.values);
-
- LabelType labelType;
try {
- labelType = new LabelType(label, values);
+ LabelType.checkName(label);
} catch (IllegalArgumentException e) {
throw new BadRequestException("invalid name: " + label, e);
}
+ List<LabelValue> values = LabelDefinitionInputParser.parseValues(input.values);
+ LabelType.Builder labelType = LabelType.builder(LabelType.checkName(label), values);
+
if (input.function != null && !input.function.trim().isEmpty()) {
labelType.setFunction(LabelDefinitionInputParser.parseFunction(input.function));
} else {
@@ -203,8 +203,9 @@
labelType.setIgnoreSelfApproval(input.ignoreSelfApproval);
}
- config.getLabelSections().put(labelType.getName(), labelType);
+ LabelType lt = labelType.build();
+ config.upsertLabelType(lt);
- return labelType;
+ return lt;
}
}
diff --git a/java/com/google/gerrit/server/restapi/project/GetConfig.java b/java/com/google/gerrit/server/restapi/project/GetConfig.java
index ce45e7d..ad66587 100644
--- a/java/com/google/gerrit/server/restapi/project/GetConfig.java
+++ b/java/com/google/gerrit/server/restapi/project/GetConfig.java
@@ -24,6 +24,9 @@
import com.google.gerrit.server.config.PluginConfigFactory;
import com.google.gerrit.server.config.ProjectConfigEntry;
import com.google.gerrit.server.extensions.webui.UiActions;
+import com.google.gerrit.server.permissions.PermissionBackend;
+import com.google.gerrit.server.permissions.PermissionBackendException;
+import com.google.gerrit.server.permissions.ProjectPermission;
import com.google.gerrit.server.project.ProjectResource;
import com.google.inject.Inject;
import com.google.inject.Singleton;
@@ -34,6 +37,7 @@
private final DynamicMap<ProjectConfigEntry> pluginConfigEntries;
private final PluginConfigFactory cfgFactory;
private final AllProjectsName allProjects;
+ private final PermissionBackend permissionBackend;
private final UiActions uiActions;
private final DynamicMap<RestView<ProjectResource>> views;
@@ -43,24 +47,31 @@
DynamicMap<ProjectConfigEntry> pluginConfigEntries,
PluginConfigFactory cfgFactory,
AllProjectsName allProjects,
+ PermissionBackend permissionBackend,
UiActions uiActions,
DynamicMap<RestView<ProjectResource>> views) {
this.serverEnableSignedPush = serverEnableSignedPush;
this.pluginConfigEntries = pluginConfigEntries;
this.allProjects = allProjects;
this.cfgFactory = cfgFactory;
+ this.permissionBackend = permissionBackend;
this.uiActions = uiActions;
this.views = views;
}
@Override
- public Response<ConfigInfo> apply(ProjectResource resource) {
+ public Response<ConfigInfo> apply(ProjectResource resource) throws PermissionBackendException {
+ boolean readConfigAllowed =
+ permissionBackend
+ .currentUser()
+ .project(resource.getNameKey())
+ .test(ProjectPermission.READ_CONFIG);
return Response.ok(
new ConfigInfoImpl(
serverEnableSignedPush,
resource.getProjectState(),
resource.getUser(),
- pluginConfigEntries,
+ readConfigAllowed ? pluginConfigEntries : DynamicMap.emptyMap(),
cfgFactory,
allProjects,
uiActions,
diff --git a/java/com/google/gerrit/server/restapi/project/LabelDefinitionInputParser.java b/java/com/google/gerrit/server/restapi/project/LabelDefinitionInputParser.java
index 1e288f4..ccc216d 100644
--- a/java/com/google/gerrit/server/restapi/project/LabelDefinitionInputParser.java
+++ b/java/com/google/gerrit/server/restapi/project/LabelDefinitionInputParser.java
@@ -14,6 +14,7 @@
package com.google.gerrit.server.restapi.project;
+import com.google.common.collect.ImmutableList;
import com.google.common.primitives.Shorts;
import com.google.gerrit.common.data.LabelFunction;
import com.google.gerrit.common.data.LabelType;
@@ -56,21 +57,22 @@
if (valueDescription.isEmpty()) {
throw new BadRequestException("description for value '" + e.getKey() + "' cannot be empty");
}
- valueList.add(new LabelValue(value, valueDescription));
+ valueList.add(LabelValue.create(value, valueDescription));
}
return valueList;
}
- public static short parseDefaultValue(LabelType labelType, short defaultValue)
+ public static short parseDefaultValue(LabelType.Builder labelType, short defaultValue)
throws BadRequestException {
- if (labelType.getValue(defaultValue) == null) {
+ if (!labelType.getValues().stream().anyMatch(v -> v.getValue() == defaultValue)) {
throw new BadRequestException("invalid default value: " + defaultValue);
}
return defaultValue;
}
- public static List<String> parseBranches(List<String> branches) throws BadRequestException {
- List<String> validBranches = new ArrayList<>();
+ public static ImmutableList<String> parseBranches(List<String> branches)
+ throws BadRequestException {
+ ImmutableList.Builder<String> validBranches = ImmutableList.builder();
for (String branch : branches) {
String newBranch = branch.trim();
if (newBranch.isEmpty()) {
@@ -86,7 +88,7 @@
}
validBranches.add(newBranch);
}
- return validBranches;
+ return validBranches.build();
}
private LabelDefinitionInputParser() {}
diff --git a/java/com/google/gerrit/server/restapi/project/PutConfig.java b/java/com/google/gerrit/server/restapi/project/PutConfig.java
index 9f9433b..658f57e 100644
--- a/java/com/google/gerrit/server/restapi/project/PutConfig.java
+++ b/java/com/google/gerrit/server/restapi/project/PutConfig.java
@@ -134,28 +134,25 @@
try (MetaDataUpdate md = metaDataUpdateFactory.get().create(projectName)) {
ProjectConfig projectConfig = projectConfigFactory.read(md);
- Project p = projectConfig.getProject();
-
- p.setDescription(Strings.emptyToNull(input.description));
-
- for (BooleanProjectConfig cfg : BooleanProjectConfig.values()) {
- InheritableBoolean val = BooleanProjectConfigTransformations.get(cfg, input);
- if (val != null) {
- p.setBooleanConfig(cfg, val);
- }
- }
-
- if (input.maxObjectSizeLimit != null) {
- p.setMaxObjectSizeLimit(input.maxObjectSizeLimit);
- }
-
- if (input.submitType != null) {
- p.setSubmitType(input.submitType);
- }
-
- if (input.state != null) {
- p.setState(input.state);
- }
+ projectConfig.updateProject(
+ p -> {
+ p.setDescription(Strings.emptyToNull(input.description));
+ for (BooleanProjectConfig cfg : BooleanProjectConfig.values()) {
+ InheritableBoolean val = BooleanProjectConfigTransformations.get(cfg, input);
+ if (val != null) {
+ p.setBooleanConfig(cfg, val);
+ }
+ }
+ if (input.maxObjectSizeLimit != null) {
+ p.setMaxObjectSizeLimit(input.maxObjectSizeLimit);
+ }
+ if (input.submitType != null) {
+ p.setSubmitType(input.submitType);
+ }
+ if (input.state != null) {
+ p.setState(input.state);
+ }
+ });
if (input.pluginConfigValues != null) {
setPluginConfigValues(projectState, projectConfig, input.pluginConfigValues);
@@ -169,7 +166,7 @@
try {
projectConfig.commit(md);
projectCache.evict(projectConfig.getProject());
- md.getRepository().setGitwebDescription(p.getDescription());
+ md.getRepository().setGitwebDescription(projectConfig.getProject().getDescription());
} catch (IOException e) {
if (e.getCause() instanceof ConfigInvalidException) {
throw new ResourceConflictException(
diff --git a/java/com/google/gerrit/server/restapi/project/PutDescription.java b/java/com/google/gerrit/server/restapi/project/PutDescription.java
index a0b9feb..a65c626 100644
--- a/java/com/google/gerrit/server/restapi/project/PutDescription.java
+++ b/java/com/google/gerrit/server/restapi/project/PutDescription.java
@@ -16,7 +16,6 @@
import com.google.common.base.MoreObjects;
import com.google.common.base.Strings;
-import com.google.gerrit.entities.Project;
import com.google.gerrit.extensions.api.projects.DescriptionInput;
import com.google.gerrit.extensions.restapi.AuthException;
import com.google.gerrit.extensions.restapi.ResourceConflictException;
@@ -73,8 +72,8 @@
try (MetaDataUpdate md = updateFactory.get().create(resource.getNameKey())) {
ProjectConfig config = projectConfigFactory.read(md);
- Project project = config.getProject();
- project.setDescription(Strings.emptyToNull(input.description));
+ String desc = input.description;
+ config.updateProject(p -> p.setDescription(Strings.emptyToNull(desc)));
String msg =
MoreObjects.firstNonNull(
@@ -86,11 +85,11 @@
md.setMessage(msg);
config.commit(md);
cache.evict(resource.getProjectState().getProject());
- md.getRepository().setGitwebDescription(project.getDescription());
+ md.getRepository().setGitwebDescription(config.getProject().getDescription());
- return Strings.isNullOrEmpty(project.getDescription())
+ return Strings.isNullOrEmpty(config.getProject().getDescription())
? Response.none()
- : Response.ok(project.getDescription());
+ : Response.ok(config.getProject().getDescription());
} catch (RepositoryNotFoundException notFound) {
throw new ResourceNotFoundException(resource.getName(), notFound);
} catch (ConfigInvalidException e) {
diff --git a/java/com/google/gerrit/server/restapi/project/SetAccessUtil.java b/java/com/google/gerrit/server/restapi/project/SetAccessUtil.java
index 5d5e779..390dea9 100644
--- a/java/com/google/gerrit/server/restapi/project/SetAccessUtil.java
+++ b/java/com/google/gerrit/server/restapi/project/SetAccessUtil.java
@@ -243,7 +243,7 @@
} catch (UnprocessableEntityException e) {
throw new ResourceConflictException(e.getMessage(), e);
}
- config.getProject().setParentName(newParentProjectName);
+ config.updateProject(p -> p.setParent(newParentProjectName));
}
}
diff --git a/java/com/google/gerrit/server/restapi/project/SetDefaultDashboard.java b/java/com/google/gerrit/server/restapi/project/SetDefaultDashboard.java
index 9920be0..5aef76a 100644
--- a/java/com/google/gerrit/server/restapi/project/SetDefaultDashboard.java
+++ b/java/com/google/gerrit/server/restapi/project/SetDefaultDashboard.java
@@ -16,7 +16,6 @@
import com.google.common.base.MoreObjects;
import com.google.common.base.Strings;
-import com.google.gerrit.entities.Project;
import com.google.gerrit.extensions.api.projects.DashboardInfo;
import com.google.gerrit.extensions.api.projects.SetDashboardInput;
import com.google.gerrit.extensions.restapi.BadRequestException;
@@ -97,11 +96,11 @@
try (MetaDataUpdate md = updateFactory.create(rsrc.getProjectState().getNameKey())) {
ProjectConfig config = projectConfigFactory.read(md);
- Project project = config.getProject();
+ String id = input.id;
if (inherited) {
- project.setDefaultDashboard(input.id);
+ config.updateProject(p -> p.setDefaultDashboard(id));
} else {
- project.setLocalDefaultDashboard(input.id);
+ config.updateProject(p -> p.setLocalDefaultDashboard(id));
}
String msg =
diff --git a/java/com/google/gerrit/server/restapi/project/SetLabel.java b/java/com/google/gerrit/server/restapi/project/SetLabel.java
index 0a35865..ade274a 100644
--- a/java/com/google/gerrit/server/restapi/project/SetLabel.java
+++ b/java/com/google/gerrit/server/restapi/project/SetLabel.java
@@ -88,6 +88,9 @@
} else {
md.setMessage("Update label");
}
+ String newName = Strings.nullToEmpty(input.name).trim();
+ labelType =
+ config.getLabelSections().get(newName.isEmpty() ? labelType.getName() : newName);
config.commit(md);
projectCache.evict(rsrc.getProject().getProjectState().getProject());
@@ -109,8 +112,7 @@
public boolean updateLabel(ProjectConfig config, LabelType labelType, LabelDefinitionInput input)
throws BadRequestException, ResourceConflictException {
boolean dirty = false;
-
- config.getLabelSections().remove(labelType.getName());
+ LabelType.Builder labelTypeBuilder = labelType.toBuilder();
if (input.name != null) {
String newName = input.name.trim();
@@ -130,10 +132,12 @@
}
try {
- labelType.setName(newName);
+ LabelType.checkName(newName);
} catch (IllegalArgumentException e) {
throw new BadRequestException("invalid name: " + input.name, e);
}
+
+ labelTypeBuilder.setName(newName);
dirty = true;
}
}
@@ -142,7 +146,7 @@
if (input.function.trim().isEmpty()) {
throw new BadRequestException("function cannot be empty");
}
- labelType.setFunction(LabelDefinitionInputParser.parseFunction(input.function));
+ labelTypeBuilder.setFunction(LabelDefinitionInputParser.parseFunction(input.function));
dirty = true;
}
@@ -150,77 +154,79 @@
if (input.values.isEmpty()) {
throw new BadRequestException("values cannot be empty");
}
- labelType.setValues(LabelDefinitionInputParser.parseValues(input.values));
+ labelTypeBuilder.setValues(LabelDefinitionInputParser.parseValues(input.values));
dirty = true;
}
if (input.defaultValue != null) {
- labelType.setDefaultValue(
- LabelDefinitionInputParser.parseDefaultValue(labelType, input.defaultValue));
+ labelTypeBuilder.setDefaultValue(
+ LabelDefinitionInputParser.parseDefaultValue(labelTypeBuilder, input.defaultValue));
dirty = true;
}
if (input.branches != null) {
- labelType.setRefPatterns(LabelDefinitionInputParser.parseBranches(input.branches));
+ labelTypeBuilder.setRefPatterns(LabelDefinitionInputParser.parseBranches(input.branches));
dirty = true;
}
if (input.canOverride != null) {
- labelType.setCanOverride(input.canOverride);
+ labelTypeBuilder.setCanOverride(input.canOverride);
dirty = true;
}
if (input.copyAnyScore != null) {
- labelType.setCopyAnyScore(input.copyAnyScore);
+ labelTypeBuilder.setCopyAnyScore(input.copyAnyScore);
dirty = true;
}
if (input.copyMinScore != null) {
- labelType.setCopyMinScore(input.copyMinScore);
+ labelTypeBuilder.setCopyMinScore(input.copyMinScore);
dirty = true;
}
if (input.copyMaxScore != null) {
- labelType.setCopyMaxScore(input.copyMaxScore);
+ labelTypeBuilder.setCopyMaxScore(input.copyMaxScore);
dirty = true;
}
if (input.copyAllScoresIfNoChange != null) {
- labelType.setCopyAllScoresIfNoChange(input.copyAllScoresIfNoChange);
+ labelTypeBuilder.setCopyAllScoresIfNoChange(input.copyAllScoresIfNoChange);
+ dirty = true;
}
if (input.copyAllScoresIfNoCodeChange != null) {
- labelType.setCopyAllScoresIfNoCodeChange(input.copyAllScoresIfNoCodeChange);
+ labelTypeBuilder.setCopyAllScoresIfNoCodeChange(input.copyAllScoresIfNoCodeChange);
dirty = true;
}
if (input.copyAllScoresOnTrivialRebase != null) {
- labelType.setCopyAllScoresOnTrivialRebase(input.copyAllScoresOnTrivialRebase);
+ labelTypeBuilder.setCopyAllScoresOnTrivialRebase(input.copyAllScoresOnTrivialRebase);
dirty = true;
}
if (input.copyAllScoresOnMergeFirstParentUpdate != null) {
- labelType.setCopyAllScoresOnMergeFirstParentUpdate(
+ labelTypeBuilder.setCopyAllScoresOnMergeFirstParentUpdate(
input.copyAllScoresOnMergeFirstParentUpdate);
dirty = true;
}
if (input.copyValues != null) {
- labelType.setCopyValues(input.copyValues);
+ labelTypeBuilder.setCopyValues(input.copyValues);
dirty = true;
}
if (input.allowPostSubmit != null) {
- labelType.setAllowPostSubmit(input.allowPostSubmit);
+ labelTypeBuilder.setAllowPostSubmit(input.allowPostSubmit);
dirty = true;
}
if (input.ignoreSelfApproval != null) {
- labelType.setIgnoreSelfApproval(input.ignoreSelfApproval);
+ labelTypeBuilder.setIgnoreSelfApproval(input.ignoreSelfApproval);
dirty = true;
}
- config.getLabelSections().put(labelType.getName(), labelType);
+ config.getLabelSections().remove(labelType.getName());
+ config.upsertLabelType(labelTypeBuilder.build());
return dirty;
}
diff --git a/java/com/google/gerrit/server/restapi/project/SetParent.java b/java/com/google/gerrit/server/restapi/project/SetParent.java
index 42790aa..91c29f5 100644
--- a/java/com/google/gerrit/server/restapi/project/SetParent.java
+++ b/java/com/google/gerrit/server/restapi/project/SetParent.java
@@ -103,8 +103,7 @@
validateParentUpdate(rsrc.getProjectState().getNameKey(), user, parentName, checkIfAdmin);
try (MetaDataUpdate md = updateFactory.get().create(rsrc.getNameKey())) {
ProjectConfig config = projectConfigFactory.read(md);
- Project project = config.getProject();
- project.setParentName(parentName);
+ config.updateProject(p -> p.setParent(parentName));
String msg = Strings.emptyToNull(input.commitMessage);
if (msg == null) {
@@ -117,7 +116,7 @@
config.commit(md);
cache.evict(rsrc.getProjectState().getProject());
- Project.NameKey parent = project.getParent(allProjects);
+ Project.NameKey parent = config.getProject().getParent(allProjects);
requireNonNull(parent);
return parent.get();
} catch (RepositoryNotFoundException notFound) {
diff --git a/java/com/google/gerrit/server/rules/IgnoreSelfApprovalRule.java b/java/com/google/gerrit/server/rules/IgnoreSelfApprovalRule.java
index 54915fb..132747d 100644
--- a/java/com/google/gerrit/server/rules/IgnoreSelfApprovalRule.java
+++ b/java/com/google/gerrit/server/rules/IgnoreSelfApprovalRule.java
@@ -66,7 +66,8 @@
return ruleError(E_UNABLE_TO_FETCH_LABELS);
}
- boolean shouldIgnoreSelfApproval = labelTypes.stream().anyMatch(LabelType::ignoreSelfApproval);
+ boolean shouldIgnoreSelfApproval =
+ labelTypes.stream().anyMatch(LabelType::isIgnoreSelfApproval);
if (!shouldIgnoreSelfApproval) {
// Shortcut to avoid further processing if no label should ignore uploader approvals
return Optional.empty();
@@ -86,7 +87,7 @@
submitRecord.requirements = new ArrayList<>();
for (LabelType t : labelTypes) {
- if (!t.ignoreSelfApproval()) {
+ if (!t.isIgnoreSelfApproval()) {
// The default rules are enough in this case.
continue;
}
diff --git a/java/com/google/gerrit/server/schema/AllProjectsCreator.java b/java/com/google/gerrit/server/schema/AllProjectsCreator.java
index cfa5825..018a96a 100644
--- a/java/com/google/gerrit/server/schema/AllProjectsCreator.java
+++ b/java/com/google/gerrit/server/schema/AllProjectsCreator.java
@@ -30,7 +30,6 @@
import com.google.gerrit.common.data.Permission;
import com.google.gerrit.common.data.PermissionRule;
import com.google.gerrit.common.data.PermissionRule.Action;
-import com.google.gerrit.entities.Project;
import com.google.gerrit.entities.RefNames;
import com.google.gerrit.server.GerritPersonIdent;
import com.google.gerrit.server.config.AllProjectsName;
@@ -116,19 +115,16 @@
// init basic project configs.
ProjectConfig config = projectConfigFactory.read(md);
- Project p = config.getProject();
- p.setDescription(
- input.projectDescription().orElse("Access inherited by all other projects."));
-
- // init boolean project configs.
- input.booleanProjectConfigs().forEach(p::setBooleanConfig);
+ config.updateProject(
+ p -> {
+ p.setDescription(
+ input.projectDescription().orElse("Access inherited by all other projects."));
+ // init boolean project configs.
+ input.booleanProjectConfigs().forEach(p::setBooleanConfig);
+ });
// init labels.
- input
- .codeReviewLabel()
- .ifPresent(
- codeReviewLabel ->
- config.getLabelSections().put(codeReviewLabel.getName(), codeReviewLabel));
+ input.codeReviewLabel().ifPresent(codeReviewLabel -> config.upsertLabelType(codeReviewLabel));
if (input.initDefaultAcls()) {
// init access sections.
diff --git a/java/com/google/gerrit/server/schema/AllProjectsInput.java b/java/com/google/gerrit/server/schema/AllProjectsInput.java
index 6e11a5d..c91695f 100644
--- a/java/com/google/gerrit/server/schema/AllProjectsInput.java
+++ b/java/com/google/gerrit/server/schema/AllProjectsInput.java
@@ -46,18 +46,17 @@
@UsedAt(UsedAt.Project.GOOGLE)
public static LabelType getDefaultCodeReviewLabel() {
- LabelType type =
- new LabelType(
+ return LabelType.builder(
"Code-Review",
ImmutableList.of(
- new LabelValue((short) 2, "Looks good to me, approved"),
- new LabelValue((short) 1, "Looks good to me, but someone else must approve"),
- new LabelValue((short) 0, "No score"),
- new LabelValue((short) -1, "I would prefer this is not merged as is"),
- new LabelValue((short) -2, "This shall not be merged")));
- type.setCopyMinScore(true);
- type.setCopyAllScoresOnTrivialRebase(true);
- return type;
+ LabelValue.create((short) 2, "Looks good to me, approved"),
+ LabelValue.create((short) 1, "Looks good to me, but someone else must approve"),
+ LabelValue.create((short) 0, "No score"),
+ LabelValue.create((short) -1, "I would prefer this is not merged as is"),
+ LabelValue.create((short) -2, "This shall not be merged")))
+ .setCopyMinScore(true)
+ .setCopyAllScoresOnTrivialRebase(true)
+ .build();
}
/** The administrator group which gets default permissions granted. */
diff --git a/java/com/google/gerrit/server/schema/AllUsersCreator.java b/java/com/google/gerrit/server/schema/AllUsersCreator.java
index 4904028..10d7070 100644
--- a/java/com/google/gerrit/server/schema/AllUsersCreator.java
+++ b/java/com/google/gerrit/server/schema/AllUsersCreator.java
@@ -26,7 +26,6 @@
import com.google.gerrit.common.data.GroupReference;
import com.google.gerrit.common.data.LabelType;
import com.google.gerrit.common.data.Permission;
-import com.google.gerrit.entities.Project;
import com.google.gerrit.entities.RefNames;
import com.google.gerrit.server.GerritPersonIdent;
import com.google.gerrit.server.config.AllUsersName;
@@ -112,15 +111,14 @@
md.setMessage("Initialized Gerrit Code Review " + Version.getVersion());
ProjectConfig config = projectConfigFactory.read(md);
- Project project = config.getProject();
- project.setDescription("Individual user settings and preferences.");
+ config.updateProject(p -> p.setDescription("Individual user settings and preferences."));
AccessSection users =
config.getAccessSection(
RefNames.REFS_USERS + "${" + RefPattern.USERID_SHARDED + "}", true);
// Initialize "Code-Review" label.
- config.getLabelSections().put(codeReviewLabel.getName(), codeReviewLabel);
+ config.upsertLabelType(codeReviewLabel);
grant(config, users, Permission.READ, false, true, registered);
grant(config, users, Permission.PUSH, false, true, registered);
diff --git a/java/com/google/gerrit/server/schema/SchemaCreatorImpl.java b/java/com/google/gerrit/server/schema/SchemaCreatorImpl.java
index 78fa5bd..1279218 100644
--- a/java/com/google/gerrit/server/schema/SchemaCreatorImpl.java
+++ b/java/com/google/gerrit/server/schema/SchemaCreatorImpl.java
@@ -212,7 +212,7 @@
private GroupReference createGroupReference(String name) {
AccountGroup.UUID groupUuid = GroupUuid.make(name, serverUser);
- return new GroupReference(groupUuid, name);
+ return GroupReference.create(groupUuid, name);
}
private InternalGroupCreation getGroupCreation(Sequences seqs, GroupReference groupReference) {
diff --git a/java/com/google/gerrit/server/submit/SubmoduleOp.java b/java/com/google/gerrit/server/submit/SubmoduleOp.java
index 5adda2c..a1ed373 100644
--- a/java/com/google/gerrit/server/submit/SubmoduleOp.java
+++ b/java/com/google/gerrit/server/submit/SubmoduleOp.java
@@ -30,7 +30,6 @@
import com.google.gerrit.server.config.VerboseSuperprojectUpdate;
import com.google.gerrit.server.git.CodeReviewCommit;
import com.google.gerrit.server.project.NoSuchProjectException;
-import com.google.gerrit.server.project.ProjectCache;
import com.google.gerrit.server.submit.MergeOpRepoManager.OpenRepo;
import com.google.gerrit.server.update.BatchUpdate;
import com.google.gerrit.server.update.BatchUpdateListener;
@@ -89,27 +88,31 @@
@Singleton
public static class Factory {
- private final GitModules.Factory gitmodulesFactory;
+ private final SubscriptionGraph.Factory subscriptionGraphFactory;
private final Provider<PersonIdent> serverIdent;
private final Config cfg;
- private final ProjectCache projectCache;
@Inject
Factory(
- GitModules.Factory gitmodulesFactory,
+ SubscriptionGraph.Factory subscriptionGraphFactory,
@GerritPersonIdent Provider<PersonIdent> serverIdent,
- @GerritServerConfig Config cfg,
- ProjectCache projectCache) {
- this.gitmodulesFactory = gitmodulesFactory;
+ @GerritServerConfig Config cfg) {
+ this.subscriptionGraphFactory = subscriptionGraphFactory;
this.serverIdent = serverIdent;
this.cfg = cfg;
- this.projectCache = projectCache;
}
public SubmoduleOp create(Set<BranchNameKey> updatedBranches, MergeOpRepoManager orm)
throws SubmoduleConflictException {
- return new SubmoduleOp(
- gitmodulesFactory, serverIdent.get(), cfg, projectCache, updatedBranches, orm);
+ SubscriptionGraph subscriptionGraph;
+ if (cfg.getBoolean("submodule", "enableSuperProjectSubscriptions", true)) {
+ subscriptionGraph = subscriptionGraphFactory.compute(updatedBranches, orm);
+ } else {
+ logger.atFine().log("Updating superprojects disabled");
+ subscriptionGraph =
+ SubscriptionGraph.createEmptyGraph(ImmutableSet.copyOf(updatedBranches));
+ }
+ return new SubmoduleOp(serverIdent.get(), cfg, orm, subscriptionGraph);
}
}
@@ -118,19 +121,15 @@
private final long maxCombinedCommitMessageSize;
private final long maxCommitMessages;
private final MergeOpRepoManager orm;
- private final SubscriptionGraph.Factory subscriptionGraphFactory;
private final SubscriptionGraph subscriptionGraph;
private final BranchTips branchTips = new BranchTips();
private SubmoduleOp(
- GitModules.Factory gitmodulesFactory,
PersonIdent myIdent,
Config cfg,
- ProjectCache projectCache,
- Set<BranchNameKey> updatedBranches,
- MergeOpRepoManager orm)
- throws SubmoduleConflictException {
+ MergeOpRepoManager orm,
+ SubscriptionGraph subscriptionGraph) {
this.myIdent = myIdent;
this.verboseSuperProject =
cfg.getEnum("submodule", null, "verboseSuperprojectUpdate", VerboseSuperprojectUpdate.TRUE);
@@ -138,15 +137,7 @@
cfg.getLong("submodule", "maxCombinedCommitMessageSize", 256 << 10);
this.maxCommitMessages = cfg.getLong("submodule", "maxCommitMessages", 1000);
this.orm = orm;
- this.subscriptionGraphFactory =
- new SubscriptionGraph.DefaultFactory(gitmodulesFactory, projectCache, orm);
- if (cfg.getBoolean("submodule", "enableSuperProjectSubscriptions", true)) {
- this.subscriptionGraph = subscriptionGraphFactory.compute(updatedBranches);
- } else {
- logger.atFine().log("Updating superprojects disabled");
- this.subscriptionGraph =
- SubscriptionGraph.createEmptyGraph(ImmutableSet.copyOf(updatedBranches));
- }
+ this.subscriptionGraph = subscriptionGraph;
}
@UsedAt(UsedAt.Project.PLUGIN_DELETE_PROJECT)
diff --git a/java/com/google/gerrit/server/submit/SubscriptionGraph.java b/java/com/google/gerrit/server/submit/SubscriptionGraph.java
index 406d878..f037261 100644
--- a/java/com/google/gerrit/server/submit/SubscriptionGraph.java
+++ b/java/com/google/gerrit/server/submit/SubscriptionGraph.java
@@ -16,6 +16,7 @@
import static com.google.gerrit.server.project.ProjectCache.illegalState;
+import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSetMultimap;
import com.google.common.collect.MultimapBuilder;
@@ -30,6 +31,8 @@
import com.google.gerrit.server.project.NoSuchProjectException;
import com.google.gerrit.server.project.ProjectCache;
import com.google.gerrit.server.submit.MergeOpRepoManager.OpenRepo;
+import com.google.inject.AbstractModule;
+import com.google.inject.Inject;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
@@ -38,11 +41,11 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Ref;
-import org.eclipse.jgit.transport.RefSpec;
/**
* A container which stores subscription relationship. A SubscriptionGraph is calculated every time
@@ -101,12 +104,12 @@
}
/** Get branches updated as part of the enclosing submit or push batch. */
- ImmutableSet<BranchNameKey> getUpdatedBranches() {
+ public ImmutableSet<BranchNameKey> getUpdatedBranches() {
return updatedBranches;
}
/** Get all superprojects affected. */
- ImmutableSet<Project.NameKey> getAffectedSuperProjects() {
+ public ImmutableSet<Project.NameKey> getAffectedSuperProjects() {
return branchesByProject.keySet();
}
@@ -119,7 +122,7 @@
* Returns all branches within the superproject {@code project} which have submodule
* subscriptions.
*/
- ImmutableSet<BranchNameKey> getAffectedSuperBranches(Project.NameKey project) {
+ public ImmutableSet<BranchNameKey> getAffectedSuperBranches(Project.NameKey project) {
return branchesByProject.get(project);
}
@@ -129,71 +132,78 @@
*
* @see SubscriptionGraph#sortedBranches
*/
- ImmutableSet<BranchNameKey> getSortedSuperprojectAndSubmoduleBranches() {
+ public ImmutableSet<BranchNameKey> getSortedSuperprojectAndSubmoduleBranches() {
return sortedBranches;
}
/** Check if a {@code branch} is a submodule of a superproject. */
- boolean hasSuperproject(BranchNameKey branch) {
+ public boolean hasSuperproject(BranchNameKey branch) {
return subscribedBranches.contains(branch);
}
/** See if a {@code branch} is a superproject branch affected. */
- boolean hasSubscription(BranchNameKey branch) {
+ public boolean hasSubscription(BranchNameKey branch) {
return targets.containsKey(branch);
}
/** Get all related {@code SubmoduleSubscription}s whose super branch is {@code branch}. */
- ImmutableSet<SubmoduleSubscription> getSubscriptions(BranchNameKey branch) {
+ public ImmutableSet<SubmoduleSubscription> getSubscriptions(BranchNameKey branch) {
return targets.get(branch);
}
public interface Factory {
- SubscriptionGraph compute(Set<BranchNameKey> updatedBranches) throws SubmoduleConflictException;
+ SubscriptionGraph compute(Set<BranchNameKey> updatedBranches, MergeOpRepoManager orm)
+ throws SubmoduleConflictException;
+ }
+
+ public static class Module extends AbstractModule {
+ @Override
+ protected void configure() {
+ bind(Factory.class).to(DefaultFactory.class);
+ }
}
static class DefaultFactory implements Factory {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
private final ProjectCache projectCache;
private final GitModules.Factory gitmodulesFactory;
- private final Map<BranchNameKey, GitModules> branchGitModules;
- private final MergeOpRepoManager orm;
- // Fields required to the constructor of SubscriptionGraph.
- /** All affected branches, including those in superprojects and submodules. */
- private final Set<BranchNameKey> affectedBranches;
-
- /** @see SubscriptionGraph#targets */
- private final SetMultimap<BranchNameKey, SubmoduleSubscription> targets;
-
- /** @see SubscriptionGraph#branchesByProject */
- private final SetMultimap<Project.NameKey, BranchNameKey> branchesByProject;
-
- /** @see SubscriptionGraph#subscribedBranches */
- private final Set<BranchNameKey> subscribedBranches;
-
- DefaultFactory(
- GitModules.Factory gitmodulesFactory, ProjectCache projectCache, MergeOpRepoManager orm) {
+ @Inject
+ DefaultFactory(GitModules.Factory gitmodulesFactory, ProjectCache projectCache) {
this.gitmodulesFactory = gitmodulesFactory;
this.projectCache = projectCache;
- this.orm = orm;
- this.branchGitModules = new HashMap<>();
-
- this.affectedBranches = new HashSet<>();
- this.targets = MultimapBuilder.hashKeys().hashSetValues().build();
- this.branchesByProject = MultimapBuilder.hashKeys().hashSetValues().build();
- this.subscribedBranches = new HashSet<>();
}
@Override
- public SubscriptionGraph compute(Set<BranchNameKey> updatedBranches)
+ public SubscriptionGraph compute(Set<BranchNameKey> updatedBranches, MergeOpRepoManager orm)
throws SubmoduleConflictException {
+ Map<BranchNameKey, GitModules> branchGitModules = new HashMap<>();
+ // All affected branches, including those in superprojects and submodules.
+ Set<BranchNameKey> affectedBranches = new HashSet<>();
+
+ // See SubscriptionGraph#targets.
+ SetMultimap<BranchNameKey, SubmoduleSubscription> targets =
+ MultimapBuilder.hashKeys().hashSetValues().build();
+
+ // See SubscriptionGraph#branchesByProject.
+ SetMultimap<Project.NameKey, BranchNameKey> branchesByProject =
+ MultimapBuilder.hashKeys().hashSetValues().build();
+
+ // See SubscriptionGraph#subscribedBranches.
+ Set<BranchNameKey> subscribedBranches = new HashSet<>();
+
+ Set<BranchNameKey> sortedBranches =
+ calculateSubscriptionMaps(
+ updatedBranches,
+ affectedBranches,
+ targets,
+ branchesByProject,
+ subscribedBranches,
+ branchGitModules,
+ orm);
+
return new SubscriptionGraph(
- updatedBranches,
- targets,
- branchesByProject,
- subscribedBranches,
- calculateSubscriptionMaps(updatedBranches));
+ updatedBranches, targets, branchesByProject, subscribedBranches, sortedBranches);
}
/**
@@ -202,15 +212,22 @@
* <p>In addition to the return value, the following fields are populated as a side effect:
*
* <ul>
- * <li>{@link #affectedBranches}
- * <li>{@link #targets}
- * <li>{@link #branchesByProject}
- * <li>{@link #subscribedBranches}
+ * <li>{@code affectedBranches}
+ * <li>{@code targets}
+ * <li>{@code branchesByProject}
+ * <li>{@code subscribedBranches}
* </ul>
*
* @return the ordered set to be stored in {@link #sortedBranches}.
*/
- private Set<BranchNameKey> calculateSubscriptionMaps(Set<BranchNameKey> updatedBranches)
+ private Set<BranchNameKey> calculateSubscriptionMaps(
+ Set<BranchNameKey> updatedBranches,
+ Set<BranchNameKey> affectedBranches,
+ SetMultimap<BranchNameKey, SubmoduleSubscription> targets,
+ SetMultimap<Project.NameKey, BranchNameKey> branchesByProject,
+ Set<BranchNameKey> subscribedBranches,
+ Map<BranchNameKey, GitModules> branchGitModules,
+ MergeOpRepoManager orm)
throws SubmoduleConflictException {
logger.atFine().log("Calculating superprojects - submodules map");
LinkedHashSet<BranchNameKey> allVisited = new LinkedHashSet<>();
@@ -219,7 +236,16 @@
continue;
}
- searchForSuperprojects(updatedBranch, new LinkedHashSet<>(), allVisited);
+ searchForSuperprojects(
+ updatedBranch,
+ new LinkedHashSet<>(),
+ allVisited,
+ affectedBranches,
+ targets,
+ branchesByProject,
+ subscribedBranches,
+ branchGitModules,
+ orm);
}
// Since the searchForSuperprojects will add all branches (related or
@@ -234,7 +260,13 @@
private void searchForSuperprojects(
BranchNameKey current,
LinkedHashSet<BranchNameKey> currentVisited,
- LinkedHashSet<BranchNameKey> allVisited)
+ LinkedHashSet<BranchNameKey> allVisited,
+ Set<BranchNameKey> affectedBranches,
+ SetMultimap<BranchNameKey, SubmoduleSubscription> targets,
+ SetMultimap<Project.NameKey, BranchNameKey> branchesByProject,
+ Set<BranchNameKey> subscribedBranches,
+ Map<BranchNameKey, GitModules> branchGitModules,
+ MergeOpRepoManager orm)
throws SubmoduleConflictException {
logger.atFine().log("Now processing %s", current);
@@ -251,10 +283,19 @@
currentVisited.add(current);
try {
Collection<SubmoduleSubscription> subscriptions =
- superProjectSubscriptionsForSubmoduleBranch(current);
+ superProjectSubscriptionsForSubmoduleBranch(current, branchGitModules, orm);
for (SubmoduleSubscription sub : subscriptions) {
BranchNameKey superBranch = sub.getSuperProject();
- searchForSuperprojects(superBranch, currentVisited, allVisited);
+ searchForSuperprojects(
+ superBranch,
+ currentVisited,
+ allVisited,
+ affectedBranches,
+ targets,
+ branchesByProject,
+ subscribedBranches,
+ branchGitModules,
+ orm);
targets.put(superBranch, sub);
branchesByProject.put(superBranch.project(), superBranch);
affectedBranches.add(superBranch);
@@ -268,61 +309,27 @@
allVisited.add(current);
}
- private Collection<BranchNameKey> getDestinationBranches(BranchNameKey src, SubscribeSection s)
- throws IOException {
- Collection<BranchNameKey> ret = new HashSet<>();
- logger.atFine().log("Inspecting SubscribeSection %s", s);
- for (RefSpec r : s.getMatchingRefSpecs()) {
- logger.atFine().log("Inspecting [matching] ref %s", r);
- if (!r.matchSource(src.branch())) {
- continue;
- }
- if (r.isWildcard()) {
- // refs/heads/*[:refs/somewhere/*]
- ret.add(
- BranchNameKey.create(
- s.getProject(), r.expandFromSource(src.branch()).getDestination()));
- } else {
- // e.g. refs/heads/master[:refs/heads/stable]
- String dest = r.getDestination();
- if (dest == null) {
- dest = r.getSource();
- }
- ret.add(BranchNameKey.create(s.getProject(), dest));
- }
+ private Collection<BranchNameKey> getDestinationBranches(
+ BranchNameKey src, SubscribeSection s, MergeOpRepoManager orm) throws IOException {
+ OpenRepo or;
+ try {
+ or = orm.getRepo(s.project());
+ } catch (NoSuchProjectException e) {
+ // A project listed a non existent project to be allowed
+ // to subscribe to it. Allow this for now, i.e. no exception is
+ // thrown.
+ return s.getDestinationBranches(src, ImmutableList.of());
}
- for (RefSpec r : s.getMultiMatchRefSpecs()) {
- logger.atFine().log("Inspecting [all] ref %s", r);
- if (!r.matchSource(src.branch())) {
- continue;
- }
- OpenRepo or;
- try {
- or = orm.getRepo(s.getProject());
- } catch (NoSuchProjectException e) {
- // A project listed a non existent project to be allowed
- // to subscribe to it. Allow this for now, i.e. no exception is
- // thrown.
- continue;
- }
-
- for (Ref ref : or.repo.getRefDatabase().getRefsByPrefix(RefNames.REFS_HEADS)) {
- if (r.getDestination() != null && !r.matchDestination(ref.getName())) {
- continue;
- }
- BranchNameKey b = BranchNameKey.create(s.getProject(), ref.getName());
- if (!ret.contains(b)) {
- ret.add(b);
- }
- }
- }
- logger.atFine().log("Returning possible branches: %s for project %s", ret, s.getProject());
- return ret;
+ List<Ref> refs = or.repo.getRefDatabase().getRefsByPrefix(RefNames.REFS_HEADS);
+ return s.getDestinationBranches(src, refs);
}
private Collection<SubmoduleSubscription> superProjectSubscriptionsForSubmoduleBranch(
- BranchNameKey srcBranch) throws IOException {
+ BranchNameKey srcBranch,
+ Map<BranchNameKey, GitModules> branchGitModules,
+ MergeOpRepoManager orm)
+ throws IOException {
logger.atFine().log("Calculating possible superprojects for %s", srcBranch);
Collection<SubmoduleSubscription> ret = new ArrayList<>();
Project.NameKey srcProject = srcBranch.project();
@@ -332,7 +339,7 @@
.orElseThrow(illegalState(srcProject))
.getSubscribeSections(srcBranch)) {
logger.atFine().log("Checking subscribe section %s", s);
- Collection<BranchNameKey> branches = getDestinationBranches(srcBranch, s);
+ Collection<BranchNameKey> branches = getDestinationBranches(srcBranch, s, orm);
for (BranchNameKey targetBranch : branches) {
Project.NameKey targetProject = targetBranch.project();
try {
diff --git a/java/com/google/gerrit/testing/InMemoryModule.java b/java/com/google/gerrit/testing/InMemoryModule.java
index a682d33..6c9fbed 100644
--- a/java/com/google/gerrit/testing/InMemoryModule.java
+++ b/java/com/google/gerrit/testing/InMemoryModule.java
@@ -87,6 +87,7 @@
import com.google.gerrit.server.securestore.SecureStore;
import com.google.gerrit.server.ssh.NoSshKeyCache;
import com.google.gerrit.server.submit.LocalMergeSuperSetComputation;
+import com.google.gerrit.server.submit.SubscriptionGraph;
import com.google.gerrit.server.util.ReplicaUtil;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
@@ -175,6 +176,7 @@
install(new SearchingChangeCacheImpl.Module());
factory(GarbageCollection.Factory.class);
install(new AuditModule());
+ install(new SubscriptionGraph.Module());
bindScope(RequestScoped.class, PerThreadRequestScope.REQUEST);
diff --git a/javatests/com/google/gerrit/acceptance/api/accounts/AccountIT.java b/javatests/com/google/gerrit/acceptance/api/accounts/AccountIT.java
index 0cd6182..3c1bc2f 100644
--- a/javatests/com/google/gerrit/acceptance/api/accounts/AccountIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/accounts/AccountIT.java
@@ -1221,7 +1221,7 @@
@Test
public void cannotAddNonConfirmedEmailWithoutModifyAccountPermission() throws Exception {
TestAccount account = accountCreator.create(name("user"));
- EmailInput input = newEmailInput("test@test.com");
+ EmailInput input = newEmailInput("test@example.com");
requestScopeOperations.setApiUser(user.id());
assertThrows(AuthException.class, () -> gApi.accounts().id(account.username()).addEmail(input));
}
diff --git a/javatests/com/google/gerrit/acceptance/api/accounts/AgreementsIT.java b/javatests/com/google/gerrit/acceptance/api/accounts/AgreementsIT.java
index 11ca391..c0a9da6 100644
--- a/javatests/com/google/gerrit/acceptance/api/accounts/AgreementsIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/accounts/AgreementsIT.java
@@ -67,7 +67,8 @@
protected void setUseContributorAgreements(InheritableBoolean value) throws Exception {
try (MetaDataUpdate md = metaDataUpdateFactory.create(project)) {
ProjectConfig config = projectConfigFactory.read(md);
- config.getProject().setBooleanConfig(BooleanProjectConfig.USE_CONTRIBUTOR_AGREEMENTS, value);
+ config.updateProject(
+ p -> p.setBooleanConfig(BooleanProjectConfig.USE_CONTRIBUTOR_AGREEMENTS, value));
config.commit(md);
projectCache.evict(config.getProject());
}
@@ -81,7 +82,7 @@
GroupApi groupApi = gApi.groups().id(g.get());
groupApi.description("CLA test group");
InternalGroup caGroup = group(AccountGroup.uuid(groupApi.detail().id));
- GroupReference groupRef = new GroupReference(caGroup.getGroupUUID(), caGroup.getName());
+ GroupReference groupRef = GroupReference.create(caGroup.getGroupUUID(), caGroup.getName());
PermissionRule rule = new PermissionRule(groupRef);
rule.setAction(PermissionRule.Action.ALLOW);
if (autoVerify) {
diff --git a/javatests/com/google/gerrit/acceptance/api/change/ChangeIT.java b/javatests/com/google/gerrit/acceptance/api/change/ChangeIT.java
index 744035e..42c09c7 100644
--- a/javatests/com/google/gerrit/acceptance/api/change/ChangeIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/change/ChangeIT.java
@@ -1878,7 +1878,7 @@
Timestamp oldTs = rsrc.getChange().getLastUpdatedOn();
// create a group named "ab" with one user: testUser
- String email = "abcd@test.com";
+ String email = "abcd@example.com";
String fullname = "abcd";
Account.Id accountIdOfTestUser =
accountOperations
@@ -1931,11 +1931,11 @@
accountOperations
.newAccount()
.username("kobebryant")
- .preferredEmail("kobebryant@test.com")
+ .preferredEmail("kobebryant@example.com")
.fullname(testUserFullname)
.create();
- String myGroupUserEmail = "lee@test.com";
+ String myGroupUserEmail = "lee@example.com";
String myGroupUserFullname = "lee";
Account.Id accountIdOfGroupUser =
accountOperations
@@ -2231,7 +2231,7 @@
LabelType verified =
label("Verified", value(1, "Passes"), value(0, "No score"), value(-1, "Failed"));
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().put(verified.getName(), verified);
+ u.getConfig().upsertLabelType(verified);
u.save();
}
projectOperations
@@ -2518,7 +2518,7 @@
label("Verified", value(1, "Passes"), value(0, "No score"), value(-1, "Failed"));
String heads = "refs/heads/*";
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().put(verified.getName(), verified);
+ u.getConfig().upsertLabelType(verified);
u.save();
}
projectOperations
@@ -2863,9 +2863,9 @@
LabelType custom2 =
label("Custom2", value(1, "Positive"), value(0, "No score"), value(-1, "Negative"));
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().put(verified.getName(), verified);
- u.getConfig().getLabelSections().put(custom1.getName(), custom1);
- u.getConfig().getLabelSections().put(custom2.getName(), custom2);
+ u.getConfig().upsertLabelType(verified);
+ u.getConfig().upsertLabelType(custom1);
+ u.getConfig().upsertLabelType(custom2);
u.save();
}
projectOperations
@@ -3603,7 +3603,7 @@
String heads = RefNames.REFS_HEADS + "*";
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().put(verified.getName(), verified);
+ u.getConfig().upsertLabelType(verified);
u.save();
}
projectOperations
@@ -3671,7 +3671,7 @@
// add new label and assert that it's returned for existing changes
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().put(verified.getName(), verified);
+ u.getConfig().upsertLabelType(verified);
u.save();
}
projectOperations
@@ -3747,7 +3747,7 @@
"Configure Notifications",
"project.config",
"[notify \"my=notify-config\"]\n"
- + " email = foo@test.com\n"
+ + " email = foo@example.com\n"
+ " filter = dir:\\\"foo/bar/baz\\\"");
push.to(RefNames.REFS_CONFIG);
testRepo.reset(oldHead);
@@ -3759,7 +3759,8 @@
admin.newIdent(), testRepo, "Test change", "foo/bar/baz/test.txt", "some content");
PushOneCommit.Result r = push.to("refs/for/master");
assertThat(sender.getMessages()).hasSize(1);
- assertThat(sender.getMessages().get(0).rcpt()).containsExactly(Address.parse("foo@test.com"));
+ assertThat(sender.getMessages().get(0).rcpt())
+ .containsExactly(Address.parse("foo@example.com"));
// Comment on the change.
sender.clear();
@@ -3767,7 +3768,8 @@
reviewInput.message = "some message";
gApi.changes().id(r.getChangeId()).current().review(reviewInput);
assertThat(sender.getMessages()).hasSize(1);
- assertThat(sender.getMessages().get(0).rcpt()).containsExactly(Address.parse("foo@test.com"));
+ assertThat(sender.getMessages().get(0).rcpt())
+ .containsExactly(Address.parse("foo@example.com"));
}
@Test
diff --git a/javatests/com/google/gerrit/acceptance/api/change/RevertIT.java b/javatests/com/google/gerrit/acceptance/api/change/RevertIT.java
index 0ac7e20..b855e72 100644
--- a/javatests/com/google/gerrit/acceptance/api/change/RevertIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/change/RevertIT.java
@@ -398,7 +398,7 @@
.review(ReviewInput.approve());
gApi.changes().id(result.getChangeId()).revision(result.getCommit().name()).submit();
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getProject().setState(ProjectState.READ_ONLY);
+ u.getConfig().updateProject(p -> p.setState(ProjectState.READ_ONLY));
u.save();
}
@@ -481,7 +481,7 @@
// revoke write permissions for the first repository.
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getProject().setState(ProjectState.READ_ONLY);
+ u.getConfig().updateProject(p -> p.setState(ProjectState.READ_ONLY));
u.save();
}
diff --git a/javatests/com/google/gerrit/acceptance/api/change/StickyApprovalsIT.java b/javatests/com/google/gerrit/acceptance/api/change/StickyApprovalsIT.java
index 923b66f..3d8a034 100644
--- a/javatests/com/google/gerrit/acceptance/api/change/StickyApprovalsIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/change/StickyApprovalsIT.java
@@ -26,7 +26,7 @@
import static com.google.gerrit.extensions.client.ListChangesOption.CURRENT_REVISION;
import static com.google.gerrit.extensions.client.ListChangesOption.DETAILED_LABELS;
import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
-import static com.google.gerrit.server.project.testing.TestLabels.label;
+import static com.google.gerrit.server.project.testing.TestLabels.labelBuilder;
import static com.google.gerrit.server.project.testing.TestLabels.value;
import static org.eclipse.jgit.lib.Constants.HEAD;
@@ -78,8 +78,8 @@
try (ProjectConfigUpdate u = updateProject(project)) {
// Overwrite "Code-Review" label that is inherited from All-Projects.
// This way changes to the "Code Review" label don't affect other tests.
- LabelType codeReview =
- label(
+ LabelType.Builder codeReview =
+ labelBuilder(
"Code-Review",
value(2, "Looks good to me, approved"),
value(1, "Looks good to me, but someone else must approve"),
@@ -87,12 +87,12 @@
value(-1, "I would prefer that you didn't submit this"),
value(-2, "Do not submit"));
codeReview.setCopyAllScoresIfNoChange(false);
- u.getConfig().getLabelSections().put(codeReview.getName(), codeReview);
+ u.getConfig().upsertLabelType(codeReview.build());
- LabelType verified =
- label("Verified", value(1, "Passes"), value(0, "No score"), value(-1, "Failed"));
+ LabelType.Builder verified =
+ labelBuilder("Verified", value(1, "Passes"), value(0, "No score"), value(-1, "Failed"));
verified.setCopyAllScoresIfNoChange(false);
- u.getConfig().getLabelSections().put(verified.getName(), verified);
+ u.getConfig().upsertLabelType(verified.build());
u.save();
}
@@ -121,7 +121,7 @@
@Test
public void stickyOnAnyScore() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().get("Code-Review").setCopyAnyScore(true);
+ u.getConfig().updateLabelType("Code-Review", b -> b.setCopyAnyScore(true));
u.save();
}
@@ -143,7 +143,7 @@
@Test
public void stickyOnMinScore() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().get("Code-Review").setCopyMinScore(true);
+ u.getConfig().updateLabelType("Code-Review", b -> b.setCopyMinScore(true));
u.save();
}
@@ -165,7 +165,7 @@
@Test
public void stickyOnMaxScore() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().get("Code-Review").setCopyMaxScore(true);
+ u.getConfig().updateLabelType("Code-Review", b -> b.setCopyMaxScore(true));
u.save();
}
@@ -190,9 +190,8 @@
try (ProjectConfigUpdate u = updateProject(project)) {
u.getConfig()
- .getLabelSections()
- .get("Code-Review")
- .setCopyValues(ImmutableList.of((short) -1, (short) 1));
+ .updateLabelType(
+ "Code-Review", b -> b.setCopyValues(ImmutableList.of((short) -1, (short) 1)));
u.save();
}
@@ -216,7 +215,7 @@
@Test
public void stickyOnTrivialRebase() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().get("Code-Review").setCopyAllScoresOnTrivialRebase(true);
+ u.getConfig().updateLabelType("Code-Review", b -> b.setCopyAllScoresOnTrivialRebase(true));
u.save();
}
@@ -262,7 +261,7 @@
@Test
public void stickyOnNoCodeChange() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().get("Verified").setCopyAllScoresIfNoCodeChange(true);
+ u.getConfig().updateLabelType("Verified", b -> b.setCopyAllScoresIfNoCodeChange(true));
u.save();
}
@@ -287,9 +286,7 @@
public void stickyOnMergeFirstParentUpdate() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
u.getConfig()
- .getLabelSections()
- .get("Code-Review")
- .setCopyAllScoresOnMergeFirstParentUpdate(true);
+ .updateLabelType("Code-Review", b -> b.setCopyAllScoresOnMergeFirstParentUpdate(true));
u.save();
}
@@ -313,7 +310,7 @@
@Test
public void notStickyWithCopyOnNoChangeWhenSecondParentIsUpdated() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().get("Code-Review").setCopyAllScoresIfNoChange(true);
+ u.getConfig().updateLabelType("Code-Review", b -> b.setCopyAllScoresIfNoChange(true));
u.save();
}
@@ -330,8 +327,8 @@
@Test
public void removedVotesNotSticky() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().get("Code-Review").setCopyAllScoresOnTrivialRebase(true);
- u.getConfig().getLabelSections().get("Verified").setCopyAllScoresIfNoCodeChange(true);
+ u.getConfig().updateLabelType("Code-Review", b -> b.setCopyAllScoresOnTrivialRebase(true));
+ u.getConfig().updateLabelType("Verified", b -> b.setCopyAllScoresIfNoCodeChange(true));
u.save();
}
@@ -360,8 +357,8 @@
@Test
public void stickyAcrossMultiplePatchSets() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().get("Code-Review").setCopyMaxScore(true);
- u.getConfig().getLabelSections().get("Verified").setCopyAllScoresIfNoCodeChange(true);
+ u.getConfig().updateLabelType("Code-Review", b -> b.setCopyMaxScore(true));
+ u.getConfig().updateLabelType("Verified", b -> b.setCopyAllScoresIfNoCodeChange(true));
u.save();
}
@@ -386,8 +383,8 @@
// change kind against all prior patch sets. This is a regression that made Gerrit do expensive
// work in O(num-patch-sets). This test ensures that we aren't regressing.
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().get("Code-Review").setCopyMaxScore(true);
- u.getConfig().getLabelSections().get("Verified").setCopyAllScoresIfNoCodeChange(true);
+ u.getConfig().updateLabelType("Code-Review", b -> b.setCopyMaxScore(true));
+ u.getConfig().updateLabelType("Verified", b -> b.setCopyAllScoresIfNoCodeChange(true));
u.save();
}
@@ -418,8 +415,8 @@
@Test
public void copyMinMaxAcrossMultiplePatchSets() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().get("Code-Review").setCopyMaxScore(true);
- u.getConfig().getLabelSections().get("Code-Review").setCopyMinScore(true);
+ u.getConfig().updateLabelType("Code-Review", b -> b.setCopyMaxScore(true));
+ u.getConfig().updateLabelType("Code-Review", b -> b.setCopyMinScore(true));
u.save();
}
@@ -459,7 +456,7 @@
public void deleteStickyVote() throws Exception {
String label = "Code-Review";
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().get(label).setCopyMaxScore(true);
+ u.getConfig().updateLabelType(label, b -> b.setCopyMaxScore(true));
u.save();
}
diff --git a/javatests/com/google/gerrit/acceptance/api/project/ProjectIT.java b/javatests/com/google/gerrit/acceptance/api/project/ProjectIT.java
index 8dc76dd..840d3e0 100644
--- a/javatests/com/google/gerrit/acceptance/api/project/ProjectIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/project/ProjectIT.java
@@ -64,7 +64,6 @@
import com.google.gerrit.extensions.restapi.UnprocessableEntityException;
import com.google.gerrit.server.config.ProjectConfigEntry;
import com.google.gerrit.server.group.SystemGroupBackend;
-import com.google.gerrit.server.project.CommentLinkInfoImpl;
import com.google.gerrit.server.project.ProjectConfig;
import com.google.inject.AbstractModule;
import com.google.inject.Inject;
@@ -697,6 +696,31 @@
}
@Test
+ public void pluginConfigsReturnedWhenRefsMetaConfigReadable() throws Exception {
+ ProjectConfigEntry entry = new ProjectConfigEntry("enabled", "true");
+ try (Registration ignored =
+ extensionRegistry.newRegistration().add(entry, "test-config-entry")) {
+ // The admin can see refs/meta/config and hence has the READ_CONFIG permission.
+ requestScopeOperations.setApiUser(admin.id());
+ ConfigInfo configInfo = getConfig();
+ assertThat(configInfo.pluginConfig).isNotNull();
+ assertThat(configInfo.pluginConfig).isNotEmpty();
+ }
+ }
+
+ @Test
+ public void pluginConfigsNotReturnedWhenRefsMetaConfigNotReadable() throws Exception {
+ ProjectConfigEntry entry = new ProjectConfigEntry("enabled", "true");
+ try (Registration ignored =
+ extensionRegistry.newRegistration().add(entry, "test-config-entry")) {
+ // This user cannot see refs/meta/config and hence does not have the READ_CONFIG permission.
+ requestScopeOperations.setApiUser(user.id());
+ ConfigInfo configInfo = getConfig();
+ assertThat(configInfo.pluginConfig).isNull();
+ }
+ }
+
+ @Test
public void noCommentlinksByDefault() throws Exception {
assertThat(getConfig().commentlinks).isEmpty();
}
@@ -916,7 +940,11 @@
}
private CommentLinkInfo commentLinkInfo(String name, String match, String link) {
- return new CommentLinkInfoImpl(name, match, link, null /*html*/, null /*enabled*/);
+ CommentLinkInfo info = new CommentLinkInfo();
+ info.name = name;
+ info.match = match;
+ info.link = link;
+ return info;
}
private void assertCommentLinks(ConfigInfo actual, Map<String, CommentLinkInfo> expected) {
diff --git a/javatests/com/google/gerrit/acceptance/api/project/ProjectIndexerIT.java b/javatests/com/google/gerrit/acceptance/api/project/ProjectIndexerIT.java
index dad09f9..e45d95c 100644
--- a/javatests/com/google/gerrit/acceptance/api/project/ProjectIndexerIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/project/ProjectIndexerIT.java
@@ -104,18 +104,18 @@
Project.NameKey p1 = projectOperations.newProject().create();
Project.NameKey p2 = projectOperations.newProject().create();
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getProject().setParentName(p1);
+ u.getConfig().updateProject(p -> p.setParent(p1));
u.save();
}
assertThat(stalenessChecker.check(project).isStale()).isFalse();
- updateProjectConfigWithoutIndexUpdate(p1, c -> c.getProject().setParentName(p2));
+ updateProjectConfigWithoutIndexUpdate(p1, c -> c.updateProject(p -> p.setParent(p2)));
assertThat(stalenessChecker.check(project).isStale()).isTrue();
}
private void updateProjectConfigWithoutIndexUpdate(Project.NameKey project) throws Exception {
updateProjectConfigWithoutIndexUpdate(
- project, c -> c.getProject().setDescription("making it stale"));
+ project, c -> c.updateProject(p -> p.setDescription("making it stale")));
}
private void updateProjectConfigWithoutIndexUpdate(
diff --git a/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java b/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java
index dd13643..da92381 100644
--- a/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java
@@ -93,6 +93,7 @@
import com.google.gerrit.extensions.restapi.UnprocessableEntityException;
import com.google.gerrit.extensions.webui.PatchSetWebLink;
import com.google.gerrit.server.change.RevisionResource;
+import com.google.gerrit.server.git.BranchOrderSection;
import com.google.gerrit.server.query.change.ChangeData;
import com.google.gerrit.server.restapi.change.GetRevisionActions;
import com.google.inject.Inject;
@@ -1296,8 +1297,25 @@
assertThat(changes).hasSize(1);
assertThat(changes.get(0).changeId).isEqualTo(r2.getChangeId());
assertThat(changes.get(0).mergeable).isEqualTo(Boolean.TRUE);
+ }
- // TODO(dborowitz): Test for other-branches.
+ @Test
+ public void mergeableOtherBranches() throws Exception {
+ String head = getHead(repo(), HEAD).name();
+ createBranchWithRevision(BranchNameKey.create(project, "mergeable-other-branch"), head);
+ createBranchWithRevision(BranchNameKey.create(project, "ignored"), head);
+ PushOneCommit.Result change1 = createChange();
+ try (ProjectConfigUpdate u = updateProject(project)) {
+ u.getConfig()
+ .setBranchOrderSection(
+ BranchOrderSection.create(
+ ImmutableList.of("master", "nonexistent", "mergeable-other-branch")));
+ u.save();
+ }
+
+ MergeableInfo mergeableInfo =
+ gApi.changes().id(change1.getChangeId()).current().mergeableOtherBranches();
+ assertThat(mergeableInfo.mergeableInto).containsExactly("mergeable-other-branch");
}
@Test
diff --git a/javatests/com/google/gerrit/acceptance/edit/ChangeEditIT.java b/javatests/com/google/gerrit/acceptance/edit/ChangeEditIT.java
index f0bb201..d361247 100644
--- a/javatests/com/google/gerrit/acceptance/edit/ChangeEditIT.java
+++ b/javatests/com/google/gerrit/acceptance/edit/ChangeEditIT.java
@@ -772,8 +772,9 @@
String cr = "Code-Review";
try (ProjectConfigUpdate u = updateProject(project)) {
LabelType codeReview = TestLabels.codeReview();
- codeReview.setCopyAllScoresIfNoCodeChange(true);
- u.getConfig().getLabelSections().put(cr, codeReview);
+ u.getConfig().upsertLabelType(codeReview);
+ u.getConfig()
+ .updateLabelType(codeReview.getName(), lt -> lt.setCopyAllScoresIfNoCodeChange(true));
u.save();
}
diff --git a/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java b/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java
index 7213a9f..b01b195 100644
--- a/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java
+++ b/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java
@@ -161,7 +161,7 @@
public void setUpPatchSetLock() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
patchSetLock = TestLabels.patchSetLock();
- u.getConfig().getLabelSections().put(patchSetLock.getName(), patchSetLock);
+ u.getConfig().upsertLabelType(patchSetLock);
u.save();
}
projectOperations
@@ -1200,7 +1200,7 @@
label("Custom-Label", value(1, "Positive"), value(0, "No score"), value(-1, "Negative"));
String heads = "refs/heads/*";
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().put(Q.getName(), Q);
+ u.getConfig().upsertLabelType(Q);
u.save();
}
projectOperations
@@ -1686,8 +1686,10 @@
try (ProjectConfigUpdate u = updateProject(project)) {
u.getConfig()
- .getProject()
- .setBooleanConfig(BooleanProjectConfig.REQUIRE_CHANGE_ID, InheritableBoolean.FALSE);
+ .updateProject(
+ p ->
+ p.setBooleanConfig(
+ BooleanProjectConfig.REQUIRE_CHANGE_ID, InheritableBoolean.FALSE));
u.save();
}
@@ -1712,8 +1714,10 @@
try (ProjectConfigUpdate u = updateProject(project)) {
u.getConfig()
- .getProject()
- .setBooleanConfig(BooleanProjectConfig.REQUIRE_CHANGE_ID, InheritableBoolean.FALSE);
+ .updateProject(
+ p ->
+ p.setBooleanConfig(
+ BooleanProjectConfig.REQUIRE_CHANGE_ID, InheritableBoolean.FALSE));
u.save();
}
@@ -1863,9 +1867,8 @@
@Test
public void pushNewPatchsetOverridingStickyLabel() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType codeReview = TestLabels.codeReview();
- codeReview.setCopyMaxScore(true);
- u.getConfig().getLabelSections().put(codeReview.getName(), codeReview);
+ LabelType codeReview = TestLabels.codeReview().toBuilder().setCopyMaxScore(true).build();
+ u.getConfig().upsertLabelType(codeReview);
u.save();
}
diff --git a/javatests/com/google/gerrit/acceptance/git/AbstractSubmoduleSubscription.java b/javatests/com/google/gerrit/acceptance/git/AbstractSubmoduleSubscription.java
index a0725c3..df21625 100644
--- a/javatests/com/google/gerrit/acceptance/git/AbstractSubmoduleSubscription.java
+++ b/javatests/com/google/gerrit/acceptance/git/AbstractSubmoduleSubscription.java
@@ -204,12 +204,12 @@
throws Exception {
try (MetaDataUpdate md = metaDataUpdateFactory.create(submodule)) {
md.setMessage("Added superproject subscription");
- SubscribeSection s;
+ SubscribeSection.Builder s;
ProjectConfig pc = projectConfigFactory.read(md);
if (pc.getSubscribeSections().containsKey(superproject)) {
- s = pc.getSubscribeSections().get(superproject);
+ s = pc.getSubscribeSections().get(superproject).toBuilder();
} else {
- s = new SubscribeSection(superproject);
+ s = SubscribeSection.builder(superproject);
}
String refspec;
if (superBranch == null) {
@@ -222,7 +222,7 @@
} else {
s.addMultiMatchRefSpec(refspec);
}
- pc.addSubscribeSection(s);
+ pc.addSubscribeSection(s.build());
ObjectId oldId = pc.getRevision();
ObjectId newId = pc.commit(md);
assertThat(newId).isNotEqualTo(oldId);
diff --git a/javatests/com/google/gerrit/acceptance/git/ImplicitMergeCheckIT.java b/javatests/com/google/gerrit/acceptance/git/ImplicitMergeCheckIT.java
index b51263e..80cc508 100644
--- a/javatests/com/google/gerrit/acceptance/git/ImplicitMergeCheckIT.java
+++ b/javatests/com/google/gerrit/acceptance/git/ImplicitMergeCheckIT.java
@@ -85,8 +85,10 @@
private void setRejectImplicitMerges() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
u.getConfig()
- .getProject()
- .setBooleanConfig(BooleanProjectConfig.REJECT_IMPLICIT_MERGES, InheritableBoolean.TRUE);
+ .updateProject(
+ p ->
+ p.setBooleanConfig(
+ BooleanProjectConfig.REJECT_IMPLICIT_MERGES, InheritableBoolean.TRUE));
u.save();
}
}
diff --git a/javatests/com/google/gerrit/acceptance/git/PushPermissionsIT.java b/javatests/com/google/gerrit/acceptance/git/PushPermissionsIT.java
index f9c751f..98b93a8 100644
--- a/javatests/com/google/gerrit/acceptance/git/PushPermissionsIT.java
+++ b/javatests/com/google/gerrit/acceptance/git/PushPermissionsIT.java
@@ -175,7 +175,7 @@
public void readOnlyProjectRejectedBeforeTestingPermissions() throws Exception {
try (Repository repo = repoManager.openRepository(project)) {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getProject().setState(ProjectState.READ_ONLY);
+ u.getConfig().updateProject(p -> p.setState(ProjectState.READ_ONLY));
u.save();
}
}
diff --git a/javatests/com/google/gerrit/acceptance/rest/account/ImpersonationIT.java b/javatests/com/google/gerrit/acceptance/rest/account/ImpersonationIT.java
index 840853c..00c7fb8 100644
--- a/javatests/com/google/gerrit/acceptance/rest/account/ImpersonationIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/account/ImpersonationIT.java
@@ -174,7 +174,7 @@
public void voteOnBehalfOfLabelNotPermitted() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
LabelType verified = TestLabels.verified();
- u.getConfig().getLabelSections().put(verified.getName(), verified);
+ u.getConfig().upsertLabelType(verified);
u.save();
}
diff --git a/javatests/com/google/gerrit/acceptance/rest/binding/ProjectsRestApiBindingsIT.java b/javatests/com/google/gerrit/acceptance/rest/binding/ProjectsRestApiBindingsIT.java
index 55eeaf4..1027938 100644
--- a/javatests/com/google/gerrit/acceptance/rest/binding/ProjectsRestApiBindingsIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/binding/ProjectsRestApiBindingsIT.java
@@ -277,7 +277,7 @@
}
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getProject().setLocalDefaultDashboard(dashboardRef + ":overview");
+ u.getConfig().updateProject(p -> p.setLocalDefaultDashboard(dashboardRef + ":overview"));
u.save();
}
}
diff --git a/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java b/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java
index 640109a..1532b33 100644
--- a/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java
@@ -240,6 +240,50 @@
assertThat(attentionSet.reason()).isEqualTo("Change was submitted");
}
+ /**
+ * There is currently a bug that adds the person who submitted the change as reviewer, which in
+ * turn adds them to the attention set. This test ensures this doesn't happen.
+ */
+ @Test
+ public void submitDoesNotAddReviewersToAttentionSet() throws Exception {
+ PushOneCommit.Result r = createChange("refs/heads/master", "file1", "content");
+
+ // Someone else approves, because if admin reviews, they will be added to the reviewers (and the
+ // bug won't be reproduced).
+ requestScopeOperations.setApiUser(accountCreator.admin2().id());
+ change(r).current().review(ReviewInput.approve().addUserToAttentionSet(user.email(), "reason"));
+
+ requestScopeOperations.setApiUser(admin.id());
+
+ change(r).attention(admin.email()).remove(new AttentionSetInput("remove"));
+ change(r).current().submit();
+
+ // Attention set updates that relate to the admin (the person who replied) are filtered out.
+ AttentionSetUpdate attentionSet =
+ Iterables.getOnlyElement(getAttentionSetUpdatesForUser(r, admin));
+
+ assertThat(attentionSet.account()).isEqualTo(admin.id());
+ assertThat(attentionSet.operation()).isEqualTo(AttentionSetUpdate.Operation.REMOVE);
+ assertThat(attentionSet.reason()).isEqualTo("remove");
+
+ change(r).addReviewer(user.email());
+ }
+
+ @Test
+ public void addedReviewersAreAddedToAttentionSetOnMergedChanges() throws Exception {
+ PushOneCommit.Result r = createChange();
+ change(r).current().review(ReviewInput.approve());
+ change(r).current().submit();
+
+ change(r).addReviewer(user.email());
+ AttentionSetUpdate attentionSet =
+ Iterables.getOnlyElement(getAttentionSetUpdatesForUser(r, user));
+
+ assertThat(attentionSet.account()).isEqualTo(user.id());
+ assertThat(attentionSet.operation()).isEqualTo(AttentionSetUpdate.Operation.ADD);
+ assertThat(attentionSet.reason()).isEqualTo("Reviewer was added");
+ }
+
@Test
public void reviewersAddedAndRemovedFromAttentionSet() throws Exception {
PushOneCommit.Result r = createChange();
@@ -828,7 +872,7 @@
change(r).addToAttentionSet(new AttentionSetInput(user.email(), "remove"));
requestScopeOperations.setApiUser(user.id());
- ReviewInput reviewInput = ReviewInput.create().recommend();
+ ReviewInput reviewInput = ReviewInput.recommend();
change(r).current().review(reviewInput);
// reviewer removed
diff --git a/javatests/com/google/gerrit/acceptance/rest/change/MoveChangeIT.java b/javatests/com/google/gerrit/acceptance/rest/change/MoveChangeIT.java
index 37b1713..542085c 100644
--- a/javatests/com/google/gerrit/acceptance/rest/change/MoveChangeIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/change/MoveChangeIT.java
@@ -245,7 +245,7 @@
LabelType patchSetLock = TestLabels.patchSetLock();
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().put(patchSetLock.getName(), patchSetLock);
+ u.getConfig().upsertLabelType(patchSetLock);
u.save();
}
projectOperations
diff --git a/javatests/com/google/gerrit/acceptance/rest/project/CreateProjectIT.java b/javatests/com/google/gerrit/acceptance/rest/project/CreateProjectIT.java
index 874f07a..10fd65f 100644
--- a/javatests/com/google/gerrit/acceptance/rest/project/CreateProjectIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/project/CreateProjectIT.java
@@ -224,7 +224,7 @@
Project project = projectCache.get(Project.nameKey(newProjectName)).get().getProject();
assertProjectInfo(project, p);
assertThat(project.getDescription()).isEqualTo(in.description);
- assertThat(project.getConfiguredSubmitType()).isEqualTo(in.submitType);
+ assertThat(project.getSubmitType()).isEqualTo(in.submitType);
assertThat(project.getBooleanConfig(BooleanProjectConfig.USE_CONTRIBUTOR_AGREEMENTS))
.isEqualTo(in.useContributorAgreements);
assertThat(project.getBooleanConfig(BooleanProjectConfig.USE_SIGNED_OFF_BY))
@@ -368,8 +368,11 @@
@Test
public void createProjectWithCreateProjectCapabilityAndParentNotVisible() throws Exception {
- Project parent = projectCache.get(allProjects).get().getProject();
- parent.setState(com.google.gerrit.extensions.client.ProjectState.HIDDEN);
+ try (ProjectConfigUpdate u = updateProject(allProjects)) {
+ u.getConfig()
+ .updateProject(p -> p.setState(com.google.gerrit.extensions.client.ProjectState.HIDDEN));
+ u.save();
+ }
projectOperations
.allProjectsForUpdate()
.add(
@@ -383,7 +386,12 @@
ProjectInfo p = gApi.projects().create(in).get();
assertThat(p.name).isEqualTo(in.name);
} finally {
- parent.setState(com.google.gerrit.extensions.client.ProjectState.ACTIVE);
+ try (ProjectConfigUpdate u = updateProject(allProjects)) {
+ u.getConfig()
+ .updateProject(
+ p -> p.setState(com.google.gerrit.extensions.client.ProjectState.ACTIVE));
+ u.save();
+ }
projectOperations
.allProjectsForUpdate()
.remove(
diff --git a/javatests/com/google/gerrit/acceptance/rest/project/GetLabelIT.java b/javatests/com/google/gerrit/acceptance/rest/project/GetLabelIT.java
index 940fae5..3e35f04 100644
--- a/javatests/com/google/gerrit/acceptance/rest/project/GetLabelIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/project/GetLabelIT.java
@@ -22,7 +22,6 @@
import com.google.gerrit.acceptance.NoHttpd;
import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
import com.google.gerrit.common.data.LabelFunction;
-import com.google.gerrit.common.data.LabelType;
import com.google.gerrit.extensions.common.LabelDefinitionInfo;
import com.google.gerrit.extensions.restapi.AuthException;
import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
@@ -75,9 +74,7 @@
// set default value
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setDefaultValue((short) 1);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", labelType -> labelType.setDefaultValue((short) 1));
u.save();
}
@@ -100,11 +97,14 @@
// unset rules which are enabled by default
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCanOverride(false);
- labelType.setCopyAllScoresIfNoChange(false);
- labelType.setAllowPostSubmit(false);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig()
+ .updateLabelType(
+ "foo",
+ labelType -> {
+ labelType.setCanOverride(false);
+ labelType.setCopyAllScoresIfNoChange(false);
+ labelType.setAllowPostSubmit(false);
+ });
u.save();
}
@@ -128,16 +128,19 @@
// set rules which are not enabled by default
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCopyAnyScore(true);
- labelType.setCopyMinScore(true);
- labelType.setCopyMaxScore(true);
- labelType.setCopyAllScoresIfNoCodeChange(true);
- labelType.setCopyAllScoresOnTrivialRebase(true);
- labelType.setCopyAllScoresOnMergeFirstParentUpdate(true);
- labelType.setCopyValues(ImmutableList.of((short) -1, (short) 1));
- labelType.setIgnoreSelfApproval(true);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig()
+ .updateLabelType(
+ "foo",
+ labelType -> {
+ labelType.setCopyAnyScore(true);
+ labelType.setCopyMinScore(true);
+ labelType.setCopyMaxScore(true);
+ labelType.setCopyAllScoresIfNoCodeChange(true);
+ labelType.setCopyAllScoresOnTrivialRebase(true);
+ labelType.setCopyAllScoresOnMergeFirstParentUpdate(true);
+ labelType.setCopyValues(ImmutableList.of((short) -1, (short) 1));
+ labelType.setIgnoreSelfApproval(true);
+ });
u.save();
}
diff --git a/javatests/com/google/gerrit/acceptance/rest/project/ListLabelsIT.java b/javatests/com/google/gerrit/acceptance/rest/project/ListLabelsIT.java
index ef08079..33a0654 100644
--- a/javatests/com/google/gerrit/acceptance/rest/project/ListLabelsIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/project/ListLabelsIT.java
@@ -27,7 +27,6 @@
import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
import com.google.gerrit.common.data.LabelFunction;
-import com.google.gerrit.common.data.LabelType;
import com.google.gerrit.common.data.Permission;
import com.google.gerrit.entities.Project;
import com.google.gerrit.entities.RefNames;
@@ -88,9 +87,7 @@
// set default value
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setDefaultValue((short) 1);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", labelType -> labelType.setDefaultValue((short) 1));
u.save();
}
@@ -119,11 +116,14 @@
// unset rules which are enabled by default
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCanOverride(false);
- labelType.setCopyAllScoresIfNoChange(false);
- labelType.setAllowPostSubmit(false);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig()
+ .updateLabelType(
+ "foo",
+ labelType -> {
+ labelType.setCanOverride(false);
+ labelType.setCopyAllScoresIfNoChange(false);
+ labelType.setAllowPostSubmit(false);
+ });
u.save();
}
@@ -150,16 +150,19 @@
// set rules which are not enabled by default
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCopyAnyScore(true);
- labelType.setCopyMinScore(true);
- labelType.setCopyMaxScore(true);
- labelType.setCopyAllScoresIfNoCodeChange(true);
- labelType.setCopyAllScoresOnTrivialRebase(true);
- labelType.setCopyAllScoresOnMergeFirstParentUpdate(true);
- labelType.setCopyValues(ImmutableList.of((short) -1, (short) 1));
- labelType.setIgnoreSelfApproval(true);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig()
+ .updateLabelType(
+ "foo",
+ labelType -> {
+ labelType.setCopyAnyScore(true);
+ labelType.setCopyMinScore(true);
+ labelType.setCopyMaxScore(true);
+ labelType.setCopyAllScoresIfNoCodeChange(true);
+ labelType.setCopyAllScoresOnTrivialRebase(true);
+ labelType.setCopyAllScoresOnMergeFirstParentUpdate(true);
+ labelType.setCopyValues(ImmutableList.of((short) -1, (short) 1));
+ labelType.setIgnoreSelfApproval(true);
+ });
u.save();
}
diff --git a/javatests/com/google/gerrit/acceptance/rest/project/SetLabelIT.java b/javatests/com/google/gerrit/acceptance/rest/project/SetLabelIT.java
index b08c72b..a1817d9 100644
--- a/javatests/com/google/gerrit/acceptance/rest/project/SetLabelIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/project/SetLabelIT.java
@@ -26,7 +26,6 @@
import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
import com.google.gerrit.common.data.LabelFunction;
-import com.google.gerrit.common.data.LabelType;
import com.google.gerrit.common.data.Permission;
import com.google.gerrit.entities.RefNames;
import com.google.gerrit.extensions.common.LabelDefinitionInfo;
@@ -450,9 +449,7 @@
public void setCanOverride() throws Exception {
configLabel("foo", LabelFunction.NO_OP);
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCanOverride(false);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", lt -> lt.setCanOverride(false));
u.save();
}
assertThat(gApi.projects().name(project.get()).label("foo").get().canOverride).isNull();
@@ -501,9 +498,7 @@
public void unsetCopyAnyScore() throws Exception {
configLabel("foo", LabelFunction.NO_OP);
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCopyAnyScore(true);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", lt -> lt.setCopyAnyScore(true));
u.save();
}
assertThat(gApi.projects().name(project.get()).label("foo").get().copyAnyScore).isTrue();
@@ -537,9 +532,7 @@
public void unsetCopyMinScore() throws Exception {
configLabel("foo", LabelFunction.NO_OP);
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCopyMinScore(true);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", lt -> lt.setCopyMinScore(true));
u.save();
}
assertThat(gApi.projects().name(project.get()).label("foo").get().copyMinScore).isTrue();
@@ -573,9 +566,7 @@
public void unsetCopyMaxScore() throws Exception {
configLabel("foo", LabelFunction.NO_OP);
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCopyMaxScore(true);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", lt -> lt.setCopyMaxScore(true));
u.save();
}
assertThat(gApi.projects().name(project.get()).label("foo").get().copyMaxScore).isTrue();
@@ -594,9 +585,7 @@
public void setCopyAllScoresIfNoChange() throws Exception {
configLabel("foo", LabelFunction.NO_OP);
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCopyAllScoresIfNoChange(false);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", lt -> lt.setCopyAllScoresIfNoChange(false));
u.save();
}
assertThat(gApi.projects().name(project.get()).label("foo").get().copyAllScoresIfNoChange)
@@ -651,9 +640,7 @@
public void unsetCopyAllScoresIfNoCodeChange() throws Exception {
configLabel("foo", LabelFunction.NO_OP);
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCopyAllScoresIfNoCodeChange(true);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", lt -> lt.setCopyAllScoresIfNoCodeChange(true));
u.save();
}
assertThat(gApi.projects().name(project.get()).label("foo").get().copyAllScoresIfNoCodeChange)
@@ -691,9 +678,7 @@
public void unsetCopyAllScoresOnTrivialRebase() throws Exception {
configLabel("foo", LabelFunction.NO_OP);
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCopyAllScoresOnTrivialRebase(true);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", lt -> lt.setCopyAllScoresOnTrivialRebase(true));
u.save();
}
assertThat(gApi.projects().name(project.get()).label("foo").get().copyAllScoresOnTrivialRebase)
@@ -741,9 +726,7 @@
public void unsetCopyAllScoresOnMergeFirstParentUpdate() throws Exception {
configLabel("foo", LabelFunction.NO_OP);
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCopyAllScoresOnMergeFirstParentUpdate(true);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", lt -> lt.setCopyAllScoresOnMergeFirstParentUpdate(true));
u.save();
}
assertThat(
@@ -791,9 +774,8 @@
public void unsetCopyValues() throws Exception {
configLabel("foo", LabelFunction.NO_OP);
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setCopyValues(ImmutableList.of((short) -1, (short) 1));
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig()
+ .updateLabelType("foo", lt -> lt.setCopyValues(ImmutableList.of((short) -1, (short) 1)));
u.save();
}
assertThat(gApi.projects().name(project.get()).label("foo").get().copyValues).isNotEmpty();
@@ -812,9 +794,7 @@
public void setAllowPostSubmit() throws Exception {
configLabel("foo", LabelFunction.NO_OP);
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setAllowPostSubmit(false);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", lt -> lt.setAllowPostSubmit(false));
u.save();
}
assertThat(gApi.projects().name(project.get()).label("foo").get().allowPostSubmit).isNull();
@@ -863,9 +843,7 @@
public void unsetIgnoreSelfApproval() throws Exception {
configLabel("foo", LabelFunction.NO_OP);
try (ProjectConfigUpdate u = updateProject(project)) {
- LabelType labelType = u.getConfig().getLabelSections().get("foo");
- labelType.setIgnoreSelfApproval(true);
- u.getConfig().getLabelSections().put(labelType.getName(), labelType);
+ u.getConfig().updateLabelType("foo", lt -> lt.setIgnoreSelfApproval(true));
u.save();
}
assertThat(gApi.projects().name(project.get()).label("foo").get().ignoreSelfApproval).isTrue();
diff --git a/javatests/com/google/gerrit/acceptance/server/event/CommentAddedEventIT.java b/javatests/com/google/gerrit/acceptance/server/event/CommentAddedEventIT.java
index 8469fff..17eb534 100644
--- a/javatests/com/google/gerrit/acceptance/server/event/CommentAddedEventIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/event/CommentAddedEventIT.java
@@ -61,8 +61,8 @@
private void saveLabelConfig() throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().put(label.getName(), label);
- u.getConfig().getLabelSections().put(pLabel.getName(), pLabel);
+ u.getConfig().upsertLabelType(label);
+ u.getConfig().upsertLabelType(pLabel);
u.save();
}
}
diff --git a/javatests/com/google/gerrit/acceptance/server/mail/ChangeNotificationsIT.java b/javatests/com/google/gerrit/acceptance/server/mail/ChangeNotificationsIT.java
index d74cd71..76514ec 100644
--- a/javatests/com/google/gerrit/acceptance/server/mail/ChangeNotificationsIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/mail/ChangeNotificationsIT.java
@@ -1500,7 +1500,7 @@
throws Exception {
for (SubmitType submitType : SubmitType.values()) {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getProject().setSubmitType(submitType);
+ u.getConfig().updateProject(p -> p.setSubmitType(submitType));
u.save();
}
diff --git a/javatests/com/google/gerrit/acceptance/server/project/CustomLabelIT.java b/javatests/com/google/gerrit/acceptance/server/project/CustomLabelIT.java
index 1d5204b..813a715 100644
--- a/javatests/com/google/gerrit/acceptance/server/project/CustomLabelIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/project/CustomLabelIT.java
@@ -32,6 +32,7 @@
import static com.google.gerrit.server.project.testing.TestLabels.value;
import static com.google.gerrit.testing.GerritJUnit.assertThrows;
+import com.google.common.collect.ImmutableList;
import com.google.gerrit.acceptance.AbstractDaemonTest;
import com.google.gerrit.acceptance.ExtensionRegistry;
import com.google.gerrit.acceptance.ExtensionRegistry.Registration;
@@ -48,39 +49,38 @@
import com.google.gerrit.extensions.restapi.ResourceConflictException;
import com.google.gerrit.server.project.ProjectConfig;
import com.google.inject.Inject;
-import java.util.Arrays;
import org.junit.Before;
import org.junit.Test;
@NoHttpd
public class CustomLabelIT extends AbstractDaemonTest {
+ private static final String LABEL_NAME = "CustomLabel";
+ private static final LabelType LABEL =
+ label("CustomLabel", value(1, "Positive"), value(0, "No score"), value(-1, "Negative"));
+ private static final String P_LABEL_NAME = "CustomLabel2";
+ private static final LabelType P =
+ label("CustomLabel2", value(1, "Positive"), value(0, "No score"));
@Inject private ProjectOperations projectOperations;
@Inject private ExtensionRegistry extensionRegistry;
- private final LabelType label =
- label("CustomLabel", value(1, "Positive"), value(0, "No score"), value(-1, "Negative"));
-
- private final LabelType P = label("CustomLabel2", value(1, "Positive"), value(0, "No score"));
-
@Before
public void setUp() throws Exception {
projectOperations
.project(project)
.forUpdate()
- .add(allowLabel(label.getName()).ref("refs/heads/*").group(ANONYMOUS_USERS).range(-1, 1))
- .add(allowLabel(P.getName()).ref("refs/heads/*").group(ANONYMOUS_USERS).range(0, 1))
+ .add(allowLabel(LABEL_NAME).ref("refs/heads/*").group(ANONYMOUS_USERS).range(-1, 1))
+ .add(allowLabel(P_LABEL_NAME).ref("refs/heads/*").group(ANONYMOUS_USERS).range(0, 1))
.update();
}
@Test
public void customLabelNoOp_NegativeVoteNotBlock() throws Exception {
- label.setFunction(NO_OP);
- saveLabelConfig();
+ saveLabelConfig(LABEL.toBuilder().setFunction(NO_OP));
PushOneCommit.Result r = createChange();
- revision(r).review(new ReviewInput().label(label.getName(), -1));
+ revision(r).review(new ReviewInput().label(LABEL_NAME, -1));
ChangeInfo c = getWithLabels(r);
- LabelInfo q = c.labels.get(label.getName());
+ LabelInfo q = c.labels.get(LABEL_NAME);
assertThat(q.all).hasSize(1);
assertThat(q.approved).isNull();
assertThat(q.recommended).isNull();
@@ -91,12 +91,11 @@
@Test
public void customLabelNoBlock_NegativeVoteNotBlock() throws Exception {
- label.setFunction(NO_BLOCK);
- saveLabelConfig();
+ saveLabelConfig(LABEL.toBuilder().setFunction(NO_BLOCK));
PushOneCommit.Result r = createChange();
- revision(r).review(new ReviewInput().label(label.getName(), -1));
+ revision(r).review(new ReviewInput().label(LABEL_NAME, -1));
ChangeInfo c = getWithLabels(r);
- LabelInfo q = c.labels.get(label.getName());
+ LabelInfo q = c.labels.get(LABEL_NAME);
assertThat(q.all).hasSize(1);
assertThat(q.approved).isNull();
assertThat(q.recommended).isNull();
@@ -107,12 +106,11 @@
@Test
public void customLabelMaxNoBlock_NegativeVoteNotBlock() throws Exception {
- label.setFunction(MAX_NO_BLOCK);
- saveLabelConfig();
+ saveLabelConfig(LABEL.toBuilder().setFunction(MAX_NO_BLOCK));
PushOneCommit.Result r = createChange();
- revision(r).review(new ReviewInput().label(label.getName(), -1));
+ revision(r).review(new ReviewInput().label(LABEL_NAME, -1));
ChangeInfo c = getWithLabels(r);
- LabelInfo q = c.labels.get(label.getName());
+ LabelInfo q = c.labels.get(LABEL_NAME);
assertThat(q.all).hasSize(1);
assertThat(q.approved).isNull();
assertThat(q.recommended).isNull();
@@ -123,16 +121,14 @@
@Test
public void customLabelMaxNoBlock_MaxVoteSubmittable() throws Exception {
- label.setFunction(MAX_NO_BLOCK);
- P.setFunction(NO_OP);
- saveLabelConfig();
+ saveLabelConfig(LABEL.toBuilder().setFunction(MAX_NO_BLOCK), P.toBuilder().setFunction(NO_OP));
PushOneCommit.Result r = createChange();
assertThat(info(r.getChangeId()).submittable).isNull();
- revision(r).review(ReviewInput.approve().label(label.getName(), 1));
+ revision(r).review(ReviewInput.approve().label(LABEL_NAME, 1));
ChangeInfo c = getWithLabels(r);
assertThat(c.submittable).isTrue();
- LabelInfo q = c.labels.get(label.getName());
+ LabelInfo q = c.labels.get(LABEL_NAME);
assertThat(q.all).hasSize(1);
assertThat(q.approved).isNotNull();
assertThat(q.recommended).isNull();
@@ -143,12 +139,11 @@
@Test
public void customLabelAnyWithBlock_NegativeVoteBlock() throws Exception {
- label.setFunction(ANY_WITH_BLOCK);
- saveLabelConfig();
+ saveLabelConfig(LABEL.toBuilder().setFunction(ANY_WITH_BLOCK));
PushOneCommit.Result r = createChange();
- revision(r).review(new ReviewInput().label(label.getName(), -1));
+ revision(r).review(new ReviewInput().label(LABEL_NAME, -1));
ChangeInfo c = getWithLabels(r);
- LabelInfo q = c.labels.get(label.getName());
+ LabelInfo q = c.labels.get(LABEL_NAME);
assertThat(q.all).hasSize(1);
assertThat(q.approved).isNull();
assertThat(q.recommended).isNull();
@@ -170,19 +165,18 @@
public void customLabelAnyWithBlock_Addreviewer_ZeroVote() throws Exception {
TestListener testListener = new TestListener();
try (Registration registration = extensionRegistry.newRegistration().add(testListener)) {
- P.setFunction(ANY_WITH_BLOCK);
- saveLabelConfig();
+ saveLabelConfig(P.toBuilder().setFunction(ANY_WITH_BLOCK));
PushOneCommit.Result r = createChange();
AddReviewerInput in = new AddReviewerInput();
in.reviewer = user.email();
gApi.changes().id(r.getChangeId()).addReviewer(in);
- ReviewInput input = new ReviewInput().label(P.getName(), 0);
+ ReviewInput input = new ReviewInput().label(P_LABEL_NAME, 0);
input.message = "foo";
revision(r).review(input);
ChangeInfo c = getWithLabels(r);
- LabelInfo q = c.labels.get(P.getName());
+ LabelInfo q = c.labels.get(P_LABEL_NAME);
assertThat(q.all).hasSize(1);
assertThat(q.approved).isNull();
assertThat(q.recommended).isNull();
@@ -196,12 +190,11 @@
@Test
public void customLabelMaxWithBlock_NegativeVoteBlock() throws Exception {
- label.setFunction(MAX_WITH_BLOCK);
- saveLabelConfig();
+ saveLabelConfig(LABEL.toBuilder().setFunction(MAX_WITH_BLOCK));
PushOneCommit.Result r = createChange();
- revision(r).review(new ReviewInput().label(label.getName(), -1));
+ revision(r).review(new ReviewInput().label(LABEL_NAME, -1));
ChangeInfo c = getWithLabels(r);
- LabelInfo q = c.labels.get(label.getName());
+ LabelInfo q = c.labels.get(LABEL_NAME);
assertThat(q.all).hasSize(1);
assertThat(q.approved).isNull();
assertThat(q.recommended).isNull();
@@ -212,16 +205,15 @@
@Test
public void customLabelMaxWithBlock_MaxVoteSubmittable() throws Exception {
- label.setFunction(MAX_WITH_BLOCK);
- P.setFunction(NO_OP);
- saveLabelConfig();
+ saveLabelConfig(
+ LABEL.toBuilder().setFunction(MAX_WITH_BLOCK), P.toBuilder().setFunction(NO_OP));
PushOneCommit.Result r = createChange();
assertThat(info(r.getChangeId()).submittable).isNull();
- revision(r).review(ReviewInput.approve().label(label.getName(), 1));
+ revision(r).review(ReviewInput.approve().label(LABEL_NAME, 1));
ChangeInfo c = getWithLabels(r);
assertThat(c.submittable).isTrue();
- LabelInfo q = c.labels.get(label.getName());
+ LabelInfo q = c.labels.get(LABEL_NAME);
assertThat(q.all).hasSize(1);
assertThat(q.approved).isNotNull();
assertThat(q.recommended).isNull();
@@ -232,13 +224,12 @@
@Test
public void customLabelMaxWithBlock_MaxVoteNegativeVoteBlock() throws Exception {
- label.setFunction(MAX_WITH_BLOCK);
- saveLabelConfig();
+ saveLabelConfig(LABEL.toBuilder().setFunction(MAX_WITH_BLOCK));
PushOneCommit.Result r = createChange();
- revision(r).review(new ReviewInput().label(label.getName(), 1));
- revision(r).review(new ReviewInput().label(label.getName(), -1));
+ revision(r).review(new ReviewInput().label(LABEL_NAME, 1));
+ revision(r).review(new ReviewInput().label(LABEL_NAME, -1));
ChangeInfo c = getWithLabels(r);
- LabelInfo q = c.labels.get(label.getName());
+ LabelInfo q = c.labels.get(LABEL_NAME);
assertThat(q.all).hasSize(1);
assertThat(q.approved).isNull();
assertThat(q.recommended).isNull();
@@ -249,10 +240,9 @@
@Test
public void customLabel_DisallowPostSubmit() throws Exception {
- label.setFunction(NO_OP);
- label.setAllowPostSubmit(false);
- P.setFunction(NO_OP);
- saveLabelConfig();
+ saveLabelConfig(
+ LABEL.toBuilder().setFunction(NO_OP).setAllowPostSubmit(false),
+ P.toBuilder().setFunction(NO_OP));
PushOneCommit.Result r = createChange();
revision(r).review(ReviewInput.approve());
@@ -260,20 +250,20 @@
ChangeInfo info = getWithLabels(r);
assertPermitted(info, "Code-Review", 2);
- assertPermitted(info, P.getName(), 0, 1);
- assertPermitted(info, label.getName());
+ assertPermitted(info, P_LABEL_NAME, 0, 1);
+ assertPermitted(info, LABEL_NAME);
ReviewInput postSubmitReview1 = new ReviewInput();
postSubmitReview1.label(P.getName(), P.getMax().getValue());
revision(r).review(postSubmitReview1);
ReviewInput postSubmitReview2 = new ReviewInput();
- postSubmitReview2.label(label.getName(), label.getMax().getValue());
+ postSubmitReview2.label(LABEL.getName(), LABEL.getMax().getValue());
ResourceConflictException thrown =
assertThrows(ResourceConflictException.class, () -> revision(r).review(postSubmitReview2));
assertThat(thrown)
.hasMessageThat()
- .contains("Voting on labels disallowed after submit: " + label.getName());
+ .contains("Voting on labels disallowed after submit: " + LABEL_NAME);
}
@Test
@@ -331,10 +321,9 @@
@Test
public void customLabel_withBranch() throws Exception {
- label.setRefPatterns(Arrays.asList("master"));
- saveLabelConfig();
+ saveLabelConfig(LABEL.toBuilder().setRefPatterns(ImmutableList.of("master")));
ProjectConfig cfg = projectCache.get(project).orElseThrow(illegalState(project)).getConfig();
- assertThat(cfg.getLabelSections().get(label.getName()).getRefPatterns()).contains("master");
+ assertThat(cfg.getLabelSections().get(LABEL_NAME).getRefPatterns()).contains("master");
}
private void assertLabelStatus(String changeId, String testLabel) throws Exception {
@@ -348,10 +337,11 @@
assertThat(labelInfo.blocking).isNull();
}
- private void saveLabelConfig() throws Exception {
+ private void saveLabelConfig(LabelType.Builder... builders) throws Exception {
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().getLabelSections().put(label.getName(), label);
- u.getConfig().getLabelSections().put(P.getName(), P);
+ for (LabelType.Builder b : builders) {
+ u.getConfig().upsertLabelType(b.build());
+ }
u.save();
}
}
diff --git a/javatests/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java b/javatests/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java
index 7a80cbd..ff26fec 100644
--- a/javatests/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java
@@ -50,15 +50,15 @@
@Test
public void newPatchSetsNotifyConfig() throws Exception {
Address addr = Address.create("Watcher", "watcher@example.com");
- NotifyConfig nc = new NotifyConfig();
- nc.addEmail(addr);
+ NotifyConfig.Builder nc = NotifyConfig.builder();
+ nc.addAddress(addr);
nc.setName("new-patch-set");
nc.setHeader(NotifyConfig.Header.CC);
- nc.setTypes(EnumSet.of(NotifyType.NEW_PATCHSETS));
+ nc.setNotify(EnumSet.of(NotifyType.NEW_PATCHSETS));
nc.setFilter("message:sekret");
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().putNotifyConfig("watch", nc);
+ u.getConfig().putNotifyConfig("watch", nc.build());
u.save();
}
@@ -91,14 +91,14 @@
@Test
public void noNotificationForPrivateChangesForWatchersInNotifyConfig() throws Exception {
Address addr = Address.create("Watcher", "watcher@example.com");
- NotifyConfig nc = new NotifyConfig();
- nc.addEmail(addr);
+ NotifyConfig.Builder nc = NotifyConfig.builder();
+ nc.addAddress(addr);
nc.setName("team");
nc.setHeader(NotifyConfig.Header.TO);
- nc.setTypes(EnumSet.of(NotifyType.NEW_CHANGES, NotifyType.ALL_COMMENTS));
+ nc.setNotify(EnumSet.of(NotifyType.NEW_CHANGES, NotifyType.ALL_COMMENTS));
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().putNotifyConfig("team", nc);
+ u.getConfig().putNotifyConfig("team", nc.build());
u.save();
}
@@ -123,14 +123,14 @@
public void noNotificationForChangeThatIsTurnedPrivateForWatchersInNotifyConfig()
throws Exception {
Address addr = Address.create("Watcher", "watcher@example.com");
- NotifyConfig nc = new NotifyConfig();
- nc.addEmail(addr);
+ NotifyConfig.Builder nc = NotifyConfig.builder();
+ nc.addAddress(addr);
nc.setName("team");
nc.setHeader(NotifyConfig.Header.TO);
- nc.setTypes(EnumSet.of(NotifyType.NEW_PATCHSETS));
+ nc.setNotify(EnumSet.of(NotifyType.NEW_PATCHSETS));
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().putNotifyConfig("team", nc);
+ u.getConfig().putNotifyConfig("team", nc.build());
u.save();
}
@@ -152,14 +152,14 @@
@Test
public void noNotificationForWipChangesForWatchersInNotifyConfig() throws Exception {
Address addr = Address.create("Watcher", "watcher@example.com");
- NotifyConfig nc = new NotifyConfig();
- nc.addEmail(addr);
+ NotifyConfig.Builder nc = NotifyConfig.builder();
+ nc.addAddress(addr);
nc.setName("team");
nc.setHeader(NotifyConfig.Header.TO);
- nc.setTypes(EnumSet.of(NotifyType.NEW_CHANGES, NotifyType.ALL_COMMENTS));
+ nc.setNotify(EnumSet.of(NotifyType.NEW_CHANGES, NotifyType.ALL_COMMENTS));
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().putNotifyConfig("team", nc);
+ u.getConfig().putNotifyConfig("team", nc.build());
u.save();
}
@@ -183,14 +183,14 @@
@Test
public void noNotificationForChangeThatIsTurnedWipForWatchersInNotifyConfig() throws Exception {
Address addr = Address.create("Watcher", "watcher@example.com");
- NotifyConfig nc = new NotifyConfig();
- nc.addEmail(addr);
+ NotifyConfig.Builder nc = NotifyConfig.builder();
+ nc.addAddress(addr);
nc.setName("team");
nc.setHeader(NotifyConfig.Header.TO);
- nc.setTypes(EnumSet.of(NotifyType.NEW_PATCHSETS));
+ nc.setNotify(EnumSet.of(NotifyType.NEW_PATCHSETS));
try (ProjectConfigUpdate u = updateProject(project)) {
- u.getConfig().putNotifyConfig("team", nc);
+ u.getConfig().putNotifyConfig("team", nc.build());
u.save();
}
@@ -279,7 +279,7 @@
sender.clear();
// watch project as user2
- TestAccount user2 = accountCreator.create("user2", "user2@test.com", "User2", null);
+ TestAccount user2 = accountCreator.create("user2", "user2@example.com", "User2", null);
requestScopeOperations.setApiUser(user2.id());
watch(watchedProject);
@@ -391,7 +391,7 @@
sender.clear();
// watch project as user2
- TestAccount user2 = accountCreator.create("user2", "user2@test.com", "User2", null);
+ TestAccount user2 = accountCreator.create("user2", "user2@example.com", "User2", null);
requestScopeOperations.setApiUser(user2.id());
watch(anyProject);
@@ -528,7 +528,7 @@
// watch project as user that can view all private change
TestAccount userThatCanViewPrivateChanges =
accountCreator.create(
- "user2", "user2@test.com", "User2", null, groupThatCanViewPrivateChanges.name);
+ "user2", "user2@example.com", "User2", null, groupThatCanViewPrivateChanges.name);
requestScopeOperations.setApiUser(userThatCanViewPrivateChanges.id());
watch(watchedProject);
diff --git a/javatests/com/google/gerrit/acceptance/server/rules/IgnoreSelfApprovalRuleIT.java b/javatests/com/google/gerrit/acceptance/server/rules/IgnoreSelfApprovalRuleIT.java
index 1c820af..90d4e09 100644
--- a/javatests/com/google/gerrit/acceptance/server/rules/IgnoreSelfApprovalRuleIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/rules/IgnoreSelfApprovalRuleIT.java
@@ -89,7 +89,7 @@
if (localLabelSections.isEmpty()) {
localLabelSections.putAll(projectCache.getAllProjects().getConfig().getLabelSections());
}
- localLabelSections.get(labelName).setIgnoreSelfApproval(newState);
+ u.getConfig().updateLabelType(labelName, lt -> lt.setIgnoreSelfApproval(newState));
u.save();
}
}
diff --git a/javatests/com/google/gerrit/acceptance/testsuite/project/ProjectOperationsImplTest.java b/javatests/com/google/gerrit/acceptance/testsuite/project/ProjectOperationsImplTest.java
index 65c7b5c..c8899b9 100644
--- a/javatests/com/google/gerrit/acceptance/testsuite/project/ProjectOperationsImplTest.java
+++ b/javatests/com/google/gerrit/acceptance/testsuite/project/ProjectOperationsImplTest.java
@@ -106,7 +106,7 @@
assertThat(cachedProjectConfig1).isNotSameInstanceAs(projectConfig);
assertThat(cachedProjectConfig1.getProject().getDescription()).isEmpty();
assertThat(projectConfig.getProject().getDescription()).isEmpty();
- projectConfig.getProject().setDescription("my fancy project");
+ projectConfig.updateProject(p -> p.setDescription("my fancy project"));
ProjectConfig cachedProjectConfig2 =
projectCache.get(key).orElseThrow(illegalState(project)).getConfig();
diff --git a/javatests/com/google/gerrit/common/data/GroupReferenceTest.java b/javatests/com/google/gerrit/common/data/GroupReferenceTest.java
index 25b55c7..113bd77 100644
--- a/javatests/com/google/gerrit/common/data/GroupReferenceTest.java
+++ b/javatests/com/google/gerrit/common/data/GroupReferenceTest.java
@@ -58,7 +58,7 @@
public void create() {
AccountGroup.UUID uuid = AccountGroup.uuid("uuid");
String name = "foo";
- GroupReference groupReference = new GroupReference(uuid, name);
+ GroupReference groupReference = GroupReference.create(uuid, name);
assertThat(groupReference.getUUID()).isEqualTo(uuid);
assertThat(groupReference.getName()).isEqualTo(name);
}
@@ -68,7 +68,7 @@
// GroupReferences where the UUID is null are used to represent groups from project.config that
// cannot be resolved.
String name = "foo";
- GroupReference groupReference = new GroupReference(name);
+ GroupReference groupReference = GroupReference.create(name);
assertThat(groupReference.getUUID()).isNull();
assertThat(groupReference.getName()).isEqualTo(name);
}
@@ -76,7 +76,7 @@
@Test
public void cannotCreateWithoutName() {
assertThrows(
- NullPointerException.class, () -> new GroupReference(AccountGroup.uuid("uuid"), null));
+ NullPointerException.class, () -> GroupReference.create(AccountGroup.uuid("uuid"), null));
}
@Test
@@ -98,40 +98,9 @@
}
@Test
- public void getAndSetUuid() {
- AccountGroup.UUID uuid = AccountGroup.uuid("uuid-foo");
- String name = "foo";
- GroupReference groupReference = new GroupReference(uuid, name);
- assertThat(groupReference.getUUID()).isEqualTo(uuid);
-
- AccountGroup.UUID uuid2 = AccountGroup.uuid("uuid-bar");
- groupReference.setUUID(uuid2);
- assertThat(groupReference.getUUID()).isEqualTo(uuid2);
-
- // GroupReferences where the UUID is null are used to represent groups from project.config that
- // cannot be resolved.
- groupReference.setUUID(null);
- assertThat(groupReference.getUUID()).isNull();
- }
-
- @Test
- public void getAndSetName() {
- AccountGroup.UUID uuid = AccountGroup.uuid("uuid-foo");
- String name = "foo";
- GroupReference groupReference = new GroupReference(uuid, name);
- assertThat(groupReference.getName()).isEqualTo(name);
-
- String name2 = "bar";
- groupReference.setName(name2);
- assertThat(groupReference.getName()).isEqualTo(name2);
-
- assertThrows(NullPointerException.class, () -> groupReference.setName(null));
- }
-
- @Test
public void toConfigValue() {
String name = "foo";
- GroupReference groupReference = new GroupReference(AccountGroup.uuid("uuid-foo"), name);
+ GroupReference groupReference = GroupReference.create(AccountGroup.uuid("uuid-foo"), name);
assertThat(groupReference.toConfigValue()).isEqualTo("group " + name);
}
@@ -142,9 +111,9 @@
String name1 = "foo";
String name2 = "bar";
- GroupReference groupReference1 = new GroupReference(uuid1, name1);
- GroupReference groupReference2 = new GroupReference(uuid1, name2);
- GroupReference groupReference3 = new GroupReference(uuid2, name1);
+ GroupReference groupReference1 = GroupReference.create(uuid1, name1);
+ GroupReference groupReference2 = GroupReference.create(uuid1, name2);
+ GroupReference groupReference3 = GroupReference.create(uuid2, name1);
assertThat(groupReference1.equals(groupReference2)).isTrue();
assertThat(groupReference1.equals(groupReference3)).isFalse();
@@ -154,10 +123,10 @@
@Test
public void testHashcode() {
AccountGroup.UUID uuid1 = AccountGroup.uuid("uuid1");
- assertThat(new GroupReference(uuid1, "foo").hashCode())
- .isEqualTo(new GroupReference(uuid1, "bar").hashCode());
+ assertThat(GroupReference.create(uuid1, "foo").hashCode())
+ .isEqualTo(GroupReference.create(uuid1, "bar").hashCode());
// Check that the following calls don't fail with an exception.
- new GroupReference("bar").hashCode();
+ GroupReference.create("bar").hashCode();
}
}
diff --git a/javatests/com/google/gerrit/common/data/LabelFunctionTest.java b/javatests/com/google/gerrit/common/data/LabelFunctionTest.java
index 6f5232b..8fea072 100644
--- a/javatests/com/google/gerrit/common/data/LabelFunctionTest.java
+++ b/javatests/com/google/gerrit/common/data/LabelFunctionTest.java
@@ -87,12 +87,12 @@
private static LabelType makeLabel() {
List<LabelValue> values = new ArrayList<>();
// The label text is irrelevant here, only the numerical value is used
- values.add(new LabelValue((short) -2, "Great job, please fix compilation."));
- values.add(new LabelValue((short) -1, "Really good, please make some minor changes."));
- values.add(new LabelValue((short) 0, "No vote."));
- values.add(new LabelValue((short) 1, "Closest thing perfection."));
- values.add(new LabelValue((short) 2, "Perfect!"));
- return new LabelType(LABEL_NAME, values);
+ values.add(LabelValue.create((short) -2, "Great job, please fix compilation."));
+ values.add(LabelValue.create((short) -1, "Really good, please make some minor changes."));
+ values.add(LabelValue.create((short) 0, "No vote."));
+ values.add(LabelValue.create((short) 1, "Closest thing perfection."));
+ values.add(LabelValue.create((short) 2, "Perfect!"));
+ return LabelType.create(LABEL_NAME, values);
}
private static PatchSetApproval makeApproval(int value) {
diff --git a/javatests/com/google/gerrit/common/data/LabelTypeTest.java b/javatests/com/google/gerrit/common/data/LabelTypeTest.java
index 6c3befb..76ea6e1 100644
--- a/javatests/com/google/gerrit/common/data/LabelTypeTest.java
+++ b/javatests/com/google/gerrit/common/data/LabelTypeTest.java
@@ -22,26 +22,26 @@
public class LabelTypeTest {
@Test
public void sortLabelValues() {
- LabelValue v0 = new LabelValue((short) 0, "Zero");
- LabelValue v1 = new LabelValue((short) 1, "One");
- LabelValue v2 = new LabelValue((short) 2, "Two");
- LabelType types = new LabelType("Label", ImmutableList.of(v2, v0, v1));
+ LabelValue v0 = LabelValue.create((short) 0, "Zero");
+ LabelValue v1 = LabelValue.create((short) 1, "One");
+ LabelValue v2 = LabelValue.create((short) 2, "Two");
+ LabelType types = LabelType.create("Label", ImmutableList.of(v2, v0, v1));
assertThat(types.getValues()).containsExactly(v0, v1, v2).inOrder();
}
@Test
public void insertMissingLabelValues() {
- LabelValue v0 = new LabelValue((short) 0, "Zero");
- LabelValue v2 = new LabelValue((short) 2, "Two");
- LabelValue v5 = new LabelValue((short) 5, "Five");
- LabelType types = new LabelType("Label", ImmutableList.of(v2, v5, v0));
+ LabelValue v0 = LabelValue.create((short) 0, "Zero");
+ LabelValue v2 = LabelValue.create((short) 2, "Two");
+ LabelValue v5 = LabelValue.create((short) 5, "Five");
+ LabelType types = LabelType.create("Label", ImmutableList.of(v2, v5, v0));
assertThat(types.getValues())
.containsExactly(
v0,
- new LabelValue((short) 1, ""),
+ LabelValue.create((short) 1, ""),
v2,
- new LabelValue((short) 3, ""),
- new LabelValue((short) 4, ""),
+ LabelValue.create((short) 3, ""),
+ LabelValue.create((short) 4, ""),
v5)
.inOrder();
}
diff --git a/javatests/com/google/gerrit/common/data/PermissionRuleTest.java b/javatests/com/google/gerrit/common/data/PermissionRuleTest.java
index d815dbc..6dc357c 100644
--- a/javatests/com/google/gerrit/common/data/PermissionRuleTest.java
+++ b/javatests/com/google/gerrit/common/data/PermissionRuleTest.java
@@ -28,7 +28,7 @@
@Before
public void setup() {
- this.groupReference = new GroupReference(AccountGroup.uuid("uuid"), "group");
+ this.groupReference = GroupReference.create(AccountGroup.uuid("uuid"), "group");
this.permissionRule = new PermissionRule(groupReference);
}
@@ -130,7 +130,7 @@
@Test
public void setGroup() {
- GroupReference groupReference2 = new GroupReference(AccountGroup.uuid("uuid2"), "group2");
+ GroupReference groupReference2 = GroupReference.create(AccountGroup.uuid("uuid2"), "group2");
assertThat(groupReference2).isNotEqualTo(groupReference);
assertThat(permissionRule.getGroup()).isEqualTo(groupReference);
@@ -141,10 +141,10 @@
@Test
public void mergeFromAnyBlock() {
- GroupReference groupReference1 = new GroupReference(AccountGroup.uuid("uuid1"), "group1");
+ GroupReference groupReference1 = GroupReference.create(AccountGroup.uuid("uuid1"), "group1");
PermissionRule permissionRule1 = new PermissionRule(groupReference1);
- GroupReference groupReference2 = new GroupReference(AccountGroup.uuid("uuid2"), "group2");
+ GroupReference groupReference2 = GroupReference.create(AccountGroup.uuid("uuid2"), "group2");
PermissionRule permissionRule2 = new PermissionRule(groupReference2);
permissionRule1.mergeFrom(permissionRule2);
@@ -169,10 +169,10 @@
@Test
public void mergeFromAnyDeny() {
- GroupReference groupReference1 = new GroupReference(AccountGroup.uuid("uuid1"), "group1");
+ GroupReference groupReference1 = GroupReference.create(AccountGroup.uuid("uuid1"), "group1");
PermissionRule permissionRule1 = new PermissionRule(groupReference1);
- GroupReference groupReference2 = new GroupReference(AccountGroup.uuid("uuid2"), "group2");
+ GroupReference groupReference2 = GroupReference.create(AccountGroup.uuid("uuid2"), "group2");
PermissionRule permissionRule2 = new PermissionRule(groupReference2);
permissionRule1.mergeFrom(permissionRule2);
@@ -192,10 +192,10 @@
@Test
public void mergeFromAnyBatch() {
- GroupReference groupReference1 = new GroupReference(AccountGroup.uuid("uuid1"), "group1");
+ GroupReference groupReference1 = GroupReference.create(AccountGroup.uuid("uuid1"), "group1");
PermissionRule permissionRule1 = new PermissionRule(groupReference1);
- GroupReference groupReference2 = new GroupReference(AccountGroup.uuid("uuid2"), "group2");
+ GroupReference groupReference2 = GroupReference.create(AccountGroup.uuid("uuid2"), "group2");
PermissionRule permissionRule2 = new PermissionRule(groupReference2);
permissionRule1.mergeFrom(permissionRule2);
@@ -215,10 +215,10 @@
@Test
public void mergeFromAnyForce() {
- GroupReference groupReference1 = new GroupReference(AccountGroup.uuid("uuid1"), "group1");
+ GroupReference groupReference1 = GroupReference.create(AccountGroup.uuid("uuid1"), "group1");
PermissionRule permissionRule1 = new PermissionRule(groupReference1);
- GroupReference groupReference2 = new GroupReference(AccountGroup.uuid("uuid2"), "group2");
+ GroupReference groupReference2 = GroupReference.create(AccountGroup.uuid("uuid2"), "group2");
PermissionRule permissionRule2 = new PermissionRule(groupReference2);
permissionRule1.mergeFrom(permissionRule2);
@@ -238,11 +238,11 @@
@Test
public void mergeFromMergeRange() {
- GroupReference groupReference1 = new GroupReference(AccountGroup.uuid("uuid1"), "group1");
+ GroupReference groupReference1 = GroupReference.create(AccountGroup.uuid("uuid1"), "group1");
PermissionRule permissionRule1 = new PermissionRule(groupReference1);
permissionRule1.setRange(-1, 2);
- GroupReference groupReference2 = new GroupReference(AccountGroup.uuid("uuid2"), "group2");
+ GroupReference groupReference2 = GroupReference.create(AccountGroup.uuid("uuid2"), "group2");
PermissionRule permissionRule2 = new PermissionRule(groupReference2);
permissionRule2.setRange(-2, 1);
@@ -255,10 +255,10 @@
@Test
public void mergeFromGroupNotChanged() {
- GroupReference groupReference1 = new GroupReference(AccountGroup.uuid("uuid1"), "group1");
+ GroupReference groupReference1 = GroupReference.create(AccountGroup.uuid("uuid1"), "group1");
PermissionRule permissionRule1 = new PermissionRule(groupReference1);
- GroupReference groupReference2 = new GroupReference(AccountGroup.uuid("uuid2"), "group2");
+ GroupReference groupReference2 = GroupReference.create(AccountGroup.uuid("uuid2"), "group2");
PermissionRule permissionRule2 = new PermissionRule(groupReference2);
permissionRule1.mergeFrom(permissionRule2);
@@ -347,7 +347,7 @@
@Test
public void testEquals() {
- GroupReference groupReference2 = new GroupReference(AccountGroup.uuid("uuid2"), "group2");
+ GroupReference groupReference2 = GroupReference.create(AccountGroup.uuid("uuid2"), "group2");
PermissionRule permissionRuleOther = new PermissionRule(groupReference2);
assertThat(permissionRule.equals(permissionRuleOther)).isFalse();
diff --git a/javatests/com/google/gerrit/common/data/PermissionTest.java b/javatests/com/google/gerrit/common/data/PermissionTest.java
index 1012eff..ef36ad9 100644
--- a/javatests/com/google/gerrit/common/data/PermissionTest.java
+++ b/javatests/com/google/gerrit/common/data/PermissionTest.java
@@ -154,14 +154,14 @@
@Test
public void setAndGetRules() {
PermissionRule permissionRule1 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-1"), "group1"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-1"), "group1"));
PermissionRule permissionRule2 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-2"), "group2"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-2"), "group2"));
permission.setRules(ImmutableList.of(permissionRule1, permissionRule2));
assertThat(permission.getRules()).containsExactly(permissionRule1, permissionRule2).inOrder();
PermissionRule permissionRule3 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-3"), "group3"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-3"), "group3"));
permission.setRules(ImmutableList.of(permissionRule3));
assertThat(permission.getRules()).containsExactly(permissionRule3);
}
@@ -169,10 +169,10 @@
@Test
public void cannotAddPermissionByModifyingListThatWasProvidedToAccessSection() {
PermissionRule permissionRule1 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-1"), "group1"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-1"), "group1"));
PermissionRule permissionRule2 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-2"), "group2"));
- GroupReference groupReference3 = new GroupReference(AccountGroup.uuid("uuid-3"), "group3");
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-2"), "group2"));
+ GroupReference groupReference3 = GroupReference.create(AccountGroup.uuid("uuid-3"), "group3");
List<PermissionRule> rules = new ArrayList<>();
rules.add(permissionRule1);
@@ -187,14 +187,14 @@
@Test
public void getNonExistingRule() {
- GroupReference groupReference = new GroupReference(AccountGroup.uuid("uuid-1"), "group1");
+ GroupReference groupReference = GroupReference.create(AccountGroup.uuid("uuid-1"), "group1");
assertThat(permission.getRule(groupReference)).isNull();
assertThat(permission.getRule(groupReference, false)).isNull();
}
@Test
public void getRule() {
- GroupReference groupReference = new GroupReference(AccountGroup.uuid("uuid-1"), "group1");
+ GroupReference groupReference = GroupReference.create(AccountGroup.uuid("uuid-1"), "group1");
PermissionRule permissionRule = new PermissionRule(groupReference);
permission.setRules(ImmutableList.of(permissionRule));
assertThat(permission.getRule(groupReference)).isEqualTo(permissionRule);
@@ -202,7 +202,7 @@
@Test
public void createMissingRuleOnGet() {
- GroupReference groupReference = new GroupReference(AccountGroup.uuid("uuid-1"), "group1");
+ GroupReference groupReference = GroupReference.create(AccountGroup.uuid("uuid-1"), "group1");
assertThat(permission.getRule(groupReference)).isNull();
assertThat(permission.getRule(groupReference, true))
@@ -212,11 +212,11 @@
@Test
public void addRule() {
PermissionRule permissionRule1 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-1"), "group1"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-1"), "group1"));
PermissionRule permissionRule2 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-2"), "group2"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-2"), "group2"));
permission.setRules(ImmutableList.of(permissionRule1, permissionRule2));
- GroupReference groupReference3 = new GroupReference(AccountGroup.uuid("uuid-3"), "group3");
+ GroupReference groupReference3 = GroupReference.create(AccountGroup.uuid("uuid-3"), "group3");
assertThat(permission.getRule(groupReference3)).isNull();
PermissionRule permissionRule3 = new PermissionRule(groupReference3);
@@ -230,10 +230,10 @@
@Test
public void removeRule() {
PermissionRule permissionRule1 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-1"), "group1"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-1"), "group1"));
PermissionRule permissionRule2 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-2"), "group2"));
- GroupReference groupReference3 = new GroupReference(AccountGroup.uuid("uuid-3"), "group3");
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-2"), "group2"));
+ GroupReference groupReference3 = GroupReference.create(AccountGroup.uuid("uuid-3"), "group3");
PermissionRule permissionRule3 = new PermissionRule(groupReference3);
permission.setRules(ImmutableList.of(permissionRule1, permissionRule2, permissionRule3));
@@ -247,10 +247,10 @@
@Test
public void removeRuleByGroupReference() {
PermissionRule permissionRule1 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-1"), "group1"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-1"), "group1"));
PermissionRule permissionRule2 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-2"), "group2"));
- GroupReference groupReference3 = new GroupReference(AccountGroup.uuid("uuid-3"), "group3");
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-2"), "group2"));
+ GroupReference groupReference3 = GroupReference.create(AccountGroup.uuid("uuid-3"), "group3");
PermissionRule permissionRule3 = new PermissionRule(groupReference3);
permission.setRules(ImmutableList.of(permissionRule1, permissionRule2, permissionRule3));
@@ -264,9 +264,9 @@
@Test
public void clearRules() {
PermissionRule permissionRule1 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-1"), "group1"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-1"), "group1"));
PermissionRule permissionRule2 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-2"), "group2"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-2"), "group2"));
permission.setRules(ImmutableList.of(permissionRule1, permissionRule2));
assertThat(permission.getRules()).isNotEmpty();
@@ -278,11 +278,11 @@
@Test
public void mergePermissions() {
PermissionRule permissionRule1 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-1"), "group1"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-1"), "group1"));
PermissionRule permissionRule2 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-2"), "group2"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-2"), "group2"));
PermissionRule permissionRule3 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-3"), "group3"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-3"), "group3"));
Permission permission1 = new Permission("foo");
permission1.setRules(ImmutableList.of(permissionRule1, permissionRule2));
@@ -299,9 +299,9 @@
@Test
public void testEquals() {
PermissionRule permissionRule1 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-1"), "group1"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-1"), "group1"));
PermissionRule permissionRule2 =
- new PermissionRule(new GroupReference(AccountGroup.uuid("uuid-2"), "group2"));
+ new PermissionRule(GroupReference.create(AccountGroup.uuid("uuid-2"), "group2"));
permission.setRules(ImmutableList.of(permissionRule1, permissionRule2));
diff --git a/javatests/com/google/gerrit/server/account/DestinationListTest.java b/javatests/com/google/gerrit/server/account/DestinationListTest.java
index 4188f39..6fcf75c 100644
--- a/javatests/com/google/gerrit/server/account/DestinationListTest.java
+++ b/javatests/com/google/gerrit/server/account/DestinationListTest.java
@@ -132,7 +132,7 @@
List<ValidationError> errors = new ArrayList<>();
new DestinationList().parseLabel(LABEL, L_BAD, errors::add);
assertThat(errors)
- .containsExactly(new ValidationError("destinationslabel", 1, "missing tab delimiter"));
+ .containsExactly(ValidationError.create("destinationslabel", 1, "missing tab delimiter"));
}
@Test
diff --git a/javatests/com/google/gerrit/server/account/QueryListTest.java b/javatests/com/google/gerrit/server/account/QueryListTest.java
index 7d491c9..74ce907 100644
--- a/javatests/com/google/gerrit/server/account/QueryListTest.java
+++ b/javatests/com/google/gerrit/server/account/QueryListTest.java
@@ -101,7 +101,8 @@
public void testParseBad() throws Exception {
List<ValidationError> errors = new ArrayList<>();
assertThat(QueryList.parse(L_BAD, errors::add).asText()).isNull();
- assertThat(errors).containsExactly(new ValidationError("queries", 1, "missing tab delimiter"));
+ assertThat(errors)
+ .containsExactly(ValidationError.create("queries", 1, "missing tab delimiter"));
}
@Test
diff --git a/javatests/com/google/gerrit/server/change/LabelNormalizerTest.java b/javatests/com/google/gerrit/server/change/LabelNormalizerTest.java
index c259e60..ba8485b 100644
--- a/javatests/com/google/gerrit/server/change/LabelNormalizerTest.java
+++ b/javatests/com/google/gerrit/server/change/LabelNormalizerTest.java
@@ -105,7 +105,7 @@
}
LabelType lt =
label("Verified", value(1, "Verified"), value(0, "No score"), value(-1, "Fails"));
- pc.getLabelSections().put(lt.getName(), lt);
+ pc.upsertLabelType(lt);
save(pc);
}
diff --git a/javatests/com/google/gerrit/server/events/BUILD b/javatests/com/google/gerrit/server/events/BUILD
index eed83c8..be983a9 100644
--- a/javatests/com/google/gerrit/server/events/BUILD
+++ b/javatests/com/google/gerrit/server/events/BUILD
@@ -6,6 +6,7 @@
deps = [
"//java/com/google/gerrit/entities",
"//java/com/google/gerrit/server",
+ "//java/com/google/gerrit/server/data",
"//java/com/google/gerrit/server/util/time",
"//java/com/google/gerrit/testing:gerrit-test-util",
"//lib:gson",
diff --git a/javatests/com/google/gerrit/server/group/db/GroupNameNotesTest.java b/javatests/com/google/gerrit/server/group/db/GroupNameNotesTest.java
index df97e88..278f617 100644
--- a/javatests/com/google/gerrit/server/group/db/GroupNameNotesTest.java
+++ b/javatests/com/google/gerrit/server/group/db/GroupNameNotesTest.java
@@ -393,8 +393,8 @@
ImmutableList<GroupReference> allGroups = GroupNameNotes.loadAllGroups(repo);
- GroupReference group1 = new GroupReference(groupUuid1, groupName1.get());
- GroupReference group2 = new GroupReference(groupUuid2, groupName2.get());
+ GroupReference group1 = GroupReference.create(groupUuid1, groupName1.get());
+ GroupReference group2 = GroupReference.create(groupUuid2, groupName2.get());
assertThat(allGroups).containsExactly(group1, group2);
}
@@ -406,8 +406,8 @@
ImmutableList<GroupReference> allGroups = GroupNameNotes.loadAllGroups(repo);
- GroupReference group1 = new GroupReference(groupUuid, groupName.get());
- GroupReference group2 = new GroupReference(groupUuid, anotherGroupName.get());
+ GroupReference group1 = GroupReference.create(groupUuid, groupName.get());
+ GroupReference group2 = GroupReference.create(groupUuid, anotherGroupName.get());
assertThat(allGroups).containsExactly(group1, group2);
}
@@ -498,14 +498,14 @@
@Test
public void updateGroupNamesRejectsNonOneToOneGroupReferences() throws Exception {
assertIllegalArgument(
- new GroupReference(AccountGroup.uuid("uuid1"), "name1"),
- new GroupReference(AccountGroup.uuid("uuid1"), "name2"));
+ GroupReference.create(AccountGroup.uuid("uuid1"), "name1"),
+ GroupReference.create(AccountGroup.uuid("uuid1"), "name2"));
assertIllegalArgument(
- new GroupReference(AccountGroup.uuid("uuid1"), "name1"),
- new GroupReference(AccountGroup.uuid("uuid2"), "name1"));
+ GroupReference.create(AccountGroup.uuid("uuid1"), "name1"),
+ GroupReference.create(AccountGroup.uuid("uuid2"), "name1"));
assertIllegalArgument(
- new GroupReference(AccountGroup.uuid("uuid1"), "name1"),
- new GroupReference(AccountGroup.uuid("uuid1"), "name1"));
+ GroupReference.create(AccountGroup.uuid("uuid1"), "name1"),
+ GroupReference.create(AccountGroup.uuid("uuid1"), "name1"));
}
@Test
@@ -554,7 +554,7 @@
private GroupReference newGroup(String name) {
int id = idCounter.incrementAndGet();
- return new GroupReference(AccountGroup.uuid(name + "-" + id), name);
+ return GroupReference.create(AccountGroup.uuid(name + "-" + id), name);
}
private static PersonIdent newPersonIdent() {
diff --git a/javatests/com/google/gerrit/server/mail/send/FromAddressGeneratorProviderTest.java b/javatests/com/google/gerrit/server/mail/send/FromAddressGeneratorProviderTest.java
index a383d56..03129ae 100644
--- a/javatests/com/google/gerrit/server/mail/send/FromAddressGeneratorProviderTest.java
+++ b/javatests/com/google/gerrit/server/mail/send/FromAddressGeneratorProviderTest.java
@@ -146,9 +146,9 @@
@Test
public void USERNoAllowDomain() {
setFrom("USER");
- setDomains(Arrays.asList("example.com"));
+ setDomains(Arrays.asList("example.net"));
final String name = "A U. Thor";
- final String email = "a.u.thor@test.com";
+ final String email = "a.u.thor@example.com";
final Account.Id user = user(name, email);
final Address r = create().from(user);
@@ -161,10 +161,10 @@
@Test
public void USERAllowDomainTwice() {
setFrom("USER");
+ setDomains(Arrays.asList("example.net"));
setDomains(Arrays.asList("example.com"));
- setDomains(Arrays.asList("test.com"));
final String name = "A U. Thor";
- final String email = "a.u.thor@test.com";
+ final String email = "a.u.thor@example.com";
final Account.Id user = user(name, email);
final Address r = create().from(user);
@@ -177,10 +177,10 @@
@Test
public void USERAllowDomainTwiceReverse() {
setFrom("USER");
- setDomains(Arrays.asList("test.com"));
setDomains(Arrays.asList("example.com"));
+ setDomains(Arrays.asList("example.net"));
final String name = "A U. Thor";
- final String email = "a.u.thor@test.com";
+ final String email = "a.u.thor@example.com";
final Account.Id user = user(name, email);
final Address r = create().from(user);
@@ -193,9 +193,9 @@
@Test
public void USERAllowTwoDomains() {
setFrom("USER");
- setDomains(Arrays.asList("example.com", "test.com"));
+ setDomains(Arrays.asList("example.com", "example.net"));
final String name = "A U. Thor";
- final String email = "a.u.thor@test.com";
+ final String email = "a.u.thor@example.com";
final Account.Id user = user(name, email);
final Address r = create().from(user);
diff --git a/javatests/com/google/gerrit/server/permissions/RefControlTest.java b/javatests/com/google/gerrit/server/permissions/RefControlTest.java
index 33446e4..9029301 100644
--- a/javatests/com/google/gerrit/server/permissions/RefControlTest.java
+++ b/javatests/com/google/gerrit/server/permissions/RefControlTest.java
@@ -207,7 +207,7 @@
ProjectConfig allProjectsConfig = projectConfigFactory.create(allProjectsName);
allProjectsConfig.load(md);
LabelType cr = TestLabels.codeReview();
- allProjectsConfig.getLabelSections().put(cr.getName(), cr);
+ allProjectsConfig.upsertLabelType(cr);
allProjectsConfig.commit(md);
}
}
@@ -217,7 +217,7 @@
try (MetaDataUpdate md = metaDataUpdateFactory.create(localKey)) {
ProjectConfig newLocal = projectConfigFactory.create(localKey);
newLocal.load(md);
- newLocal.getProject().setParentName(parentKey);
+ newLocal.updateProject(p -> p.setParent(parentKey));
newLocal.commit(md);
}
diff --git a/javatests/com/google/gerrit/server/project/GroupListTest.java b/javatests/com/google/gerrit/server/project/GroupListTest.java
index 518f85d..18e1631 100644
--- a/javatests/com/google/gerrit/server/project/GroupListTest.java
+++ b/javatests/com/google/gerrit/server/project/GroupListTest.java
@@ -63,7 +63,7 @@
@Test
public void put() {
AccountGroup.UUID uuid = AccountGroup.uuid("abc");
- GroupReference groupReference = new GroupReference(uuid, "Hutzliputz");
+ GroupReference groupReference = GroupReference.create(uuid, "Hutzliputz");
groupList.put(uuid, groupReference);
@@ -78,7 +78,7 @@
assertEquals(2, result.size());
AccountGroup.UUID uuid = AccountGroup.uuid("ebe31c01aec2c9ac3b3c03e87a47450829ff4310");
- GroupReference expected = new GroupReference(uuid, "Administrators");
+ GroupReference expected = GroupReference.create(uuid, "Administrators");
assertTrue(result.contains(expected));
}
diff --git a/javatests/com/google/gerrit/server/project/ProjectConfigTest.java b/javatests/com/google/gerrit/server/project/ProjectConfigTest.java
index 0dd6436..214aae7 100644
--- a/javatests/com/google/gerrit/server/project/ProjectConfigTest.java
+++ b/javatests/com/google/gerrit/server/project/ProjectConfigTest.java
@@ -34,6 +34,7 @@
import com.google.gerrit.server.config.PluginConfig;
import com.google.gerrit.server.config.SitePaths;
import com.google.gerrit.server.extensions.events.GitReferenceUpdated;
+import com.google.gerrit.server.git.BranchOrderSection;
import com.google.gerrit.server.git.ValidationError;
import com.google.gerrit.server.git.meta.MetaDataUpdate;
import com.google.gerrit.server.project.testing.TestLabels;
@@ -90,8 +91,8 @@
@Rule public TemporaryFolder temporaryFolder = new TemporaryFolder();
private final GroupReference developers =
- new GroupReference(AccountGroup.uuid("X"), "Developers");
- private final GroupReference staff = new GroupReference(AccountGroup.uuid("Y"), "Staff");
+ GroupReference.create(AccountGroup.uuid("X"), "Developers");
+ private final GroupReference staff = GroupReference.create(AccountGroup.uuid("Y"), "Staff");
private SitePaths sitePaths;
private ProjectConfig.Factory factory;
@@ -361,12 +362,43 @@
}
@Test
+ public void readExistingBranchOrder() throws Exception {
+ RevCommit rev =
+ tr.commit()
+ .add("project.config", "[branchOrder]\n" + "\tbranch = foo\n" + "\tbranch = bar\n")
+ .create();
+ update(rev);
+
+ ProjectConfig cfg = read(rev);
+ assertThat(cfg.getBranchOrderSection())
+ .isEqualTo(BranchOrderSection.create(ImmutableList.of("foo", "bar")));
+ }
+
+ @Test
+ public void editBranchOrder() throws Exception {
+ RevCommit rev = tr.commit().create();
+ update(rev);
+
+ ProjectConfig cfg = read(rev);
+ cfg.setBranchOrderSection(BranchOrderSection.create(ImmutableList.of("foo", "bar")));
+ rev = commit(cfg);
+ assertThat(text(rev, "project.config"))
+ .isEqualTo("[branchOrder]\n" + "\tbranch = foo\n" + "\tbranch = bar\n");
+ }
+
+ @Test
public void addCommentLink() throws Exception {
RevCommit rev = tr.commit().create();
update(rev);
ProjectConfig cfg = read(rev);
- CommentLinkInfoImpl cm = new CommentLinkInfoImpl("Test", "abc.*", null, "<a>link</a>", true);
+ StoredCommentLinkInfo cm =
+ StoredCommentLinkInfo.builder("Test")
+ .setMatch("abc.*")
+ .setHtml("<a>link</a>")
+ .setEnabled(true)
+ .setOverrideOnly(false)
+ .build();
cfg.addCommentLinkSection(cm);
rev = commit(cfg);
assertThat(text(rev, "project.config"))
@@ -529,12 +561,11 @@
ProjectConfig cfg = read(rev);
assertThat(cfg.getCommentLinkSections())
.containsExactly(
- new CommentLinkInfoImpl(
- "bugzilla",
- "(bug\\s+#?)(\\d+)",
- "http://bugs.example.com/show_bug.cgi?id=$2",
- null,
- null));
+ StoredCommentLinkInfo.builder("bugzilla")
+ .setMatch("(bug\\s+#?)(\\d+)")
+ .setLink("http://bugs.example.com/show_bug.cgi?id=$2")
+ .setOverrideOnly(false)
+ .build());
}
@Test
@@ -543,7 +574,7 @@
tr.commit().add("project.config", "[commentlink \"bugzilla\"]\n \tenabled = true").create();
ProjectConfig cfg = read(rev);
assertThat(cfg.getCommentLinkSections())
- .containsExactly(new CommentLinkInfoImpl.Enabled("bugzilla"));
+ .containsExactly(StoredCommentLinkInfo.enabled("bugzilla"));
}
@Test
@@ -554,7 +585,7 @@
.create();
ProjectConfig cfg = read(rev);
assertThat(cfg.getCommentLinkSections())
- .containsExactly(new CommentLinkInfoImpl.Disabled("bugzilla"));
+ .containsExactly(StoredCommentLinkInfo.disabled("bugzilla"));
}
@Test
@@ -571,7 +602,7 @@
assertThat(cfg.getCommentLinkSections()).isEmpty();
assertThat(cfg.getValidationErrors())
.containsExactly(
- new ValidationError(
+ ValidationError.create(
"project.config: Invalid pattern \"(bugs{+#?)(d+)\" in commentlink.bugzilla.match: "
+ "Illegal repetition near index 4\n"
+ "(bugs{+#?)(d+)\n"
@@ -592,7 +623,7 @@
assertThat(cfg.getCommentLinkSections()).isEmpty();
assertThat(cfg.getValidationErrors())
.containsExactly(
- new ValidationError(
+ ValidationError.create(
"project.config: Error in pattern \"(bugs#?)(d+)\" in commentlink.bugzilla.match: "
+ "Raw html replacement not allowed"));
}
@@ -607,7 +638,7 @@
assertThat(cfg.getCommentLinkSections()).isEmpty();
assertThat(cfg.getValidationErrors())
.containsExactly(
- new ValidationError(
+ ValidationError.create(
"project.config: Error in pattern \"(bugs#?)(d+)\" in commentlink.bugzilla.match: "
+ "commentlink.bugzilla must have either link or html"));
}
diff --git a/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java b/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java
index 59f2b6d..f5c9628 100644
--- a/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java
+++ b/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java
@@ -217,7 +217,7 @@
AccountInfo user5 = newAccountWithEmail("user5", name("user5MixedCase@example.com"));
- assertQuery("notexisting@test.com");
+ assertQuery("notexisting@example.com");
assertQuery(currentUserInfo.email, currentUserInfo);
assertQuery("email:" + currentUserInfo.email, currentUserInfo);
@@ -253,8 +253,8 @@
@Test
public void byEmailWithoutModifyAccountCapability() throws Exception {
- String preferredEmail = name("primary@test.com");
- String secondaryEmail = name("secondary@test.com");
+ String preferredEmail = name("primary@example.com");
+ String secondaryEmail = name("secondary@example.com");
AccountInfo user1 = newAccountWithEmail("user1", preferredEmail);
addEmails(user1, secondaryEmail);
@@ -485,11 +485,11 @@
// sorting by account ID. Use the same fullname for all accounts so that sorting must be done by
// preferred email.
AccountInfo userFoo3 =
- newAccount("user3", "foo-" + appendix, "foo3-" + appendix + "@test.com", true);
+ newAccount("user3", "foo-" + appendix, "foo3-" + appendix + "@example.com", true);
AccountInfo userFoo1 =
- newAccount("user1", "foo-" + appendix, "foo1-" + appendix + "@test.com", true);
+ newAccount("user1", "foo-" + appendix, "foo1-" + appendix + "@example.com", true);
AccountInfo userFoo2 =
- newAccount("user2", "foo-" + appendix, "foo2-" + appendix + "@test.com", true);
+ newAccount("user2", "foo-" + appendix, "foo2-" + appendix + "@example.com", true);
assertThat(userFoo3._accountId).isLessThan(userFoo1._accountId);
assertThat(userFoo1._accountId).isLessThan(userFoo2._accountId);
diff --git a/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java b/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java
index dbcac0d..4104017 100644
--- a/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java
+++ b/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java
@@ -1026,7 +1026,7 @@
try (MetaDataUpdate md = metaDataUpdateFactory.create(project)) {
ProjectConfig cfg = projectConfigFactory.create(project);
cfg.load(md);
- cfg.getLabelSections().put(verified.getName(), verified);
+ cfg.upsertLabelType(verified);
cfg.commit(md);
}
projectCache.evict(project);
@@ -1861,7 +1861,7 @@
ProjectConfig config = projectConfigFactory.read(md);
AccessSection s = config.getAccessSection(ref, true);
Permission p = s.getPermission(permission, true);
- PermissionRule rule = new PermissionRule(new GroupReference(groupUUID, groupUUID.get()));
+ PermissionRule rule = new PermissionRule(GroupReference.create(groupUUID, groupUUID.get()));
rule.setForce(force);
p.add(rule);
config.commit(md);
diff --git a/javatests/com/google/gerrit/server/rules/IgnoreSelfApprovalRuleTest.java b/javatests/com/google/gerrit/server/rules/IgnoreSelfApprovalRuleTest.java
index d8af0e5..85a3207 100644
--- a/javatests/com/google/gerrit/server/rules/IgnoreSelfApprovalRuleTest.java
+++ b/javatests/com/google/gerrit/server/rules/IgnoreSelfApprovalRuleTest.java
@@ -72,12 +72,12 @@
private static LabelType makeLabel(String labelName) {
List<LabelValue> values = new ArrayList<>();
// The label text is irrelevant here, only the numerical value is used
- values.add(new LabelValue((short) -2, "-2"));
- values.add(new LabelValue((short) -1, "-1"));
- values.add(new LabelValue((short) 0, "No vote."));
- values.add(new LabelValue((short) 1, "+1"));
- values.add(new LabelValue((short) 2, "+2"));
- return new LabelType(labelName, values);
+ values.add(LabelValue.create((short) -2, "-2"));
+ values.add(LabelValue.create((short) -1, "-1"));
+ values.add(LabelValue.create((short) 0, "No vote."));
+ values.add(LabelValue.create((short) 1, "+1"));
+ values.add(LabelValue.create((short) 2, "+2"));
+ return LabelType.create(labelName, values);
}
private static PatchSetApproval makeApproval(LabelId labelId, Account.Id accountId, int value) {
diff --git a/javatests/com/google/gerrit/server/schema/AllProjectsCreatorTest.java b/javatests/com/google/gerrit/server/schema/AllProjectsCreatorTest.java
index b65f4d2..9cf4896 100644
--- a/javatests/com/google/gerrit/server/schema/AllProjectsCreatorTest.java
+++ b/javatests/com/google/gerrit/server/schema/AllProjectsCreatorTest.java
@@ -44,12 +44,12 @@
public class AllProjectsCreatorTest {
private static final LabelType TEST_LABEL =
- new LabelType(
+ LabelType.create(
"Test-Label",
ImmutableList.of(
- new LabelValue((short) 2, "Two"),
- new LabelValue((short) 0, "Zero"),
- new LabelValue((short) 1, "One")));
+ LabelValue.create((short) 2, "Two"),
+ LabelValue.create((short) 0, "Zero"),
+ LabelValue.create((short) 1, "One")));
private static final String TEST_LABEL_STRING =
String.join(
@@ -102,7 +102,7 @@
private GroupReference createGroupReference(String name) {
AccountGroup.UUID groupUuid = GroupUuid.make(name, serverUser);
- return new GroupReference(groupUuid, name);
+ return GroupReference.create(groupUuid, name);
}
@Test
diff --git a/javatests/com/google/gerrit/server/submit/SubscriptionGraphTest.java b/javatests/com/google/gerrit/server/submit/SubscriptionGraphTest.java
index dbcc209..5f71544 100644
--- a/javatests/com/google/gerrit/server/submit/SubscriptionGraphTest.java
+++ b/javatests/com/google/gerrit/server/submit/SubscriptionGraphTest.java
@@ -81,9 +81,9 @@
@Test
public void oneSuperprojectOneSubmodule() throws Exception {
- SubscriptionGraph.Factory factory =
- new DefaultFactory(mockGitModulesFactory, mockProjectCache, mergeOpRepoManager);
- SubscriptionGraph subscriptionGraph = factory.compute(ImmutableSet.of(SUB_BRANCH));
+ SubscriptionGraph.Factory factory = new DefaultFactory(mockGitModulesFactory, mockProjectCache);
+ SubscriptionGraph subscriptionGraph =
+ factory.compute(ImmutableSet.of(SUB_BRANCH), mergeOpRepoManager);
assertThat(subscriptionGraph.getAffectedSuperProjects()).containsExactly(SUPER_PROJECT);
assertThat(subscriptionGraph.getAffectedSuperBranches(SUPER_PROJECT))
@@ -98,12 +98,12 @@
@Test
public void circularSubscription() throws Exception {
- SubscriptionGraph.Factory factory =
- new DefaultFactory(mockGitModulesFactory, mockProjectCache, mergeOpRepoManager);
+ SubscriptionGraph.Factory factory = new DefaultFactory(mockGitModulesFactory, mockProjectCache);
setSubscription(SUPER_BRANCH, ImmutableList.of(SUB_BRANCH));
SubmoduleConflictException e =
assertThrows(
- SubmoduleConflictException.class, () -> factory.compute(ImmutableSet.of(SUB_BRANCH)));
+ SubmoduleConflictException.class,
+ () -> factory.compute(ImmutableSet.of(SUB_BRANCH), mergeOpRepoManager));
String expectedErrorMessage =
"Subproject,refs/heads/one->Superproject,refs/heads/one->Subproject,refs/heads/one";
@@ -154,10 +154,9 @@
setSubscription(submoduleBranch2, ImmutableList.of(superBranch1));
setSubscription(submoduleBranch3, ImmutableList.of(superBranch1, superBranch2));
- SubscriptionGraph.Factory factory =
- new DefaultFactory(mockGitModulesFactory, mockProjectCache, mergeOpRepoManager);
+ SubscriptionGraph.Factory factory = new DefaultFactory(mockGitModulesFactory, mockProjectCache);
SubscriptionGraph subscriptionGraph =
- factory.compute(ImmutableSet.of(submoduleBranch1, submoduleBranch2));
+ factory.compute(ImmutableSet.of(submoduleBranch1, submoduleBranch2), mergeOpRepoManager);
assertThat(subscriptionGraph.getAffectedSuperProjects())
.containsExactly(superProject1, superProject2);
@@ -193,9 +192,9 @@
}
private void allowSubscription(BranchNameKey branch) {
- SubscribeSection s = new SubscribeSection(branch.project());
+ SubscribeSection.Builder s = SubscribeSection.builder(branch.project());
s.addMultiMatchRefSpec("refs/heads/*:refs/heads/*");
- when(mockProjectState.getSubscribeSections(branch)).thenReturn(ImmutableSet.of(s));
+ when(mockProjectState.getSubscribeSections(branch)).thenReturn(ImmutableSet.of(s.build()));
}
private void setSubscription(
diff --git a/lib/BUILD b/lib/BUILD
index d3ef4b9..0110047 100644
--- a/lib/BUILD
+++ b/lib/BUILD
@@ -160,7 +160,7 @@
name = "args4j",
data = ["//lib:LICENSE-args4j"],
visibility = ["//visibility:public"],
- exports = ["@args4j-intern//jar"],
+ exports = ["@args4j//jar"],
)
java_library(
diff --git a/lib/polymer_externs/BUILD b/lib/polymer_externs/BUILD
deleted file mode 100644
index f07aa2f..0000000
--- a/lib/polymer_externs/BUILD
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
-
-package(default_visibility = ["//visibility:public"])
-
-closure_js_library(
- name = "polymer_closure",
- srcs = ["@polymer_closure//file"],
- data = ["//lib:LICENSE-Apache2.0"],
- no_closure_library = True,
-)
diff --git a/package.json b/package.json
index 30dbb99..d051c41 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,7 @@
"dependencies": {},
"devDependencies": {
"@bazel/rollup": "^1.6.1",
+ "@bazel/terser": "^1.7.0",
"@bazel/typescript": "^1.6.1",
"eslint": "^6.6.0",
"eslint-config-google": "^0.13.0",
@@ -13,8 +14,10 @@
"eslint-plugin-jsdoc": "^19.2.0",
"eslint-plugin-prettier": "^3.1.3",
"fried-twinkie": "^0.2.2",
+ "gts": "^2.0.2",
"polymer-cli": "^1.9.11",
"prettier": "2.0.5",
+ "terser": "^4.8.0",
"typescript": "3.8.2"
},
"scripts": {
diff --git a/plugins/BUILD b/plugins/BUILD
index a071bde..943471a 100644
--- a/plugins/BUILD
+++ b/plugins/BUILD
@@ -49,6 +49,7 @@
"//java/com/google/gerrit/server/audit",
"//java/com/google/gerrit/server/cache/mem",
"//java/com/google/gerrit/server/cache/serialize",
+ "//java/com/google/gerrit/server/data",
"//java/com/google/gerrit/server/logging",
"//java/com/google/gerrit/server/schema",
"//java/com/google/gerrit/server/util/time",
diff --git a/plugins/delete-project b/plugins/delete-project
index 7671def..f420d06 160000
--- a/plugins/delete-project
+++ b/plugins/delete-project
@@ -1 +1 @@
-Subproject commit 7671def07882aab89b19eb7496418588ea7375d9
+Subproject commit f420d06562b97eab26a627baa7722c7f84d95763
diff --git a/plugins/replication b/plugins/replication
index b0ecbd3..ced7fc3 160000
--- a/plugins/replication
+++ b/plugins/replication
@@ -1 +1 @@
-Subproject commit b0ecbd3c88fd0d8b19112e33049564e25ac5fc39
+Subproject commit ced7fc318feb76e2fc6d549669c5f5d8d905add5
diff --git a/plugins/singleusergroup b/plugins/singleusergroup
index d04c4c3..9eb6334 160000
--- a/plugins/singleusergroup
+++ b/plugins/singleusergroup
@@ -1 +1 @@
-Subproject commit d04c4c33ad36e2e11ccc8b798357dd1e4e979a1a
+Subproject commit 9eb63345a129533aa88235af3ba9308c53cee1d2
diff --git a/polygerrit-ui/.gitignore b/polygerrit-ui/.gitignore
index 7f06bef..7b33a59 100644
--- a/polygerrit-ui/.gitignore
+++ b/polygerrit-ui/.gitignore
@@ -4,4 +4,4 @@
fonts
bower_components
.tmp
-.vscode
\ No newline at end of file
+.vscode
diff --git a/polygerrit-ui/README.md b/polygerrit-ui/README.md
index 545c238..ce274f2 100644
--- a/polygerrit-ui/README.md
+++ b/polygerrit-ui/README.md
@@ -1,5 +1,12 @@
# Gerrit Polymer Frontend
+**Warning**: DON'T ADD MORE TYPESCRIPT FILES/TYPES. Gerrit Polymer Frontend
+contains several typescript files and uses typescript compiler. This is a
+preparation for the upcoming migration to typescript and we actively working on
+it. We want to avoid massive typescript-related changes until the preparation
+work is done. Thanks for your understanding!
+
+
Follow the
[setup instructions for Gerrit backend developers](https://gerrit-review.googlesource.com/Documentation/dev-readme.html)
where applicable, the most important command is:
@@ -74,6 +81,20 @@
More information for installing and using nodejs rules can be found here https://bazelbuild.github.io/rules_nodejs/install.html
+## Setup typescript support in the IDE
+
+Modern IDE should automatically handle typescript settings from the
+`pollygerrit-ui/app/tsconfig.json` files. IDE places compiled files in the
+`.ts-out/pg` directory at the root of gerrit workspace and you can configure IDE
+to exclude the whole .ts-out directory. To do it in the IntelliJ IDEA click on
+this directory and select "Mark Directory As > Excluded" in the context menu.
+
+However, if you receive some errors from IDE, you can try to configure IDE
+manually. For example, if IntelliJ IDEA shows
+`Cannot find parent 'tsconfig.json'` error, you can try to setup typescript
+options `--project polygerrit-ui/app/tsconfig.json` in the IDE settings.
+
+
## Serving files locally
#### Go server
@@ -169,8 +190,10 @@
npm run test:debug async-foreach-behavior_test.js
```
-* You can run tests in IDE:
+* You can run tests in IDE. :
- [IntelliJ: running unit tests on Karma](https://www.jetbrains.com/help/idea/running-unit-tests-on-karma.html#ws_karma_running)
+ - You should configure IDE to compile typescript before running tests.
+
## Style guide
diff --git a/polygerrit-ui/app/.eslint-ts-resolver.js b/polygerrit-ui/app/.eslint-ts-resolver.js
new file mode 100644
index 0000000..dc578f9
--- /dev/null
+++ b/polygerrit-ui/app/.eslint-ts-resolver.js
@@ -0,0 +1,45 @@
+/**
+ * @license
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * This is a very simple resolver for the 'js imports ts' case. It is used only
+ * by eslint and must be removed after switching to typescript is finished.
+ * The resolver searches for .ts files instead of .js
+ */
+
+const path = require('path');
+const fs = require('fs');
+
+function isRelativeImport(source) {
+ return source.startsWith('./') || source.startsWith('../');
+}
+
+module.exports = {
+ interfaceVersion: 2,
+ resolve: function(source, file, config) {
+ if (!isRelativeImport(source) || !source.endsWith('.js')) {
+ return {found: false};
+ }
+ const tsSource = source.slice(0, -3) + '.ts';
+
+ const fullPath = path.resolve(path.dirname(file), tsSource);
+ if (!fs.existsSync(fullPath)) {
+ return {found: false};
+ }
+ return {found: true, path: fullPath};
+ }
+};
diff --git a/polygerrit-ui/app/.eslintignore b/polygerrit-ui/app/.eslintignore
index 6d9c8f3..16ea228 100644
--- a/polygerrit-ui/app/.eslintignore
+++ b/polygerrit-ui/app/.eslintignore
@@ -1,2 +1,3 @@
**/node_modules
**/rollup.config.js
+node_modules_licenses
diff --git a/polygerrit-ui/app/.eslintrc.js b/polygerrit-ui/app/.eslintrc.js
index 8aa6e5f..cc9f304 100644
--- a/polygerrit-ui/app/.eslintrc.js
+++ b/polygerrit-ui/app/.eslintrc.js
@@ -17,6 +17,7 @@
// Do not add any bazel-specific properties in this file to keep it clean.
// Please add such properties to the .eslintrc-bazel.js file
+const path = require('path');
module.exports = {
"extends": ["eslint:recommended", "google"],
@@ -149,7 +150,6 @@
}
}],
"import/named": 2,
- "import/no-unresolved": 2,
"import/no-self-import": 2,
// The no-cycle rule is slow, because it doesn't cache dependencies.
// Disable it.
@@ -157,6 +157,9 @@
"import/no-useless-path-segments": 2,
"import/no-unused-modules": 2,
"import/no-default-export": 2,
+ // Custom rule from the //tools/js/eslint-rules directory.
+ // See //tools/js/eslint-rules/README.md for details
+ "goog-module-id": 2,
},
// List of allowed globals in all files
@@ -174,6 +177,38 @@
},
"overrides": [
{
+ // .js-only rules
+ "files": ["**/*.js"],
+ "rules": {
+ // The rule is required for .js files only, because typescript compiler
+ // always checks import.
+ "import/no-unresolved": 2,
+ },
+ "globals": {
+ "goog": "readonly",
+ }
+ },
+ {
+ "files": ["**/*.ts"],
+ "extends": [require.resolve("gts/.eslintrc.json")],
+ "rules": {
+ // The following rules is required to match internal google rules
+ "@typescript-eslint/restrict-plus-operands": "error"
+ },
+ "parserOptions": {
+ "project": path.resolve(__dirname, "./tsconfig.json"),
+ }
+ },
+ {
+ "files": ["**/*.ts"],
+ "excludedFiles": "*.d.ts",
+ "rules": {
+ // Custom rule from the //tools/js/eslint-rules directory.
+ // See //tools/js/eslint-rules/README.md for details
+ "ts-imports-js": 2,
+ }
+ },
+ {
"files": ["*.html", "test.js", "test-infra.js", "template_test.js"],
"rules": {
"jsdoc/require-file-overview": "off"
@@ -263,6 +298,10 @@
"prettier"
],
"settings": {
- "html/report-bad-indent": "error"
+ "html/report-bad-indent": "error",
+ "import/resolver": {
+ "node": {},
+ [path.resolve(__dirname, './.eslint-ts-resolver.js')]: {},
+ },
},
};
diff --git a/polygerrit-ui/app/externs/plugin.js b/polygerrit-ui/app/.prettierrc.js
similarity index 67%
copy from polygerrit-ui/app/externs/plugin.js
copy to polygerrit-ui/app/.prettierrc.js
index c88c724..fbb87c6 100644
--- a/polygerrit-ui/app/externs/plugin.js
+++ b/polygerrit-ui/app/.prettierrc.js
@@ -1,6 +1,6 @@
/**
* @license
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,16 +15,13 @@
* limitations under the License.
*/
-/**
- * @fileoverview Closure compiler externs for the Gerrit UI plugins.
- * @externs
- */
-
-/* eslint-disable no-var */
-
-var Gerrit = {};
-
-/**
- * @param {!Function} callback
- */
-Gerrit.install = function(callback) {};
+module.exports = {
+ "overrides": [
+ {
+ "files": ["**/*.ts"],
+ "options": {
+ ...require('gts/.prettierrc.json')
+ }
+ }
+ ]
+};
diff --git a/polygerrit-ui/app/BUILD b/polygerrit-ui/app/BUILD
index 88e0834..fb2bd73 100644
--- a/polygerrit-ui/app/BUILD
+++ b/polygerrit-ui/app/BUILD
@@ -1,24 +1,82 @@
-load(":rules.bzl", "polygerrit_bundle")
+load(":rules.bzl", "compile_ts", "polygerrit_bundle")
load("//tools/js:eslint.bzl", "eslint")
package(default_visibility = ["//visibility:public"])
-polygerrit_bundle(
- name = "polygerrit_ui",
+# This list must be in sync with the "include" list in the tsconfig.json file
+src_dirs = [
+ "behaviors",
+ "constants",
+ "elements",
+ "embed",
+ "gr-diff",
+ "samples",
+ "scripts",
+ "services",
+ "styles",
+ "types",
+ "utils",
+]
+
+compiled_pg_srcs = compile_ts(
+ name = "compile_pg",
+ srcs = glob(
+ [src_dir + "/**/*" + ext for src_dir in src_dirs for ext in [
+ ".js",
+ ".ts",
+ ]],
+ exclude = [
+ "**/*_test.js",
+ ],
+ ),
+ # The same outdir also appears in the following files:
+ # polylint_test.sh
+ ts_outdir = "_pg_ts_out",
+)
+
+compiled_pg_srcs_with_tests = compile_ts(
+ name = "compile_pg_with_tests",
srcs = glob(
[
"**/*.js",
+ "**/*.ts",
],
exclude = [
"node_modules/**",
"node_modules_licenses/**",
- "test/**",
- "**/*_test.html",
- "**/*_test.js",
+ "template_test_srcs/**",
+ "rollup.config.js",
],
),
+ # The same outdir also appears in the following files:
+ # wct_test.sh
+ # karma.conf.js
+ ts_outdir = "_pg_with_tests_out",
+)
+
+polygerrit_bundle(
+ name = "polygerrit_ui",
+ srcs = compiled_pg_srcs,
outs = ["polygerrit_ui.zip"],
- entry_point = "elements/gr-app.js",
+ entry_point = "_pg_ts_out/elements/gr-app.js",
+)
+
+filegroup(
+ name = "eslint_src_code",
+ srcs = glob(
+ [
+ "**/*.html",
+ "**/*.js",
+ "**/*.ts",
+ ],
+ exclude = [
+ "node_modules/**",
+ "node_modules_licenses/**",
+ ],
+ ) + [
+ "@ui_dev_npm//:node_modules",
+ "@ui_npm//:node_modules",
+ ],
)
filegroup(
@@ -26,38 +84,19 @@
srcs = glob(
[
"**/*.html",
- "**/*.js",
],
exclude = [
"node_modules/**",
"node_modules_licenses/**",
],
- ),
-)
-
-filegroup(
- name = "pg_code_without_test",
- srcs = glob(
- [
- "**/*.html",
- "**/*.js",
- ],
- exclude = [
- "node_modules/**",
- "node_modules_licenses/**",
- "test/**",
- "samples/**",
- "**/*_test.js",
- ],
- ),
+ ) + compiled_pg_srcs_with_tests,
)
# Workaround for https://github.com/bazelbuild/bazel/issues/1305
filegroup(
name = "test-srcs-fg",
srcs = [
- "test/common-test-setup.js",
- "test/common-test-setup-karma.js",
+ "rollup.config.js",
":pg_code",
"@ui_dev_npm//:node_modules",
"@ui_npm//:node_modules",
@@ -68,13 +107,19 @@
# The eslint macro creates 2 rules: lint_test and lint_bin
eslint(
name = "lint",
- srcs = [":test-srcs-fg"],
+ srcs = [":eslint_src_code"],
config = ".eslintrc-bazel.js",
- # The .eslintrc-bazel.js extends the .eslintrc.js config, pass it as a dependency
- data = [".eslintrc.js"],
+ data = [
+ # The .eslintrc-bazel.js extends the .eslintrc.js config, pass it as a dependency
+ ".eslintrc.js",
+ ".prettierrc.js",
+ ".eslint-ts-resolver.js",
+ "tsconfig.json",
+ ],
extensions = [
".html",
".js",
+ ".ts",
],
ignore = ".eslintignore",
plugins = [
@@ -83,16 +128,18 @@
"@npm//eslint-plugin-import",
"@npm//eslint-plugin-jsdoc",
"@npm//eslint-plugin-prettier",
+ "@npm//gts",
],
)
-# Workaround for https://github.com/bazelbuild/bazel/issues/1305
filegroup(
name = "polylint-fg",
srcs = [
- ":pg_code_without_test",
+ # Workaround for https://github.com/bazelbuild/bazel/issues/1305
"@ui_npm//:node_modules",
- ],
+ ] +
+ # Polylinter can't check .ts files, run it on compiled srcs
+ compiled_pg_srcs,
)
sh_test(
diff --git a/polygerrit-ui/app/behaviors/base-url-behavior/base-url-behavior.js b/polygerrit-ui/app/behaviors/base-url-behavior/base-url-behavior.ts
similarity index 79%
rename from polygerrit-ui/app/behaviors/base-url-behavior/base-url-behavior.js
rename to polygerrit-ui/app/behaviors/base-url-behavior/base-url-behavior.ts
index 4deb089..6b726a6 100644
--- a/polygerrit-ui/app/behaviors/base-url-behavior/base-url-behavior.js
+++ b/polygerrit-ui/app/behaviors/base-url-behavior/base-url-behavior.ts
@@ -15,6 +15,13 @@
* limitations under the License.
*/
+// This is a temporary interface. Must be removed when base-url-behavior
+// is converted to a mixin or an util class. See:
+// https://polymer-library.polymer-project.org/3.0/docs/devguide/custom-elements#mixins
+export interface BaseUrlBehaviorInterface {
+ getBaseUrl(): string;
+}
+
/** @polymerBehavior BaseUrlBehavior */
export const BaseUrlBehavior = {
/** @return {string} */
@@ -29,4 +36,3 @@
// temporary assign global variables.
window.Gerrit = window.Gerrit || {};
window.Gerrit.BaseUrlBehavior = BaseUrlBehavior;
-
diff --git a/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.js b/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.js
deleted file mode 100644
index add1df4..0000000
--- a/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * @license
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import {BaseUrlBehavior} from '../base-url-behavior/base-url-behavior.js';
-
-const PROBE_PATH = '/Documentation/index.html';
-const DOCS_BASE_PATH = '/Documentation';
-
-let cachedPromise;
-
-/** @polymerBehavior DocsUrlBehavior */
-export const DocsUrlBehavior = [{
-
- /**
- * Get the docs base URL from either the server config or by probing.
- *
- * @param {Object} config The server config.
- * @param {!Object} restApi A REST API instance
- * @return {!Promise<string>} A promise that resolves with the docs base
- * URL.
- */
- getDocsBaseUrl(config, restApi) {
- if (!cachedPromise) {
- cachedPromise = new Promise(resolve => {
- if (config && config.gerrit && config.gerrit.doc_url) {
- resolve(config.gerrit.doc_url);
- } else {
- restApi.probePath(this.getBaseUrl() + PROBE_PATH).then(ok => {
- resolve(ok ? (this.getBaseUrl() + DOCS_BASE_PATH) : null);
- });
- }
- });
- }
- return cachedPromise;
- },
-
- /** For testing only. */
- _clearDocsBaseUrlCache() {
- cachedPromise = undefined;
- },
-},
-BaseUrlBehavior,
-];
-
-// TODO(dmfilippov) Remove the following lines with assignments
-// Plugins can use the behavior because it was accessible with
-// the global Gerrit... variable. To avoid breaking changes in plugins
-// temporary assign global variables.
-window.Gerrit = window.Gerrit || {};
-window.Gerrit.DocsUrlBehavior = DocsUrlBehavior;
diff --git a/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.ts b/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.ts
new file mode 100644
index 0000000..4bc2f12
--- /dev/null
+++ b/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.ts
@@ -0,0 +1,88 @@
+/**
+ * @license
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import {
+ BaseUrlBehavior,
+ BaseUrlBehaviorInterface,
+} from '../base-url-behavior/base-url-behavior';
+
+const PROBE_PATH = '/Documentation/index.html';
+const DOCS_BASE_PATH = '/Documentation';
+
+let cachedPromise: Promise<string | null> | undefined;
+
+// NOTE: Below we define 2 types (DocUrlBehaviorConfig and RestApi) to avoid
+// type 'any'. These are temporary definitions and they must be
+// updated/moved/removed when we start converting our codebase to typescript.
+// Right now we are using these types here just for adding typescript support to
+// our build/test infrastructure. Doing so we avoid massive code updates at this
+// stage.
+
+// TODO: introduce global gerrit config type instead of DocUrlBehaviorConfig.
+// The DocUrlBehaviorConfig is a temporary type
+interface DocUrlBehaviorConfig {
+ gerrit?: {doc_url?: string};
+}
+
+// TODO: implement RestApi type correctly and remove interface from this file
+interface RestApi {
+ probePath(url: string): Promise<boolean>;
+}
+
+/** @polymerBehavior DocsUrlBehavior */
+export const DocsUrlBehavior = [
+ {
+ /**
+ * Get the docs base URL from either the server config or by probing.
+ *
+ * @param {Object} config The server config.
+ * @param {!Object} restApi A REST API instance
+ * @return {!Promise<string>} A promise that resolves with the docs base
+ * URL.
+ */
+ getDocsBaseUrl(
+ this: BaseUrlBehaviorInterface,
+ config: DocUrlBehaviorConfig,
+ restApi: RestApi
+ ) {
+ if (!cachedPromise) {
+ cachedPromise = new Promise(resolve => {
+ if (config && config.gerrit && config.gerrit.doc_url) {
+ resolve(config.gerrit.doc_url);
+ } else {
+ restApi.probePath(this.getBaseUrl() + PROBE_PATH).then(ok => {
+ resolve(ok ? this.getBaseUrl() + DOCS_BASE_PATH : null);
+ });
+ }
+ });
+ }
+ return cachedPromise;
+ },
+
+ /** For testing only. */
+ _clearDocsBaseUrlCache() {
+ cachedPromise = undefined;
+ },
+ },
+ BaseUrlBehavior,
+];
+
+// TODO(dmfilippov) Remove the following lines with assignments
+// Plugins can use the behavior because it was accessible with
+// the global Gerrit... variable. To avoid breaking changes in plugins
+// temporary assign global variables.
+window.Gerrit = window.Gerrit || {};
+window.Gerrit.DocsUrlBehavior = DocsUrlBehavior;
diff --git a/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior_test.js b/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior_test.js
index 30231ce..34cdf86 100644
--- a/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior_test.js
+++ b/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior_test.js
@@ -276,7 +276,7 @@
});
});
- test('doesn’t block kb shortcuts for non-whitelisted els', done => {
+ test('doesn’t block kb shortcuts for non-allowed els', done => {
const divEl = document.createElement('div');
element.appendChild(divEl);
element._handleKey = e => {
diff --git a/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.js b/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.js
deleted file mode 100644
index 05bf169..0000000
--- a/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.js
+++ /dev/null
@@ -1,195 +0,0 @@
-/**
- * @license
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import {BaseUrlBehavior} from '../base-url-behavior/base-url-behavior.js';
-import {ChangeStatus} from '../../constants/constants.js';
-
-/** @polymerBehavior Gerrit.RESTClientBehavior */
-export const RESTClientBehavior = [{
- ChangeDiffType: {
- ADDED: 'ADDED',
- COPIED: 'COPIED',
- DELETED: 'DELETED',
- MODIFIED: 'MODIFIED',
- RENAMED: 'RENAMED',
- REWRITE: 'REWRITE',
- },
-
- // Must be kept in sync with the ListChangesOption enum and protobuf.
- ListChangesOption: {
- LABELS: 0,
- DETAILED_LABELS: 8,
-
- // Return information on the current patch set of the change.
- CURRENT_REVISION: 1,
- ALL_REVISIONS: 2,
-
- // If revisions are included, parse the commit object.
- CURRENT_COMMIT: 3,
- ALL_COMMITS: 4,
-
- // If a patch set is included, include the files of the patch set.
- CURRENT_FILES: 5,
- ALL_FILES: 6,
-
- // If accounts are included, include detailed account info.
- DETAILED_ACCOUNTS: 7,
-
- // Include messages associated with the change.
- MESSAGES: 9,
-
- // Include allowed actions client could perform.
- CURRENT_ACTIONS: 10,
-
- // Set the reviewed boolean for the caller.
- REVIEWED: 11,
-
- // Include download commands for the caller.
- DOWNLOAD_COMMANDS: 13,
-
- // Include patch set weblinks.
- WEB_LINKS: 14,
-
- // Include consistency check results.
- CHECK: 15,
-
- // Include allowed change actions client could perform.
- CHANGE_ACTIONS: 16,
-
- // Include a copy of commit messages including review footers.
- COMMIT_FOOTERS: 17,
-
- // Include push certificate information along with any patch sets.
- PUSH_CERTIFICATES: 18,
-
- // Include change's reviewer updates.
- REVIEWER_UPDATES: 19,
-
- // Set the submittable boolean.
- SUBMITTABLE: 20,
-
- // If tracking ids are included, include detailed tracking ids info.
- TRACKING_IDS: 21,
-
- // Skip mergeability data.
- SKIP_MERGEABLE: 22,
-
- /**
- * Skip diffstat computation that compute the insertions field (number of lines inserted) and
- * deletions field (number of lines deleted)
- */
- SKIP_DIFFSTAT: 23,
- },
-
- listChangesOptionsToHex(...args) {
- let v = 0;
- for (let i = 0; i < args.length; i++) {
- v |= 1 << args[i];
- }
- return v.toString(16);
- },
-
- /**
- * @return {string}
- */
- changeBaseURL(project, changeNum, patchNum) {
- let v = this.getBaseUrl() + '/changes/' +
- encodeURIComponent(project) + '~' + changeNum;
- if (patchNum) {
- v += '/revisions/' + patchNum;
- }
- return v;
- },
-
- changePath(changeNum) {
- return this.getBaseUrl() + '/c/' + changeNum;
- },
-
- changeIsOpen(change) {
- return change && change.status === ChangeStatus.NEW;
- },
-
- /**
- * @param {!Object} change
- * @param {!Object=} opt_options
- *
- * @return {!Array}
- */
- changeStatuses(change, opt_options) {
- const states = [];
- if (change.status === ChangeStatus.MERGED) {
- states.push('Merged');
- } else if (change.status === ChangeStatus.ABANDONED) {
- states.push('Abandoned');
- } else if (change.mergeable === false ||
- (opt_options && opt_options.mergeable === false)) {
- // 'mergeable' prop may not always exist (@see Issue 6819)
- states.push('Merge Conflict');
- }
- if (change.work_in_progress) { states.push('WIP'); }
- if (change.is_private) { states.push('Private'); }
-
- // If there are any pre-defined statuses, only return those. Otherwise,
- // will determine the derived status.
- if (states.length || !opt_options) { return states; }
-
- // If no missing requirements, either active or ready to submit.
- if (change.submittable && opt_options.submitEnabled) {
- states.push('Ready to submit');
- } else {
- // Otherwise it is active.
- states.push('Active');
- }
- return states;
- },
-
- /**
- * @param {!Object} change
- * @return {string}
- */
- changeStatusString(change) {
- return this.changeStatuses(change).join(', ');
- },
-},
-BaseUrlBehavior,
-];
-
-// eslint-disable-next-line no-unused-vars
-function defineEmptyMixin() {
- // This is a temporary function.
- // Polymer linter doesn't process correctly the following code:
- // class MyElement extends Polymer.mixinBehaviors([legacyBehaviors], ...) {...}
- // To workaround this issue, the mock mixin is declared in this method.
- // In the following changes, legacy behaviors will be converted to mixins.
-
- /**
- * @polymer
- * @mixinFunction
- */
- const RESTClientMixin = base => // eslint-disable-line no-unused-vars
- class extends base {
- changeStatusString(change) {}
-
- changeStatuses(change, opt_options) {}
- };
-}
-
-// TODO(dmfilippov) Remove the following lines with assignments
-// Plugins can use the behavior because it was accessible with
-// the global Gerrit... variable. To avoid breaking changes in plugins
-// temporary assign global variables.
-window.Gerrit = window.Gerrit || {};
-window.Gerrit.RESTClientBehavior = RESTClientBehavior;
diff --git a/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.ts b/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.ts
new file mode 100644
index 0000000..3b30665
--- /dev/null
+++ b/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.ts
@@ -0,0 +1,254 @@
+/**
+ * @license
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import {
+ BaseUrlBehavior,
+ BaseUrlBehaviorInterface,
+} from '../base-url-behavior/base-url-behavior';
+import {ChangeStatus} from '../../constants/constants';
+
+// WARNING: The types below can be completely wrong!
+// The types was added to avoid eslinter and typescript errors.
+// Correct typing requires more analysis and (probably) code changes.
+// This will be done later.
+type ChangeNum = string; // This can be wrong! See WARNING above
+type PatchNum = string; // This can be wrong! See WARNING above
+
+// This can be wrong! See WARNING above
+interface Change {
+ status: string; // This can be wrong! See WARNING above
+ mergeable: boolean; // This can be wrong! See WARNING above
+ work_in_progress: boolean; // This can be wrong! See WARNING above
+ is_private: boolean; // This can be wrong! See WARNING above
+ submittable: boolean; // This can be wrong! See WARNING above
+}
+
+// This can be wrong! See WARNING above
+interface ChangeStatusesOptions {
+ mergeable: boolean; // This can be wrong! See WARNING above
+ submitEnabled: boolean; // This can be wrong! See WARNING above
+}
+
+/** @polymerBehavior Gerrit.RESTClientBehavior */
+export const RESTClientBehavior = [
+ {
+ ChangeDiffType: {
+ ADDED: 'ADDED',
+ COPIED: 'COPIED',
+ DELETED: 'DELETED',
+ MODIFIED: 'MODIFIED',
+ RENAMED: 'RENAMED',
+ REWRITE: 'REWRITE',
+ },
+
+ // Must be kept in sync with the ListChangesOption enum and protobuf.
+ ListChangesOption: {
+ LABELS: 0,
+ DETAILED_LABELS: 8,
+
+ // Return information on the current patch set of the change.
+ CURRENT_REVISION: 1,
+ ALL_REVISIONS: 2,
+
+ // If revisions are included, parse the commit object.
+ CURRENT_COMMIT: 3,
+ ALL_COMMITS: 4,
+
+ // If a patch set is included, include the files of the patch set.
+ CURRENT_FILES: 5,
+ ALL_FILES: 6,
+
+ // If accounts are included, include detailed account info.
+ DETAILED_ACCOUNTS: 7,
+
+ // Include messages associated with the change.
+ MESSAGES: 9,
+
+ // Include allowed actions client could perform.
+ CURRENT_ACTIONS: 10,
+
+ // Set the reviewed boolean for the caller.
+ REVIEWED: 11,
+
+ // Include download commands for the caller.
+ DOWNLOAD_COMMANDS: 13,
+
+ // Include patch set weblinks.
+ WEB_LINKS: 14,
+
+ // Include consistency check results.
+ CHECK: 15,
+
+ // Include allowed change actions client could perform.
+ CHANGE_ACTIONS: 16,
+
+ // Include a copy of commit messages including review footers.
+ COMMIT_FOOTERS: 17,
+
+ // Include push certificate information along with any patch sets.
+ PUSH_CERTIFICATES: 18,
+
+ // Include change's reviewer updates.
+ REVIEWER_UPDATES: 19,
+
+ // Set the submittable boolean.
+ SUBMITTABLE: 20,
+
+ // If tracking ids are included, include detailed tracking ids info.
+ TRACKING_IDS: 21,
+
+ // Skip mergeability data.
+ SKIP_MERGEABLE: 22,
+
+ /**
+ * Skip diffstat computation that compute the insertions field (number of lines inserted) and
+ * deletions field (number of lines deleted)
+ */
+ SKIP_DIFFSTAT: 23,
+ },
+
+ listChangesOptionsToHex(...args: number[]) {
+ let v = 0;
+ for (let i = 0; i < args.length; i++) {
+ v |= 1 << args[i];
+ }
+ return v.toString(16);
+ },
+
+ /**
+ * @return {string}
+ */
+ changeBaseURL(
+ this: BaseUrlBehaviorInterface,
+ project: string,
+ changeNum: ChangeNum,
+ patchNum: PatchNum
+ ) {
+ let v =
+ this.getBaseUrl() +
+ '/changes/' +
+ encodeURIComponent(project) +
+ '~' +
+ changeNum;
+ if (patchNum) {
+ v += '/revisions/' + patchNum;
+ }
+ return v;
+ },
+
+ changePath(this: BaseUrlBehaviorInterface, changeNum: ChangeNum) {
+ return this.getBaseUrl() + '/c/' + changeNum;
+ },
+
+ changeIsOpen(change?: Change) {
+ return change && change.status === ChangeStatus.NEW;
+ },
+
+ /**
+ * @param {!Object} change
+ * @param {!Object=} opt_options
+ *
+ * @return {!Array}
+ */
+ changeStatuses(change: Change, opt_options?: ChangeStatusesOptions) {
+ const states = [];
+ if (change.status === ChangeStatus.MERGED) {
+ states.push('Merged');
+ } else if (change.status === ChangeStatus.ABANDONED) {
+ states.push('Abandoned');
+ } else if (
+ change.mergeable === false ||
+ (opt_options && opt_options.mergeable === false)
+ ) {
+ // 'mergeable' prop may not always exist (@see Issue 6819)
+ states.push('Merge Conflict');
+ }
+ if (change.work_in_progress) {
+ states.push('WIP');
+ }
+ if (change.is_private) {
+ states.push('Private');
+ }
+
+ // If there are any pre-defined statuses, only return those. Otherwise,
+ // will determine the derived status.
+ if (states.length || !opt_options) {
+ return states;
+ }
+
+ // If no missing requirements, either active or ready to submit.
+ if (change.submittable && opt_options.submitEnabled) {
+ states.push('Ready to submit');
+ } else {
+ // Otherwise it is active.
+ states.push('Active');
+ }
+ return states;
+ },
+
+ /**
+ * @param {!Object} change
+ * @return {string}
+ */
+ changeStatusString(change: Change) {
+ return this.changeStatuses(change).join(', ');
+ },
+ },
+ BaseUrlBehavior,
+];
+
+// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
+// @ts-ignore
+function defineEmptyMixin() {
+ // This is a temporary function.
+ // Polymer linter doesn't process correctly the following code:
+ // class MyElement extends Polymer.mixinBehaviors([legacyBehaviors], ...) {...}
+ // To workaround this issue, the mock mixin is declared in this method.
+ // In the following changes, legacy behaviors will be converted to mixins.
+
+ /**
+ * @polymer
+ * @mixinFunction
+ */
+ const RESTClientMixin = (
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
+ // @ts-ignore
+ base
+ ) =>
+ class extends base {
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
+ // @ts-ignore
+ changeStatusString(change) {}
+
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
+ // @ts-ignore
+ changeStatuses(change, opt_options) {}
+ };
+ // We can't apply @ts-ignore directly to RESTClientMixin - it breaks polylint
+ // tests (polylinter expects that @polymer and @mixinFunction appear right
+ // before the mixin definition). To workaround it and suppress error about
+ // unused variable use a temporary variable.
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
+ // @ts-ignore
+ const tmp = RESTClientMixin;
+}
+
+// TODO(dmfilippov) Remove the following lines with assignments
+// Plugins can use the behavior because it was accessible with
+// the global Gerrit... variable. To avoid breaking changes in plugins
+// temporary assign global variables.
+window.Gerrit = window.Gerrit || {};
+window.Gerrit.RESTClientBehavior = RESTClientBehavior;
diff --git a/polygerrit-ui/app/externs/plugin.js b/polygerrit-ui/app/constants/constants.d.ts
similarity index 67%
rename from polygerrit-ui/app/externs/plugin.js
rename to polygerrit-ui/app/constants/constants.d.ts
index c88c724..036d6ea 100644
--- a/polygerrit-ui/app/externs/plugin.js
+++ b/polygerrit-ui/app/constants/constants.d.ts
@@ -1,6 +1,6 @@
/**
* @license
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,16 +15,9 @@
* limitations under the License.
*/
-/**
- * @fileoverview Closure compiler externs for the Gerrit UI plugins.
- * @externs
- */
-
-/* eslint-disable no-var */
-
-var Gerrit = {};
-
-/**
- * @param {!Function} callback
- */
-Gerrit.install = function(callback) {};
+export type ChangeStatus = any;
+export namespace ChangeStatus {
+ export const ABANDONED: string;
+ export const MERGED: string;
+ export const NEW: string;
+}
diff --git a/polygerrit-ui/app/constants/constants.js b/polygerrit-ui/app/constants/constants.js
index ff34442..3a4cb5e 100644
--- a/polygerrit-ui/app/constants/constants.js
+++ b/polygerrit-ui/app/constants/constants.js
@@ -15,6 +15,8 @@
* limitations under the License.
*/
+goog.declareModuleId('polygerrit.constants.constants');
+
/**
* @enum
* @desc Tab names for primary tabs on change view page.
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js
index d8101c8..95a1554 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js
@@ -228,7 +228,9 @@
*/
_computeReviewers(change) {
if (!change || !change.reviewers || !change.reviewers.REVIEWER) return [];
- const reviewers = [...change.reviewers.REVIEWER];
+ const reviewers = [...change.reviewers.REVIEWER].filter(r =>
+ !change.owner || change.owner._account_id !== r._account_id
+ );
reviewers.sort((r1, r2) => {
if (this.account) {
if (r1._account_id === this.account._account_id) return -1;
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.js b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.js
index 4b9424b..7a66100 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.js
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.js
@@ -158,6 +158,9 @@
userId, reviewerIds, reviewerNames, attSetIds, expected) {
element.account = userId ? {_account_id: userId} : null;
element.change = {
+ owner: {
+ _account_id: 99,
+ },
reviewers: {
REVIEWER: [],
},
@@ -179,6 +182,8 @@
test('compute reviewers', () => {
checkComputeReviewers(null, [], [], [], []);
checkComputeReviewers(1, [], [], [], []);
+ checkComputeReviewers(1, [2], ['a'], [], [2]);
+ checkComputeReviewers(1, [99], ['owner'], [], []);
checkComputeReviewers(
1, [2, 3, 4, 5], ['b', 'a', 'd', 'c'], [3, 4], [3, 4, 2, 5]);
checkComputeReviewers(
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
index 072708e..2cd03f5 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
@@ -40,7 +40,6 @@
import '../gr-file-list/gr-file-list.js';
import '../gr-included-in-dialog/gr-included-in-dialog.js';
import '../gr-messages-list/gr-messages-list.js';
-import '../gr-messages-list/gr-messages-list-experimental.js';
import '../gr-related-changes-list/gr-related-changes-list.js';
import '../../diff/gr-apply-fix-dialog/gr-apply-fix-dialog.js';
import '../gr-reply-dialog/gr-reply-dialog.js';
@@ -66,7 +65,6 @@
import {PrimaryTab, SecondaryTab} from '../../../constants/constants.js';
import {NO_ROBOT_COMMENTS_THREADS_MSG} from '../../../constants/messages.js';
import {appContext} from '../../../services/app-context.js';
-import {ExperimentIds} from '../../../services/flags.js';
import {ChangeStatus} from '../../../constants/constants.js';
const CHANGE_ID_ERROR = {
@@ -453,7 +451,6 @@
constructor() {
super();
- this.flagsService = appContext.flagsService;
this.reporting = appContext.reportingService;
}
@@ -544,14 +541,8 @@
}
}
- _isChangeLogExperimentEnabled() {
- return this.flagsService.isEnabled(ExperimentIds.CLEANER_CHANGELOG);
- }
-
get messagesList() {
- const tagName = this._isChangeLogExperimentEnabled()
- ? 'gr-messages-list-experimental' : 'gr-messages-list';
- return this.shadowRoot.querySelector(tagName);
+ return this.shadowRoot.querySelector('gr-messages-list');
}
get threadList() {
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_html.js b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_html.js
index c9fdb78..5b89c15 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_html.js
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_html.js
@@ -213,8 +213,7 @@
--paper-tab-ink: var(--link-color);
}
gr-thread-list,
- gr-messages-list,
- gr-messages-list-experimental {
+ gr-messages-list {
display: block;
}
gr-thread-list {
@@ -701,35 +700,19 @@
is="dom-if"
if="[[_isTabActive(_constants.SecondaryTab.CHANGE_LOG, _activeTabs)]]"
>
- <template is="dom-if" if="[[!_isChangeLogExperimentEnabled()]]">
- <gr-messages-list
- class="hideOnMobileOverlay"
- change-num="[[_changeNum]]"
- labels="[[_change.labels]]"
- messages="[[_change.messages]]"
- reviewer-updates="[[_change.reviewer_updates]]"
- change-comments="[[_changeComments]]"
- project-name="[[_change.project]]"
- show-reply-buttons="[[_loggedIn]]"
- on-message-anchor-tap="_handleMessageAnchorTap"
- on-reply="_handleMessageReply"
- ></gr-messages-list>
- </template>
- <template is="dom-if" if="[[_isChangeLogExperimentEnabled()]]">
- <gr-messages-list-experimental
- class="hideOnMobileOverlay"
- change="[[_change]]"
- change-num="[[_changeNum]]"
- labels="[[_change.labels]]"
- messages="[[_change.messages]]"
- reviewer-updates="[[_change.reviewer_updates]]"
- change-comments="[[_changeComments]]"
- project-name="[[_change.project]]"
- show-reply-buttons="[[_loggedIn]]"
- on-message-anchor-tap="_handleMessageAnchorTap"
- on-reply="_handleMessageReply"
- ></gr-messages-list-experimental>
- </template>
+ <gr-messages-list
+ class="hideOnMobileOverlay"
+ change="[[_change]]"
+ change-num="[[_changeNum]]"
+ labels="[[_change.labels]]"
+ messages="[[_change.messages]]"
+ reviewer-updates="[[_change.reviewer_updates]]"
+ change-comments="[[_changeComments]]"
+ project-name="[[_change.project]]"
+ show-reply-buttons="[[_loggedIn]]"
+ on-message-anchor-tap="_handleMessageAnchorTap"
+ on-reply="_handleMessageReply"
+ ></gr-messages-list>
</template>
</section>
</div>
diff --git a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js b/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js
deleted file mode 100644
index 3554dff..0000000
--- a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * @license
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/*
- The custom CSS property `--gr-formatted-text-prose-max-width` controls the max
- width of formatted text blocks that are not code.
-*/
-/*
- FIXME(polymer-modulizer): the above comments were extracted
- from HTML and may be out of place here. Review them and
- then delete this comment!
-*/
-import '../../shared/gr-formatted-text/gr-formatted-text.js';
-import '../../../styles/shared-styles.js';
-import {mixinBehaviors} from '@polymer/polymer/lib/legacy/class.js';
-import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
-import {LegacyElementMixin} from '@polymer/polymer/lib/legacy/legacy-element-mixin.js';
-import {PolymerElement} from '@polymer/polymer/polymer-element.js';
-import {htmlTemplate} from './gr-comment-list_html.js';
-import {BaseUrlBehavior} from '../../../behaviors/base-url-behavior/base-url-behavior.js';
-import {PathListBehavior} from '../../../behaviors/gr-path-list-behavior/gr-path-list-behavior.js';
-import {URLEncodingBehavior} from '../../../behaviors/gr-url-encoding-behavior/gr-url-encoding-behavior.js';
-import {GerritNav} from '../../core/gr-navigation/gr-navigation.js';
-
-/**
- * @extends PolymerElement
- */
-class GrCommentList extends mixinBehaviors( [
- BaseUrlBehavior,
- PathListBehavior,
- URLEncodingBehavior,
-], GestureEventListeners(
- LegacyElementMixin(
- PolymerElement))) {
- static get template() { return htmlTemplate; }
-
- static get is() { return 'gr-comment-list'; }
-
- static get properties() {
- return {
- changeNum: Number,
- comments: Object,
- patchNum: Number,
- projectName: String,
- /** @type {?} */
- projectConfig: Object,
- };
- }
-
- _computeFilesFromComments(comments) {
- const arr = Object.keys(comments || {});
- return arr.sort(this.specialFilePathCompare);
- }
-
- _isOnParent(comment) {
- return comment.side === 'PARENT';
- }
-
- _computeDiffURL(filePath, changeNum, allComments) {
- if ([filePath, changeNum, allComments].includes(undefined)) {
- return;
- }
- const fileComments = this._computeCommentsForFile(allComments, filePath);
- // This can happen for files that don't exist anymore in the current ps.
- if (fileComments.length === 0) return;
- return GerritNav.getUrlForDiffById(changeNum, this.projectName,
- filePath, fileComments[0].patch_set);
- }
-
- _computeDiffLineURL(filePath, changeNum, patchNum, comment) {
- const basePatchNum = comment.hasOwnProperty('parent') ?
- -comment.parent : null;
- return GerritNav.getUrlForDiffById(changeNum, this.projectName,
- filePath, patchNum, basePatchNum, comment.line,
- this._isOnParent(comment));
- }
-
- _computeCommentsForFile(comments, filePath) {
- // Changes are not picked up by the dom-repeat due to the array instance
- // identity not changing even when it has elements added/removed from it.
- return (comments[filePath] || []).slice();
- }
-
- _computePatchDisplayName(comment) {
- if (this._isOnParent(comment)) {
- return 'Base, ';
- }
- if (comment.patch_set != this.patchNum) {
- return `PS${comment.patch_set}, `;
- }
- return '';
- }
-}
-
-customElements.define(GrCommentList.is, GrCommentList);
diff --git a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list_html.js b/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list_html.js
deleted file mode 100644
index 2811828..0000000
--- a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list_html.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * @license
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import {html} from '@polymer/polymer/lib/utils/html-tag.js';
-
-export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- word-wrap: break-word;
- }
- .file {
- padding: var(--spacing-s) 0;
- }
- .container {
- display: flex;
- padding: var(--spacing-s) 0;
- }
- .lineNum {
- margin-right: var(--spacing-s);
- min-width: 135px;
- text-align: right;
- }
- .patchset-level-comment-text {
- margin-right: var(--spacing-m);
- }
- .message {
- flex: 1;
- --gr-formatted-text-prose-max-width: 80ch;
- }
- @media screen and (max-width: 50em) {
- .container {
- flex-direction: column;
- }
- .lineNum {
- margin-right: 0;
- min-width: initial;
- text-align: left;
- }
- }
- </style>
- <template
- is="dom-repeat"
- items="[[_computeFilesFromComments(comments)]]"
- as="file"
- >
- <div class="file">
- <template is="dom-if" if="[[!shouldHideFile(file)]]">
- <a
- class="fileLink"
- href="[[_computeDiffURL(file, changeNum, comments)]]"
- >[[computeDisplayPath(file)]]
- </a>
- </template>
- </div>
- <template
- is="dom-repeat"
- items="[[_computeCommentsForFile(comments, file)]]"
- as="comment"
- >
- <div class="container">
- <template is="dom-if" if="[[shouldHideFile(file)]]">
- <span class="patchset-level-comment-text">
- Patchset Comment:
- </span>
- </template>
- <template is="dom-if" if="[[!shouldHideFile(file)]]">
- <a
- class="lineNum"
- href$="[[_computeDiffLineURL(file, changeNum, comment.patch_set, comment)]]"
- >
- <span hidden$="[[!comment.line]]">
- <span>[[_computePatchDisplayName(comment)]]</span>
- Line <span>[[comment.line]]</span>
- </span>
- <span hidden$="[[comment.line]]">
- File comment:
- </span>
- </a>
- </template>
- <gr-formatted-text
- class="message"
- no-trailing-margin=""
- content="[[comment.message]]"
- config="[[projectConfig.commentlinks]]"
- ></gr-formatted-text>
- </div>
- </template>
- </template>
-`;
diff --git a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list_test.js b/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list_test.js
deleted file mode 100644
index 704d83f..0000000
--- a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list_test.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * @license
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import '../../../test/common-test-setup-karma.js';
-import './gr-comment-list.js';
-import {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';
-import {GerritNav} from '../../core/gr-navigation/gr-navigation.js';
-
-const basicFixture = fixtureFromElement('gr-comment-list');
-
-suite('gr-comment-list tests', () => {
- let element;
-
- setup(() => {
- element = basicFixture.instantiate();
-
- sinon.stub(GerritNav, 'mapCommentlinks').callsFake( x => x);
- });
-
- test('_computeFilesFromComments w/ special file path sorting', () => {
- const comments = {
- 'file_b.html': [],
- 'file_c.css': [],
- 'file_a.js': [],
- 'test.cc': [],
- 'test.h': [],
- };
- const expected = [
- 'file_a.js',
- 'file_b.html',
- 'file_c.css',
- 'test.h',
- 'test.cc',
- ];
- const actual = element._computeFilesFromComments(comments);
- assert.deepEqual(actual, expected);
-
- assert.deepEqual(element._computeFilesFromComments(null), []);
- });
-
- test('_computePatchDisplayName', () => {
- const comment = {line: 123, side: 'REVISION', patch_set: 10};
-
- element.patchNum = 10;
- assert.equal(element._computePatchDisplayName(comment), '');
-
- element.patchNum = 9;
- assert.equal(element._computePatchDisplayName(comment), 'PS10, ');
-
- comment.side = 'PARENT';
- assert.equal(element._computePatchDisplayName(comment), 'Base, ');
- });
-
- test('config commentlinks propagate to formatted text', () => {
- element.comments = {
- 'test.h': [{
- author: {name: 'foo'},
- patch_set: 4,
- line: 10,
- updated: '2017-10-30 20:48:40.000000000',
- message: 'Ideadbeefdeadbeef',
- unresolved: true,
- }],
- };
- element.projectConfig = {
- commentlinks: {foo: {link: '#/q/$1', match: '(I[0-9a-f]{8,40})'}},
- };
- flushAsynchronousOperations();
- const formattedText = dom(element.root).querySelector(
- 'gr-formatted-text.message');
- assert.isOk(formattedText.config);
- assert.deepEqual(formattedText.config,
- element.projectConfig.commentlinks);
- });
-
- test('_computeDiffLineURL', () => {
- const getUrlStub = sinon.stub(GerritNav, 'getUrlForDiffById');
- element.projectName = 'proj';
- element.changeNum = 123;
-
- const comment = {line: 456};
- element._computeDiffLineURL('foo.cc', 123, 4, comment);
- assert.isTrue(getUrlStub.calledOnce);
- assert.deepEqual(getUrlStub.lastCall.args,
- [123, 'proj', 'foo.cc', 4, null, 456, false]);
-
- comment.side = 'PARENT';
- element._computeDiffLineURL('foo.cc', 123, 4, comment);
- assert.isTrue(getUrlStub.calledTwice);
- assert.deepEqual(getUrlStub.lastCall.args,
- [123, 'proj', 'foo.cc', 4, null, 456, true]);
-
- comment.parent = 12;
- element._computeDiffLineURL('foo.cc', 123, 4, comment);
- assert.isTrue(getUrlStub.calledThrice);
- assert.deepEqual(getUrlStub.lastCall.args,
- [123, 'proj', 'foo.cc', 4, -12, 456, true]);
- });
-});
-
diff --git a/polygerrit-ui/app/elements/change/gr-message/gr-message.js b/polygerrit-ui/app/elements/change/gr-message/gr-message.js
index 7163952..0da687f 100644
--- a/polygerrit-ui/app/elements/change/gr-message/gr-message.js
+++ b/polygerrit-ui/app/elements/change/gr-message/gr-message.js
@@ -24,9 +24,6 @@
import '../../shared/gr-rest-api-interface/gr-rest-api-interface.js';
import '../../../styles/shared-styles.js';
import '../../../styles/gr-voting-styles.js';
-import '../gr-comment-list/gr-comment-list.js';
-import {appContext} from '../../../services/app-context.js';
-import {ExperimentIds} from '../../../services/flags.js';
import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
import {LegacyElementMixin} from '@polymer/polymer/lib/legacy/legacy-element-mixin.js';
import {PolymerElement} from '@polymer/polymer/polymer-element.js';
@@ -136,8 +133,7 @@
},
_commentCountText: {
type: Number,
- computed: '_computeCommentCountText(comments,'
- + ' message.commentThreads.length, _isCleanerLogExperimentEnabled)',
+ computed: '_computeCommentCountText(message.commentThreads.length)',
},
_loggedIn: {
type: Boolean,
@@ -151,7 +147,6 @@
type: Boolean,
value: false,
},
- _isCleanerLogExperimentEnabled: Boolean,
};
}
@@ -163,7 +158,6 @@
constructor() {
super();
- this.flagsService = appContext.flagsService;
}
/** @override */
@@ -176,8 +170,6 @@
/** @override */
ready() {
super.ready();
- this._isCleanerLogExperimentEnabled = this.flagsService
- .isEnabled(ExperimentIds.CLEANER_CHANGELOG);
this.$.restAPI.getConfig().then(config => {
this.config = config;
});
@@ -197,33 +189,13 @@
}
}
- _computeCommentCountText(
- comments, threadsLength, isCleanerLogExperimentEnabled) {
- // TODO(taoalpha): clean up after cleaner-changelog experiment launched
- if (isCleanerLogExperimentEnabled) {
- if (threadsLength === 0) {
- return undefined;
- } else if (threadsLength === 1) {
- return '1 comment';
- } else {
- return `${threadsLength} comments`;
- }
+ _computeCommentCountText(threadsLength) {
+ if (threadsLength === 0) {
+ return undefined;
+ } else if (threadsLength === 1) {
+ return '1 comment';
} else {
- if (!comments) return undefined;
- let count = 0;
- for (const file in comments) {
- if (comments.hasOwnProperty(file)) {
- const commentArray = comments[file] || [];
- count += commentArray.length;
- }
- }
- if (count === 0) {
- return undefined;
- } else if (count === 1) {
- return '1 comment';
- } else {
- return `${count} comments`;
- }
+ return `${threadsLength} comments`;
}
}
diff --git a/polygerrit-ui/app/elements/change/gr-message/gr-message_html.js b/polygerrit-ui/app/elements/change/gr-message/gr-message_html.js
index de4a72a..af57782 100644
--- a/polygerrit-ui/app/elements/change/gr-message/gr-message_html.js
+++ b/polygerrit-ui/app/elements/change/gr-message/gr-message_html.js
@@ -65,7 +65,6 @@
gr-button {
margin: 0 -4px;
}
- .collapsed gr-comment-list,
.collapsed gr-thread-list,
.collapsed .replyBtn,
.collapsed .deleteBtn,
@@ -246,27 +245,16 @@
</gr-button>
</div>
</template>
- <template is="dom-if" if="[[!_isCleanerLogExperimentEnabled]]">
- <gr-comment-list
- comments="[[comments]]"
- change-num="[[changeNum]]"
- patch-num="[[message._revision_number]]"
- project-name="[[projectName]]"
- project-config="[[_projectConfig]]"
- ></gr-comment-list>
- </template>
- <template is="dom-if" if="[[_isCleanerLogExperimentEnabled]]">
- <gr-thread-list
- change="[[change]]"
- hidden$="[[!message.commentThreads.length]]"
- threads="[[message.commentThreads]]"
- change-num="[[changeNum]]"
- logged-in="[[_loggedIn]]"
- hide-toggle-buttons
- on-thread-list-modified="_onThreadListModified"
- >
- </gr-thread-list>
- </template>
+ <gr-thread-list
+ change="[[change]]"
+ hidden$="[[!message.commentThreads.length]]"
+ threads="[[message.commentThreads]]"
+ change-num="[[changeNum]]"
+ logged-in="[[_loggedIn]]"
+ hide-toggle-buttons
+ on-thread-list-modified="_onThreadListModified"
+ >
+ </gr-thread-list>
</template>
</div>
</template>
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental.js
deleted file mode 100644
index ee5f0b9..0000000
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental.js
+++ /dev/null
@@ -1,433 +0,0 @@
-/**
- * @license
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import '@polymer/paper-toggle-button/paper-toggle-button.js';
-import '../../shared/gr-button/gr-button.js';
-import '../../shared/gr-icons/gr-icons.js';
-import '../gr-message/gr-message.js';
-import '../../../styles/shared-styles.js';
-import {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';
-import {mixinBehaviors} from '@polymer/polymer/lib/legacy/class.js';
-import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
-import {LegacyElementMixin} from '@polymer/polymer/lib/legacy/legacy-element-mixin.js';
-import {PolymerElement} from '@polymer/polymer/polymer-element.js';
-import {htmlTemplate} from './gr-messages-list-experimental_html.js';
-import {KeyboardShortcutBehavior} from '../../../behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior.js';
-import {parseDate} from '../../../utils/date-util.js';
-import {MessageTag} from '../../../constants/constants.js';
-import {appContext} from '../../../services/app-context.js';
-
-/**
- * The content of the enum is also used in the UI for the button text.
- *
- * @enum {string}
- */
-const ExpandAllState = {
- EXPAND_ALL: 'Expand All',
- COLLAPSE_ALL: 'Collapse All',
-};
-
-/**
- * Computes message author's comments for this change message. The backend
- * sets comment.change_message_id for matching, so this computation is fairly
- * straightforward.
- */
-function computeThreads(message, allMessages, changeComments) {
- if ([message, allMessages, changeComments].includes(undefined)) {
- return [];
- }
- if (message._index === undefined) {
- return [];
- }
-
- return changeComments.getAllThreadsForChange().filter(
- thread => thread.comments.map(comment => {
- // collapse all by default
- comment.collapsed = true;
- return comment;
- }).some(comment => {
- const condition = comment.change_message_id === message.id;
- // Since getAllThreadsForChange() always returns a new copy of
- // all comments we can modify them here without worrying about
- // polluting other threads.
- comment.collapsed = !condition;
- return condition;
- })
- );
-}
-
-/**
- * If messages have the same tag, then that influences grouping and whether
- * a message is initally hidden or not, see isImportant(). So we are applying
- * some "magic" rules here in order to hide exactly the right messages.
- *
- * 1. If a message does not have a tag, but is associated with robot comments,
- * then it gets a tag.
- *
- * 2. Use the same tag for some of Gerrit's standard events, if they should be
- * considered one group, e.g. normal and wip patchset uploads.
- *
- * 3. Everything beyond the ~ character is cut off from the tag. That gives
- * tools control over which messages will be hidden.
- */
-function computeTag(message) {
- if (!message.tag) {
- const threads = message.commentThreads || [];
- const comments = threads.map(
- t => t.comments.find(c => c.change_message_id === message.id));
- const isRobot = comments.some(c => c && !!c.robot_id);
- return isRobot ? 'autogenerated:has-robot-comments' : undefined;
- }
-
- if (message.tag === MessageTag.TAG_NEW_WIP_PATCHSET) {
- return MessageTag.TAG_NEW_PATCHSET;
- }
- if (message.tag === MessageTag.TAG_UNSET_ASSIGNEE) {
- return MessageTag.TAG_SET_ASSIGNEE;
- }
- if (message.tag === MessageTag.TAG_UNSET_PRIVATE) {
- return MessageTag.TAG_SET_PRIVATE;
- }
- if (message.tag === MessageTag.TAG_SET_WIP) {
- return MessageTag.TAG_SET_READY;
- }
-
- return message.tag.replace(/~.*/, '');
-}
-
-/**
- * Try to set a revision number that makes sense, if none is set. Just copy
- * over the revision number of the next older message. This is mostly relevant
- * for reviewer updates. Other messages should typically have the revision
- * number already set.
- */
-function computeRevision(message, allMessages) {
- if (message._revision_number > 0) return message._revision_number;
- let revision = 0;
- for (const m of allMessages) {
- if (m.date > message.date) break;
- if (m._revision_number > revision) revision = m._revision_number;
- }
- return revision > 0 ? revision : undefined;
-}
-
-/**
- * Unimportant messages are initially hidden.
- *
- * Human messages are always important. They have an undefined tag.
- *
- * Autogenerated messages are unimportant, if there is a message with the same
- * tag and a higher revision number.
- */
-function computeIsImportant(message, allMessages) {
- if (!message.tag) return true;
-
- const hasSameTag = m => m.tag === message.tag;
- const revNumber = message._revision_number || 0;
- const hasHigherRevisionNumber = m => m._revision_number > revNumber;
- return !allMessages.filter(hasSameTag).some(hasHigherRevisionNumber);
-}
-
-export const TEST_ONLY = {
- computeThreads,
- computeTag,
- computeRevision,
- computeIsImportant,
-};
-
-/**
- * @extends PolymerElement
- */
-class GrMessagesListExperimental extends mixinBehaviors( [
- KeyboardShortcutBehavior,
-], GestureEventListeners(
- LegacyElementMixin(
- PolymerElement))) {
- static get template() { return htmlTemplate; }
-
- static get is() { return 'gr-messages-list-experimental'; }
-
- static get properties() {
- return {
- /** @type {?} */
- change: Object,
- changeNum: Number,
- /**
- * These are just the change messages. They are combined with reviewer
- * updates below. So _combinedMessages is the more important property.
- */
- messages: {
- type: Array,
- value() { return []; },
- },
- /**
- * These are just the reviewer updates. They are combined with change
- * messages above. So _combinedMessages is the more important property.
- */
- reviewerUpdates: {
- type: Array,
- value() { return []; },
- },
- changeComments: Object,
- projectName: String,
- showReplyButtons: {
- type: Boolean,
- value: false,
- },
- labels: Object,
-
- /**
- * Keeps track of the state of the "Expand All" toggle button. Note that
- * you can individually expand/collapse some messages without affecting
- * the toggle button's state.
- *
- * @type {ExpandAllState}
- */
- _expandAllState: {
- type: String,
- value: ExpandAllState.EXPAND_ALL,
- },
- _expandAllTitle: {
- type: String,
- computed: '_computeExpandAllTitle(_expandAllState)',
- },
-
- _showAllActivity: {
- type: Boolean,
- value: false,
- observer: '_observeShowAllActivity',
- },
- /**
- * The merged array of change messages and reviewer updates.
- */
- _combinedMessages: {
- type: Array,
- computed: '_computeCombinedMessages(messages, reviewerUpdates, '
- + 'changeComments)',
- observer: '_combinedMessagesChanged',
- },
-
- _labelExtremes: {
- type: Object,
- computed: '_computeLabelExtremes(labels.*)',
- },
- };
- }
-
- constructor() {
- super();
- this.reporting = appContext.reportingService;
- }
-
- scrollToMessage(messageID) {
- const selector = `[data-message-id="${messageID}"]`;
- const el = this.shadowRoot.querySelector(selector);
-
- if (!el && this._showAllActivity) {
- console.warn(`Failed to scroll to message: ${messageID}`);
- return;
- }
- if (!el) {
- this._showAllActivity = true;
- setTimeout(() => this.scrollToMessage(messageID));
- return;
- }
-
- el.set('message.expanded', true);
- let top = el.offsetTop;
- for (let offsetParent = el.offsetParent;
- offsetParent;
- offsetParent = offsetParent.offsetParent) {
- top += offsetParent.offsetTop;
- }
- window.scrollTo(0, top);
- this._highlightEl(el);
- }
-
- _observeShowAllActivity(showAllActivity) {
- // We have to call render() such that the dom-repeat filter picks up the
- // change.
- this.$.messageRepeat.render();
- }
-
- /**
- * Filter for the dom-repeat of combinedMessages.
- */
- _isMessageVisible(message) {
- return this._showAllActivity || message.isImportant;
- }
-
- /**
- * Merges change messages and reviewer updates into one array. Also processes
- * all messages and updates, aligns or massages some of the properties.
- */
- _computeCombinedMessages(messages, reviewerUpdates, changeComments) {
- const params = [messages, reviewerUpdates, changeComments];
- if (params.some(o => o === undefined)) return [];
-
- let mi = 0;
- let ri = 0;
- let combinedMessages = [];
- let mDate;
- let rDate;
- for (let i = 0; i < messages.length; i++) {
- messages[i]._index = i;
- }
-
- while (mi < messages.length || ri < reviewerUpdates.length) {
- if (mi >= messages.length) {
- combinedMessages = combinedMessages.concat(reviewerUpdates.slice(ri));
- break;
- }
- if (ri >= reviewerUpdates.length) {
- combinedMessages = combinedMessages.concat(messages.slice(mi));
- break;
- }
- mDate = mDate || parseDate(messages[mi].date);
- rDate = rDate || parseDate(reviewerUpdates[ri].date);
- if (rDate < mDate) {
- combinedMessages.push(reviewerUpdates[ri++]);
- rDate = null;
- } else {
- combinedMessages.push(messages[mi++]);
- mDate = null;
- }
- }
- combinedMessages.forEach(m => {
- if (m.expanded === undefined) {
- m.expanded = false;
- }
- m.commentThreads = computeThreads(m, combinedMessages, changeComments);
- m._revision_number = computeRevision(m, combinedMessages);
- m.tag = computeTag(m);
- });
- // computeIsImportant() depends on tags and revision numbers already being
- // updated for all messages, so we have to compute this in its own forEach
- // loop.
- combinedMessages.forEach(m => {
- m.isImportant = computeIsImportant(m, combinedMessages);
- });
- return combinedMessages;
- }
-
- _updateExpandedStateOfAllMessages(exp) {
- if (this._combinedMessages) {
- for (let i = 0; i < this._combinedMessages.length; i++) {
- this._combinedMessages[i].expanded = exp;
- this.notifyPath(`_combinedMessages.${i}.expanded`);
- }
- }
- }
-
- _computeExpandAllTitle(_expandAllState) {
- if (_expandAllState === ExpandAllState.COLLAPSED_ALL) {
- return this.createTitle(
- this.Shortcut.COLLAPSE_ALL_MESSAGES, this.ShortcutSection.ACTIONS);
- }
- if (_expandAllState === ExpandAllState.EXPAND_ALL) {
- return this.createTitle(
- this.Shortcut.EXPAND_ALL_MESSAGES, this.ShortcutSection.ACTIONS);
- }
- return '';
- }
-
- _highlightEl(el) {
- const highlightedEls =
- dom(this.root).querySelectorAll('.highlighted');
- for (const highlightedEl of highlightedEls) {
- highlightedEl.classList.remove('highlighted');
- }
- function handleAnimationEnd() {
- el.removeEventListener('animationend', handleAnimationEnd);
- el.classList.remove('highlighted');
- }
- el.addEventListener('animationend', handleAnimationEnd);
- el.classList.add('highlighted');
- }
-
- /**
- * @param {boolean} expand
- */
- handleExpandCollapse(expand) {
- this._expandAllState = expand ? ExpandAllState.COLLAPSE_ALL
- : ExpandAllState.EXPAND_ALL;
- this._updateExpandedStateOfAllMessages(expand);
- }
-
- _handleExpandCollapseTap(e) {
- e.preventDefault();
- this.handleExpandCollapse(
- this._expandAllState === ExpandAllState.EXPAND_ALL);
- }
-
- _handleAnchorClick(e) {
- this.scrollToMessage(e.detail.id);
- }
-
- _isVisibleShowAllActivityToggle(messages = []) {
- return messages.some(m => !m.isImportant);
- }
-
- _computeHiddenEntriesCount(messages = []) {
- return messages.filter(m => !m.isImportant).length;
- }
-
- /**
- * This method is for reporting stats only.
- */
- _combinedMessagesChanged(combinedMessages) {
- if (combinedMessages) {
- if (combinedMessages.length === 0) return;
- const tags = combinedMessages.map(
- message => message.tag || message.type ||
- (message.comments ? 'comments' : 'none'));
- const tagsCounted = tags.reduce((acc, val) => {
- acc[val] = (acc[val] || 0) + 1;
- return acc;
- }, {all: combinedMessages.length});
- this.reporting.reportInteraction('messages-count', tagsCounted);
- }
- }
-
- /**
- * Compute a mapping from label name to objects representing the minimum and
- * maximum possible values for that label.
- */
- _computeLabelExtremes(labelRecord) {
- const extremes = {};
- const labels = labelRecord.base;
- if (!labels) { return extremes; }
- for (const key of Object.keys(labels)) {
- if (!labels[key] || !labels[key].values) { continue; }
- const values = Object.keys(labels[key].values)
- .map(v => parseInt(v, 10));
- values.sort((a, b) => a - b);
- if (!values.length) { continue; }
- extremes[key] = {min: values[0], max: values[values.length - 1]};
- }
- return extremes;
- }
-
- /**
- * Work around a issue on iOS when clicking turns into double tap
- */
- _onTapShowAllActivityToggle(e) {
- e.preventDefault();
- }
-}
-
-customElements.define(GrMessagesListExperimental.is,
- GrMessagesListExperimental);
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental_html.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental_html.js
deleted file mode 100644
index 212de59..0000000
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental_html.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * @license
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import {html} from '@polymer/polymer/lib/utils/html-tag.js';
-
-export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: flex;
- justify-content: space-between;
- }
- .header {
- align-items: center;
- border-top: 1px solid var(--border-color);
- border-bottom: 1px solid var(--border-color);
- display: flex;
- justify-content: space-between;
- padding: var(--spacing-s) var(--spacing-l);
- }
- .highlighted {
- animation: 3s fadeOut;
- }
- @keyframes fadeOut {
- 0% {
- background-color: var(--emphasis-color);
- }
- 100% {
- background-color: var(--view-background-color);
- }
- }
- .container {
- align-items: center;
- display: flex;
- }
- .hiddenEntries {
- color: var(--deemphasized-text-color);
- }
- gr-message:not(:last-of-type) {
- border-bottom: 1px solid var(--border-color);
- }
- gr-message {
- background-color: var(--background-color-secondary);
- }
- .experimentMessage {
- padding: var(--spacing-s) var(--spacing-m);
- background-color: var(--emphasis-color);
- border-radius: var(--border-radius);
- }
- .experimentMessage iron-icon {
- vertical-align: top;
- }
- </style>
- <div class="header">
- <div id="showAllActivityToggleContainer" class="container">
- <template
- is="dom-if"
- if="[[_isVisibleShowAllActivityToggle(_combinedMessages)]]"
- >
- <paper-toggle-button
- class="showAllActivityToggle"
- checked="{{_showAllActivity}}"
- aria-labelledby="showAllEntriesLabel"
- role="switch"
- on-tap="_onTapShowAllActivityToggle"
- ></paper-toggle-button>
- <div id="showAllEntriesLabel">
- <span>Show all entries</span>
- <span class="hiddenEntries" hidden$="[[_showAllActivity]]">
- ([[_computeHiddenEntriesCount(_combinedMessages)]] hidden)
- </span>
- </div>
- <span class="transparent separator"></span>
- </template>
- </div>
- <gr-button
- id="collapse-messages"
- link=""
- title="[[_expandAllTitle]]"
- on-click="_handleExpandCollapseTap"
- >
- [[_expandAllState]]
- </gr-button>
- </div>
- <template
- id="messageRepeat"
- is="dom-repeat"
- items="[[_combinedMessages]]"
- as="message"
- filter="_isMessageVisible"
- >
- <gr-message
- change="[[change]]"
- change-num="[[changeNum]]"
- message="[[message]]"
- project-name="[[projectName]]"
- show-reply-button="[[showReplyButtons]]"
- on-message-anchor-tap="_handleAnchorClick"
- label-extremes="[[_labelExtremes]]"
- data-message-id$="[[message.id]]"
- ></gr-message>
- </template>
-`;
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental_test.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental_test.js
deleted file mode 100644
index 1a0969f..0000000
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental_test.js
+++ /dev/null
@@ -1,544 +0,0 @@
-/**
- * @license
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import '../../../test/common-test-setup-karma.js';
-import '../../diff/gr-comment-api/gr-comment-api.js';
-import './gr-messages-list-experimental.js';
-import {createCommentApiMockWithTemplateElement} from '../../../test/mocks/comment-api.js';
-import {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';
-import {TEST_ONLY} from './gr-messages-list-experimental.js';
-import {MessageTag} from '../../../constants/constants.js';
-import {html} from '@polymer/polymer/lib/utils/html-tag.js';
-
-createCommentApiMockWithTemplateElement(
- 'gr-messages-list-experimental-comment-mock-api', html`
- <gr-messages-list-experimental
- id="messagesList"
- change-comments="[[_changeComments]]"></gr-messages-list-experimental>
- <gr-comment-api id="commentAPI"></gr-comment-api>
-`);
-
-const basicFixture = fixtureFromTemplate(html`
-<gr-messages-list-experimental-comment-mock-api>
- <gr-messages-list-experimental></gr-messages-list-experimental>
-</gr-messages-list-experimental-comment-mock-api>
-`);
-
-const randomMessage = function(opt_params) {
- const params = opt_params || {};
- const author1 = {
- _account_id: 1115495,
- name: 'Andrew Bonventre',
- email: 'andybons@chromium.org',
- };
- return {
- id: params.id || Math.random().toString(),
- date: params.date || '2016-01-12 20:28:33.038000',
- message: params.message || Math.random().toString(),
- _revision_number: params._revision_number || 1,
- author: params.author || author1,
- tag: params.tag,
- };
-};
-
-function generateRandomMessages(count) {
- return new Array(count).fill()
- .map(() => randomMessage());
-}
-
-suite('gr-messages-list-experimental tests', () => {
- let element;
- let messages;
-
- let commentApiWrapper;
-
- const getMessages = function() {
- return dom(element.root).querySelectorAll('gr-message');
- };
-
- const MESSAGE_ID_0 = '1234ccc949c6d482b061be6a28e10782abf0e7af';
- const MESSAGE_ID_1 = '8c19ccc949c6d482b061be6a28e10782abf0e7af';
- const MESSAGE_ID_2 = 'e7bfdbc842f6b6d8064bc68e0f52b673f40c0ca5';
-
- const author = {
- _account_id: 42,
- name: 'Marvin the Paranoid Android',
- email: 'marvin@sirius.org',
- };
-
- const createComment = function() {
- return {
- id: '1a2b3c4d',
- message: 'some random test text',
- change_message_id: '8a7b6c5d',
- updated: '2016-01-01 01:02:03.000000000',
- line: 1,
- patch_set: 1,
- author,
- };
- };
-
- const comments = {
- file1: [
- {
- ...createComment(),
- change_message_id: MESSAGE_ID_0,
- in_reply_to: '6505d749_f0bec0aa',
- author: {
- email: 'some@email.com',
- _account_id: 123,
- },
- },
- {
- ...createComment(),
- id: '2b3c4d5e',
- change_message_id: MESSAGE_ID_1,
- in_reply_to: 'c5912363_6b820105',
- },
- {
- ...createComment(),
- id: '2b3c4d5e',
- change_message_id: MESSAGE_ID_1,
- in_reply_to: '6505d749_f0bec0aa',
- },
- {
- ...createComment(),
- id: '34ed05d749_10ed44b2',
- change_message_id: MESSAGE_ID_2,
- },
- ],
- file2: [
- {
- ...createComment(),
- change_message_id: MESSAGE_ID_1,
- in_reply_to: 'c5912363_4b7d450a',
- id: '450a935e_4f260d25',
- },
- ],
- };
-
- suite('basic tests', () => {
- setup(() => {
- stub('gr-rest-api-interface', {
- getConfig() { return Promise.resolve({}); },
- getLoggedIn() { return Promise.resolve(false); },
- getDiffComments() { return Promise.resolve(comments); },
- getDiffRobotComments() { return Promise.resolve({}); },
- getDiffDrafts() { return Promise.resolve({}); },
- });
-
- messages = generateRandomMessages(3);
- // Element must be wrapped in an element with direct access to the
- // comment API.
- commentApiWrapper = basicFixture.instantiate();
- element = commentApiWrapper.$.messagesList;
- element.messages = messages;
-
- // Stub methods on the changeComments object after changeComments has
- // been initialized.
- return commentApiWrapper.loadComments();
- });
-
- test('expand/collapse all', () => {
- let allMessageEls = getMessages();
- for (const message of allMessageEls) {
- message._expanded = false;
- }
- MockInteractions.tap(allMessageEls[1]);
- assert.isTrue(allMessageEls[1]._expanded);
-
- MockInteractions.tap(element.shadowRoot
- .querySelector('#collapse-messages'));
- allMessageEls = getMessages();
- for (const message of allMessageEls) {
- assert.isTrue(message._expanded);
- }
-
- MockInteractions.tap(element.shadowRoot
- .querySelector('#collapse-messages'));
- allMessageEls = getMessages();
- for (const message of allMessageEls) {
- assert.isFalse(message._expanded);
- }
- });
-
- test('expand/collapse from external keypress', () => {
- // Start with one expanded message. -> not all collapsed
- element.scrollToMessage(messages[1].id);
- assert.isFalse([...getMessages()].filter(m => m._expanded).length == 0);
-
- // Press 'z' -> all collapsed
- element.handleExpandCollapse(false);
- assert.isTrue([...getMessages()].filter(m => m._expanded).length == 0);
-
- // Press 'x' -> all expanded
- element.handleExpandCollapse(true);
- assert.isTrue([...getMessages()].filter(m => !m._expanded).length == 0);
-
- // Press 'z' -> all collapsed
- element.handleExpandCollapse(false);
- assert.isTrue([...getMessages()].filter(m => m._expanded).length == 0);
- });
-
- test('showAllActivity does not appear when all msgs are important', () => {
- assert.isOk(element.shadowRoot
- .querySelector('#showAllActivityToggleContainer'));
- assert.isNotOk(element.shadowRoot
- .querySelector('.showAllActivityToggle'));
- });
-
- test('scroll to message', () => {
- const allMessageEls = getMessages();
- for (const message of allMessageEls) {
- message.set('message.expanded', false);
- }
-
- const scrollToStub = sinon.stub(window, 'scrollTo');
- const highlightStub = sinon.stub(element, '_highlightEl');
-
- element.scrollToMessage('invalid');
-
- for (const message of allMessageEls) {
- assert.isFalse(message._expanded,
- 'expected gr-message to not be expanded');
- }
-
- const messageID = messages[1].id;
- element.scrollToMessage(messageID);
- assert.isTrue(
- element.shadowRoot
- .querySelector('[data-message-id="' + messageID + '"]')
- ._expanded);
-
- assert.isTrue(scrollToStub.calledOnce);
- assert.isTrue(highlightStub.calledOnce);
- });
-
- test('scroll to message offscreen', () => {
- const scrollToStub = sinon.stub(window, 'scrollTo');
- const highlightStub = sinon.stub(element, '_highlightEl');
- element.messages = generateRandomMessages(25);
- flushAsynchronousOperations();
- assert.isFalse(scrollToStub.called);
- assert.isFalse(highlightStub.called);
-
- const messageID = element.messages[1].id;
- element.scrollToMessage(messageID);
- assert.isTrue(scrollToStub.calledOnce);
- assert.isTrue(highlightStub.calledOnce);
- assert.isTrue(
- element.shadowRoot
- .querySelector('[data-message-id="' + messageID + '"]')
- ._expanded);
- });
-
- test('associating messages with comments', () => {
- const messages = [].concat(
- randomMessage(),
- {
- _index: 5,
- _revision_number: 4,
- message: 'Uploaded patch set 4.',
- date: '2016-09-28 13:36:33.000000000',
- author,
- id: '8c19ccc949c6d482b061be6a28e10782abf0e7af',
- },
- {
- _index: 6,
- _revision_number: 4,
- message: 'Patch Set 4:\n\n(6 comments)',
- date: '2016-09-28 13:36:33.000000000',
- author,
- id: 'e7bfdbc842f6b6d8064bc68e0f52b673f40c0ca5',
- }
- );
- element.messages = messages;
- flushAsynchronousOperations();
- const messageElements = getMessages();
- assert.equal(messageElements.length, messages.length);
- assert.deepEqual(messageElements[1].message, messages[1]);
- assert.deepEqual(messageElements[2].message, messages[2]);
- });
-
- test('threads', () => {
- const messages = [
- {
- _index: 5,
- _revision_number: 4,
- message: 'Uploaded patch set 4.',
- date: '2016-09-28 13:36:33.000000000',
- author,
- id: '8c19ccc949c6d482b061be6a28e10782abf0e7af',
- },
- ];
- element.messages = messages;
- flushAsynchronousOperations();
- const messageElements = getMessages();
- // threads
- assert.equal(
- messageElements[0].message.commentThreads.length,
- 3);
- // first thread contains 1 comment
- assert.equal(
- messageElements[0].message.commentThreads[0].comments.length,
- 1);
- });
-
- test('updateTag human message', () => {
- const m = randomMessage();
- assert.equal(TEST_ONLY.computeTag(m), undefined);
- });
-
- test('updateTag nothing to change', () => {
- const m = randomMessage();
- const tag = 'something-normal';
- m.tag = tag;
- assert.equal(TEST_ONLY.computeTag(m), tag);
- });
-
- test('updateTag TAG_NEW_WIP_PATCHSET', () => {
- const m = randomMessage();
- m.tag = MessageTag.TAG_NEW_WIP_PATCHSET;
- assert.equal(TEST_ONLY.computeTag(m), MessageTag.TAG_NEW_PATCHSET);
- });
-
- test('updateTag remove postfix', () => {
- const m = randomMessage();
- m.tag = 'something~withpostfix';
- assert.equal(TEST_ONLY.computeTag(m), 'something');
- });
-
- test('updateTag with robot comments', () => {
- const m = randomMessage();
- m.commentThreads = [{
- comments: [{
- robot_id: 'id314',
- change_message_id: m.id,
- }],
- }];
- assert.notEqual(TEST_ONLY.computeTag(m), undefined);
- });
-
- test('setRevisionNumber nothing to change', () => {
- const m1 = randomMessage();
- const m2 = randomMessage();
- assert.equal(TEST_ONLY.computeRevision(m1, [m1, m2]), 1);
- assert.equal(TEST_ONLY.computeRevision(m2, [m1, m2]), 1);
- });
-
- test('setRevisionNumber reviewer updates', () => {
- const m1 = randomMessage(
- {
- tag: MessageTag.TAG_REVIEWER_UPDATE,
- date: '2020-01-01 10:00:00.000000000',
- });
- m1._revision_number = undefined;
- const m2 = randomMessage(
- {
- date: '2020-01-02 10:00:00.000000000',
- });
- m2._revision_number = 1;
- const m3 = randomMessage(
- {
- tag: MessageTag.TAG_REVIEWER_UPDATE,
- date: '2020-01-03 10:00:00.000000000',
- });
- m3._revision_number = undefined;
- const m4 = randomMessage(
- {
- date: '2020-01-04 10:00:00.000000000',
- });
- m4._revision_number = 2;
- const m5 = randomMessage(
- {
- tag: MessageTag.TAG_REVIEWER_UPDATE,
- date: '2020-01-05 10:00:00.000000000',
- });
- m5._revision_number = undefined;
- const allMessages = [m1, m2, m3, m4, m5];
- assert.equal(TEST_ONLY.computeRevision(m1, allMessages), undefined);
- assert.equal(TEST_ONLY.computeRevision(m2, allMessages), 1);
- assert.equal(TEST_ONLY.computeRevision(m3, allMessages), 1);
- assert.equal(TEST_ONLY.computeRevision(m4, allMessages), 2);
- assert.equal(TEST_ONLY.computeRevision(m5, allMessages), 2);
- });
-
- test('isImportant human message', () => {
- const m = randomMessage();
- assert.isTrue(TEST_ONLY.computeIsImportant(m, []));
- assert.isTrue(TEST_ONLY.computeIsImportant(m, [m]));
- });
-
- test('isImportant even with a tag', () => {
- const m1 = randomMessage();
- const m2 = randomMessage({tag: 'autogenerated:gerrit1'});
- const m3 = randomMessage({tag: 'autogenerated:gerrit2'});
- assert.isTrue(TEST_ONLY.computeIsImportant(m2, []));
- assert.isTrue(TEST_ONLY.computeIsImportant(m1, [m1, m2, m3]));
- assert.isTrue(TEST_ONLY.computeIsImportant(m2, [m1, m2, m3]));
- assert.isTrue(TEST_ONLY.computeIsImportant(m3, [m1, m2, m3]));
- });
-
- test('isImportant filters same tag and older revision', () => {
- const m1 = randomMessage({tag: 'auto', _revision_number: 2});
- const m2 = randomMessage({tag: 'auto', _revision_number: 1});
- const m3 = randomMessage({tag: 'auto'});
- assert.isTrue(TEST_ONLY.computeIsImportant(m1, [m1]));
- assert.isTrue(TEST_ONLY.computeIsImportant(m2, [m2]));
- assert.isTrue(TEST_ONLY.computeIsImportant(m1, [m1, m2]));
- assert.isFalse(TEST_ONLY.computeIsImportant(m2, [m1, m2]));
- assert.isTrue(TEST_ONLY.computeIsImportant(m1, [m1, m3]));
- assert.isFalse(TEST_ONLY.computeIsImportant(m3, [m1, m3]));
- assert.isTrue(TEST_ONLY.computeIsImportant(m1, [m1, m2, m3]));
- assert.isFalse(TEST_ONLY.computeIsImportant(m2, [m1, m2, m3]));
- assert.isFalse(TEST_ONLY.computeIsImportant(m3, [m1, m2, m3]));
- });
-
- test('isImportant is evaluated after tag update', () => {
- const m1 = randomMessage(
- {tag: MessageTag.TAG_NEW_PATCHSET, _revision_number: 1});
- const m2 = randomMessage(
- {tag: MessageTag.TAG_NEW_WIP_PATCHSET, _revision_number: 2});
- element.messages = [m1, m2];
- flushAsynchronousOperations();
- assert.isFalse(m1.isImportant);
- assert.isTrue(m2.isImportant);
- });
-
- test('messages without author do not throw', () => {
- const messages = [{
- _index: 5,
- _revision_number: 4,
- message: 'Uploaded patch set 4.',
- date: '2016-09-28 13:36:33.000000000',
- id: '8c19ccc949c6d482b061be6a28e10782abf0e7af',
- }];
- element.messages = messages;
- flushAsynchronousOperations();
- const messageEls = getMessages();
- assert.equal(messageEls.length, 1);
- assert.equal(messageEls[0].message.message, messages[0].message);
- });
- });
-
- suite('gr-messages-list-experimental automate tests', () => {
- let element;
- let messages;
-
- let commentApiWrapper;
-
- setup(() => {
- stub('gr-rest-api-interface', {
- getConfig() { return Promise.resolve({}); },
- getLoggedIn() { return Promise.resolve(false); },
- getDiffComments() { return Promise.resolve({}); },
- getDiffRobotComments() { return Promise.resolve({}); },
- getDiffDrafts() { return Promise.resolve({}); },
- });
-
- messages = [
- randomMessage(),
- randomMessage({tag: 'auto', _revision_number: 2}),
- randomMessage({tag: 'auto', _revision_number: 3}),
- ];
-
- // Element must be wrapped in an element with direct access to the
- // comment API.
- commentApiWrapper = basicFixture.instantiate();
- element = commentApiWrapper.$.messagesList;
- sinon.spy(commentApiWrapper.$.commentAPI, 'loadAll');
- element.messages = messages;
-
- // Stub methods on the changeComments object after changeComments has
- // been initialized.
- return commentApiWrapper.loadComments();
- });
-
- test('hide autogenerated button is not hidden', () => {
- const toggle = dom(element.root).querySelector('.showAllActivityToggle');
- assert.isOk(toggle);
- });
-
- test('one unimportant message is hidden initially', () => {
- const displayedMsgs = dom(element.root).querySelectorAll('gr-message');
- assert.equal(displayedMsgs.length, 2);
- });
-
- test('unimportant messages hidden after toggle', () => {
- element._showAllActivity = true;
- const toggle = dom(element.root).querySelector('.showAllActivityToggle');
- assert.isOk(toggle);
- MockInteractions.tap(toggle);
- flushAsynchronousOperations();
- const displayedMsgs = dom(element.root).querySelectorAll('gr-message');
- assert.equal(displayedMsgs.length, 2);
- });
-
- test('unimportant messages shown after toggle', () => {
- element._showAllActivity = false;
- const toggle = dom(element.root).querySelector('.showAllActivityToggle');
- assert.isOk(toggle);
- MockInteractions.tap(toggle);
- flushAsynchronousOperations();
- const displayedMsgs = dom(element.root).querySelectorAll('gr-message');
- assert.equal(displayedMsgs.length, 3);
- });
-
- test('_computeLabelExtremes', () => {
- const computeSpy = sinon.spy(element, '_computeLabelExtremes');
-
- element.labels = null;
- assert.isTrue(computeSpy.calledOnce);
- assert.deepEqual(computeSpy.lastCall.returnValue, {});
-
- element.labels = {};
- assert.isTrue(computeSpy.calledTwice);
- assert.deepEqual(computeSpy.lastCall.returnValue, {});
-
- element.labels = {'my-label': {}};
- assert.isTrue(computeSpy.calledThrice);
- assert.deepEqual(computeSpy.lastCall.returnValue, {});
-
- element.labels = {'my-label': {values: {}}};
- assert.equal(computeSpy.callCount, 4);
- assert.deepEqual(computeSpy.lastCall.returnValue, {});
-
- element.labels = {'my-label': {values: {'-12': {}}}};
- assert.equal(computeSpy.callCount, 5);
- assert.deepEqual(computeSpy.lastCall.returnValue,
- {'my-label': {min: -12, max: -12}});
-
- element.labels = {
- 'my-label': {values: {'-2': {}, '-1': {}, '0': {}, '+1': {}, '+2': {}}},
- };
- assert.equal(computeSpy.callCount, 6);
- assert.deepEqual(computeSpy.lastCall.returnValue,
- {'my-label': {min: -2, max: 2}});
-
- element.labels = {
- 'my-label': {values: {'-12': {}}},
- 'other-label': {values: {'-1': {}, ' 0': {}, '+1': {}}},
- };
- assert.equal(computeSpy.callCount, 7);
- assert.deepEqual(computeSpy.lastCall.returnValue, {
- 'my-label': {min: -12, max: -12},
- 'other-label': {min: -1, max: 1},
- });
- });
- });
-});
-
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js
index 30482e2..cd61396 100644
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js
+++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js
@@ -1,6 +1,6 @@
/**
* @license
- * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,10 @@
*/
import '@polymer/paper-toggle-button/paper-toggle-button.js';
import '../../shared/gr-button/gr-button.js';
+import '../../shared/gr-icons/gr-icons.js';
import '../gr-message/gr-message.js';
import '../../../styles/shared-styles.js';
-import {flush, dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';
+import {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';
import {mixinBehaviors} from '@polymer/polymer/lib/legacy/class.js';
import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
import {LegacyElementMixin} from '@polymer/polymer/lib/legacy/legacy-element-mixin.js';
@@ -26,16 +27,9 @@
import {htmlTemplate} from './gr-messages-list_html.js';
import {KeyboardShortcutBehavior} from '../../../behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior.js';
import {parseDate} from '../../../utils/date-util.js';
+import {MessageTag} from '../../../constants/constants.js';
import {appContext} from '../../../services/app-context.js';
-const MAX_INITIAL_SHOWN_MESSAGES = 20;
-const MESSAGES_INCREMENT = 5;
-
-const ReportingEvent = {
- SHOW_ALL: 'show-all-messages',
- SHOW_MORE: 'show-more-messages',
-};
-
/**
* The content of the enum is also used in the UI for the button text.
*
@@ -47,6 +41,114 @@
};
/**
+ * Computes message author's comments for this change message. The backend
+ * sets comment.change_message_id for matching, so this computation is fairly
+ * straightforward.
+ */
+function computeThreads(message, allMessages, changeComments) {
+ if ([message, allMessages, changeComments].includes(undefined)) {
+ return [];
+ }
+ if (message._index === undefined) {
+ return [];
+ }
+
+ return changeComments.getAllThreadsForChange().filter(
+ thread => thread.comments.map(comment => {
+ // collapse all by default
+ comment.collapsed = true;
+ return comment;
+ }).some(comment => {
+ const condition = comment.change_message_id === message.id;
+ // Since getAllThreadsForChange() always returns a new copy of
+ // all comments we can modify them here without worrying about
+ // polluting other threads.
+ comment.collapsed = !condition;
+ return condition;
+ })
+ );
+}
+
+/**
+ * If messages have the same tag, then that influences grouping and whether
+ * a message is initally hidden or not, see isImportant(). So we are applying
+ * some "magic" rules here in order to hide exactly the right messages.
+ *
+ * 1. If a message does not have a tag, but is associated with robot comments,
+ * then it gets a tag.
+ *
+ * 2. Use the same tag for some of Gerrit's standard events, if they should be
+ * considered one group, e.g. normal and wip patchset uploads.
+ *
+ * 3. Everything beyond the ~ character is cut off from the tag. That gives
+ * tools control over which messages will be hidden.
+ */
+function computeTag(message) {
+ if (!message.tag) {
+ const threads = message.commentThreads || [];
+ const comments = threads.map(
+ t => t.comments.find(c => c.change_message_id === message.id));
+ const isRobot = comments.some(c => c && !!c.robot_id);
+ return isRobot ? 'autogenerated:has-robot-comments' : undefined;
+ }
+
+ if (message.tag === MessageTag.TAG_NEW_WIP_PATCHSET) {
+ return MessageTag.TAG_NEW_PATCHSET;
+ }
+ if (message.tag === MessageTag.TAG_UNSET_ASSIGNEE) {
+ return MessageTag.TAG_SET_ASSIGNEE;
+ }
+ if (message.tag === MessageTag.TAG_UNSET_PRIVATE) {
+ return MessageTag.TAG_SET_PRIVATE;
+ }
+ if (message.tag === MessageTag.TAG_SET_WIP) {
+ return MessageTag.TAG_SET_READY;
+ }
+
+ return message.tag.replace(/~.*/, '');
+}
+
+/**
+ * Try to set a revision number that makes sense, if none is set. Just copy
+ * over the revision number of the next older message. This is mostly relevant
+ * for reviewer updates. Other messages should typically have the revision
+ * number already set.
+ */
+function computeRevision(message, allMessages) {
+ if (message._revision_number > 0) return message._revision_number;
+ let revision = 0;
+ for (const m of allMessages) {
+ if (m.date > message.date) break;
+ if (m._revision_number > revision) revision = m._revision_number;
+ }
+ return revision > 0 ? revision : undefined;
+}
+
+/**
+ * Unimportant messages are initially hidden.
+ *
+ * Human messages are always important. They have an undefined tag.
+ *
+ * Autogenerated messages are unimportant, if there is a message with the same
+ * tag and a higher revision number.
+ */
+function computeIsImportant(message, allMessages) {
+ if (!message.tag) return true;
+
+ const hasSameTag = m => m.tag === message.tag;
+ const revNumber = message._revision_number || 0;
+ const hasHigherRevisionNumber = m => m._revision_number > revNumber;
+ return !allMessages.filter(hasSameTag).some(hasHigherRevisionNumber);
+}
+
+export const TEST_ONLY = {
+ computeThreads,
+ computeTag,
+ computeRevision,
+ computeIsImportant,
+};
+
+/**
* @extends PolymerElement
*/
class GrMessagesList extends mixinBehaviors( [
@@ -60,11 +162,21 @@
static get properties() {
return {
+ /** @type {?} */
+ change: Object,
changeNum: Number,
+ /**
+ * These are just the change messages. They are combined with reviewer
+ * updates below. So _combinedMessages is the more important property.
+ */
messages: {
type: Array,
value() { return []; },
},
+ /**
+ * These are just the reviewer updates. They are combined with change
+ * messages above. So _combinedMessages is the more important property.
+ */
reviewerUpdates: {
type: Array,
value() { return []; },
@@ -93,24 +205,19 @@
computed: '_computeExpandAllTitle(_expandAllState)',
},
- _hideAutomated: {
+ _showAllActivity: {
type: Boolean,
value: false,
+ observer: '_observeShowAllActivity',
},
/**
- * The messages after processing and including merged reviewer updates.
+ * The merged array of change messages and reviewer updates.
*/
- _processedMessages: {
+ _combinedMessages: {
type: Array,
- computed: '_computeItems(messages, reviewerUpdates)',
- observer: '_processedMessagesChanged',
- },
- /**
- * The subset of _processedMessages that is visible to the user.
- */
- _visibleMessages: {
- type: Array,
- value() { return []; },
+ computed: '_computeCombinedMessages(messages, reviewerUpdates, '
+ + 'changeComments)',
+ observer: '_combinedMessagesChanged',
},
_labelExtremes: {
@@ -126,27 +233,17 @@
}
scrollToMessage(messageID) {
- let el = this.shadowRoot
- .querySelector('[data-message-id="' + messageID + '"]');
- // If the message is hidden, expand the hidden messages back to that
- // point.
- if (!el) {
- let index;
- for (index = 0; index < this._processedMessages.length; index++) {
- if (this._processedMessages[index].id === messageID) {
- break;
- }
- }
- if (index === this._processedMessages.length) { return; }
+ const selector = `[data-message-id="${messageID}"]`;
+ const el = this.shadowRoot.querySelector(selector);
- const newMessages = this._processedMessages.slice(index,
- -this._visibleMessages.length);
- // Add newMessages to the beginning of _visibleMessages.
- this.splice(...['_visibleMessages', 0, 0].concat(newMessages));
- // Allow the dom-repeat to stamp.
- flush();
- el = this.shadowRoot
- .querySelector('[data-message-id="' + messageID + '"]');
+ if (!el && this._showAllActivity) {
+ console.warn(`Failed to scroll to message: ${messageID}`);
+ return;
+ }
+ if (!el) {
+ this._showAllActivity = true;
+ setTimeout(() => this.scrollToMessage(messageID));
+ return;
}
el.set('message.expanded', true);
@@ -160,22 +257,30 @@
this._highlightEl(el);
}
- _isAutomated(message) {
- return !!(message.reviewer ||
- (message.tag && message.tag.startsWith('autogenerated')));
+ _observeShowAllActivity(showAllActivity) {
+ // We have to call render() such that the dom-repeat filter picks up the
+ // change.
+ this.$.messageRepeat.render();
}
- _computeItems(messages, reviewerUpdates) {
- // Polymer 2: check for undefined
- if ([messages, reviewerUpdates].includes(undefined)) {
- return [];
- }
+ /**
+ * Filter for the dom-repeat of combinedMessages.
+ */
+ _isMessageVisible(message) {
+ return this._showAllActivity || message.isImportant;
+ }
- messages = messages || [];
- reviewerUpdates = reviewerUpdates || [];
+ /**
+ * Merges change messages and reviewer updates into one array. Also processes
+ * all messages and updates, aligns or massages some of the properties.
+ */
+ _computeCombinedMessages(messages, reviewerUpdates, changeComments) {
+ const params = [messages, reviewerUpdates, changeComments];
+ if (params.some(o => o === undefined)) return [];
+
let mi = 0;
let ri = 0;
- let result = [];
+ let combinedMessages = [];
let mDate;
let rDate;
for (let i = 0; i < messages.length; i++) {
@@ -184,44 +289,45 @@
while (mi < messages.length || ri < reviewerUpdates.length) {
if (mi >= messages.length) {
- result = result.concat(reviewerUpdates.slice(ri));
+ combinedMessages = combinedMessages.concat(reviewerUpdates.slice(ri));
break;
}
if (ri >= reviewerUpdates.length) {
- result = result.concat(messages.slice(mi));
+ combinedMessages = combinedMessages.concat(messages.slice(mi));
break;
}
mDate = mDate || parseDate(messages[mi].date);
rDate = rDate || parseDate(reviewerUpdates[ri].date);
if (rDate < mDate) {
- result.push(reviewerUpdates[ri++]);
+ combinedMessages.push(reviewerUpdates[ri++]);
rDate = null;
} else {
- result.push(messages[mi++]);
+ combinedMessages.push(messages[mi++]);
mDate = null;
}
}
- result.forEach(m => {
+ combinedMessages.forEach(m => {
if (m.expanded === undefined) {
m.expanded = false;
}
+ m.commentThreads = computeThreads(m, combinedMessages, changeComments);
+ m._revision_number = computeRevision(m, combinedMessages);
+ m.tag = computeTag(m);
});
- return result;
+ // computeIsImportant() depends on tags and revision numbers already being
+ // updated for all messages, so we have to compute this in its own forEach
+ // loop.
+ combinedMessages.forEach(m => {
+ m.isImportant = computeIsImportant(m, combinedMessages);
+ });
+ return combinedMessages;
}
- _updateExpandedStateOfAllMessages(expanded) {
- if (this._processedMessages) {
- for (let i = 0; i < this._processedMessages.length; i++) {
- this._processedMessages[i].expanded = expanded;
- }
- }
- // _visibleMessages is a subarray of _processedMessages
- // _processedMessages contains all items from _visibleMessages
- // At this point all _visibleMessages.expanded values are set,
- // and notifyPath must be used to notify Polymer about changes.
- if (this._visibleMessages) {
- for (let i = 0; i < this._visibleMessages.length; i++) {
- this.notifyPath(`_visibleMessages.${i}.expanded`);
+ _updateExpandedStateOfAllMessages(exp) {
+ if (this._combinedMessages) {
+ for (let i = 0; i < this._combinedMessages.length; i++) {
+ this._combinedMessages[i].expanded = exp;
+ this.notifyPath(`_combinedMessages.${i}.expanded`);
}
}
}
@@ -271,181 +377,31 @@
this.scrollToMessage(e.detail.id);
}
- _hasAutomatedMessages(messages) {
- if (!messages) { return false; }
- for (const message of messages) {
- if (this._isAutomated(message)) {
- return true;
- }
- }
- return false;
+ _isVisibleShowAllActivityToggle(messages = []) {
+ return messages.some(m => !m.isImportant);
+ }
+
+ _computeHiddenEntriesCount(messages = []) {
+ return messages.filter(m => !m.isImportant).length;
}
/**
- * Computes message author's file comments for change's message.
- * Method uses this.messages to find next message and relies on messages
- * to be sorted by date field descending.
- *
- * @param {!Object} changeComments changeComment object, which includes
- * a method to get all published comments (including robot comments),
- * which returns a Hash of arrays of comments, filename as key.
- * @param {!Object} message
- * @return {!Object} Hash of arrays of comments, filename as key.
+ * This method is for reporting stats only.
*/
- _computeCommentsForMessage(changeComments, message) {
- if ([changeComments, message].includes(undefined)) {
- return {};
- }
- const comments = changeComments.getAllPublishedComments();
- if (message._index === undefined || !comments || !this.messages) {
- return {};
- }
- const messages = this.messages || [];
- const index = message._index;
- const authorId = message.author && message.author._account_id;
- const mDate = parseDate(message.date).getTime();
- // NB: Messages array has oldest messages first.
- let nextMDate;
- if (index > 0) {
- for (let i = index - 1; i >= 0; i--) {
- if (messages[i] && messages[i].author &&
- messages[i].author._account_id === authorId) {
- nextMDate = parseDate(messages[i].date).getTime();
- break;
- }
- }
- }
- const msgComments = {};
- for (const file in comments) {
- if (!comments.hasOwnProperty(file)) { continue; }
- const fileComments = comments[file];
- for (let i = 0; i < fileComments.length; i++) {
- if (fileComments[i].author &&
- fileComments[i].author._account_id !== authorId) {
- continue;
- }
- const cDate = parseDate(fileComments[i].updated).getTime();
- if (cDate <= mDate) {
- if (nextMDate && cDate <= nextMDate) {
- continue;
- }
- msgComments[file] = msgComments[file] || [];
- msgComments[file].push(fileComments[i]);
- }
- }
- }
- return msgComments;
- }
-
- /**
- * Returns the number of messages to splice to the beginning of
- * _visibleMessages. This is the minimum of the total number of messages
- * remaining in the list and the number of messages needed to display five
- * more visible messages in the list.
- */
- _getDelta(visibleMessages, messages, hideAutomated) {
- if ([visibleMessages, messages].includes(undefined)) {
- return 0;
- }
-
- let delta = MESSAGES_INCREMENT;
- const msgsRemaining = messages.length - visibleMessages.length;
-
- if (hideAutomated) {
- let counter = 0;
- let i;
- for (i = msgsRemaining; i > 0 && counter < MESSAGES_INCREMENT; i--) {
- if (!this._isAutomated(messages[i - 1])) { counter++; }
- }
- delta = msgsRemaining - i;
- }
- return Math.min(msgsRemaining, delta);
- }
-
- /**
- * Gets the number of messages that would be visible, but do not currently
- * exist in _visibleMessages.
- */
- _numRemaining(visibleMessages, messages, hideAutomated) {
- if ([visibleMessages, messages].includes(undefined)) {
- return 0;
- }
-
- if (hideAutomated) {
- return this._getHumanMessages(messages).length -
- this._getHumanMessages(visibleMessages).length;
- }
- return messages.length - visibleMessages.length;
- }
-
- _computeIncrementText(visibleMessages, messages, hideAutomated) {
- let delta = this._getDelta(visibleMessages, messages, hideAutomated);
- delta = Math.min(
- this._numRemaining(visibleMessages, messages, hideAutomated), delta);
- return 'Show ' + Math.min(MESSAGES_INCREMENT, delta) + ' more';
- }
-
- _getHumanMessages(messages) {
- return messages.filter(msg => !this._isAutomated(msg));
- }
-
- _computeShowHideTextHidden(visibleMessages, messages,
- hideAutomated) {
- if ([visibleMessages, messages].includes(undefined)) {
- return 0;
- }
-
- if (hideAutomated) {
- messages = this._getHumanMessages(messages);
- visibleMessages = this._getHumanMessages(visibleMessages);
- }
- return visibleMessages.length >= messages.length;
- }
-
- _handleShowAllTap() {
- this._visibleMessages = this._processedMessages;
- this.reporting.reportInteraction(ReportingEvent.SHOW_ALL);
- }
-
- _handleIncrementShownMessages() {
- const delta = this._getDelta(this._visibleMessages,
- this._processedMessages, this._hideAutomated);
- const len = this._visibleMessages.length;
- const newMessages = this._processedMessages.slice(-(len + delta), -len);
- // Add newMessages to the beginning of _visibleMessages
- this.splice(...['_visibleMessages', 0, 0].concat(newMessages));
- this.reporting.reportInteraction(ReportingEvent.SHOW_MORE);
- }
-
- _processedMessagesChanged(messages) {
- if (messages) {
- this._visibleMessages = messages.slice(-MAX_INITIAL_SHOWN_MESSAGES);
-
- if (messages.length === 0) return;
- const tags = messages.map(message => message.tag || message.type ||
- (message.comments ? 'comments' : 'none'));
+ _combinedMessagesChanged(combinedMessages) {
+ if (combinedMessages) {
+ if (combinedMessages.length === 0) return;
+ const tags = combinedMessages.map(
+ message => message.tag || message.type ||
+ (message.comments ? 'comments' : 'none'));
const tagsCounted = tags.reduce((acc, val) => {
acc[val] = (acc[val] || 0) + 1;
return acc;
- }, {all: messages.length});
+ }, {all: combinedMessages.length});
this.reporting.reportInteraction('messages-count', tagsCounted);
}
}
- _computeNumMessagesText(visibleMessages, messages,
- hideAutomated) {
- const total =
- this._numRemaining(visibleMessages, messages, hideAutomated);
- return total === 1 ? 'Show 1 message' : 'Show all ' + total + ' messages';
- }
-
- _computeIncrementHidden(visibleMessages, messages,
- hideAutomated) {
- const total =
- this._numRemaining(visibleMessages, messages, hideAutomated);
- return total <= this._getDelta(visibleMessages, messages, hideAutomated);
- }
-
/**
* Compute a mapping from label name to objects representing the minimum and
* maximum possible values for that label.
@@ -468,9 +424,10 @@
/**
* Work around a issue on iOS when clicking turns into double tap
*/
- _onTapHideAutomated(e) {
+ _onTapShowAllActivityToggle(e) {
e.preventDefault();
}
}
-customElements.define(GrMessagesList.is, GrMessagesList);
+customElements.define(GrMessagesList.is,
+ GrMessagesList);
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_html.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_html.js
index 2636a54..c696c8c 100644
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_html.js
+++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_html.js
@@ -18,8 +18,7 @@
export const htmlTemplate = html`
<style include="shared-styles">
- :host,
- .messageListControls {
+ :host {
display: flex;
justify-content: space-between;
}
@@ -31,9 +30,6 @@
justify-content: space-between;
padding: var(--spacing-s) var(--spacing-l);
}
- #messageControlsContainer {
- padding: 0 var(--spacing-l);
- }
.highlighted {
animation: 3s fadeOut;
}
@@ -45,47 +41,42 @@
background-color: var(--view-background-color);
}
}
- #messageControlsContainer {
- align-items: center;
- background-color: var(--background-color-secondary);
- border-bottom: 1px solid var(--border-color);
- display: flex;
- height: 2.25em;
- justify-content: center;
- }
- #messageControlsContainer gr-button {
- padding: var(--spacing-s) 0;
- }
.container {
align-items: center;
display: flex;
}
+ .hiddenEntries {
+ color: var(--deemphasized-text-color);
+ }
gr-message:not(:last-of-type) {
border-bottom: 1px solid var(--border-color);
}
- gr-message:nth-child(2n) {
+ gr-message {
background-color: var(--background-color-secondary);
}
- gr-message:nth-child(2n + 1) {
- background-color: var(--background-color-tertiary);
- }
</style>
<div class="header">
- <span
- id="automatedMessageToggleContainer"
- class="container"
- hidden$="[[!_hasAutomatedMessages(messages)]]"
- >
- <paper-toggle-button
- id="automatedMessageToggle"
- checked="{{_hideAutomated}}"
- aria-labelledby="onlyCommentsLabel"
- role="switch"
- on-tap="_onTapHideAutomated"
- ></paper-toggle-button>
- <span id="onlyCommentsLabel">Only comments</span>
- <span class="transparent separator"></span>
- </span>
+ <div id="showAllActivityToggleContainer" class="container">
+ <template
+ is="dom-if"
+ if="[[_isVisibleShowAllActivityToggle(_combinedMessages)]]"
+ >
+ <paper-toggle-button
+ class="showAllActivityToggle"
+ checked="{{_showAllActivity}}"
+ aria-labelledby="showAllEntriesLabel"
+ role="switch"
+ on-tap="_onTapShowAllActivityToggle"
+ ></paper-toggle-button>
+ <div id="showAllEntriesLabel">
+ <span>Show all entries</span>
+ <span class="hiddenEntries" hidden$="[[_showAllActivity]]">
+ ([[_computeHiddenEntriesCount(_combinedMessages)]] hidden)
+ </span>
+ </div>
+ <span class="transparent separator"></span>
+ </template>
+ </div>
<gr-button
id="collapse-messages"
link=""
@@ -95,35 +86,17 @@
[[_expandAllState]]
</gr-button>
</div>
- <span
- id="messageControlsContainer"
- hidden$="[[_computeShowHideTextHidden(_visibleMessages, _processedMessages, _hideAutomated, _visibleMessages.length)]]"
+ <template
+ id="messageRepeat"
+ is="dom-repeat"
+ items="[[_combinedMessages]]"
+ as="message"
+ filter="_isMessageVisible"
>
- <gr-button id="oldMessagesBtn" link="" on-click="_handleShowAllTap">
- [[_computeNumMessagesText(_visibleMessages, _processedMessages,
- _hideAutomated, _visibleMessages.length)]]
- </gr-button>
- <span
- class="container"
- hidden$="[[_computeIncrementHidden(_visibleMessages, _processedMessages, _hideAutomated, _visibleMessages.length)]]"
- >
- <span class="transparent separator"></span>
- <gr-button
- id="incrementMessagesBtn"
- link=""
- on-click="_handleIncrementShownMessages"
- >
- [[_computeIncrementText(_visibleMessages, _processedMessages,
- _hideAutomated, _visibleMessages.length)]]
- </gr-button>
- </span>
- </span>
- <template is="dom-repeat" items="[[_visibleMessages]]" as="message">
<gr-message
+ change="[[change]]"
change-num="[[changeNum]]"
message="[[message]]"
- comments="[[_computeCommentsForMessage(changeComments, message)]]"
- hide-automated="[[_hideAutomated]]"
project-name="[[projectName]]"
show-reply-button="[[showReplyButtons]]"
on-message-anchor-tap="_handleAnchorClick"
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.js
index 4f05dfc..c3245fe 100644
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.js
+++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.js
@@ -1,7 +1,6 @@
-import {createCommentApiMockWithTemplateElement} from '../../../test/mocks/comment-api';
/**
* @license
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,8 +18,10 @@
import '../../../test/common-test-setup-karma.js';
import '../../diff/gr-comment-api/gr-comment-api.js';
import './gr-messages-list.js';
-import '../../../test/mocks/comment-api.js';
+import {createCommentApiMockWithTemplateElement} from '../../../test/mocks/comment-api.js';
import {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';
+import {TEST_ONLY} from './gr-messages-list.js';
+import {MessageTag} from '../../../constants/constants.js';
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
createCommentApiMockWithTemplateElement(
@@ -50,40 +51,15 @@
message: params.message || Math.random().toString(),
_revision_number: params._revision_number || 1,
author: params.author || author1,
+ tag: params.tag,
};
};
-const randomAutomated = function(opt_params) {
- return Object.assign({tag: 'autogenerated:gerrit:replace'},
- randomMessage(opt_params));
-};
-
function generateRandomMessages(count) {
return new Array(count).fill()
.map(() => randomMessage());
}
-function generateRandomAutomatedMessages(count) {
- return new Array(count).fill()
- .map(() => randomAutomated());
-}
-
-// Returns a shuffled copy of array
-export function shuffle(arr) {
- const result = [];
- for (const item of arr) {
- // Random number in the interval [0..array.length]
- const j = Math.floor(Math.random() * (arr.length + 1));
- if (j < result.length) {
- result.push(result[j]);
- result[j] = item;
- } else {
- result.push(item);
- }
- }
- return result;
-}
-
suite('gr-messages-list tests', () => {
let element;
let messages;
@@ -94,54 +70,63 @@
return dom(element.root).querySelectorAll('gr-message');
};
+ const MESSAGE_ID_0 = '1234ccc949c6d482b061be6a28e10782abf0e7af';
+ const MESSAGE_ID_1 = '8c19ccc949c6d482b061be6a28e10782abf0e7af';
+ const MESSAGE_ID_2 = 'e7bfdbc842f6b6d8064bc68e0f52b673f40c0ca5';
+
const author = {
_account_id: 42,
name: 'Marvin the Paranoid Android',
email: 'marvin@sirius.org',
};
+ const createComment = function() {
+ return {
+ id: '1a2b3c4d',
+ message: 'some random test text',
+ change_message_id: '8a7b6c5d',
+ updated: '2016-01-01 01:02:03.000000000',
+ line: 1,
+ patch_set: 1,
+ author,
+ };
+ };
+
const comments = {
file1: [
{
- message: 'message text',
- updated: '2016-09-27 00:18:03.000000000',
+ ...createComment(),
+ change_message_id: MESSAGE_ID_0,
in_reply_to: '6505d749_f0bec0aa',
- line: 62,
- id: '6505d749_10ed44b2',
- patch_set: 2,
author: {
email: 'some@email.com',
_account_id: 123,
},
},
{
- message: 'message text',
- updated: '2016-09-27 00:18:03.000000000',
+ ...createComment(),
+ id: '2b3c4d5e',
+ change_message_id: MESSAGE_ID_1,
in_reply_to: 'c5912363_6b820105',
- line: 42,
- id: '450a935e_0f1c05db',
- patch_set: 2,
- author,
},
{
- message: 'message text',
- updated: '2016-09-27 00:18:03.000000000',
+ ...createComment(),
+ id: '2b3c4d5e',
+ change_message_id: MESSAGE_ID_1,
in_reply_to: '6505d749_f0bec0aa',
- line: 62,
- id: '6505d749_10ed44b2',
- patch_set: 2,
- author,
+ },
+ {
+ ...createComment(),
+ id: '34ed05d749_10ed44b2',
+ change_message_id: MESSAGE_ID_2,
},
],
file2: [
{
- message: 'message text',
- updated: '2016-09-27 00:18:03.000000000',
+ ...createComment(),
+ change_message_id: MESSAGE_ID_1,
in_reply_to: 'c5912363_4b7d450a',
- line: 132,
id: '450a935e_4f260d25',
- patch_set: 2,
- author,
},
],
};
@@ -168,126 +153,6 @@
return commentApiWrapper.loadComments();
});
- test('show some old messages', () => {
- assert.isTrue(element.$.messageControlsContainer.hasAttribute('hidden'));
- element.messages = generateRandomMessages(26);
- flushAsynchronousOperations();
-
- assert.isFalse(element.$.messageControlsContainer.hasAttribute('hidden'));
- assert.equal(getMessages().length, 20);
- assert.equal(element.$.incrementMessagesBtn.innerText.toUpperCase()
- .trim(), 'SHOW 5 MORE');
- MockInteractions.tap(element.$.incrementMessagesBtn);
- flushAsynchronousOperations();
-
- assert.equal(getMessages().length, 25);
- assert.equal(element.$.incrementMessagesBtn.innerText.toUpperCase()
- .trim(), 'SHOW 1 MORE');
- MockInteractions.tap(element.$.incrementMessagesBtn);
- flushAsynchronousOperations();
-
- assert.isTrue(element.$.messageControlsContainer.hasAttribute('hidden'));
- assert.equal(getMessages().length, 26);
- });
-
- test('show all old messages', () => {
- assert.isTrue(element.$.messageControlsContainer.hasAttribute('hidden'));
- element.messages = generateRandomMessages(26);
- flushAsynchronousOperations();
-
- assert.isFalse(element.$.messageControlsContainer.hasAttribute('hidden'));
- assert.equal(getMessages().length, 20);
- assert.equal(element.$.oldMessagesBtn.innerText.toUpperCase(),
- 'SHOW ALL 6 MESSAGES');
- MockInteractions.tap(element.$.oldMessagesBtn);
- flushAsynchronousOperations();
-
- assert.equal(getMessages().length, 26);
- assert.isTrue(element.$.messageControlsContainer.hasAttribute('hidden'));
- });
-
- test('message count respects automated', () => {
- element.messages = generateRandomAutomatedMessages(10)
- .concat(generateRandomMessages(11));
- flushAsynchronousOperations();
-
- assert.equal(element.$.oldMessagesBtn.innerText.toUpperCase(),
- 'SHOW 1 MESSAGE');
- assert.isFalse(element.$.messageControlsContainer.hasAttribute('hidden'));
- MockInteractions.tap(element.$.automatedMessageToggle);
- flushAsynchronousOperations();
-
- assert.isTrue(element.$.messageControlsContainer.hasAttribute('hidden'));
- });
-
- test('message count still respects non-automated on toggle', () => {
- element.messages = generateRandomMessages(10)
- .concat(generateRandomAutomatedMessages(11));
- flushAsynchronousOperations();
-
- assert.equal(element.$.oldMessagesBtn.innerText.toUpperCase(),
- 'SHOW 1 MESSAGE');
- assert.isFalse(element.$.messageControlsContainer.hasAttribute('hidden'));
- MockInteractions.tap(element.$.automatedMessageToggle);
- flushAsynchronousOperations();
-
- assert.equal(element.$.oldMessagesBtn.innerText.toUpperCase(),
- 'SHOW 1 MESSAGE');
- assert.isFalse(element.$.messageControlsContainer.hasAttribute('hidden'));
- });
-
- test('show all messages respects expand', () => {
- element.messages = generateRandomAutomatedMessages(10)
- .concat(generateRandomMessages(11));
- flushAsynchronousOperations();
-
- MockInteractions.tap(element.shadowRoot
- .querySelector('#collapse-messages')); // Expand all.
- flushAsynchronousOperations();
-
- let messages = getMessages();
- assert.equal(messages.length, 20);
- for (const message of messages) {
- assert.isTrue(message._expanded);
- }
-
- MockInteractions.tap(element.$.oldMessagesBtn);
- flushAsynchronousOperations();
-
- messages = getMessages();
- assert.equal(messages.length, 21);
- for (const message of messages) {
- assert.isTrue(message._expanded);
- }
- });
-
- test('show all messages respects collapse', () => {
- element.messages = generateRandomAutomatedMessages(10)
- .concat(generateRandomMessages(11));
- flushAsynchronousOperations();
-
- MockInteractions.tap(element.shadowRoot
- .querySelector('#collapse-messages')); // Expand all.
- MockInteractions.tap(element.shadowRoot
- .querySelector('#collapse-messages')); // Collapse all.
- flushAsynchronousOperations();
-
- let messages = getMessages();
- assert.equal(messages.length, 20);
- for (const message of messages) {
- assert.isFalse(message._expanded);
- }
-
- MockInteractions.tap(element.$.oldMessagesBtn);
- flushAsynchronousOperations();
-
- messages = getMessages();
- assert.equal(messages.length, 21);
- for (const message of messages) {
- assert.isFalse(message._expanded);
- }
- });
-
test('expand/collapse all', () => {
let allMessageEls = getMessages();
for (const message of allMessageEls) {
@@ -329,9 +194,11 @@
assert.isTrue([...getMessages()].filter(m => m._expanded).length == 0);
});
- test('hide messages does not appear when no automated messages', () => {
+ test('showAllActivity does not appear when all msgs are important', () => {
assert.isOk(element.shadowRoot
- .querySelector('#automatedMessageToggleContainer[hidden]'));
+ .querySelector('#showAllActivityToggleContainer'));
+ assert.isNotOk(element.shadowRoot
+ .querySelector('.showAllActivityToggle'));
});
test('scroll to message', () => {
@@ -373,14 +240,13 @@
element.scrollToMessage(messageID);
assert.isTrue(scrollToStub.calledOnce);
assert.isTrue(highlightStub.calledOnce);
- assert.equal(element._visibleMessages.length, 24);
assert.isTrue(
element.shadowRoot
.querySelector('[data-message-id="' + messageID + '"]')
._expanded);
});
- test('messages', () => {
+ test('associating messages with comments', () => {
const messages = [].concat(
randomMessage(),
{
@@ -401,26 +267,156 @@
}
);
element.messages = messages;
- const isAuthor = function(author, message) {
- return message.author._account_id === author._account_id;
- };
- const isMarvin = isAuthor.bind(null, author);
flushAsynchronousOperations();
const messageElements = getMessages();
assert.equal(messageElements.length, messages.length);
assert.deepEqual(messageElements[1].message, messages[1]);
assert.deepEqual(messageElements[2].message, messages[2]);
- assert.deepEqual(messageElements[1].comments.file1,
- comments.file1.filter(isMarvin).map(c => {
- return {...c,
- path: 'file1'};
- }));
- assert.deepEqual(messageElements[1].comments.file2,
- comments.file2.filter(isMarvin).map(c => {
- return {...c,
- path: 'file2'};
- }));
- assert.deepEqual(messageElements[2].comments, {});
+ });
+
+ test('threads', () => {
+ const messages = [
+ {
+ _index: 5,
+ _revision_number: 4,
+ message: 'Uploaded patch set 4.',
+ date: '2016-09-28 13:36:33.000000000',
+ author,
+ id: '8c19ccc949c6d482b061be6a28e10782abf0e7af',
+ },
+ ];
+ element.messages = messages;
+ flushAsynchronousOperations();
+ const messageElements = getMessages();
+ // threads
+ assert.equal(
+ messageElements[0].message.commentThreads.length,
+ 3);
+ // first thread contains 1 comment
+ assert.equal(
+ messageElements[0].message.commentThreads[0].comments.length,
+ 1);
+ });
+
+ test('updateTag human message', () => {
+ const m = randomMessage();
+ assert.equal(TEST_ONLY.computeTag(m), undefined);
+ });
+
+ test('updateTag nothing to change', () => {
+ const m = randomMessage();
+ const tag = 'something-normal';
+ m.tag = tag;
+ assert.equal(TEST_ONLY.computeTag(m), tag);
+ });
+
+ test('updateTag TAG_NEW_WIP_PATCHSET', () => {
+ const m = randomMessage();
+ m.tag = MessageTag.TAG_NEW_WIP_PATCHSET;
+ assert.equal(TEST_ONLY.computeTag(m), MessageTag.TAG_NEW_PATCHSET);
+ });
+
+ test('updateTag remove postfix', () => {
+ const m = randomMessage();
+ m.tag = 'something~withpostfix';
+ assert.equal(TEST_ONLY.computeTag(m), 'something');
+ });
+
+ test('updateTag with robot comments', () => {
+ const m = randomMessage();
+ m.commentThreads = [{
+ comments: [{
+ robot_id: 'id314',
+ change_message_id: m.id,
+ }],
+ }];
+ assert.notEqual(TEST_ONLY.computeTag(m), undefined);
+ });
+
+ test('setRevisionNumber nothing to change', () => {
+ const m1 = randomMessage();
+ const m2 = randomMessage();
+ assert.equal(TEST_ONLY.computeRevision(m1, [m1, m2]), 1);
+ assert.equal(TEST_ONLY.computeRevision(m2, [m1, m2]), 1);
+ });
+
+ test('setRevisionNumber reviewer updates', () => {
+ const m1 = randomMessage(
+ {
+ tag: MessageTag.TAG_REVIEWER_UPDATE,
+ date: '2020-01-01 10:00:00.000000000',
+ });
+ m1._revision_number = undefined;
+ const m2 = randomMessage(
+ {
+ date: '2020-01-02 10:00:00.000000000',
+ });
+ m2._revision_number = 1;
+ const m3 = randomMessage(
+ {
+ tag: MessageTag.TAG_REVIEWER_UPDATE,
+ date: '2020-01-03 10:00:00.000000000',
+ });
+ m3._revision_number = undefined;
+ const m4 = randomMessage(
+ {
+ date: '2020-01-04 10:00:00.000000000',
+ });
+ m4._revision_number = 2;
+ const m5 = randomMessage(
+ {
+ tag: MessageTag.TAG_REVIEWER_UPDATE,
+ date: '2020-01-05 10:00:00.000000000',
+ });
+ m5._revision_number = undefined;
+ const allMessages = [m1, m2, m3, m4, m5];
+ assert.equal(TEST_ONLY.computeRevision(m1, allMessages), undefined);
+ assert.equal(TEST_ONLY.computeRevision(m2, allMessages), 1);
+ assert.equal(TEST_ONLY.computeRevision(m3, allMessages), 1);
+ assert.equal(TEST_ONLY.computeRevision(m4, allMessages), 2);
+ assert.equal(TEST_ONLY.computeRevision(m5, allMessages), 2);
+ });
+
+ test('isImportant human message', () => {
+ const m = randomMessage();
+ assert.isTrue(TEST_ONLY.computeIsImportant(m, []));
+ assert.isTrue(TEST_ONLY.computeIsImportant(m, [m]));
+ });
+
+ test('isImportant even with a tag', () => {
+ const m1 = randomMessage();
+ const m2 = randomMessage({tag: 'autogenerated:gerrit1'});
+ const m3 = randomMessage({tag: 'autogenerated:gerrit2'});
+ assert.isTrue(TEST_ONLY.computeIsImportant(m2, []));
+ assert.isTrue(TEST_ONLY.computeIsImportant(m1, [m1, m2, m3]));
+ assert.isTrue(TEST_ONLY.computeIsImportant(m2, [m1, m2, m3]));
+ assert.isTrue(TEST_ONLY.computeIsImportant(m3, [m1, m2, m3]));
+ });
+
+ test('isImportant filters same tag and older revision', () => {
+ const m1 = randomMessage({tag: 'auto', _revision_number: 2});
+ const m2 = randomMessage({tag: 'auto', _revision_number: 1});
+ const m3 = randomMessage({tag: 'auto'});
+ assert.isTrue(TEST_ONLY.computeIsImportant(m1, [m1]));
+ assert.isTrue(TEST_ONLY.computeIsImportant(m2, [m2]));
+ assert.isTrue(TEST_ONLY.computeIsImportant(m1, [m1, m2]));
+ assert.isFalse(TEST_ONLY.computeIsImportant(m2, [m1, m2]));
+ assert.isTrue(TEST_ONLY.computeIsImportant(m1, [m1, m3]));
+ assert.isFalse(TEST_ONLY.computeIsImportant(m3, [m1, m3]));
+ assert.isTrue(TEST_ONLY.computeIsImportant(m1, [m1, m2, m3]));
+ assert.isFalse(TEST_ONLY.computeIsImportant(m2, [m1, m2, m3]));
+ assert.isFalse(TEST_ONLY.computeIsImportant(m3, [m1, m2, m3]));
+ });
+
+ test('isImportant is evaluated after tag update', () => {
+ const m1 = randomMessage(
+ {tag: MessageTag.TAG_NEW_PATCHSET, _revision_number: 1});
+ const m2 = randomMessage(
+ {tag: MessageTag.TAG_NEW_WIP_PATCHSET, _revision_number: 2});
+ element.messages = [m1, m2];
+ flushAsynchronousOperations();
+ assert.isFalse(m1.isImportant);
+ assert.isTrue(m2.isImportant);
});
test('messages without author do not throw', () => {
@@ -437,18 +433,6 @@
assert.equal(messageEls.length, 1);
assert.equal(messageEls[0].message.message, messages[0].message);
});
-
- test('hide increment text if increment >= total remaining', () => {
- // Test with stubbed return values, as _numRemaining and _getDelta have
- // their own tests.
- sinon.stub(element, '_getDelta').returns(5);
- const remainingStub = sinon.stub(element, '_numRemaining').returns(6);
- assert.isFalse(element._computeIncrementHidden(null, null, null));
- remainingStub.restore();
-
- sinon.stub(element, '_numRemaining').returns(4);
- assert.isTrue(element._computeIncrementHidden(null, null, null));
- });
});
suite('gr-messages-list automate tests', () => {
@@ -457,18 +441,6 @@
let commentApiWrapper;
- const getMessages = function() {
- return dom(element.root).querySelectorAll('gr-message');
- };
- const getHiddenMessages = function() {
- return dom(element.root).querySelectorAll('gr-message[hidden]');
- };
-
- const randomMessageReviewer = {
- reviewer: {},
- date: '2016-01-13 20:30:33.038000',
- };
-
setup(() => {
stub('gr-rest-api-interface', {
getConfig() { return Promise.resolve({}); },
@@ -478,8 +450,11 @@
getDiffDrafts() { return Promise.resolve({}); },
});
- messages = generateRandomAutomatedMessages(2);
- messages.push(randomMessageReviewer);
+ messages = [
+ randomMessage(),
+ randomMessage({tag: 'auto', _revision_number: 2}),
+ randomMessage({tag: 'auto', _revision_number: 3}),
+ ];
// Element must be wrapped in an element with direct access to the
// comment API.
@@ -494,89 +469,33 @@
});
test('hide autogenerated button is not hidden', () => {
- assert.isNotOk(element.shadowRoot
- .querySelector('#automatedMessageToggle[hidden]'));
+ const toggle = dom(element.root).querySelector('.showAllActivityToggle');
+ assert.isOk(toggle);
});
- test('autogenerated messages are not hidden initially', () => {
- const allHiddenMessageEls = getHiddenMessages();
-
- // There are no hidden messages.
- assert.isFalse(!!allHiddenMessageEls.length);
+ test('one unimportant message is hidden initially', () => {
+ const displayedMsgs = dom(element.root).querySelectorAll('gr-message');
+ assert.equal(displayedMsgs.length, 2);
});
- test('autogenerated messages hidden after comments only toggle', () => {
- let allHiddenMessageEls = getHiddenMessages();
-
- element._hideAutomated = false;
- MockInteractions.tap(element.$.automatedMessageToggle);
+ test('unimportant messages hidden after toggle', () => {
+ element._showAllActivity = true;
+ const toggle = dom(element.root).querySelector('.showAllActivityToggle');
+ assert.isOk(toggle);
+ MockInteractions.tap(toggle);
flushAsynchronousOperations();
- const allMessageEls = getMessages();
- allHiddenMessageEls = getHiddenMessages();
-
- // Autogenerated messages are now hidden.
- assert.equal(allHiddenMessageEls.length, allMessageEls.length);
+ const displayedMsgs = dom(element.root).querySelectorAll('gr-message');
+ assert.equal(displayedMsgs.length, 2);
});
- test('autogenerated messages not hidden after comments only toggle',
- () => {
- let allHiddenMessageEls = getHiddenMessages();
-
- element._hideAutomated = true;
- MockInteractions.tap(element.$.automatedMessageToggle);
- allHiddenMessageEls = getHiddenMessages();
-
- // Autogenerated messages are now hidden.
- assert.isFalse(!!allHiddenMessageEls.length);
- });
-
- test('_getDelta', () => {
- let messages = [randomMessage()];
- assert.equal(element._getDelta([], messages, false), 1);
- assert.equal(element._getDelta([], messages, true), 1);
-
- messages = generateRandomMessages(7);
- assert.equal(element._getDelta([], messages, false), 5);
- assert.equal(element._getDelta([], messages, true), 5);
-
- messages = generateRandomMessages(4)
- .concat(generateRandomAutomatedMessages(2))
- .concat(generateRandomMessages(3));
-
- const dummyArr = generateRandomMessages(2);
- assert.equal(element._getDelta(dummyArr, messages, false), 5);
- assert.equal(element._getDelta(dummyArr, messages, true), 7);
- });
-
- test('_getHumanMessages', () => {
- assert.equal(
- element._getHumanMessages(
- generateRandomAutomatedMessages(5)).length, 0);
- assert.equal(
- element._getHumanMessages(generateRandomMessages(5)).length, 5);
-
- let messages = shuffle(generateRandomMessages(5)
- .concat(generateRandomAutomatedMessages(5)));
- messages = element._getHumanMessages(messages);
- assert.equal(messages.length, 5);
- assert.isFalse(element._hasAutomatedMessages(messages));
- });
-
- test('initially show only 20 messages', () => {
- sinon.stub(element.reporting, 'reportInteraction').callsFake(
- (eventName, details) => {
- assert.equal(typeof(eventName), 'string');
- if (details) {
- assert.equal(typeof(details), 'object');
- }
- });
- const messages = Array.from(Array(23).keys())
- .map(() => {
- return {};
- });
- element._processedMessagesChanged(messages);
-
- assert.equal(element._visibleMessages.length, 20);
+ test('unimportant messages shown after toggle', () => {
+ element._showAllActivity = false;
+ const toggle = dom(element.root).querySelector('.showAllActivityToggle');
+ assert.isOk(toggle);
+ MockInteractions.tap(toggle);
+ flushAsynchronousOperations();
+ const displayedMsgs = dom(element.root).querySelectorAll('gr-message');
+ assert.equal(displayedMsgs.length, 3);
});
test('_computeLabelExtremes', () => {
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js
index f3c31aa..b5d40d2 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js
@@ -28,7 +28,6 @@
import '../gr-label-scores/gr-label-scores.js';
import '../gr-thread-list/gr-thread-list.js';
import '../../../styles/shared-styles.js';
-import '../gr-comment-list/gr-comment-list.js';
import {mixinBehaviors} from '@polymer/polymer/lib/legacy/class.js';
import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
import {LegacyElementMixin} from '@polymer/polymer/lib/legacy/legacy-element-mixin.js';
@@ -546,13 +545,19 @@
reviewInput.add_to_attention_set = [];
for (const user of this._newAttentionSet) {
if (!this._currentAttentionSet.has(user)) {
- reviewInput.add_to_attention_set.push(user);
+ reviewInput.add_to_attention_set.push({
+ user,
+ reason: 'manually added in reply dialog',
+ });
}
}
reviewInput.remove_from_attention_set = [];
for (const user of this._currentAttentionSet) {
if (!this._newAttentionSet.has(user)) {
- reviewInput.remove_from_attention_set.push(user);
+ reviewInput.remove_from_attention_set.push({
+ user,
+ reason: 'manually removed in reply dialog',
+ });
}
}
}
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.js b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.js
index 4c65298..456adb5 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.js
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.js
@@ -181,13 +181,17 @@
});
test('modified attention set', done => {
+ element._newAttentionSet = new Set([314]);
const buttonEl = element.shadowRoot.querySelector('.edit-attention-button');
MockInteractions.tap(buttonEl);
flushAsynchronousOperations();
stubSaveReview(review => {
assert.isTrue(review.ignore_default_attention_set_rules);
- assert.deepEqual(review.add_to_attention_set, []);
+ assert.deepEqual(review.add_to_attention_set, [{
+ user: 314,
+ reason: 'manually added in reply dialog',
+ }]);
assert.deepEqual(review.remove_from_attention_set, []);
done();
});
diff --git a/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.js b/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.js
index 24438eb..2f32706 100644
--- a/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.js
+++ b/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.js
@@ -471,11 +471,12 @@
* @param {{ _number: number, project: string }} change The change object.
* @param {string} path The file path.
* @param {number=} opt_patchNum
+ * @param {number=} opt_lineNum
* @return {string}
*/
- getEditUrlForDiff(change, path, opt_patchNum) {
+ getEditUrlForDiff(change, path, opt_patchNum, opt_lineNum) {
return this.getEditUrlForDiffById(change._number, change.project, path,
- opt_patchNum);
+ opt_patchNum, opt_lineNum);
},
/**
@@ -484,15 +485,17 @@
* @param {string} path The file path.
* @param {number|string=} opt_patchNum The patchNum the file content
* should be based on, or ${EDIT_PATCHNUM} if left undefined.
+ * @param {number=} opt_lineNum The line number to pass to the inline editor.
* @return {string}
*/
- getEditUrlForDiffById(changeNum, project, path, opt_patchNum) {
+ getEditUrlForDiffById(changeNum, project, path, opt_patchNum, opt_lineNum) {
return this._getUrlFor({
view: GerritNav.View.EDIT,
changeNum,
project,
path,
patchNum: opt_patchNum || EDIT_PATCHNUM,
+ lineNum: opt_lineNum,
});
},
diff --git a/polygerrit-ui/app/elements/core/gr-router/gr-router.js b/polygerrit-ui/app/elements/core/gr-router/gr-router.js
index c1cf169..b60f47e 100644
--- a/polygerrit-ui/app/elements/core/gr-router/gr-router.js
+++ b/polygerrit-ui/app/elements/core/gr-router/gr-router.js
@@ -331,7 +331,7 @@
}
_firstCodeBrowserWeblink(weblinks) {
- // This is an ordered whitelist of web link types that provide direct
+ // This is an ordered allowed list of web link types that provide direct
// links to the commit in the url property.
const codeBrowserLinks = ['gitiles', 'browse', 'gitweb'];
for (let i = 0; i < codeBrowserLinks.length; i++) {
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
index 33f7cc5..ad72ee1 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
@@ -677,10 +677,12 @@
_goToEditFile() {
// TODO(taoalpha): add a shortcut for editing
+ const cursorAddress = this.$.cursor.getAddress();
const editUrl = GerritNav.getEditUrlForDiff(
this._change,
this._path,
- this._patchRange.patchNum
+ this._patchRange.patchNum,
+ cursorAddress && cursorAddress.number
);
return GerritNav.navigateToRelativeUrl(editUrl);
}
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.js b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.js
index 73e6f0c..8646336 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.js
@@ -507,6 +507,43 @@
});
});
+ test('edit should redirect to edit page with line number', done => {
+ const lineNumber = 42;
+ element._loggedIn = true;
+ element._path = 't.txt';
+ element._patchRange = {
+ basePatchNum: PARENT,
+ patchNum: '1',
+ };
+ element._change = {
+ _number: 42,
+ project: 'gerrit',
+ status: ChangeStatus.NEW,
+ revisions: {
+ a: {_number: 1, commit: {parents: []}},
+ b: {_number: 2, commit: {parents: []}},
+ },
+ };
+ sinon.stub(element.$.cursor, 'getAddress')
+ .returns({number: lineNumber, isLeftSide: false});
+ const redirectStub = sinon.stub(GerritNav, 'navigateToRelativeUrl');
+ flush(() => {
+ const editBtn = element.shadowRoot
+ .querySelector('.editButton gr-button');
+ assert.isTrue(!!editBtn);
+ MockInteractions.tap(editBtn);
+ assert.isTrue(redirectStub.called);
+ assert.isTrue(redirectStub.lastCall.calledWithExactly(
+ GerritNav.getEditUrlForDiff(
+ element._change,
+ element._path,
+ element._patchRange.patchNum,
+ lineNumber
+ )));
+ done();
+ });
+ });
+
function isEditVisibile({loggedIn, changeStatus}) {
return new Promise(resolve => {
element._loggedIn = loggedIn;
diff --git a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js
index 1a0bbd9..6399c4a 100644
--- a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js
+++ b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js
@@ -102,7 +102,7 @@
};
const ASYNC_DELAY = 10;
-const CLASS_WHITELIST = {
+const CLASS_SAFELIST = {
'gr-diff gr-syntax gr-syntax-attr': true,
'gr-diff gr-syntax gr-syntax-attribute': true,
'gr-diff gr-syntax gr-syntax-built_in': true,
@@ -365,7 +365,7 @@
// Note: HLJS may emit a span with class undefined when it thinks there
// may be a syntax error.
if (node.tagName === 'SPAN' && node.className !== 'undefined') {
- if (CLASS_WHITELIST.hasOwnProperty(node.className)) {
+ if (CLASS_SAFELIST.hasOwnProperty(node.className)) {
result.push({
start: offset,
length: nodeLength,
diff --git a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer_test.js b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer_test.js
index e83d4b64..03acfb5 100644
--- a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer_test.js
+++ b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer_test.js
@@ -276,11 +276,11 @@
assert.equal(result[0].className, className);
});
- test('_rangesFromElement non-whitelist', () => {
+ test('_rangesFromElement non-allowed', () => {
const str0 = 'Etiam ';
const str1 = 'dui, blandit';
const str2 = ' wisi.';
- const className = 'not-in-the-whitelist';
+ const className = 'not-in-the-safelist';
const offset = 100;
const elem = document.createElement('span');
@@ -363,7 +363,7 @@
assert.equal(result[1].className, className);
});
- test('_rangesFromString whitelist allows recursion', () => {
+ test('_rangesFromString safelist allows recursion', () => {
const str = [
'<span class="non-whtelisted-class">',
'<span class="gr-diff gr-syntax gr-syntax-keyword">public</span>',
diff --git a/polygerrit-ui/app/elements/gr-app.js b/polygerrit-ui/app/elements/gr-app.js
index e0e7fa9..ce925e1 100644
--- a/polygerrit-ui/app/elements/gr-app.js
+++ b/polygerrit-ui/app/elements/gr-app.js
@@ -15,6 +15,10 @@
* limitations under the License.
*/
+// We need to use goog.declareModuleId internally in google for TS-imports-JS
+// case. To avoid errors when goog is not available, the empty implementation is
+// added.
+window.goog = window.goog || {declareModuleId(name) {}};
import './gr-app-init.js';
import './font-roboto-local-loader.js';
// Sets up global Polymer variable, because plugins requires it.
diff --git a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js
index fa686da..eb68024 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js
+++ b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js
@@ -247,7 +247,7 @@
_computeDisplayPath(path) {
const displayPath = this.computeDisplayPath(path);
if (displayPath === SpecialFilePath.PATCHSET_LEVEL_COMMENTS) {
- return `Patchset ${this.patchNum}`;
+ return `Patchset`;
}
return displayPath;
}
diff --git a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.js b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.js
index 3837514..db5ade1 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.js
+++ b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.js
@@ -208,7 +208,7 @@
element.patchNum = '3';
path = SpecialFilePath.PATCHSET_LEVEL_COMMENTS;
- assert.equal(element._computeDisplayPath(path), 'Patchset 3');
+ assert.equal(element._computeDisplayPath(path), 'Patchset');
});
test('_computeDisplayLine', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js
index e792c4d..3c76ee1 100644
--- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js
+++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js
@@ -45,7 +45,7 @@
const CREATE_DRAFT_UNEXPECTED_STATUS_MESSAGE =
'Saving draft resulted in HTTP 200 (OK) but expected HTTP 201 (Created)';
-const HEADER_REPORTING_BLACKLIST = /^set-cookie$/i;
+const HEADER_REPORTING_BLOCK_REGEX = /^set-cookie$/i;
const ANONYMIZED_CHANGE_BASE_URL = '/changes/*~*';
const ANONYMIZED_REVISION_BASE_URL = ANONYMIZED_CHANGE_BASE_URL +
@@ -2804,7 +2804,7 @@
// Read the response headers into an object representation.
const headers = Array.from(result.headers.entries())
.reduce((obj, [key, val]) => {
- if (!HEADER_REPORTING_BLACKLIST.test(key)) {
+ if (!HEADER_REPORTING_BLOCK_REGEX.test(key)) {
obj[key] = val;
}
return obj;
diff --git a/polygerrit-ui/app/embed/gr-diff.js b/polygerrit-ui/app/embed/gr-diff.js
index 5907842..6050d69 100644
--- a/polygerrit-ui/app/embed/gr-diff.js
+++ b/polygerrit-ui/app/embed/gr-diff.js
@@ -16,6 +16,10 @@
*/
window.Gerrit = window.Gerrit || {};
+// We need to use goog.declareModuleId internally in google for TS-imports-JS
+// case. To avoid errors when goog is not available, the empty implementation is
+// added.
+window.goog = window.goog || {declareModuleId(name) {}};
// TODO(dmfilippov): remove bundled-polymer.js imports when the following issue
// https://github.com/Polymer/polymer-resin/issues/9 is resolved.
// Because gr-diff.js is a shared component, it shouldn' pollute global
diff --git a/polygerrit-ui/app/externs/BUILD b/polygerrit-ui/app/externs/BUILD
deleted file mode 100644
index 26ead9a..0000000
--- a/polygerrit-ui/app/externs/BUILD
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (C) 2018 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
-
-package(
- default_visibility = ["//visibility:public"],
-)
-
-closure_js_library(
- name = "plugin",
- srcs = ["plugin.js"],
- no_closure_library = True,
-)
diff --git a/polygerrit-ui/app/node_modules_licenses/tsconfig.json b/polygerrit-ui/app/node_modules_licenses/tsconfig.json
index 6f4254f..c562a0c 100644
--- a/polygerrit-ui/app/node_modules_licenses/tsconfig.json
+++ b/polygerrit-ui/app/node_modules_licenses/tsconfig.json
@@ -6,7 +6,7 @@
"esModuleInterop": true,
"strict": true,
"moduleResolution": "node",
- "outDir": "out",
+ "outDir": "../../../.ts-out/polygerrit-ui/node_modules_licenses", // Not used in bazel
"types": ["node"]
},
"include": ["**/*.ts"]
diff --git a/polygerrit-ui/app/polylint_test.sh b/polygerrit-ui/app/polylint_test.sh
index bc06c1c..0c7118d 100755
--- a/polygerrit-ui/app/polylint_test.sh
+++ b/polygerrit-ui/app/polylint_test.sh
@@ -5,7 +5,7 @@
DIR=$(pwd)
ln -s $RUNFILES_DIR/ui_npm/node_modules $TEST_TMPDIR/node_modules
cp $2 $TEST_TMPDIR/polymer.json
-cp -R -L polygerrit-ui/app/* $TEST_TMPDIR
+cp -R -L polygerrit-ui/app/_pg_ts_out/* $TEST_TMPDIR
#Can't use --root with polymer.json - see https://github.com/Polymer/tools/issues/2616
#Change current directory to the root folder
diff --git a/polygerrit-ui/app/rules.bzl b/polygerrit-ui/app/rules.bzl
index 1492ad8..74b9ac1 100644
--- a/polygerrit-ui/app/rules.bzl
+++ b/polygerrit-ui/app/rules.bzl
@@ -1,6 +1,71 @@
load("//tools/bzl:genrule2.bzl", "genrule2")
load("@npm_bazel_rollup//:index.bzl", "rollup_bundle")
+def _get_ts_compiled_path(outdir, file_name):
+ """Calculates the typescript output path for a file_name.
+
+ Args:
+ outdir: the typescript output directory (relative to polygerrit-ui/app/)
+ file_name: the original file name (relative to polygerrit-ui/app/)
+
+ Returns:
+ String - the path to the file produced by the typescript compiler
+ """
+ if file_name.endswith(".js"):
+ return outdir + "/" + file_name
+ if file_name.endswith(".ts"):
+ return outdir + "/" + file_name[:-2] + "js"
+ fail("The file " + file_name + " has unsupported extension")
+
+def _get_ts_output_files(outdir, srcs):
+ """Calculates the files paths produced by the typescript compiler
+
+ Args:
+ outdir: the typescript output directory (relative to polygerrit-ui/app/)
+ srcs: list of input files (all paths relative to polygerrit-ui/app/)
+
+ Returns:
+ List of strings
+ """
+ result = []
+ for f in srcs:
+ if f.endswith(".d.ts"):
+ continue
+ result.append(_get_ts_compiled_path(outdir, f))
+ return result
+
+def compile_ts(name, srcs, ts_outdir):
+ """Compiles srcs files with the typescript compiler
+
+ Args:
+ name: rule name
+ srcs: list of input files (.js, .d.ts and .ts)
+ ts_outdir: typescript output directory
+
+ Returns:
+ The list of compiled files
+ """
+ ts_rule_name = name + "_ts_compiled"
+
+ # List of files produced by the typescript compiler
+ generated_js = _get_ts_output_files(ts_outdir, srcs)
+
+ # Run the compiler
+ native.genrule(
+ name = ts_rule_name,
+ srcs = srcs + [
+ ":tsconfig.json",
+ "@ui_npm//:node_modules",
+ ],
+ outs = generated_js,
+ cmd = " && ".join([
+ "$(location //tools/node_tools:tsc-bin) --project $(location :tsconfig.json) --outdir $(RULEDIR)/" + ts_outdir + " --baseUrl ./external/ui_npm/node_modules",
+ ]),
+ tools = ["//tools/node_tools:tsc-bin"],
+ )
+
+ return generated_js
+
def polygerrit_bundle(name, srcs, outs, entry_point):
"""Build .zip bundle from source code
diff --git a/polygerrit-ui/app/services/flags.js b/polygerrit-ui/app/services/flags.js
index 64f0115..6313255 100644
--- a/polygerrit-ui/app/services/flags.js
+++ b/polygerrit-ui/app/services/flags.js
@@ -20,7 +20,6 @@
* @desc Experiment ids used in Gerrit.
*/
export const ExperimentIds = {
- CLEANER_CHANGELOG: 'UiFeature__cleaner_changelog',
PATCHSET_COMMENTS: 'UiFeature__patchset_comments',
};
diff --git a/polygerrit-ui/app/tsconfig.json b/polygerrit-ui/app/tsconfig.json
new file mode 100644
index 0000000..e45cbad
--- /dev/null
+++ b/polygerrit-ui/app/tsconfig.json
@@ -0,0 +1,61 @@
+{
+ "compilerOptions": {
+ /* Basic Options */
+ "target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
+ "module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
+ "allowJs": true, /* Allow javascript files to be compiled. */
+ "checkJs": false, /* Report errors in .js files. */
+ "declaration": false, /* Temporary disabled - generates corresponding '.d.ts' file. */
+ "declarationMap": false, /* Generates a sourcemap for each corresponding '.d.ts' file. */
+ "inlineSourceMap": true, /* Generates corresponding '.map' file. */
+ "outDir": "../../.ts-out/polygerrit-ui/app", /* Not used in bazel. Redirect output structure to the directory. */
+ "rootDir": ".", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
+ "removeComments": false, /* Emit comments to output*/
+
+ /* Strict Type-Checking Options */
+ "strict": true, /* Enable all strict type-checking options. */
+ "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
+ "strictNullChecks": true, /* Enable strict null checks. */
+ "strictFunctionTypes": true, /* Enable strict checking of function types. */
+ "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
+ "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
+ "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
+
+ /* Additional Checks */
+ "noUnusedLocals": true, /* Report errors on unused locals. */
+ "noUnusedParameters": true, /* Report errors on unused parameters. */
+ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
+ "noFallthroughCasesInSwitch": true,/* Report errors for fallthrough cases in switch statement. */
+
+ "skipLibCheck": true, /* Do not check node_modules */
+
+ /* Module Resolution Options */
+ "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
+ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
+ "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
+
+ /* Advanced Options */
+ "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
+ "incremental": true
+ },
+ // With the * pattern (without an extension), only supported files
+ // are included. The supported files are .ts, .tsx, .d.ts.
+ // If allowJs is set to true, .js and .jsx files are included as well.
+ // Note: gerrit doesn't have .tsx and .jsx files
+ "include": [
+ // This items below must be in sync with the src_dirs list in the BUILD file
+ "behaviors/**/*",
+ "constants/**/*",
+ "elements/**/*",
+ "embed/**/*",
+ "gr-diff/**/*",
+ "samples/**/*",
+ "scripts/**/*",
+ "services/**/*",
+ "styles/**/*",
+ "types/**/*",
+ "utils/**/*",
+ // Directory for test utils (not included in src_dirs in the BUILD file)
+ "test/**/*"
+ ]
+}
diff --git a/polygerrit-ui/app/types/custom-externs.js b/polygerrit-ui/app/types/custom-externs.ts
similarity index 98%
rename from polygerrit-ui/app/types/custom-externs.js
rename to polygerrit-ui/app/types/custom-externs.ts
index bc95b3f..216900a 100644
--- a/polygerrit-ui/app/types/custom-externs.js
+++ b/polygerrit-ui/app/types/custom-externs.ts
@@ -28,7 +28,7 @@
/** @externs */
// @unused
-var Gerrit;
+var Gerrit: any;
var GrAnnotation;
var GrAttributeHelper;
var GrChangeActionsInterface;
@@ -59,4 +59,4 @@
var GrDisplayNameUtils;
var GrReviewerSuggestionsProvider;
var page;
-var util;
\ No newline at end of file
+var util;
diff --git a/polygerrit-ui/app/externs/plugin.js b/polygerrit-ui/app/types/globals.ts
similarity index 67%
copy from polygerrit-ui/app/externs/plugin.js
copy to polygerrit-ui/app/types/globals.ts
index c88c724..ac2ae7c 100644
--- a/polygerrit-ui/app/externs/plugin.js
+++ b/polygerrit-ui/app/types/globals.ts
@@ -1,6 +1,6 @@
/**
* @license
- * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,17 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+export {};
-/**
- * @fileoverview Closure compiler externs for the Gerrit UI plugins.
- * @externs
- */
-
-/* eslint-disable no-var */
-
-var Gerrit = {};
-
-/**
- * @param {!Function} callback
- */
-Gerrit.install = function(callback) {};
+declare global {
+ interface Window {
+ CANONICAL_PATH?: string;
+ }
+}
diff --git a/polygerrit-ui/karma.conf.js b/polygerrit-ui/karma.conf.js
index 744c234..8d302ef 100644
--- a/polygerrit-ui/karma.conf.js
+++ b/polygerrit-ui/karma.conf.js
@@ -44,8 +44,11 @@
}
module.exports = function(config) {
+ const localDirName = path.resolve(__dirname, '../.ts-out/polygerrit-ui/app');
+ const rootDir = runUnderBazel ?
+ 'polygerrit-ui/app/_pg_with_tests_out/' : localDirName + '/';
const testFilesLocationPattern =
- 'polygerrit-ui/app/**/!(template_test_srcs)/';
+ `${rootDir}**/!(template_test_srcs)/`;
// Use --test-files to specify pattern for a test files.
// It can be just a file name, without a path:
// --test-files async-foreach-behavior_test.js
diff --git a/polygerrit-ui/package.json b/polygerrit-ui/package.json
index ea039d5..6e85b77 100644
--- a/polygerrit-ui/package.json
+++ b/polygerrit-ui/package.json
@@ -4,7 +4,7 @@
"browser": true,
"dependencies": {},
"devDependencies": {
- "@open-wc/karma-esm": "^2.13.21",
+ "@open-wc/karma-esm": "^2.16.16",
"@polymer/iron-test-helpers": "^3.0.1",
"@polymer/test-fixture": "^4.0.2",
"accessibility-developer-tools": "^2.12.0",
diff --git a/polygerrit-ui/server.go b/polygerrit-ui/server.go
index c44493d..fc91632 100644
--- a/polygerrit-ui/server.go
+++ b/polygerrit-ui/server.go
@@ -29,9 +29,12 @@
"net/http"
"net/url"
"os"
+ "os/exec"
"path/filepath"
"regexp"
"strings"
+ "sync"
+ "time"
"golang.org/x/tools/godoc/vfs/httpfs"
"golang.org/x/tools/godoc/vfs/zipfs"
@@ -59,13 +62,30 @@
log.Fatal(err)
}
+ compiledSrcPath := filepath.Join(workspace, "./.ts-out/server-go")
+
+ tsInstance := newTypescriptInstance(
+ filepath.Join(workspace, "./node_modules/.bin/tsc"),
+ filepath.Join(workspace, "./polygerrit-ui/app/tsconfig.json"),
+ compiledSrcPath,
+ )
+
+ if err := tsInstance.StartWatch(); err != nil {
+ log.Fatal(err)
+ }
+
dirListingMux := http.NewServeMux()
dirListingMux.Handle("/styles/", http.StripPrefix("/styles/", http.FileServer(http.Dir("app/styles"))))
dirListingMux.Handle("/samples/", http.StripPrefix("/samples/", http.FileServer(http.Dir("app/samples"))))
dirListingMux.Handle("/elements/", http.StripPrefix("/elements/", http.FileServer(http.Dir("app/elements"))))
dirListingMux.Handle("/behaviors/", http.StripPrefix("/behaviors/", http.FileServer(http.Dir("app/behaviors"))))
- http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { handleSrcRequest(dirListingMux, w, req) })
+ http.HandleFunc("/",
+ func(w http.ResponseWriter, req *http.Request) {
+ // If typescript compiler hasn't finished yet, wait for it
+ tsInstance.WaitForCompilationComplete()
+ handleSrcRequest(compiledSrcPath, dirListingMux, w, req)
+ })
http.Handle("/fonts/",
addDevHeadersMiddleware(http.FileServer(httpfs.New(zipfs.New(fontsArchive, "fonts")))))
@@ -105,7 +125,7 @@
}
-func handleSrcRequest(dirListingMux *http.ServeMux, writer http.ResponseWriter, originalRequest *http.Request) {
+func handleSrcRequest(compiledSrcPath string, dirListingMux *http.ServeMux, writer http.ResponseWriter, originalRequest *http.Request) {
parsedUrl, err := url.Parse(originalRequest.RequestURI)
if err != nil {
writer.WriteHeader(500)
@@ -123,16 +143,30 @@
}
isJsFile := strings.HasSuffix(normalizedContentPath, ".js") || strings.HasSuffix(normalizedContentPath, ".mjs")
- data, err := getContent(normalizedContentPath)
+ isTsFile := strings.HasSuffix(normalizedContentPath, ".ts")
+
+ // Source map in a compiled js file point to a file inside /app/... directory
+ // Browser tries to load original file from the directory when debugger is
+ // activated. In this case we return original content without any processing
+ isOriginalFileRequest := strings.HasPrefix(normalizedContentPath, "/polygerrit-ui/app/") && (isTsFile || isJsFile)
+
+ data, err := getContent(compiledSrcPath, normalizedContentPath, isOriginalFileRequest)
if err != nil {
- data, err = getContent(normalizedContentPath + ".js")
+ if !isOriginalFileRequest {
+ data, err = getContent(compiledSrcPath, normalizedContentPath+".js", false)
+ }
if err != nil {
writer.WriteHeader(404)
return
}
isJsFile = true
}
- if isJsFile {
+ if isOriginalFileRequest {
+ // Explicitly set text/html Content-Type. If live code tries
+ // to import javascript from the /app/ folder accidentally, browser fails
+ // with the import error, so we can catch this problem easily.
+ writer.Header().Set("Content-Type", "text/html")
+ } else if isJsFile {
moduleImportRegexp := regexp.MustCompile("(?m)^(import.*)'([^/.].*)';$")
data = moduleImportRegexp.ReplaceAll(data, []byte("$1 '/node_modules/$2';"))
writer.Header().Set("Content-Type", "application/javascript")
@@ -150,9 +184,17 @@
writer.Write(data)
}
-func getContent(normalizedContentPath string) ([]byte, error) {
+func getContent(compiledSrcPath string, normalizedContentPath string, isOriginalFileRequest bool) ([]byte, error) {
// normalizedContentPath must always starts with '/'
+ if isOriginalFileRequest {
+ data, err := ioutil.ReadFile(normalizedContentPath[len("/polygerrit-ui/"):])
+ if err != nil {
+ return nil, errors.New("File not found")
+ }
+ return data, nil
+ }
+
// gerrit loads gr-app.js as an ordinary script, without type="module" attribute.
// If server.go serves this file as is, browser shows the error:
// Uncaught SyntaxError: Cannot use import statement outside a module
@@ -173,7 +215,7 @@
normalizedContentPath = "/elements/gr-app.js"
}
- pathsToTry := []string{"app" + normalizedContentPath}
+ pathsToTry := []string{compiledSrcPath + normalizedContentPath, "app" + normalizedContentPath}
bowerComponentsSuffix := "/bower_components/"
nodeModulesPrefix := "/node_modules/"
testComponentsPrefix := "/components/"
@@ -432,3 +474,93 @@
defer gzw.Close()
http.DefaultServeMux.ServeHTTP(gzw, r)
}
+
+// Typescript compiler support
+// The code below runs typescript compiler in watch mode and redirect
+// all output from the compiler to the standard logger with the prefix "TSC -"
+// Additionally, the code analyzes messages produced by the typescript compiler
+// and allows to wait until compilation is finished.
+var (
+ tsStartingCompilation = "- Starting compilation in watch mode..."
+ tsFileChangeDetectedMsg = "- File change detected. Starting incremental compilation..."
+ tsStartWatchingMsg = regexp.MustCompile(`^.* - Found \d errors\. Watching for file changes\.$`)
+ waitForNextChangeInterval = 1 * time.Second
+)
+
+type typescriptLogWriter struct {
+ logger *log.Logger
+ // when WaitGroup counter is 0 the compilation is complete
+ compilationDoneWaiter *sync.WaitGroup
+}
+
+func newTypescriptLogWriter(compilationCompleteWaiter *sync.WaitGroup) *typescriptLogWriter {
+ return &typescriptLogWriter{
+ logger: log.New(log.Writer(), "TSC - ", log.Flags()),
+ compilationDoneWaiter: compilationCompleteWaiter,
+ }
+}
+
+func (lw typescriptLogWriter) Write(p []byte) (n int, err error) {
+ text := strings.TrimSpace(string(p))
+ if strings.HasSuffix(text, tsFileChangeDetectedMsg) ||
+ strings.HasSuffix(text, tsStartingCompilation) {
+ lw.compilationDoneWaiter.Add(1)
+ }
+ if tsStartWatchingMsg.MatchString(text) {
+ // A source code can be changed while previous compiler run is in progress.
+ // In this case typescript reruns compilation again almost immediately
+ // after the previous run finishes. To detect this situation, we are
+ // waiting waitForNextChangeInterval before decreasing the counter.
+ // If another compiler run is started in this interval, we will wait
+ // again until it finishes.
+ go func() {
+ time.Sleep(waitForNextChangeInterval)
+ lw.compilationDoneWaiter.Add(-1)
+ }()
+
+ }
+ lw.logger.Print(text)
+ return len(p), nil
+}
+
+type typescriptInstance struct {
+ cmd *exec.Cmd
+ compilationCompleteWaiter *sync.WaitGroup
+}
+
+func newTypescriptInstance(tscBinaryPath string, projectPath string, outdir string) *typescriptInstance {
+ cmd := exec.Command(tscBinaryPath,
+ "--watch",
+ "--preserveWatchOutput",
+ "--project",
+ projectPath,
+ "--outDir",
+ outdir)
+
+ compilationCompleteWaiter := &sync.WaitGroup{}
+ logWriter := newTypescriptLogWriter(compilationCompleteWaiter)
+ cmd.Stdout = logWriter
+ cmd.Stderr = logWriter
+
+ return &typescriptInstance{
+ cmd: cmd,
+ compilationCompleteWaiter: compilationCompleteWaiter,
+ }
+}
+
+func (ts *typescriptInstance) StartWatch() error {
+ err := ts.cmd.Start()
+ if err != nil {
+ return err
+ }
+ go func() {
+ ts.cmd.Wait()
+ log.Fatal("Typescript exits unexpected")
+ }()
+
+ return nil
+}
+
+func (ts *typescriptInstance) WaitForCompilationComplete() {
+ ts.compilationCompleteWaiter.Wait()
+}
diff --git a/polygerrit-ui/yarn.lock b/polygerrit-ui/yarn.lock
index d73e1d0..0f42737 100644
--- a/polygerrit-ui/yarn.lock
+++ b/polygerrit-ui/yarn.lock
@@ -2,35 +2,35 @@
# yarn lockfile v1
-"@babel/code-frame@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"
- integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==
+"@babel/code-frame@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
+ integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==
dependencies:
- "@babel/highlight" "^7.8.3"
+ "@babel/highlight" "^7.10.4"
-"@babel/compat-data@^7.8.6", "@babel/compat-data@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.0.tgz#04815556fc90b0c174abd2c0c1bb966faa036a6c"
- integrity sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g==
+"@babel/compat-data@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.10.4.tgz#706a6484ee6f910b719b696a9194f8da7d7ac241"
+ integrity sha512-t+rjExOrSVvjQQXNp5zAIYDp00KjdvGl/TpDX5REPr0S9IAIPQMTilcfG6q8c0QFmj9lSTVySV2VTsyggvtNIw==
dependencies:
- browserslist "^4.9.1"
+ browserslist "^4.12.0"
invariant "^2.2.4"
semver "^5.5.0"
"@babel/core@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e"
- integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.10.4.tgz#780e8b83e496152f8dd7df63892b2e052bf1d51d"
+ integrity sha512-3A0tS0HWpy4XujGc7QtOIHTeNwUgWaZc/WuS5YQrfhU67jnVmsD6OGPc1AKHH0LJHQICGncy3+YUjIhVlfDdcA==
dependencies:
- "@babel/code-frame" "^7.8.3"
- "@babel/generator" "^7.9.0"
- "@babel/helper-module-transforms" "^7.9.0"
- "@babel/helpers" "^7.9.0"
- "@babel/parser" "^7.9.0"
- "@babel/template" "^7.8.6"
- "@babel/traverse" "^7.9.0"
- "@babel/types" "^7.9.0"
+ "@babel/code-frame" "^7.10.4"
+ "@babel/generator" "^7.10.4"
+ "@babel/helper-module-transforms" "^7.10.4"
+ "@babel/helpers" "^7.10.4"
+ "@babel/parser" "^7.10.4"
+ "@babel/template" "^7.10.4"
+ "@babel/traverse" "^7.10.4"
+ "@babel/types" "^7.10.4"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.1"
@@ -40,316 +40,312 @@
semver "^5.4.1"
source-map "^0.5.0"
-"@babel/generator@^7.4.0", "@babel/generator@^7.9.0":
- version "7.9.4"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.4.tgz#12441e90c3b3c4159cdecf312075bf1a8ce2dbce"
- integrity sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA==
+"@babel/generator@^7.10.4", "@babel/generator@^7.4.0":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.10.4.tgz#e49eeed9fe114b62fa5b181856a43a5e32f5f243"
+ integrity sha512-toLIHUIAgcQygFZRAQcsLQV3CBuX6yOIru1kJk/qqqvcRmZrYe6WavZTSG+bB8MxhnL9YPf+pKQfuiP161q7ng==
dependencies:
- "@babel/types" "^7.9.0"
+ "@babel/types" "^7.10.4"
jsesc "^2.5.1"
lodash "^4.17.13"
source-map "^0.5.0"
-"@babel/generator@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.3.tgz#0e22c005b0a94c1c74eafe19ef78ce53a4d45c03"
- integrity sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==
+"@babel/helper-annotate-as-pure@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3"
+ integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==
dependencies:
- "@babel/types" "^7.8.3"
- jsesc "^2.5.1"
- lodash "^4.17.13"
- source-map "^0.5.0"
+ "@babel/types" "^7.10.4"
-"@babel/helper-annotate-as-pure@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz#60bc0bc657f63a0924ff9a4b4a0b24a13cf4deee"
- integrity sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==
+"@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz#bb0b75f31bf98cbf9ff143c1ae578b87274ae1a3"
+ integrity sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==
dependencies:
- "@babel/types" "^7.8.3"
+ "@babel/helper-explode-assignable-expression" "^7.10.4"
+ "@babel/types" "^7.10.4"
-"@babel/helper-builder-binary-assignment-operator-visitor@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz#c84097a427a061ac56a1c30ebf54b7b22d241503"
- integrity sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==
+"@babel/helper-compilation-targets@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.4.tgz#804ae8e3f04376607cc791b9d47d540276332bd2"
+ integrity sha512-a3rYhlsGV0UHNDvrtOXBg8/OpfV0OKTkxKPzIplS1zpx7CygDcWWxckxZeDd3gzPzC4kUT0A4nVFDK0wGMh4MQ==
dependencies:
- "@babel/helper-explode-assignable-expression" "^7.8.3"
- "@babel/types" "^7.8.3"
-
-"@babel/helper-compilation-targets@^7.8.7":
- version "7.8.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz#dac1eea159c0e4bd46e309b5a1b04a66b53c1dde"
- integrity sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw==
- dependencies:
- "@babel/compat-data" "^7.8.6"
- browserslist "^4.9.1"
+ "@babel/compat-data" "^7.10.4"
+ browserslist "^4.12.0"
invariant "^2.2.4"
levenary "^1.1.1"
semver "^5.5.0"
-"@babel/helper-create-regexp-features-plugin@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz#c774268c95ec07ee92476a3862b75cc2839beb79"
- integrity sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q==
+"@babel/helper-create-class-features-plugin@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.4.tgz#2d4015d0136bd314103a70d84a7183e4b344a355"
+ integrity sha512-9raUiOsXPxzzLjCXeosApJItoMnX3uyT4QdM2UldffuGApNrF8e938MwNpDCK9CPoyxrEoCgT+hObJc3mZa6lQ==
dependencies:
- "@babel/helper-regex" "^7.8.3"
- regexpu-core "^4.6.0"
+ "@babel/helper-function-name" "^7.10.4"
+ "@babel/helper-member-expression-to-functions" "^7.10.4"
+ "@babel/helper-optimise-call-expression" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
+ "@babel/helper-replace-supers" "^7.10.4"
+ "@babel/helper-split-export-declaration" "^7.10.4"
-"@babel/helper-create-regexp-features-plugin@^7.8.8":
- version "7.8.8"
- resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz#5d84180b588f560b7864efaeea89243e58312087"
- integrity sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==
+"@babel/helper-create-regexp-features-plugin@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz#fdd60d88524659a0b6959c0579925e425714f3b8"
+ integrity sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g==
dependencies:
- "@babel/helper-annotate-as-pure" "^7.8.3"
- "@babel/helper-regex" "^7.8.3"
+ "@babel/helper-annotate-as-pure" "^7.10.4"
+ "@babel/helper-regex" "^7.10.4"
regexpu-core "^4.7.0"
-"@babel/helper-define-map@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz#a0655cad5451c3760b726eba875f1cd8faa02c15"
- integrity sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==
+"@babel/helper-define-map@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.10.4.tgz#f037ad794264f729eda1889f4ee210b870999092"
+ integrity sha512-nIij0oKErfCnLUCWaCaHW0Bmtl2RO9cN7+u2QT8yqTywgALKlyUVOvHDElh+b5DwVC6YB1FOYFOTWcN/+41EDA==
dependencies:
- "@babel/helper-function-name" "^7.8.3"
- "@babel/types" "^7.8.3"
+ "@babel/helper-function-name" "^7.10.4"
+ "@babel/types" "^7.10.4"
lodash "^4.17.13"
-"@babel/helper-explode-assignable-expression@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz#a728dc5b4e89e30fc2dfc7d04fa28a930653f982"
- integrity sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==
+"@babel/helper-explode-assignable-expression@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.4.tgz#40a1cd917bff1288f699a94a75b37a1a2dbd8c7c"
+ integrity sha512-4K71RyRQNPRrR85sr5QY4X3VwG4wtVoXZB9+L3r1Gp38DhELyHCtovqydRi7c1Ovb17eRGiQ/FD5s8JdU0Uy5A==
dependencies:
- "@babel/traverse" "^7.8.3"
- "@babel/types" "^7.8.3"
+ "@babel/traverse" "^7.10.4"
+ "@babel/types" "^7.10.4"
-"@babel/helper-function-name@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca"
- integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==
+"@babel/helper-function-name@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a"
+ integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==
dependencies:
- "@babel/helper-get-function-arity" "^7.8.3"
- "@babel/template" "^7.8.3"
- "@babel/types" "^7.8.3"
+ "@babel/helper-get-function-arity" "^7.10.4"
+ "@babel/template" "^7.10.4"
+ "@babel/types" "^7.10.4"
-"@babel/helper-get-function-arity@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5"
- integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==
+"@babel/helper-get-function-arity@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2"
+ integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==
dependencies:
- "@babel/types" "^7.8.3"
+ "@babel/types" "^7.10.4"
-"@babel/helper-hoist-variables@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz#1dbe9b6b55d78c9b4183fc8cdc6e30ceb83b7134"
- integrity sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==
+"@babel/helper-hoist-variables@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz#d49b001d1d5a68ca5e6604dda01a6297f7c9381e"
+ integrity sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==
dependencies:
- "@babel/types" "^7.8.3"
+ "@babel/types" "^7.10.4"
-"@babel/helper-member-expression-to-functions@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz#659b710498ea6c1d9907e0c73f206eee7dadc24c"
- integrity sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==
+"@babel/helper-member-expression-to-functions@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.4.tgz#7cd04b57dfcf82fce9aeae7d4e4452fa31b8c7c4"
+ integrity sha512-m5j85pK/KZhuSdM/8cHUABQTAslV47OjfIB9Cc7P+PvlAoBzdb79BGNfw8RhT5Mq3p+xGd0ZfAKixbrUZx0C7A==
dependencies:
- "@babel/types" "^7.8.3"
+ "@babel/types" "^7.10.4"
-"@babel/helper-module-imports@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498"
- integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==
+"@babel/helper-module-imports@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620"
+ integrity sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==
dependencies:
- "@babel/types" "^7.8.3"
+ "@babel/types" "^7.10.4"
-"@babel/helper-module-transforms@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz#43b34dfe15961918707d247327431388e9fe96e5"
- integrity sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==
+"@babel/helper-module-transforms@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.10.4.tgz#ca1f01fdb84e48c24d7506bb818c961f1da8805d"
+ integrity sha512-Er2FQX0oa3nV7eM1o0tNCTx7izmQtwAQsIiaLRWtavAAEcskb0XJ5OjJbVrYXWOTr8om921Scabn4/tzlx7j1Q==
dependencies:
- "@babel/helper-module-imports" "^7.8.3"
- "@babel/helper-replace-supers" "^7.8.6"
- "@babel/helper-simple-access" "^7.8.3"
- "@babel/helper-split-export-declaration" "^7.8.3"
- "@babel/template" "^7.8.6"
- "@babel/types" "^7.9.0"
+ "@babel/helper-module-imports" "^7.10.4"
+ "@babel/helper-replace-supers" "^7.10.4"
+ "@babel/helper-simple-access" "^7.10.4"
+ "@babel/helper-split-export-declaration" "^7.10.4"
+ "@babel/template" "^7.10.4"
+ "@babel/types" "^7.10.4"
lodash "^4.17.13"
-"@babel/helper-optimise-call-expression@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9"
- integrity sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==
+"@babel/helper-optimise-call-expression@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673"
+ integrity sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==
dependencies:
- "@babel/types" "^7.8.3"
+ "@babel/types" "^7.10.4"
-"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670"
- integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==
+"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375"
+ integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==
-"@babel/helper-regex@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.8.3.tgz#139772607d51b93f23effe72105b319d2a4c6965"
- integrity sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==
+"@babel/helper-regex@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.4.tgz#59b373daaf3458e5747dece71bbaf45f9676af6d"
+ integrity sha512-inWpnHGgtg5NOF0eyHlC0/74/VkdRITY9dtTpB2PrxKKn+AkVMRiZz/Adrx+Ssg+MLDesi2zohBW6MVq6b4pOQ==
dependencies:
lodash "^4.17.13"
-"@babel/helper-remap-async-to-generator@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz#273c600d8b9bf5006142c1e35887d555c12edd86"
- integrity sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==
+"@babel/helper-remap-async-to-generator@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.4.tgz#fce8bea4e9690bbe923056ded21e54b4e8b68ed5"
+ integrity sha512-86Lsr6NNw3qTNl+TBcF1oRZMaVzJtbWTyTko+CQL/tvNvcGYEFKbLXDPxtW0HKk3McNOk4KzY55itGWCAGK5tg==
dependencies:
- "@babel/helper-annotate-as-pure" "^7.8.3"
- "@babel/helper-wrap-function" "^7.8.3"
- "@babel/template" "^7.8.3"
- "@babel/traverse" "^7.8.3"
- "@babel/types" "^7.8.3"
+ "@babel/helper-annotate-as-pure" "^7.10.4"
+ "@babel/helper-wrap-function" "^7.10.4"
+ "@babel/template" "^7.10.4"
+ "@babel/traverse" "^7.10.4"
+ "@babel/types" "^7.10.4"
-"@babel/helper-replace-supers@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz#91192d25f6abbcd41da8a989d4492574fb1530bc"
- integrity sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA==
+"@babel/helper-replace-supers@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz#d585cd9388ea06e6031e4cd44b6713cbead9e6cf"
+ integrity sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==
dependencies:
- "@babel/helper-member-expression-to-functions" "^7.8.3"
- "@babel/helper-optimise-call-expression" "^7.8.3"
- "@babel/traverse" "^7.8.3"
- "@babel/types" "^7.8.3"
+ "@babel/helper-member-expression-to-functions" "^7.10.4"
+ "@babel/helper-optimise-call-expression" "^7.10.4"
+ "@babel/traverse" "^7.10.4"
+ "@babel/types" "^7.10.4"
-"@babel/helper-replace-supers@^7.8.6":
- version "7.8.6"
- resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8"
- integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==
+"@babel/helper-simple-access@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz#0f5ccda2945277a2a7a2d3a821e15395edcf3461"
+ integrity sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==
dependencies:
- "@babel/helper-member-expression-to-functions" "^7.8.3"
- "@babel/helper-optimise-call-expression" "^7.8.3"
- "@babel/traverse" "^7.8.6"
- "@babel/types" "^7.8.6"
+ "@babel/template" "^7.10.4"
+ "@babel/types" "^7.10.4"
-"@babel/helper-simple-access@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz#7f8109928b4dab4654076986af575231deb639ae"
- integrity sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==
+"@babel/helper-split-export-declaration@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.4.tgz#2c70576eaa3b5609b24cb99db2888cc3fc4251d1"
+ integrity sha512-pySBTeoUff56fL5CBU2hWm9TesA4r/rOkI9DyJLvvgz09MB9YtfIYe3iBriVaYNaPe+Alua0vBIOVOLs2buWhg==
dependencies:
- "@babel/template" "^7.8.3"
- "@babel/types" "^7.8.3"
+ "@babel/types" "^7.10.4"
-"@babel/helper-split-export-declaration@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9"
- integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==
+"@babel/helper-validator-identifier@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2"
+ integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==
+
+"@babel/helper-wrap-function@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz#8a6f701eab0ff39f765b5a1cfef409990e624b87"
+ integrity sha512-6py45WvEF0MhiLrdxtRjKjufwLL1/ob2qDJgg5JgNdojBAZSAKnAjkyOCNug6n+OBl4VW76XjvgSFTdaMcW0Ug==
dependencies:
- "@babel/types" "^7.8.3"
+ "@babel/helper-function-name" "^7.10.4"
+ "@babel/template" "^7.10.4"
+ "@babel/traverse" "^7.10.4"
+ "@babel/types" "^7.10.4"
-"@babel/helper-validator-identifier@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz#ad53562a7fc29b3b9a91bbf7d10397fd146346ed"
- integrity sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==
-
-"@babel/helper-wrap-function@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz#9dbdb2bb55ef14aaa01fe8c99b629bd5352d8610"
- integrity sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==
+"@babel/helpers@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.10.4.tgz#2abeb0d721aff7c0a97376b9e1f6f65d7a475044"
+ integrity sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==
dependencies:
- "@babel/helper-function-name" "^7.8.3"
- "@babel/template" "^7.8.3"
- "@babel/traverse" "^7.8.3"
- "@babel/types" "^7.8.3"
+ "@babel/template" "^7.10.4"
+ "@babel/traverse" "^7.10.4"
+ "@babel/types" "^7.10.4"
-"@babel/helpers@^7.9.0":
- version "7.9.2"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f"
- integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==
+"@babel/highlight@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143"
+ integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==
dependencies:
- "@babel/template" "^7.8.3"
- "@babel/traverse" "^7.9.0"
- "@babel/types" "^7.9.0"
-
-"@babel/highlight@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797"
- integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==
- dependencies:
+ "@babel/helper-validator-identifier" "^7.10.4"
chalk "^2.0.0"
- esutils "^2.0.2"
js-tokens "^4.0.0"
-"@babel/parser@^7.4.3", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0":
- version "7.9.4"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8"
- integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==
+"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.4.3":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.4.tgz#9eedf27e1998d87739fb5028a5120557c06a1a64"
+ integrity sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA==
-"@babel/parser@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.3.tgz#790874091d2001c9be6ec426c2eed47bc7679081"
- integrity sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==
-
-"@babel/plugin-proposal-async-generator-functions@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz#bad329c670b382589721b27540c7d288601c6e6f"
- integrity sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==
+"@babel/plugin-proposal-async-generator-functions@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.4.tgz#4b65abb3d9bacc6c657aaa413e56696f9f170fc6"
+ integrity sha512-MJbxGSmejEFVOANAezdO39SObkURO5o/8b6fSH6D1pi9RZQt+ldppKPXfqgUWpSQ9asM6xaSaSJIaeWMDRP0Zg==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
- "@babel/helper-remap-async-to-generator" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
+ "@babel/helper-remap-async-to-generator" "^7.10.4"
"@babel/plugin-syntax-async-generators" "^7.8.0"
-"@babel/plugin-proposal-dynamic-import@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz#38c4fe555744826e97e2ae930b0fb4cc07e66054"
- integrity sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==
+"@babel/plugin-proposal-class-properties@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.4.tgz#a33bf632da390a59c7a8c570045d1115cd778807"
+ integrity sha512-vhwkEROxzcHGNu2mzUC0OFFNXdZ4M23ib8aRRcJSsW8BZK9pQMD7QB7csl97NBbgGZO7ZyHUyKDnxzOaP4IrCg==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-create-class-features-plugin" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
+
+"@babel/plugin-proposal-dynamic-import@^7.10.4", "@babel/plugin-proposal-dynamic-import@^7.8.3":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.4.tgz#ba57a26cb98b37741e9d5bca1b8b0ddf8291f17e"
+ integrity sha512-up6oID1LeidOOASNXgv/CFbgBqTuKJ0cJjz6An5tWD+NVBNlp3VNSBxv2ZdU7SYl3NxJC7agAQDApZusV6uFwQ==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-syntax-dynamic-import" "^7.8.0"
-"@babel/plugin-proposal-json-strings@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz#da5216b238a98b58a1e05d6852104b10f9a70d6b"
- integrity sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==
+"@babel/plugin-proposal-json-strings@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.4.tgz#593e59c63528160233bd321b1aebe0820c2341db"
+ integrity sha512-fCL7QF0Jo83uy1K0P2YXrfX11tj3lkpN7l4dMv9Y9VkowkhkQDwFHFd8IiwyK5MZjE8UpbgokkgtcReH88Abaw==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-syntax-json-strings" "^7.8.0"
-"@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz#e4572253fdeed65cddeecfdab3f928afeb2fd5d2"
- integrity sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==
+"@babel/plugin-proposal-nullish-coalescing-operator@^7.10.4", "@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz#02a7e961fc32e6d5b2db0649e01bf80ddee7e04a"
+ integrity sha512-wq5n1M3ZUlHl9sqT2ok1T2/MTt6AXE0e1Lz4WzWBr95LsAZ5qDXe4KnFuauYyEyLiohvXFMdbsOTMyLZs91Zlw==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0"
-"@babel/plugin-proposal-numeric-separator@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz#5d6769409699ec9b3b68684cd8116cedff93bad8"
- integrity sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==
+"@babel/plugin-proposal-numeric-separator@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.4.tgz#ce1590ff0a65ad12970a609d78855e9a4c1aef06"
+ integrity sha512-73/G7QoRoeNkLZFxsoCCvlg4ezE4eM+57PnOqgaPOozd5myfj7p0muD1mRVJvbUWbOzD+q3No2bWbaKy+DJ8DA==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
- "@babel/plugin-syntax-numeric-separator" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
+ "@babel/plugin-syntax-numeric-separator" "^7.10.4"
-"@babel/plugin-proposal-object-rest-spread@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.0.tgz#a28993699fc13df165995362693962ba6b061d6f"
- integrity sha512-UgqBv6bjq4fDb8uku9f+wcm1J7YxJ5nT7WO/jBr0cl0PLKb7t1O6RNR1kZbjgx2LQtsDI9hwoQVmn0yhXeQyow==
+"@babel/plugin-proposal-object-rest-spread@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.4.tgz#50129ac216b9a6a55b3853fdd923e74bf553a4c0"
+ integrity sha512-6vh4SqRuLLarjgeOf4EaROJAHjvu9Gl+/346PbDH9yWbJyfnJ/ah3jmYKYtswEyCoWZiidvVHjHshd4WgjB9BA==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-syntax-object-rest-spread" "^7.8.0"
+ "@babel/plugin-transform-parameters" "^7.10.4"
-"@babel/plugin-proposal-optional-catch-binding@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz#9dee96ab1650eed88646ae9734ca167ac4a9c5c9"
- integrity sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==
+"@babel/plugin-proposal-optional-catch-binding@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.4.tgz#31c938309d24a78a49d68fdabffaa863758554dd"
+ integrity sha512-LflT6nPh+GK2MnFiKDyLiqSqVHkQnVf7hdoAvyTnnKj9xB3docGRsdPuxp6qqqW19ifK3xgc9U5/FwrSaCNX5g==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-syntax-optional-catch-binding" "^7.8.0"
-"@babel/plugin-proposal-optional-chaining@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz#31db16b154c39d6b8a645292472b98394c292a58"
- integrity sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==
+"@babel/plugin-proposal-optional-chaining@^7.10.4", "@babel/plugin-proposal-optional-chaining@^7.9.0":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.10.4.tgz#750f1255e930a1f82d8cdde45031f81a0d0adff7"
+ integrity sha512-ZIhQIEeavTgouyMSdZRap4VPPHqJJ3NEs2cuHs5p0erH+iz6khB0qfgU8g7UuJkG88+fBMy23ZiU+nuHvekJeQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-syntax-optional-chaining" "^7.8.0"
-"@babel/plugin-proposal-unicode-property-regex@^7.4.4", "@babel/plugin-proposal-unicode-property-regex@^7.8.3":
- version "7.8.8"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz#ee3a95e90cdc04fe8cd92ec3279fa017d68a0d1d"
- integrity sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==
+"@babel/plugin-proposal-private-methods@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.4.tgz#b160d972b8fdba5c7d111a145fc8c421fc2a6909"
+ integrity sha512-wh5GJleuI8k3emgTg5KkJK6kHNsGEr0uBTDBuQUBJwckk9xs1ez79ioheEVVxMLyPscB0LfkbVHslQqIzWV6Bw==
dependencies:
- "@babel/helper-create-regexp-features-plugin" "^7.8.8"
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-create-class-features-plugin" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
+
+"@babel/plugin-proposal-unicode-property-regex@^7.10.4", "@babel/plugin-proposal-unicode-property-regex@^7.4.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz#4483cda53041ce3413b7fe2f00022665ddfaa75d"
+ integrity sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA==
+ dependencies:
+ "@babel/helper-create-regexp-features-plugin" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-syntax-async-generators@^7.8.0":
version "7.8.4"
@@ -358,12 +354,12 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
-"@babel/plugin-syntax-class-properties@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.8.3.tgz#6cb933a8872c8d359bfde69bbeaae5162fd1e8f7"
- integrity sha512-UcAyQWg2bAN647Q+O811tG9MrJ38Z10jjhQdKNAL8fsyPzE3cCN/uT+f55cFVY4aGO4jqJAvmqsuY3GQDwAoXg==
+"@babel/plugin-syntax-class-properties@^7.10.4", "@babel/plugin-syntax-class-properties@^7.8.3":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.4.tgz#6644e6a0baa55a61f9e3231f6c9eeb6ee46c124c"
+ integrity sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-syntax-dynamic-import@^7.8.0", "@babel/plugin-syntax-dynamic-import@^7.8.3":
version "7.8.3"
@@ -373,11 +369,11 @@
"@babel/helper-plugin-utils" "^7.8.0"
"@babel/plugin-syntax-import-meta@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.8.3.tgz#230afff79d3ccc215b5944b438e4e266daf3d84d"
- integrity sha512-vYiGd4wQ9gx0Lngb7+bPCwQXGK/PR6FeTIJ+TIOlq+OfOKG/kCAOO2+IBac3oMM9qV7/fU76hfcqxUaLKZf1hQ==
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51"
+ integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-syntax-json-strings@^7.8.0":
version "7.8.3"
@@ -393,12 +389,12 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
-"@babel/plugin-syntax-numeric-separator@^7.8.0", "@babel/plugin-syntax-numeric-separator@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz#0e3fb63e09bea1b11e96467271c8308007e7c41f"
- integrity sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==
+"@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97"
+ integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-syntax-object-rest-spread@^7.8.0":
version "7.8.3"
@@ -421,318 +417,329 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
-"@babel/plugin-syntax-top-level-await@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz#3acdece695e6b13aaf57fc291d1a800950c71391"
- integrity sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==
+"@babel/plugin-syntax-top-level-await@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.4.tgz#4bbeb8917b54fcf768364e0a81f560e33a3ef57d"
+ integrity sha512-ni1brg4lXEmWyafKr0ccFWkJG0CeMt4WV1oyeBW6EFObF4oOHclbkj5cARxAPQyAQ2UTuplJyK4nfkXIMMFvsQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-arrow-functions@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz#82776c2ed0cd9e1a49956daeb896024c9473b8b6"
- integrity sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==
+"@babel/plugin-transform-arrow-functions@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.4.tgz#e22960d77e697c74f41c501d44d73dbf8a6a64cd"
+ integrity sha512-9J/oD1jV0ZCBcgnoFWFq1vJd4msoKb/TCpGNFyyLt0zABdcvgK3aYikZ8HjzB14c26bc7E3Q1yugpwGy2aTPNA==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-async-to-generator@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz#4308fad0d9409d71eafb9b1a6ee35f9d64b64086"
- integrity sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==
+"@babel/plugin-transform-async-to-generator@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.4.tgz#41a5017e49eb6f3cda9392a51eef29405b245a37"
+ integrity sha512-F6nREOan7J5UXTLsDsZG3DXmZSVofr2tGNwfdrVwkDWHfQckbQXnXSPfD7iO+c/2HGqycwyLST3DnZ16n+cBJQ==
dependencies:
- "@babel/helper-module-imports" "^7.8.3"
- "@babel/helper-plugin-utils" "^7.8.3"
- "@babel/helper-remap-async-to-generator" "^7.8.3"
+ "@babel/helper-module-imports" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
+ "@babel/helper-remap-async-to-generator" "^7.10.4"
-"@babel/plugin-transform-block-scoped-functions@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz#437eec5b799b5852072084b3ae5ef66e8349e8a3"
- integrity sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==
+"@babel/plugin-transform-block-scoped-functions@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.4.tgz#1afa595744f75e43a91af73b0d998ecfe4ebc2e8"
+ integrity sha512-WzXDarQXYYfjaV1szJvN3AD7rZgZzC1JtjJZ8dMHUyiK8mxPRahynp14zzNjU3VkPqPsO38CzxiWO1c9ARZ8JA==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-block-scoping@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz#97d35dab66857a437c166358b91d09050c868f3a"
- integrity sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==
+"@babel/plugin-transform-block-scoping@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.10.4.tgz#a670d1364bb5019a621b9ea2001482876d734787"
+ integrity sha512-J3b5CluMg3hPUii2onJDRiaVbPtKFPLEaV5dOPY5OeAbDi1iU/UbbFFTgwb7WnanaDy7bjU35kc26W3eM5Qa0A==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
lodash "^4.17.13"
-"@babel/plugin-transform-classes@^7.9.0":
- version "7.9.2"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.2.tgz#8603fc3cc449e31fdbdbc257f67717536a11af8d"
- integrity sha512-TC2p3bPzsfvSsqBZo0kJnuelnoK9O3welkUpqSqBQuBF6R5MN2rysopri8kNvtlGIb2jmUO7i15IooAZJjZuMQ==
+"@babel/plugin-transform-classes@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.4.tgz#405136af2b3e218bc4a1926228bc917ab1a0adc7"
+ integrity sha512-2oZ9qLjt161dn1ZE0Ms66xBncQH4In8Sqw1YWgBUZuGVJJS5c0OFZXL6dP2MRHrkU/eKhWg8CzFJhRQl50rQxA==
dependencies:
- "@babel/helper-annotate-as-pure" "^7.8.3"
- "@babel/helper-define-map" "^7.8.3"
- "@babel/helper-function-name" "^7.8.3"
- "@babel/helper-optimise-call-expression" "^7.8.3"
- "@babel/helper-plugin-utils" "^7.8.3"
- "@babel/helper-replace-supers" "^7.8.6"
- "@babel/helper-split-export-declaration" "^7.8.3"
+ "@babel/helper-annotate-as-pure" "^7.10.4"
+ "@babel/helper-define-map" "^7.10.4"
+ "@babel/helper-function-name" "^7.10.4"
+ "@babel/helper-optimise-call-expression" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
+ "@babel/helper-replace-supers" "^7.10.4"
+ "@babel/helper-split-export-declaration" "^7.10.4"
globals "^11.1.0"
-"@babel/plugin-transform-computed-properties@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz#96d0d28b7f7ce4eb5b120bb2e0e943343c86f81b"
- integrity sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==
+"@babel/plugin-transform-computed-properties@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.4.tgz#9ded83a816e82ded28d52d4b4ecbdd810cdfc0eb"
+ integrity sha512-JFwVDXcP/hM/TbyzGq3l/XWGut7p46Z3QvqFMXTfk6/09m7xZHJUN9xHfsv7vqqD4YnfI5ueYdSJtXqqBLyjBw==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-destructuring@^7.8.3":
- version "7.8.8"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz#fadb2bc8e90ccaf5658de6f8d4d22ff6272a2f4b"
- integrity sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ==
+"@babel/plugin-transform-destructuring@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.4.tgz#70ddd2b3d1bea83d01509e9bb25ddb3a74fc85e5"
+ integrity sha512-+WmfvyfsyF603iPa6825mq6Qrb7uLjTOsa3XOFzlYcYDHSS4QmpOWOL0NNBY5qMbvrcf3tq0Cw+v4lxswOBpgA==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-dotall-regex@^7.4.4", "@babel/plugin-transform-dotall-regex@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz#c3c6ec5ee6125c6993c5cbca20dc8621a9ea7a6e"
- integrity sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==
+"@babel/plugin-transform-dotall-regex@^7.10.4", "@babel/plugin-transform-dotall-regex@^7.4.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz#469c2062105c1eb6a040eaf4fac4b488078395ee"
+ integrity sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA==
dependencies:
- "@babel/helper-create-regexp-features-plugin" "^7.8.3"
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-create-regexp-features-plugin" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-duplicate-keys@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz#8d12df309aa537f272899c565ea1768e286e21f1"
- integrity sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==
+"@babel/plugin-transform-duplicate-keys@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.4.tgz#697e50c9fee14380fe843d1f306b295617431e47"
+ integrity sha512-GL0/fJnmgMclHiBTTWXNlYjYsA7rDrtsazHG6mglaGSTh0KsrW04qml+Bbz9FL0LcJIRwBWL5ZqlNHKTkU3xAA==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-exponentiation-operator@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz#581a6d7f56970e06bf51560cd64f5e947b70d7b7"
- integrity sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==
+"@babel/plugin-transform-exponentiation-operator@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.4.tgz#5ae338c57f8cf4001bdb35607ae66b92d665af2e"
+ integrity sha512-S5HgLVgkBcRdyQAHbKj+7KyuWx8C6t5oETmUuwz1pt3WTWJhsUV0WIIXuVvfXMxl/QQyHKlSCNNtaIamG8fysw==
dependencies:
- "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3"
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-for-of@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz#0f260e27d3e29cd1bb3128da5e76c761aa6c108e"
- integrity sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==
+"@babel/plugin-transform-for-of@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.4.tgz#c08892e8819d3a5db29031b115af511dbbfebae9"
+ integrity sha512-ItdQfAzu9AlEqmusA/65TqJ79eRcgGmpPPFvBnGILXZH975G0LNjP1yjHvGgfuCxqrPPueXOPe+FsvxmxKiHHQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-function-name@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz#279373cb27322aaad67c2683e776dfc47196ed8b"
- integrity sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==
+"@babel/plugin-transform-function-name@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.4.tgz#6a467880e0fc9638514ba369111811ddbe2644b7"
+ integrity sha512-OcDCq2y5+E0dVD5MagT5X+yTRbcvFjDI2ZVAottGH6tzqjx/LKpgkUepu3hp/u4tZBzxxpNGwLsAvGBvQ2mJzg==
dependencies:
- "@babel/helper-function-name" "^7.8.3"
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-function-name" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-literals@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz#aef239823d91994ec7b68e55193525d76dbd5dc1"
- integrity sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==
+"@babel/plugin-transform-literals@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.4.tgz#9f42ba0841100a135f22712d0e391c462f571f3c"
+ integrity sha512-Xd/dFSTEVuUWnyZiMu76/InZxLTYilOSr1UlHV+p115Z/Le2Fi1KXkJUYz0b42DfndostYlPub3m8ZTQlMaiqQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-member-expression-literals@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz#963fed4b620ac7cbf6029c755424029fa3a40410"
- integrity sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==
+"@babel/plugin-transform-member-expression-literals@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.4.tgz#b1ec44fcf195afcb8db2c62cd8e551c881baf8b7"
+ integrity sha512-0bFOvPyAoTBhtcJLr9VcwZqKmSjFml1iVxvPL0ReomGU53CX53HsM4h2SzckNdkQcHox1bpAqzxBI1Y09LlBSw==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-modules-amd@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz#19755ee721912cf5bb04c07d50280af3484efef4"
- integrity sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q==
+"@babel/plugin-transform-modules-amd@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.4.tgz#cb407c68b862e4c1d13a2fc738c7ec5ed75fc520"
+ integrity sha512-3Fw+H3WLUrTlzi3zMiZWp3AR4xadAEMv6XRCYnd5jAlLM61Rn+CRJaZMaNvIpcJpQ3vs1kyifYvEVPFfoSkKOA==
dependencies:
- "@babel/helper-module-transforms" "^7.9.0"
- "@babel/helper-plugin-utils" "^7.8.3"
- babel-plugin-dynamic-import-node "^2.3.0"
+ "@babel/helper-module-transforms" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
+ babel-plugin-dynamic-import-node "^2.3.3"
-"@babel/plugin-transform-modules-commonjs@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz#e3e72f4cbc9b4a260e30be0ea59bdf5a39748940"
- integrity sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g==
+"@babel/plugin-transform-modules-commonjs@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.4.tgz#66667c3eeda1ebf7896d41f1f16b17105a2fbca0"
+ integrity sha512-Xj7Uq5o80HDLlW64rVfDBhao6OX89HKUmb+9vWYaLXBZOma4gA6tw4Ni1O5qVDoZWUV0fxMYA0aYzOawz0l+1w==
dependencies:
- "@babel/helper-module-transforms" "^7.9.0"
- "@babel/helper-plugin-utils" "^7.8.3"
- "@babel/helper-simple-access" "^7.8.3"
- babel-plugin-dynamic-import-node "^2.3.0"
+ "@babel/helper-module-transforms" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
+ "@babel/helper-simple-access" "^7.10.4"
+ babel-plugin-dynamic-import-node "^2.3.3"
-"@babel/plugin-transform-modules-systemjs@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz#e9fd46a296fc91e009b64e07ddaa86d6f0edeb90"
- integrity sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ==
+"@babel/plugin-transform-modules-systemjs@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.4.tgz#8f576afd943ac2f789b35ded0a6312f929c633f9"
+ integrity sha512-Tb28LlfxrTiOTGtZFsvkjpyjCl9IoaRI52AEU/VIwOwvDQWtbNJsAqTXzh+5R7i74e/OZHH2c2w2fsOqAfnQYQ==
dependencies:
- "@babel/helper-hoist-variables" "^7.8.3"
- "@babel/helper-module-transforms" "^7.9.0"
- "@babel/helper-plugin-utils" "^7.8.3"
- babel-plugin-dynamic-import-node "^2.3.0"
+ "@babel/helper-hoist-variables" "^7.10.4"
+ "@babel/helper-module-transforms" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
+ babel-plugin-dynamic-import-node "^2.3.3"
-"@babel/plugin-transform-modules-umd@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz#e909acae276fec280f9b821a5f38e1f08b480697"
- integrity sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ==
+"@babel/plugin-transform-modules-umd@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.4.tgz#9a8481fe81b824654b3a0b65da3df89f3d21839e"
+ integrity sha512-mohW5q3uAEt8T45YT7Qc5ws6mWgJAaL/8BfWD9Dodo1A3RKWli8wTS+WiQ/knF+tXlPirW/1/MqzzGfCExKECA==
dependencies:
- "@babel/helper-module-transforms" "^7.9.0"
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-module-transforms" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-named-capturing-groups-regex@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz#a2a72bffa202ac0e2d0506afd0939c5ecbc48c6c"
- integrity sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==
+"@babel/plugin-transform-named-capturing-groups-regex@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.4.tgz#78b4d978810b6f3bcf03f9e318f2fc0ed41aecb6"
+ integrity sha512-V6LuOnD31kTkxQPhKiVYzYC/Jgdq53irJC/xBSmqcNcqFGV+PER4l6rU5SH2Vl7bH9mLDHcc0+l9HUOe4RNGKA==
dependencies:
- "@babel/helper-create-regexp-features-plugin" "^7.8.3"
+ "@babel/helper-create-regexp-features-plugin" "^7.10.4"
-"@babel/plugin-transform-new-target@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz#60cc2ae66d85c95ab540eb34babb6434d4c70c43"
- integrity sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==
+"@babel/plugin-transform-new-target@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.4.tgz#9097d753cb7b024cb7381a3b2e52e9513a9c6888"
+ integrity sha512-YXwWUDAH/J6dlfwqlWsztI2Puz1NtUAubXhOPLQ5gjR/qmQ5U96DY4FQO8At33JN4XPBhrjB8I4eMmLROjjLjw==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-object-super@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz#ebb6a1e7a86ffa96858bd6ac0102d65944261725"
- integrity sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==
+"@babel/plugin-transform-object-super@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.4.tgz#d7146c4d139433e7a6526f888c667e314a093894"
+ integrity sha512-5iTw0JkdRdJvr7sY0vHqTpnruUpTea32JHmq/atIWqsnNussbRzjEDyWep8UNztt1B5IusBYg8Irb0bLbiEBCQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
- "@babel/helper-replace-supers" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
+ "@babel/helper-replace-supers" "^7.10.4"
-"@babel/plugin-transform-parameters@^7.8.7":
- version "7.9.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.3.tgz#3028d0cc20ddc733166c6e9c8534559cee09f54a"
- integrity sha512-fzrQFQhp7mIhOzmOtPiKffvCYQSK10NR8t6BBz2yPbeUHb9OLW8RZGtgDRBn8z2hGcwvKDL3vC7ojPTLNxmqEg==
+"@babel/plugin-transform-parameters@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.4.tgz#7b4d137c87ea7adc2a0f3ebf53266871daa6fced"
+ integrity sha512-RurVtZ/D5nYfEg0iVERXYKEgDFeesHrHfx8RT05Sq57ucj2eOYAP6eu5fynL4Adju4I/mP/I6SO0DqNWAXjfLQ==
dependencies:
- "@babel/helper-get-function-arity" "^7.8.3"
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-get-function-arity" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-property-literals@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz#33194300d8539c1ed28c62ad5087ba3807b98263"
- integrity sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==
+"@babel/plugin-transform-property-literals@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.4.tgz#f6fe54b6590352298785b83edd815d214c42e3c0"
+ integrity sha512-ofsAcKiUxQ8TY4sScgsGeR2vJIsfrzqvFb9GvJ5UdXDzl+MyYCaBj/FGzXuv7qE0aJcjWMILny1epqelnFlz8g==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-regenerator@^7.8.7":
- version "7.8.7"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz#5e46a0dca2bee1ad8285eb0527e6abc9c37672f8"
- integrity sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==
+"@babel/plugin-transform-regenerator@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.4.tgz#2015e59d839074e76838de2159db421966fd8b63"
+ integrity sha512-3thAHwtor39A7C04XucbMg17RcZ3Qppfxr22wYzZNcVIkPHfpM9J0SO8zuCV6SZa265kxBJSrfKTvDCYqBFXGw==
dependencies:
regenerator-transform "^0.14.2"
-"@babel/plugin-transform-reserved-words@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz#9a0635ac4e665d29b162837dd3cc50745dfdf1f5"
- integrity sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==
+"@babel/plugin-transform-reserved-words@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.4.tgz#8f2682bcdcef9ed327e1b0861585d7013f8a54dd"
+ integrity sha512-hGsw1O6Rew1fkFbDImZIEqA8GoidwTAilwCyWqLBM9f+e/u/sQMQu7uX6dyokfOayRuuVfKOW4O7HvaBWM+JlQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-shorthand-properties@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz#28545216e023a832d4d3a1185ed492bcfeac08c8"
- integrity sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==
+"@babel/plugin-transform-shorthand-properties@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.4.tgz#9fd25ec5cdd555bb7f473e5e6ee1c971eede4dd6"
+ integrity sha512-AC2K/t7o07KeTIxMoHneyX90v3zkm5cjHJEokrPEAGEy3UCp8sLKfnfOIGdZ194fyN4wfX/zZUWT9trJZ0qc+Q==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-spread@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz#9c8ffe8170fdfb88b114ecb920b82fb6e95fe5e8"
- integrity sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==
+"@babel/plugin-transform-spread@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.10.4.tgz#4e2c85ea0d6abaee1b24dcfbbae426fe8d674cff"
+ integrity sha512-1e/51G/Ni+7uH5gktbWv+eCED9pP8ZpRhZB3jOaI3mmzfvJTWHkuyYTv0Z5PYtyM+Tr2Ccr9kUdQxn60fI5WuQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-sticky-regex@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz#be7a1290f81dae767475452199e1f76d6175b100"
- integrity sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==
+"@babel/plugin-transform-sticky-regex@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.4.tgz#8f3889ee8657581130a29d9cc91d7c73b7c4a28d"
+ integrity sha512-Ddy3QZfIbEV0VYcVtFDCjeE4xwVTJWTmUtorAJkn6u/92Z/nWJNV+mILyqHKrUxXYKA2EoCilgoPePymKL4DvQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
- "@babel/helper-regex" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
+ "@babel/helper-regex" "^7.10.4"
-"@babel/plugin-transform-template-literals@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz#7bfa4732b455ea6a43130adc0ba767ec0e402a80"
- integrity sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==
+"@babel/plugin-transform-template-literals@^7.10.4", "@babel/plugin-transform-template-literals@^7.8.3":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.4.tgz#e6375407b30fcb7fcfdbba3bb98ef3e9d36df7bc"
+ integrity sha512-4NErciJkAYe+xI5cqfS8pV/0ntlY5N5Ske/4ImxAVX7mk9Rxt2bwDTGv1Msc2BRJvWQcmYEC+yoMLdX22aE4VQ==
dependencies:
- "@babel/helper-annotate-as-pure" "^7.8.3"
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-annotate-as-pure" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-typeof-symbol@^7.8.4":
- version "7.8.4"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz#ede4062315ce0aaf8a657a920858f1a2f35fc412"
- integrity sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==
+"@babel/plugin-transform-typeof-symbol@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.4.tgz#9509f1a7eec31c4edbffe137c16cc33ff0bc5bfc"
+ integrity sha512-QqNgYwuuW0y0H+kUE/GWSR45t/ccRhe14Fs/4ZRouNNQsyd4o3PG4OtHiIrepbM2WKUBDAXKCAK/Lk4VhzTaGA==
dependencies:
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-unicode-regex@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz#0cef36e3ba73e5c57273effb182f46b91a1ecaad"
- integrity sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==
+"@babel/plugin-transform-unicode-escapes@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.4.tgz#feae523391c7651ddac115dae0a9d06857892007"
+ integrity sha512-y5XJ9waMti2J+e7ij20e+aH+fho7Wb7W8rNuu72aKRwCHFqQdhkdU2lo3uZ9tQuboEJcUFayXdARhcxLQ3+6Fg==
dependencies:
- "@babel/helper-create-regexp-features-plugin" "^7.8.3"
- "@babel/helper-plugin-utils" "^7.8.3"
+ "@babel/helper-plugin-utils" "^7.10.4"
+
+"@babel/plugin-transform-unicode-regex@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.4.tgz#e56d71f9282fac6db09c82742055576d5e6d80a8"
+ integrity sha512-wNfsc4s8N2qnIwpO/WP2ZiSyjfpTamT2C9V9FDH/Ljub9zw6P3SjkXcFmc0RQUt96k2fmIvtla2MMjgTwIAC+A==
+ dependencies:
+ "@babel/helper-create-regexp-features-plugin" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
"@babel/preset-env@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.0.tgz#a5fc42480e950ae8f5d9f8f2bbc03f52722df3a8"
- integrity sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ==
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.10.4.tgz#fbf57f9a803afd97f4f32e4f798bb62e4b2bef5f"
+ integrity sha512-tcmuQ6vupfMZPrLrc38d0sF2OjLT3/bZ0dry5HchNCQbrokoQi4reXqclvkkAT5b+gWc23meVWpve5P/7+w/zw==
dependencies:
- "@babel/compat-data" "^7.9.0"
- "@babel/helper-compilation-targets" "^7.8.7"
- "@babel/helper-module-imports" "^7.8.3"
- "@babel/helper-plugin-utils" "^7.8.3"
- "@babel/plugin-proposal-async-generator-functions" "^7.8.3"
- "@babel/plugin-proposal-dynamic-import" "^7.8.3"
- "@babel/plugin-proposal-json-strings" "^7.8.3"
- "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3"
- "@babel/plugin-proposal-numeric-separator" "^7.8.3"
- "@babel/plugin-proposal-object-rest-spread" "^7.9.0"
- "@babel/plugin-proposal-optional-catch-binding" "^7.8.3"
- "@babel/plugin-proposal-optional-chaining" "^7.9.0"
- "@babel/plugin-proposal-unicode-property-regex" "^7.8.3"
+ "@babel/compat-data" "^7.10.4"
+ "@babel/helper-compilation-targets" "^7.10.4"
+ "@babel/helper-module-imports" "^7.10.4"
+ "@babel/helper-plugin-utils" "^7.10.4"
+ "@babel/plugin-proposal-async-generator-functions" "^7.10.4"
+ "@babel/plugin-proposal-class-properties" "^7.10.4"
+ "@babel/plugin-proposal-dynamic-import" "^7.10.4"
+ "@babel/plugin-proposal-json-strings" "^7.10.4"
+ "@babel/plugin-proposal-nullish-coalescing-operator" "^7.10.4"
+ "@babel/plugin-proposal-numeric-separator" "^7.10.4"
+ "@babel/plugin-proposal-object-rest-spread" "^7.10.4"
+ "@babel/plugin-proposal-optional-catch-binding" "^7.10.4"
+ "@babel/plugin-proposal-optional-chaining" "^7.10.4"
+ "@babel/plugin-proposal-private-methods" "^7.10.4"
+ "@babel/plugin-proposal-unicode-property-regex" "^7.10.4"
"@babel/plugin-syntax-async-generators" "^7.8.0"
+ "@babel/plugin-syntax-class-properties" "^7.10.4"
"@babel/plugin-syntax-dynamic-import" "^7.8.0"
"@babel/plugin-syntax-json-strings" "^7.8.0"
"@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0"
- "@babel/plugin-syntax-numeric-separator" "^7.8.0"
+ "@babel/plugin-syntax-numeric-separator" "^7.10.4"
"@babel/plugin-syntax-object-rest-spread" "^7.8.0"
"@babel/plugin-syntax-optional-catch-binding" "^7.8.0"
"@babel/plugin-syntax-optional-chaining" "^7.8.0"
- "@babel/plugin-syntax-top-level-await" "^7.8.3"
- "@babel/plugin-transform-arrow-functions" "^7.8.3"
- "@babel/plugin-transform-async-to-generator" "^7.8.3"
- "@babel/plugin-transform-block-scoped-functions" "^7.8.3"
- "@babel/plugin-transform-block-scoping" "^7.8.3"
- "@babel/plugin-transform-classes" "^7.9.0"
- "@babel/plugin-transform-computed-properties" "^7.8.3"
- "@babel/plugin-transform-destructuring" "^7.8.3"
- "@babel/plugin-transform-dotall-regex" "^7.8.3"
- "@babel/plugin-transform-duplicate-keys" "^7.8.3"
- "@babel/plugin-transform-exponentiation-operator" "^7.8.3"
- "@babel/plugin-transform-for-of" "^7.9.0"
- "@babel/plugin-transform-function-name" "^7.8.3"
- "@babel/plugin-transform-literals" "^7.8.3"
- "@babel/plugin-transform-member-expression-literals" "^7.8.3"
- "@babel/plugin-transform-modules-amd" "^7.9.0"
- "@babel/plugin-transform-modules-commonjs" "^7.9.0"
- "@babel/plugin-transform-modules-systemjs" "^7.9.0"
- "@babel/plugin-transform-modules-umd" "^7.9.0"
- "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3"
- "@babel/plugin-transform-new-target" "^7.8.3"
- "@babel/plugin-transform-object-super" "^7.8.3"
- "@babel/plugin-transform-parameters" "^7.8.7"
- "@babel/plugin-transform-property-literals" "^7.8.3"
- "@babel/plugin-transform-regenerator" "^7.8.7"
- "@babel/plugin-transform-reserved-words" "^7.8.3"
- "@babel/plugin-transform-shorthand-properties" "^7.8.3"
- "@babel/plugin-transform-spread" "^7.8.3"
- "@babel/plugin-transform-sticky-regex" "^7.8.3"
- "@babel/plugin-transform-template-literals" "^7.8.3"
- "@babel/plugin-transform-typeof-symbol" "^7.8.4"
- "@babel/plugin-transform-unicode-regex" "^7.8.3"
+ "@babel/plugin-syntax-top-level-await" "^7.10.4"
+ "@babel/plugin-transform-arrow-functions" "^7.10.4"
+ "@babel/plugin-transform-async-to-generator" "^7.10.4"
+ "@babel/plugin-transform-block-scoped-functions" "^7.10.4"
+ "@babel/plugin-transform-block-scoping" "^7.10.4"
+ "@babel/plugin-transform-classes" "^7.10.4"
+ "@babel/plugin-transform-computed-properties" "^7.10.4"
+ "@babel/plugin-transform-destructuring" "^7.10.4"
+ "@babel/plugin-transform-dotall-regex" "^7.10.4"
+ "@babel/plugin-transform-duplicate-keys" "^7.10.4"
+ "@babel/plugin-transform-exponentiation-operator" "^7.10.4"
+ "@babel/plugin-transform-for-of" "^7.10.4"
+ "@babel/plugin-transform-function-name" "^7.10.4"
+ "@babel/plugin-transform-literals" "^7.10.4"
+ "@babel/plugin-transform-member-expression-literals" "^7.10.4"
+ "@babel/plugin-transform-modules-amd" "^7.10.4"
+ "@babel/plugin-transform-modules-commonjs" "^7.10.4"
+ "@babel/plugin-transform-modules-systemjs" "^7.10.4"
+ "@babel/plugin-transform-modules-umd" "^7.10.4"
+ "@babel/plugin-transform-named-capturing-groups-regex" "^7.10.4"
+ "@babel/plugin-transform-new-target" "^7.10.4"
+ "@babel/plugin-transform-object-super" "^7.10.4"
+ "@babel/plugin-transform-parameters" "^7.10.4"
+ "@babel/plugin-transform-property-literals" "^7.10.4"
+ "@babel/plugin-transform-regenerator" "^7.10.4"
+ "@babel/plugin-transform-reserved-words" "^7.10.4"
+ "@babel/plugin-transform-shorthand-properties" "^7.10.4"
+ "@babel/plugin-transform-spread" "^7.10.4"
+ "@babel/plugin-transform-sticky-regex" "^7.10.4"
+ "@babel/plugin-transform-template-literals" "^7.10.4"
+ "@babel/plugin-transform-typeof-symbol" "^7.10.4"
+ "@babel/plugin-transform-unicode-escapes" "^7.10.4"
+ "@babel/plugin-transform-unicode-regex" "^7.10.4"
"@babel/preset-modules" "^0.1.3"
- "@babel/types" "^7.9.0"
- browserslist "^4.9.1"
+ "@babel/types" "^7.10.4"
+ browserslist "^4.12.0"
core-js-compat "^3.6.2"
invariant "^2.2.2"
levenary "^1.1.1"
@@ -750,82 +757,56 @@
esutils "^2.0.2"
"@babel/runtime@^7.8.4":
- version "7.9.2"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06"
- integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.10.4.tgz#a6724f1a6b8d2f6ea5236dbfe58c7d7ea9c5eb99"
+ integrity sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw==
dependencies:
regenerator-runtime "^0.13.4"
-"@babel/template@^7.4.0", "@babel/template@^7.8.6":
- version "7.8.6"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b"
- integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==
+"@babel/template@^7.10.4", "@babel/template@^7.4.0":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278"
+ integrity sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==
dependencies:
- "@babel/code-frame" "^7.8.3"
- "@babel/parser" "^7.8.6"
- "@babel/types" "^7.8.6"
+ "@babel/code-frame" "^7.10.4"
+ "@babel/parser" "^7.10.4"
+ "@babel/types" "^7.10.4"
-"@babel/template@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8"
- integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==
+"@babel/traverse@^7.10.4", "@babel/traverse@^7.4.3":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.10.4.tgz#e642e5395a3b09cc95c8e74a27432b484b697818"
+ integrity sha512-aSy7p5THgSYm4YyxNGz6jZpXf+Ok40QF3aA2LyIONkDHpAcJzDUqlCKXv6peqYUs2gmic849C/t2HKw2a2K20Q==
dependencies:
- "@babel/code-frame" "^7.8.3"
- "@babel/parser" "^7.8.3"
- "@babel/types" "^7.8.3"
-
-"@babel/traverse@^7.4.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.0.tgz#d3882c2830e513f4fe4cec9fe76ea1cc78747892"
- integrity sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w==
- dependencies:
- "@babel/code-frame" "^7.8.3"
- "@babel/generator" "^7.9.0"
- "@babel/helper-function-name" "^7.8.3"
- "@babel/helper-split-export-declaration" "^7.8.3"
- "@babel/parser" "^7.9.0"
- "@babel/types" "^7.9.0"
+ "@babel/code-frame" "^7.10.4"
+ "@babel/generator" "^7.10.4"
+ "@babel/helper-function-name" "^7.10.4"
+ "@babel/helper-split-export-declaration" "^7.10.4"
+ "@babel/parser" "^7.10.4"
+ "@babel/types" "^7.10.4"
debug "^4.1.0"
globals "^11.1.0"
lodash "^4.17.13"
-"@babel/traverse@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.3.tgz#a826215b011c9b4f73f3a893afbc05151358bf9a"
- integrity sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==
+"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.10.4.tgz#369517188352e18219981efd156bfdb199fff1ee"
+ integrity sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==
dependencies:
- "@babel/code-frame" "^7.8.3"
- "@babel/generator" "^7.8.3"
- "@babel/helper-function-name" "^7.8.3"
- "@babel/helper-split-export-declaration" "^7.8.3"
- "@babel/parser" "^7.8.3"
- "@babel/types" "^7.8.3"
- debug "^4.1.0"
- globals "^11.1.0"
- lodash "^4.17.13"
-
-"@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.8.6", "@babel/types@^7.9.0":
- version "7.9.0"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.0.tgz#00b064c3df83ad32b2dbf5ff07312b15c7f1efb5"
- integrity sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==
- dependencies:
- "@babel/helper-validator-identifier" "^7.9.0"
+ "@babel/helper-validator-identifier" "^7.10.4"
lodash "^4.17.13"
to-fast-properties "^2.0.0"
-"@babel/types@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c"
- integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==
+"@koa/cors@^3.1.0":
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/@koa/cors/-/cors-3.1.0.tgz#618bb073438cfdbd3ebd0e648a76e33b84f3a3b2"
+ integrity sha512-7ulRC1da/rBa6kj6P4g2aJfnET3z8Uf3SWu60cjbtxTA5g8lxRdX/Bd2P92EagGwwAhANeNw8T8if99rJliR6Q==
dependencies:
- esutils "^2.0.2"
- lodash "^4.17.13"
- to-fast-properties "^2.0.0"
+ vary "^1.1.2"
-"@open-wc/building-utils@^2.16.1":
- version "2.16.1"
- resolved "https://registry.yarnpkg.com/@open-wc/building-utils/-/building-utils-2.16.1.tgz#093d74881b996fe9497d628cdf55b6757422d894"
- integrity sha512-0nUktFyelvSbCc8+T4w4PCyIy3i8blOFS0/EiG5xbVJ0HejDPQLTSmRBpZkn6X57tHhwUfjIdv0EAQuo2sbHEw==
+"@open-wc/building-utils@^2.18.0":
+ version "2.18.0"
+ resolved "https://registry.yarnpkg.com/@open-wc/building-utils/-/building-utils-2.18.0.tgz#f80929dfcfb6d8a6cb5c933654c721808b4bb2d3"
+ integrity sha512-U1n8sLQlLt3IuqhU7tDsGQAGUfVMiB64xJsAmJEtekposrjqkjtRLU/WipvROl1A2GTsrMojMjNbFqzJghpd6g==
dependencies:
"@babel/core" "^7.9.0"
"@babel/plugin-syntax-dynamic-import" "^7.8.3"
@@ -837,7 +818,7 @@
clean-css "^4.2.1"
clone "^2.1.2"
core-js-bundle "^3.6.0"
- deepmerge "^3.2.0"
+ deepmerge "^4.2.2"
es-module-shims "^0.4.6"
html-minifier "^4.0.0"
lru-cache "^5.1.1"
@@ -846,26 +827,27 @@
path-is-inside "^1.0.2"
regenerator-runtime "^0.13.3"
resolve "^1.11.1"
- rimraf "^3.0.0"
+ rimraf "^3.0.2"
shady-css-scoped-element "^0.0.2"
- systemjs "^4.0.0"
- terser "^4.6.4"
+ systemjs "^6.3.1"
+ terser "^4.6.7"
valid-url "^1.0.9"
whatwg-fetch "^3.0.0"
whatwg-url "^7.0.0"
-"@open-wc/karma-esm@^2.13.21":
- version "2.13.21"
- resolved "https://registry.yarnpkg.com/@open-wc/karma-esm/-/karma-esm-2.13.21.tgz#bef38b4e153b5728a6934de8a926d8bd9b9bb4db"
- integrity sha512-qJREvj5HbYpUb6IeQXXiylPtqSnknUhBeK3PmhlnVdsXCeuPucmKJHbInd8ThYjX5/UJSp/cWe/Dt4H8GqHPHw==
+"@open-wc/karma-esm@^2.16.16":
+ version "2.16.16"
+ resolved "https://registry.yarnpkg.com/@open-wc/karma-esm/-/karma-esm-2.16.16.tgz#6ebff57f249e95f777b7e04782ef08ed41e22f53"
+ integrity sha512-IALT10JfwK+h7T0hGKTUliGdkWzQbyQg195D+RfUteIoTof6Z5+dBp7JUh2fQygIyNj7IIYHJ9ej816QlgHjdA==
dependencies:
- "@open-wc/building-utils" "^2.16.1"
+ "@open-wc/building-utils" "^2.18.0"
babel-plugin-istanbul "^5.1.4"
chokidar "^3.0.0"
- deepmerge "^3.2.0"
- es-dev-server "^1.46.0"
+ deepmerge "^4.2.2"
+ es-dev-server "^1.56.0"
minimatch "^3.0.4"
node-fetch "^2.6.0"
+ polyfills-loader "^1.6.1"
portfinder "^1.0.21"
request "^2.88.0"
@@ -888,23 +870,25 @@
resolved "https://registry.yarnpkg.com/@polymer/test-fixture/-/test-fixture-4.0.2.tgz#2f4777ecdcfb22ee000db35a05e0edf27c722c19"
integrity sha512-tLX8tFE4mkc4p84YG5239G0hbgTVv2irZYrSyO0OblUqIRbRoCPmbydm3HRFQkJeAB3rPCtyeZ2roJULsmTG3A==
-"@rollup/plugin-node-resolve@^6.1.0":
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-6.1.0.tgz#0d2909f4bf606ae34d43a9bc8be06a9b0c850cf0"
- integrity sha512-Cv7PDIvxdE40SWilY5WgZpqfIUEaDxFxs89zCAHjqyRwlTSuql4M5hjIuc5QYJkOH0/vyiyNXKD72O+LhRipGA==
+"@rollup/plugin-node-resolve@^7.1.1":
+ version "7.1.3"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz#80de384edfbd7bfc9101164910f86078151a3eca"
+ integrity sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q==
dependencies:
- "@rollup/pluginutils" "^3.0.0"
+ "@rollup/pluginutils" "^3.0.8"
"@types/resolve" "0.0.8"
builtin-modules "^3.1.0"
is-module "^1.0.0"
- resolve "^1.11.1"
+ resolve "^1.14.2"
-"@rollup/pluginutils@^3.0.0":
- version "3.0.8"
- resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.0.8.tgz#4e94d128d94b90699e517ef045422960d18c8fde"
- integrity sha512-rYGeAc4sxcZ+kPG/Tw4/fwJODC3IXHYDH4qusdN/b6aLw5LPUbzpecYbEJh4sVQGPFJxd2dBU4kc1H3oy9/bnw==
+"@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.0.8":
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"
+ integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==
dependencies:
+ "@types/estree" "0.0.39"
estree-walker "^1.0.1"
+ picomatch "^2.2.2"
"@sinonjs/commons@^1", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.7.2":
version "1.8.0"
@@ -942,15 +926,239 @@
resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5"
integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==
+"@types/accepts@*":
+ version "1.3.5"
+ resolved "https://registry.yarnpkg.com/@types/accepts/-/accepts-1.3.5.tgz#c34bec115cfc746e04fe5a059df4ce7e7b391575"
+ integrity sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==
+ dependencies:
+ "@types/node" "*"
+
+"@types/babel__core@^7.1.3":
+ version "7.1.9"
+ resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.9.tgz#77e59d438522a6fb898fa43dc3455c6e72f3963d"
+ integrity sha512-sY2RsIJ5rpER1u3/aQ8OFSI7qGIy8o1NEEbgb2UaJcvOtXOMpd39ko723NBpjQFg9SIX7TXtjejZVGeIMLhoOw==
+ dependencies:
+ "@babel/parser" "^7.1.0"
+ "@babel/types" "^7.0.0"
+ "@types/babel__generator" "*"
+ "@types/babel__template" "*"
+ "@types/babel__traverse" "*"
+
+"@types/babel__generator@*":
+ version "7.6.1"
+ resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.1.tgz#4901767b397e8711aeb99df8d396d7ba7b7f0e04"
+ integrity sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew==
+ dependencies:
+ "@babel/types" "^7.0.0"
+
+"@types/babel__template@*":
+ version "7.0.2"
+ resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307"
+ integrity sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg==
+ dependencies:
+ "@babel/parser" "^7.1.0"
+ "@babel/types" "^7.0.0"
+
+"@types/babel__traverse@*":
+ version "7.0.12"
+ resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.12.tgz#22f49a028e69465390f87bb103ebd61bd086b8f5"
+ integrity sha512-t4CoEokHTfcyfb4hUaF9oOHu9RmmNWnm1CP0YmMqOOfClKascOmvlEM736vlqeScuGvBDsHkf8R2INd4DWreQA==
+ dependencies:
+ "@babel/types" "^7.3.0"
+
+"@types/body-parser@*":
+ version "1.19.0"
+ resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz#0685b3c47eb3006ffed117cdd55164b61f80538f"
+ integrity sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ==
+ dependencies:
+ "@types/connect" "*"
+ "@types/node" "*"
+
+"@types/browserslist-useragent@^3.0.0":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/@types/browserslist-useragent/-/browserslist-useragent-3.0.0.tgz#d425c9818182ce71ce53866798cee9c7d41d6e53"
+ integrity sha512-ZBvKzg3yyWNYEkwxAzdmUzp27sFvw+1m080/+2lwrt+eltNefn1f4fnpMyrjOla31p8zLleCYqQXw+3EETfn0w==
+
+"@types/browserslist@^4.8.0":
+ version "4.8.0"
+ resolved "https://registry.yarnpkg.com/@types/browserslist/-/browserslist-4.8.0.tgz#60489aefdf0fcb56c2d8eb65267ff08dad7a526d"
+ integrity sha512-4PyO9OM08APvxxo1NmQyQKlJdowPCOQIy5D/NLO3aO0vGC57wsMptvGp3b8IbYnupFZr92l1dlVief1JvS6STQ==
+
+"@types/caniuse-api@^3.0.0":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/@types/caniuse-api/-/caniuse-api-3.0.0.tgz#af31cc52062be0ab24583be072fd49b634dcc2fe"
+ integrity sha512-wT1VfnScjAftZsvLYaefu/UuwYJdYBwD2JDL2OQd01plGmuAoir5V6HnVHgrfh7zEwcasoiyO2wQ+W58sNh2sw==
+
+"@types/command-line-args@^5.0.0":
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/@types/command-line-args/-/command-line-args-5.0.0.tgz#484e704d20dbb8754a8f091eee45cdd22bcff28c"
+ integrity sha512-4eOPXyn5DmP64MCMF8ePDvdlvlzt2a+F8ZaVjqmh2yFCpGjc1kI3kGnCFYX9SCsGTjQcWIyVZ86IHCEyjy/MNg==
+
+"@types/command-line-usage@^5.0.1":
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/@types/command-line-usage/-/command-line-usage-5.0.1.tgz#99424950da567ba67b6b65caee57ff03c4e751ec"
+ integrity sha512-/xUgezxxYePeXhg5S04hUjxG9JZi+rJTs1+4NwpYPfSaS7BeDa6tVJkH6lN9Cb6rl8d24Fi2uX0s0Ngg2JT6gg==
+
+"@types/connect@*":
+ version "3.4.33"
+ resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.33.tgz#31610c901eca573b8713c3330abc6e6b9f588546"
+ integrity sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==
+ dependencies:
+ "@types/node" "*"
+
+"@types/content-disposition@*":
+ version "0.5.3"
+ resolved "https://registry.yarnpkg.com/@types/content-disposition/-/content-disposition-0.5.3.tgz#0aa116701955c2faa0717fc69cd1596095e49d96"
+ integrity sha512-P1bffQfhD3O4LW0ioENXUhZ9OIa0Zn+P7M+pWgkCKaT53wVLSq0mrKksCID/FGHpFhRSxRGhgrQmfhRuzwtKdg==
+
+"@types/cookies@*":
+ version "0.7.4"
+ resolved "https://registry.yarnpkg.com/@types/cookies/-/cookies-0.7.4.tgz#26dedf791701abc0e36b5b79a5722f40e455f87b"
+ integrity sha512-oTGtMzZZAVuEjTwCjIh8T8FrC8n/uwy+PG0yTvQcdZ7etoel7C7/3MSd7qrukENTgQtotG7gvBlBojuVs7X5rw==
+ dependencies:
+ "@types/connect" "*"
+ "@types/express" "*"
+ "@types/keygrip" "*"
+ "@types/node" "*"
+
+"@types/debounce@^1.2.0":
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/@types/debounce/-/debounce-1.2.0.tgz#9ee99259f41018c640b3929e1bb32c3dcecdb192"
+ integrity sha512-bWG5wapaWgbss9E238T0R6bfo5Fh3OkeoSt245CM7JJwVwpw6MEBCbIxLq5z8KzsE3uJhzcIuQkyiZmzV3M/Dw==
+
+"@types/estree@0.0.39":
+ version "0.0.39"
+ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
+ integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
+
+"@types/etag@*":
+ version "1.8.0"
+ resolved "https://registry.yarnpkg.com/@types/etag/-/etag-1.8.0.tgz#37f0b1f3ea46da7ae319bbedb607e375b4c99f7e"
+ integrity sha512-EdSN0x+Y0/lBv7YAb8IU4Jgm6DWM+Bqtz7o5qozl96fzaqdqbdfHS5qjdpFeIv7xQ8jSLyjMMNShgYtMajEHyQ==
+ dependencies:
+ "@types/node" "*"
+
+"@types/express-serve-static-core@*":
+ version "4.17.8"
+ resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.8.tgz#b8f7b714138536742da222839892e203df569d1c"
+ integrity sha512-1SJZ+R3Q/7mLkOD9ewCBDYD2k0WyZQtWYqF/2VvoNN2/uhI49J9CDN4OAm+wGMA0DbArA4ef27xl4+JwMtGggw==
+ dependencies:
+ "@types/node" "*"
+ "@types/qs" "*"
+ "@types/range-parser" "*"
+
+"@types/express@*":
+ version "4.17.6"
+ resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.6.tgz#6bce49e49570507b86ea1b07b806f04697fac45e"
+ integrity sha512-n/mr9tZI83kd4azlPG5y997C/M4DNABK9yErhFM6hKdym4kkmd9j0vtsJyjFIwfRBxtrxZtAfGZCNRIBMFLK5w==
+ dependencies:
+ "@types/body-parser" "*"
+ "@types/express-serve-static-core" "*"
+ "@types/qs" "*"
+ "@types/serve-static" "*"
+
+"@types/http-assert@*":
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/@types/http-assert/-/http-assert-1.5.1.tgz#d775e93630c2469c2f980fc27e3143240335db3b"
+ integrity sha512-PGAK759pxyfXE78NbKxyfRcWYA/KwW17X290cNev/qAsn9eQIxkH4shoNBafH37wewhDG/0p1cHPbK6+SzZjWQ==
+
+"@types/keygrip@*":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@types/keygrip/-/keygrip-1.0.2.tgz#513abfd256d7ad0bf1ee1873606317b33b1b2a72"
+ integrity sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw==
+
+"@types/koa-compose@*":
+ version "3.2.5"
+ resolved "https://registry.yarnpkg.com/@types/koa-compose/-/koa-compose-3.2.5.tgz#85eb2e80ac50be95f37ccf8c407c09bbe3468e9d"
+ integrity sha512-B8nG/OoE1ORZqCkBVsup/AKcvjdgoHnfi4pZMn5UwAPCbhk/96xyv284eBYW8JlQbQ7zDmnpFr68I/40mFoIBQ==
+ dependencies:
+ "@types/koa" "*"
+
+"@types/koa-compress@^2.0.9":
+ version "2.0.9"
+ resolved "https://registry.yarnpkg.com/@types/koa-compress/-/koa-compress-2.0.9.tgz#5d19f7d928f78b451a9afd148863e2b45f51e541"
+ integrity sha512-1Sa9OsbHd2N2N7gLpdIRHe8W99EZbfIR31D7Iisx16XgwZCnWUtGXzXQejhu74Y1pE/wILqBP6VL49ch/MVpZw==
+ dependencies:
+ "@types/koa" "*"
+ "@types/node" "*"
+
+"@types/koa-etag@^3.0.0":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/@types/koa-etag/-/koa-etag-3.0.0.tgz#d14d3dab45d5577b94bc72960631de96751341d3"
+ integrity sha512-gXQUtKGEnCy0sZLG+uE3wL4mvY1CBPcb6ECjpAoD8RGYy/8ACY1B084k8LTFPIdVcmy7GD6Y4n3up3jnupofcQ==
+ dependencies:
+ "@types/etag" "*"
+ "@types/koa" "*"
+
+"@types/koa-send@*":
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/@types/koa-send/-/koa-send-4.1.2.tgz#978f8267ad116d12ac6a18fecd8f34c5657e09ad"
+ integrity sha512-rfqKIv9bFds39Jxvsp8o3YJLnEQVPVriYA14AuO2OY65IHh/4UX4U/iMs5L0wATpcRmm1bbe0BNk23TRwx3VQQ==
+ dependencies:
+ "@types/koa" "*"
+
+"@types/koa-static@^4.0.1":
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/@types/koa-static/-/koa-static-4.0.1.tgz#b740d80a549b0a0a7a3b38918daecde88a7a50ec"
+ integrity sha512-SSpct5fEcAeRkBHa3RiwCIRfDHcD1cZRhwRF///ZfvRt8KhoqRrhK6wpDlYPk/vWHVFE9hPGqh68bhzsHkir4w==
+ dependencies:
+ "@types/koa" "*"
+ "@types/koa-send" "*"
+
+"@types/koa@*", "@types/koa@^2.0.48":
+ version "2.11.3"
+ resolved "https://registry.yarnpkg.com/@types/koa/-/koa-2.11.3.tgz#540ece376581b12beadf9a417dd1731bc31c16ce"
+ integrity sha512-ABxVkrNWa4O/Jp24EYI/hRNqEVRlhB9g09p48neQp4m3xL1TJtdWk2NyNQSMCU45ejeELMQZBYyfstyVvO2H3Q==
+ dependencies:
+ "@types/accepts" "*"
+ "@types/content-disposition" "*"
+ "@types/cookies" "*"
+ "@types/http-assert" "*"
+ "@types/keygrip" "*"
+ "@types/koa-compose" "*"
+ "@types/node" "*"
+
+"@types/koa__cors@^3.0.1":
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/@types/koa__cors/-/koa__cors-3.0.1.tgz#a8cf8535f0fe682c9421f1b9379837c585f8b66b"
+ integrity sha512-loqZNXliley8kncc4wrX9KMqLGN6YfiaO3a3VFX+yVkkXJwOrZU4lipdudNjw5mFyC+5hd7h9075hQWcVVpeOg==
+ dependencies:
+ "@types/koa" "*"
+
+"@types/lru-cache@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.0.tgz#57f228f2b80c046b4a1bd5cac031f81f207f4f03"
+ integrity sha512-RaE0B+14ToE4l6UqdarKPnXwVDuigfFv+5j9Dze/Nqr23yyuqdNvzcZi3xB+3Agvi5R4EOgAksfv3lXX4vBt9w==
+
+"@types/mime@*":
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.2.tgz#857a118d8634c84bba7ae14088e4508490cd5da5"
+ integrity sha512-4kPlzbljFcsttWEq6aBW0OZe6BDajAmyvr2xknBG92tejQnvdGtT9+kXSZ580DqpxY9qG2xeQVF9Dq0ymUTo5Q==
+
"@types/minimatch@^3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
"@types/node@*":
- version "13.1.8"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.8.tgz#1d590429fe8187a02707720ecf38a6fe46ce294b"
- integrity sha512-6XzyyNM9EKQW4HKuzbo/CkOIjn/evtCmsU+MUM1xDfJ+3/rNjBttM1NgN7AOQvN6tP1Sl1D1PIKMreTArnxM9A==
+ version "14.0.14"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.14.tgz#24a0b5959f16ac141aeb0c5b3cd7a15b7c64cbce"
+ integrity sha512-syUgf67ZQpaJj01/tRTknkMNoBBLWJOBODF0Zm4NrXmiSuxjymFrxnTu1QVYRubhVkRcZLYZG8STTwJRdVm/WQ==
+
+"@types/path-is-inside@^1.0.0":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@types/path-is-inside/-/path-is-inside-1.0.0.tgz#02d6ff38975d684bdec96204494baf9f29f0e17f"
+ integrity sha512-hfnXRGugz+McgX2jxyy5qz9sB21LRzlGn24zlwN2KEgoPtEvjzNRrLtUkOOebPDPZl3Rq7ywKxYvylVcEZDnEw==
+
+"@types/qs@*":
+ version "6.9.3"
+ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.3.tgz#b755a0934564a200d3efdf88546ec93c369abd03"
+ integrity sha512-7s9EQWupR1fTc2pSMtXRQ9w9gLOcrJn+h7HOXw4evxyvVqMi4f+q7d2tnFe3ng3SNHjtK+0EzGMGFUQX4/AQRA==
+
+"@types/range-parser@*":
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c"
+ integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==
"@types/resolve@0.0.8":
version "0.0.8"
@@ -959,15 +1167,30 @@
dependencies:
"@types/node" "*"
+"@types/serve-static@*":
+ version "1.13.4"
+ resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.4.tgz#6662a93583e5a6cabca1b23592eb91e12fa80e7c"
+ integrity sha512-jTDt0o/YbpNwZbQmE/+2e+lfjJEJJR0I3OFaKQKPWkASkCoW3i6fsUnqudSMcNAfbtmADGu8f4MV4q+GqULmug==
+ dependencies:
+ "@types/express-serve-static-core" "*"
+ "@types/mime" "*"
+
+"@types/whatwg-url@^6.4.0":
+ version "6.4.0"
+ resolved "https://registry.yarnpkg.com/@types/whatwg-url/-/whatwg-url-6.4.0.tgz#1e59b8c64bc0dbdf66d037cf8449d1c3d5270237"
+ integrity sha512-tonhlcbQ2eho09am6RHnHOgvtDfDYINd5rgxD+2YSkKENooVCFsWizJz139MQW/PV8FfClyKrNe9ZbdHrSCxGg==
+ dependencies:
+ "@types/node" "*"
+
"@webcomponents/shadycss@^1.9.1":
version "1.9.4"
resolved "https://registry.yarnpkg.com/@webcomponents/shadycss/-/shadycss-1.9.4.tgz#4f9d8ea1526bab084c60b53d4854dc39fdb2bb48"
integrity sha512-tgNcVEaKssyeZPbUBjVQf4aryO5Fi7fxRvOxV982ZJuRVDcefmIblBh0SXAbcvAAlQ2zpNEP4SuQUnr8uApIpw==
"@webcomponents/shadycss@^1.9.4":
- version "1.9.6"
- resolved "https://registry.yarnpkg.com/@webcomponents/shadycss/-/shadycss-1.9.6.tgz#a8c5db867e49200a05cf8d5008029c09b7861979"
- integrity sha512-5fFjvP0jQJZoXK6YzYeYcIDGJ5oEsdjr1L9VaYLw5yxNd4aRz4srMpwCwldeNG0A6Hvr9igbG7fCsBeiiCXd7A==
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/@webcomponents/shadycss/-/shadycss-1.10.0.tgz#7a80ec1e8b271fb3f0cc02cd4358b877a303545d"
+ integrity sha512-UMS+dF4DXDrcUmQqK6aLd/3mFyfGktKG/hZR6FtrsQK/INO07G0H8FxElLkuvHj0iePeZGpR7R4lWFTvX7rc9g==
"@webcomponents/webcomponentsjs@^2.4.0":
version "2.4.3"
@@ -998,9 +1221,9 @@
integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=
ajv@^6.5.5:
- version "6.11.0"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz#c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9"
- integrity sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==
+ version "6.12.2"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd"
+ integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
@@ -1109,14 +1332,14 @@
integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
aws4@^1.8.0:
- version "1.9.1"
- resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e"
- integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.0.tgz#a17b3a8ea811060e74d47d306122400ad4497ae2"
+ integrity sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==
-babel-plugin-dynamic-import-node@^2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f"
- integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==
+babel-plugin-dynamic-import-node@^2.3.3:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3"
+ integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==
dependencies:
object.assign "^4.1.0"
@@ -1216,23 +1439,23 @@
integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==
browserslist-useragent@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/browserslist-useragent/-/browserslist-useragent-3.0.2.tgz#f0e209b2742baa5de0e451b52e678e8b4402617c"
- integrity sha512-/UPzK9xZnk5mwwWx4wcuBKAKx/mD3MNY8sUuZ2NPqnr4RVFWZogX+8mOP0cQEYo8j78sHk0hiDNaVXZ1U3hM9A==
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/browserslist-useragent/-/browserslist-useragent-3.0.3.tgz#d06c062a4e444ad5e1a80323131d4508450c9af5"
+ integrity sha512-8KKO6kOXu/93IkMi8zVqzU72BgpoxcITIHtkM1qmlnxJtIMF9Y+2uWL9JS2uUbzj/PaS3kaA6LcICBThMojGjA==
dependencies:
- browserslist "^4.6.6"
- semver "^6.3.0"
+ browserslist "^4.12.0"
+ semver "^7.3.2"
useragent "^2.3.0"
-browserslist@^4.0.0, browserslist@^4.6.6, browserslist@^4.8.3, browserslist@^4.9.1:
- version "4.11.1"
- resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.11.1.tgz#92f855ee88d6e050e7e7311d987992014f1a1f1b"
- integrity sha512-DCTr3kDrKEYNw6Jb9HFxVLQNaue8z+0ZfRBRjmCunKDEXEBajKDj2Y+Uelg+Pi29OnvaSGwjOsnRyNEkXzHg5g==
+browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.8.5, browserslist@^4.9.1:
+ version "4.12.2"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.12.2.tgz#76653d7e4c57caa8a1a28513e2f4e197dc11a711"
+ integrity sha512-MfZaeYqR8StRZdstAK9hCKDd2StvePCYp5rHzQCPicUjfFliDgmuaBNPHYUTpAywBN8+Wc/d7NYVFkO0aqaBUw==
dependencies:
- caniuse-lite "^1.0.30001038"
- electron-to-chromium "^1.3.390"
- node-releases "^1.1.53"
- pkg-up "^2.0.0"
+ caniuse-lite "^1.0.30001088"
+ electron-to-chromium "^1.3.483"
+ escalade "^3.0.1"
+ node-releases "^1.1.58"
buffer-alloc-unsafe@^1.1.0:
version "1.1.0"
@@ -1303,10 +1526,10 @@
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"
-caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001033, caniuse-lite@^1.0.30001038:
- version "1.0.30001038"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001038.tgz#44da3cbca2ab6cb6aa83d1be5d324e17f141caff"
- integrity sha512-zii9quPo96XfOiRD4TrfYGs+QsGZpb2cGiMAzPjtf/hpFgB6zCPZgJb7I1+EATeMw/o+lG8FyRAnI+CWStHcaQ==
+caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001033, caniuse-lite@^1.0.30001088:
+ version "1.0.30001093"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001093.tgz#833e80f64b1a0455cbceed2a4a3baf19e4abd312"
+ integrity sha512-0+ODNoOjtWD5eS9aaIpf4K0gQqZfILNY4WSNuYzeT1sXni+lMrrVjc0odEobJt6wrODofDZUX8XYi/5y7+xl8g==
caseless@~0.12.0:
version "0.12.0"
@@ -1439,7 +1662,7 @@
table-layout "^1.0.0"
typical "^5.2.0"
-commander@^2.19.0, commander@^2.20.0, commander@~2.20.3:
+commander@^2.19.0, commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
@@ -1514,16 +1737,16 @@
keygrip "~1.1.0"
core-js-bundle@^3.6.0:
- version "3.6.4"
- resolved "https://registry.yarnpkg.com/core-js-bundle/-/core-js-bundle-3.6.4.tgz#d4e098323c035f4a1b61f00db0b8def04c243920"
- integrity sha512-qDHS3GbIEs5dZaBiCVhhtCoF79KU/ek0w+H7zfJf9RuGN0GiKfxHZfAtDy4zFtQ6X00t7Wvvr3wHzMj+/IgbPg==
+ version "3.6.5"
+ resolved "https://registry.yarnpkg.com/core-js-bundle/-/core-js-bundle-3.6.5.tgz#3a425ad66ad19aeefea89acfd48cff674ff58590"
+ integrity sha512-awf49McIBT3sDXceSex69w/i7PMXQwxI4ZqknCtaYbW4Q0u0HUZiaQLlPD6pU2nFBofIowgWIS1ANgHjqnQu4Q==
core-js-compat@^3.6.2:
- version "3.6.4"
- resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.4.tgz#938476569ebb6cda80d339bcf199fae4f16fff17"
- integrity sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA==
+ version "3.6.5"
+ resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.5.tgz#2a51d9a4e25dfd6e690251aa81f99e3c05481f1c"
+ integrity sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==
dependencies:
- browserslist "^4.8.3"
+ browserslist "^4.8.5"
semver "7.0.0"
core-util-is@1.0.2:
@@ -1603,10 +1826,10 @@
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
-deepmerge@^3.2.0:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.3.0.tgz#d3c47fd6f3a93d517b14426b0628a17b0125f5f7"
- integrity sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA==
+deepmerge@^4.2.2:
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
+ integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
define-properties@^1.1.2, define-properties@^1.1.3:
version "1.1.3"
@@ -1683,10 +1906,10 @@
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
-electron-to-chromium@^1.3.390:
- version "1.3.392"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.392.tgz#280ab4f7a3ae47419cfabb15dbfc1567be7f1111"
- integrity sha512-/hsgeVdReDsyTBE0aU9FRdh1wnNPrX3xlz3t61F+CJPOT+Umfi9DXHsCX85TEgWZQqlow0Rw44/4/jbU2Sqgkg==
+electron-to-chromium@^1.3.483:
+ version "1.3.486"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.486.tgz#90856e6c9f488079225cf5a0b4d4af6c241e0965"
+ integrity sha512-fmnACh6Jiuagm9tAfEZNe6QrwvOYAC5y0BwzoEOGCsbqriKOCaafXf3lsIvL55xa75Jmg4oboI7f5tMuoXrjNg==
emoji-regex@^7.0.1:
version "7.0.3"
@@ -1757,11 +1980,6 @@
dependencies:
is-arrayish "^0.2.1"
-error-inject@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/error-inject/-/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37"
- integrity sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc=
-
es-abstract@^1.17.0-next.1:
version "1.17.4"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.4.tgz#e3aedf19706b20e7c2594c35fc0d57605a79e184"
@@ -1779,10 +1997,10 @@
string.prototype.trimleft "^2.1.1"
string.prototype.trimright "^2.1.1"
-es-dev-server@^1.46.0:
- version "1.46.0"
- resolved "https://registry.yarnpkg.com/es-dev-server/-/es-dev-server-1.46.0.tgz#6fa8615604d8bfaa6a181f3bfb8b62d9f4b3dd81"
- integrity sha512-+6RDz/YeBEkEHcf84I2pS+JYY1ov3d24JAda8hVMFQtpI21+G4/t0YA3lZSIYlPZ6AIoTgmb/+pKQh6JzmOUVA==
+es-dev-server@^1.56.0:
+ version "1.56.0"
+ resolved "https://registry.yarnpkg.com/es-dev-server/-/es-dev-server-1.56.0.tgz#8703af87595f02fe9a1c92a07e64b7c7cc915a87"
+ integrity sha512-SL4CXdiku0hiB8zpsBLtEd7b8etIZE6IV0tIi02m0CcpTYV0rDMEvCBUYsQIN5hggJDDTBURgQjOWcT5kQv2eA==
dependencies:
"@babel/core" "^7.9.0"
"@babel/plugin-proposal-dynamic-import" "^7.8.3"
@@ -1795,10 +2013,26 @@
"@babel/plugin-syntax-optional-chaining" "^7.8.3"
"@babel/plugin-transform-template-literals" "^7.8.3"
"@babel/preset-env" "^7.9.0"
- "@open-wc/building-utils" "^2.16.1"
- "@rollup/plugin-node-resolve" "^6.1.0"
+ "@koa/cors" "^3.1.0"
+ "@open-wc/building-utils" "^2.18.0"
+ "@rollup/plugin-node-resolve" "^7.1.1"
"@rollup/pluginutils" "^3.0.0"
+ "@types/babel__core" "^7.1.3"
+ "@types/browserslist" "^4.8.0"
+ "@types/browserslist-useragent" "^3.0.0"
+ "@types/caniuse-api" "^3.0.0"
+ "@types/command-line-args" "^5.0.0"
+ "@types/command-line-usage" "^5.0.1"
+ "@types/debounce" "^1.2.0"
+ "@types/koa" "^2.0.48"
+ "@types/koa-compress" "^2.0.9"
+ "@types/koa-etag" "^3.0.0"
+ "@types/koa-static" "^4.0.1"
+ "@types/koa__cors" "^3.0.1"
+ "@types/lru-cache" "^5.1.0"
"@types/minimatch" "^3.0.3"
+ "@types/path-is-inside" "^1.0.0"
+ "@types/whatwg-url" "^6.4.0"
browserslist "^4.9.1"
browserslist-useragent "^3.0.2"
builtin-modules "^3.1.0"
@@ -1809,7 +2043,7 @@
command-line-args "^5.0.2"
command-line-usage "^6.1.0"
debounce "^1.2.0"
- deepmerge "^3.2.0"
+ deepmerge "^4.2.2"
es-module-lexer "^0.3.13"
get-stream "^5.1.0"
is-stream "^2.0.0"
@@ -1819,26 +2053,29 @@
koa-etag "^3.0.0"
koa-static "^5.0.0"
lru-cache "^5.1.1"
+ mime-types "^2.1.27"
minimatch "^3.0.4"
- opn "^5.4.0"
+ open "^7.0.3"
parse5 "^5.1.1"
path-is-inside "^1.0.2"
- polyfills-loader "^1.5.2"
+ polyfills-loader "^1.6.1"
portfinder "^1.0.21"
+ rollup "^2.7.2"
strip-ansi "^5.2.0"
- systemjs "^4.0.0"
+ systemjs "^6.3.1"
+ tslib "^1.11.1"
useragent "^2.3.0"
whatwg-url "^7.0.0"
es-module-lexer@^0.3.13:
- version "0.3.17"
- resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.3.17.tgz#a248dec2870934d9054420fead19db095ea21537"
- integrity sha512-nwvMtzyEB6FhlyXBlV+BW2By3Vn2sUvlQBYP4LvdK8YpdbFQUOiBoeuB7/ip1+EbjmgNydkJ8+dIlyO09VP9BA==
+ version "0.3.24"
+ resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.3.24.tgz#e6b2900758e9e210d23aec2092efc13ca235adea"
+ integrity sha512-jm/i7KdJtaMDle921xIsA/MQQOGuZ6goYxhlV+k+gQNI7FtP4N6jknrmJvj++3ODpiyFGwQ4PIstJfHJQJNc+g==
es-module-shims@^0.4.6:
- version "0.4.6"
- resolved "https://registry.yarnpkg.com/es-module-shims/-/es-module-shims-0.4.6.tgz#5decb313d52e5c62f6c19ed7e664ee9d66317d8a"
- integrity sha512-EzVhnLyA/zvmGrAy2RU8m9xpxX7u2yb2by1GZH80SHF6lakG21YAm3Vo56KsLIXaIjT9QabqjYpQU1S5FkM8+Q==
+ version "0.4.7"
+ resolved "https://registry.yarnpkg.com/es-module-shims/-/es-module-shims-0.4.7.tgz#1419b65bbd38dfe91ab8ea5d7b4b454561e44641"
+ integrity sha512-0LTiSQoPWwdcaTVIQXhGlaDwTneD0g9/tnH1PNs3zHFFH+xoCeJclDM3rQeqF9nurXPfMKm3l9+kfPRa5VpbKg==
es-to-primitive@^1.2.1:
version "1.2.1"
@@ -1849,6 +2086,11 @@
is-date-object "^1.0.1"
is-symbol "^1.0.2"
+escalade@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.0.1.tgz#52568a77443f6927cd0ab9c73129137533c965ed"
+ integrity sha512-DR6NO3h9niOT+MZs7bjxlj2a1k+POu5RN8CLTPX2+i78bRi9eLe7+0zXgUHMnGXWybYcL61E9hGhPKqedy8tQA==
+
escape-html@^1.0.3, escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
@@ -1900,9 +2142,9 @@
integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
fast-deep-equal@^3.1.1:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4"
- integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
+ integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
fast-json-stable-stringify@^2.0.0:
version "2.1.0"
@@ -1943,13 +2185,6 @@
dependencies:
locate-path "^3.0.0"
-find-up@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
- integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c=
- dependencies:
- locate-path "^2.0.0"
-
flat@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2"
@@ -2140,9 +2375,9 @@
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
hosted-git-info@^2.1.4:
- version "2.8.5"
- resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c"
- integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==
+ version "2.8.8"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
+ integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
html-minifier@^4.0.0:
version "4.0.0"
@@ -2176,14 +2411,14 @@
statuses ">= 1.5.0 < 2"
toidentifier "1.0.0"
-http-errors@^1.6.3, http-errors@~1.7.2:
- version "1.7.3"
- resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
- integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
+http-errors@^1.6.3:
+ version "1.8.0"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.0.tgz#75d1bbe497e1044f51e4ee9e704a62f28d336507"
+ integrity sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A==
dependencies:
depd "~1.1.2"
inherits "2.0.4"
- setprototypeof "1.1.1"
+ setprototypeof "1.2.0"
statuses ">= 1.5.0 < 2"
toidentifier "1.0.0"
@@ -2197,6 +2432,17 @@
setprototypeof "1.1.0"
statuses ">= 1.4.0 < 2"
+http-errors@~1.7.2:
+ version "1.7.3"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
+ integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
+ dependencies:
+ depd "~1.1.2"
+ inherits "2.0.4"
+ setprototypeof "1.1.1"
+ statuses ">= 1.5.0 < 2"
+ toidentifier "1.0.0"
+
http-proxy@^1.13.0:
version "1.18.0"
resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.0.tgz#dbe55f63e75a347db7f3d99974f2692a314a6a3a"
@@ -2284,6 +2530,11 @@
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e"
integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==
+is-docker@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.0.0.tgz#2cb0df0e75e2d064fe1864c37cdeacb7b2dcf25b"
+ integrity sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ==
+
is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
@@ -2340,10 +2591,12 @@
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
-is-wsl@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
- integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=
+is-wsl@^2.1.1:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
+ integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==
+ dependencies:
+ is-docker "^2.0.0"
isarray@0.0.1:
version "0.0.1"
@@ -2363,9 +2616,9 @@
buffer-alloc "^1.2.0"
isbinaryfile@^4.0.2:
- version "4.0.5"
- resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.5.tgz#7193454fdd7fc0b12855c36c48d4ac7368fa3ec9"
- integrity sha512-Jvz0gpTh1AILHMCBUyqq7xv1ZOQrxTDwyp1/QUq1xFpOBvp4AH5uEobPePJht8KnBGqQIH7We6OR73mXsjG0cA==
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.6.tgz#edcb62b224e2b4710830b67498c8e4e5a4d2610b"
+ integrity sha512-ORrEy+SNVqUhrCaal4hA4fBzhggQQ+BaLntyPOdoEiwlKZW9BZiJXjg3RMiruE4tPEI3pyVPpySHQF/dKWperg==
isexe@^2.0.0:
version "2.0.0"
@@ -2444,9 +2697,9 @@
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
json5@^2.1.2:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.2.tgz#43ef1f0af9835dd624751a6b7fa48874fb2d608e"
- integrity sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43"
+ integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==
dependencies:
minimist "^1.2.5"
@@ -2547,9 +2800,9 @@
integrity sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==
koa-compress@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/koa-compress/-/koa-compress-3.0.0.tgz#3194059c215cbc24e59bbc84c2c7453a4c88564f"
- integrity sha512-xol+LkNB1mozKJkB5Kj6nYXbJXhkLkZlXl9BsGBPjujVfZ8MsIXwU4GHRTT7TlSfUcl2DU3JtC+j6wOWcovfuQ==
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/koa-compress/-/koa-compress-3.1.0.tgz#00fb0af695dc4661c6de261a18da669626ea3ca1"
+ integrity sha512-0m24/yS/GbhWI+g9FqtvStY+yJwTObwoxOvPok6itVjRen7PBWkjsJ8pre76m+99YybXLKhOJ62mJ268qyBFMQ==
dependencies:
bytes "^3.0.0"
compressible "^2.0.0"
@@ -2596,9 +2849,9 @@
koa-send "^5.0.0"
koa@^2.7.0:
- version "2.11.0"
- resolved "https://registry.yarnpkg.com/koa/-/koa-2.11.0.tgz#fe5a51c46f566d27632dd5dc8fd5d7dd44f935a4"
- integrity sha512-EpR9dElBTDlaDgyhDMiLkXrPwp6ZqgAIBvhhmxQ9XN4TFgW+gEz6tkcsNI6BnUbUftrKDjVFj4lW2/J2aNBMMA==
+ version "2.13.0"
+ resolved "https://registry.yarnpkg.com/koa/-/koa-2.13.0.tgz#25217e05efd3358a7e5ddec00f0a380c9b71b501"
+ integrity sha512-i/XJVOfPw7npbMv67+bOeXr3gPqOAw6uh5wFyNs3QvJ47tUx3M3V9rIE0//WytY42MKz4l/MXKyGkQ2LQTfLUQ==
dependencies:
accepts "^1.3.5"
cache-content-type "^1.0.0"
@@ -2610,7 +2863,6 @@
depd "^1.1.2"
destroy "^1.0.4"
encodeurl "^1.0.2"
- error-inject "^1.0.0"
escape-html "^1.0.3"
fresh "~0.5.2"
http-assert "^1.3.0"
@@ -2647,14 +2899,6 @@
pify "^3.0.0"
strip-bom "^3.0.0"
-locate-path@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
- integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=
- dependencies:
- p-locate "^2.0.0"
- path-exists "^3.0.0"
-
locate-path@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
@@ -2750,12 +2994,24 @@
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
-mime-db@1.43.0, "mime-db@>= 1.43.0 < 2":
+mime-db@1.43.0:
version "1.43.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58"
integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==
-mime-types@^2.1.12, mime-types@^2.1.18, mime-types@~2.1.19, mime-types@~2.1.24:
+mime-db@1.44.0, "mime-db@>= 1.43.0 < 2":
+ version "1.44.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92"
+ integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==
+
+mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.27, mime-types@~2.1.19:
+ version "2.1.27"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f"
+ integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==
+ dependencies:
+ mime-db "1.44.0"
+
+mime-types@~2.1.24:
version "2.1.26"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06"
integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==
@@ -2774,11 +3030,6 @@
dependencies:
brace-expansion "^1.1.7"
-minimist@0.0.8:
- version "0.0.8"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
- integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
-
minimist@^1.2.3, minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
@@ -2797,11 +3048,11 @@
minimist "^1.2.5"
mkdirp@^0.5.1:
- version "0.5.1"
- resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
- integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
+ version "0.5.5"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
+ integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
dependencies:
- minimist "0.0.8"
+ minimist "^1.2.5"
mocha@^7.1.1:
version "7.1.1"
@@ -2893,10 +3144,10 @@
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
-node-releases@^1.1.53:
- version "1.1.53"
- resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4"
- integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ==
+node-releases@^1.1.58:
+ version "1.1.58"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.58.tgz#8ee20eef30fa60e52755fcc0942def5a734fe935"
+ integrity sha512-NxBudgVKiRh/2aPWMgPR7bPTX0VPmGx5QBwCtdHitnqFE5/O8DeBXuIMH1nwNnw/aMo6AjOrpsHzfY3UbUJ7yg==
normalize-package-data@^2.3.2:
version "2.5.0"
@@ -2975,12 +3226,13 @@
resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4"
integrity sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q=
-opn@^5.4.0:
- version "5.5.0"
- resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc"
- integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==
+open@^7.0.3:
+ version "7.0.4"
+ resolved "https://registry.yarnpkg.com/open/-/open-7.0.4.tgz#c28a9d315e5c98340bf979fdcb2e58664aa10d83"
+ integrity sha512-brSA+/yq+b08Hsr4c8fsEW2CRzk1BmfN3SAK/5VCHQ9bdoZJ4qa/+AfR0xHjlbbZUyPkUHs1b8x1RqdyZdkVqQ==
dependencies:
- is-wsl "^1.1.0"
+ is-docker "^2.0.0"
+ is-wsl "^2.1.1"
optimist@^0.6.1:
version "0.6.1"
@@ -2995,13 +3247,6 @@
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
-p-limit@^1.1.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
- integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==
- dependencies:
- p-try "^1.0.0"
-
p-limit@^2.0.0:
version "2.2.2"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e"
@@ -3009,13 +3254,6 @@
dependencies:
p-try "^2.0.0"
-p-locate@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
- integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=
- dependencies:
- p-limit "^1.1.0"
-
p-locate@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4"
@@ -3023,11 +3261,6 @@
dependencies:
p-limit "^2.0.0"
-p-try@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
- integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=
-
p-try@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
@@ -3116,7 +3349,7 @@
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
-picomatch@^2.0.4, picomatch@^2.0.7:
+picomatch@^2.0.4, picomatch@^2.0.7, picomatch@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
@@ -3126,24 +3359,17 @@
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
-pkg-up@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f"
- integrity sha1-yBmscoBZpGHKscOImivjxJoATX8=
- dependencies:
- find-up "^2.1.0"
-
-polyfills-loader@^1.5.2:
- version "1.5.2"
- resolved "https://registry.yarnpkg.com/polyfills-loader/-/polyfills-loader-1.5.2.tgz#2fe63063da0d74aa69b611bd189d64ee443358c7"
- integrity sha512-bcv8Id4Ylae0eSmnlMpKfba36TNr1Mh7uMGN4OEIspHLGR5/IBGSBteQp/NpbZ45T7UWQuTBvVJNQCS16E1N4A==
+polyfills-loader@^1.6.1:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/polyfills-loader/-/polyfills-loader-1.6.1.tgz#134ab74b9a6160efb4d72066a5150bfb2228fad3"
+ integrity sha512-GK3jZGLy9nApfRYfHrrO4RYkBkpjiXUVWVdp169g4Y8HV+ZazrGQX46tNpbwP0dtrgHgADyJvZYPfdFuooHy5Q==
dependencies:
"@babel/core" "^7.9.0"
- "@open-wc/building-utils" "^2.16.1"
+ "@open-wc/building-utils" "^2.18.0"
"@webcomponents/webcomponentsjs" "^2.4.0"
abortcontroller-polyfill "^1.4.0"
core-js-bundle "^3.6.0"
- deepmerge "^3.2.0"
+ deepmerge "^4.2.2"
dynamic-import-polyfill "^0.1.1"
es-module-shims "^0.4.6"
html-minifier "^4.0.0"
@@ -3151,24 +3377,19 @@
parse5 "^5.1.1"
regenerator-runtime "^0.13.3"
resize-observer-polyfill "^1.5.1"
- systemjs "^4.0.0"
- terser "^4.6.4"
+ systemjs "^6.3.1"
+ terser "^4.6.7"
whatwg-fetch "^3.0.0"
portfinder@^1.0.21:
- version "1.0.25"
- resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca"
- integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==
+ version "1.0.26"
+ resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.26.tgz#475658d56ca30bed72ac7f1378ed350bd1b64e70"
+ integrity sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ==
dependencies:
async "^2.6.2"
debug "^3.1.1"
mkdirp "^0.5.1"
-private@^0.1.8:
- version "0.1.8"
- resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
- integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==
-
pseudomap@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
@@ -3258,13 +3479,6 @@
resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27"
integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==
-regenerate-unicode-properties@^8.1.0:
- version "8.1.0"
- resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e"
- integrity sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==
- dependencies:
- regenerate "^1.4.0"
-
regenerate-unicode-properties@^8.2.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec"
@@ -3273,9 +3487,9 @@
regenerate "^1.4.0"
regenerate@^1.4.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
- integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f"
+ integrity sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==
regenerator-runtime@^0.13.3, regenerator-runtime@^0.13.4:
version "0.13.5"
@@ -3283,24 +3497,11 @@
integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==
regenerator-transform@^0.14.2:
- version "0.14.4"
- resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.4.tgz#5266857896518d1616a78a0479337a30ea974cc7"
- integrity sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==
+ version "0.14.5"
+ resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.5.tgz#c98da154683671c9c4dcb16ece736517e1b7feb4"
+ integrity sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==
dependencies:
"@babel/runtime" "^7.8.4"
- private "^0.1.8"
-
-regexpu-core@^4.6.0:
- version "4.6.0"
- resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6"
- integrity sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==
- dependencies:
- regenerate "^1.4.0"
- regenerate-unicode-properties "^8.1.0"
- regjsgen "^0.5.0"
- regjsparser "^0.6.0"
- unicode-match-property-ecmascript "^1.0.4"
- unicode-match-property-value-ecmascript "^1.1.0"
regexpu-core@^4.7.0:
version "4.7.0"
@@ -3314,17 +3515,10 @@
unicode-match-property-ecmascript "^1.0.4"
unicode-match-property-value-ecmascript "^1.2.0"
-regjsgen@^0.5.0, regjsgen@^0.5.1:
- version "0.5.1"
- resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c"
- integrity sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==
-
-regjsparser@^0.6.0:
- version "0.6.2"
- resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.2.tgz#fd62c753991467d9d1ffe0a9f67f27a529024b96"
- integrity sha512-E9ghzUtoLwDekPT0DYCp+c4h+bvuUpe6rRHCTYn6eGoqj1LgKXxT6I0Il4WbjhQkOghzi/V+y03bPKvbllL93Q==
- dependencies:
- jsesc "~0.5.0"
+regjsgen@^0.5.1:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733"
+ integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==
regjsparser@^0.6.4:
version "0.6.4"
@@ -3392,17 +3586,10 @@
http-errors "~1.6.2"
path-is-absolute "1.0.1"
-resolve@^1.10.0, resolve@^1.3.2:
- version "1.15.0"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5"
- integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==
- dependencies:
- path-parse "^1.0.6"
-
-resolve@^1.11.1:
- version "1.15.1"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8"
- integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==
+resolve@^1.10.0, resolve@^1.11.1, resolve@^1.14.2, resolve@^1.3.2:
+ version "1.17.0"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444"
+ integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==
dependencies:
path-parse "^1.0.6"
@@ -3418,23 +3605,35 @@
dependencies:
glob "^7.1.3"
-rimraf@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b"
- integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==
+rimraf@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
+ integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
dependencies:
glob "^7.1.3"
+rollup@^2.7.2:
+ version "2.18.2"
+ resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.18.2.tgz#886ac6e4549e493df106c3e2580c89aeb997be25"
+ integrity sha512-+mzyZhL9ZyLB3eHBISxRNTep9Z2qCuwXzAYkUbFyz7yNKaKH03MFKeiGOS1nv2uvPgDb4ASKv+FiS5mC4h5IFQ==
+ optionalDependencies:
+ fsevents "~2.1.2"
+
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
-safe-buffer@^5.0.1, safe-buffer@^5.1.2:
+safe-buffer@^5.0.1:
version "5.2.0"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
+safe-buffer@^5.1.2:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
+ integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
+
"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
@@ -3450,11 +3649,16 @@
resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e"
integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==
-semver@^6.0.0, semver@^6.3.0:
+semver@^6.0.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
+semver@^7.3.2:
+ version "7.3.2"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
+ integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
+
set-blocking@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
@@ -3470,6 +3674,11 @@
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==
+setprototypeof@1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
+ integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
+
shady-css-scoped-element@^0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/shady-css-scoped-element/-/shady-css-scoped-element-0.0.2.tgz#c538fcfe2317e979cd02dfec533898b95b4ea8fe"
@@ -3535,9 +3744,9 @@
socket.io-parser "~3.2.0"
source-map-support@~0.5.12:
- version "0.5.16"
- resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042"
- integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==
+ version "0.5.19"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
+ integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
@@ -3553,22 +3762,22 @@
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
spdx-correct@^3.0.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4"
- integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9"
+ integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==
dependencies:
spdx-expression-parse "^3.0.0"
spdx-license-ids "^3.0.0"
spdx-exceptions@^2.1.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977"
- integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d"
+ integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==
spdx-expression-parse@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0"
- integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679"
+ integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==
dependencies:
spdx-exceptions "^2.1.0"
spdx-license-ids "^3.0.0"
@@ -3692,10 +3901,10 @@
dependencies:
has-flag "^4.0.0"
-systemjs@^4.0.0:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/systemjs/-/systemjs-4.1.1.tgz#c90061456f9707478d487b47f3b92b9896032889"
- integrity sha512-/0x3bcMrl1pxDCLw6sJWEKPVy0ZGEu7I0nItFSHxfPoDU2Lll6TUyB1wqltvbm7n5y5jVOoK4lei4oMpmW7XJQ==
+systemjs@^6.3.1:
+ version "6.3.3"
+ resolved "https://registry.yarnpkg.com/systemjs/-/systemjs-6.3.3.tgz#c0f2bec5cc72d0b36a8b971b1fa32bfc828b50d4"
+ integrity sha512-djQ6mZ4/cWKnVnhAWvr/4+5r7QHnC7WiA8sS9VuYRdEv3wYZYTIIQv8zPT79PdDSUwfX3bgvu5mZ8eTyLm2YQA==
table-layout@^1.0.0:
version "1.0.1"
@@ -3707,10 +3916,10 @@
typical "^5.2.0"
wordwrapjs "^4.0.0"
-terser@^4.6.4:
- version "4.6.10"
- resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.10.tgz#90f5bd069ff456ddbc9503b18e52f9c493d3b7c2"
- integrity sha512-qbF/3UOo11Hggsbsqm2hPa6+L4w7bkr+09FNseEe8xrcVD3APGLFqE+Oz1ZKAxjYnFsj80rLOfgAtJ0LNJjtTA==
+terser@^4.6.7:
+ version "4.8.0"
+ resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17"
+ integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"
@@ -3734,9 +3943,9 @@
thenify ">= 3.1.0 < 4"
"thenify@>= 3.1.0 < 4":
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.0.tgz#e69e38a1babe969b0108207978b9f62b88604839"
- integrity sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f"
+ integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==
dependencies:
any-promise "^1.0.0"
@@ -3784,6 +3993,11 @@
dependencies:
punycode "^2.1.0"
+tslib@^1.11.1:
+ version "1.13.0"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
+ integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==
+
tsscmp@1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb"
@@ -3825,12 +4039,9 @@
integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==
uglify-js@^3.5.1:
- version "3.8.1"
- resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.8.1.tgz#43bb15ce6f545eaa0a64c49fd29375ea09fa0f93"
- integrity sha512-W7KxyzeaQmZvUFbGj4+YFshhVrMBGSg2IbcYAjGWGvx8DHvJMclbTDMpffdxFUGPBHjIytk7KJUR/KUXstUGDw==
- dependencies:
- commander "~2.20.3"
- source-map "~0.6.1"
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.10.0.tgz#397a7e6e31ce820bfd1cb55b804ee140c587a9e7"
+ integrity sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==
ultron@~1.1.0:
version "1.1.1"
@@ -3850,20 +4061,15 @@
unicode-canonical-property-names-ecmascript "^1.0.4"
unicode-property-aliases-ecmascript "^1.0.4"
-unicode-match-property-value-ecmascript@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277"
- integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==
-
unicode-match-property-value-ecmascript@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531"
integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==
unicode-property-aliases-ecmascript@^1.0.4:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57"
- integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4"
+ integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==
universalify@^0.1.0:
version "0.1.2"
@@ -3943,9 +4149,9 @@
integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==
whatwg-fetch@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb"
- integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.1.0.tgz#49d630cdfa308dba7f2819d49d09364f540dbcc6"
+ integrity sha512-pgmbsVWKpH9GxLXZmtdowDIqtb/rvPyjjQv3z9wLcmgWKFHilKnZD3ldgrOlwJoPGOUluQsRPWd52yVkPfmI1A==
whatwg-url@^7.0.0:
version "7.1.0"
diff --git a/tools/bzl/js.bzl b/tools/bzl/js.bzl
index 5440b88..eeb5e6b 100644
--- a/tools/bzl/js.bzl
+++ b/tools/bzl/js.bzl
@@ -1,4 +1,4 @@
-load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_binary", "closure_js_library")
+load("@npm_bazel_terser//:index.bzl", "terser_minified")
load("//lib/js:npm.bzl", "NPM_SHA1S", "NPM_VERSIONS")
NPMJS = "NPMJS"
@@ -439,7 +439,7 @@
"""Combine html, js, css files and optionally split into js and html bundles."""
_bundle_rule(pkg = native.package_name(), *args, **kwargs)
-def polygerrit_plugin(name, app, srcs = [], deps = [], externs = [], assets = None, plugin_name = None, **kwargs):
+def polygerrit_plugin(name, app, srcs = [], deps = [], assets = None, plugin_name = None, **kwargs):
"""Bundles plugin dependencies for deployment.
This rule bundles all Polymer elements and JS dependencies into .html and .js files.
@@ -449,7 +449,6 @@
Args:
name: String, rule name.
app: String, the main or root source file.
- externs: Fileset, external definitions that should not be bundled.
assets: Fileset, additional files to be used by plugin in runtime, exported to "plugins/${name}/static".
plugin_name: String, plugin name. ${name} is used if not provided.
"""
@@ -473,29 +472,15 @@
else:
js_srcs = srcs
- closure_js_library(
- name = name + "_closure_lib",
- srcs = js_srcs + externs,
- convention = "GOOGLE",
- no_closure_library = True,
- deps = [
- "//lib/polymer_externs:polymer_closure",
- "//polygerrit-ui/app/externs:plugin",
- ],
+ native.filegroup(
+ name = name + "-src-fg",
+ srcs = js_srcs,
)
- closure_js_binary(
- name = name + "_bin",
- compilation_level = "WHITESPACE_ONLY",
- defs = [
- "--polymer_version=2",
- "--language_out=ECMASCRIPT_2017",
- "--rewrite_polyfills=false",
- ],
- deps = [
- name + "_closure_lib",
- ],
- dependency_mode = "PRUNE_LEGACY",
+ terser_minified(
+ name = name + ".min",
+ sourcemap = False,
+ src = name + "-src-fg",
)
if html_plugin:
@@ -519,7 +504,7 @@
native.genrule(
name = name + "_rename_js",
- srcs = [name + "_bin.js"],
+ srcs = [name + ".min"],
outs = [plugin_name + ".js"],
cmd = "cp $< $@",
output_to_bindir = True,
diff --git a/tools/js/eslint-rules/BUILD b/tools/js/eslint-rules/BUILD
new file mode 100644
index 0000000..476c4ff
--- /dev/null
+++ b/tools/js/eslint-rules/BUILD
@@ -0,0 +1,11 @@
+package(default_visibility = ["//visibility:public"])
+
+# To load eslint rules from a directory, we must pass a directory
+# name to it. We can't get the directory name in bazel, but we can calculate
+# use a file from this directory. We are using README.md for it.
+exports_files(["README.md"])
+
+filegroup(
+ name = "eslint-rules-srcs",
+ srcs = glob(["**/*.js"]),
+)
diff --git a/tools/js/eslint-rules/README.md b/tools/js/eslint-rules/README.md
new file mode 100644
index 0000000..b425d74
--- /dev/null
+++ b/tools/js/eslint-rules/README.md
@@ -0,0 +1,74 @@
+# Eslint rules for polygerrit
+This directory contains custom eslint rules for polygerrit.
+
+## ts-imports-js
+This rule must be used only for `.ts` files.
+The rule ensures that:
+* All import paths either a relative paths or module imports.
+```typescript
+// Correct imports
+import './file1'; // relative path
+import '../abc/file2'; // relative path
+import 'module_name/xyz'; // import from the module_name
+
+// Incorrect imports
+import '/usr/home/file3'; // absolute path
+```
+* All *relative* import paths has a short form (i.e. don't include extension):
+```typescript
+// Correct imports
+import './file1'; // relative path without extension
+import data from 'module_name/file2.json'; // file in a module, can be anything
+
+// Incorrect imports
+import './file1.js'; // relative path with extension
+```
+
+* Imported `.js` and `.d.ts` files both exists (only for a relative import path):
+
+Example:
+```
+polygerrit-ui/app
+ |- ex.ts
+ |- abc
+ |- correct_ts.ts
+ |- correct_js.js
+ |- correct_js.d.ts
+ |- incorrect_1.js
+ |- incorrect_2.d.ts
+```
+```typescript
+// The ex.ts file:
+// Correct imports
+import {x} from './abc/correct_js'; // correct_js.js and correct_js.d.ts exist
+import {x} from './abc/correct_ts'; // import from .ts - d.ts is not required
+
+// Incorrect imports
+import {x} from './abc/incorrect_1'; // incorrect_1.d.ts doesn't exist
+import {x} from './abc/incorrect_2'; // incorrect_2.js doesn't exist
+```
+
+To fix the last two imports 2 files must be added: `incorrect_1.d.ts` and
+`incorrect_2.js`.
+
+## goog-module-id
+Enforce correct usage of goog.declareModuleId:
+* The goog.declareModuleId must be used only in `.js` files which have
+associated `.d.ts` files.
+* The module name is correct. The correct module name is constructed from the
+file path using the folowing rules
+rules:
+ 1. Get part of the path after the '/polygerrit-ui/app/':
+ `/usr/home/gerrit/polygerrit-ui/app/elements/shared/x/y.js` ->
+ `elements/shared/x/y.js`
+ 2. Discard `.js` extension and replace all `/` with `.`:
+ `elements/shared/x/y.js` -> `elements.shared.x.y`
+ 3. Add `polygerrit.` prefix:
+ `elements.shared.x.y` -> `polygerrit.elements.shared.x.y`
+ The last string is a module name.
+
+Example:
+```javascript
+// polygerrit-ui/app/elements/shared/x/y.js
+goog.declareModuleId('polygerrit.elements.shared.x.y');
+```
diff --git a/tools/js/eslint-rules/goog-module-id.js b/tools/js/eslint-rules/goog-module-id.js
new file mode 100644
index 0000000..272e664
--- /dev/null
+++ b/tools/js/eslint-rules/goog-module-id.js
@@ -0,0 +1,159 @@
+/**
+ * @license
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+const fs = require('fs');
+const path = require('path');
+const jsExt = '.js';
+
+class NonJsValidator {
+ onProgramEnd(context, node) {
+ }
+ onGoogDeclareModuleId(context, node) {
+ context.report({
+ message: 'goog.declareModuleId is allowed only in .js files',
+ node: node,
+ });
+ }
+}
+
+class JsOnlyValidator {
+ onProgramEnd(context, node) {
+ }
+ onGoogDeclareModuleId(context, node) {
+ context.report({
+ message: 'goog.declareModuleId present, but .d.ts file doesn\'t exist. '
+ + 'Either remove goog.declareModuleId or add the .d.ts file.',
+ node: node,
+ });
+ }
+}
+
+class JsWithDtsValidator {
+ constructor() {
+ this._googDeclareModuleIdExists = false;
+ }
+ onProgramEnd(context, node) {
+ if(!this._googDeclareModuleIdExists) {
+ context.report({
+ message: 'goog.declareModuleId(...) is missed. ' +
+ 'Either add it or remove the associated .d.ts file.',
+ node: node,
+ })
+ }
+ }
+ onGoogDeclareModuleId(context, node) {
+ if(this._googDeclareModuleIdExists) {
+ context.report({
+ message: 'Duplicated goog.declareModuleId.',
+ node: node,
+ });
+ return;
+ }
+
+ const filename = context.getFilename();
+ this._googDeclareModuleIdExists = true;
+
+ const scope = context.getScope();
+ if(scope.type !== 'global' && scope.type !== 'module') {
+ context.report({
+ message: 'goog.declareModuleId is allowed only at the root level.',
+ node: node,
+ });
+ // no return - other problems are possible
+ }
+ if(node.arguments.length !== 1) {
+ context.report({
+ message: 'goog.declareModuleId must have exactly one parameter.',
+ node: node,
+ });
+ if(node.arguments.length === 0) {
+ return;
+ }
+ }
+
+ const argument = node.arguments[0];
+ if(argument.type !== 'Literal') {
+ context.report({
+ message: 'The argument for the declareModuleId method '
+ + 'must be a string literal.',
+ node: argument,
+ });
+ return;
+ }
+ const pathStart = '/polygerrit-ui/app/';
+ const index = filename.lastIndexOf(pathStart);
+ if(index < 0) {
+ context.report({
+ message: 'The file located outside of polygerrit-ui/app directory. ' +
+ 'Please check eslint config.',
+ node: argument,
+ });
+ return;
+ }
+ const expectedName = 'polygerrit.' +
+ filename.slice(index + pathStart.length, -jsExt.length)
+ .replace('/', '.');
+ if(argument.value !== expectedName) {
+ context.report({
+ message: `Invalid module id. It must be '${expectedName}'.`,
+ node: argument,
+ fix: function(fixer) {
+ return fixer.replaceText(argument, `'${expectedName}'`);
+ },
+ });
+ }
+ }
+}
+
+module.exports = {
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Check that goog.declareModuleId is valid',
+ category: 'TS imports JS errors',
+ recommended: false,
+ },
+ fixable: "code",
+ schema: [],
+ },
+ create: function (context) {
+ let fileValidator;
+ return {
+ Program: function(node) {
+ const filename = context.getFilename();
+ if(filename.endsWith(jsExt)) {
+ const dtsFilename = filename.slice(0, -jsExt.length) + ".d.ts";
+ if(fs.existsSync(dtsFilename)) {
+ fileValidator = new JsWithDtsValidator();
+ } else {
+ fileValidator = new JsOnlyValidator();
+ }
+ }
+ else {
+ fileValidator = new NonJsValidator();
+ }
+ },
+ "Program:exit": function(node) {
+ fileValidator.onProgramEnd(context, node);
+ fileValidator = null;
+ },
+ 'ExpressionStatement > CallExpression[callee.property.name="declareModuleId"][callee.object.name="goog"]': function(node) {
+ fileValidator.onGoogDeclareModuleId(context, node);
+ }
+ };
+ },
+};
diff --git a/tools/js/eslint-rules/ts-imports-js.js b/tools/js/eslint-rules/ts-imports-js.js
new file mode 100644
index 0000000..69155ea
--- /dev/null
+++ b/tools/js/eslint-rules/ts-imports-js.js
@@ -0,0 +1,100 @@
+/**
+ * @license
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+const path = require('path');
+const fs = require('fs');
+
+function checkImportValid(context, node) {
+ const file = context.getFilename();
+ const importSource = node.source.value;
+
+ if(importSource.startsWith('/')) {
+ return {
+ message: 'Do not use absolute path for import.',
+ };
+ }
+ if(!importSource.startsWith('./') && !importSource.startsWith('../')) {
+ // Import from node_modules - nothing to check
+ return null;
+ }
+
+ const targetFile = path.resolve(path.dirname(file), importSource);
+ if(path.extname(targetFile) !== '') {
+ return {
+ message: 'Do not specify extensions for import path.'
+ };
+ }
+
+ if(fs.existsSync(targetFile + ".ts")) {
+ // .ts file exists - nothing to check
+ return null;
+ }
+
+ const jsFileExists = fs.existsSync(targetFile + '.js');
+ const dtsFileExists = fs.existsSync(targetFile + '.d.ts');
+
+ if(jsFileExists && !dtsFileExists) {
+ return {
+ message: `The '${importSource}.d.ts' file doesn't exist.`
+ };
+ }
+
+ if(!jsFileExists && dtsFileExists) {
+ return {
+ message: `The '${importSource}.js' file doesn't exist.`
+ };
+ }
+ // If both files (.js and .d.ts) don't exist, the error is reported by
+ // the typescript compiler. Do not report anything from the rule.
+ return null;
+}
+
+module.exports = {
+ meta: {
+ type: "problem",
+ docs: {
+ description: "Check that TS file can import specific JS file",
+ category: "TS imports JS errors",
+ recommended: false
+ },
+ schema: [],
+ },
+ create: function (context) {
+ return {
+ Program: function(node) {
+ const filename = context.getFilename();
+ if(filename.endsWith('.ts') && !filename.endsWith('.d.ts')) {
+ return;
+ }
+ context.report({
+ message: 'The rule must be used only with .ts files. ' +
+ 'Check eslint settings.',
+ node: node,
+ });
+ },
+ ImportDeclaration: function (node) {
+ const importProblem = checkImportValid(context, node);
+ if(importProblem) {
+ context.report({
+ message: importProblem.message,
+ node: node.source,
+ });
+ }
+ }
+ };
+ }
+};
diff --git a/tools/js/eslint.bzl b/tools/js/eslint.bzl
index bd2bc32..586b1c5 100644
--- a/tools/js/eslint.bzl
+++ b/tools/js/eslint.bzl
@@ -40,10 +40,24 @@
bazel run {name}_test -- --fix $(pwd)/polygerrit-ui/app
"""
entry_point = "@npm//:node_modules/eslint/bin/eslint.js"
+
+ # There are custom eslint rules in eslint-rules directory. Eslint loads
+ # custom rules from a directory specified with the --rulesdir argument.
+ # When bazel runs eslint, it places the eslint-rules directory into
+ # some location in the filesystem, and the location is not known in advance.
+ # It is not possible to get the directory location in bazel directly.
+ # Instead, we can use dirname to get a directory for a file in the
+ # eslint-rules directory.
+ # README.md is the most "stable" file in the eslint-rules directory
+ # (i.e. it is unlikely will be removed), and we are using it to calculate
+ # exact directory path in bazel.
+ eslint_rules_toplevel_file = "//tools/js/eslint-rules:README.md"
bin_data = [
"@npm//eslint:eslint",
config,
ignore,
+ "//tools/js/eslint-rules:eslint-rules-srcs",
+ eslint_rules_toplevel_file,
] + plugins + data
common_templated_args = [
"--ext",
@@ -55,6 +69,9 @@
"$$(rlocation $(rootpath {}))".format(config),
"--ignore-path",
"$$(rlocation $(rootpath {}))".format(ignore),
+ # Load custom rules from eslint-rules directory
+ "--rulesdir",
+ "$$(dirname $$(rlocation $(rootpath {})))".format(eslint_rules_toplevel_file),
]
nodejs_test(
name = name + "_test",
diff --git a/tools/node_tools/BUILD b/tools/node_tools/BUILD
index 4019542..03e3a13 100644
--- a/tools/node_tools/BUILD
+++ b/tools/node_tools/BUILD
@@ -36,3 +36,12 @@
# ts service in background). It works without any workaround.
entry_point = "@tools_npm//:node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js",
)
+
+# Wrap a typescript into a tsc-bin binary.
+# The tsc-bin can be used as a tool to compile typescript code.
+nodejs_binary(
+ name = "tsc-bin",
+ # Point bazel to your node_modules to find the entry point
+ data = ["@tools_npm//:node_modules"],
+ entry_point = "@tools_npm//:node_modules/typescript/lib/tsc.js",
+)
diff --git a/tools/node_tools/node_modules_licenses/tsconfig.json b/tools/node_tools/node_modules_licenses/tsconfig.json
index 2854857..2046c394 100644
--- a/tools/node_tools/node_modules_licenses/tsconfig.json
+++ b/tools/node_tools/node_modules_licenses/tsconfig.json
@@ -6,7 +6,7 @@
"esModuleInterop": true,
"strict": true,
"moduleResolution": "node",
- "outDir": "out",
+ "outDir": "../../../.ts-out/tools/node_modules_licenses", // Not used in bazel,
"types": ["node"]
},
"include": ["*.ts"]
diff --git a/tools/node_tools/utils/tsconfig.json b/tools/node_tools/utils/tsconfig.json
index 34ffb2f..56ab91b 100644
--- a/tools/node_tools/utils/tsconfig.json
+++ b/tools/node_tools/utils/tsconfig.json
@@ -6,7 +6,7 @@
"esModuleInterop": true,
"strict": true,
"moduleResolution": "node",
- "outDir": "out"
+ "outDir": "../../../.ts-out/tools/utils" // Not used in bazel
},
"include": ["*.ts"]
}
diff --git a/yarn.lock b/yarn.lock
index e7423a2..0c4383f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -490,6 +490,11 @@
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-1.6.1.tgz#7ec9d39a3fca23256fca55410339724804802616"
integrity sha512-FhblJkpd8VKl9txhAAIotSsIOHRpPd2FgJG7Op3uV7LfaCVBmUs3XDBZCgfwt5wmEpd3lwCHA1Ei+O/URS2+5w==
+"@bazel/terser@^1.7.0":
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-1.7.0.tgz#c43e711e13b9a71c7abd3ade04fb4650d547ad01"
+ integrity sha512-u/UXk0WUinvkk1g5xxfqGieBz3r12Bj2y2m25lC5GjHBgCpGk7DyeGGi9H3QQNO1Wmpw51QSE9gaPzKzjUVGug==
+
"@bazel/typescript@^1.6.1":
version "1.6.1"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.6.1.tgz#1bf83c20021d359bc9b532181981ac540584a30c"
@@ -631,6 +636,18 @@
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=
+"@sindresorhus/is@^0.14.0":
+ version "0.14.0"
+ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
+ integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==
+
+"@szmarczak/http-timer@^1.1.2":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
+ integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==
+ dependencies:
+ defer-to-connect "^1.0.1"
+
"@types/babel-generator@^6.25.1":
version "6.25.3"
resolved "https://registry.yarnpkg.com/@types/babel-generator/-/babel-generator-6.25.3.tgz#8f06caa12d0595a0538560abe771966d77d29286"
@@ -713,6 +730,11 @@
resolved "https://registry.yarnpkg.com/@types/clone/-/clone-0.1.30.tgz#e7365648c1b42136a59c7d5040637b3b5c83b614"
integrity sha1-5zZWSMG0ITalnH1QQGN7O1yDthQ=
+"@types/color-name@^1.1.1":
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
+ integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
+
"@types/compression@^0.0.33":
version "0.0.33"
resolved "https://registry.yarnpkg.com/@types/compression/-/compression-0.0.33.tgz#95dc733a2339aa846381d7f1377792d2553dc27d"
@@ -754,6 +776,11 @@
resolved "https://registry.yarnpkg.com/@types/escape-html/-/escape-html-0.0.20.tgz#cae698714dd61ebee5ab3f2aeb9a34ba1011735a"
integrity sha512-6dhZJLbA7aOwkYB2GDGdIqJ20wmHnkDzaxV9PJXe7O02I2dSFTERzRB6JrX6cWKaS+VqhhY7cQUMCbO5kloFUw==
+"@types/eslint-visitor-keys@^1.0.0":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"
+ integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==
+
"@types/estree@0.0.39":
version "0.0.39"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
@@ -859,6 +886,11 @@
resolved "https://registry.yarnpkg.com/@types/is-windows/-/is-windows-0.2.0.tgz#6f24ee48731d31168ea510610d6dd15e5fc9c6ff"
integrity sha1-byTuSHMdMRaOpRBhDW3RXl/Jxv8=
+"@types/json-schema@^7.0.3":
+ version "7.0.5"
+ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd"
+ integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==
+
"@types/launchpad@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@types/launchpad/-/launchpad-0.6.0.tgz#37296109b7f277f6e6c5fd7e0c0706bc918fbb51"
@@ -886,6 +918,11 @@
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
+"@types/minimist@^1.2.0":
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6"
+ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=
+
"@types/mz@0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/mz/-/mz-0.0.29.tgz#bc24728c649973f1c7851e9033f9ce525668c27b"
@@ -916,6 +953,11 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-4.9.3.tgz#a24697a8157ab517996afe0c88fa716550ae419a"
integrity sha512-Q9eESThBvAbfEzznF1qTAKUoPbJEbK3lTSO0S3mICvmG/vUSZ+HnCtidpuB58Po7CJt5A2goKsDiYScN8d1V4A==
+"@types/normalize-package-data@^2.4.0":
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
+ integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
+
"@types/opn@^3.0.28":
version "3.0.28"
resolved "https://registry.yarnpkg.com/@types/opn/-/opn-3.0.28.tgz#097d0d1c9b5749573a5d96df132387bb6d02118a"
@@ -1190,6 +1232,49 @@
"@types/events" "*"
"@types/inquirer" "*"
+"@typescript-eslint/eslint-plugin@2.31.0":
+ version "2.31.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.31.0.tgz#942c921fec5e200b79593c71fafb1e3f57aa2e36"
+ integrity sha512-iIC0Pb8qDaoit+m80Ln/aaeu9zKQdOLF4SHcGLarSeY1gurW6aU4JsOPMjKQwXlw70MvWKZQc6S2NamA8SJ/gg==
+ dependencies:
+ "@typescript-eslint/experimental-utils" "2.31.0"
+ functional-red-black-tree "^1.0.1"
+ regexpp "^3.0.0"
+ tsutils "^3.17.1"
+
+"@typescript-eslint/experimental-utils@2.31.0":
+ version "2.31.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.31.0.tgz#a9ec514bf7fd5e5e82bc10dcb6a86d58baae9508"
+ integrity sha512-MI6IWkutLYQYTQgZ48IVnRXmLR/0Q6oAyJgiOror74arUMh7EWjJkADfirZhRsUMHeLJ85U2iySDwHTSnNi9vA==
+ dependencies:
+ "@types/json-schema" "^7.0.3"
+ "@typescript-eslint/typescript-estree" "2.31.0"
+ eslint-scope "^5.0.0"
+ eslint-utils "^2.0.0"
+
+"@typescript-eslint/parser@2.31.0":
+ version "2.31.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.31.0.tgz#beddd4e8efe64995108b229b2862cd5752d40d6f"
+ integrity sha512-uph+w6xUOlyV2DLSC6o+fBDzZ5i7+3/TxAsH4h3eC64tlga57oMb96vVlXoMwjR/nN+xyWlsnxtbDkB46M2EPQ==
+ dependencies:
+ "@types/eslint-visitor-keys" "^1.0.0"
+ "@typescript-eslint/experimental-utils" "2.31.0"
+ "@typescript-eslint/typescript-estree" "2.31.0"
+ eslint-visitor-keys "^1.1.0"
+
+"@typescript-eslint/typescript-estree@2.31.0":
+ version "2.31.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.31.0.tgz#ac536c2d46672aa1f27ba0ec2140d53670635cfd"
+ integrity sha512-vxW149bXFXXuBrAak0eKHOzbcu9cvi6iNcJDzEtOkRwGHxJG15chiAQAwhLOsk+86p9GTr/TziYvw+H9kMaIgA==
+ dependencies:
+ debug "^4.1.1"
+ eslint-visitor-keys "^1.1.0"
+ glob "^7.1.6"
+ is-glob "^4.0.1"
+ lodash "^4.17.15"
+ semver "^6.3.0"
+ tsutils "^3.17.1"
+
"@webcomponents/webcomponentsjs@^1.0.7":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@webcomponents/webcomponentsjs/-/webcomponentsjs-1.3.3.tgz#5bb82a0d3210c836bd4623e13a4a93145cb9dc27"
@@ -1301,6 +1386,13 @@
dependencies:
string-width "^2.0.0"
+ansi-align@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb"
+ integrity sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==
+ dependencies:
+ string-width "^3.0.0"
+
ansi-escapes@^1.1.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
@@ -1350,6 +1442,14 @@
dependencies:
color-convert "^1.9.0"
+ansi-styles@^4.1.0:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359"
+ integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==
+ dependencies:
+ "@types/color-name" "^1.1.1"
+ color-convert "^2.0.1"
+
ansi-styles@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178"
@@ -1520,6 +1620,11 @@
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=
+arrify@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa"
+ integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==
+
asn1@~0.2.3:
version "0.2.4"
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
@@ -2048,6 +2153,20 @@
term-size "^1.2.0"
widest-line "^2.0.0"
+boxen@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/boxen/-/boxen-4.2.0.tgz#e411b62357d6d6d36587c8ac3d5d974daa070e64"
+ integrity sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==
+ dependencies:
+ ansi-align "^3.0.0"
+ camelcase "^5.3.1"
+ chalk "^3.0.0"
+ cli-boxes "^2.2.0"
+ string-width "^4.1.0"
+ term-size "^2.1.0"
+ type-fest "^0.8.1"
+ widest-line "^3.1.0"
+
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -2177,6 +2296,19 @@
union-value "^1.0.0"
unset-value "^1.0.0"
+cacheable-request@^6.0.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912"
+ integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==
+ dependencies:
+ clone-response "^1.0.2"
+ get-stream "^5.1.0"
+ http-cache-semantics "^4.0.0"
+ keyv "^3.0.0"
+ lowercase-keys "^2.0.0"
+ normalize-url "^4.1.0"
+ responselike "^1.0.2"
+
call-me-maybe@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b"
@@ -2208,6 +2340,15 @@
camelcase "^2.0.0"
map-obj "^1.0.0"
+camelcase-keys@^6.2.2:
+ version "6.2.2"
+ resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0"
+ integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==
+ dependencies:
+ camelcase "^5.3.1"
+ map-obj "^4.0.0"
+ quick-lru "^4.0.1"
+
camelcase@^2.0.0, camelcase@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
@@ -2218,6 +2359,16 @@
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=
+camelcase@^5.0.0, camelcase@^5.3.1:
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
+ integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
+
+camelcase@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.0.0.tgz#5259f7c30e35e278f1bdc2a4d91230b37cad981e"
+ integrity sha512-8KMDF1Vz2gzOq54ONPJS65IvTUaB1cHJ2DMM7MbPmLZljDH1qpzzLsWdiN9pHh6qvkRVDTi/07+eNGch/oLU4w==
+
cancel-token@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/cancel-token/-/cancel-token-0.1.1.tgz#c18197674bb1c84c1d6933ebf15d8d5a5ce79b4f"
@@ -2255,6 +2406,22 @@
strip-ansi "^3.0.0"
supports-color "^2.0.0"
+chalk@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
+ integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
+ dependencies:
+ ansi-styles "^4.1.0"
+ supports-color "^7.1.0"
+
+chalk@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
+ integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
+ dependencies:
+ ansi-styles "^4.1.0"
+ supports-color "^7.1.0"
+
chalk@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f"
@@ -2317,6 +2484,11 @@
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497"
integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==
+ci-info@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
+ integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
+
class-utils@^0.3.5:
version "0.3.6"
resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
@@ -2344,6 +2516,11 @@
resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143"
integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM=
+cli-boxes@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d"
+ integrity sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==
+
cli-cursor@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
@@ -2382,6 +2559,13 @@
resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg=
+clone-response@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
+ integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
+ dependencies:
+ mimic-response "^1.0.0"
+
clone-stats@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"
@@ -2431,11 +2615,23 @@
dependencies:
color-name "1.1.3"
+color-convert@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+ integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
+ dependencies:
+ color-name "~1.1.4"
+
color-name@1.1.3, color-name@^1.0.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+color-name@~1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+ integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+
color-string@^1.5.2:
version "1.5.3"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc"
@@ -2514,7 +2710,7 @@
resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==
-commander@^2.19.0:
+commander@^2.19.0, commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
@@ -2626,6 +2822,18 @@
write-file-atomic "^2.0.0"
xdg-basedir "^3.0.0"
+configstore@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96"
+ integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==
+ dependencies:
+ dot-prop "^5.2.0"
+ graceful-fs "^4.1.2"
+ make-dir "^3.0.0"
+ unique-string "^2.0.0"
+ write-file-atomic "^3.0.0"
+ xdg-basedir "^4.0.0"
+
console-control-strings@^1.0.0, console-control-strings@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
@@ -2735,6 +2943,15 @@
shebang-command "^1.2.0"
which "^1.2.9"
+cross-spawn@^7.0.0:
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
+ integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
+ dependencies:
+ path-key "^3.1.0"
+ shebang-command "^2.0.0"
+ which "^2.0.1"
+
crypt@~0.0.1:
version "0.0.2"
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
@@ -2745,6 +2962,11 @@
resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e"
integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=
+crypto-random-string@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5"
+ integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==
+
css-select@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858"
@@ -2828,7 +3050,15 @@
dependencies:
ms "2.0.0"
-decamelize@^1.1.2:
+decamelize-keys@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9"
+ integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=
+ dependencies:
+ decamelize "^1.1.0"
+ map-obj "^1.0.0"
+
+decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
@@ -2838,7 +3068,7 @@
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
-decompress-response@^3.2.0:
+decompress-response@^3.2.0, decompress-response@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
@@ -2865,6 +3095,11 @@
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.0.0.tgz#3e3110ca29205f120d7cb064960a39c3d2087c09"
integrity sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww==
+defer-to-connect@^1.0.1:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591"
+ integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==
+
define-properties@^1.1.2, define-properties@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
@@ -3101,6 +3336,13 @@
dependencies:
is-obj "^1.0.0"
+dot-prop@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb"
+ integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==
+ dependencies:
+ is-obj "^2.0.0"
+
duplexer2@^0.1.2, duplexer2@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
@@ -3315,6 +3557,11 @@
resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-6.0.2.tgz#525c23725b8510f5f1f2feb5a1fbad93a93e29b4"
integrity sha512-eO6vFm0JvqGzjWIQA6QVKjxpmELfhWbDUWHm1rPfIbn55mhKPiAa5xpLmQWJrNa629ZIeQ8ZvMAi13kvrjK6Mg==
+escape-goat@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675"
+ integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==
+
escape-html@^1.0.3, escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
@@ -3330,6 +3577,13 @@
resolved "https://registry.yarnpkg.com/eslint-config-google/-/eslint-config-google-0.13.0.tgz#e277d16d2cb25c1ffd3fd13fb0035ad7421382fe"
integrity sha512-ELgMdOIpn0CFdsQS+FuxO+Ttu4p+aLaXHv9wA9yVnzqlUGV7oN/eRRnJekk7TCur6Cu2FXX0fqfIXRBaM14lpQ==
+eslint-config-prettier@^6.10.1:
+ version "6.11.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1"
+ integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==
+ dependencies:
+ get-stdin "^6.0.0"
+
eslint-import-resolver-node@^0.3.2:
version "0.3.3"
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz#dbaa52b6b2816b50bc6711af75422de808e98404"
@@ -3346,6 +3600,14 @@
debug "^2.6.9"
pkg-dir "^2.0.0"
+eslint-plugin-es@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893"
+ integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==
+ dependencies:
+ eslint-utils "^2.0.0"
+ regexpp "^3.0.0"
+
eslint-plugin-html@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-html/-/eslint-plugin-html-6.0.0.tgz#28e5c3e71e6f612e07e73d7c215e469766628c13"
@@ -3385,6 +3647,25 @@
semver "^6.3.0"
spdx-expression-parse "^3.0.0"
+eslint-plugin-node@^11.1.0:
+ version "11.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d"
+ integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==
+ dependencies:
+ eslint-plugin-es "^3.0.0"
+ eslint-utils "^2.0.0"
+ ignore "^5.1.1"
+ minimatch "^3.0.4"
+ resolve "^1.10.1"
+ semver "^6.1.0"
+
+eslint-plugin-prettier@^3.1.2:
+ version "3.1.4"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz#168ab43154e2ea57db992a2cd097c828171f75c2"
+ integrity sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==
+ dependencies:
+ prettier-linter-helpers "^1.0.0"
+
eslint-plugin-prettier@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz#ae116a0fc0e598fdae48743a4430903de5b4e6ca"
@@ -3407,12 +3688,19 @@
dependencies:
eslint-visitor-keys "^1.1.0"
+eslint-utils@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
+ integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
+ dependencies:
+ eslint-visitor-keys "^1.1.0"
+
eslint-visitor-keys@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
-eslint@^6.6.0:
+eslint@^6.6.0, eslint@^6.8.0:
version "6.8.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb"
integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==
@@ -3537,6 +3825,21 @@
signal-exit "^3.0.0"
strip-eof "^1.0.0"
+execa@^4.0.0:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.2.tgz#ad87fb7b2d9d564f70d2b62d511bee41d5cbb240"
+ integrity sha512-QI2zLa6CjGWdiQsmSkZoGtDx2N+cQIGb3yNolGTdjSQzydzLgYYf8LRuagp7S7fPimjcrzUDSUFd/MgzELMi4Q==
+ dependencies:
+ cross-spawn "^7.0.0"
+ get-stream "^5.0.0"
+ human-signals "^1.1.1"
+ is-stream "^2.0.0"
+ merge-stream "^2.0.0"
+ npm-run-path "^4.0.0"
+ onetime "^5.1.0"
+ signal-exit "^3.0.2"
+ strip-final-newline "^2.0.0"
+
exit-hook@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8"
@@ -3858,6 +4161,14 @@
dependencies:
locate-path "^3.0.0"
+find-up@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
+ integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
+ dependencies:
+ locate-path "^5.0.0"
+ path-exists "^4.0.0"
+
findup-sync@^0.4.2:
version "0.4.3"
resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12"
@@ -4043,18 +4354,30 @@
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=
+get-stdin@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
+ integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==
+
get-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=
-get-stream@^4.0.0:
+get-stream@^4.0.0, get-stream@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
dependencies:
pump "^3.0.0"
+get-stream@^5.0.0, get-stream@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9"
+ integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==
+ dependencies:
+ pump "^3.0.0"
+
get-value@^2.0.3, get-value@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
@@ -4165,7 +4488,7 @@
once "^1.3.0"
path-is-absolute "^1.0.0"
-glob@^7.1.3, glob@^7.1.4:
+glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
@@ -4184,6 +4507,13 @@
dependencies:
ini "^1.3.4"
+global-dirs@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.0.1.tgz#acdf3bb6685bcd55cb35e8a052266569e9469201"
+ integrity sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==
+ dependencies:
+ ini "^1.3.5"
+
global-modules@^0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d"
@@ -4342,6 +4672,23 @@
url-parse-lax "^1.0.0"
url-to-options "^1.0.1"
+got@^9.6.0:
+ version "9.6.0"
+ resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85"
+ integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==
+ dependencies:
+ "@sindresorhus/is" "^0.14.0"
+ "@szmarczak/http-timer" "^1.1.2"
+ cacheable-request "^6.0.0"
+ decompress-response "^3.3.0"
+ duplexer3 "^0.1.4"
+ get-stream "^4.1.0"
+ lowercase-keys "^1.0.1"
+ mimic-response "^1.0.1"
+ p-cancelable "^1.0.0"
+ to-readable-stream "^1.0.0"
+ url-parse-lax "^3.0.0"
+
graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.3:
version "4.2.0"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b"
@@ -4359,6 +4706,27 @@
dependencies:
lodash "^4.17.2"
+gts@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/gts/-/gts-2.0.2.tgz#b8b28de99361b5c5c24db30a375a0f546bbc04a4"
+ integrity sha512-SLytzl2IqKXf6kGULwr07XQ9lVsvjrzFD3OAA7DEfIQYuD+lKBPt/cZ/RYGxaWerY4PTfmnXT7KdxEr9Ec8uHQ==
+ dependencies:
+ "@typescript-eslint/eslint-plugin" "2.31.0"
+ "@typescript-eslint/parser" "2.31.0"
+ chalk "^4.0.0"
+ eslint "^6.8.0"
+ eslint-config-prettier "^6.10.1"
+ eslint-plugin-node "^11.1.0"
+ eslint-plugin-prettier "^3.1.2"
+ execa "^4.0.0"
+ inquirer "^7.1.0"
+ meow "^7.0.0"
+ ncp "^2.0.0"
+ prettier "^2.0.4"
+ rimraf "^3.0.2"
+ update-notifier "^4.1.0"
+ write-file-atomic "^3.0.3"
+
gulp-if@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/gulp-if/-/gulp-if-2.0.2.tgz#a497b7e7573005041caa2bc8b7dda3c80444d629"
@@ -4416,6 +4784,11 @@
ajv "^6.5.5"
har-schema "^2.0.0"
+hard-rejection@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883"
+ integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==
+
has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
@@ -4445,6 +4818,11 @@
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
+has-flag@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+ integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+
has-symbol-support-x@^1.4.1:
version "1.4.2"
resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455"
@@ -4503,6 +4881,11 @@
is-number "^3.0.0"
kind-of "^4.0.0"
+has-yarn@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77"
+ integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==
+
has@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
@@ -4562,6 +4945,11 @@
inherits "^2.0.1"
readable-stream "^3.1.1"
+http-cache-semantics@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
+ integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==
+
http-deceiver@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87"
@@ -4632,6 +5020,11 @@
agent-base "^4.3.0"
debug "^3.1.0"
+human-signals@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
+ integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
+
iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
@@ -4661,6 +5054,11 @@
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
+ignore@^5.1.1:
+ version "5.1.8"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
+ integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==
+
import-fresh@^3.0.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66"
@@ -4686,6 +5084,11 @@
dependencies:
repeating "^2.0.0"
+indent-string@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"
+ integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==
+
indent@0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/indent/-/indent-0.0.2.tgz#8c79f080190559b687034b84c7aefa97d5a911d9"
@@ -4714,7 +5117,7 @@
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
-ini@^1.3.4, ini@~1.3.0:
+ini@^1.3.4, ini@^1.3.5, ini@~1.3.0:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
@@ -4777,6 +5180,25 @@
strip-ansi "^5.1.0"
through "^2.3.6"
+inquirer@^7.1.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.2.0.tgz#63ce99d823090de7eb420e4bb05e6f3449aa389a"
+ integrity sha512-E0c4rPwr9ByePfNlTIB8z51kK1s2n6jrHuJeEHENl/sbq2G/S1auvibgEwNR4uSyiU+PiYHqSwsgGiXjG8p5ZQ==
+ dependencies:
+ ansi-escapes "^4.2.1"
+ chalk "^3.0.0"
+ cli-cursor "^3.1.0"
+ cli-width "^2.0.0"
+ external-editor "^3.0.3"
+ figures "^3.0.0"
+ lodash "^4.17.15"
+ mute-stream "0.0.8"
+ run-async "^2.4.0"
+ rxjs "^6.5.3"
+ string-width "^4.1.0"
+ strip-ansi "^6.0.0"
+ through "^2.3.6"
+
interpret@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296"
@@ -4847,6 +5269,13 @@
dependencies:
ci-info "^1.5.0"
+is-ci@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c"
+ integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==
+ dependencies:
+ ci-info "^2.0.0"
+
is-data-descriptor@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
@@ -4981,11 +5410,24 @@
global-dirs "^0.1.0"
is-path-inside "^1.0.0"
+is-installed-globally@^0.3.1:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141"
+ integrity sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==
+ dependencies:
+ global-dirs "^2.0.1"
+ is-path-inside "^3.0.1"
+
is-npm@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4"
integrity sha1-8vtjpl5JBbQGyGBydloaTceTufQ=
+is-npm@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-4.0.0.tgz#c90dd8380696df87a7a6d823c20d0b12bbe3c84d"
+ integrity sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==
+
is-number@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
@@ -5010,6 +5452,11 @@
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8=
+is-obj@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982"
+ integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==
+
is-object@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470"
@@ -5034,6 +5481,11 @@
dependencies:
path-is-inside "^1.0.1"
+is-path-inside@^3.0.1:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017"
+ integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==
+
is-plain-obj@^1.0.0, is-plain-obj@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
@@ -5102,6 +5554,11 @@
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
+is-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
+ integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
+
is-string@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6"
@@ -5114,7 +5571,7 @@
dependencies:
has-symbols "^1.0.1"
-is-typedarray@~1.0.0:
+is-typedarray@^1.0.0, is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
@@ -5139,6 +5596,11 @@
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
+is-yarn-global@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232"
+ integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==
+
isarray@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
@@ -5248,6 +5710,11 @@
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=
+json-buffer@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
+ integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
+
json-parse-better-errors@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
@@ -5295,6 +5762,13 @@
json-schema "0.2.3"
verror "1.10.0"
+keyv@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9"
+ integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==
+ dependencies:
+ json-buffer "3.0.0"
+
kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
version "3.2.2"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
@@ -5319,6 +5793,11 @@
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==
+kind-of@^6.0.3:
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
+ integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
+
kuler@1.0.x:
version "1.0.1"
resolved "https://registry.yarnpkg.com/kuler/-/kuler-1.0.1.tgz#ef7c784f36c9fb6e16dd3150d152677b2b0228a6"
@@ -5340,6 +5819,13 @@
dependencies:
package-json "^4.0.0"
+latest-version@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face"
+ integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==
+ dependencies:
+ package-json "^6.3.0"
+
launchpad@^0.7.0:
version "0.7.4"
resolved "https://registry.yarnpkg.com/launchpad/-/launchpad-0.7.4.tgz#08a7a38f48b963e73dc68be84f9f8f974c46c26b"
@@ -5374,6 +5860,11 @@
prelude-ls "~1.1.2"
type-check "~0.3.2"
+lines-and-columns@^1.1.6:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
+ integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
+
load-json-file@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
@@ -5421,6 +5912,13 @@
p-locate "^3.0.0"
path-exists "^3.0.0"
+locate-path@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
+ integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
+ dependencies:
+ p-locate "^4.1.0"
+
lodash._reinterpolate@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
@@ -5587,11 +6085,16 @@
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac"
integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw=
-lowercase-keys@^1.0.0:
+lowercase-keys@^1.0.0, lowercase-keys@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==
+lowercase-keys@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
+ integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
+
lru-cache@^4.0.1, lru-cache@^4.0.2:
version "4.1.5"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
@@ -5619,6 +6122,13 @@
dependencies:
pify "^3.0.0"
+make-dir@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
+ integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==
+ dependencies:
+ semver "^6.0.0"
+
map-cache@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
@@ -5629,6 +6139,11 @@
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=
+map-obj@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.1.0.tgz#b91221b542734b9f14256c0132c897c5d7256fd5"
+ integrity sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g==
+
map-visit@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
@@ -5704,6 +6219,25 @@
redent "^1.0.0"
trim-newlines "^1.0.0"
+meow@^7.0.0:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/meow/-/meow-7.0.1.tgz#1ed4a0a50b3844b451369c48362eb0515f04c1dc"
+ integrity sha512-tBKIQqVrAHqwit0vfuFPY3LlzJYkEOFyKa3bPgxzNl6q/RtN8KQ+ALYEASYuFayzSAsjlhXj/JZ10rH85Q6TUw==
+ dependencies:
+ "@types/minimist" "^1.2.0"
+ arrify "^2.0.1"
+ camelcase "^6.0.0"
+ camelcase-keys "^6.2.2"
+ decamelize-keys "^1.1.0"
+ hard-rejection "^2.1.0"
+ minimist-options "^4.0.2"
+ normalize-package-data "^2.5.0"
+ read-pkg-up "^7.0.1"
+ redent "^3.0.0"
+ trim-newlines "^3.0.0"
+ type-fest "^0.13.1"
+ yargs-parser "^18.1.3"
+
merge-descriptors@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
@@ -5716,6 +6250,11 @@
dependencies:
readable-stream "^2.0.1"
+merge-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
+ integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
+
merge2@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5"
@@ -5813,11 +6352,16 @@
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
-mimic-response@^1.0.0:
+mimic-response@^1.0.0, mimic-response@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
+min-indent@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869"
+ integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==
+
minimalistic-assert@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
@@ -5837,6 +6381,15 @@
dependencies:
brace-expansion "^1.1.7"
+minimist-options@^4.0.2:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619"
+ integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==
+ dependencies:
+ arrify "^1.0.1"
+ is-plain-obj "^1.1.0"
+ kind-of "^6.0.3"
+
minimist@0.0.8, minimist@~0.0.1:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
@@ -5985,6 +6538,11 @@
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
+ncp@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3"
+ integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=
+
needle@^2.2.1:
version "2.3.0"
resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.0.tgz#ce3fea21197267bacb310705a7bbe24f2a3a3492"
@@ -6053,7 +6611,7 @@
abbrev "1"
osenv "^0.1.4"
-normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
+normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==
@@ -6075,6 +6633,11 @@
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
+normalize-url@^4.1.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
+ integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
+
npm-bundled@^1.0.1:
version "1.0.6"
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd"
@@ -6095,6 +6658,13 @@
dependencies:
path-key "^2.0.0"
+npm-run-path@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
+ integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
+ dependencies:
+ path-key "^3.0.0"
+
npmlog@^4.0.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
@@ -6322,6 +6892,11 @@
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa"
integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==
+p-cancelable@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc"
+ integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==
+
p-finally@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
@@ -6341,6 +6916,13 @@
dependencies:
p-try "^2.0.0"
+p-limit@^2.2.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
+ integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
+ dependencies:
+ p-try "^2.0.0"
+
p-locate@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
@@ -6355,6 +6937,13 @@
dependencies:
p-limit "^2.0.0"
+p-locate@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
+ integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
+ dependencies:
+ p-limit "^2.2.0"
+
p-map@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b"
@@ -6397,6 +6986,16 @@
registry-url "^3.0.3"
semver "^5.1.0"
+package-json@^6.3.0:
+ version "6.5.0"
+ resolved "https://registry.yarnpkg.com/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0"
+ integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==
+ dependencies:
+ got "^9.6.0"
+ registry-auth-token "^4.0.0"
+ registry-url "^5.0.0"
+ semver "^6.2.0"
+
pako@~0.2.0:
version "0.2.9"
resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75"
@@ -6441,6 +7040,16 @@
error-ex "^1.3.1"
json-parse-better-errors "^1.0.1"
+parse-json@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f"
+ integrity sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ error-ex "^1.3.1"
+ json-parse-better-errors "^1.0.1"
+ lines-and-columns "^1.1.6"
+
parse-passwd@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
@@ -6499,6 +7108,11 @@
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=
+path-exists@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
+ integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
+
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
@@ -6514,6 +7128,11 @@
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
+path-key@^3.0.0, path-key@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
+ integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
+
path-parse@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
@@ -6923,6 +7542,11 @@
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=
+prepend-http@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
+ integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
+
preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
@@ -6935,7 +7559,7 @@
dependencies:
fast-diff "^1.1.2"
-prettier@2.0.5:
+prettier@2.0.5, prettier@^2.0.4:
version "2.0.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4"
integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==
@@ -7045,6 +7669,13 @@
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
+pupa@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.0.1.tgz#dbdc9ff48ffbea4a26a069b6f9f7abb051008726"
+ integrity sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==
+ dependencies:
+ escape-goat "^2.0.0"
+
q@^1.4.1, q@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
@@ -7060,6 +7691,11 @@
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
+quick-lru@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f"
+ integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==
+
randomatic@^3.0.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed"
@@ -7084,7 +7720,7 @@
iconv-lite "0.4.24"
unpipe "1.0.0"
-rc@^1.0.1, rc@^1.1.6, rc@^1.2.7:
+rc@^1.0.1, rc@^1.1.6, rc@^1.2.7, rc@^1.2.8:
version "1.2.8"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
@@ -7134,6 +7770,15 @@
find-up "^3.0.0"
read-pkg "^3.0.0"
+read-pkg-up@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507"
+ integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==
+ dependencies:
+ find-up "^4.1.0"
+ read-pkg "^5.2.0"
+ type-fest "^0.8.1"
+
read-pkg@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
@@ -7161,6 +7806,16 @@
normalize-package-data "^2.3.2"
path-type "^3.0.0"
+read-pkg@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc"
+ integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==
+ dependencies:
+ "@types/normalize-package-data" "^2.4.0"
+ normalize-package-data "^2.5.0"
+ parse-json "^5.0.0"
+ type-fest "^0.6.0"
+
readable-stream@1.1.x:
version "1.1.14"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
@@ -7240,6 +7895,14 @@
indent-string "^2.1.0"
strip-indent "^1.0.1"
+redent@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f"
+ integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==
+ dependencies:
+ indent-string "^4.0.0"
+ strip-indent "^3.0.0"
+
reduce-flatten@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-1.0.1.tgz#258c78efd153ddf93cb561237f61184f3696e327"
@@ -7289,6 +7952,11 @@
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==
+regexpp@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2"
+ integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==
+
regexpu-core@^4.5.4:
version "4.5.4"
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.5.4.tgz#080d9d02289aa87fe1667a4f5136bc98a6aebaae"
@@ -7314,6 +7982,13 @@
rc "^1.1.6"
safe-buffer "^5.0.1"
+registry-auth-token@^4.0.0:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.1.1.tgz#40a33be1e82539460f94328b0f7f0f84c16d9479"
+ integrity sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==
+ dependencies:
+ rc "^1.2.8"
+
registry-url@^3.0.3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942"
@@ -7321,6 +7996,13 @@
dependencies:
rc "^1.0.1"
+registry-url@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009"
+ integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==
+ dependencies:
+ rc "^1.2.8"
+
regjsgen@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd"
@@ -7439,6 +8121,13 @@
dependencies:
path-parse "^1.0.6"
+resolve@^1.10.1:
+ version "1.17.0"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444"
+ integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==
+ dependencies:
+ path-parse "^1.0.6"
+
resolve@^1.12.0, resolve@^1.13.1:
version "1.15.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8"
@@ -7453,6 +8142,13 @@
dependencies:
path-parse "^1.0.6"
+responselike@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
+ integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
+ dependencies:
+ lowercase-keys "^1.0.0"
+
restore-cursor@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541"
@@ -7496,6 +8192,13 @@
dependencies:
glob "^7.1.3"
+rimraf@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
+ integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
+ dependencies:
+ glob "^7.1.3"
+
rimraf@~2.2.6:
version "2.2.8"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582"
@@ -7517,6 +8220,11 @@
dependencies:
is-promise "^2.1.0"
+run-async@^2.4.0:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
+ integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==
+
rx@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782"
@@ -7615,6 +8323,13 @@
dependencies:
semver "^5.0.3"
+semver-diff@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b"
+ integrity sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==
+ dependencies:
+ semver "^6.3.0"
+
"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.6.0:
version "5.7.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
@@ -7625,7 +8340,7 @@
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
-semver@^6.1.2, semver@^6.3.0:
+semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
@@ -7725,11 +8440,23 @@
dependencies:
shebang-regex "^1.0.0"
+shebang-command@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
+ integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
+ dependencies:
+ shebang-regex "^3.0.0"
+
shebang-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
+shebang-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
+ integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
+
shelljs@^0.8.0:
version "0.8.3"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097"
@@ -7919,6 +8646,14 @@
dependencies:
source-map "^0.5.6"
+source-map-support@~0.5.12:
+ version "0.5.19"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
+ integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
+ dependencies:
+ buffer-from "^1.0.0"
+ source-map "^0.6.0"
+
source-map-url@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
@@ -8111,7 +8846,7 @@
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"
-string-width@^4.1.0:
+string-width@^4.0.0, string-width@^4.1.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
@@ -8221,6 +8956,11 @@
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
+strip-final-newline@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
+ integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
+
strip-indent@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
@@ -8233,6 +8973,13 @@
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"
integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=
+strip-indent@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001"
+ integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==
+ dependencies:
+ min-indent "^1.0.0"
+
strip-json-comments@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7"
@@ -8255,6 +9002,13 @@
dependencies:
has-flag "^3.0.0"
+supports-color@^7.1.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1"
+ integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==
+ dependencies:
+ has-flag "^4.0.0"
+
sw-precache@^5.1.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/sw-precache/-/sw-precache-5.2.1.tgz#06134f319eec68f3b9583ce9a7036b1c119f7179"
@@ -8380,6 +9134,11 @@
dependencies:
execa "^0.7.0"
+term-size@^2.1.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.0.tgz#1f16adedfe9bdc18800e1776821734086fcc6753"
+ integrity sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==
+
ternary-stream@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/ternary-stream/-/ternary-stream-2.0.1.tgz#064e489b4b5bf60ba6a6b7bc7f2f5c274ecf8269"
@@ -8390,6 +9149,15 @@
merge-stream "^1.0.0"
through2 "^2.0.1"
+terser@^4.8.0:
+ version "4.8.0"
+ resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17"
+ integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==
+ dependencies:
+ commander "^2.20.0"
+ source-map "~0.6.1"
+ source-map-support "~0.5.12"
+
text-encoding@0.6.4:
version "0.6.4"
resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19"
@@ -8533,6 +9301,11 @@
dependencies:
kind-of "^3.0.2"
+to-readable-stream@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771"
+ integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==
+
to-regex-range@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
@@ -8576,6 +9349,11 @@
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
integrity sha1-WIeWa7WCpFA6QetST301ARgVphM=
+trim-newlines@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.0.tgz#79726304a6a898aa8373427298d54c2ee8b1cb30"
+ integrity sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==
+
trim-right@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
@@ -8613,6 +9391,13 @@
dependencies:
tslib "^1.8.1"
+tsutils@^3.17.1:
+ version "3.17.1"
+ resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
+ integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==
+ dependencies:
+ tslib "^1.8.1"
+
tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
@@ -8644,6 +9429,16 @@
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==
+type-fest@^0.13.1:
+ version "0.13.1"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934"
+ integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==
+
+type-fest@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b"
+ integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==
+
type-fest@^0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
@@ -8657,6 +9452,13 @@
media-typer "0.3.0"
mime-types "~2.1.24"
+typedarray-to-buffer@^3.1.5:
+ version "3.1.5"
+ resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
+ integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==
+ dependencies:
+ is-typedarray "^1.0.0"
+
typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
@@ -8753,6 +9555,13 @@
dependencies:
crypto-random-string "^1.0.0"
+unique-string@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d"
+ integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==
+ dependencies:
+ crypto-random-string "^2.0.0"
+
universal-user-agent@^2.0.0, universal-user-agent@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-2.1.0.tgz#5abfbcc036a1ba490cb941f8fd68c46d3669e8e4"
@@ -8825,6 +9634,25 @@
semver-diff "^2.0.0"
xdg-basedir "^3.0.0"
+update-notifier@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-4.1.0.tgz#4866b98c3bc5b5473c020b1250583628f9a328f3"
+ integrity sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==
+ dependencies:
+ boxen "^4.2.0"
+ chalk "^3.0.0"
+ configstore "^5.0.1"
+ has-yarn "^2.1.0"
+ import-lazy "^2.1.0"
+ is-ci "^2.0.0"
+ is-installed-globally "^0.3.1"
+ is-npm "^4.0.0"
+ is-yarn-global "^0.3.0"
+ latest-version "^5.0.0"
+ pupa "^2.0.1"
+ semver-diff "^3.1.1"
+ xdg-basedir "^4.0.0"
+
upper-case@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598"
@@ -8859,6 +9687,13 @@
dependencies:
prepend-http "^1.0.1"
+url-parse-lax@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
+ integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=
+ dependencies:
+ prepend-http "^2.0.0"
+
url-template@^2.0.8:
version "2.0.8"
resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21"
@@ -9119,6 +9954,13 @@
dependencies:
isexe "^2.0.0"
+which@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
+ integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
+ dependencies:
+ isexe "^2.0.0"
+
wide-align@^1.1.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
@@ -9140,6 +9982,13 @@
dependencies:
string-width "^2.1.1"
+widest-line@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca"
+ integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==
+ dependencies:
+ string-width "^4.0.0"
+
windows-release@^3.1.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.2.0.tgz#8122dad5afc303d833422380680a79cdfa91785f"
@@ -9220,6 +10069,16 @@
imurmurhash "^0.1.4"
signal-exit "^3.0.2"
+write-file-atomic@^3.0.0, write-file-atomic@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8"
+ integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==
+ dependencies:
+ imurmurhash "^0.1.4"
+ is-typedarray "^1.0.0"
+ signal-exit "^3.0.2"
+ typedarray-to-buffer "^3.1.5"
+
write@1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3"
@@ -9251,6 +10110,11 @@
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=
+xdg-basedir@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13"
+ integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==
+
xmlbuilder@8.2.2:
version "8.2.2"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-8.2.2.tgz#69248673410b4ba42e1a6136551d2922335aa773"
@@ -9281,6 +10145,14 @@
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9"
integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==
+yargs-parser@^18.1.3:
+ version "18.1.3"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"
+ integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==
+ dependencies:
+ camelcase "^5.0.0"
+ decamelize "^1.2.0"
+
yauzl@^2.10.0:
version "2.10.0"
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"