@percy/cli-config 1.26.2 → 1.26.3-alpha.4

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/dist/create.js CHANGED
@@ -48,8 +48,9 @@ export const create = command('create', {
48
48
  log,
49
49
  exit
50
50
  }) => {
51
+ var _FILETYPES$find;
51
52
  // discern the filetype
52
- let filetype = args.filepath ? path.extname(args.filepath).replace(/^./, '') : FILETYPES.find(t => flags[t]) ?? 'yml';
53
+ let filetype = args.filepath ? path.extname(args.filepath).replace(/^./, '') : (_FILETYPES$find = FILETYPES.find(t => flags[t])) !== null && _FILETYPES$find !== void 0 ? _FILETYPES$find : 'yml';
53
54
 
54
55
  // verify the filetype is supported
55
56
  if (!DEFAULT_FILES[filetype]) {
package/dist/migrate.js CHANGED
@@ -1,3 +1,8 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
6
  import fs from 'fs';
2
7
  import path from 'path';
3
8
  import command, { PercyConfig } from '@percy/cli-command';
@@ -55,10 +60,9 @@ export const migrate = command('migrate', {
55
60
  if (path.basename(output) === 'package.json') {
56
61
  // update the package.json entry by reading and modifying it
57
62
  let pkg = JSON.parse(fs.readFileSync(output));
58
- content = PercyConfig.stringify(format, {
59
- ...pkg,
63
+ content = PercyConfig.stringify(format, _objectSpread(_objectSpread({}, pkg), {}, {
60
64
  percy: migrated
61
- });
65
+ }));
62
66
  } else if (input === output) {
63
67
  // rename input if it is the output
64
68
  let {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/cli-config",
3
- "version": "1.26.2",
3
+ "version": "1.26.3-alpha.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "publishConfig": {
11
11
  "access": "public",
12
- "tag": "latest"
12
+ "tag": "alpha"
13
13
  },
14
14
  "engines": {
15
15
  "node": ">=14"
@@ -33,7 +33,7 @@
33
33
  ]
34
34
  },
35
35
  "dependencies": {
36
- "@percy/cli-command": "1.26.2"
36
+ "@percy/cli-command": "1.26.3-alpha.4"
37
37
  },
38
- "gitHead": "f97b6c463109420a4045dc0396bf9d429c2dc77d"
38
+ "gitHead": "d89ab97b8d5169eafd3eb42bdbbef41a2ac624ba"
39
39
  }