descope / angular-sdk

Angular library used to integrate with Descope (Deprecated)
https://github.com/descope/descope-js/tree/main/packages/sdks/angular-sdk
MIT License
25 stars 1 forks source link

Dependency Tree #132

Open joeskeen opened 3 months ago

joeskeen commented 3 months ago

I just tried installing and using the @descope/angular-sdk in my project. When building the project, I got several build errors about missing modules/packages. I am building in a PNPM workspace, so it tries hard to not pull in unnecessary dependencies (as many packages really do come with a lot of bloat).

tl;dr in order to get my project to build after adding the Descope Angular SDK, I had to install the following packages:

    "@descope/access-key-management-widget": "^0.1.83",
    "@descope/angular-sdk": "^0.5.10",
    "@descope/audit-management-widget": "^0.1.46",
    "@descope/core-js-sdk": "^2.18.2",
    "@descope/role-management-widget": "^0.1.81",
    "@descope/sdk-component-drivers": "^0.2.23",
    "@descope/sdk-helpers": "^0.1.42",
    "@descope/sdk-mixins": "^0.2.27",
    "@descope/user-management-widget": "^0.4.84",
    "@descope/user-profile-widget": "^0.0.54",
    "@descope/web-component": "^3.15.2",
    "@descope/web-js-sdk": "^1.11.15",
    "@fingerprintjs/fingerprintjs-pro": "^3.9.8",
    "@reduxjs/toolkit": "^2.2.5",
    "immer": "^10.1.1",
    "js-cookie": "^3.0.5",
    "jwt-decode": "3.1.2",
    "libphonenumber-js": "^1.11.3",
    "redux": "^5.0.1",
    "redux-thunk": "^3.1.0",
    "reselect": "^5.1.1",

That is a pretty big list. Even though Angular apps tend to have a ton of @angular/ dependencies, this nearly doubled my dependency list. Is there any chance that not every single one of these are necessary? Also, it would be nice to add "peerDependencies" to the package.json file instead of "dependencies" as tools (NPM, PNPM) can warn of unresolved peer dependencies during install.

asafshen commented 3 months ago

hey @joeskeen ,thanks for reporting this issue

those packages you described above are dependencies of @descope/angular-sdk packages, but the package manager (such as pnpm) should resolve them for you when you install this pacakge, from my understanding - this does not happen for you? in other words, you need to install those pacakges manually?

few followup questions, can you please elaborate more about how the project is built, and how it uses @descope/angular-sdk? more specifically