Skip to content
Snippets Groups Projects
Commit 3de02c37 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(yarn): sub package use root npmrc

parent 7eb2c09b
No related branches found
No related tags found
No related merge requests found
......@@ -168,6 +168,8 @@ Array [
exports[`manager/npm/extract/monorepo .extractPackageFile() uses yarn workspaces package settings without lerna 1`] = `
Array [
Object {
"npmrc": "@org:registry=//registry.some.org
",
"packageFile": "package.json",
"yarnWorkspacesPackages": "packages/*",
},
......@@ -178,6 +180,8 @@ Array [
"lernaJsonFile": undefined,
},
"npmLock": undefined,
"npmrc": "@org:registry=//registry.some.org
",
"packageFile": "packages/a/package.json",
"packageJsonName": "@org/a",
"yarnLock": "yarn.lock",
......
......@@ -139,6 +139,7 @@ describe(getName(), () => {
const packageFiles = [
{
packageFile: 'package.json',
npmrc: '@org:registry=//registry.some.org\n',
yarnWorkspacesPackages: 'packages/*',
},
{
......
......@@ -17,6 +17,7 @@ export async function detectMonorepos(
packageFile,
npmLock,
yarnLock,
npmrc,
managerData = {},
lernaClient,
lernaPackages,
......@@ -52,6 +53,7 @@ export async function detectMonorepos(
subPackage.npmLock = subPackage.npmLock || npmLock;
if (subPackage.yarnLock) {
subPackage.hasYarnWorkspaces = !!yarnWorkspacesPackages;
subPackage.npmrc = subPackage.npmrc || npmrc;
}
if (!updateInternalDeps) {
subPackage.deps?.forEach((dep) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment