Skip to content

Commit

Permalink
fix: use es2022
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Oct 24, 2023
1 parent 4531bd1 commit 9040835
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 40 deletions.
14 changes: 7 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ function traverseFilePathUntil(filename: string, predicate: (filename: string) =

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

Check failure on line 20 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (lts/*)

Unexpected parentheses around single function argument

Check failure on line 20 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (lts/*)

Unexpected parentheses around single function argument

Check failure on line 20 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (lts/*)

Unexpected parentheses around single function argument

Check failure on line 20 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (lts/*)

Unexpected parentheses around single function argument

Check failure on line 20 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (latest)

Unexpected parentheses around single function argument

Check failure on line 20 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (latest)

Unexpected parentheses around single function argument

Check failure on line 20 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (latest)

Unexpected parentheses around single function argument

Check failure on line 20 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (latest)

Unexpected parentheses around single function argument

export const test = fancy
.register('loadConfig', loadConfig)
.register('command', command)
.register('exit', exit)
.register('hook', hook)
.env({NODE_ENV: 'test'})
.register('loadConfig', loadConfig)

Check failure on line 23 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 23 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 23 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 23 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 23 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (latest)

Expected indentation of 0 spaces but found 2

Check failure on line 23 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (latest)

Expected indentation of 0 spaces but found 2

Check failure on line 23 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (latest)

Expected indentation of 0 spaces but found 2

Check failure on line 23 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (latest)

Expected indentation of 0 spaces but found 2
.register('command', command)

Check failure on line 24 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 24 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 24 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 24 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 24 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (latest)

Expected indentation of 0 spaces but found 2

Check failure on line 24 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (latest)

Expected indentation of 0 spaces but found 2

Check failure on line 24 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (latest)

Expected indentation of 0 spaces but found 2

Check failure on line 24 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (latest)

Expected indentation of 0 spaces but found 2
.register('exit', exit)

Check failure on line 25 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 25 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 25 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 25 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 25 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (latest)

Expected indentation of 0 spaces but found 2

Check failure on line 25 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (latest)

Expected indentation of 0 spaces but found 2

Check failure on line 25 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (latest)

Expected indentation of 0 spaces but found 2

Check failure on line 25 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (latest)

Expected indentation of 0 spaces but found 2
.register('hook', hook)

Check failure on line 26 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 26 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 26 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (latest)

Expected indentation of 0 spaces but found 2

Check failure on line 26 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (latest)

Expected indentation of 0 spaces but found 2
.env({NODE_ENV: 'test'})

Check failure on line 27 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 27 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (lts/*)

Expected indentation of 0 spaces but found 2

Check failure on line 27 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / linux-unit-tests / linux-unit-tests (latest)

Expected indentation of 0 spaces but found 2

Check failure on line 27 in src/index.ts

View workflow job for this annotation

GitHub Actions / unit-tests / windows-unit-tests / windows-unit-tests (latest)

Expected indentation of 0 spaces but found 2

export default test

export {command} from './command'
export {Config} from '@oclif/core'

export {Config} from '@oclif/core'
export {FancyTypes, expect} from 'fancy-test'
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"pretty": true,
"rootDirs": ["./src"],
"strict": true,
"target": "es2017",
"target": "es2022",
"esModuleInterop": true
},
"include": ["./src/**/*"]
Expand Down
67 changes: 35 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,6 @@
resolved "https://registry.yarnpkg.com/@oclif/prettier-config/-/prettier-config-0.2.1.tgz#1def9f38134f9bfb229257f48a35f7d0d183dc78"
integrity sha512-XB8kwQj8zynXjIIWRm+6gO/r8Qft2xKtwBMSmq1JRqtA6TpwpqECqiu8LosBCyg2JBXuUy2lU23/L98KIR7FrQ==

"@sinonjs/commons@^1.7.0":
version "1.8.3"
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d"
integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==
dependencies:
type-detect "4.0.8"

"@sinonjs/commons@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-2.0.0.tgz#fd4ca5b063554307e8327b4564bd56d3b73924a3"
Expand All @@ -350,13 +343,6 @@
dependencies:
"@sinonjs/commons" "^3.0.0"

"@sinonjs/fake-timers@^7.1.0":
version "7.1.2"
resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz#2524eae70c4910edccf99b2f4e6efc5894aff7b5"
integrity sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==
dependencies:
"@sinonjs/commons" "^1.7.0"

"@sinonjs/samsam@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-8.0.0.tgz#0d488c91efb3fa1442e26abea81759dfc8b5ac60"
Expand Down Expand Up @@ -392,9 +378,9 @@
integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==

"@types/chai@*":
version "4.3.6"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.6.tgz#7b489e8baf393d5dd1266fb203ddd4ea941259e6"
integrity sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==
version "4.3.9"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.9.tgz#144d762491967db8c6dea38e03d2206c2623feec"
integrity sha512-69TtiDzu0bcmKQv3yg1Zx409/Kd7r0b5F1PfpYJfSHzLGtB53547V4u+9iqKYsTu/O2ai6KTb0TInNpvuQ3qmg==

"@types/cli-progress@^3.11.4":
version "3.11.4"
Expand All @@ -414,9 +400,9 @@
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==

"@types/lodash@*":
version "4.14.172"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.172.tgz#aad774c28e7bfd7a67de25408e03ee5a8c3d028a"
integrity sha512-/BHF5HAx3em7/KkzVKm3LrsD6HZAXuXO1AJZQ3cRRBZj4oHZDviWPYu0aEplAqDFNHZPW6d3G7KN+ONcCCC7pw==
version "4.14.200"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.200.tgz#435b6035c7eba9cdf1e039af8212c9e9281e7149"
integrity sha512-YI/M/4HRImtNf3pJgbF+W6FrXovqj+T+/HpENLTooK9PnkacBsDpeP3IpHab40CClUfhNmdM2WTNP2sa2dni5Q==

"@types/minimist@^1.2.0":
version "1.2.4"
Expand All @@ -428,7 +414,14 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.3.tgz#4804fe9cd39da26eb62fa65c15ea77615a187812"
integrity sha512-RsOPImTriV/OE4A9qKjMtk2MnXiuLLbcO3nCXK+kvq4nr0iMfFgpjaX3MPLb6f7+EL1FGSelYvuJMV6REH+ZPQ==

"@types/node@*", "@types/node@^18", "@types/node@^18.11.9":
"@types/node@*":
version "20.8.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e"
integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ==
dependencies:
undici-types "~5.25.1"

"@types/node@^18", "@types/node@^18.11.9":
version "18.18.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.6.tgz#26da694f75cdb057750f49d099da5e3f3824cb3e"
integrity sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==
Expand All @@ -444,11 +437,16 @@
integrity sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==

"@types/sinon@*":
version "10.0.2"
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.2.tgz#f360d2f189c0fd433d14aeb97b9d705d7e4cc0e4"
integrity sha512-BHn8Bpkapj8Wdfxvh2jWIUoaYB/9/XhsL0oOvBfRagJtKlSl9NWPcFOz2lRukI9szwGxFtYZCTejJSqsGDbdmw==
version "10.0.20"
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.20.tgz#f1585debf4c0d99f9938f4111e5479fb74865146"
integrity sha512-2APKKruFNCAZgx3daAyACGzWuJ028VVCUDk6o2rw/Z4PXT0ogwdV4KUegW0MwVs0Zu59auPXbbuBJHF12Sx1Eg==
dependencies:
"@sinonjs/fake-timers" "^7.1.0"
"@types/sinonjs__fake-timers" "*"

"@types/sinonjs__fake-timers@*":
version "8.1.4"
resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.4.tgz#663bb44e01f6bae4eaae3719d8b037411217c992"
integrity sha512-GDV68H0mBSN449sa5HEj51E0wfpVQb8xNSMzxf/PrypMFcLTMwJMOM/cgXiv71Mq5drkOQmUGvL1okOZcu6RrQ==

"@typescript-eslint/eslint-plugin@^6.8.0":
version "6.9.0"
Expand Down Expand Up @@ -2344,7 +2342,7 @@ json-stable-stringify-without-jsonify@^1.0.1:
json-stringify-safe@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==

json5@^1.0.2:
version "1.0.2"
Expand Down Expand Up @@ -2711,9 +2709,9 @@ nice-try@^1.0.4:
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==

nise@^5.1.4:
version "5.1.4"
resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.4.tgz#491ce7e7307d4ec546f5a659b2efe94a18b4bbc0"
integrity sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==
version "5.1.5"
resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.5.tgz#f2aef9536280b6c18940e32ba1fbdc770b8964ee"
integrity sha512-VJuPIfUFaXNRzETTQEEItTOP8Y171ijr+JLq42wHes3DiryR8vT+1TXQW/Rx8JNUhyYYWyIvjXTU6dOhJcs9Nw==
dependencies:
"@sinonjs/commons" "^2.0.0"
"@sinonjs/fake-timers" "^10.0.2"
Expand Down Expand Up @@ -3296,9 +3294,9 @@ signal-exit@^4.1.0:
integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==

sinon@^16.0.0:
version "16.0.0"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-16.0.0.tgz#06da4e63624b946c9d7e67cce21c2f67f40f23a9"
integrity sha512-B8AaZZm9CT5pqe4l4uWJztfD/mOTa7dL8Qo0W4+s+t74xECOgSZDDQCBjNgIK3+n4kyxQrSTv2V5ul8K25qkiQ==
version "16.1.3"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-16.1.3.tgz#b760ddafe785356e2847502657b4a0da5501fba8"
integrity sha512-mjnWWeyxcAf9nC0bXcPmiDut+oE8HYridTNzBbF98AYVLmWwGRp2ISEpyhYflG1ifILT+eNn3BmKUJPxjXUPlA==
dependencies:
"@sinonjs/commons" "^3.0.0"
"@sinonjs/fake-timers" "^10.3.0"
Expand Down Expand Up @@ -3681,6 +3679,11 @@ unbox-primitive@^1.0.2:
has-symbols "^1.0.3"
which-boxed-primitive "^1.0.2"

undici-types@~5.25.1:
version "5.25.3"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3"
integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==

universalify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
Expand Down

0 comments on commit 9040835

Please sign in to comment.