Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2021-03-23 01:25:28 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2021-03-23 01:25:28 +0300
commit4fb6e2fd7fbbdb8791b4ccefe0433bd3cb62f0d5 (patch)
treef6d1c742e10a18922ceb78e05d9ae6e02546ab9a /lib
parentb7b4491bf1d9df70149f48bca6557e55acf5cee6 (diff)
fix: npm birthday
Replaces usage of flatOptions with npm.config.
Diffstat (limited to 'lib')
-rw-r--r--lib/birthday.js15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/birthday.js b/lib/birthday.js
index 5ea855512..92b1dd1c2 100644
--- a/lib/birthday.js
+++ b/lib/birthday.js
@@ -1,16 +1,9 @@
-class Birthday {
- constructor (npm) {
- this.npm = npm
- Object.defineProperty(this.npm, 'flatOptions', {
- value: {
- ...npm.flatOptions,
- package: ['@npmcli/npm-birthday'],
- yes: true,
- },
- })
- }
+const BaseCommand = require('./base-command.js')
+class Birthday extends BaseCommand {
exec (args, cb) {
+ this.npm.config.set('package', ['@npmcli/npm-birthday'])
+ this.npm.config.set('yes', true)
return this.npm.commands.exec(['npm-birthday'], cb)
}
}