mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:30:43 +00:00
refactor(lint): enable map spread rule
This commit is contained in:
@@ -197,11 +197,12 @@ function mergeTestPlans(plans) {
|
||||
}
|
||||
|
||||
const planGroups = [...groupsByConfig.values()]
|
||||
.map((group) => ({
|
||||
...group,
|
||||
extensionIds: group.extensionIds.toSorted((left, right) => left.localeCompare(right)),
|
||||
roots: [...new Set(group.roots)],
|
||||
}))
|
||||
.map((group) =>
|
||||
Object.assign({}, group, {
|
||||
extensionIds: group.extensionIds.toSorted((left, right) => left.localeCompare(right)),
|
||||
roots: [...new Set(group.roots)],
|
||||
}),
|
||||
)
|
||||
.toSorted((left, right) => left.config.localeCompare(right.config));
|
||||
|
||||
return {
|
||||
@@ -279,6 +280,7 @@ export function createExtensionTestShards(params = {}) {
|
||||
return shards
|
||||
.map((shard, index) =>
|
||||
Object.assign(
|
||||
{},
|
||||
{ index, checkName: `checks-node-extensions-shard-${index + 1}` },
|
||||
mergeTestPlans(shard.plans),
|
||||
),
|
||||
|
||||
@@ -352,17 +352,15 @@ export async function collectPluginClawHubReleasePlan(params?: {
|
||||
});
|
||||
|
||||
const all = await Promise.all(
|
||||
selectedPublishable.map(async (plugin) => ({
|
||||
...plugin,
|
||||
alreadyPublished: await isPluginVersionPublishedOnClawHub(
|
||||
plugin.packageName,
|
||||
plugin.version,
|
||||
{
|
||||
registryBaseUrl: params?.registryBaseUrl,
|
||||
fetchImpl: params?.fetchImpl,
|
||||
},
|
||||
),
|
||||
})),
|
||||
selectedPublishable.map(async (plugin) =>
|
||||
Object.assign({}, plugin, {
|
||||
alreadyPublished: await isPluginVersionPublishedOnClawHub(
|
||||
plugin.packageName,
|
||||
plugin.version,
|
||||
{ registryBaseUrl: params?.registryBaseUrl, fetchImpl: params?.fetchImpl },
|
||||
),
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
@@ -462,10 +462,11 @@ export function collectPluginReleasePlan(params?: {
|
||||
})
|
||||
: allPublishable;
|
||||
|
||||
const all = selectedPublishable.map((plugin) => ({
|
||||
...plugin,
|
||||
alreadyPublished: isPluginVersionPublished(plugin.packageName, plugin.version),
|
||||
}));
|
||||
const all = selectedPublishable.map((plugin) =>
|
||||
Object.assign({}, plugin, {
|
||||
alreadyPublished: isPluginVersionPublished(plugin.packageName, plugin.version),
|
||||
}),
|
||||
);
|
||||
|
||||
return {
|
||||
all,
|
||||
|
||||
Reference in New Issue
Block a user