Skip to content

Commit

Permalink
chore(scripts): remove devDeps defined in monorepo root (#3138)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Jan 5, 2022
1 parent e6ff930 commit f2dab56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/generate-clients/copy-to-clients.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ const mergeManifest = (fromContent = {}, toContent = {}) => {
const merged = {};
for (const name of Object.keys(fromContent)) {
if (fromContent[name].constructor.name === "Object") {
if (name === "devDependencies") {
// Remove devDeps defined in monorepo root
const devDepsInRoot = ["downlevel-dts", "rimraf", "typedoc", "typescript"];
devDepsInRoot.forEach((devDep) => delete fromContent[name][devDep]);
}
merged[name] = mergeManifest(fromContent[name], toContent[name]);
if (name === "scripts" || name === "devDependencies") {
// Allow target package.json(toContent) has its own special script or
Expand Down

0 comments on commit f2dab56

Please sign in to comment.