Skip to content

Commit

Permalink
Merge pull request #7990 from ever-co/chore/npm_and_yarn/camelcaseV8.0.0
Browse files Browse the repository at this point in the history
chore(deps): camelcase ^6.3.0 resolutions
  • Loading branch information
rahul-rocket authored Jul 20, 2024
2 parents d4e7228 + 7734647 commit 9735faf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 27 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@
"@angular-devkit/architect": "^0.1602.11",
"@angular-devkit/build-angular": "^16.2.11",
"@angular-devkit/core": "^16.2.11",
"camelcase": "^6.3.0",
"rxjs": "^7.4.0",
"autoprefixer": "10.4.14",
"locutus": "^2.0.30"
Expand All @@ -316,6 +317,7 @@
"angular2-smart-table": "^3.2.0",
"autoprefixer": "10.4.14",
"bcrypt": "^5.1.0",
"camelcase": "^6.3.0",
"dotenv": "^16.0.3",
"ffi-napi": "^4.0.3",
"iconv": "^3.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CACHE_MANAGER } from '@nestjs/cache-manager';
import { Cache } from 'cache-manager';
import { Brackets, WhereExpressionBuilder } from 'typeorm';
import { verify } from 'jsonwebtoken';
import * as camelCase from 'camelcase';
import camelcase from 'camelcase';
import { PermissionsEnum, RolesEnum } from '@gauzy/contracts';
import { isEmpty, PERMISSIONS_METADATA, removeDuplicates } from '@gauzy/common';
import { RequestContext } from './../../core/context';
Expand Down Expand Up @@ -130,7 +130,7 @@ export class OrganizationPermissionGuard implements CanActivate {
// Directly add the OR conditions to the query if permissions array is not empty
if (permissions.length > 0) {
const orConditions = permissions.map((permission: string) => {
const field = `organization.${camelCase(permission)}`;
const field = `organization.${camelcase(permission)}`;
return { [field]: true };
});
// Use OR condition for each permission
Expand Down Expand Up @@ -161,7 +161,7 @@ export class OrganizationPermissionGuard implements CanActivate {
typeOrmQueryBuilder.andWhere(
new Brackets((qb: WhereExpressionBuilder) => {
permissions.forEach((permission) => {
qb.orWhere(`organization.${camelCase(permission)} = true`);
qb.orWhere(`organization.${camelcase(permission)} = true`);
});
})
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ChangeDetectorRef, Directive, Input, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
import { filter, tap } from 'rxjs/operators';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import * as camelCase from 'camelcase';
import camelcase from 'camelcase';
import { IOrganization } from '@gauzy/contracts';
import { distinctUntilChange, Store } from '@gauzy/ui-core/common';

Expand Down Expand Up @@ -38,10 +38,10 @@ export class TimeTrackingAuthorizedDirective implements OnInit {
.pipe(
distinctUntilChange(),
filter((organization: IOrganization) => !!organization),
filter((organization: IOrganization) => camelCase(this.permission) in organization),
filter((organization: IOrganization) => camelcase(this.permission) in organization),
tap(() => this._viewContainer.clear()),
tap((organization: IOrganization) => {
if (organization[camelCase(this.permission)]) {
if (organization[camelcase(this.permission)]) {
this._viewContainer.createEmbeddedView(this._templateRef);
} else {
this.showTemplateBlockInView(this.permissionElse);
Expand Down
22 changes: 1 addition & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15139,27 +15139,7 @@ camelcase-keys@^7.0.0:
quick-lru "^5.1.1"
type-fest "^1.2.1"

[email protected]:
version "5.0.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42"
integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==

camelcase@^2.0.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
integrity sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==

camelcase@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
integrity sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==

camelcase@^5.0.0, camelcase@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==

camelcase@^6.2.0, camelcase@^6.3.0:
[email protected], camelcase@^2.0.1, camelcase@^4.1.0, camelcase@^5.0.0, camelcase@^5.3.1, camelcase@^6.0.0, camelcase@^6.2.0, camelcase@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a"
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
Expand Down

0 comments on commit 9735faf

Please sign in to comment.