diff --git a/e2e/nextjs/app-router/app/yarn.lock b/e2e/nextjs/app-router/app/yarn.lock index c1d28a915..0dbd1240a 100644 --- a/e2e/nextjs/app-router/app/yarn.lock +++ b/e2e/nextjs/app-router/app/yarn.lock @@ -15,78 +15,68 @@ __metadata: linkType: hard "@devcycle/bucketing@file:../../../../dist/lib/shared/bucketing::locator=app%40workspace%3A.": - version: 1.7.7 - resolution: "@devcycle/bucketing@file:../../../../dist/lib/shared/bucketing#../../../../dist/lib/shared/bucketing::hash=4bb41b&locator=app%40workspace%3A." + version: 1.11.0 + resolution: "@devcycle/bucketing@file:../../../../dist/lib/shared/bucketing#../../../../dist/lib/shared/bucketing::hash=e8e31c&locator=app%40workspace%3A." dependencies: - "@devcycle/types": "npm:^1.4.6" + "@devcycle/types": "npm:^1.8.0" lodash: "npm:^4.17.21" murmurhash: "npm:^2.0.0" ua-parser-js: "npm:^1.0.36" - checksum: 754e0fd14f31b3dc1801d667c4a60c445ecd428372ccab843457a20583029612d595a59e6cc740fec1f6d04c356677eeed7d8eca9d8f1ddc8b992b0a57b997f6 + checksum: ada816a5bca81b386b95c5bf88d2349862a862c6964f4589a93b8df4b819f88a941409a51cdd0ad10aed300cabb6beda88c228c9fe76583cf6bb82eccaf2751a languageName: node linkType: hard "@devcycle/js-client-sdk@file:../../../../dist/sdk/js::locator=app%40workspace%3A.": - version: 1.16.6 - resolution: "@devcycle/js-client-sdk@file:../../../../dist/sdk/js#../../../../dist/sdk/js::hash=43a538&locator=app%40workspace%3A." + version: 1.20.0 + resolution: "@devcycle/js-client-sdk@file:../../../../dist/sdk/js#../../../../dist/sdk/js::hash=0a85f4&locator=app%40workspace%3A." dependencies: - "@devcycle/types": "npm:^1.4.6" + "@devcycle/types": "npm:^1.8.0" axios: "npm:^1.0.0" axios-retry: "npm:^3.3.1" lodash: "npm:^4.17.21" ua-parser-js: "npm:^1.0.36" uuid: "npm:^8.3.2" - checksum: b7fcfa181dcacefd0da6cc57c909f5f9bf1f3c0de06a591282af0d1c1cbedee6d13ad51b9e7451eff40d73b95e6eb094e3e62ff2f610acc5105a9df5effee297 + checksum: ec32dcb52f628b46da4d3cb398281c95724a745e2abaaf78a3d622124626ab954b0fc2d5d595ef783530733d8c626126740c5abf4b955dad318a6ae2fbc8d98a languageName: node linkType: hard "@devcycle/nextjs-sdk@file:../../../../dist/sdk/nextjs::locator=app%40workspace%3A.": - version: 1.0.0 - resolution: "@devcycle/nextjs-sdk@file:../../../../dist/sdk/nextjs#../../../../dist/sdk/nextjs::hash=8e3789&locator=app%40workspace%3A." + version: 1.4.0 + resolution: "@devcycle/nextjs-sdk@file:../../../../dist/sdk/nextjs#../../../../dist/sdk/nextjs::hash=2d9f58&locator=app%40workspace%3A." dependencies: - "@devcycle/bucketing": "npm:^1.7.7" - "@devcycle/js-client-sdk": "npm:^1.16.6" - "@devcycle/react-client-sdk": "npm:^1.14.6" - "@devcycle/types": "npm:^1.4.6" + "@devcycle/bucketing": "npm:^1.11.0" + "@devcycle/js-client-sdk": "npm:^1.20.0" + "@devcycle/react-client-sdk": "npm:^1.18.0" + "@devcycle/types": "npm:^1.8.0" hoist-non-react-statics: "npm:^3.3.2" server-only: "npm:^0.0.1" - checksum: cb51ef310f1fdf42be3ca85a5e030589064c41b2f7a12ace8d6c959f6ead4bf44abd793cf7f8041481cf690c4f40111469599ab7835d9d35eb62ff3db745fb49 + checksum: 33d91407d69ac41f8c2eeb0e32dafe1d4e199634c32ed7afbcb2b2a925878bcda2e4ea6c60f67c631ec4eb23927785128e4941e014ebf3467366110251e2d275 languageName: node linkType: hard "@devcycle/react-client-sdk@file:../../../../dist/sdk/react::locator=app%40workspace%3A.": - version: 1.14.6 - resolution: "@devcycle/react-client-sdk@file:../../../../dist/sdk/react#../../../../dist/sdk/react::hash=74c96f&locator=app%40workspace%3A." + version: 1.18.0 + resolution: "@devcycle/react-client-sdk@file:../../../../dist/sdk/react#../../../../dist/sdk/react::hash=ea1ee4&locator=app%40workspace%3A." dependencies: - "@devcycle/js-client-sdk": "npm:^1.16.6" - "@devcycle/types": "npm:^1.4.6" + "@devcycle/js-client-sdk": "npm:^1.20.0" + "@devcycle/types": "npm:^1.8.0" hoist-non-react-statics: "npm:^3.3.2" peerDependencies: react: ">=16.8.0" - checksum: 5a6d1ff022225a8ab7f9571d2060ba4d494afa320544679406e26f7b83d5d96517d4ce01e03b322bfb9860dd85d945be331a69cfbcdb9e69a2e7fadaea9db20e + checksum: b130c0c487ce9f8a2e859603addf4d9c064bd648ae1e95eb69eda18d72a7257dfa7e51a625a6fe13fd4e85770a092968542d4a212bad79a0c385938f0ccbe1d6 languageName: node linkType: hard "@devcycle/types@file:../../../../dist/lib/shared/types::locator=app%40workspace%3A.": - version: 1.4.6 - resolution: "@devcycle/types@file:../../../../dist/lib/shared/types#../../../../dist/lib/shared/types::hash=9c2d1a&locator=app%40workspace%3A." + version: 1.8.0 + resolution: "@devcycle/types@file:../../../../dist/lib/shared/types#../../../../dist/lib/shared/types::hash=6360ed&locator=app%40workspace%3A." dependencies: - "@nestjs/class-validator": "npm:^0.13.4" class-transformer: "npm:0.5.1" + class-validator: "npm:0.14.1" iso-639-1: "npm:^2.1.13" lodash: "npm:^4.17.21" reflect-metadata: "npm:^0.1.13" - checksum: b220dc7f0e41efd79a28c531dac99923cd26cac506340499840f0d84d45c61a638243d757de4aa1f033bc6e8591ee9d9b9391dc444b6cc3196dd3904909dece0 - languageName: node - linkType: hard - -"@nestjs/class-validator@npm:^0.13.4": - version: 0.13.4 - resolution: "@nestjs/class-validator@npm:0.13.4" - dependencies: - libphonenumber-js: "npm:^1.9.43" - validator: "npm:^13.7.0" - checksum: 755211eb8153b8efdc845875cafa799b29341afdf3b65df39a613f1b0e6f25cec5b0c479795c2a814841b7d84b921bdbaf1f3aa3f59b0abe08dfe23ab63e68df + checksum: b1a61e6a4cd9ee3425e077bad762e9ec8e1ba8e27e1429315f8265db7406e15b9cbbb1c72923591ff7474f157d5c14ad4e664477c4c4deb06f3021d6c9549195 languageName: node linkType: hard @@ -212,6 +202,13 @@ __metadata: languageName: node linkType: hard +"@types/validator@npm:^13.11.8": + version: 13.11.8 + resolution: "@types/validator@npm:13.11.8" + checksum: 27cba3b43d79cff40c57703225944efacb9c4954379640a8f1ba29cdae07f36fc1115deed08dada9f6d7ff09f205540d04c435e27999dc1ce78d26fd3d8867a0 + languageName: node + linkType: hard + "app@workspace:.": version: 0.0.0-use.local resolution: "app@workspace:." @@ -278,6 +275,17 @@ __metadata: languageName: node linkType: hard +"class-validator@npm:0.14.1": + version: 0.14.1 + resolution: "class-validator@npm:0.14.1" + dependencies: + "@types/validator": "npm:^13.11.8" + libphonenumber-js: "npm:^1.10.53" + validator: "npm:^13.9.0" + checksum: 0c34592a1cbdd5e9c35cd02f4babd94120339e875fc7627aa2bf5dffb45ecc373275e854389c6ff3d39781cddb85a18193b4e9e8f4d77d6d90e445fd0b8b8e11 + languageName: node + linkType: hard + "client-only@npm:0.0.1": version: 0.0.1 resolution: "client-only@npm:0.0.1" @@ -366,10 +374,10 @@ __metadata: languageName: node linkType: hard -"libphonenumber-js@npm:^1.9.43": - version: 1.10.53 - resolution: "libphonenumber-js@npm:1.10.53" - checksum: 206a324c064572741ec2a949cddd2d36ada2da0e54889dbf67fe525e17a66cdfffd6deaaff773133bfae9aed4359bb7dd41bfee77cb620abe5c788ff2726db47 +"libphonenumber-js@npm:^1.10.53": + version: 1.10.54 + resolution: "libphonenumber-js@npm:1.10.54" + checksum: 29b0826d3fe3de6c9ea2c58a5acac5e30220c560486a3e5fc8c8907b42094f7ff50191a60679177828cca7b008ce3d5c97f3f55b03920babf444d7ccadbbdcc8 languageName: node linkType: hard @@ -641,7 +649,7 @@ __metadata: languageName: node linkType: hard -"validator@npm:^13.7.0": +"validator@npm:^13.9.0": version: 13.11.0 resolution: "validator@npm:13.11.0" checksum: 4bf094641eb71729c06a42d669840e7189597ba655a8264adabac9bf03f95cd6fde5fbc894b0a13ee861bd4a852f56d2afdc9391aeaeb3fc0f9633a974140e12 diff --git a/examples/react/react-native-app/package.json b/examples/react/react-native-app/package.json index 6b0ba8d87..be67dec67 100644 --- a/examples/react/react-native-app/package.json +++ b/examples/react/react-native-app/package.json @@ -4,7 +4,6 @@ "private": true, "dependencies": { "@babel/plugin-proposal-decorators": "*", - "@nestjs/class-validator": "*", "@react-native-async-storage/async-storage": "*", "@react-native/metro-config": "0.72.11", "@testing-library/jest-dom": "*", @@ -13,6 +12,7 @@ "axios": "*", "axios-retry": "*", "class-transformer": "*", + "class-validator": "*", "hoist-non-react-statics": "*", "iso-639-1": "*", "jest-mock": "*", diff --git a/lib/shared/types/__tests__/clientSDKAPI.test.ts b/lib/shared/types/__tests__/clientSDKAPI.test.ts index ac3d37084..2360cce12 100644 --- a/lib/shared/types/__tests__/clientSDKAPI.test.ts +++ b/lib/shared/types/__tests__/clientSDKAPI.test.ts @@ -1,6 +1,6 @@ import { plainToInstance } from 'class-transformer' import { DVCAPIUser } from '../src/types/apis/sdk/clientSDKAPI' -import { validate } from '@nestjs/class-validator' +import { validate } from 'class-validator' const date = new Date() const testUserData = { diff --git a/lib/shared/types/package.json b/lib/shared/types/package.json index 43c4cd12d..b1554e4d9 100644 --- a/lib/shared/types/package.json +++ b/lib/shared/types/package.json @@ -12,8 +12,8 @@ } }, "dependencies": { - "@nestjs/class-validator": "^0.13.4", "class-transformer": "0.5.1", + "class-validator": "0.14.1", "iso-639-1": "^2.1.13", "lodash": "^4.17.21", "reflect-metadata": "^0.1.13" diff --git a/lib/shared/types/src/types/apis/events/eventsAPI.ts b/lib/shared/types/src/types/apis/events/eventsAPI.ts index 2d569dd09..a150d0cad 100644 --- a/lib/shared/types/src/types/apis/events/eventsAPI.ts +++ b/lib/shared/types/src/types/apis/events/eventsAPI.ts @@ -1,9 +1,4 @@ -import { - IsNotEmpty, - IsNumber, - IsOptional, - IsString, -} from '@nestjs/class-validator' +import { IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator' import { DVCAPIUser } from '../sdk/clientSDKAPI' import 'reflect-metadata' diff --git a/lib/shared/types/src/types/apis/sdk/clientSDKAPI.ts b/lib/shared/types/src/types/apis/sdk/clientSDKAPI.ts index 223514b70..15e22d4d0 100644 --- a/lib/shared/types/src/types/apis/sdk/clientSDKAPI.ts +++ b/lib/shared/types/src/types/apis/sdk/clientSDKAPI.ts @@ -15,7 +15,7 @@ import { IsIn, IsNotEmpty, IsISO31661Alpha2, -} from '@nestjs/class-validator' +} from 'class-validator' import { Transform, Type } from 'class-transformer' import 'reflect-metadata' import { IsDVCCustomDataJSONObject } from '../../validators/dvcCustomDataJSON' diff --git a/lib/shared/types/src/types/apis/sdk/track.ts b/lib/shared/types/src/types/apis/sdk/track.ts index 3b7693e35..a9b7d7a77 100644 --- a/lib/shared/types/src/types/apis/sdk/track.ts +++ b/lib/shared/types/src/types/apis/sdk/track.ts @@ -7,7 +7,7 @@ import { IsOptional, IsString, ValidateNested, -} from '@nestjs/class-validator' +} from 'class-validator' import { Type } from 'class-transformer' /** diff --git a/lib/shared/types/src/types/validators/dvcCustomDataJSON.ts b/lib/shared/types/src/types/validators/dvcCustomDataJSON.ts index ad0bd8b39..a4efcc6f6 100644 --- a/lib/shared/types/src/types/validators/dvcCustomDataJSON.ts +++ b/lib/shared/types/src/types/validators/dvcCustomDataJSON.ts @@ -4,7 +4,7 @@ import isBoolean from 'lodash/isBoolean' import isPlainObject from 'lodash/isPlainObject' import isNull from 'lodash/isNull' import isUndefined from 'lodash/isUndefined' -import { registerDecorator, ValidationOptions } from '@nestjs/class-validator' +import { registerDecorator, ValidationOptions } from 'class-validator' /** * Validates that JSON Object is a valid JSON Object with only diff --git a/lib/shared/types/src/types/validators/isIso6391.ts b/lib/shared/types/src/types/validators/isIso6391.ts index c5056ab52..e70a027ab 100644 --- a/lib/shared/types/src/types/validators/isIso6391.ts +++ b/lib/shared/types/src/types/validators/isIso6391.ts @@ -1,8 +1,4 @@ -import { - ValidationOptions, - ValidateBy, - buildMessage, -} from '@nestjs/class-validator' +import { ValidationOptions, ValidateBy, buildMessage } from 'class-validator' import ISO6391 from 'iso-639-1' export const IS_ISO6391 = 'isISO6391' diff --git a/lib/shared/types/src/types/validators/isNotBlank.ts b/lib/shared/types/src/types/validators/isNotBlank.ts index 3324d6c74..c399315ea 100644 --- a/lib/shared/types/src/types/validators/isNotBlank.ts +++ b/lib/shared/types/src/types/validators/isNotBlank.ts @@ -1,4 +1,4 @@ -import { registerDecorator, ValidationOptions } from '@nestjs/class-validator' +import { registerDecorator, ValidationOptions } from 'class-validator' /** * Validates that string is not filled with spaces diff --git a/package.json b/package.json index 51d211129..2a14006ee 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "affected:e2e": "nx affected --base=origin/main --head=HEAD --target=e2e", "npm-publish": "nx affected --base=origin/main~1 --target=npm-publish", "prettier:format": "yarn prettier --write .", + "build": "nx build", "start": "nx serve", "lerna:version": "scripts/lerna-version.sh", "local-registry": "./scripts/local-registry.sh", @@ -28,7 +29,6 @@ "dependencies": { "@altack/nx-bundlefy": "^0.16.0", "@devcycle/assemblyscript-json": "^2.0.0", - "@nestjs/class-validator": "^0.13.4", "@openfeature/core": "^0.0.24", "@openfeature/server-sdk": "^1.10.0", "@openfeature/web-sdk": "^0.4.11", @@ -38,6 +38,7 @@ "axios-retry": "^3.3.1", "bootstrap": "5.1.3", "class-transformer": "0.5.1", + "class-validator": "^0.14.1", "core-js": "^3.6.5", "cross-fetch": "^3.1.8", "eslint-plugin-lodash": "^7.4.0", diff --git a/yarn.lock b/yarn.lock index 2a56b961a..1a8e765f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5275,8 +5275,8 @@ __metadata: version: 0.0.0-use.local resolution: "@devcycle/types@workspace:lib/shared/types" dependencies: - "@nestjs/class-validator": ^0.13.4 class-transformer: 0.5.1 + class-validator: 0.14.1 iso-639-1: ^2.1.13 lodash: ^4.17.21 reflect-metadata: ^0.1.13 @@ -7633,16 +7633,6 @@ __metadata: languageName: node linkType: hard -"@nestjs/class-validator@npm:*, @nestjs/class-validator@npm:^0.13.4": - version: 0.13.4 - resolution: "@nestjs/class-validator@npm:0.13.4" - dependencies: - libphonenumber-js: ^1.9.43 - validator: ^13.7.0 - checksum: 375f3a699ff4d4c801613df3968e13aad29bbca40955f085327f332a055777a3b048fa048c4b9813ced21fc8b501faa62e9a5cfaecc1bf2fb7d6aba2e0b821cc - languageName: node - linkType: hard - "@next/env@npm:14.0.0": version: 14.0.0 resolution: "@next/env@npm:14.0.0" @@ -11159,6 +11149,13 @@ __metadata: languageName: node linkType: hard +"@types/validator@npm:^13.11.8": + version: 13.11.8 + resolution: "@types/validator@npm:13.11.8" + checksum: 9e8e8a0e95c3acac60e740d10729076e810350a5975523560c0232bb3c414f381fb7f246405fda3454db694fa5a1c0f00d7e9070023a078abee036b8d7b67770 + languageName: node + linkType: hard + "@types/warning@npm:^3.0.0": version: 3.0.0 resolution: "@types/warning@npm:3.0.0" @@ -14009,6 +14006,17 @@ __metadata: languageName: node linkType: hard +"class-validator@npm:*, class-validator@npm:0.14.1, class-validator@npm:^0.14.1": + version: 0.14.1 + resolution: "class-validator@npm:0.14.1" + dependencies: + "@types/validator": ^13.11.8 + libphonenumber-js: ^1.10.53 + validator: ^13.9.0 + checksum: bea808145c81ba3b185e1174d92f97a2d6ffef0558261217042552e9027222eadb9a9731a4418a07eaaa72ac334347df7a1079ff48eaadaa3ee6848a6a88995c + languageName: node + linkType: hard + "classnames@npm:^2.3.1": version: 2.3.1 resolution: "classnames@npm:2.3.1" @@ -15697,7 +15705,6 @@ __metadata: "@commitlint/cli": ^16.2.3 "@commitlint/config-conventional": ^18.6.0 "@devcycle/assemblyscript-json": ^2.0.0 - "@nestjs/class-validator": ^0.13.4 "@nrwl/js": 16.10.0 "@nrwl/rollup": 16.10.0 "@nx/cypress": 16.10.0 @@ -15757,6 +15764,7 @@ __metadata: babel-jest: 29.4.3 bootstrap: 5.1.3 class-transformer: 0.5.1 + class-validator: ^0.14.1 core-js: ^3.6.5 cross-env: ^7.0.3 cross-fetch: ^3.1.8 @@ -17499,7 +17507,6 @@ __metadata: resolution: "example-react-native-app@workspace:examples/react/react-native-app" dependencies: "@babel/plugin-proposal-decorators": "*" - "@nestjs/class-validator": "*" "@react-native-async-storage/async-storage": "*" "@react-native/metro-config": 0.72.11 "@testing-library/jest-dom": "*" @@ -17508,6 +17515,7 @@ __metadata: axios: "*" axios-retry: "*" class-transformer: "*" + class-validator: "*" hoist-non-react-statics: "*" iso-639-1: "*" jest-mock: "*" @@ -22746,10 +22754,10 @@ __metadata: languageName: node linkType: hard -"libphonenumber-js@npm:^1.9.43": - version: 1.9.53 - resolution: "libphonenumber-js@npm:1.9.53" - checksum: 36eb4078fbfb2c1f43b6af7709c13d41776396fb3358c6dd5d7177105c296bafe9a9afa891b95f77d484e40200b40b09df3acc49a08a96390cf092c426d5a428 +"libphonenumber-js@npm:^1.10.53": + version: 1.10.54 + resolution: "libphonenumber-js@npm:1.10.54" + checksum: 248483404b6972eb812fce92398c46723debd3e3121b3e5e906c0b2f693dc095c490c566e8b37f6e4d563cd6874ccd41dd5120ca9297b3d232f3a39646f6fce8 languageName: node linkType: hard @@ -32168,7 +32176,7 @@ __metadata: languageName: node linkType: hard -"validator@npm:13.11.0": +"validator@npm:13.11.0, validator@npm:^13.9.0": version: 13.11.0 resolution: "validator@npm:13.11.0" checksum: d1e0c27022681420756da25bc03eb08d5f0c66fb008f8ff02ebc95812b77c6be6e03d3bd05cf80ca702e23eeb73dadd66b4b3683173ea2a0bc7cc72820bee131 @@ -32182,13 +32190,6 @@ __metadata: languageName: node linkType: hard -"validator@npm:^13.7.0": - version: 13.7.0 - resolution: "validator@npm:13.7.0" - checksum: 2b83283de1222ca549a7ef57f46e8d49c6669213348db78b7045bce36a3b5843ff1e9f709ebf74574e06223461ee1f264f8cc9a26a0060a79a27de079d8286ef - languageName: node - linkType: hard - "vary@npm:^1, vary@npm:~1.1.2": version: 1.1.2 resolution: "vary@npm:1.1.2"