@automattic/vip 2.9.0 → 2.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CONTRIBUTING.md CHANGED
@@ -131,3 +131,9 @@ For these cases:
131
131
  1. Follow the release steps outlined above (as a `patch` release).
132
132
 
133
133
  Then, repeat for any additional versions that we need to patch.
134
+
135
+ ### go-search-replace binaries
136
+
137
+ Some unit tests require some go-search-replace executable binary files to run. Binaries files for several OS architectures can be downloaded from https://github.com/Automattic/go-search-replace/releases/
138
+
139
+ If, for some reason, you need to compile these binaries yourself, please follow instructions at https://github.com/Automattic/go-search-replace
package/README.md CHANGED
@@ -27,6 +27,30 @@ By default, we record information about the usage of this tool using an in-house
27
27
 
28
28
  ## Changelog
29
29
 
30
+ ### 2.9.3 (29 March 2022)
31
+ - #995 Add debug call to dev-envs handleCLIException
32
+ - #992 Add --debug flag to all commands
33
+ - #993 [dev-env] Fix in caching version list.
34
+ - #994 Fix typo in error message
35
+ - #990 [dev-env] Add check for wp folder map add/php_healthcheck
36
+ - #991 Adds optional channing since `progress` can be null as per GraphQL schema
37
+ - #989 Fixes unit test error `bsdthread_register error`
38
+ - #987 Add support for M1 Macs in the search-replace tests
39
+
40
+ ### 2.9.2 (9 March 2022)
41
+ - #980 [dev-env] Fix/tag formatting on stapled images
42
+ - #986 Clean the build folder prior to rebuilding it
43
+ - #985 Adding webP to the list of accepted extensions for files
44
+ - #972 Run tests in Windows Env
45
+
46
+ https://github.com/Automattic/vip/releases/tag/v2.9.2
47
+
48
+ ### 2.9.1 (2 March 2022)
49
+ - #982 Remove unused dependencies - Fixes Error: Cannot find module 'core-js'
50
+ - #978 [dev-env] Added phpmyadmin proxy value
51
+
52
+ https://github.com/Automattic/vip/releases/tag/v2.9.1
53
+
30
54
  ### 2.9.0 (1 March 2022)
31
55
  - #966 [dev-env] Dynamic WordPress Image List
32
56
  - #975 [dev-env] prompt On Unselected Env
@@ -39,6 +63,8 @@ By default, we record information about the usage of this tool using an in-house
39
63
  - #976 Fix/duplicate shortcut parameter
40
64
  - #968 Update minimum Node version
41
65
 
66
+ https://github.com/Automattic/vip/releases/tag/v2.9.0
67
+
42
68
  ### 2.8.2 (27 January 2021)
43
69
  - #961 Fixes md5 calculation failing when search-replace is used
44
70
  - #959 Fixes md5 calculation for SQL Imports on VIPd
@@ -7,6 +7,8 @@ proxy:
7
7
  <% if ( multisite ) { %>
8
8
  - '*.<%= siteSlug %>.vipdev.lndo.site'
9
9
  <% } %>
10
+ phpmyadmin:
11
+ - <%= siteSlug %>-pma.vipdev.lndo.site
10
12
  services:
11
13
 
12
14
  devtools:
@@ -38,6 +40,8 @@ services:
38
40
  image: ghcr.io/automattic/vip-container-images/php-fpm:7.4
39
41
  command: run.sh
40
42
  working_dir: /wp
43
+ healthcheck:
44
+ test: 'cat /wp/wp-includes/pomo/mo.php'
41
45
  environment:
42
46
  XDEBUG: <%= xdebug ? 'enable' : 'disable' %>
43
47
  STATSD: <%= statsd ? 'enable' : 'disable' %>
@@ -37,6 +37,8 @@ var _rollbar = require("../rollbar");
37
37
 
38
38
  var exit = _interopRequireWildcard(require("./exit"));
39
39
 
40
+ var _debug = _interopRequireDefault(require("debug"));
41
+
40
42
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
41
43
 
