Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"env": {
"browser": true,
"node": true,
"es2021": true
},
"ignorePatterns": ["vendor", "dist", "node_modules"],
"rules": {
"no-cond-assign": "off",
"no-plusplus": "off",
"no-bitwise": "off"
},
"overrides": [
{
"files": ["test/test-types*.ts"],
"rules": {
"no-unused-vars": "off"
}
}
]
}
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tiny-oss is a tiny object storage SDK focused on uploading, with a functional AP

## Quick notes

- Commands live in `package.json`; formatting/lint are handled by `.editorconfig` and `oxlint.json`.
- Commands live in `package.json`; formatting/lint are handled by `.editorconfig` and `.oxlintrc.json`.
- Integration specs (`test/*-integration.spec.ts`) need `npm run serve` first (Hono server on :8080, credentials from `.env`); signature/unit specs don't.
- Input data is `Blob | ArrayBuffer | Uint8Array | string`; mini programs pass `ArrayBuffer`.

Expand Down
13 changes: 0 additions & 13 deletions oxlint.json

This file was deleted.

1 change: 0 additions & 1 deletion src/cos/request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { getTransport } from '../transport'
import { encodeUtf8 } from '../utils'
import { normalizeOptions, resolveTimeout, dataSize } from '../ops/request'
import { getCosAuth } from './signature'
import { resolveCosHost } from './host'
Expand Down
4 changes: 1 addition & 3 deletions src/ops/multipartUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ export function createMultipartUpload(protocol: Protocol, deps: MultipartUploadD

// Calculate parts to upload
for (let i = 1; i <= numParts; i++) {
const start = (i - 1) * actualPartSize
const end = Math.min(i * actualPartSize, fileSize)
const isDone = doneParts.some((p) => p.number === i)
if (!isDone) {
currentCheckpoint.parts.push({ number: i, etag: '' })
Expand Down Expand Up @@ -160,7 +158,7 @@ export function createMultipartUpload(protocol: Protocol, deps: MultipartUploadD
let result: UploadPartResult
try {
result = await uploadOnce()
} catch (err) {
} catch {
// Retry once on error
result = await uploadOnce()
}
Expand Down
1 change: 0 additions & 1 deletion test/aws.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ describe('AWS entry point', () => {
it('multipartUpload meta uses the x-amz-meta- prefix', async () => {
const calls: any[] = []
setTransport(async (url: string, opts: any) => {
const headers: Record<string, string> = {}
if (url.indexOf('?uploads') > -1) {
calls.push({ url, opts })
return {
Expand Down
2 changes: 1 addition & 1 deletion test/provider.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, it, expect, vi, afterEach } from 'vitest'
import { describe, it, expect, afterEach } from 'vitest'
import {
createPut,
createInitMultipartUpload,
Expand Down
Loading