Skip to content

Latest commit

 

History

History
534 lines (268 loc) · 20.8 KB

CHANGELOG.md

File metadata and controls

534 lines (268 loc) · 20.8 KB

Change Log

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

8.2.8 (2024-08-23)

8.2.7 (2024-07-16)

Bug Fixes

  • deps: update dependency typescript to ~5.5.0 (ef11301)

8.2.6 (2024-07-14)

Bug Fixes

8.2.5 (2024-07-14)

Bug Fixes

8.2.4 (2024-07-14)

Bug Fixes

  • debug release (#939) (80eeb6b)
  • deps: update dependency typescript to ~5.3.0 (0ec328c)
  • deps: update dependency typescript to ~5.4.0 (1092376)

8.2.3 (2023-11-21)

Bug Fixes

  • changes comment to trigger release (#855) (f13103b)
  • ensure pre-post scripts are enabled for pnpm (#853) (fa23801)

8.2.2 (2023-11-21)

8.2.1 (2023-07-20)

8.2.0 (2022-12-17)

Features

8.1.0 (2022-08-28)

Features

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

8.0.0 (2022-08-20)

chore

  • deps: update angular monorepo to v14 (major) (#663) (e556f14)

BREAKING CHANGES

  • deps: drop support for angular@13, moving to Ivy only!

7.1.0 (2022-08-20)

Features

  • angular: implements services that provides Ability as an Observable (5a139b2)

7.0.1 (2022-07-25)

7.0.0 (2022-06-16)

Bug Fixes

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

Features

BREAKING CHANGES

  • drops support for angular < 13

6.0.0 (2021-05-31)

Code Refactoring

  • angular: removes deprecated CanPipe and stick to Ivy compiler (82b61f5)

BREAKING CHANGES

  • angular: there are few important changes:

    • deprecated CanPipe was removed, use AblePipe instead
    • library is compiled by Ivy and no longer support ViewEngine

5.1.2 (2021-05-31)

chore

BREAKING CHANGES

  • deps: there are 2 important changes:

    • deprecated CanPipe was removed, use AblePipe instead
    • library is compiled by Ivy and no longer support ViewEngine

5.1.1 (2021-05-12)

Bug Fixes

  • adjusts package tags to improve discoverability (73e88b0)

5.1.0 (2021-01-14)

Features

5.0.2 (2021-01-10)

Bug Fixes

  • angular: changes ES6M distribution to use .js ext instead of .mjs (06bd5be), closes #427

5.0.1 (2020-12-28)

Bug Fixes

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

5.0.0 (2020-12-26)

Bug Fixes

  • package: removes engine section that points to npm@6 (eecd12a), closes #417

Code Refactoring

  • angular: removes support for Angular < 9.x and casl < 3.x (3530cdf)

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

  • angular: removes support for Angular < 9.x and casl < 3.x

  • 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.

4.1.6 (2020-10-21)

Bug Fixes

  • README: adds semi-colon (cad1daa)

4.1.5 (2020-09-03)

Bug Fixes

  • angular: fixes sourcemap generation for the code built by ngc (7715263), closes #387 #382

4.1.4 (2020-06-09)

Bug Fixes

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

4.1.3 (2020-06-08)

Bug Fixes

  • package: makes sure the latest casl works with Angular 8.x (91ee505), closes #337

4.1.2 (2020-06-02)

Bug Fixes

  • angular: widen peer dependency for @angular/core (aa2c3c4)

4.1.1 (2020-05-19)

Bug Fixes

  • angular: updates README for the latest release (1103dec), closes #276

4.1.0 (2020-05-19)

Features

  • pipe: adds pure ablePure pipe in @casl/angular (23c851c), closes #276

4.0.4 (2020-04-14)

Bug Fixes

  • angular: removes ngcc publishOnly hook (6e5c570)

4.0.3 (2020-04-14)

Bug Fixes

  • package: allows to disable minification through LIB_MINIFY env var (de70838)

4.0.2 (2020-04-10)

Bug Fixes

  • angular: ensure that terser doesn't mangle reserved required props (5371166)

4.0.1 (2020-04-09)

Bug Fixes

  • angular: adds support for casl/ability@4 in package.json (9d65071)

4.0.0 (2020-04-09)

Features

  • ability: improves typing for GetSubjectName and adds default values for generics (c089293), closes #256
  • angular: adds generics to CanPipe (68bd287), closes #256
  • angular: adds support for action only checks (0462edb), closes #107
  • angular: allows to use custom Ability instances and improves tree shaking support (2e7a149), closes #249

BREAKING CHANGES

  • angular: the module doesn't provide Ability instance anymore thus it doesn't need forRoot static method anymore

    Before

    import { NgModule } from '@angular/core';
    import { AbilityModule } from '@casl/angular';
    
    @NgModule({
      imports: [
        // other modules
        AbilityModule.forRoot()
      ],
      // other properties
    })
    export class AppModule {}

    After

    import { NgModule } from '@angular/core';
    import { AbilityModule } from '@casl/angular';
    import { Ability, PureAbility } from '@casl/ability';
    
    @NgModule({
      imports: [
        // other modules
        AbilityModule
      ],
      providers: [
        { provide: Ability, useValue: new Ability() },
        { provide: PureAbility, useExisting: Ability }
      ]
      // other properties
    })
    export class AppModule {}

    See docs of @casl/angular for details

  • pipe: CanPipe is deprecated in favor of AblePipe

    Before

    <div *ngIf="'Post' | can: 'read'">hidden content</div>

    After

    <div *ngIf="'read' | able: 'Post'">hidden content</div>

3.0.6 (2020-03-06)

Bug Fixes

  • angular: reverts back anngular to not use Ivy as it was not recommend by angular team (b883118), closes #270

3.0.5 (2020-02-21)

Bug Fixes

  • angular: moves postinstall hook to postbootstrap hook which links modules (769e099), closes #266

3.0.4 (2020-02-21)

Bug Fixes

  • angular: adds postinstall script into npm package (c753d44), closes #266

3.0.3 (2020-02-21)

Bug Fixes

  • angular: reverts back prerelease hook (1fc60c2), closes #266

3.0.2 (2020-02-20)

Bug Fixes

  • angular: adds missing file exists utility (732e253), closes #266

3.0.1 (2020-02-20)

Bug Fixes

  • angular: ensures postinstall script uses node to check whether file exists (eba8ef4)

3.0.0 (2020-02-17)

Bug Fixes

  • angular: ensure postinstall hook is executed only during local dev (a47bac8)

BREAKING CHANGES

  • angular: upgrades angular to v9

2.2.0 (2020-02-17)

Deprecated because of invalid package.json peerDependencies and postinstall hook

Features

Performance Improvements

  • angular: makes casl-angular much smaller by utilizing tslib.es6 (093cefa)

Features

Bug Fixes

Features

  • ability: adds support for manage action (d9ab56c), closes #119

BREAKING CHANGES

  • ability: manage is not anymore an alias for CRUD but represents any action.

Let's consider the next example:

const ability = AbilityBuilder.define((can) => {
  can('manage', 'Post')
  can('read', 'User')
})

In @casl/ability@2.x the definition above produces the next results:

ability.can('read', 'Post') // true
ability.can('publish', 'Post') // false, because `manage` is an alias for CRUD

In @casl/ability@3.x the results:

ability.can('read', 'Post') // true
ability.can('publish', 'Post') // true, because `manage` represents any action

To migrate the code, just replace manage with crud and everything will work as previously.

Bug Fixes

  • angular: adds possibility to use angular module in lazy loaded routes (0c7c3c1)

BREAKING CHANGES

  • angular: Fixes #131

Bug Fixes

  • angular: makes field to be optional argument (a3eec63), closes #126

Bug Fixes

  • angular: converts source to typescript (565936d), closes #126
  • README: changes links to @casl/ability to point to npm package instead to git root [skip ci] (a74086b), closes #102
  • semantic-release: test (cab3f4b), closes #94

Features

  • react:can: updates typescript declarations (213dcde)

Bug Fixes

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

0.3.0 (2018-05-14)

Features

  • angular: supports per field abilities (8268bb4)

0.2.0 (2018-04-26)

Features

0.1.0 (2018-03-23)

Features

  • angular: adds angular integration and tests, closes #24