Skip to content

Commit

Permalink
Merge branch 'main' into feat-gcs-locker
Browse files Browse the repository at this point in the history
* main:
  Bump @shopify/semaphore from 3.0.2 to 3.1.0 (tus#637)
  Remove turbo for linting (tus#640)
  Refactor TypeScript setup (tus#641)
  • Loading branch information
Murderlon committed Aug 5, 2024
2 parents b70e666 + 0dd946c commit e98a459
Show file tree
Hide file tree
Showing 32 changed files with 150 additions and 88 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
.eslintcache
dist
.turbo
*.tsbuildinfo
output/

# Yarn
.pnp.*
Expand Down
34 changes: 16 additions & 18 deletions package-lock.json

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

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
"test"
],
"scripts": {
"build": "turbo run build",
"build": "tsc --build",
"demo": "npm run --workspace demo start",
"demo:gcs": "npm run --workspace demo start:gcs",
"demo:s3": "npm run --workspace demo start:s3",
"lint": "turbo run lint",
"format": "turbo run format",
"lint": "eslint .",
"format": "eslint --fix .",
"pretest": "tsc --build",
"test": "turbo run test",
"version": "changeset version",
"release": "gh workflow run release",
Expand All @@ -25,7 +26,8 @@
"eslint-config-custom": "^0.0.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.8",
"turbo": "^1.13.0"
"turbo": "^1.13.0",
"typescript": "^5.5.4"
},
"version": "0.0.0"
}
8 changes: 3 additions & 5 deletions packages/file-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"version": "1.4.0",
"description": "Local file storage for @tus/server",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage": "https://github.com/tus/tus-node-server#readme",
"bugs": "https://github.com/tus/tus-node-server/issues",
"repository": "tus/tus-node-server",
Expand All @@ -15,10 +14,10 @@
],
"license": "MIT",
"scripts": {
"build": "tsc",
"build": "tsc --build",
"lint": "eslint .",
"format": "eslint --fix .",
"test": "mocha test.ts --exit --extension ts --require ts-node/register"
"test": "mocha --exit --extension ts --require ts-node/register"
},
"dependencies": {
"@tus/utils": "^0.3.0",
Expand All @@ -31,8 +30,7 @@
"eslint": "^8.57.0",
"eslint-config-custom": "^0.0.0",
"mocha": "^10.4.0",
"should": "^13.2.3",
"typescript": "^5.3.3"
"should": "^13.2.3"
},
"optionalDependencies": {
"@redis/client": "^1.5.13"
Expand Down
File renamed without changes.
File renamed without changes.
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 './'
import {FileStore, FileConfigstore} from '../src'
import {Upload} from '@tus/utils'

import * as shared from '../../test/stores.test'
import * as shared from 'test/stores.test'

const fixturesPath = path.resolve('../', '../', 'test', 'fixtures')
const storePath = path.resolve('../', '../', 'test', 'output', 'file-store')
Expand Down
10 changes: 10 additions & 0 deletions packages/file-store/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"references": [{"path": "../utils/tsconfig.build.json"}],
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
}
}
7 changes: 4 additions & 3 deletions packages/file-store/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.json",
"include": ["index.ts"],
"references": [{"path": "./tsconfig.build.json"}, {"path": "../../test/tsconfig.json"}],
"extends": "../../tsconfig.base.json",
"exclude": ["src"],
"compilerOptions": {
"outDir": "./dist"
"noEmit": true
}
}
8 changes: 3 additions & 5 deletions packages/gcs-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"version": "1.3.0",
"description": "Google Cloud Storage for @tus/server",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage": "https://github.com/tus/tus-node-server#readme",
"bugs": "https://github.com/tus/tus-node-server/issues",
"repository": "tus/tus-node-server",
Expand All @@ -15,10 +14,10 @@
"dist"
],
"scripts": {
"build": "tsc",
"build": "tsc --build",
"lint": "eslint .",
"format": "eslint --fix .",
"test": "mocha test.ts --timeout 30000 --exit --extension ts --require ts-node/register"
"test": "mocha --timeout 30000 --exit --extension ts --require ts-node/register"
},
"dependencies": {
"@tus/utils": "^0.3.0",
Expand All @@ -33,8 +32,7 @@
"eslint": "^8.57.0",
"eslint-config-custom": "^0.0.0",
"mocha": "^10.4.0",
"should": "^13.2.3",
"typescript": "^5.3.3"
"should": "^13.2.3"
},
"peerDependencies": {
"@google-cloud/storage": "^7.12.0"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import path from 'node:path'

import {GCSStore} from './'
import {GCSStore} from '../src'

import * as shared from '../../test/stores.test'
import * as shared from 'test/stores.test'

import {Storage} from '@google-cloud/storage'

Expand Down
10 changes: 10 additions & 0 deletions packages/gcs-store/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"references": [{"path": "../utils//tsconfig.build.json"}],
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
}
}
7 changes: 4 additions & 3 deletions packages/gcs-store/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.json",
"include": ["index.ts"],
"references": [{"path": "./tsconfig.build.json"}, {"path": "../../test/tsconfig.json"}],
"extends": "../../tsconfig.base.json",
"exclude": ["src"],
"compilerOptions": {
"outDir": "./dist"
"noEmit": true
}
}
10 changes: 4 additions & 6 deletions packages/s3-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"version": "1.5.0",
"description": "AWS S3 store for @tus/server",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage": "https://github.com/tus/tus-node-server#readme",
"bugs": "https://github.com/tus/tus-node-server/issues",
"repository": "tus/tus-node-server",
Expand All @@ -15,14 +14,14 @@
"dist"
],
"scripts": {
"build": "tsc",
"build": "tsc --build",
"lint": "eslint .",
"format": "eslint --fix .",
"test": "mocha test.ts --timeout 40000 --exit --extension ts --require ts-node/register"
"test": "mocha --timeout 40000 --exit --extension ts --require ts-node/register"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.490.0",
"@shopify/semaphore": "^3.0.2",
"@shopify/semaphore": "^3.1.0",
"@tus/utils": "^0.3.0",
"debug": "^4.3.4",
"multistream": "^4.1.0"
Expand All @@ -35,8 +34,7 @@
"eslint": "^8.57.0",
"eslint-config-custom": "^0.0.0",
"mocha": "^10.4.0",
"should": "^13.2.3",
"typescript": "^5.3.3"
"should": "^13.2.3"
},
"engines": {
"node": ">=16"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/s3-store/test.ts → packages/s3-store/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {Readable} from 'node:stream'

import sinon from 'sinon'

import {S3Store} from './'
import * as shared from '../../test/stores.test'
import {S3Store} from '../src'
import * as shared from 'test/stores.test'
import {Upload} from '@tus/utils'

const fixturesPath = path.resolve('../', '../', 'test', 'fixtures')
Expand Down
10 changes: 10 additions & 0 deletions packages/s3-store/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"references": [{"path": "../utils//tsconfig.build.json"}],
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
}
}
7 changes: 4 additions & 3 deletions packages/s3-store/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.json",
"include": ["index.ts"],
"references": [{"path": "./tsconfig.build.json"}, {"path": "../../test/tsconfig.json"}],
"extends": "../../tsconfig.base.json",
"exclude": ["src"],
"compilerOptions": {
"outDir": "./dist"
"noEmit": true
}
}
6 changes: 2 additions & 4 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"version": "1.7.0",
"description": "Tus resumable upload protocol in Node.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage": "https://github.com/tus/tus-node-server#readme",
"bugs": "https://github.com/tus/tus-node-server/issues",
"repository": "tus/tus-node-server",
Expand All @@ -15,7 +14,7 @@
"dist"
],
"scripts": {
"build": "tsc",
"build": "tsc --build",
"lint": "eslint .",
"format": "eslint --fix .",
"test": "mocha --timeout 40000 --exit --extension ts --require ts-node/register"
Expand All @@ -39,8 +38,7 @@
"should": "^13.2.3",
"sinon": "^17.0.1",
"supertest": "^6.3.4",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
"ts-node": "^10.9.2"
},
"optionalDependencies": {
"@redis/client": "^1.5.13"
Expand Down
10 changes: 10 additions & 0 deletions packages/server/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"references": [{"path": "../utils/tsconfig.build.json"}],
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
}
}
7 changes: 4 additions & 3 deletions packages/server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.json",
"include": ["src"],
"references": [{"path": "./tsconfig.build.json"}],
"extends": "../../tsconfig.base.json",
"exclude": ["src"],
"compilerOptions": {
"outDir": "./dist"
"noEmit": true
}
}
Loading

0 comments on commit e98a459

Please sign in to comment.