Lerna Version: 8.1.9
Current Behavior
Hi all,
I'm running into an issue where in my CICD pipeline, I do a hotswap of .npmrc for an alternative cicd.npmrc with a mv cicd.npmrc .npmrc command prior to running lerna version/lerna publish
I've tried configuring Lerna according to the documentation and various issues I've seen around this, with my lerna.json configured as so:
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "independent",
"command": {
"publish": {
"ignoreChanges": [
".npmrc",
"cicd.npmrc"
]
}
},
"packages": [
"packages/*"
]
}
I've also tried configuring my lerna CLI as such
npx lerna publish --ignore-changes 'cicd.npmrc' '.npmrc' --canary --exact --dist-tag ${CI_COMMIT_REF_SLUG} --preid "${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA}" --yes ${FORCED_PKGLIST} --concurrency 1
However end result is I get this output

Expected Behavior
As far as I can tell, the issue is that the code for checking the working directory here
|
export function collectUncommitted({ cwd, log = npmlog }: UncommittedConfig): Promise<string[]> { |
completely ignores the configuration that's passed in. I would expect the ignoreChanges configuration to work as expected.
Related Issues
It seems like this may be related to this issue #2522 which was never resolved.
Lerna Version: 8.1.9
Current Behavior
Hi all,
I'm running into an issue where in my CICD pipeline, I do a hotswap of
.npmrcfor an alternativecicd.npmrcwith amv cicd.npmrc .npmrccommand prior to runninglerna version/lerna publishI've tried configuring Lerna according to the documentation and various issues I've seen around this, with my
lerna.jsonconfigured as so:{ "$schema": "node_modules/lerna/schemas/lerna-schema.json", "version": "independent", "command": { "publish": { "ignoreChanges": [ ".npmrc", "cicd.npmrc" ] } }, "packages": [ "packages/*" ] }I've also tried configuring my lerna CLI as such
However end result is I get this output
Expected Behavior
As far as I can tell, the issue is that the code for checking the working directory here
lerna/libs/core/src/lib/collect-uncommitted.ts
Line 32 in c3e601b
completely ignores the configuration that's passed in. I would expect the
ignoreChangesconfiguration to work as expected.Related Issues
It seems like this may be related to this issue #2522 which was never resolved.