Merge changes from topics "label-type-auto", "project-auto-value"
* changes:
Make NotifyConfig an AutoValue
Make LabelType an AutoValue
Make Project an AutoValue
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/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/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/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/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/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/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/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 eac6d2c..f037261 100644
--- a/java/com/google/gerrit/server/submit/SubscriptionGraph.java
+++ b/java/com/google/gerrit/server/submit/SubscriptionGraph.java
@@ -31,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;
@@ -102,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();
}
@@ -120,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);
}
@@ -130,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);
}
/**
@@ -203,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<>();
@@ -220,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
@@ -235,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);
@@ -252,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);
@@ -269,8 +309,8 @@
allVisited.add(current);
}
- private Collection<BranchNameKey> getDestinationBranches(BranchNameKey src, SubscribeSection s)
- throws IOException {
+ private Collection<BranchNameKey> getDestinationBranches(
+ BranchNameKey src, SubscribeSection s, MergeOpRepoManager orm) throws IOException {
OpenRepo or;
try {
or = orm.getRepo(s.project());
@@ -286,7 +326,10 @@
}
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();
@@ -296,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/change/ChangeIT.java b/javatests/com/google/gerrit/acceptance/api/change/ChangeIT.java
index 17b608e..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
@@ -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/project/ProjectIT.java b/javatests/com/google/gerrit/acceptance/api/project/ProjectIT.java
index cb22849..840d3e0 100644
--- a/javatests/com/google/gerrit/acceptance/api/project/ProjectIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/project/ProjectIT.java
@@ -696,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();
}
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/server/project/ProjectWatchIT.java b/javatests/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java
index fcdea16..ff26fec 100644
--- a/javatests/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java
@@ -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/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/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/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/submit/SubscriptionGraphTest.java b/javatests/com/google/gerrit/server/submit/SubscriptionGraphTest.java
index 489e1b6..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);
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/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/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-reply-dialog/gr-reply-dialog.js b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js
index f3c31aa..24bc142 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
@@ -546,13 +546,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/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/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/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/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/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"