diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 0e7d25a02..b284360c4 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: include: - - package: streaming/mime-bytes + - package: uploads/mime-bytes env: {} - package: pgpm/core env: {} @@ -43,9 +43,9 @@ jobs: env: {} - package: packages/url-domains env: {} - - package: streaming/uuid-hash + - package: uploads/uuid-hash env: {} - - package: streaming/uuid-stream + - package: uploads/uuid-stream env: {} - package: postgres/introspectron env: {} @@ -59,12 +59,12 @@ jobs: env: {} - package: postgres/pg-codegen env: {} - - package: streaming/content-type-stream + - package: uploads/content-type-stream env: {} - - package: streaming/s3-streamer + - package: uploads/s3-streamer env: BUCKET_NAME: test-bucket - - package: streaming/upload-names + - package: uploads/upload-names env: {} - package: graphile/graphile-test env: {} diff --git a/graphql/explorer/README.md b/graphql/explorer/README.md index addac554e..a597023ea 100644 --- a/graphql/explorer/README.md +++ b/graphql/explorer/README.md @@ -9,5 +9,5 @@ - +

diff --git a/graphql/gql-ast/README.md b/graphql/gql-ast/README.md index eb555fc6e..3ee6bf2ee 100644 --- a/graphql/gql-ast/README.md +++ b/graphql/gql-ast/README.md @@ -11,7 +11,7 @@ Super bare-bones GraphQL AST utils - +

