Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@casl/angular

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@casl/angular - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

69

CHANGELOG.md

@@ -5,3 +5,3 @@ # Change Log

# [4.0.0](https://github.com/stalniy/casl/compare/@casl/angular@3.0.6...@casl/angular@4.0.0) (2020-04-09)
## [4.0.1](https://github.com/stalniy/casl/compare/@casl/angular@4.0.0...@casl/angular@4.0.1) (2020-04-09)

@@ -11,17 +11,13 @@

* **angular:** makes sure reflect polyfill is added before angular imports ([2acbb35](https://github.com/stalniy/casl/commit/2acbb35cc179275e23f3d83dd27ef8d5a3ef1099)), closes [#248](https://github.com/stalniy/casl/issues/248)
* **angular:** adds support for casl/ability@4 in package.json ([9d65071](https://github.com/stalniy/casl/commit/9d65071fb2cd14bfef34e2cff8f7e79c9d595bdb))
# [4.0.0](https://github.com/stalniy/casl/compare/@casl/angular@3.0.6...@casl/angular@4.0.0) (2020-04-09)
### chore
* **angular:** special commit for breaking changes ([077bcab](https://github.com/stalniy/casl/commit/077bcab8e080102b727ca697a06a8731120634fc))
### Features
* **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)
* **angular:** adds generics to CanPipe ([68bd287](https://github.com/stalniy/casl/commit/68bd287e7af165b82bbf8076ea88e83b51754a31)), closes [#256](https://github.com/stalniy/casl/issues/256)
* **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)
* **angular:** adds generics to `CanPipe` ([68bd287](https://github.com/stalniy/casl/commit/68bd287e7af165b82bbf8076ea88e83b51754a31)), closes [#256](https://github.com/stalniy/casl/issues/256)
* **angular:** adds support for action only checks ([0462edb](https://github.com/stalniy/casl/commit/0462edb854ba4094e735287744404ea2d378defb)), closes [#107](https://github.com/stalniy/casl/issues/107)
* **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)
* **vue:** adds better generics typying for Vue ([5cc7b60](https://github.com/stalniy/casl/commit/5cc7b60d8a2a53db217f8ad1a4673a28f67aefce)), closes [#107](https://github.com/stalniy/casl/issues/107)

@@ -31,4 +27,57 @@

* **angular:** the module doesn't provide `Ability` instance anymore
* **angular:** the module doesn't provide `Ability` instance anymore thus it doesn't need `forRoot` static method anymore
Before
```js
import { NgModule } from '@angular/core';
import { AbilityModule } from '@casl/angular';
@NgModule({
imports: [
// other modules
AbilityModule.forRoot()
],
// other properties
})
export class AppModule {}
```
After
```js
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
```html
<div *ngIf="'Post' | can: 'read'">hidden content</div>
```
After
```html
<div *ngIf="'read' | able: 'Post'">hidden content</div>
```
## [3.0.6](https://github.com/stalniy/casl/compare/@casl/angular@3.0.5...@casl/angular@3.0.6) (2020-03-06)

@@ -35,0 +84,0 @@

4

package.json
{
"name": "@casl/angular",
"version": "4.0.0",
"version": "4.0.1",
"description": "Angular module for CASL which makes it easy to add permissions in any Angular app",

@@ -48,3 +48,3 @@ "main": "dist/umd/index.js",

"tslib": "^1.9.0",
"@casl/ability": "^2.0.0 || ^3.0.0"
"@casl/ability": "^2.0.0 || ^3.0.0 || ^4.0.0"
},

@@ -51,0 +51,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc