Skip to content

Commit

Permalink
[perf] writePublishDeployment - no cloneDeep
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Jan 30, 2025
1 parent 00f6b37 commit d0a54a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/publish/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { warning } from "../deno_ral/log.ts";
import { stringify } from "../core/yaml.ts";
import { basename, dirname, join } from "../deno_ral/path.ts";

import * as ld from "../core/lodash.ts";

import { Metadata } from "../config/types.ts";
import { readYaml, readYamlFromString } from "../core/yaml.ts";
import { ProjectContext } from "../project/types.ts";
Expand Down Expand Up @@ -69,7 +67,9 @@ export function writePublishDeployment(
publish: PublishRecord,
) {
// don't write 'code' field if false
publish = ld.cloneDeep(publish) as PublishRecord;
publish = {
...publish,
} as PublishRecord;
if (publish.code === false) {
delete (publish as Record<string, unknown>).code;
}
Expand Down

0 comments on commit d0a54a0

Please sign in to comment.