@casl/angular 5.1.2 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +17 -12
- package/CHANGELOG.md +0 -423
package/README.md
CHANGED
|
@@ -172,7 +172,7 @@ For apps that mutate application state, we need to use impure `able` pipe as it
|
|
|
172
172
|
|
|
173
173
|
## TypeScript support
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
This package is written in TypeScript, so it will warn you about wrong usage.
|
|
176
176
|
|
|
177
177
|
It may be a bit tedious to use application specific abilities in Angular app because everywhere you inject `Ability` instance you will need to import its generic parameters:
|
|
178
178
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casl/angular",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Angular module for CASL which makes it easy to add permissions in any Angular app",
|
|
5
5
|
"main": "dist/umd/index.js",
|
|
6
6
|
"module": "dist/es5m/index.js",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/stalniy/casl.git"
|
|
17
|
+
"url": "https://github.com/stalniy/casl.git",
|
|
18
|
+
"directory": "packages/casl-angular"
|
|
18
19
|
},
|
|
19
20
|
"homepage": "https://casl.js.org",
|
|
20
21
|
"publishConfig": {
|
|
@@ -45,24 +46,28 @@
|
|
|
45
46
|
"author": "Sergii Stotskyi <sergiy.stotskiy@gmail.com>",
|
|
46
47
|
"license": "MIT",
|
|
47
48
|
"peerDependencies": {
|
|
48
|
-
"@angular/core": "^
|
|
49
|
+
"@angular/core": "^13.0.0",
|
|
49
50
|
"@casl/ability": "^3.0.0 || ^4.0.0 || ^5.1.0",
|
|
50
|
-
"rxjs": "^
|
|
51
|
+
"rxjs": "^7.5.5",
|
|
51
52
|
"tslib": "^2.0.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@abraham/reflection": "^0.8.0",
|
|
55
|
-
"@angular/common": "^
|
|
56
|
-
"@angular/compiler": "^
|
|
57
|
-
"@angular/compiler-cli": "^
|
|
58
|
-
"@angular/core": "^
|
|
59
|
-
"@angular/platform-browser": "^
|
|
60
|
-
"@angular/platform-browser-dynamic": "^
|
|
56
|
+
"@angular/common": "^13.0.0",
|
|
57
|
+
"@angular/compiler": "^13.0.0",
|
|
58
|
+
"@angular/compiler-cli": "^13.0.0",
|
|
59
|
+
"@angular/core": "^13.0.0",
|
|
60
|
+
"@angular/platform-browser": "^13.0.0",
|
|
61
|
+
"@angular/platform-browser-dynamic": "^13.0.0",
|
|
62
|
+
"@angular-devkit/build-angular": "^13.0.0",
|
|
63
|
+
"jest": "^27.0.0",
|
|
61
64
|
"@casl/ability": "^5.1.0",
|
|
62
65
|
"@casl/dx": "workspace:^1.0.0",
|
|
63
|
-
"
|
|
66
|
+
"@types/jest": "^27.4.7",
|
|
67
|
+
"jest-preset-angular": "^11.0.0",
|
|
68
|
+
"rxjs": "^7.5.5",
|
|
64
69
|
"tslib": "^2.0.0",
|
|
65
|
-
"typescript": "~4.
|
|
70
|
+
"typescript": "~4.4.4",
|
|
66
71
|
"zone.js": "~0.11.4"
|
|
67
72
|
},
|
|
68
73
|
"files": [
|
package/CHANGELOG.md
DELETED
|
@@ -1,423 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## [5.1.2](https://github.com/stalniy/casl/compare/@casl/angular@5.1.1...@casl/angular@5.1.2) (2021-05-31)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### chore
|
|
9
|
-
|
|
10
|
-
* **deps:** updates angular to v12 ([#516](https://github.com/stalniy/casl/issues/516)) ([ff4212c](https://github.com/stalniy/casl/commit/ff4212c7f32f1fbc8a73e6b3a6615af65991e39a)), closes [#514](https://github.com/stalniy/casl/issues/514) [#512](https://github.com/stalniy/casl/issues/512)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
### BREAKING CHANGES
|
|
14
|
-
|
|
15
|
-
* **deps:** there are 2 important changes:
|
|
16
|
-
|
|
17
|
-
* deprecated CanPipe was removed, use AblePipe instead
|
|
18
|
-
* library is compiled by Ivy and no longer support ViewEngine
|
|
19
|
-
|
|
20
|
-
## [5.1.1](https://github.com/stalniy/casl/compare/@casl/angular@5.1.0...@casl/angular@5.1.1) (2021-05-12)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### Bug Fixes
|
|
24
|
-
|
|
25
|
-
* adjusts package tags to improve discoverability ([73e88b0](https://github.com/stalniy/casl/commit/73e88b0a256625b193b2cd9dc4a219f2e1193cbc))
|
|
26
|
-
|
|
27
|
-
# [5.1.0](https://github.com/stalniy/casl/compare/@casl/angular@5.0.2...@casl/angular@5.1.0) (2021-01-14)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### Features
|
|
31
|
-
|
|
32
|
-
* **angular:** updates angular to v11 ([#421](https://github.com/stalniy/casl/issues/421)) ([ec16bf9](https://github.com/stalniy/casl/commit/ec16bf9e93536c4ec249d2520cf336c1497615a9))
|
|
33
|
-
|
|
34
|
-
## [5.0.2](https://github.com/stalniy/casl/compare/@casl/angular@5.0.1...@casl/angular@5.0.2) (2021-01-10)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### Bug Fixes
|
|
38
|
-
|
|
39
|
-
* **angular:** changes ES6M distribution to use `.js` ext instead of `.mjs` ([06bd5be](https://github.com/stalniy/casl/commit/06bd5be0904b3194733c9f6fc3a3dd34cc069aba)), closes [#427](https://github.com/stalniy/casl/issues/427)
|
|
40
|
-
|
|
41
|
-
## [5.0.1](https://github.com/stalniy/casl/compare/@casl/angular@5.0.0...@casl/angular@5.0.1) (2020-12-28)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### Bug Fixes
|
|
45
|
-
|
|
46
|
-
* **dist:** adds separate `tsconfig.build.json` to every completementary project ([87742ce](https://github.com/stalniy/casl/commit/87742cec518a8a68d5fc29be2bbc9561cbc7da6c)), closes [#419](https://github.com/stalniy/casl/issues/419)
|
|
47
|
-
|
|
48
|
-
# [5.0.0](https://github.com/stalniy/casl/compare/@casl/angular@4.1.6...@casl/angular@5.0.0) (2020-12-26)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### Bug Fixes
|
|
52
|
-
|
|
53
|
-
* **package:** removes `engine` section that points to npm@6 ([eecd12a](https://github.com/stalniy/casl/commit/eecd12ac49f56d6a0f57d1a57fb37487335b5f03)), closes [#417](https://github.com/stalniy/casl/issues/417)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Code Refactoring
|
|
57
|
-
|
|
58
|
-
* **angular:** removes support for Angular < 9.x and casl < 3.x ([3530cdf](https://github.com/stalniy/casl/commit/3530cdf5b73d19b9a6da9be675f292f67e44db32))
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
### Features
|
|
62
|
-
|
|
63
|
-
* **builder:** improves typings for AbilityBuilder [skip release] ([ebd4d17](https://github.com/stalniy/casl/commit/ebd4d17a355a2646467033118a3d6efee4321d27)), closes [#379](https://github.com/stalniy/casl/issues/379)
|
|
64
|
-
* **esm:** adds ESM support for latest Node.js through `exports` prop in package.json ([cac2506](https://github.com/stalniy/casl/commit/cac2506a80c18f194210c2d89108d1d094751fa4)), closes [#331](https://github.com/stalniy/casl/issues/331)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
### BREAKING CHANGES
|
|
68
|
-
|
|
69
|
-
* **angular:** removes support for Angular < 9.x and casl < 3.x
|
|
70
|
-
* **builder:** changes main generic parameter to be a class instead of instance and makes `defineAbility` to accept options as the 2nd argument.
|
|
71
|
-
|
|
72
|
-
**Before**
|
|
73
|
-
|
|
74
|
-
```ts
|
|
75
|
-
import { AbilityBuilder, defineAbility, Ability } from '@casl/ability';
|
|
76
|
-
|
|
77
|
-
const resolveAction = (action: string) => {/* custom implementation */ };
|
|
78
|
-
const ability = defineAbility({ resolveAction }, (can) => can('read', 'Item'));
|
|
79
|
-
const builder = new AbilityBuilder<Ability>(Ability);
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**After**
|
|
83
|
-
|
|
84
|
-
```ts
|
|
85
|
-
import { AbilityBuilder, defineAbility, Ability } from '@casl/ability';
|
|
86
|
-
|
|
87
|
-
const resolveAction = (action: string) => {/* custom implementation */ };
|
|
88
|
-
const ability = defineAbility((can) => can('read', 'Item'), { resolveAction });
|
|
89
|
-
const builder = new AbilityBuilder(Ability); // first argument is now mandatory!
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
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.
|
|
93
|
-
|
|
94
|
-
## [4.1.6](https://github.com/stalniy/casl/compare/@casl/angular@4.1.5...@casl/angular@4.1.6) (2020-10-21)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
### Bug Fixes
|
|
98
|
-
|
|
99
|
-
* **README:** adds semi-colon ([cad1daa](https://github.com/stalniy/casl/commit/cad1daaabf8a7ad45d5736394d3ba3dc42207614))
|
|
100
|
-
|
|
101
|
-
## [4.1.5](https://github.com/stalniy/casl/compare/@casl/angular@4.1.4...@casl/angular@4.1.5) (2020-09-03)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
### Bug Fixes
|
|
105
|
-
|
|
106
|
-
* **angular:** fixes sourcemap generation for the code built by ngc ([7715263](https://github.com/stalniy/casl/commit/771526379ff8203170a433d71b68644a48ff44eb)), closes [#387](https://github.com/stalniy/casl/issues/387) [#382](https://github.com/stalniy/casl/issues/382)
|
|
107
|
-
|
|
108
|
-
## [4.1.4](https://github.com/stalniy/casl/compare/@casl/angular@4.1.3...@casl/angular@4.1.4) (2020-06-09)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
### Bug Fixes
|
|
112
|
-
|
|
113
|
-
* **docs:** ensure README and docs for all packages are in sync ([8df3684](https://github.com/stalniy/casl/commit/8df3684b139de0af60c9c37f284a5028ffbf2224)), closes [#338](https://github.com/stalniy/casl/issues/338)
|
|
114
|
-
|
|
115
|
-
## [4.1.3](https://github.com/stalniy/casl/compare/@casl/angular@4.1.2...@casl/angular@4.1.3) (2020-06-08)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
### Bug Fixes
|
|
119
|
-
|
|
120
|
-
* **package:** makes sure the latest casl works with Angular 8.x ([91ee505](https://github.com/stalniy/casl/commit/91ee505f25b77c7ddf13a066d9d0c22f6d8d2f99)), closes [#337](https://github.com/stalniy/casl/issues/337)
|
|
121
|
-
|
|
122
|
-
## [4.1.2](https://github.com/stalniy/casl/compare/@casl/angular@4.1.1...@casl/angular@4.1.2) (2020-06-02)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
### Bug Fixes
|
|
126
|
-
|
|
127
|
-
* **angular:** widen peer dependency for @angular/core ([aa2c3c4](https://github.com/stalniy/casl/commit/aa2c3c4e5a1e3cf14cebc83125571d3ab15c1451))
|
|
128
|
-
|
|
129
|
-
## [4.1.1](https://github.com/stalniy/casl/compare/@casl/angular@4.1.0...@casl/angular@4.1.1) (2020-05-19)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
### Bug Fixes
|
|
133
|
-
|
|
134
|
-
* **angular:** updates README for the latest release ([1103dec](https://github.com/stalniy/casl/commit/1103dec36b331a67944a5a9b9554daaeabc2b5bf)), closes [#276](https://github.com/stalniy/casl/issues/276)
|
|
135
|
-
|
|
136
|
-
# [4.1.0](https://github.com/stalniy/casl/compare/@casl/angular@4.0.4...@casl/angular@4.1.0) (2020-05-19)
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
### Features
|
|
140
|
-
|
|
141
|
-
* **pipe:** adds pure `ablePure` pipe in `@casl/angular` ([23c851c](https://github.com/stalniy/casl/commit/23c851cb0fc4a9cb523a651308f8ad65e137b379)), closes [#276](https://github.com/stalniy/casl/issues/276)
|
|
142
|
-
|
|
143
|
-
## [4.0.4](https://github.com/stalniy/casl/compare/@casl/angular@4.0.3...@casl/angular@4.0.4) (2020-04-14)
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
### Bug Fixes
|
|
147
|
-
|
|
148
|
-
* **angular:** removes ngcc `publishOnly` hook ([6e5c570](https://github.com/stalniy/casl/commit/6e5c570b92150e23e4e5c463ed4b497a4860db03))
|
|
149
|
-
|
|
150
|
-
## [4.0.3](https://github.com/stalniy/casl/compare/@casl/angular@4.0.2...@casl/angular@4.0.3) (2020-04-14)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
### Bug Fixes
|
|
154
|
-
|
|
155
|
-
* **package:** allows to disable minification through `LIB_MINIFY` env var ([de70838](https://github.com/stalniy/casl/commit/de70838a7a6e52ee4af52635f6dd91f3b767bdca))
|
|
156
|
-
|
|
157
|
-
## [4.0.2](https://github.com/stalniy/casl/compare/@casl/angular@4.0.1...@casl/angular@4.0.2) (2020-04-10)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
### Bug Fixes
|
|
161
|
-
|
|
162
|
-
* **angular:** ensure that terser doesn't mangle reserved required props ([5371166](https://github.com/stalniy/casl/commit/53711660cfd306bd713a9c59abc0b95d5d1d13c1))
|
|
163
|
-
|
|
164
|
-
## [4.0.1](https://github.com/stalniy/casl/compare/@casl/angular@4.0.0...@casl/angular@4.0.1) (2020-04-09)
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
### Bug Fixes
|
|
168
|
-
|
|
169
|
-
* **angular:** adds support for casl/ability@4 in package.json ([9d65071](https://github.com/stalniy/casl/commit/9d65071fb2cd14bfef34e2cff8f7e79c9d595bdb))
|
|
170
|
-
|
|
171
|
-
# [4.0.0](https://github.com/stalniy/casl/compare/@casl/angular@3.0.6...@casl/angular@4.0.0) (2020-04-09)
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
### Features
|
|
175
|
-
|
|
176
|
-
* **ability:** improves typing for `GetSubjectName` and adds default values for generics ([c089293](https://github.com/stalniy/casl/commit/c08929301a1b06880c054cbb2f21cda3725028a4)), closes [#256](https://github.com/stalniy/casl/issues/256)
|
|
177
|
-
* **angular:** adds generics to `CanPipe` ([68bd287](https://github.com/stalniy/casl/commit/68bd287e7af165b82bbf8076ea88e83b51754a31)), closes [#256](https://github.com/stalniy/casl/issues/256)
|
|
178
|
-
* **angular:** adds support for action only checks ([0462edb](https://github.com/stalniy/casl/commit/0462edb854ba4094e735287744404ea2d378defb)), closes [#107](https://github.com/stalniy/casl/issues/107)
|
|
179
|
-
* **angular:** allows to use custom `Ability` instances and improves tree shaking support ([2e7a149](https://github.com/stalniy/casl/commit/2e7a1498c27d0c542e9f6507ba9b5195ae3a1da8)), closes [#249](https://github.com/stalniy/casl/issues/249)
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
### BREAKING CHANGES
|
|
183
|
-
|
|
184
|
-
* **angular:** the module doesn't provide `Ability` instance anymore thus it doesn't need `forRoot` static method anymore
|
|
185
|
-
|
|
186
|
-
Before
|
|
187
|
-
|
|
188
|
-
```js
|
|
189
|
-
import { NgModule } from '@angular/core';
|
|
190
|
-
import { AbilityModule } from '@casl/angular';
|
|
191
|
-
|
|
192
|
-
@NgModule({
|
|
193
|
-
imports: [
|
|
194
|
-
// other modules
|
|
195
|
-
AbilityModule.forRoot()
|
|
196
|
-
],
|
|
197
|
-
// other properties
|
|
198
|
-
})
|
|
199
|
-
export class AppModule {}
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
After
|
|
203
|
-
|
|
204
|
-
```js
|
|
205
|
-
import { NgModule } from '@angular/core';
|
|
206
|
-
import { AbilityModule } from '@casl/angular';
|
|
207
|
-
import { Ability, PureAbility } from '@casl/ability';
|
|
208
|
-
|
|
209
|
-
@NgModule({
|
|
210
|
-
imports: [
|
|
211
|
-
// other modules
|
|
212
|
-
AbilityModule
|
|
213
|
-
],
|
|
214
|
-
providers: [
|
|
215
|
-
{ provide: Ability, useValue: new Ability() },
|
|
216
|
-
{ provide: PureAbility, useExisting: Ability }
|
|
217
|
-
]
|
|
218
|
-
// other properties
|
|
219
|
-
})
|
|
220
|
-
export class AppModule {}
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
See docs of `@casl/angular` for details
|
|
224
|
-
|
|
225
|
-
* **pipe:** `CanPipe` is deprecated in favor of `AblePipe`
|
|
226
|
-
|
|
227
|
-
Before
|
|
228
|
-
|
|
229
|
-
```html
|
|
230
|
-
<div *ngIf="'Post' | can: 'read'">hidden content</div>
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
After
|
|
234
|
-
|
|
235
|
-
```html
|
|
236
|
-
<div *ngIf="'read' | able: 'Post'">hidden content</div>
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
## [3.0.6](https://github.com/stalniy/casl/compare/@casl/angular@3.0.5...@casl/angular@3.0.6) (2020-03-06)
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
### Bug Fixes
|
|
243
|
-
|
|
244
|
-
* **angular:** reverts back anngular to not use Ivy as it was not recommend by angular team ([b883118](https://github.com/stalniy/casl/commit/b8831184f4bbfc3924e95f1fd4f2861d88b43fdf)), closes [#270](https://github.com/stalniy/casl/issues/270)
|
|
245
|
-
|
|
246
|
-
## [3.0.5](https://github.com/stalniy/casl/compare/@casl/angular@3.0.4...@casl/angular@3.0.5) (2020-02-21)
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
### Bug Fixes
|
|
250
|
-
|
|
251
|
-
* **angular:** moves postinstall hook to postbootstrap hook which links modules ([769e099](https://github.com/stalniy/casl/commit/769e099902eca821e17d4f6a3e5a44fd29191915)), closes [#266](https://github.com/stalniy/casl/issues/266)
|
|
252
|
-
|
|
253
|
-
## [3.0.4](https://github.com/stalniy/casl/compare/@casl/angular@3.0.3...@casl/angular@3.0.4) (2020-02-21)
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
### Bug Fixes
|
|
257
|
-
|
|
258
|
-
* **angular:** adds postinstall script into npm package ([c753d44](https://github.com/stalniy/casl/commit/c753d446532a994766860631939f8000b69f06ae)), closes [#266](https://github.com/stalniy/casl/issues/266)
|
|
259
|
-
|
|
260
|
-
## [3.0.3](https://github.com/stalniy/casl/compare/@casl/angular@3.0.2...@casl/angular@3.0.3) (2020-02-21)
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
### Bug Fixes
|
|
264
|
-
|
|
265
|
-
* **angular:** reverts back prerelease hook ([1fc60c2](https://github.com/stalniy/casl/commit/1fc60c248d7e837fae39eb760cb308a73959b59d)), closes [#266](https://github.com/stalniy/casl/issues/266)
|
|
266
|
-
|
|
267
|
-
## [3.0.2](https://github.com/stalniy/casl/compare/@casl/angular@3.0.1...@casl/angular@3.0.2) (2020-02-20)
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
### Bug Fixes
|
|
271
|
-
|
|
272
|
-
* **angular:** adds missing file exists utility ([732e253](https://github.com/stalniy/casl/commit/732e253f65801631a3128fc92e2514bdb6f79987)), closes [#266](https://github.com/stalniy/casl/issues/266)
|
|
273
|
-
|
|
274
|
-
## [3.0.1](https://github.com/stalniy/casl/compare/@casl/angular@3.0.0...@casl/angular@3.0.1) (2020-02-20)
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
### Bug Fixes
|
|
278
|
-
|
|
279
|
-
* **angular:** ensures postinstall script uses node to check whether file exists ([eba8ef4](https://github.com/stalniy/casl/commit/eba8ef460dec655783204819fbb0e0721c34db13))
|
|
280
|
-
|
|
281
|
-
# [3.0.0](https://github.com/stalniy/casl/compare/@casl/angular@2.2.0...@casl/angular@3.0.0) (2020-02-17)
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
### Bug Fixes
|
|
285
|
-
|
|
286
|
-
* **angular:** ensure postinstall hook is executed only during local dev ([a47bac8](https://github.com/stalniy/casl/commit/a47bac8f60c544b90be476ae73a17e0ddfdc479c))
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
### BREAKING CHANGES
|
|
290
|
-
|
|
291
|
-
* **angular:** upgrades angular to v9
|
|
292
|
-
|
|
293
|
-
# [2.2.0](https://github.com/stalniy/casl/compare/@casl/angular@2.1.1...@casl/angular@2.2.0) (2020-02-17)
|
|
294
|
-
|
|
295
|
-
**Deprecated because of invalid package.json peerDependencies and postinstall hook**
|
|
296
|
-
|
|
297
|
-
### Features
|
|
298
|
-
|
|
299
|
-
* **angular:** upgrades angular to v9 ([#260](https://github.com/stalniy/casl/issues/260)) ([3452636](https://github.com/stalniy/casl/commit/34526360ddd3c03605127223823c3beadc6fff84)), closes [#265](https://github.com/stalniy/casl/issues/265)
|
|
300
|
-
|
|
301
|
-
# [@casl/angular-v2.1.1](https://github.com/stalniy/casl/compare/@casl/angular@2.1.0...@casl/angular@2.1.1) (2019-12-09)
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
### Performance Improvements
|
|
305
|
-
|
|
306
|
-
* **angular:** makes casl-angular much smaller by utilizing tslib.es6 ([093cefa](https://github.com/stalniy/casl/commit/093cefa2e26aa4b2cd9e733b0e77aaff1664dbcf))
|
|
307
|
-
|
|
308
|
-
# [@casl/angular-v2.1.0](https://github.com/stalniy/casl/compare/@casl/angular@2.0.0...@casl/angular@2.1.0) (2019-07-01)
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
### Features
|
|
312
|
-
|
|
313
|
-
* **angular:** upgrades Angular and typescript ([08591f4](https://github.com/stalniy/casl/commit/08591f4)), closes [#158](https://github.com/stalniy/casl/issues/158) [#195](https://github.com/stalniy/casl/issues/195)
|
|
314
|
-
|
|
315
|
-
# [@casl/angular-v2.0.0](https://github.com/stalniy/casl/compare/@casl/angular@1.0.0...@casl/angular@2.0.0) (2019-02-10)
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
### Bug Fixes
|
|
319
|
-
|
|
320
|
-
* **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)
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
### Features
|
|
324
|
-
|
|
325
|
-
* **ability:** adds support for `manage` action ([d9ab56c](https://github.com/stalniy/casl/commit/d9ab56c)), closes [#119](https://github.com/stalniy/casl/issues/119)
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
### BREAKING CHANGES
|
|
329
|
-
|
|
330
|
-
* **ability:** `manage` is not anymore an alias for CRUD but represents any action.
|
|
331
|
-
|
|
332
|
-
Let's consider the next example:
|
|
333
|
-
|
|
334
|
-
```js
|
|
335
|
-
const ability = AbilityBuilder.define((can) => {
|
|
336
|
-
can('manage', 'Post')
|
|
337
|
-
can('read', 'User')
|
|
338
|
-
})
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
In @casl/ability@2.x the definition above produces the next results:
|
|
342
|
-
|
|
343
|
-
```js
|
|
344
|
-
ability.can('read', 'Post') // true
|
|
345
|
-
ability.can('publish', 'Post') // false, because `manage` is an alias for CRUD
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
In @casl/ability@3.x the results:
|
|
349
|
-
|
|
350
|
-
```js
|
|
351
|
-
ability.can('read', 'Post') // true
|
|
352
|
-
ability.can('publish', 'Post') // true, because `manage` represents any action
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
To migrate the code, just replace `manage` with `crud` and everything will work as previously.
|
|
356
|
-
|
|
357
|
-
# [@casl/angular-v1.0.0](https://github.com/stalniy/casl/compare/@casl/angular@0.4.1...@casl/angular@1.0.0) (2018-12-02)
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
### Bug Fixes
|
|
361
|
-
|
|
362
|
-
* **angular:** adds possibility to use angular module in lazy loaded routes ([0c7c3c1](https://github.com/stalniy/casl/commit/0c7c3c1))
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
### BREAKING CHANGES
|
|
366
|
-
|
|
367
|
-
* **angular:** Fixes #131
|
|
368
|
-
|
|
369
|
-
# [@casl/angular-v0.4.1](https://github.com/stalniy/casl/compare/@casl/angular@0.4.0...@casl/angular@0.4.1) (2018-11-11)
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
### Bug Fixes
|
|
373
|
-
|
|
374
|
-
* **angular:** makes `field` to be optional argument ([a3eec63](https://github.com/stalniy/casl/commit/a3eec63)), closes [#126](https://github.com/stalniy/casl/issues/126)
|
|
375
|
-
|
|
376
|
-
# [@casl/angular-v0.4.0](https://github.com/stalniy/casl/compare/@casl/angular@0.3.1...@casl/angular@0.4.0) (2018-11-11)
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
### Bug Fixes
|
|
380
|
-
|
|
381
|
-
* **angular:** converts source to typescript ([565936d](https://github.com/stalniy/casl/commit/565936d)), closes [#126](https://github.com/stalniy/casl/issues/126)
|
|
382
|
-
* **README:** changes links to [@casl](https://github.com/casl)/ability to point to npm package instead to git root [skip ci] ([a74086b](https://github.com/stalniy/casl/commit/a74086b)), closes [#102](https://github.com/stalniy/casl/issues/102)
|
|
383
|
-
* **semantic-release:** test ([cab3f4b](https://github.com/stalniy/casl/commit/cab3f4b)), closes [#94](https://github.com/stalniy/casl/issues/94)
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
### Features
|
|
387
|
-
|
|
388
|
-
* **react:can:** updates typescript declarations ([213dcde](https://github.com/stalniy/casl/commit/213dcde))
|
|
389
|
-
|
|
390
|
-
<a name="@casl/angular-v0.3.1"></a>
|
|
391
|
-
# [@casl/angular-v0.3.1](https://github.com/stalniy/casl/compare/@casl/angular@0.3.0...@casl/angular@0.3.1) (2018-07-02)
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
### Bug Fixes
|
|
395
|
-
|
|
396
|
-
* **package:** changes location of ES5M modules ([2b1ad4e](https://github.com/stalniy/casl/commit/2b1ad4e)), closes [#89](https://github.com/stalniy/casl/issues/89)
|
|
397
|
-
|
|
398
|
-
<a name="0.3.0"></a>
|
|
399
|
-
# 0.3.0 (2018-05-14)
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
### Features
|
|
403
|
-
|
|
404
|
-
* **angular:** supports per field abilities ([8268bb4](https://github.com/stalniy/casl/commit/8268bb4))
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
<a name="0.2.0"></a>
|
|
409
|
-
# 0.2.0 (2018-04-26)
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
### Features
|
|
413
|
-
|
|
414
|
-
* **angular:** adds typings ([98644ba](https://github.com/stalniy/casl/commit/98644ba)), closes [#38](https://github.com/stalniy/casl/issues/38)
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
<a name="0.1.0"></a>
|
|
418
|
-
# 0.1.0 (2018-03-23)
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
### Features
|
|
422
|
-
|
|
423
|
-
* **angular:** adds angular integration and tests, closes [#24](https://github.com/stalniy/casl/issues/24)
|