Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the pnpmfile.cjs #3281

Merged
merged 3 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions common/config/rush/.pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
function readPackage(pkg) {
if ((pkg.name == "typedoc" || pkg.name == "@microsoft/api-extractor") && pkg.dependencies && pkg.dependencies["typescript"])
if (
(pkg.name == "typedoc" || pkg.name == "@microsoft/api-extractor") &&
pkg.dependencies &&
pkg.dependencies["typescript"]
) {
pkg.dependencies["typescript"] = "~4.4.0";
}

// Hacky mess: For external packages to this monorepo that have peer dependencies on packages
// in this repo, we need to do some magic in order to get the peerDeps to point to a correct
// version of the packages. Update the pkg.json real dependency list to
// Note that these dependencies are only ever allowed for testing purposes and should not be the
// dependency of any published packages.

// https://github.com/iTwin/imodels-clients
else if (pkg.name == "@itwin/imodels-access-backend") {
pkg.dependencies["@itwin/core-bentley"] = "workspace:*";
pkg.dependencies["@itwin/core-backend"] = "workspace:*";
Expand All @@ -14,16 +22,28 @@ function readPackage(pkg) {
pkg.dependencies["@itwin/core-bentley"] = "workspace:*";
pkg.dependencies["@itwin/core-frontend"] = "workspace:*";
pkg.dependencies["@itwin/core-common"] = "workspace:*";
} else if (pkg.name == "@itwin/oidc-signin-tool") {
}

// https://github.com/iTwin/auth-clients
else if (pkg.name == "@itwin/browser-authorization") {
pkg.dependencies["@itwin/core-bentley"] = "workspace:*";
} else if (pkg.name == "@itwin/electron-authorization") {
pkg.dependencies["@itwin/core-bentley"] = "workspace:*";
} else if (pkg.name == "@itwin/oidc-signin-tool") {
pkg.dependencies["@itwin/core-bentley"] = "workspace:*";
}

// https://github.com/iTwin/reality-data-client
else if (pkg.name == "@itwin/reality-data-client") {
pkg.dependencies["@itwin/core-common"] = "workspace:*";
pkg.dependencies["@itwin/core-geometry"] = "workspace:*";
}

return pkg;
}

module.exports = {
hooks: {
readPackage
}
}
readPackage,
},
};
Loading