```sh diff --git a/graphql/query/README.md b/graphql/query/README.md index 12bbe018e..a6333c865 100644 --- a/graphql/query/README.md +++ b/graphql/query/README.md @@ -9,7 +9,7 @@ - +

> Fluent GraphQL query and mutation builder for PostGraphile-based schemas. diff --git a/graphql/react/README.md b/graphql/react/README.md index b788ccb40..cc47c816d 100644 --- a/graphql/react/README.md +++ b/graphql/react/README.md @@ -9,5 +9,5 @@ - +

diff --git a/pgpm/cli/__tests__/__snapshots__/init.install.test.ts.snap b/pgpm/cli/__tests__/__snapshots__/init.install.test.ts.snap index f590b12a1..b197f55d2 100644 --- a/pgpm/cli/__tests__/__snapshots__/init.install.test.ts.snap +++ b/pgpm/cli/__tests__/__snapshots__/init.install.test.ts.snap @@ -11,8 +11,8 @@ exports[`cmds:install - with initialized workspace and module installs a module }, "description": "my-module", "devDependencies": { - "makage": "0.1.8", - "pgsql-test": "^2.16.2", + "makage": "", + "pgsql-test": "", }, "homepage": "https://github.com/tester/my-module", "keywords": [], @@ -150,8 +150,8 @@ exports[`cmds:install - with initialized workspace and module installs two modul }, "description": "my-module", "devDependencies": { - "makage": "0.1.8", - "pgsql-test": "^2.16.2", + "makage": "", + "pgsql-test": "", }, "homepage": "https://github.com/tester/my-module", "keywords": [], diff --git a/pgpm/cli/__tests__/init.install.test.ts b/pgpm/cli/__tests__/init.install.test.ts index c4957e39b..0c0627292 100644 --- a/pgpm/cli/__tests__/init.install.test.ts +++ b/pgpm/cli/__tests__/init.install.test.ts @@ -6,7 +6,7 @@ import * as fs from 'fs'; import * as glob from 'glob'; import * as path from 'path'; -import { TestFixture } from '../test-utils'; +import { TestFixture, normalizePackageJsonForSnapshot } from '../test-utils'; describe('cmds:install - with initialized workspace and module', () => { let fixture: TestFixture; @@ -55,7 +55,11 @@ describe('cmds:install - with initialized workspace and module', () => { const pkgJson = JSON.parse( fs.readFileSync(path.join(moduleDir, 'package.json'), 'utf-8') ); - expect(pkgJson).toMatchSnapshot(); + // Normalize package.json for snapshot, preserving versions for explicitly installed packages + const normalizedPkgJson = normalizePackageJsonForSnapshot(pkgJson, { + preserveVersionsFor: ['@pgpm-testing/base32'] + }); + expect(normalizedPkgJson).toMatchSnapshot(); const installedFiles = glob.sync('**/*', { cwd: path.join(workspaceDir, 'extensions'), @@ -99,7 +103,11 @@ describe('cmds:install - with initialized workspace and module', () => { const pkgJson = JSON.parse( fs.readFileSync(path.join(moduleDir, 'package.json'), 'utf-8') ); - expect(pkgJson).toMatchSnapshot(); + // Normalize package.json for snapshot, preserving versions for explicitly installed packages + const normalizedPkgJson = normalizePackageJsonForSnapshot(pkgJson, { + preserveVersionsFor: ['@pgpm-testing/base32', '@pgpm-testing/utils'] + }); + expect(normalizedPkgJson).toMatchSnapshot(); const extPath = path.join(workspaceDir, 'extensions'); const installedFiles = glob.sync('**/*', { diff --git a/pgpm/cli/test-utils/cli.ts b/pgpm/cli/test-utils/cli.ts index c05d8d82d..30cb5ee32 100644 --- a/pgpm/cli/test-utils/cli.ts +++ b/pgpm/cli/test-utils/cli.ts @@ -3,6 +3,46 @@ import readline from 'readline'; import { Readable, Transform, Writable } from 'stream'; import { cleanAnsi } from 'clean-ansi'; +/** + * Normalizes a package.json object for snapshot testing by replacing + * dependency versions with a placeholder. This prevents snapshot failures + * when boilerplate/tooling dependency versions change. + * + * @param pkgJson - The parsed package.json object + * @param options - Configuration options + * @param options.preserveVersionsFor - Array of package names whose versions should be preserved (not normalized) + * @returns A new object with normalized dependency versions + */ +export function normalizePackageJsonForSnapshot( + pkgJson: Record, + options: { preserveVersionsFor?: string[] } = {} +): Record { + const { preserveVersionsFor = [] } = options; + const result = { ...pkgJson }; + + const depFields = ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'] as const; + + for (const field of depFields) { + const deps = result[field]; + if (deps && typeof deps === 'object' && !Array.isArray(deps)) { + const normalizedDeps: Record = {}; + const sortedKeys = Object.keys(deps as Record).sort(); + + for (const key of sortedKeys) { + if (preserveVersionsFor.includes(key)) { + normalizedDeps[key] = (deps as Record)[key]; + } else { + normalizedDeps[key] = ''; + } + } + + result[field] = normalizedDeps; + } + } + + return result; +} + export const KEY_SEQUENCES = { ENTER: '\u000d', UP_ARROW: '\u001b[A', diff --git a/pgpm/cli/test-utils/index.ts b/pgpm/cli/test-utils/index.ts index f44de4421..76f13c892 100644 --- a/pgpm/cli/test-utils/index.ts +++ b/pgpm/cli/test-utils/index.ts @@ -3,3 +3,4 @@ export * from './CLIDeployTestFixture'; export * from './fixtures'; export * from './init-argv'; export * from './TestDatabase'; +export { normalizePackageJsonForSnapshot } from './cli'; diff --git a/pgpm/core/README.md b/pgpm/core/README.md index 283dfe3ff..9de445ed7 100644 --- a/pgpm/core/README.md +++ b/pgpm/core/README.md @@ -9,7 +9,7 @@ - +

## Overview diff --git a/pgpm/types/README.md b/pgpm/types/README.md index 85a9c7ebb..4c6b2fbb2 100644 --- a/pgpm/types/README.md +++ b/pgpm/types/README.md @@ -9,5 +9,5 @@ - +

diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index db7f76445..bb0222463 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -625,10 +625,10 @@ importers: dependencies: '@constructive-io/s3-streamer': specifier: workspace:^ - version: link:../../streaming/s3-streamer/dist + version: link:../../uploads/s3-streamer/dist '@constructive-io/upload-names': specifier: workspace:^ - version: link:../../streaming/upload-names/dist + version: link:../../uploads/upload-names/dist graphile-build: specifier: ^4.14.1 version: 4.14.1(graphql@15.10.1) @@ -644,7 +644,7 @@ importers: version: link:../../graphql/env/dist '@constructive-io/s3-utils': specifier: workspace:^ - version: link:../../streaming/s3-utils/dist + version: link:../../uploads/s3-utils/dist '@types/pg': specifier: ^8.16.0 version: 8.16.0 @@ -754,10 +754,10 @@ importers: version: link:../types/dist '@constructive-io/s3-streamer': specifier: workspace:^ - version: link:../../streaming/s3-streamer/dist + version: link:../../uploads/s3-streamer/dist '@constructive-io/upload-names': specifier: workspace:^ - version: link:../../streaming/upload-names/dist + version: link:../../uploads/upload-names/dist '@constructive-io/url-domains': specifier: workspace:^ version: link:../../packages/url-domains/dist @@ -891,10 +891,10 @@ importers: version: link:../types/dist '@constructive-io/s3-utils': specifier: workspace:^ - version: link:../../streaming/s3-utils/dist + version: link:../../uploads/s3-utils/dist '@constructive-io/upload-names': specifier: workspace:^ - version: link:../../streaming/upload-names/dist + version: link:../../uploads/upload-names/dist '@constructive-io/url-domains': specifier: workspace:^ version: link:../../packages/url-domains/dist @@ -1863,7 +1863,7 @@ importers: specifier: workspace:^ version: link:../../postgres/pgsql-test/dist - streaming/content-type-stream: + uploads/content-type-stream: dependencies: etag-hash: specifier: workspace:^ @@ -1880,14 +1880,14 @@ importers: version: 0.1.9 publishDirectory: dist - streaming/etag-hash: + uploads/etag-hash: devDependencies: makage: specifier: ^0.1.9 version: 0.1.9 publishDirectory: dist - streaming/etag-stream: + uploads/etag-stream: dependencies: etag-hash: specifier: workspace:^ @@ -1901,7 +1901,7 @@ importers: version: 0.1.9 publishDirectory: dist - streaming/mime-bytes: + uploads/mime-bytes: devDependencies: glob: specifier: ^13.0.0 @@ -1911,7 +1911,7 @@ importers: version: 0.1.9 publishDirectory: dist - streaming/s3-streamer: + uploads/s3-streamer: dependencies: '@aws-sdk/client-s3': specifier: ^3.958.0 @@ -1940,7 +1940,7 @@ importers: version: 0.1.9 publishDirectory: dist - streaming/s3-utils: + uploads/s3-utils: dependencies: '@aws-sdk/client-s3': specifier: ^3.958.0 @@ -1957,7 +1957,7 @@ importers: version: 0.1.9 publishDirectory: dist - streaming/stream-to-etag: + uploads/stream-to-etag: dependencies: etag-hash: specifier: workspace:^ @@ -1971,7 +1971,7 @@ importers: version: 0.1.9 publishDirectory: dist - streaming/upload-names: + uploads/upload-names: devDependencies: glob: specifier: ^13.0.0 @@ -1981,14 +1981,14 @@ importers: version: 0.1.9 publishDirectory: dist - streaming/uuid-hash: + uploads/uuid-hash: devDependencies: makage: specifier: ^0.1.9 version: 0.1.9 publishDirectory: dist - streaming/uuid-stream: + uploads/uuid-stream: dependencies: uuid-hash: specifier: workspace:^ @@ -9338,24 +9338,24 @@ snapshots: dependencies: '@graphql-tools/utils': 10.11.0(graphql@15.10.1) graphql: 15.10.1 - tslib: 2.6.3 + tslib: 2.8.1 '@graphql-tools/optimize@1.4.0(graphql@15.10.1)': dependencies: graphql: 15.10.1 - tslib: 2.6.3 + tslib: 2.8.1 '@graphql-tools/optimize@2.0.0(graphql@15.10.1)': dependencies: graphql: 15.10.1 - tslib: 2.6.3 + tslib: 2.8.1 '@graphql-tools/relay-operation-optimizer@6.5.18(encoding@0.1.13)(graphql@15.10.1)': dependencies: '@ardatan/relay-compiler': 12.0.0(encoding@0.1.13)(graphql@15.10.1) '@graphql-tools/utils': 9.2.1(graphql@15.10.1) graphql: 15.10.1 - tslib: 2.6.3 + tslib: 2.8.1 transitivePeerDependencies: - encoding - supports-color @@ -9365,7 +9365,7 @@ snapshots: '@ardatan/relay-compiler': 12.0.3(encoding@0.1.13)(graphql@15.10.1) '@graphql-tools/utils': 10.11.0(graphql@15.10.1) graphql: 15.10.1 - tslib: 2.6.3 + tslib: 2.8.1 transitivePeerDependencies: - encoding @@ -9374,7 +9374,7 @@ snapshots: '@graphql-tools/merge': 9.1.6(graphql@15.10.1) '@graphql-tools/utils': 10.11.0(graphql@15.10.1) graphql: 15.10.1 - tslib: 2.6.3 + tslib: 2.8.1 '@graphql-tools/utils@10.11.0(graphql@15.10.1)': dependencies: @@ -9382,18 +9382,18 @@ snapshots: '@whatwg-node/promise-helpers': 1.3.2 cross-inspect: 1.0.1 graphql: 15.10.1 - tslib: 2.6.3 + tslib: 2.8.1 '@graphql-tools/utils@8.13.1(graphql@15.10.1)': dependencies: graphql: 15.10.1 - tslib: 2.6.3 + tslib: 2.8.1 '@graphql-tools/utils@9.2.1(graphql@15.10.1)': dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@15.10.1) graphql: 15.10.1 - tslib: 2.6.3 + tslib: 2.8.1 '@graphql-typed-document-node/core@3.2.0(graphql@15.10.1)': dependencies: @@ -10936,7 +10936,7 @@ snapshots: '@whatwg-node/promise-helpers@1.3.2': dependencies: - tslib: 2.6.3 + tslib: 2.8.1 '@yarnpkg/lockfile@1.1.0': {} @@ -11750,7 +11750,7 @@ snapshots: cross-inspect@1.0.1: dependencies: - tslib: 2.6.3 + tslib: 2.8.1 cross-spawn@7.0.6: dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 69a0520b4..9ca79255f 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,7 +2,7 @@ packages: - 'packages/*' - 'pgpm/*' - 'graphql/*' - - 'streaming/*' + - 'uploads/*' - 'postgres/*' - 'graphile/*' - 'jobs/*' diff --git a/postgres/drizzle-orm-test/README.md b/postgres/drizzle-orm-test/README.md index 703af69a9..8c82768c6 100644 --- a/postgres/drizzle-orm-test/README.md +++ b/postgres/drizzle-orm-test/README.md @@ -12,7 +12,7 @@ - +

diff --git a/postgres/introspectron/README.md b/postgres/introspectron/README.md index cbfd88326..816822871 100644 --- a/postgres/introspectron/README.md +++ b/postgres/introspectron/README.md @@ -9,7 +9,7 @@ - +

```sh diff --git a/postgres/pg-ast/README.md b/postgres/pg-ast/README.md index ae1e8351b..973642c28 100644 --- a/postgres/pg-ast/README.md +++ b/postgres/pg-ast/README.md @@ -9,7 +9,7 @@ - +

Create PostgreSQL ASTs with JavaScript diff --git a/postgres/pg-cache/README.md b/postgres/pg-cache/README.md index 79ecc8903..888837597 100644 --- a/postgres/pg-cache/README.md +++ b/postgres/pg-cache/README.md @@ -9,7 +9,7 @@ - +

PostgreSQL connection pool LRU cache manager with zero PostGraphile dependencies. diff --git a/postgres/pg-codegen/README.md b/postgres/pg-codegen/README.md index a4c9ae089..aed41fbc7 100644 --- a/postgres/pg-codegen/README.md +++ b/postgres/pg-codegen/README.md @@ -9,7 +9,7 @@ - +

Generate fully-typed TypeScript classes and interfaces from a live PostgreSQL schema via introspection. diff --git a/postgres/pg-query-context/README.md b/postgres/pg-query-context/README.md index 2daf9ec4d..e11e3a520 100644 --- a/postgres/pg-query-context/README.md +++ b/postgres/pg-query-context/README.md @@ -9,7 +9,7 @@ - +

# pg-query-context diff --git a/postgres/pgsql-test/README.md b/postgres/pgsql-test/README.md index 5b84a769f..6f3d3ad01 100644 --- a/postgres/pgsql-test/README.md +++ b/postgres/pgsql-test/README.md @@ -12,7 +12,7 @@ - +

diff --git a/postgres/supabase-test/README.md b/postgres/supabase-test/README.md index 509b497df..a2e86964d 100644 --- a/postgres/supabase-test/README.md +++ b/postgres/supabase-test/README.md @@ -12,7 +12,7 @@ - +

diff --git a/streaming/content-type-stream/CHANGELOG.md b/uploads/content-type-stream/CHANGELOG.md similarity index 100% rename from streaming/content-type-stream/CHANGELOG.md rename to uploads/content-type-stream/CHANGELOG.md diff --git a/streaming/content-type-stream/README.md b/uploads/content-type-stream/README.md similarity index 95% rename from streaming/content-type-stream/README.md rename to uploads/content-type-stream/README.md index fd66327fd..c29d5f099 100644 --- a/streaming/content-type-stream/README.md +++ b/uploads/content-type-stream/README.md @@ -9,7 +9,7 @@ - +

```sh diff --git a/streaming/content-type-stream/__tests__/__snapshots__/mimetypes.test.ts.snap b/uploads/content-type-stream/__tests__/__snapshots__/mimetypes.test.ts.snap similarity index 100% rename from streaming/content-type-stream/__tests__/__snapshots__/mimetypes.test.ts.snap rename to uploads/content-type-stream/__tests__/__snapshots__/mimetypes.test.ts.snap diff --git a/streaming/content-type-stream/__tests__/mimetypes.test.ts b/uploads/content-type-stream/__tests__/mimetypes.test.ts similarity index 100% rename from streaming/content-type-stream/__tests__/mimetypes.test.ts rename to uploads/content-type-stream/__tests__/mimetypes.test.ts diff --git a/streaming/content-type-stream/jest.config.js b/uploads/content-type-stream/jest.config.js similarity index 100% rename from streaming/content-type-stream/jest.config.js rename to uploads/content-type-stream/jest.config.js diff --git a/streaming/content-type-stream/package.json b/uploads/content-type-stream/package.json similarity index 100% rename from streaming/content-type-stream/package.json rename to uploads/content-type-stream/package.json diff --git a/streaming/content-type-stream/src/content-stream.ts b/uploads/content-type-stream/src/content-stream.ts similarity index 100% rename from streaming/content-type-stream/src/content-stream.ts rename to uploads/content-type-stream/src/content-stream.ts diff --git a/streaming/content-type-stream/src/content-type-stream.ts b/uploads/content-type-stream/src/content-type-stream.ts similarity index 100% rename from streaming/content-type-stream/src/content-type-stream.ts rename to uploads/content-type-stream/src/content-type-stream.ts diff --git a/streaming/content-type-stream/src/index.ts b/uploads/content-type-stream/src/index.ts similarity index 100% rename from streaming/content-type-stream/src/index.ts rename to uploads/content-type-stream/src/index.ts diff --git a/streaming/content-type-stream/tsconfig.esm.json b/uploads/content-type-stream/tsconfig.esm.json similarity index 100% rename from streaming/content-type-stream/tsconfig.esm.json rename to uploads/content-type-stream/tsconfig.esm.json diff --git a/streaming/content-type-stream/tsconfig.json b/uploads/content-type-stream/tsconfig.json similarity index 100% rename from streaming/content-type-stream/tsconfig.json rename to uploads/content-type-stream/tsconfig.json diff --git a/streaming/etag-hash/CHANGELOG.md b/uploads/etag-hash/CHANGELOG.md similarity index 100% rename from streaming/etag-hash/CHANGELOG.md rename to uploads/etag-hash/CHANGELOG.md diff --git a/streaming/etag-hash/README.md b/uploads/etag-hash/README.md similarity index 94% rename from streaming/etag-hash/README.md rename to uploads/etag-hash/README.md index 3c31589d6..399c1a351 100644 --- a/streaming/etag-hash/README.md +++ b/uploads/etag-hash/README.md @@ -9,7 +9,7 @@ - +

Es6 class that generates ETag using the same algorithm as S3 via MD5 sum. diff --git a/streaming/etag-hash/__tests__/__snapshots__/etag-hash.test.ts.snap b/uploads/etag-hash/__tests__/__snapshots__/etag-hash.test.ts.snap similarity index 100% rename from streaming/etag-hash/__tests__/__snapshots__/etag-hash.test.ts.snap rename to uploads/etag-hash/__tests__/__snapshots__/etag-hash.test.ts.snap diff --git a/streaming/etag-hash/__tests__/etag-hash.test.ts b/uploads/etag-hash/__tests__/etag-hash.test.ts similarity index 100% rename from streaming/etag-hash/__tests__/etag-hash.test.ts rename to uploads/etag-hash/__tests__/etag-hash.test.ts diff --git a/streaming/etag-hash/jest.config.js b/uploads/etag-hash/jest.config.js similarity index 100% rename from streaming/etag-hash/jest.config.js rename to uploads/etag-hash/jest.config.js diff --git a/streaming/etag-hash/package.json b/uploads/etag-hash/package.json similarity index 100% rename from streaming/etag-hash/package.json rename to uploads/etag-hash/package.json diff --git a/streaming/etag-hash/src/index.ts b/uploads/etag-hash/src/index.ts similarity index 100% rename from streaming/etag-hash/src/index.ts rename to uploads/etag-hash/src/index.ts diff --git a/streaming/etag-hash/tsconfig.esm.json b/uploads/etag-hash/tsconfig.esm.json similarity index 100% rename from streaming/etag-hash/tsconfig.esm.json rename to uploads/etag-hash/tsconfig.esm.json diff --git a/streaming/etag-hash/tsconfig.json b/uploads/etag-hash/tsconfig.json similarity index 100% rename from streaming/etag-hash/tsconfig.json rename to uploads/etag-hash/tsconfig.json diff --git a/streaming/etag-stream/CHANGELOG.md b/uploads/etag-stream/CHANGELOG.md similarity index 100% rename from streaming/etag-stream/CHANGELOG.md rename to uploads/etag-stream/CHANGELOG.md diff --git a/streaming/etag-stream/README.md b/uploads/etag-stream/README.md similarity index 95% rename from streaming/etag-stream/README.md rename to uploads/etag-stream/README.md index 160a12b55..ebd3f860f 100644 --- a/streaming/etag-stream/README.md +++ b/uploads/etag-stream/README.md @@ -9,7 +9,7 @@ - +

diff --git a/streaming/etag-stream/__fixtures__/deadman.jpg b/uploads/etag-stream/__fixtures__/deadman.jpg similarity index 100% rename from streaming/etag-stream/__fixtures__/deadman.jpg rename to uploads/etag-stream/__fixtures__/deadman.jpg diff --git a/streaming/etag-stream/__fixtures__/pct.pct b/uploads/etag-stream/__fixtures__/pct.pct similarity index 100% rename from streaming/etag-stream/__fixtures__/pct.pct rename to uploads/etag-stream/__fixtures__/pct.pct diff --git a/streaming/etag-stream/__fixtures__/pdf.pdf b/uploads/etag-stream/__fixtures__/pdf.pdf similarity index 100% rename from streaming/etag-stream/__fixtures__/pdf.pdf rename to uploads/etag-stream/__fixtures__/pdf.pdf diff --git a/streaming/etag-stream/__fixtures__/scss.scss b/uploads/etag-stream/__fixtures__/scss.scss similarity index 100% rename from streaming/etag-stream/__fixtures__/scss.scss rename to uploads/etag-stream/__fixtures__/scss.scss diff --git a/streaming/etag-stream/__tests__/__snapshots__/etag-stream.test.ts.snap b/uploads/etag-stream/__tests__/__snapshots__/etag-stream.test.ts.snap similarity index 100% rename from streaming/etag-stream/__tests__/__snapshots__/etag-stream.test.ts.snap rename to uploads/etag-stream/__tests__/__snapshots__/etag-stream.test.ts.snap diff --git a/streaming/etag-stream/__tests__/etag-stream.test.ts b/uploads/etag-stream/__tests__/etag-stream.test.ts similarity index 100% rename from streaming/etag-stream/__tests__/etag-stream.test.ts rename to uploads/etag-stream/__tests__/etag-stream.test.ts diff --git a/streaming/etag-stream/jest.config.js b/uploads/etag-stream/jest.config.js similarity index 100% rename from streaming/etag-stream/jest.config.js rename to uploads/etag-stream/jest.config.js diff --git a/streaming/etag-stream/package.json b/uploads/etag-stream/package.json similarity index 100% rename from streaming/etag-stream/package.json rename to uploads/etag-stream/package.json diff --git a/streaming/etag-stream/src/index.ts b/uploads/etag-stream/src/index.ts similarity index 100% rename from streaming/etag-stream/src/index.ts rename to uploads/etag-stream/src/index.ts diff --git a/streaming/etag-stream/tsconfig.esm.json b/uploads/etag-stream/tsconfig.esm.json similarity index 100% rename from streaming/etag-stream/tsconfig.esm.json rename to uploads/etag-stream/tsconfig.esm.json diff --git a/streaming/etag-stream/tsconfig.json b/uploads/etag-stream/tsconfig.json similarity index 100% rename from streaming/etag-stream/tsconfig.json rename to uploads/etag-stream/tsconfig.json diff --git a/streaming/mime-bytes/CHANGELOG.md b/uploads/mime-bytes/CHANGELOG.md similarity index 100% rename from streaming/mime-bytes/CHANGELOG.md rename to uploads/mime-bytes/CHANGELOG.md diff --git a/streaming/mime-bytes/README.md b/uploads/mime-bytes/README.md similarity index 99% rename from streaming/mime-bytes/README.md rename to uploads/mime-bytes/README.md index 80ae0da96..c109ab69a 100644 --- a/streaming/mime-bytes/README.md +++ b/uploads/mime-bytes/README.md @@ -9,7 +9,7 @@ - +

**Lightning-fast file type detection using magic bytes (file signatures) with a focus on stream processing and minimal memory usage.** diff --git a/streaming/mime-bytes/__tests__/cad-file-detection.test.ts b/uploads/mime-bytes/__tests__/cad-file-detection.test.ts similarity index 100% rename from streaming/mime-bytes/__tests__/cad-file-detection.test.ts rename to uploads/mime-bytes/__tests__/cad-file-detection.test.ts diff --git a/streaming/mime-bytes/__tests__/charset-content-type.test.ts b/uploads/mime-bytes/__tests__/charset-content-type.test.ts similarity index 100% rename from streaming/mime-bytes/__tests__/charset-content-type.test.ts rename to uploads/mime-bytes/__tests__/charset-content-type.test.ts diff --git a/streaming/mime-bytes/__tests__/file-type-detector.test.ts b/uploads/mime-bytes/__tests__/file-type-detector.test.ts similarity index 100% rename from streaming/mime-bytes/__tests__/file-type-detector.test.ts rename to uploads/mime-bytes/__tests__/file-type-detector.test.ts diff --git a/streaming/mime-bytes/__tests__/fixtures/__snapshots__/kitchen-sink.test.ts.snap b/uploads/mime-bytes/__tests__/fixtures/__snapshots__/kitchen-sink.test.ts.snap similarity index 100% rename from streaming/mime-bytes/__tests__/fixtures/__snapshots__/kitchen-sink.test.ts.snap rename to uploads/mime-bytes/__tests__/fixtures/__snapshots__/kitchen-sink.test.ts.snap diff --git a/streaming/mime-bytes/__tests__/fixtures/__snapshots__/malicious.test.ts.snap b/uploads/mime-bytes/__tests__/fixtures/__snapshots__/malicious.test.ts.snap similarity index 100% rename from streaming/mime-bytes/__tests__/fixtures/__snapshots__/malicious.test.ts.snap rename to uploads/mime-bytes/__tests__/fixtures/__snapshots__/malicious.test.ts.snap diff --git a/streaming/mime-bytes/__tests__/fixtures/kitchen-sink.test.ts b/uploads/mime-bytes/__tests__/fixtures/kitchen-sink.test.ts similarity index 100% rename from streaming/mime-bytes/__tests__/fixtures/kitchen-sink.test.ts rename to uploads/mime-bytes/__tests__/fixtures/kitchen-sink.test.ts diff --git a/streaming/mime-bytes/__tests__/fixtures/malicious.test.ts b/uploads/mime-bytes/__tests__/fixtures/malicious.test.ts similarity index 100% rename from streaming/mime-bytes/__tests__/fixtures/malicious.test.ts rename to uploads/mime-bytes/__tests__/fixtures/malicious.test.ts diff --git a/streaming/mime-bytes/__tests__/integration/typescript-detection.test.ts b/uploads/mime-bytes/__tests__/integration/typescript-detection.test.ts similarity index 100% rename from streaming/mime-bytes/__tests__/integration/typescript-detection.test.ts rename to uploads/mime-bytes/__tests__/integration/typescript-detection.test.ts diff --git a/streaming/mime-bytes/examples/basic-usage.ts b/uploads/mime-bytes/examples/basic-usage.ts similarity index 100% rename from streaming/mime-bytes/examples/basic-usage.ts rename to uploads/mime-bytes/examples/basic-usage.ts diff --git a/streaming/mime-bytes/examples/test-real-file.ts b/uploads/mime-bytes/examples/test-real-file.ts similarity index 100% rename from streaming/mime-bytes/examples/test-real-file.ts rename to uploads/mime-bytes/examples/test-real-file.ts diff --git a/streaming/mime-bytes/examples/usage.ts b/uploads/mime-bytes/examples/usage.ts similarity index 100% rename from streaming/mime-bytes/examples/usage.ts rename to uploads/mime-bytes/examples/usage.ts diff --git a/streaming/mime-bytes/jest.config.js b/uploads/mime-bytes/jest.config.js similarity index 100% rename from streaming/mime-bytes/jest.config.js rename to uploads/mime-bytes/jest.config.js diff --git a/streaming/mime-bytes/package.json b/uploads/mime-bytes/package.json similarity index 100% rename from streaming/mime-bytes/package.json rename to uploads/mime-bytes/package.json diff --git a/streaming/mime-bytes/src/file-type-detector.ts b/uploads/mime-bytes/src/file-type-detector.ts similarity index 100% rename from streaming/mime-bytes/src/file-type-detector.ts rename to uploads/mime-bytes/src/file-type-detector.ts diff --git a/streaming/mime-bytes/src/file-types-registry.ts b/uploads/mime-bytes/src/file-types-registry.ts similarity index 100% rename from streaming/mime-bytes/src/file-types-registry.ts rename to uploads/mime-bytes/src/file-types-registry.ts diff --git a/streaming/mime-bytes/src/index.ts b/uploads/mime-bytes/src/index.ts similarity index 100% rename from streaming/mime-bytes/src/index.ts rename to uploads/mime-bytes/src/index.ts diff --git a/streaming/mime-bytes/src/peak.ts b/uploads/mime-bytes/src/peak.ts similarity index 100% rename from streaming/mime-bytes/src/peak.ts rename to uploads/mime-bytes/src/peak.ts diff --git a/streaming/mime-bytes/src/utils/extensions.ts b/uploads/mime-bytes/src/utils/extensions.ts similarity index 100% rename from streaming/mime-bytes/src/utils/extensions.ts rename to uploads/mime-bytes/src/utils/extensions.ts diff --git a/streaming/mime-bytes/src/utils/magic-bytes.ts b/uploads/mime-bytes/src/utils/magic-bytes.ts similarity index 100% rename from streaming/mime-bytes/src/utils/magic-bytes.ts rename to uploads/mime-bytes/src/utils/magic-bytes.ts diff --git a/streaming/mime-bytes/src/utils/mime-types.ts b/uploads/mime-bytes/src/utils/mime-types.ts similarity index 100% rename from streaming/mime-bytes/src/utils/mime-types.ts rename to uploads/mime-bytes/src/utils/mime-types.ts diff --git a/streaming/mime-bytes/tsconfig.esm.json b/uploads/mime-bytes/tsconfig.esm.json similarity index 100% rename from streaming/mime-bytes/tsconfig.esm.json rename to uploads/mime-bytes/tsconfig.esm.json diff --git a/streaming/mime-bytes/tsconfig.json b/uploads/mime-bytes/tsconfig.json similarity index 100% rename from streaming/mime-bytes/tsconfig.json rename to uploads/mime-bytes/tsconfig.json diff --git a/streaming/s3-streamer/CHANGELOG.md b/uploads/s3-streamer/CHANGELOG.md similarity index 100% rename from streaming/s3-streamer/CHANGELOG.md rename to uploads/s3-streamer/CHANGELOG.md diff --git a/streaming/s3-streamer/README.md b/uploads/s3-streamer/README.md similarity index 98% rename from streaming/s3-streamer/README.md rename to uploads/s3-streamer/README.md index a47075441..5101a65cc 100644 --- a/streaming/s3-streamer/README.md +++ b/uploads/s3-streamer/README.md @@ -9,7 +9,7 @@ - +

Stream uploads to S3 with automatic content-type detection, ETag generation, and metadata extraction. Built on AWS SDK v3 for optimal performance and smaller bundle sizes. diff --git a/streaming/s3-streamer/__tests__/__snapshots__/uploads.test.ts.snap b/uploads/s3-streamer/__tests__/__snapshots__/uploads.test.ts.snap similarity index 100% rename from streaming/s3-streamer/__tests__/__snapshots__/uploads.test.ts.snap rename to uploads/s3-streamer/__tests__/__snapshots__/uploads.test.ts.snap diff --git a/streaming/s3-streamer/__tests__/uploads.test.ts b/uploads/s3-streamer/__tests__/uploads.test.ts similarity index 100% rename from streaming/s3-streamer/__tests__/uploads.test.ts rename to uploads/s3-streamer/__tests__/uploads.test.ts diff --git a/streaming/s3-streamer/jest.config.js b/uploads/s3-streamer/jest.config.js similarity index 100% rename from streaming/s3-streamer/jest.config.js rename to uploads/s3-streamer/jest.config.js diff --git a/streaming/s3-streamer/package.json b/uploads/s3-streamer/package.json similarity index 100% rename from streaming/s3-streamer/package.json rename to uploads/s3-streamer/package.json diff --git a/streaming/s3-streamer/src/index.ts b/uploads/s3-streamer/src/index.ts similarity index 100% rename from streaming/s3-streamer/src/index.ts rename to uploads/s3-streamer/src/index.ts diff --git a/streaming/s3-streamer/src/s3.ts b/uploads/s3-streamer/src/s3.ts similarity index 100% rename from streaming/s3-streamer/src/s3.ts rename to uploads/s3-streamer/src/s3.ts diff --git a/streaming/s3-streamer/src/streamer.ts b/uploads/s3-streamer/src/streamer.ts similarity index 100% rename from streaming/s3-streamer/src/streamer.ts rename to uploads/s3-streamer/src/streamer.ts diff --git a/streaming/s3-streamer/src/utils.ts b/uploads/s3-streamer/src/utils.ts similarity index 100% rename from streaming/s3-streamer/src/utils.ts rename to uploads/s3-streamer/src/utils.ts diff --git a/streaming/s3-streamer/tsconfig.esm.json b/uploads/s3-streamer/tsconfig.esm.json similarity index 100% rename from streaming/s3-streamer/tsconfig.esm.json rename to uploads/s3-streamer/tsconfig.esm.json diff --git a/streaming/s3-streamer/tsconfig.json b/uploads/s3-streamer/tsconfig.json similarity index 100% rename from streaming/s3-streamer/tsconfig.json rename to uploads/s3-streamer/tsconfig.json diff --git a/streaming/s3-utils/CHANGELOG.md b/uploads/s3-utils/CHANGELOG.md similarity index 100% rename from streaming/s3-utils/CHANGELOG.md rename to uploads/s3-utils/CHANGELOG.md diff --git a/streaming/s3-utils/README.md b/uploads/s3-utils/README.md similarity index 89% rename from streaming/s3-utils/README.md rename to uploads/s3-utils/README.md index ff416617e..ccb304fe0 100644 --- a/streaming/s3-utils/README.md +++ b/uploads/s3-utils/README.md @@ -9,5 +9,5 @@ - +

diff --git a/streaming/s3-utils/jest.config.js b/uploads/s3-utils/jest.config.js similarity index 100% rename from streaming/s3-utils/jest.config.js rename to uploads/s3-utils/jest.config.js diff --git a/streaming/s3-utils/package.json b/uploads/s3-utils/package.json similarity index 100% rename from streaming/s3-utils/package.json rename to uploads/s3-utils/package.json diff --git a/streaming/s3-utils/src/index.ts b/uploads/s3-utils/src/index.ts similarity index 100% rename from streaming/s3-utils/src/index.ts rename to uploads/s3-utils/src/index.ts diff --git a/streaming/s3-utils/src/policies.ts b/uploads/s3-utils/src/policies.ts similarity index 100% rename from streaming/s3-utils/src/policies.ts rename to uploads/s3-utils/src/policies.ts diff --git a/streaming/s3-utils/src/utils.ts b/uploads/s3-utils/src/utils.ts similarity index 100% rename from streaming/s3-utils/src/utils.ts rename to uploads/s3-utils/src/utils.ts diff --git a/streaming/s3-utils/tsconfig.esm.json b/uploads/s3-utils/tsconfig.esm.json similarity index 100% rename from streaming/s3-utils/tsconfig.esm.json rename to uploads/s3-utils/tsconfig.esm.json diff --git a/streaming/s3-utils/tsconfig.json b/uploads/s3-utils/tsconfig.json similarity index 100% rename from streaming/s3-utils/tsconfig.json rename to uploads/s3-utils/tsconfig.json diff --git a/streaming/stream-to-etag/CHANGELOG.md b/uploads/stream-to-etag/CHANGELOG.md similarity index 100% rename from streaming/stream-to-etag/CHANGELOG.md rename to uploads/stream-to-etag/CHANGELOG.md diff --git a/streaming/stream-to-etag/README.md b/uploads/stream-to-etag/README.md similarity index 94% rename from streaming/stream-to-etag/README.md rename to uploads/stream-to-etag/README.md index 5260e7dab..74c976502 100644 --- a/streaming/stream-to-etag/README.md +++ b/uploads/stream-to-etag/README.md @@ -9,7 +9,7 @@ - +

Calculates Etag/S3 MD5 sum given a readable stream. Uses the same algorithm that S3 uses to calculate the `ETag`. diff --git a/streaming/stream-to-etag/__fixtures__/deadman.jpg b/uploads/stream-to-etag/__fixtures__/deadman.jpg similarity index 100% rename from streaming/stream-to-etag/__fixtures__/deadman.jpg rename to uploads/stream-to-etag/__fixtures__/deadman.jpg diff --git a/streaming/stream-to-etag/__fixtures__/pct.pct b/uploads/stream-to-etag/__fixtures__/pct.pct similarity index 100% rename from streaming/stream-to-etag/__fixtures__/pct.pct rename to uploads/stream-to-etag/__fixtures__/pct.pct diff --git a/streaming/stream-to-etag/__fixtures__/pdf.pdf b/uploads/stream-to-etag/__fixtures__/pdf.pdf similarity index 100% rename from streaming/stream-to-etag/__fixtures__/pdf.pdf rename to uploads/stream-to-etag/__fixtures__/pdf.pdf diff --git a/streaming/stream-to-etag/__fixtures__/scss.scss b/uploads/stream-to-etag/__fixtures__/scss.scss similarity index 100% rename from streaming/stream-to-etag/__fixtures__/scss.scss rename to uploads/stream-to-etag/__fixtures__/scss.scss diff --git a/streaming/stream-to-etag/__tests__/__snapshots__/stream-to-etag.test.ts.snap b/uploads/stream-to-etag/__tests__/__snapshots__/stream-to-etag.test.ts.snap similarity index 100% rename from streaming/stream-to-etag/__tests__/__snapshots__/stream-to-etag.test.ts.snap rename to uploads/stream-to-etag/__tests__/__snapshots__/stream-to-etag.test.ts.snap diff --git a/streaming/stream-to-etag/__tests__/stream-to-etag.test.ts b/uploads/stream-to-etag/__tests__/stream-to-etag.test.ts similarity index 100% rename from streaming/stream-to-etag/__tests__/stream-to-etag.test.ts rename to uploads/stream-to-etag/__tests__/stream-to-etag.test.ts diff --git a/streaming/stream-to-etag/jest.config.js b/uploads/stream-to-etag/jest.config.js similarity index 100% rename from streaming/stream-to-etag/jest.config.js rename to uploads/stream-to-etag/jest.config.js diff --git a/streaming/stream-to-etag/package.json b/uploads/stream-to-etag/package.json similarity index 100% rename from streaming/stream-to-etag/package.json rename to uploads/stream-to-etag/package.json diff --git a/streaming/stream-to-etag/src/index.ts b/uploads/stream-to-etag/src/index.ts similarity index 100% rename from streaming/stream-to-etag/src/index.ts rename to uploads/stream-to-etag/src/index.ts diff --git a/streaming/stream-to-etag/tsconfig.esm.json b/uploads/stream-to-etag/tsconfig.esm.json similarity index 100% rename from streaming/stream-to-etag/tsconfig.esm.json rename to uploads/stream-to-etag/tsconfig.esm.json diff --git a/streaming/stream-to-etag/tsconfig.json b/uploads/stream-to-etag/tsconfig.json similarity index 100% rename from streaming/stream-to-etag/tsconfig.json rename to uploads/stream-to-etag/tsconfig.json diff --git a/streaming/upload-names/CHANGELOG.md b/uploads/upload-names/CHANGELOG.md similarity index 100% rename from streaming/upload-names/CHANGELOG.md rename to uploads/upload-names/CHANGELOG.md diff --git a/streaming/upload-names/README.md b/uploads/upload-names/README.md similarity index 93% rename from streaming/upload-names/README.md rename to uploads/upload-names/README.md index 2a0e176d2..a60df4db5 100644 --- a/streaming/upload-names/README.md +++ b/uploads/upload-names/README.md @@ -9,7 +9,7 @@ - +

```sh diff --git a/streaming/upload-names/__tests__/__snapshots__/names.test.ts.snap b/uploads/upload-names/__tests__/__snapshots__/names.test.ts.snap similarity index 100% rename from streaming/upload-names/__tests__/__snapshots__/names.test.ts.snap rename to uploads/upload-names/__tests__/__snapshots__/names.test.ts.snap diff --git a/streaming/upload-names/__tests__/names.test.ts b/uploads/upload-names/__tests__/names.test.ts similarity index 100% rename from streaming/upload-names/__tests__/names.test.ts rename to uploads/upload-names/__tests__/names.test.ts diff --git a/streaming/upload-names/jest.config.js b/uploads/upload-names/jest.config.js similarity index 100% rename from streaming/upload-names/jest.config.js rename to uploads/upload-names/jest.config.js diff --git a/streaming/upload-names/package.json b/uploads/upload-names/package.json similarity index 100% rename from streaming/upload-names/package.json rename to uploads/upload-names/package.json diff --git a/streaming/upload-names/src/index.ts b/uploads/upload-names/src/index.ts similarity index 100% rename from streaming/upload-names/src/index.ts rename to uploads/upload-names/src/index.ts diff --git a/streaming/upload-names/src/slugify.ts b/uploads/upload-names/src/slugify.ts similarity index 100% rename from streaming/upload-names/src/slugify.ts rename to uploads/upload-names/src/slugify.ts diff --git a/streaming/upload-names/tsconfig.esm.json b/uploads/upload-names/tsconfig.esm.json similarity index 100% rename from streaming/upload-names/tsconfig.esm.json rename to uploads/upload-names/tsconfig.esm.json diff --git a/streaming/upload-names/tsconfig.json b/uploads/upload-names/tsconfig.json similarity index 100% rename from streaming/upload-names/tsconfig.json rename to uploads/upload-names/tsconfig.json diff --git a/streaming/uuid-hash/CHANGELOG.md b/uploads/uuid-hash/CHANGELOG.md similarity index 100% rename from streaming/uuid-hash/CHANGELOG.md rename to uploads/uuid-hash/CHANGELOG.md diff --git a/streaming/uuid-hash/README.md b/uploads/uuid-hash/README.md similarity index 93% rename from streaming/uuid-hash/README.md rename to uploads/uuid-hash/README.md index 20307e43d..7c47cb648 100644 --- a/streaming/uuid-hash/README.md +++ b/uploads/uuid-hash/README.md @@ -9,7 +9,7 @@ - +

Es6 class that generates RFC-compliant UUID v5. diff --git a/streaming/uuid-hash/__tests__/__snapshots__/uuid-hash.test.ts.snap b/uploads/uuid-hash/__tests__/__snapshots__/uuid-hash.test.ts.snap similarity index 100% rename from streaming/uuid-hash/__tests__/__snapshots__/uuid-hash.test.ts.snap rename to uploads/uuid-hash/__tests__/__snapshots__/uuid-hash.test.ts.snap diff --git a/streaming/uuid-hash/__tests__/uuid-hash.test.ts b/uploads/uuid-hash/__tests__/uuid-hash.test.ts similarity index 100% rename from streaming/uuid-hash/__tests__/uuid-hash.test.ts rename to uploads/uuid-hash/__tests__/uuid-hash.test.ts diff --git a/streaming/uuid-hash/jest.config.js b/uploads/uuid-hash/jest.config.js similarity index 100% rename from streaming/uuid-hash/jest.config.js rename to uploads/uuid-hash/jest.config.js diff --git a/streaming/uuid-hash/package.json b/uploads/uuid-hash/package.json similarity index 100% rename from streaming/uuid-hash/package.json rename to uploads/uuid-hash/package.json diff --git a/streaming/uuid-hash/src/index.ts b/uploads/uuid-hash/src/index.ts similarity index 100% rename from streaming/uuid-hash/src/index.ts rename to uploads/uuid-hash/src/index.ts diff --git a/streaming/uuid-hash/tsconfig.esm.json b/uploads/uuid-hash/tsconfig.esm.json similarity index 100% rename from streaming/uuid-hash/tsconfig.esm.json rename to uploads/uuid-hash/tsconfig.esm.json diff --git a/streaming/uuid-hash/tsconfig.json b/uploads/uuid-hash/tsconfig.json similarity index 100% rename from streaming/uuid-hash/tsconfig.json rename to uploads/uuid-hash/tsconfig.json diff --git a/streaming/uuid-stream/CHANGELOG.md b/uploads/uuid-stream/CHANGELOG.md similarity index 100% rename from streaming/uuid-stream/CHANGELOG.md rename to uploads/uuid-stream/CHANGELOG.md diff --git a/streaming/uuid-stream/README.md b/uploads/uuid-stream/README.md similarity index 94% rename from streaming/uuid-stream/README.md rename to uploads/uuid-stream/README.md index 4d8c4e06a..f39eb1892 100644 --- a/streaming/uuid-stream/README.md +++ b/uploads/uuid-stream/README.md @@ -9,7 +9,7 @@ - +

A Transform stream that generates RFC-compliant UUID v5. diff --git a/streaming/uuid-stream/__tests__/__snapshots__/uuid-stream.test.ts.snap b/uploads/uuid-stream/__tests__/__snapshots__/uuid-stream.test.ts.snap similarity index 100% rename from streaming/uuid-stream/__tests__/__snapshots__/uuid-stream.test.ts.snap rename to uploads/uuid-stream/__tests__/__snapshots__/uuid-stream.test.ts.snap diff --git a/streaming/uuid-stream/__tests__/uuid-stream.test.ts b/uploads/uuid-stream/__tests__/uuid-stream.test.ts similarity index 100% rename from streaming/uuid-stream/__tests__/uuid-stream.test.ts rename to uploads/uuid-stream/__tests__/uuid-stream.test.ts diff --git a/streaming/uuid-stream/jest.config.js b/uploads/uuid-stream/jest.config.js similarity index 100% rename from streaming/uuid-stream/jest.config.js rename to uploads/uuid-stream/jest.config.js diff --git a/streaming/uuid-stream/package.json b/uploads/uuid-stream/package.json similarity index 100% rename from streaming/uuid-stream/package.json rename to uploads/uuid-stream/package.json diff --git a/streaming/uuid-stream/src/index.ts b/uploads/uuid-stream/src/index.ts similarity index 100% rename from streaming/uuid-stream/src/index.ts rename to uploads/uuid-stream/src/index.ts diff --git a/streaming/uuid-stream/tsconfig.esm.json b/uploads/uuid-stream/tsconfig.esm.json similarity index 100% rename from streaming/uuid-stream/tsconfig.esm.json rename to uploads/uuid-stream/tsconfig.esm.json diff --git a/streaming/uuid-stream/tsconfig.json b/uploads/uuid-stream/tsconfig.json similarity index 100% rename from streaming/uuid-stream/tsconfig.json rename to uploads/uuid-stream/tsconfig.json