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
10 changes: 10 additions & 0 deletions .changeset/tricky-paws-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@tus/azure-store": major
"@tus/file-store": major
"@tus/gcs-store": major
"@tus/s3-store": major
"@tus/server": major
"@tus/utils": minor
---

Make this package ESM-only instead of CommonJS. Since Node.js >= 20.19.0 you can `require(esm)` so you can consume this package even if you don't ESM yourself yet.
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"organizeImports": {
"enabled": true
},
Expand Down
159 changes: 3 additions & 156 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"workspaces": ["packages/*", "test"],
"workspaces": [
"packages/*",
"test"
],
"scripts": {
"build": "tsc --build",
"lint": "biome lint --write .",
Expand Down
12 changes: 7 additions & 5 deletions packages/azure-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
"name": "@tus/azure-store",
"version": "1.0.0",
"description": "Azure blob storage for @tus/server",
"main": "dist/index.js",
"main": "./dist/index.js",
"exports": "./dist/index.js",
"type": "module",
"homepage": "https://github.com/tus/tus-node-server#readme",
"bugs": "https://github.com/tus/tus-node-server/issues",
"repository": "tus/tus-node-server",
"files": [
"README.md",
"LICENSE",
"dist",
"src"
"src",
"!test*"
],
"license": "MIT",
"scripts": {
"build": "tsc --build",
"test": "mocha --exit --extension ts --require ts-node/register"
"pretest": "tsc --build",
"test": "mocha './dist/test/*.js' --exit"
},
"dependencies": {
"@tus/utils": "^0.5.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'should'
import path from 'node:path'
import {AzureStore} from '../src'
import * as shared from 'test/stores.test'
import {AzureStore} from '@tus/azure-store'
import * as shared from '../../../utils/dist/test/stores.js'

const fixturesPath = path.resolve('../', '../', 'test', 'fixtures')
const storePath = path.resolve('../', '../', 'test', 'output', 'azure-store')
Expand Down
10 changes: 0 additions & 10 deletions packages/azure-store/tsconfig.build.json

This file was deleted.

10 changes: 4 additions & 6 deletions packages/azure-store/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"references": [
{ "path": "./tsconfig.build.json" },
{ "path": "../../test/tsconfig.json" }
],
"extends": "../../tsconfig.base.json",
"exclude": ["src"],
"references": [{ "path": "../utils/tsconfig.json" }],
"include": ["src"],
"compilerOptions": {
"noEmit": true
"rootDir": "src",
"outDir": "dist",
}
}
13 changes: 10 additions & 3 deletions packages/file-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@
"name": "@tus/file-store",
"version": "1.5.1",
"description": "Local file storage for @tus/server",
"main": "dist/index.js",
"main": "./dist/index.js",
"exports": "./dist/index.js",
"type": "module",
"homepage": "https://github.com/tus/tus-node-server#readme",
"bugs": "https://github.com/tus/tus-node-server/issues",
"repository": "tus/tus-node-server",
"files": ["README.md", "LICENSE", "dist", "src"],
"files": [
"dist",
"src",
"!test*"
],
"license": "MIT",
"scripts": {
"build": "tsc --build",
"test": "mocha --exit --extension ts --require ts-node/register"
"pretest": "tsc --build",
"test": "mocha './dist/test/*.js' --exit"
},
"dependencies": {
"@tus/utils": "^0.5.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/file-store/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import type http from 'node:http'

import debug from 'debug'

import {type Configstore, FileConfigstore} from './configstores'
import {type Configstore, FileConfigstore} from './configstores/index.js'
import {DataStore, Upload, ERRORS} from '@tus/utils'

export * from './configstores'
export * from './configstores/index.js'

type Options = {
directory: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import path from 'node:path'

import sinon from 'sinon'

import {FileStore, FileConfigstore} from '../src'
import {FileStore, FileConfigstore} from '@tus/file-store'
import {Upload} from '@tus/utils'

import * as shared from 'test/stores.test'
import * as shared from '../../../utils/dist/test/stores.js'

const fixturesPath = path.resolve('../', '../', 'test', 'fixtures')
const storePath = path.resolve('../', '../', 'test', 'output', 'file-store')
Expand Down
Loading