-
Notifications
You must be signed in to change notification settings - Fork 659
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
Monorepo structure #745
Merged
Merged
Monorepo structure #745
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* created @slack/logger package to share logging code in @slack/web-api and @slack/rtm-api (and potentially more) * created @slack/types package to share types that are reusable shapes * breaking changes to error codes - removed unused error codes (one in web-api and one in rtm-api). also rewrote all the strings stored in those constants * non breaking changes to error codes - added more codes for rtm-api * added a VSCode workspace with a folder for each package and one for the root * go back to using npm script prepare for build, prepublishOnly was not the right behavior * make sire build is executed before test in npm scripts * TLSOptions is now based on a type from @types/node instead of copy/pasted
* temporarily disables running on integration test in @slack/web-api, we likely need to do these tests in a lerna managed package so that installation doesn't fail. * removes p-is-promise unecessary development dependency * updates tests for minor differences
the strategy is to use a combination of environment variables with lerna's scope argument to get individual builds for each package. this depends on each package naming its scripts precisely the same thing for certain operations: test, lint, and coverage. notably, its okay for a script to be missing because lerna run will handle only dispatching to packages where the script is defined.
…ck SDK and more template cleanup
aoberoi
force-pushed
the
lernafy
branch
4 times, most recently
from
March 22, 2019 16:54
03a7c87
to
939cae2
Compare
improve styles on documentation site to fix the header, tweak the in-page styles, build an in-document focussed navigation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
We're moving to a monorepo for v5 🎉!
This PR isn't yet complete, but when it is, it will accomplish the following:
Create individual packages for the
WebClient
(@slack/web-api
),RTMClient
(@slack/rtm-api
), andIncomingWebhook
(@slack/webhook
) classes from this package.Recreate
@slack/client
as a thin wrapper for the packages in the previous point, preserving the exports where possible. This means that breaking changes from v4 to v5 obviously will impact the exports, but you should be able to find the same things in the same place. As far as what's not possible, there's only one detail that cannot be unified: in a TypeScript project, theErrorCode
export will not be an enum, but instead a value (not in the type namespace).Import the
@slack/events-api
and@slack/interactive-messages
packages to live alongside the packages in this new monorepo structure.Extract
@slack/logger
and@slack/types
into independent packages for reuse. These are mainly expected to be used by the previously mentioned packages, but are also available to anyone who finds them useful.Refactor documentation generation workflow and structure to include documentation for each individual package. Each package should also have its own
README.md
that describes its usage at a high level. The overall Getting Started tutorial should remain about the same, and we likely need to build new tutorials for the new packages in the future.Revise documentation for references to old package names. Host the migration guide for v4 -> v5 in the documentation site and the GitHub Wiki.
Implement a combined CI workflow (Travis) that reports results for each individual package as an item in the test matrix. We will also need combined coverage reporting (Codecov).
Produce an updated maintainers guide for all the common workflows. This should include new information around how changelogs are published, new tag naming conventions, etc. There may need to be new documentation specific to managing the monorepo and some of the decisions that were put into this structure (thinking a high level philosophy and an FAQ). These materials are very important for continued collaboration with the community as well as onboarding new maintainers.Update maintainers guide for mono repo structure #748Move examples from each of the packages into their own top-level directory calledAdd examples to monorepo #747examples
. Use lerna to manage each example as a package.Utilize the
addAppMetadata()
hook of the@slack/web-api
package from the@slack/rtm-api
package, so that we can continue to get information regarding the tools from theUser-Agent
header. Also addUser-Agent
header toIncomingWebhook
, since its now independent.Update issue template(s) to ask the reporter which package(s) their issue concerns. In the case of bug reports, this is especially important, since it changes how they answer the question regarding versions.Update issue templates and labels for monorepo #749Other items that must be completed before this change can be shipped:
Close out any open issues and PRs inAvailability of Node Slack SDK v5 (timeline for end of support on v4) #689@slack/events-api
and@slack/interactive-messages
, recreate them in this repo with a reference link, and then archive those repos.Update the labels in this repo to include package labels, and apply them to issues.Update issue templates and labels for monorepo #749ReimplementNot sure if we want this anymore.husky
pre-commit hook (it was removed for simplicity of the package decomposition). This can be done after there's a way to invoke testing and linting across the all the packages, instead of just at the package level.Create tags, and associated Github releases for each release fromAvailability of Node Slack SDK v5 (timeline for end of support on v4) #689@slack/events-api
and@slack/interactive-messages
.(The list above 👆 might also grow and contract before this PR merges.)
Fixes #677
Fixes #738
Fixes #742
Requirements (place an
x
in each[ ]
)