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

customized path to package.json #271

Closed
siddarthmishra opened this issue Sep 24, 2018 · 7 comments · Fixed by #527
Closed

customized path to package.json #271

siddarthmishra opened this issue Sep 24, 2018 · 7 comments · Fixed by #527

Comments

@siddarthmishra
Copy link

Is there a possibility of adding customized path to package.json?
Let's say I have the following folder structure
untitled

First package.json (/project A) has name, scripts, dependencies and NOT version.

Second package.json (/project A/src/lib) has name, version, publishConfig and peerDependencies.

On executing standard-version in project root folder, the version needs to be updated accordingly to src/lib/package.json.
Currently it is taking root folder package.json which doesn't have version and updating the package.json by adding version key with null value.

Can it be customized to take path for package.json? If path not provided, behave as existing

@regseb
Copy link
Contributor

regseb commented Jul 21, 2019

I have a similar need for a WebExtensions that has the following tree structure:

  • project/
    • package.json
    • package-lock.json
    • src/
      • manifest.json
    • test/

The manifest.json file is in the subdirectory src/. It would be nice to be able to customize Bump.pkgFiles.

@regseb
Copy link
Contributor

regseb commented Aug 2, 2019

I open a pull request (#425) to configure metadata files.

@koyre
Copy link

koyre commented Sep 15, 2019

So are there any ways to specify the path to package that will be updated?

@phil-lgr
Copy link

phil-lgr commented Oct 18, 2019

I want standard-version to update only the package.json and not manifest.json..

can anybody comment on where are we at for this issue? I've had a look at the PR #372

@regseb
Copy link
Contributor

regseb commented Jan 13, 2020

@siddarthmishra – Since version 7.1.0, you can customize path to package.json. This configuration should solve your problem:

{
    "packageFiles": "src/lib/package.json",
    "bumpFiles": ["src/lib/package.json"]
}

@phil-lgr – As for siddarthmishra:

{
    "packageFiles": "package.json",
    "bumpFiles": ["package.json"]
}

@bcoe, @jbottigliero – I think this issue can be closed.

roschaefer added a commit to roschaefer/standard-version that referenced this issue Jan 16, 2020
I've spend at least an hour to figure out why my configuration files were always ignored. After debugging the source of my `node_modules/standard-version/*` it turns out I had `7.0.1` installed which apparently does not have the feature of `bumpFiles` or `packageFiles`.

I don't understand why `7.0.1` and not `7.1.0` got installed. I used `yarn add --dev standard-version`.

close conventional-changelog#504 conventional-changelog#271
@ZaLiTHkA
Copy link

@siddarthmishra – Since version 7.1.0, you can customize path to package.json.

I just lost 3 hours of my life trying to figure out how to get this to work with a fresh install of standard-version, only to discover now that the latest version in the NPM registry is still 7.0.1.

🤦‍♂

any idea when 7.1.0 will be uploaded to npmjs.org?

jbottigliero pushed a commit that referenced this issue Jan 20, 2020
…on file management and references proper attribute name (`filename`) (#527)

> I've spend at least an hour to figure out why my configuration files were always ignored. After debugging the source of my `node_modules/standard-version/*` it turns out I had `7.0.1` installed which apparently does not have the feature of `bumpFiles` or `packageFiles`.
> I don't understand why `7.0.1` and not `7.1.0` got installed. I used `yarn add --dev standard-version`. 
@roschaefer 

Closes #504, #271
@jbottigliero
Copy link
Member

Hey All,

Sorry for the confusion folks... I'll see what I can do to help get the latest updates published on the registry. I've opened #531, for now, to try and draw attention to the issue.

As a workaround, it looks like 7.1.0 was tagged as next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

6 participants