Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@knorm/timestamps

knorm11.2kMIT3.0.0TypeScript support: included

Timestamps plugin for @knorm/knorm

knorm, plugin, timestamps

readme

@knorm/timestamps

npm version build status coverage status dependency status

Knorm plugin that automates working with created_at and updated_at table fields.

Documentation

View the docs on @knorm/knorm's documentation site here.

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

3.0.0 (2020-04-14)

Note: Version bump only for package @knorm/timestamps

3.0.0-alpha.1 (2020-04-14)

Bug Fixes

  • update @knorm/knorm's peer dependency version (c489b79)

3.0.0-alpha.0 (2020-04-14)

Features

  • add typescript type definitions (2a97c00)

BREAKING CHANGES

  • Replaced default exports with named exports. This affects the factory functions that are the main package exports and applies to @knorm/knorm and ALL plugins.

Instead of:

const knorm = require('@knorm/knorm');
const knormPostgres = require('@knorm/postgres');

const { Knorm } = knorm;
const { KnormPostgres } = knormPostgres;

Do:

const { knorm, Knorm } = require('@knorm/knorm');
const { knormPostgres, KnormPostgres } = require('@knorm/postgres');

2.0.0 (2019-02-03)

chore

BREAKING CHANGES

  • This plugin now peer-depends on @knorm/knorm v2

1.0.0 (2018-09-30)

Bug Fixes

Features

Breaking Changes

  • package was renamed to @knorm/timestamps

knorm-timestamps@3.0.2 (2017-12-29)

knorm-timestamps@3.0.1 (2017-12-28)

Bug Fixes

  • fix default values for createdAt and updatedAt (23210f2)

knorm-timestamps@3.0.0 (2017-12-23)

Code Refactoring

  • update code for the next knorm major version (58d3742)

BREAKING CHANGES

    • createdAt and updatedAt fields are now always added to the model
  • fields types and default values for createdAt and updatedAt are not configurable anymore. only field and column-names are.

knorm-timestamps@2.0.6 (2017-11-08)

Bug Fixes

  • query: pass query options along (3020de9)

knorm-timestamps@2.0.5 (2017-11-01)

knorm-timestamps@2.0.4 (2017-10-06)

knorm-timestamps@2.0.3 (2017-08-30)

knorm-timestamps@2.0.2 (2017-08-11)

knorm-timestamps@2.0.1 (2017-08-09)

Bug Fixes

  • avoid circular dependency issues (fc394df)

knorm-timestamps@2.0.0 (2017-08-04)

Code Refactoring

  • support explicitly setting default values (374e7b1)

Features

  • support configuring field types (637f1e9)

BREAKING CHANGES

  • the addDefault option is removed and replaced with a default option

knorm-timestamps@1.0.0 (2017-08-03)

Features

  • add modelWithTimestamps (36b19da)
  • add queryWithTimestamps and withTimestamps (5e8b99e)