Skip to content

Commit

Permalink
Address few glitches 🐲
Browse files Browse the repository at this point in the history
Mainly lerna related ones. Saw creating this PR: CoorpAcademy/coorpacademy-private-libraries#161
  • Loading branch information
AdrieanKhisbe committed Oct 11, 2024
1 parent 3c188dc commit 594ebe5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/core/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const nodeConfig = Joi.object().keys({
dockerfile: [Joi.bool(), Joi.string(), Joi.array().items(Joi.string())],
travis: [Joi.bool(), Joi.string(), Joi.array().items(Joi.string())],
package: [Joi.bool(), Joi.string(), Joi.array().items(Joi.string())],
serverless: [Joi.bool(), Joi.string(), Joi.array().items(Joi.string())]
serverless: [Joi.bool(), Joi.string(), Joi.array().items(Joi.string())],
lerna: Joi.bool()
});
const dependencyClusterConfig = Joi.object().keys({
name: Joi.string().required(),
Expand Down
2 changes: 1 addition & 1 deletion src/core/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const cleanAndSyncRepo = ({branch = 'master', preCleanCommand = [], postCleanCom
...preCleanCommand,
'git stash',
`git checkout ${branch}`,
`if git rev-parse --abbrev-ref --symbolic-full-name ${branch} ; then git pull; fi`, // pull only if upstream
`if git rev-parse --abbrev-ref @--symbolic-full-name ${branch} ; then git pull; fi`, // pull only if upstream
...postCleanCommand
]);

Expand Down
11 changes: 5 additions & 6 deletions src/updatees/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,13 @@ const updateLock = async (packageManager = 'npm') => {
};

const updateLearnaPackageEngines = async (nodeVersion, npmVersion, {exact, loose}) => {
const listPackages = await execa('npx', ['lerna', 'list', '--json', '--loglevel', 'error'], {
all: true,
shell: true
});
const lernaPackages = _.map(
({location}) => `${chompCurrentFolder(location)}/package.json`,
JSON.parse(
await execa('npx', ['lerna', 'list', '--json', '--loglevel', 'error'], {
all: true,
shell: true
}).all
)
listPackages.all
);
return updatePackageEngines(nodeVersion, npmVersion, lernaPackages, {exact, loose});

Expand Down

0 comments on commit 594ebe5

Please sign in to comment.