Skip to content

Commit 939b34e

Browse files
committed
feat(opts): use scope instead of projectScope
BREAKING CHANGE: this changes the name of an opts attribute from `projectScope` to `scope`
1 parent 65ddfc0 commit 939b34e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ This option is generally only useful if you're also using
480480
This option is set to `true` when the request includes `write=true` in the
481481
query string.
482482

483-
##### <a name="opts-projectScope"></a> `opts.projectScope`
483+
##### <a name="opts-scope"></a> `opts.scope`
484484

485485
* Type: String
486486
* Default: null

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ function getHeaders (uri, auth, opts) {
213213
'user-agent': opts.userAgent,
214214
}, opts.headers || {})
215215

216-
if (opts.projectScope) {
217-
headers['npm-scope'] = opts.projectScope
216+
if (opts.scope) {
217+
headers['npm-scope'] = opts.scope
218218
}
219219

220220
if (opts.npmSession) {

test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ t.test('miscellaneous headers', t => {
483483
...OPTS,
484484
registry: null, // always falls back on falsey registry value
485485
npmSession: 'foobarbaz',
486-
projectScope: '@foo',
486+
scope: '@foo',
487487
userAgent: 'agent of use',
488488
npmCommand: 'hello-world',
489489
}).then(res => {

0 commit comments

Comments
 (0)