Skip to content

Commit

Permalink
Merge pull request #517 from oclif/mdonnalley/516
Browse files Browse the repository at this point in the history
fix: dont use named import
  • Loading branch information
mdonnalley committed Mar 11, 2024
2 parents e1f5d3c + e2028c0 commit 8d9d9ca
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"author": "Salesforce",
"bugs": "https://github.com/oclif/test/issues",
"dependencies": {
"@oclif/core": "^3.19.2",
"@oclif/core": "^3.23.0",
"chai": "^4.4.1",
"fancy-test": "^3.0.11"
"fancy-test": "^3.0.13"
},
"devDependencies": {
"@commitlint/config-conventional": "^18.6.2",
Expand All @@ -20,15 +20,14 @@
"eslint-config-oclif": "^5.1.1",
"eslint-config-oclif-typescript": "^3.1.2",
"eslint-config-prettier": "^9.1.0",
"globby": "^11.0.1",
"husky": "^8.0.3",
"husky": "^9.0.3",
"lint-staged": "^15.2.2",
"mocha": "^10",
"nock": "^13.5.4",
"prettier": "^3.2.5",
"shx": "^0.3.3",
"ts-node": "^10.9.2",
"typescript": "^5"
"typescript": "^5.4.2"
},
"engines": {
"node": ">=18.0.0"
Expand All @@ -47,7 +46,7 @@
"build": "shx rm -rf lib && tsc",
"lint": "eslint . --ext .ts",
"posttest": "yarn lint",
"prepare": "husky install",
"prepare": "husky && yarn build",
"prepublishOnly": "yarn run build",
"pretest": "yarn build --noEmit && tsc -p test --noEmit",
"test": "mocha --forbid-only \"test/**/*.test.ts\""
Expand Down
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {fancy} from 'fancy-test'
import * as fancyTest from 'fancy-test'
import {dirname} from 'node:path'

import {command} from './command'
Expand All @@ -15,15 +15,16 @@ function traverseFilePathUntil(filename: string, predicate: (filename: string) =
return current
}

// Update to path.dirname(url.fileURLToPath(import.meta.url)) whenever we update tsconfig target to ES2020
// Update to path.dirname(url.fileURLToPath(import.meta.url)) whenever we migrate to ESM
/* eslint-disable unicorn/prefer-module */
loadConfig.root = traverseFilePathUntil(
require.main?.path ?? module.path,
(p) => !(p.includes('node_modules') || p.includes('.pnpm') || p.includes('.yarn')),
)
/* eslint-enable unicorn/prefer-module */

export const test = fancy
// Using a named export to import fancy causes this issue: https://github.com/oclif/test/issues/516
export const test = fancyTest.fancy
.register('loadConfig', loadConfig)
.register('command', command)
.register('exit', exit)
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@oclif/core@^3.19.2":
"@oclif/core@^3.23.0":
version "3.23.0"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-3.23.0.tgz#d0ccc5f99c376e4bcfce04e8e94efae8417a53f8"
integrity sha512-giQ/8Ft8yXWg4IyPVtynPb7ihoQsa3A/1Q53UIJIhh+8k+EedE3lJ01yn6sq6Ha35IGqsG1WhkeHzlJIuldEaw==
Expand Down Expand Up @@ -1680,10 +1680,10 @@ execa@^5.0.0:
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"

fancy-test@^3.0.11:
version "3.0.12"
resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-3.0.12.tgz#919482bd63ab949aec4a51690c857f8c125383b3"
integrity sha512-pboHMxTnbD72FBl/fgYAmBb6AjiF0OgI1osAnnzzuFgBrzbFQj5so3XlknKC9k3HFJIy0HerCTyDjz/YZ6aBIg==
fancy-test@^3.0.13:
version "3.0.13"
resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-3.0.13.tgz#4164de4251952f3055419537b09d59823399dc8d"
integrity sha512-lOXntvGxCLknfTx3zWggtoRGNyk/lSHg6OvR1r8WtUlBRt/lcyYzW9rvHP3eBgxRo6Ii7cvMlvtA53N8TOvmzw==
dependencies:
"@types/chai" "*"
"@types/lodash" "*"
Expand Down Expand Up @@ -1956,7 +1956,7 @@ globalthis@^1.0.3:
dependencies:
define-properties "^1.1.3"

globby@^11.0.1, globby@^11.1.0:
globby@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
Expand Down Expand Up @@ -2070,10 +2070,10 @@ human-signals@^5.0.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28"
integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==

husky@^8.0.3:
version "8.0.3"
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184"
integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==
husky@^9.0.3:
version "9.0.11"
resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.11.tgz#fc91df4c756050de41b3e478b2158b87c1e79af9"
integrity sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==

hyperlinker@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -3750,7 +3750,7 @@ typed-array-length@^1.0.4:
for-each "^0.3.3"
is-typed-array "^1.1.9"

typescript@^5:
typescript@5.4.2:
version "5.4.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.2.tgz#0ae9cebcfae970718474fe0da2c090cad6577372"
integrity sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==
Expand Down

0 comments on commit 8d9d9ca

Please sign in to comment.