Skip to content

[DOCS] Clarification on the proper way to change settings when doing a fork #4897

@sneko

Description

@sneko

Is there an existing issue for this?

  • I have searched the existing issues

This is a CLI Docs Enhancement, not another kind of Docs Enhancement.

  • This is a CLI Docs Enhancement.

Description of Problem

Hi,

I posted today semantic-release/npm#483 but I think at the end it's more appropriate to ask the question here since it's a general question:

I'm in a situation where I want to fork a repository to do a pull request and I know the PR won't be accepted within a few weeks/months. So I want to be able to use the package properly but also to let others too.

My idea is to fork the repository, try to setup the needed workflows of this repo (CircleCI in this case, but also CodeClimate...). Let's say I set up all the tools so I don't have to modify workflows files.

Now since the package is named abc and the name is already taken on the npmjs.com repository I have to use a scope like @sneko/abc. But my question is:

What's the best way to adjust settings to only reroute publishing the package to my own scope?

Because I could modify in package.json all the properties: .name, .author, .repository.url but I feel it not appropriate since my fork is not intended to replace the original one (it's just temporary).

I read some discussions on this repo and it seems I could try to play with the setting .publishConfig or try to use a file .npmrc but in all cases, it makes me adding a new commit to do so, so my pull-request to the original repo will have this content, no?

What's the best way to make this transparent? An environment variable into my CI/CD workflow so npm publishes into the right scope? (if so, can someone tell me which one and what to set into?)

Thank you,

(sorry if I missed the information somewhere)

Potential Solution

I don't know what is the solution.

But I would love to be able to manage through an environment variable the "package name" to say: it's not abc but it's @sneko/abc.

:)

Docs URL

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentationdocumentation related issueNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions