Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Apr 23, 2024
1 parent fe6f00d commit 510fe9e
Show file tree
Hide file tree
Showing 10 changed files with 179 additions and 176 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
name: ${{matrix.node}} on ${{matrix.os}}
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{matrix.node}}
- run: npm install
- run: npm test
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
strategy:
matrix:
os:
Expand Down
4 changes: 2 additions & 2 deletions index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ unified()

unified().use(function () {
// Function.
this.parser = function (doc, file) {
expectType<string>(doc)
this.parser = function (document, file) {
expectType<string>(document)
expectType<VFile>(file)
return {type: ''}
}
Expand Down
8 changes: 4 additions & 4 deletions lib/callable-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ export const CallableInstance =
// type-coverage:ignore-next-line
constr.prototype
)
const func = proto[property]
const value = proto[property]
/** @type {(...parameters: Array<unknown>) => unknown} */
const apply = function () {
return func.apply(apply, arguments)
return value.apply(apply, arguments)
}

Object.setPrototypeOf(apply, proto)

const names = Object.getOwnPropertyNames(func)
const names = Object.getOwnPropertyNames(value)

for (const p of names) {
const descriptor = Object.getOwnPropertyDescriptor(func, p)
const descriptor = Object.getOwnPropertyDescriptor(value, p)
if (descriptor) Object.defineProperty(apply, p, descriptor)
}

Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@
"@types/hast": "^3.0.0",
"@types/mdast": "^4.0.0",
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"c8": "^9.0.0",
"prettier": "^3.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"tsd": "^0.29.0",
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^10.0.0",
"tsd": "^0.31.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.56.0"
"xo": "^0.58.0"
},
"scripts": {
"build": "tsc --build --clean && tsc --build && node script/fix-types.js && type-coverage && tsd",
Expand Down Expand Up @@ -107,7 +107,8 @@
"rules": {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/naming-convention": "off"
"@typescript-eslint/naming-convention": "off",
"import/no-duplicates": "off"
}
}
],
Expand Down
Loading

0 comments on commit 510fe9e

Please sign in to comment.