atdatabases

TypeScript clients for databases that prevent SQL Injection

MIT License

Downloads
4.4M
Stars
588
Committers
23

Bot releases are hidden (Show)

atdatabases - @databases/[email protected]

Published by ForbesLindesay over 2 years ago

New Features

  • Initial release (#211)
atdatabases - @databases/[email protected]

Published by ForbesLindesay over 2 years ago

New Features

  • Added types.tableReExportFileName (#211)

    This re-exports the table record type from index.ts by default as a convenience. You can explicitly set it to null to disable this behaviour.

  • Added types.tableInsertParametersReExportFileName (#211)

    This re-exports the table insert type from index.ts by default as a convenience. You can explicitly set it to null to disable this behaviour.

  • Added types.schemaJsonFileName, with a default of "schema.json" (#211)

    These help to support pg-typed's usage of pg-bulk. You should use this generated object instead of serializeValue in most places. If you don't want to generate this file, you can set schemaJsonFileName to null to disable it.

atdatabases - @databases/[email protected]

Published by ForbesLindesay over 2 years ago

New Features

  • Add utility for re-exporting a value or type declared in another file. (#211)

  • Add writeFile method to PrintContext to enable writing non-TypeScript files (e.g. .json files) (#212)

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

Bug Fixes

  • Print correct instructions for enabling debug logs (#209)

  • Wait for the database and user to be created before resolving (#209)

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

Bug Fixes

  • Print correct instructions for enabling debug logs (#209)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

New Features

  • Add testConnection option as alternative to just waiting for the container to listen on a port (#209)

  • Add enableDebugInstructions to allow providing instructions for enabling debug logs (#209)

Bug Fixes

  • Do not print incorrect instructions for enabling debug logs (#209)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

New Features

  • Bump @databases/pg-test dependency (#207)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

Refactors

  • Use shared-print-types (#206)

Bug Fixes

  • Respect the CWD parameter when using the API rather than the CLI (#206)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

Refactors

  • Use shared-print-types (#206)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

New Features

  • Initial release (#206)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

Breaking Changes

  • Update the default image for tests to mysql:8.0.23 (#206)

    You will now get version 8.0.23 by default. If you want to maintain the old behaviour, you have 3 options:

    Config File

    You can specify:

    {
      "test": {
        "image": "mysql:5.7.24"
      }
    }
    

    in your mysql config

    Environment Variable

    Set the MYSQL_TEST_IMAGE environment variable to mysql:5.7.24

    CLI Parameter

    If you are using mysql-test as a CLI, you can pass:

    --image mysql:5.7.24
    
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

New Features

  • Initial release (#206)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

New Features

  • Initial release (#206)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

New Features

  • Initial release (#206)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

New Features

  • Initial release (#206)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

New Features

  • Update @databases/mysql-config (#206)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

Breaking Changes

  • Update the default image for tests to mysql:8.0.23 (#206)

    If you are using the @databases/mysql-test package to create temporary databases, you will now get version 8.0.23 by default. If you want to maintain the old behaviour, you need to specify:

    {
      "test": {
        "image": "mysql:5.7.24"
      }
    }
    

    in your mysql config.

New Features

  • Add config for type generation (#206)

  • Add readMySqlConfigSync method (#206)

    This lets you read MySQL config for a specific file

  • Add DEFAULT_CONFIG export (#206)

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

Breaking Changes

  • Block unexpected fields on .insert(...) calls (#203)

    This update uses conditional types in TypeScript to produce a type error if you add extra fields to objects you pass to .insert(...) that are not defined in the database schema.

New Features

  • Add tableName property to Table (#202)

  • Add tableId property to Table (#202)

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

New Features

  • Export pgFormat (#202)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 3 years ago

New Features

  • Automatically handle connection limit exceeded errors (#201)

    This automatically handles the error:

    too many connections for role "role_name"

    from Postgres, providing we were able to create at least 1 connection for the pool. It will attempt to create connections again 5 seconds after encountering this error.