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

docs(deploy): flag and setting for legacy #635

Merged
merged 6 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/cli/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ Packages in `devDependencies` won't be installed.

[Read more about filtering.](../filtering.md)

## --legacy

Force legacy deploy implementation.

Since pnpm v10, by default, `pnpm deploy` will try creating a dedicated lockfile from a shared lockfile for deployment. The `--legacy` flag disables this behavior.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also mention the injected dependencies setting that is required in v10

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c817778 has added mention of this setting.

I added it to near top instead of --legacy because this setting is required by both legacy and the new implementation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand. Isn't legacy the algorithm from pnpm v9, which didn't require injected deps?

## Files included in the deployed project

By default, all the files of the project are copied during deployment but this can be modified in _one_ of the following ways which are resolved in order:
Expand Down
23 changes: 16 additions & 7 deletions docs/npmrc.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,10 @@ Add the full URL to the package's tarball to every entry in `pnpm-lock.yaml`.
* Default: **false**
* Type: **Boolean**

When set to `true`, the generated lockfile name after installation will be named
When set to `true`, the generated lockfile name after installation will be named
based on the current branch name to completely avoid merge conflicts. For example,
if the current branch name is `feature-foo`, the corresponding lockfile name will
be `pnpm-lock.feature-foo.yaml` instead of `pnpm-lock.yaml`. It is typically used
be `pnpm-lock.feature-foo.yaml` instead of `pnpm-lock.yaml`. It is typically used
in conjunction with the command line argument `--merge-git-branch-lockfiles` or by
setting `merge-git-branch-lockfiles-branch-pattern` in the `.npmrc` file.

Expand All @@ -323,9 +323,9 @@ setting `merge-git-branch-lockfiles-branch-pattern` in the `.npmrc` file.
* Default: **null**
* Type: **Array or null**

This configuration matches the current branch name to determine whether to merge
all git branch lockfile files. By default, you need to manually pass the
`--merge-git-branch-lockfiles` command line parameter. This configuration allows
This configuration matches the current branch name to determine whether to merge
all git branch lockfile files. By default, you need to manually pass the
`--merge-git-branch-lockfiles` command line parameter. This configuration allows
this process to be automatically completed.

For instance:
Expand Down Expand Up @@ -367,7 +367,7 @@ Define the authentication bearer token to use when accessing the specified
registry. For example:

```sh
//registry.npmjs.org/:_authToken=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
//registry.npmjs.org/:_authToken=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

You may also use an environment variable. For example:
Expand All @@ -379,7 +379,7 @@ You may also use an environment variable. For example:
Or you may just use an environment variable directly, without changing `.npmrc` at all:

```
npm_config_//registry.npmjs.org/:_authToken=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
npm_config_//registry.npmjs.org/:_authToken=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

### <URL>:tokenHelper
Expand Down Expand Up @@ -1019,6 +1019,15 @@ When set to `true`, no workspace cycle warnings will be printed.

When set to `true`, installation will fail if the workspace has cycles.

## Deploy Settings

### force-legacy-deploy

* Default: **false**
* Type: **Boolean**

Since pnpm v10, by default, `pnpm deploy` will try creating a dedicated lockfile from a shared lockfile for deployment. If this setting is set to `true`, the legacy `deploy` behavior will be used.

## Other Settings

### save-prefix
Expand Down
Loading