From 8dd92066c1fd107d1c39735908ebcc08896743b6 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 10 Feb 2019 12:08:34 +0200 Subject: [PATCH] chore(release): @casl/angular@2.0.0 [skip ci] --- packages/casl-angular/CHANGELOG.md | 42 +++++++++++++++++++++++++ packages/casl-angular/package-lock.json | 2 +- packages/casl-angular/package.json | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/packages/casl-angular/CHANGELOG.md b/packages/casl-angular/CHANGELOG.md index b7d030682..a6738b6bd 100644 --- a/packages/casl-angular/CHANGELOG.md +++ b/packages/casl-angular/CHANGELOG.md @@ -2,6 +2,48 @@ All notable changes to this project will be documented in this file. +# [@casl/angular-v2.0.0](https://github.com/stalniy/casl/compare/@casl/angular@1.0.0...@casl/angular@2.0.0) (2019-02-10) + + +### Bug Fixes + +* **packages:** increases peerDependency of [@casl](https://github.com/casl)/ability ([9f6a7b8](https://github.com/stalniy/casl/commit/9f6a7b8)), closes [#119](https://github.com/stalniy/casl/issues/119) + + +### Features + +* **ability:** adds support for `manage` action ([d9ab56c](https://github.com/stalniy/casl/commit/d9ab56c)), closes [#119](https://github.com/stalniy/casl/issues/119) + + +### BREAKING CHANGES + +* **ability:** `manage` is not anymore an alias for CRUD but represents any action. + +Let's consider the next example: + +```js +const ability = AbilityBuilder.define((can) => { + can('manage', 'Post') + can('read', 'User') +}) +``` + +In @casl/ability@2.x the definition above produces the next results: + +```js +ability.can('read', 'Post') // true +ability.can('publish', 'Post') // false, because `manage` is an alias for CRUD +``` + +In @casl/ability@3.x the results: + +```js +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. + # [@casl/angular-v1.0.0](https://github.com/stalniy/casl/compare/@casl/angular@0.4.1...@casl/angular@1.0.0) (2018-12-02) diff --git a/packages/casl-angular/package-lock.json b/packages/casl-angular/package-lock.json index 12c4cb6e0..e2e6578ab 100644 --- a/packages/casl-angular/package-lock.json +++ b/packages/casl-angular/package-lock.json @@ -1,6 +1,6 @@ { "name": "@casl/angular", - "version": "1.0.0", + "version": "2.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/casl-angular/package.json b/packages/casl-angular/package.json index 94893e335..8c272492e 100644 --- a/packages/casl-angular/package.json +++ b/packages/casl-angular/package.json @@ -1,6 +1,6 @@ { "name": "@casl/angular", - "version": "1.0.0", + "version": "2.0.0", "description": "Angular module for CASL which makes it easy to add permissions in any Angular application", "main": "dist/umd/index.js", "module": "dist/es5m/index.js",