Skip to content

Commit

Permalink
Update dependencies 2024-06 (#44)
Browse files Browse the repository at this point in the history
- Fix linting issues from biome update
- Fix formatting issues from linting
  • Loading branch information
moshen authored Jun 22, 2024
1 parent 351c57e commit 6f806f8
Show file tree
Hide file tree
Showing 12 changed files with 207 additions and 189 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dist/test/integration/foobar_magic dist/test/integration/png_magic dist/test/int
package: dist/index.js dist/libmagic.LICENSE

dist/index.js: $(ts_files) dist/libmagic-wrapper.js dist/LibmagicModule.d.ts dist/StdioOverrideFunction.d.ts
npx tsc -d
node ./node_modules/.bin/tsc -d

dist/libmagic-wrapper.js: src/libmagic-wrapper.c dist/magic.mgc dist/libmagic.so dist/libmagic-wrapper.d.ts
emcc -s MODULARIZE -s WASM=1 \
Expand Down Expand Up @@ -97,7 +97,7 @@ fmt-check: $(ts_files) $(fmt_files)
./node_modules/.bin/biome format $(ts_files) $(fmt_files)

lint: $(ts_files) $(fmt_files)
./node_modules/.bin/biome lint --apply $(ts_files) $(fmt_files)
./node_modules/.bin/biome lint --write $(ts_files) $(fmt_files)

lint-check: $(ts_files) $(fmt_files)
./node_modules/.bin/biome lint $(ts_files) $(fmt_files)
Expand Down
6 changes: 3 additions & 3 deletions examples/stream-detection/client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { default: axios } = require("axios");
const { Readable } = require("stream");
const { Readable } = require("node:stream");
const pngFile = Buffer.from("89504E470D0A1A0A0000000D49484452", "hex"); // png header
const zeros = Buffer.alloc(1024 * 16, 0); // Fill a 16KB buffer with zeros

Expand Down Expand Up @@ -46,8 +46,8 @@ async function postData(sourceBuf, maxSendBytes) {
url: "http://localhost:3000/file",
headers: { "Content-Type": "application/octet-stream" },
data,
maxContentLength: Infinity,
maxBodyLength: Infinity,
maxContentLength: Number.POSITIVE_INFINITY,
maxBodyLength: Number.POSITIVE_INFINITY,
});

end = process.hrtime.bigint();
Expand Down
2 changes: 1 addition & 1 deletion examples/stream-detection/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { WASMagic } = require("../../");
const { Transform, Writable, pipeline } = require("stream");
const { Transform, Writable, pipeline } = require("node:stream");
const express = require("express");
const app = express();
const maxAcceptNonPngBytes = 1024 * 1024 * 100; // 100MB
Expand Down
4 changes: 2 additions & 2 deletions examples/stream-detection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"private": true,
"license": "BSD-2-Clause",
"devDependencies": {
"axios": "^1.6.7",
"express": "^4.18.2"
"axios": "^1.7.2",
"express": "^4.19.2"
}
}
8 changes: 4 additions & 4 deletions examples/worker/index.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as fs from "fs/promises";
import * as assert from "assert";
import * as path from "path";
import * as os from "os";
import * as fs from "node:fs/promises";
import * as assert from "node:assert";
import * as path from "node:path";
import * as os from "node:os";
import { Piscina } from "piscina";

import { cases as testCases } from "../../dist/test/integration/data.js";
Expand Down
2 changes: 1 addition & 1 deletion examples/worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"private": true,
"license": "BSD-2-Clause",
"devDependencies": {
"piscina": "^4.3.2"
"piscina": "^4.6.0"
}
}
Loading

0 comments on commit 6f806f8

Please sign in to comment.