-
Notifications
You must be signed in to change notification settings - Fork 11
refactor: split into multiple packages + TS rewrite #137
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
Conversation
e09168b to
957e3e6
Compare
b457e4e to
fe7d57b
Compare
I guess this decision also depends on the overall strategy for the naming of our open source NPM packages. For example, to say we're going to use What do you think? |
|
So I managed to make the tests work with node < 15 too, and have some concrete points on what is needed for what.
Will focus on the linting and publishing setup now. Also planning to make the readme much more verbose, adding info about how to add new package, where to put dev deps, etc. |
|
@jancurn We already had this discussion and figured that generic packages don't really take off unless someone spends non-trivial time marketing them. And since we neither want to market the packages nor keep up with potential community feature requests, we decided to just place them all under |
|
Added contributing guide and implemented automatic releasing via lerna. Should be mostly ready for review, I have only few small ideas where to improve (namely precommit hook to check the commit message format). Few words about the releasing:
Might be worth to split the Lastly, I managed to make the NPM 7 workspaces work, so there is only one (root) lock file. This means that NPM 7 is needed to install the project locally. |
mnmkng
left a comment
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.
I did not really read the code, because the tests are passing and it would take me a week. But I don't think that's a problem, because the packages are completely new, so a manual migration is needed anyway. Just commented on some nitpicks and typos.
|
Looking at the
Thoughts? |
|
@mtrunkat @jbartadev @gippy @jancurn any thoughts on those? |
|
There are more candidates to be moved to
(
Not sure, probably not. It's a separate method, it is used only in
Does it matter? We are talking about moving the code to different package, it will still be somewhere.
Ok will inline it then, at least for now. |
|
There is also Sounds like another things that should go to the |
I'm not saying we should not do it. I'm just saying we should have an idea about the usage first. But yeah, It would be worth it to pull at least the |
|
The |
|
Looking at the https://nodejs.org/api/crypto.html#crypto_class_hmac It was like that originally, but changed in favour of the 3rd party package here: But no reasoning behind it in the commit message 😢 Apparently the 3rd party one is browser ready? Maybe we should have a separate package for browser code so we have clear separation of what can use node API's and what not? edit: just for reference, the 3rd party one is also quite fat: edit2: looks like it is also used in the browser context: https://github.com/apify/apify-core/search?q=ImageProxyClient But it seems weird, as the class also uses |
|
Lol, (yes, of course we have that pulled in everywhere, like in the SDK and all its dependents) For comparison, here is |
|
Managed to replace Or maybe the |
|
Added summary of what changed with regards to the monorepo redesign and automatic publishing into the repo wiki: https://github.com/apify/apify-shared-js/wiki/The-monorepo-rewrite-story |
|
@B4nan Can I merge this? |
|
We need to add the personal access token to secrets first (with write permissions as it will be used for commiting to the repo). Should be called Ideally we should use some service account for that, I think I saw one recently in one of the repositories. |
Packages:
@apify/consts@apify/datastructures@apify/git@apify/hubspot_client@apify/image_proxy_client@apify/input_schema@apify/log@apify/markdown@apify/salesforce_client@apify/utilitiesOther notable changes:
anyin some places, mainly salesforce and hubspot clients)logwhere we keep the default export for logger instanceunderscorefrom most of the packages (except salesforce/hubspot clients)startsWithpolyfill andnewPromiseandrequestPromisedmethodstruncatemethod is duplicated so thelogpackage does not depend onutilities(as those bring a lot of 3rd party deps)Closes #131
Closes #95
BREAKING CHANGE:
apify-sharedpackage is now gone in favour of new@apify/*packagesstartsWithpolyfill andnewPromiseandrequestPromisedmethods