Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(js): Remove @novu/shared dependency #6906

Merged
merged 4 commits into from
Dec 3, 2024
Merged

Conversation

SokratisVidros
Copy link
Contributor

What changed? Why was the change needed?

Clone HTTP client from @novu/client to remove all @novu/shared leakages in @novu/js

Copy link

netlify bot commented Nov 8, 2024

Deploy Preview for novu-stg-vite-dashboard-poc ready!

Name Link
🔨 Latest commit b1ef2fb
🔍 Latest deploy log https://app.netlify.com/sites/novu-stg-vite-dashboard-poc/deploys/674a31f23ba2750008309567
😎 Deploy Preview https://deploy-preview-6906.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

packages/js/src/novu.test.ts Dismissed Show dismissed Hide dismissed
Copy link

pkg-pr-new bot commented Nov 11, 2024

Open in Stackblitz

@novu/client

npm i https://pkg.pr.new/novuhq/novu/@novu/client@6906

@novu/framework

npm i https://pkg.pr.new/novuhq/novu/@novu/framework@6906

@novu/js

npm i https://pkg.pr.new/novuhq/novu/@novu/js@6906

@novu/nest

npm i https://pkg.pr.new/novuhq/novu/@novu/nest@6906

@novu/headless

npm i https://pkg.pr.new/novuhq/novu/@novu/headless@6906

@novu/nextjs

npm i https://pkg.pr.new/novuhq/novu/@novu/nextjs@6906

@novu/node

npm i https://pkg.pr.new/novuhq/novu/@novu/node@6906

@novu/notification-center

npm i https://pkg.pr.new/novuhq/novu/@novu/notification-center@6906

novu

npm i https://pkg.pr.new/novuhq/novu@6906

@novu/providers

npm i https://pkg.pr.new/novuhq/novu/@novu/providers@6906

@novu/react

npm i https://pkg.pr.new/novuhq/novu/@novu/react@6906

@novu/react-native

npm i https://pkg.pr.new/novuhq/novu/@novu/react-native@6906

@novu/shared

npm i https://pkg.pr.new/novuhq/novu/@novu/shared@6906

@novu/stateless

npm i https://pkg.pr.new/novuhq/novu/@novu/stateless@6906

commit: b94d38c

@@ -32,7 +26,6 @@ export class Novu implements Pick<NovuEventEmitter, 'on'> {
constructor(options: NovuOptions) {
this.#inboxService = new InboxService({
backendUrl: options.backendUrl ?? PRODUCTION_BACKEND_URL,
userAgent: options.__userAgent ?? userAgent,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for useragent analytics from @novu/react and other packages

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I will add it back.

@jainpawan21
Copy link
Member

jainpawan21 commented Nov 26, 2024

@SokratisVidros

Is this PR ready to review?

Copy link

netlify bot commented Nov 29, 2024

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit b94d38c
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/674efed1619db50008099171
😎 Deploy Preview https://deploy-preview-6906.dashboard.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 29, 2024

Deploy Preview for dashboard-v2-novu-staging ready!

Name Link
🔨 Latest commit b94d38c
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/674efed1a9a0360008080408
😎 Deploy Preview https://deploy-preview-6906.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@SokratisVidros
Copy link
Contributor Author

@SokratisVidros

Is this PR ready to review?

Yes it is now.

});

describe('lazy session initialization', () => {
test('should call the queued notifications.list after the session is initialized', async () => {
describe('http client', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please add your tests separately? because the previous ones were covering lazy session initialization and queueing

expect(data).toEqual({
notifications: mockNotificationsResponse.data,
hasMore: mockNotificationsResponse.hasMore,
filter: mockNotificationsResponse.filter,
});
});

test('should reject the queued notifications.list if session initialization fails', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we removed these two?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved these tests to the BaseModule. Did I miss anything?

Copy link
Contributor Author

@SokratisVidros SokratisVidros Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I missed to push the new file 😮‍💨

- project: @novu/node 2.0.5
Clone HTTP client from @novu/client to remove all @novu/shared leakages in @novu/js
Note that the global monorepo eslint runs on each package.
@SokratisVidros SokratisVidros merged commit 8a23520 into next Dec 3, 2024
45 checks passed
@SokratisVidros SokratisVidros deleted the remove_shared_from_js branch December 3, 2024 15:08
scopsy added a commit that referenced this pull request Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants