This repository was archived by the owner on Jan 20, 2022. It is now read-only.
Commit 2e03d95
committed
Save provided range if not a subset of savePrefix
If a user installs `foo@1.x <1.2.3`, and we resolve to `1.2.2`, then we
should not save it as `^1.2.2`, since that would allow versions outside
of the requested range.
Explicit versions and tags are still saved using the savePrefix, since
those are not ranges, and users can set `--save-exact` if they wish it
to be saved exactly.
Fix: #127
Fix: npm/cli#193
Fix: https://npm.community/t/70051 parent 731b5b5 commit 2e03d95
3 files changed
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
788 | 789 | | |
789 | 790 | | |
790 | 791 | | |
791 | | - | |
| 792 | + | |
| 793 | + | |
792 | 794 | | |
793 | 795 | | |
794 | 796 | | |
795 | 797 | | |
796 | | - | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
797 | 807 | | |
798 | 808 | | |
799 | 809 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27051 | 27051 | | |
27052 | 27052 | | |
27053 | 27053 | | |
27054 | | - | |
| 27054 | + | |
27055 | 27055 | | |
27056 | 27056 | | |
27057 | 27057 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
819 | | - | |
| 819 | + | |
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
873 | | - | |
| 873 | + | |
874 | 874 | | |
875 | 875 | | |
876 | 876 | | |
| |||
883 | 883 | | |
884 | 884 | | |
885 | 885 | | |
886 | | - | |
| 886 | + | |
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
| |||
0 commit comments