Commit 7341fac3 authored by Robert Knight's avatar Robert Knight

Replace use of deprecated default import in commander

This fixes the S3 deployment script after migration to Commander v12.

See https://github.com/tj/commander.js/blob/master/CHANGELOG.md#migration-tips
parent d86b6e18
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
const fs = require('fs'); const fs = require('fs');
const { extname } = require('path'); const { extname } = require('path');
const commander = require('commander'); const { program } = require('commander');
const Arborist = require('@npmcli/arborist'); const Arborist = require('@npmcli/arborist');
const packlist = require('npm-packlist'); const packlist = require('npm-packlist');
const AWS = require('aws-sdk'); const AWS = require('aws-sdk');
...@@ -151,13 +151,13 @@ async function uploadPackageToS3(bucket, options) { ...@@ -151,13 +151,13 @@ async function uploadPackageToS3(bucket, options) {
}); });
} }
commander program
.option('--bucket [bucket]', 'S3 bucket name') .option('--bucket [bucket]', 'S3 bucket name')
.option('--tag [tag]', 'Version tag') .option('--tag [tag]', 'Version tag')
.option('--no-cache-entry', 'Prevent CDN/browser caching of entry point') .option('--no-cache-entry', 'Prevent CDN/browser caching of entry point')
.parse(process.argv); .parse(process.argv);
const cliOpts = commander.opts(); const cliOpts = program.opts();
const options = { const options = {
tag: cliOpts.tag, tag: cliOpts.tag,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment