Skip to content

Latest commit

 

History

History
216 lines (115 loc) · 9.01 KB

CHANGELOG.md

File metadata and controls

216 lines (115 loc) · 9.01 KB

Change Log

All notable changes to this project will be documented in this file.

1.3.0 (2022-08-28)

Features

  • exports types to support TS ES6 modules (c818b1a), closes #668

1.2.1 (2022-07-25)

Bug Fixes

  • package: add repository directory into package.json for all @casl/* packages (#560) (0ef534c)

1.2.0 (2021-05-12)

Bug Fixes

  • adjusts package tags to improve discoverability (73e88b0)

1.2.0 (2021-05-12)

Bug Fixes

  • adjusts package tags to improve discoverability (73e88b0)

Features

1.1.1 (2020-12-28)

Bug Fixes

  • dist: adds separate tsconfig.build.json to every completementary project (87742ce), closes #419

1.1.0 (2020-12-26)

Bug Fixes

  • angular: fixes sourcemap generation for the code built by ngc (7715263), closes #387 #382
  • package: removes engine section that points to npm@6 (eecd12a), closes #417

Features

  • builder: improves typings for AbilityBuilder [skip release] (ebd4d17), closes #379
  • esm: adds ESM support for latest Node.js through exports prop in package.json (cac2506), closes #331

BREAKING CHANGES

  • builder: changes main generic parameter to be a class instead of instance and makes defineAbility to accept options as the 2nd argument.

    Before

    import { AbilityBuilder, defineAbility, Ability } from '@casl/ability';
    
    const resolveAction = (action: string) => {/* custom implementation */ };
    const ability = defineAbility({ resolveAction }, (can) => can('read', 'Item'));
    const builder = new AbilityBuilder<Ability>(Ability);

    After

    import { AbilityBuilder, defineAbility, Ability } from '@casl/ability';
    
    const resolveAction = (action: string) => {/* custom implementation */ };
    const ability = defineAbility((can) => can('read', 'Item'), { resolveAction });
    const builder = new AbilityBuilder(Ability); // first argument is now mandatory!

    The 1st parameter to AbilityBuilder is now madatory. This allows to infer generic parameters from it and makes AbilityType that is built to be explicit.

1.0.4 (2020-06-09)

Bug Fixes

  • docs: ensure README and docs for all packages are in sync (8df3684), closes #338

1.0.3 (2020-04-10)

Bug Fixes

  • aurelia: ensure that terser doesn't mangle reserved required props (a82dfd5)
  • packages: makes eventual lib size to be smaller (93a3bec), closes #287

1.0.2 (2020-04-09)

Bug Fixes

  • aurelia: adds support for casl/ability@4 in package.json (0d1b6db)

1.0.1 (2020-04-09)

Features

  • aurelia: adds able value converter that allows to do checks only by action (490434b), closes #107
  • aurelia: adds generics to can converter and plugin (4d634d7), closes #256
  • package: replaces Ability with PureAbility in order to improve tree shaking (c6a01c8), closes #249
  • vue: adds better generics typying for Vue (5cc7b60), closes #107

BREAKING CHANGES

  • valueConverter: CanValueConverter is deprecated in favor of AbleValueConverter

    Before

    <div if.bind="'Post' | can: 'read'">hidden content</div>

    After

    <div if.bind="'read' | able: 'Post'">hidden content</div>
  • di: replaces Ability DI token with PureAbility

    Before

    import { Ability } from '@casl/ability'
    
    export function configure(config) {
      config.container.registerInstance(Ability, new Ability())
    }

    After

    import { PureAbility, Ability } from '@casl/ability'
    
    export function configure(config) {
      const ability = new Ability()
      // the token below is used by value converters
      config.container.registerInstance(PureAbility, ability)
      config.container.registerInstance(Ability, ability)
    }
  • typescript: weak hand written declaration files are removed as @casl/aurelia has been completely rewritten to TypeScript.

Bug Fixes

  • packages: increases peerDependency of @casl/ability (9f6a7b8), closes #119
  • README: changes links to @casl/ability to point to npm package instead to git root [skip ci] (a74086b), closes #102

Bug Fixes

  • package: changes location of ES5M modules (2b1ad4e), closes #89

Features

  • aurelia: upgrades to the latest version of aurelia (8833993)

0.3.0 (2018-05-14)

Features

  • aurelia: support for per field abilities (1ca5051)

0.2.0 (2018-04-26)

Bug Fixes

  • aurelia: fixes tests in aurelia to properly check ability rules for emptiness (42e2ddb)

Features

0.1.0 (2018-03-23)

Features

  • aurelia: adds package for Aurelia, closes #26