-
Notifications
You must be signed in to change notification settings - Fork 17
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(javascript): dependency imports and low-level init #3596
Conversation
✔️ Code generated!
📊 Benchmark resultsBenchmarks performed on the method using a mock server, the results might not reflect the real-world performance.
|
@@ -276,6 +276,7 @@ export function buildConfigs(pkg) { | |||
}), | |||
nodeResolve({ | |||
preferBuiltins: true, | |||
browser: isUmdBuild || isEsmBrowserBuild, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see https://www.npmjs.com/package/@rollup/plugin-node-resolve#browser, I should've set that way before D:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok it's not fully working
...initOptions.options, | ||
...initOptions, | ||
}); | ||
return recommendClient(initOptions.appId || appId, initOptions.apiKey ||apiKey, initOptions.options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is redundant and I think was legacy, now that standalone clients checks it, we don't need it here
d953385
to
85dec20
Compare
85dec20
to
5204d8d
Compare
5204d8d
to
16c752d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
…ated) [skip ci] Co-authored-by: Clément Vannicatte <[email protected]>
algolia/api-clients-automation#3596 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
🧭 What and Why
🎟 JIRA Ticket: https://algolia.atlassian.net/browse/DI-2828
Changes included:
closes algolia/algoliasearch-client-javascript#1538
we import from the src of the dependency which is fine in the monorepo context, but the path isn't correct when importing from the built package
we actually don't need the low level init method, we can just use the regular instance and spread it, it should behave the same