@oclif/core 2.8.4 → 2.8.5

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.
@@ -727,7 +727,7 @@ const defaultFlagToCached = async (flag, isWritingManifest = false) => {
727
727
  // if not specified, try the default function
728
728
  if (typeof flag.default === 'function') {
729
729
  try {
730
- return await flag.default({ options: {}, flags: {} }, isWritingManifest);
730
+ return await flag.default({ options: flag, flags: {} }, isWritingManifest);
731
731
  }
732
732
  catch { }
733
733
  }
@@ -231,10 +231,7 @@ class Parser {
231
231
  }
232
232
  if (!(k in flags) && flag.default !== undefined) {
233
233
  this.metaData.flags[k] = { ...this.metaData.flags[k], setFromDefault: true };
234
- const defaultValue = (typeof flag.default === 'function' ? await flag.default({
235
- options: flag,
236
- flags, ...this.context,
237
- }) : flag.default);
234
+ const defaultValue = (typeof flag.default === 'function' ? await flag.default({ options: flag, flags }) : flag.default);
238
235
  flags[k] = defaultValue;
239
236
  }
240
237
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "2.8.4",
4
+ "version": "2.8.5",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -38,7 +38,7 @@
38
38
  "devDependencies": {
39
39
  "@commitlint/config-conventional": "^12.1.4",
40
40
  "@oclif/plugin-help": "^5.2.8",
41
- "@oclif/plugin-plugins": "^2.4.3",
41
+ "@oclif/plugin-plugins": "^2.4.7",
42
42
  "@oclif/test": "^2.3.15",
43
43
  "@types/ansi-styles": "^3.2.1",
44
44
  "@types/chai": "^4.3.4",