Skip to content

Commit

Permalink
Version Packages (#45)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Sep 30, 2022
1 parent 9b4c0c1 commit ad8ce08
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 32 deletions.
29 changes: 0 additions & 29 deletions .changeset/fifty-phones-fly.md

This file was deleted.

30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# d1-orm

## 0.5.0

### Minor Changes

- [#44](https://github.com/Interactions-as-a-Service/d1-orm/pull/44) [`101043b`](https://github.com/Interactions-as-a-Service/d1-orm/commit/101043b9ff823598774f9113870d11931f7d1506) Thanks [@Skye-31](https://github.com/Skye-31)! - Feat: Inferred Types!

Models no longer require you to specify a definition when you create them. Instead, you can just pass in an object and the model will infer the types for you. See the following example:

```ts
import { Model, DataTypes } from "d1-orm";
import type { Infer } from "d1-orm";

const users = new Model(
{
tableName: "users",
D1Orm: MyD1OrmInstance,
},
{
name: DataTypes.STRING,
age: DataTypes.NUMBER,
}
);

type User = Infer<typeof users>;
// type User = {
// name: string,
// age: number
// }
```

## 0.4.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d1-orm",
"version": "0.4.0",
"version": "0.5.0",
"private": false,
"description": "A simple strictly typed ORM for Cloudflare's D1 product",
"keywords": [
Expand Down

0 comments on commit ad8ce08

Please sign in to comment.