Skip to content

Commit

Permalink
Merge pull request #31 from getlarge/fix-invert-validate-variables-fi…
Browse files Browse the repository at this point in the history
…lter-condition

fix(microservices-shared-env): correct condition in `validate`
  • Loading branch information
getlarge authored Feb 28, 2024
2 parents 78986fb + ae5b1d6 commit 21dd5c6
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 122 deletions.
2 changes: 1 addition & 1 deletion apps/auth/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": [
"error",
"warn",
{
"buildTargets": ["build"],
"checkMissingDependencies": true,
Expand Down
3 changes: 3 additions & 0 deletions apps/auth/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion apps/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"ts-mixer": "6.0.1",
"webpack-node-externals": "3.0.0"
},
"peerDependencies": {},
"peerDependencies": {
"ioredis": "4.28.5"
},
"peerDependenciesMeta": {
"ioredis": {
"optional": true
Expand Down
2 changes: 1 addition & 1 deletion apps/expiration/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": [
"error",
"warn",
{
"buildTargets": ["build"],
"checkMissingDependencies": true,
Expand Down
128 changes: 14 additions & 114 deletions apps/expiration/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions apps/expiration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dotenv-expand": "10.0.0",
"fastify": "4.22.0",
"ioredis": "4.28.5",
"mongoose": "6.12.3",
"nestjs-pino": "3.4.0",
"pino-http": "8.5.0",
"reflect-metadata": "0.1.14",
Expand Down
2 changes: 1 addition & 1 deletion apps/orders/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": [
"error",
"warn",
{
"buildTargets": ["build"],
"checkMissingDependencies": true,
Expand Down
1 change: 1 addition & 0 deletions apps/orders/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/orders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"webpack-node-externals": "3.0.0"
},
"peerDependencies": {
"ioredis": "4.28.5",
"uuid": "8.3.2"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion apps/payments/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": [
"error",
"warn",
{
"buildTargets": ["build"],
"checkMissingDependencies": true,
Expand Down
1 change: 1 addition & 0 deletions apps/payments/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/payments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"webpack-node-externals": "3.0.0"
},
"peerDependencies": {
"ioredis": "4.28.5",
"uuid": "8.3.2"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion apps/permissions-manager/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": [
"error",
"warn",
{
"buildTargets": ["build"],
"checkMissingDependencies": true,
Expand Down
2 changes: 1 addition & 1 deletion apps/tickets/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": [
"error",
"warn",
{
"buildTargets": ["build"],
"checkMissingDependencies": true,
Expand Down
1 change: 1 addition & 0 deletions apps/tickets/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/tickets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"webpack-node-externals": "3.0.0"
},
"peerDependencies": {
"ioredis": "4.28.5",
"uuid": "8.3.2"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion libs/microservices/shared/env/src/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const validate = <T extends object>(envClass: ClassConstructor<T>) => {
// eslint-disable-next-line no-param-reassign
config = Object.fromEntries(
Object.entries(config).filter(
([, val]) => !val || val === 'null' || val === 'undefined',
([, val]) => !!val && val !== 'null' && val !== 'undefined',
),
);

Expand Down
5 changes: 5 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"affected": {
"defaultBase": "main"
},
"pluginsConfig": {
"@nx/js": {
"analyzeSourceFiles": true
}
},
"generators": {
"@nx/react": {
"application": {
Expand Down

0 comments on commit 21dd5c6

Please sign in to comment.