42
44
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -80,7 +82,8 @@ _args.default.argv = async function (argv, cb) {
80
82
  const options = this.parse(parsedAlias.argv, {
81
83
  help: false,
82
84
  name,
83
- version: false
85
+ version: false,
86
+ debug: false
84
87
  });
85
88
 
86
89
  if (options.h || options.help) {
@@ -89,6 +92,10 @@ _args.default.argv = async function (argv, cb) {
89
92
 
90
93
  if (options.v || options.version) {
91
94
  this.showVersion();
95
+ }
96
+
97
+ if (options.debug || options.d) {
98
+ _debug.default.enable(options.debug === true ? '*' : options.debug);
92
99
  } // If we have both an --app/--env and an alias, we need to give a warning
93
100
 
94
101
 
@@ -128,6 +135,7 @@ _args.default.argv = async function (argv, cb) {
128
135
  switch (command.usage) {
129
136
  case 'help':
130
137
  case 'version':
138
+ case 'debug':
131
139
  return false;
132
140
 
133
141
  default:
@@ -576,6 +584,8 @@ function _default(opts) {
576
584
 
577
585
  _args.default.option('version', 'Output the version number');
578
586
 
587
+ _args.default.option('debug', 'Activate debug output');
588
+
579
589
  return _args.default;
580
590
  }
581
591
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.DEV_ENVIRONMENT_WORDPRESS_VERSION_FILE = exports.DEV_ENVIRONMENT_WORDPRESS_CACHE_KEY = exports.DEV_ENVIRONMENT_WORDPRESS_VERSIONS_URI = exports.DEV_ENVIRONMENT_RAW_GITHUB_HOST = exports.DEV_ENVIRONMENT_COMPONENTS = exports.DEV_ENVIRONMENT_NOT_FOUND = exports.DEV_ENVIRONMENT_PROMPT_INTRO = exports.DEV_ENVIRONMENT_DEFAULTS = exports.DEV_ENVIRONMENT_FULL_COMMAND = exports.DEV_ENVIRONMENT_SUBCOMMAND = void 0;
6
+ exports.DEV_ENVIRONMENT_WORDPRESS_VERSION_TTL = exports.DEV_ENVIRONMENT_WORDPRESS_CACHE_KEY = exports.DEV_ENVIRONMENT_WORDPRESS_VERSIONS_URI = exports.DEV_ENVIRONMENT_RAW_GITHUB_HOST = exports.DEV_ENVIRONMENT_COMPONENTS = exports.DEV_ENVIRONMENT_NOT_FOUND = exports.DEV_ENVIRONMENT_PROMPT_INTRO = exports.DEV_ENVIRONMENT_DEFAULTS = exports.DEV_ENVIRONMENT_FULL_COMMAND = exports.DEV_ENVIRONMENT_SUBCOMMAND = void 0;
7
7
  const DEV_ENVIRONMENT_SUBCOMMAND = 'dev-env';
8
8
  exports.DEV_ENVIRONMENT_SUBCOMMAND = DEV_ENVIRONMENT_SUBCOMMAND;
9
9
  const DEV_ENVIRONMENT_FULL_COMMAND = `vip ${DEV_ENVIRONMENT_SUBCOMMAND}`;
@@ -25,7 +25,8 @@ const DEV_ENVIRONMENT_RAW_GITHUB_HOST = 'raw.githubusercontent.com';
25
25
  exports.DEV_ENVIRONMENT_RAW_GITHUB_HOST = DEV_ENVIRONMENT_RAW_GITHUB_HOST;
26
26
  const DEV_ENVIRONMENT_WORDPRESS_VERSIONS_URI = '/Automattic/vip-container-images/master/wordpress/versions.json';
27
27
  exports.DEV_ENVIRONMENT_WORDPRESS_VERSIONS_URI = DEV_ENVIRONMENT_WORDPRESS_VERSIONS_URI;
28
- const DEV_ENVIRONMENT_WORDPRESS_CACHE_KEY = 'worpress-versions.json';
28
+ const DEV_ENVIRONMENT_WORDPRESS_CACHE_KEY = 'wordpress-versions.json';
29
29
  exports.DEV_ENVIRONMENT_WORDPRESS_CACHE_KEY = DEV_ENVIRONMENT_WORDPRESS_CACHE_KEY;
30
- const DEV_ENVIRONMENT_WORDPRESS_VERSION_FILE = 'wordpress/wp-includes/version.php';
31
- exports.DEV_ENVIRONMENT_WORDPRESS_VERSION_FILE = DEV_ENVIRONMENT_WORDPRESS_VERSION_FILE;
30
+ const DEV_ENVIRONMENT_WORDPRESS_VERSION_TTL = 86400; // once per day
31
+
32
+ exports.DEV_ENVIRONMENT_WORDPRESS_VERSION_TTL = DEV_ENVIRONMENT_WORDPRESS_VERSION_TTL;
@@ -65,6 +65,14 @@ function handleCLIException(exception) {
65
65
 
66
66
  message = message.replace('ERROR: ', '');
67
67
  console.log(errorPrefix, message);
68
+
69
+ if (!process.env.DEBUG) {
70
+ console.log(`Please re-run the command with "${_chalk.default.bold('DEBUG=@automattic/vip:bin:dev-environment')}" prepended to it and provide the stack trace on the support ticket.`);
71
+ console.log(_chalk.default.bold('\nExample:\n'));
72
+ console.log('DEBUG=@automattic/vip:bin:dev-environment vip dev-env create\n');
73
+ }
74
+
75
+ debug(exception);
68
76
  }
69
77
  }
70
78
 
@@ -338,16 +346,21 @@ async function promptForComponent(component, allowLocal, defaultObject) {
338
346
 
339
347
  if (component === 'wordpress') {
340
348
  const message = `${messagePrefix}Which version would you like`;
341
- const tagChoices = await getTagChoices(); // First tag not: "Pre-Release"
349
+ const tagChoices = await getTagChoices(); // Tag strings come back from the api with excess whitespace
350
+ // This strips the whitespace for matching to the defaultObject.tag
351
+
352
+ const formatted = tagChoices.map(elm => {
353
+ return elm.trim();
354
+ }); // First tag not: "Pre-Release"
342
355
 
343
- const firstNonPreRelease = tagChoices.find(tag => {
344
- return !tag.match(/Pre\-Release/g);
356
+ const firstNonPreRelease = formatted.find(img => {
357
+ return !img.match(/Pre\-Release/g);
345
358
  }); // Set initialTagIndex as the first non Pre-Release
346
359
 
347
- let initialTagIndex = tagChoices.indexOf(firstNonPreRelease);
360
+ let initialTagIndex = formatted.indexOf(firstNonPreRelease);
348
361
 
349
362
  if (defaultObject !== null && defaultObject !== void 0 && defaultObject.tag) {
350
- const defaultTagIndex = tagChoices.indexOf(defaultObject.tag);
363
+ const defaultTagIndex = formatted.indexOf(defaultObject.tag);
351
364
 
352
365
  if (defaultTagIndex !== -1) {
353
366
  initialTagIndex = defaultTagIndex;
@@ -356,10 +369,21 @@ async function promptForComponent(component, allowLocal, defaultObject) {
356
369
 
357
370
  const selectTag = new _enquirer.Select({
358
371
  message,
359
- choices: tagChoices,
372
+ choices: formatted,
360
373
  initial: initialTagIndex
361
374
  });
362
- const tag = await selectTag.run();
375
+ const option = await selectTag.run(); // Validate the input
376
+ // Some of the options are like: '5.7 → 5.7.5'
377
+ // Extract first occurrence of something that looks like a tag
378
+
379
+ const tagRgx = new RegExp(/(\d+\.\d+(?:\.\d+)?)/);
380
+ const match = tagRgx.exec(option);
381
+
382
+ if (!Array.isArray(match) || match.length < 2) {
383
+ throw new Error(`Invalid WordPress selection: ${option}`);
384
+ }
385
+
386
+ const tag = match[1];
363
387
  return {
364
388
  mode: modeResult,
365
389
  tag
@@ -88,9 +88,9 @@ async function startEnvironment(slug, options) {
88
88
  throw new Error(_devEnvironment.DEV_ENVIRONMENT_NOT_FOUND);
89
89
  }
90
90
 
91
- await updateWordPressImage(instancePath, options);
91
+ const updated = await updateWordPressImage(slug);
92
92
 
93
- if (options.skipRebuild) {
93
+ if (options.skipRebuild && !updated) {
94
94
  await (0, _devEnvironmentLando.landoStart)(instancePath);
95
95
  } else {
96
96
  await (0, _devEnvironmentLando.landoRebuild)(instancePath);
@@ -466,20 +466,29 @@ async function importMediaPath(slug, filePath) {
466
466
  * - If there is a newer version of the WordPress version currently used
467
467
  * - A choice to use a different image
468
468
  *
469
- * @param {Object=} instancePath Path to local profile
470
- * @param {Object=} options options
469
+ * @param {Object=} slug slug
470
+ * @return {boolean} boolean
471
471
  */
472
472
 
473
473
 
474
- async function updateWordPressImage(instancePath, options) {
474
+ async function updateWordPressImage(slug) {
475
475
  const versions = await getVersionList();
476
476
  const refRgx = new RegExp(/\d+\.\d+(?:\.\d+)?/);
477
- const vsnRgx = new RegExp(/\$wp_version \= \'(.*)\'\;/);
478
- const landoFile = `${instancePath}/.lando.yml`;
479
- const versionFile = `${instancePath}/${_devEnvironment.DEV_ENVIRONMENT_WORDPRESS_VERSION_FILE}`; // If versionFile doesn't exist it means that the environment has not been initiated.
477
+ let message, envData, currentWordPressTag; // Get the current environment configuration
480
478
 
481
- if (!_fs.default.existsSync(versionFile)) {
482
- return;
479
+ try {
480
+ envData = readEnvironmentData(slug);
481
+ currentWordPressTag = envData.wordpress.tag;
482
+ } catch (error) {
483
+ // This can throw an exception if the env is build with older vip version
484
+ if ('ENOENT' === error.code) {
485
+ message = 'Environment was created before update was supported.\n\n';
486
+ message += 'To update environment please destroy it and create a new one.';
487
+ } else {
488
+ message = `An error prevented reading the configuration of: ${slug}\n\n ${error}`;
489
+ }
490
+
491
+ (0, _devEnvironmentCli.handleCLIException)(new Error(message));
483
492
  } // filter
484
493
 
485
494
 
@@ -490,32 +499,20 @@ async function updateWordPressImage(instancePath, options) {
490
499
  filteredVersions.sort((before, after) => before.tag < after.tag ? 1 : -1); // Newest WordPress Image
491
500
 
492
501
  const newestWordPressImage = filteredVersions[0];
493
- console.log('The most recent WordPress version available is: ' + _chalk.default.green(newestWordPressImage.tag)); // Currently Used WordPress Version
494
-
495
- const code = _fs.default.readFileSync(versionFile).toString();
496
-
497
- const versionCode = vsnRgx.exec(code);
498
- let currentWordPressVersion = null;
499
-
500
- if (null === versionCode) {
501
- console.log('Cannot determine the currently installed WordPress version.');
502
- } else {
503
- currentWordPressVersion = versionCode[1];
504
- } // If the currently used version is the most up to date: exit.
505
-
502
+ console.log('The most recent WordPress version available is: ' + _chalk.default.green(newestWordPressImage.tag)); // If the currently used version is the most up to date: exit.
506
503
 
507
- if (currentWordPressVersion === newestWordPressImage.ref) {
508
- console.log('Environment WordPress version is: ' + _chalk.default.green(currentWordPressVersion) + ' ... 😎 nice! ');
509
- return;
504
+ if (currentWordPressTag === newestWordPressImage.ref) {
505
+ console.log('Environment WordPress version is: ' + _chalk.default.green(currentWordPressTag) + ' ... 😎 nice! ');
506
+ return false;
510
507
  } // Determine if there is an image available for the current WordPress version
511
508
 
512
509
 
513
510
  const match = filteredVersions.find(({
514
511
  ref
515
- }) => ref === currentWordPressVersion); // If there is no available image for the currently installed version, give user a path to change
512
+ }) => ref === currentWordPressTag); // If there is no available image for the currently installed version, give user a path to change
516
513
 
517
514
  if (typeof match === 'undefined') {
518
- console.log(`Installed WordPress: ${currentWordPressVersion} has no available container image in repository. `);
515
+ console.log(`Installed WordPress: ${currentWordPressTag} has no available container image in repository. `);
519
516
  console.log('You must select a new WordPress image to continue... ');
520
517
  } else {
521
518
  console.log('Environment WordPress version is: ' + _chalk.default.yellow(match.ref));
@@ -529,28 +526,19 @@ async function updateWordPressImage(instancePath, options) {
529
526
  }); // If the user takes the new WP version path
530
527
 
531
528
  if (confirm.upgrade) {
532
- console.log('Upgrading from: ' + _chalk.default.yellow(match.ref) + ' to:'); // Select a new image
529
+ console.log('Upgrading from: ' + _chalk.default.yellow(currentWordPressTag) + ' to:'); // Select a new image
533
530
 
534
531
  const choice = await (0, _devEnvironmentCli.promptForComponent)('wordpress');
535
532
  const version = filteredVersions.find(({
536
533
  tag
537
- }) => tag.trim() === choice.tag.trim());
538
- const selectedImage = `ghcr.io/automattic/vip-container-images/wordpress:${version.tag}`; // Change the lando file and rebuild.
539
-
540
- const data = _fs.default.readFileSync(landoFile, {
541
- encoding: 'utf8',
542
- flag: 'r'
543
- });
544
-
545
- const edit = data.replace(/ghcr\.io\/.*wordpress\:.*\d+\.\d+(?:\.\d+)?/g, selectedImage);
546
-
547
- _fs.default.writeFileSync(landoFile, edit); // Stage for rebuild
548
-
534
+ }) => tag.trim() === choice.tag.trim()); // Write new data and stage for rebuild
549
535
 
550
- options.skipRebuild = false;
536
+ envData.wordpress.tag = version.tag;
537
+ await updateEnvironment(envData);
538
+ return true;
551
539
  }
552
540
 
553
- return;
541
+ return false;
554
542
  }
555
543
  /**
556
544
  * Makes a web call to raw.githubusercontent.com
@@ -12,14 +12,10 @@ exports.landoExec = landoExec;
12
12
 
13
13
  var _debug = _interopRequireDefault(require("debug"));
14
14
 
15
- var _fs = _interopRequireDefault(require("fs"));
16
-
17
15
  var _os = _interopRequireDefault(require("os"));
18
16
 
19
17
  var _path = _interopRequireDefault(require("path"));
20
18
 
21
- var _util = require("util");
22
-
23
19
  var _lando = _interopRequireDefault(require("lando/lib/lando"));
24
20
 
25
21
  var _utils = _interopRequireDefault(require("lando/plugins/lando-core/lib/utils"));
@@ -30,8 +26,6 @@ var _chalk = _interopRequireDefault(require("chalk"));
30
26
 
31
27
  var _app = _interopRequireDefault(require("lando/lib/app"));
32
28
 
33
- var _coreJs = require("core-js");
34
-
35
29
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
36
30
 
37
31
  /**
@@ -52,7 +46,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
52
46
  */
53
47
  const DEBUG_KEY = '@automattic/vip:bin:dev-environment-lando';
54
48
  const debug = (0, _debug.default)(DEBUG_KEY);
55
- const mkdtemp = (0, _util.promisify)(_fs.default.mkdtemp);
56
49
  let landoConfRoot;
57
50
  /**
58
51
  * @returns {string} User configuration root directory (aka userConfRoot in Lando)
@@ -146,7 +146,7 @@ function buildErrorMessage(importFailed) {
146
146
  }
147
147
 
148
148
  message += _chalk.default.red(importFailed.error ? importFailed.error : importFailed);
149
- message += '\n\nPlease check the status of your Import using `vip import status @appId.production`';
149
+ message += '\n\nPlease check the status of your Import using `vip import media status @mysite.production`';
150
150
  message += '\n\nIf this error persists and you are not sure on how to fix, please contact support\n';
151
151
  return message;
152
152
  }
@@ -254,6 +254,8 @@ ${maybeExitPrompt}
254
254
 
255
255
  const getResults = () => new Promise((resolve, reject) => {
256
256
  const checkStatus = async () => {
257
+ var _importJob$progress$s, _importJob$progress, _importJob$progress$s2, _importJob$progress2;
258
+
257
259
  let status;
258
260
 
259
261
  try {
@@ -322,8 +324,8 @@ ${maybeExitPrompt}
322
324
  return resolve('No import job found');
323
325
  }
324
326
 
325
- jobStatus = importJob.progress.status;
326
- jobSteps = importJob.progress.steps;
327
+ jobStatus = (_importJob$progress$s = (_importJob$progress = importJob.progress) === null || _importJob$progress === void 0 ? void 0 : _importJob$progress.status) !== null && _importJob$progress$s !== void 0 ? _importJob$progress$s : 'unknown';
328
+ jobSteps = (_importJob$progress$s2 = (_importJob$progress2 = importJob.progress) === null || _importJob$progress2 === void 0 ? void 0 : _importJob$progress2.steps) !== null && _importJob$progress$s2 !== void 0 ? _importJob$progress$s2 : [];
327
329
  createdAt = importJob.createdAt;
328
330
  completedAt = importJob.completedAt;
329
331
  const {
@@ -17,7 +17,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
17
17
  * External dependencies
18
18
  */
19
19
  // Accepted media file extensions
20
- const acceptedExtensions = ['jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'svg', 'tiff', 'tif', 'ico', 'asf', 'asx', 'wmv', 'wmx', 'wm', 'avi', 'divx', 'mov', 'qt', 'mpeg', 'mpg', 'mpe', 'mp4', 'm4v', 'ogv', 'webm', 'mkv', '3gp', '3gpp', '3g2', '3gp2', 'txt', 'asc', 'c', 'cc', 'h', 'srt', 'csv', 'tsv', 'ics', 'rtx', 'css', 'vtt', 'dfxp', 'mp3', 'm4a', 'm4b', 'ra', 'ram', 'wav', 'ogg', 'oga', 'mid', 'midi', 'wma', 'wax', 'mka', 'rtf', 'js', 'pdf', 'class', 'psd', 'xcf', 'doc', 'pot', 'pps', 'ppt', 'wri', 'xla', 'xls', 'xlt', 'xlw', 'mdb', 'mpp', 'docx', 'docm', 'dotx', 'dotm', 'xlsx', 'xlsm', 'xlsb', 'xltx', 'xltm', 'xlam', 'pptx', 'pptm', 'ppsx', 'ppsm', 'potx', 'potm', 'ppam', 'sldx', 'sldm', 'onetoc', ' onetoc2', 'onetmp', 'onepkg', 'oxps', 'xps', 'odt', 'odp', 'ods', 'odg', 'odc', 'odb', 'odf', 'wp', 'wpd', 'key', 'numbers', 'pages'];
20
+ const acceptedExtensions = ['jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'svg', 'tiff', 'tif', 'ico', 'asf', 'asx', 'wmv', 'wmx', 'wm', 'avi', 'divx', 'mov', 'qt', 'mpeg', 'mpg', 'mpe', 'mp4', 'm4v', 'ogv', 'webm', 'mkv', '3gp', '3gpp', '3g2', '3gp2', 'txt', 'asc', 'c', 'cc', 'h', 'srt', 'csv', 'tsv', 'ics', 'rtx', 'css', 'vtt', 'dfxp', 'mp3', 'm4a', 'm4b', 'ra', 'ram', 'wav', 'ogg', 'oga', 'mid', 'midi', 'wma', 'wax', 'mka', 'rtf', 'js', 'pdf', 'class', 'psd', 'xcf', 'doc', 'pot', 'pps', 'ppt', 'wri', 'xla', 'xls', 'xlt', 'xlw', 'mdb', 'mpp', 'docx', 'docm', 'dotx', 'dotm', 'xlsx', 'xlsm', 'xlsb', 'xltx', 'xltm', 'xlam', 'pptx', 'pptm', 'ppsx', 'ppsm', 'potx', 'potm', 'ppam', 'sldx', 'sldm', 'onetoc', ' onetoc2', 'onetmp', 'onepkg', 'oxps', 'xps', 'odt', 'odp', 'ods', 'odg', 'odc', 'odb', 'odf', 'webp', 'wp', 'wpd', 'key', 'numbers', 'pages'];
21
21
  /**
22
22
  * Character validation global variables
23
23
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/vip",
3
- "version": "2.9.0",
3
+ "version": "2.9.3",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
@@ -5392,8 +5392,8 @@
5392
5392
  }
5393
5393
  },
5394
5394
  "cli-table": {
5395
- "version": "github:automattic/cli-table#7b14232ba779929e1859b267bf753c150d90a618",
5396
- "from": "github:automattic/cli-table#7b14232",
5395
+ "version": "git+ssh://git@github.com/automattic/cli-table.git#7b14232ba779929e1859b267bf753c150d90a618",
5396
+ "from": "cli-table@github:automattic/cli-table#7b14232",
5397
5397
  "requires": {
5398
5398
  "chalk": "^2.4.1",
5399
5399
  "wcwidth": "^1.0.1"
@@ -5667,12 +5667,6 @@
5667
5667
  "mkdir-p": "~0.0.4"
5668
5668
  }
5669
5669
  },
5670
- "core-js": {
5671
- "version": "3.12.0",
5672
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.12.0.tgz",
5673
- "integrity": "sha512-SaMnchL//WwU2Ot1hhkPflE8gzo7uq1FGvUJ8GKmi3TOU7rGTHIU+eir1WGf6qOtTyxdfdcp10yPdGZ59sQ3hw==",
5674
- "dev": true
5675
- },
5676
5670
  "core-js-compat": {
5677
5671
  "version": "3.12.0",
5678
5672
  "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.12.0.tgz",
@@ -6608,8 +6602,8 @@
6608
6602
  "dev": true
6609
6603
  },
6610
6604
  "eslint-config-wpvip": {
6611
- "version": "github:automattic/eslint-config-wpvip#c6605d1c3a545d43ac2149cd464ec3c38ebc58d5",
6612
- "from": "github:automattic/eslint-config-wpvip#c6605d1",
6605
+ "version": "git+ssh://git@github.com/automattic/eslint-config-wpvip.git#c6605d1c3a545d43ac2149cd464ec3c38ebc58d5",
6606
+ "from": "eslint-config-wpvip@github:automattic/eslint-config-wpvip#c6605d1",
6613
6607
  "dev": true,
6614
6608
  "requires": {
6615
6609
  "eslint-config-wpcalypso": "^4.0.0"
@@ -10027,8 +10021,8 @@
10027
10021
  "dev": true
10028
10022
  },
10029
10023
  "lando": {
10030
- "version": "git+https://github.com/Automattic/lando-cli.git#57d2cd8a23e73b3e5165c3e2862b42aa0881ef2f",
10031
- "from": "git+https://github.com/Automattic/lando-cli.git#v3.5.1-patch2021_12_06",
10024
+ "version": "git+ssh://git@github.com/Automattic/lando-cli.git#57d2cd8a23e73b3e5165c3e2862b42aa0881ef2f",
10025
+ "from": "lando@git+https://github.com/Automattic/lando-cli.git#v3.5.1-patch2021_12_06",
10032
10026
  "requires": {
10033
10027
  "@lando/platformsh": "^0.6.0",
10034
10028
  "axios": "0.21.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/vip",
3
- "version": "2.9.0",
3
+ "version": "2.9.3",
4
4
  "description": "The VIP Javascript library & CLI",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -42,7 +42,8 @@
42
42
  },
43
43
  "scripts": {
44
44
  "test": "npm run lint && npm run flow && jest --coverage",
45
- "prepare": "npm run build",
45
+ "clean": "rimraf dist",
46
+ "prepare": "npm run clean && npm run build",
46
47
  "prepack": "npm run prepareConfig:publish",
47
48
  "postinstall": "node ./helpers/check-version.js",
48
49
  "build": "npm run prepareConfig:local && babel src -d dist",
@@ -86,7 +87,6 @@
86
87
  "babel-core": "7.0.0-bridge.0",
87
88
  "babel-jest": "26.6.3",
88
89
  "babel-plugin-module-resolver": "4.1.0",
89
- "core-js": "3.12.0",
90
90
  "eslint": "7.32.0",
91
91
  "eslint-config-wpvip": "github:automattic/eslint-config-wpvip#c6605d1",
92
92
  "eslint-plugin-flowtype": "5.7.2",
@@ -101,7 +101,8 @@
101
101
  "jest": "27.2.1",
102
102
  "nock": "13.0.11",
103
103
  "prettier": "npm:wp-prettier@2.0.5",
104
- "publish-please": "5.5.2"
104
+ "publish-please": "5.5.2",
105
+ "rimraf": "3.0.2"
105
106
  },
106
107
  "dependencies": {
107
108
  "@apollo/client": "^3.3.6",