@oclif/test 3.2.11 → 3.2.12

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.
Files changed (2) hide show
  1. package/lib/index.js +4 -2
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -40,9 +40,11 @@ function traverseFilePathUntil(filename, predicate) {
40
40
  }
41
41
  return current;
42
42
  }
43
- // Update to path.dirname(url.fileURLToPath(import.meta.url)) whenever we migrate to ESM
44
43
  /* eslint-disable unicorn/prefer-module */
45
- load_config_1.loadConfig.root = traverseFilePathUntil(require.main?.path ?? module.path, (p) => !(p.includes('node_modules') || p.includes('.pnpm') || p.includes('.yarn')));
44
+ load_config_1.loadConfig.root =
45
+ process.env.OCLIF_TEST_ROOT ??
46
+ Object.values(require.cache).find((m) => m?.children.includes(module))?.filename ??
47
+ traverseFilePathUntil(require.main?.path ?? module.path, (p) => !(p.includes('node_modules') || p.includes('.pnpm') || p.includes('.yarn')));
46
48
  /* eslint-enable unicorn/prefer-module */
47
49
  // Using a named export to import fancy causes this issue: https://github.com/oclif/test/issues/516
48
50
  exports.test = fancyTest.fancy
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/test",
3
3
  "description": "test helpers for oclif components",
4
- "version": "3.2.11",
4
+ "version": "3.2.12",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/test/issues",
7
7
  "dependencies": {
@@ -17,8 +17,8 @@
17
17
  "@types/node": "^18",
18
18
  "commitlint": "^18.6.1",
19
19
  "eslint": "^8.57.0",
20
- "eslint-config-oclif": "^5.1.1",
21
- "eslint-config-oclif-typescript": "^3.1.4",
20
+ "eslint-config-oclif": "^5.1.3",
21
+ "eslint-config-oclif-typescript": "^3.1.6",
22
22
  "eslint-config-prettier": "^9.1.0",
23
23
  "husky": "^9.0.3",
24
24
  "lint-staged": "^15.2.2",