Skip to content
uki00a edited this page Jul 23, 2020 · 19 revisions

TODO: Move this page to .md in repo

How to release

  1. Update src/version.ts
  2. Make a new release.

I want to automate these steps.

How to bump Deno

  1. Update ci.yml
  2. Bump deno_std using dem
$ dem update https://deno.land/std@v0.37.1

Limitations/Differences

Decorator metadata is not supported

Using decorator metadata in Deno causes circular references between entities for the following reasons:

  • Deno only supports esnext as a compilation target.
  • TypeORM is not yet compatible with esnext.

See also: https://github.com/typeorm/typeorm/issues/4103

Workarounds:

  • use EntitySchema instead of ES decorators and decorator metadata.
  • specify the column type with ColumnOptions.type as follows:
@Entity()
class User {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ type: 'varchar' }) // or `@Column({ type: String })`
  name!: string;
}

@TransactionRepository is not supported

This decorator depends on decorator metadata.

@Column

  • ColumnOptions.type is required.
    • This is due to lack of decorator metadata support.

binary type is mapped to Uint8Array instead of Buffer

  • This is because in Deno, binary data is usually represented by a Uint8Array.

glob

The following patterns are not supported:

  • /path/to/entities/*{.js,.ts}

(sqlite only) @CreateDateColumn and @UpdateDateColumn are not currently supported

SqliteDriver

Some types are treated differently from the original typeorm:

  • int8, bigint, and unsigned big int should be mapped to BigInt

Required permissions

driver --allow-read --allow-write --allow-net --allow-env --allow-plugin
sqlite ✔️ ✔️
postgres ✔️
mysql ✔️

Examples

Clone this wiki locally