Skip to content

Commit e53fe49

Browse files
committed
chore: lint
1 parent e8bf935 commit e53fe49

21 files changed

Lines changed: 61 additions & 47 deletions

.github/workflows/nodejs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ jobs:
1010
strategy:
1111
matrix:
1212
node-version:
13-
- 18.x
14-
- 20.x
1513
- 22.x
14+
- 24.x
15+
- 25.x
1616
steps:
17-
- uses: actions/checkout@v4
18-
- uses: oven-sh/setup-bun@v1
17+
- uses: actions/checkout@v5
18+
- uses: oven-sh/setup-bun@v2
1919
with:
2020
bun-version: latest
2121
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v4
22+
uses: actions/setup-node@v6
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525
- name: Install Redrun

.gitignore

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
*.swp
2+
*.log
3+
*.lock
4+
15
.nyc_output
2-
yarn-error.log
3-
yarn.lock
6+
.idea
7+
48
package-lock.json
9+
510
node_modules
6-
npm-debug.log
711
coverage
8-
912
dist
1013
dist-dev
1114
server_
12-
*.swp
13-
14-
.idea

.npmignore

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
*.config.*
2+
*.log
3+
*.loc
4+
15
.*
2-
test
6+
37
webpack.config.js
4-
client
5-
coverage
6-
yarn-error.log
78
yarn.lock
89

9-
*.config.*
10+
test
11+
client
12+
coverage

.nycrc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"check-coverage": false,
33
"all": true,
44
"exclude": [
5-
"**/dist**",
65
"**/*.spec.js",
6+
"**/*.config.*",
7+
"**/dist**",
78
"**/fixture",
8-
"test",
99
".*.{js,mjs}",
10+
"test",
1011
"webpack**",
11-
"coverage",
12-
"**/*.config.*"
12+
"coverage"
1313
],
1414
"branches": 100,
1515
"lines": 100,

.putout.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"match": {
3+
"client": {
4+
"nodejs/declare": "off"
5+
}
6+
}
7+
}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ op.on('error', error(op));
8888
## Server
8989

9090
```js
91-
const fileop = require('fileop');
9291
const http = require('node:http');
92+
const fileop = require('fileop');
93+
9394
const express = require('express');
9495
const io = require('socket.io');
9596
const app = express();

client/fileop.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
'use strict';
22

33
const Emitify = require('emitify');
4+
5+
const {promisify} = require('es6-promisify');
46
const getHost = require('./get-host');
57
const loadSocket = require('./load-socket');
68
const operator = require('./operator');
79

8-
const {promisify} = require('es6-promisify');
9-
1010
module.exports = async (options = {}) => {
11-
const {socketPrefix = '/fileop', prefix = ''} = options;
11+
const {
12+
socketPrefix = '/fileop',
13+
prefix = '',
14+
} = options;
1215

1316
const socketPath = `${prefix}/socket.io`;
1417

client/load-socket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
module.exports = async () => {
4-
const {io} = window;
4+
const {io} = globalThis;
55

66
if (io)
77
return io;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"repository": {
2828
"type": "git",
29-
"url": "git://github.com/cloudcmd/node-fileop.git"
29+
"url": "git+https://github.com/cloudcmd/node-fileop.git"
3030
},
3131
"keywords": [
3232
"file",
@@ -45,7 +45,7 @@
4545
"homepage": "https://github.com/cloudcmd/node-fileop",
4646
"dependencies": {
4747
"@cloudcmd/move-files": "^8.0.0",
48-
"copymitter": "^10.0.2",
48+
"copymitter": "^9.0.0",
4949
"currify": "^4.0.0",
5050
"express": "^5.2.1",
5151
"fullstore": "^4.0.0",

server/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = (options) => {
1818
const {prefix = '/fileop'} = options;
1919

2020
router
21-
.route(`${prefix}/*`)
21+
.route(`${prefix}/*path`)
2222
.get(fileopFn(prefix))
2323
.get(staticFn);
2424

0 commit comments

Comments
 (0)