-
Notifications
You must be signed in to change notification settings - Fork 310
feat: Stacks monorepo refactor #807
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
|
Code code reports are failing to upload. See report only showing files from old repo structure: https://codecov.io/gh/blockstack/blockstack.js/tree/ce733d62f720db6d59247453bf3bb2942bcb7446/src The codecov upload script failure can be seen here: https://app.circleci.com/pipelines/github/blockstack/blockstack.js/125/workflows/f82b3bcb-d12c-4203-a9bd-ecf505ea9237/jobs/2087 It looks like coverage reports are found and uploaded for an initial set of repos, but last step fails and seems to upload an empty report? Not sure. |
packages/auth/package.json
Outdated
| "module": "dist/index.esm.js", | ||
| "typings": "dist/auth/src/index.d.ts", | ||
| "umd:main": "dist/auth.umd.production.js", | ||
| "unpkg": "dist/auth.cjs.production.min.js" |
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.
Shouldn't unpkg point to umd builds?
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.
It looks like publishing from lerna updates this value automatically. Not sure where this is configured, we might have to update manually.
| "@stacks/transactions": ["../../transactions/src"] | ||
| } | ||
| }, | ||
| "include": ["src/**/*", "tests/**/*"] |
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 think this tsconfig would result in test files being output in the /dist directory and being published within the npm package.
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.
That doesn't seem to be the case, I wasn't able to find test files in the published packages.
Change buffer to string encoding to Hex
feat(transactions): export cvToHex, hexToCV, parseReadOnlyResponse
Fix cloned broadcast response causing issues in dev tools
feat: builder for unsigned contract call
|
@yknl are we still generating reference docs with typedoc (or any other tool)? |
Yes, still using typedoc. See the latest pushed commit. |
zone117x
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.
Haven't had a chance to test out the new dev setup myself yet, but project structure and code looks good to me. Great work @yknl!
This PR splits blockstack.js into multiple NPM packages hosted from a single GitHub monorepo. See original proposal on the forum: https://forum.blockstack.org/t/stacks-mono-repo-rfc/11017
The following functionality have been removed and will be superceded by Stacks 2.0 compatible libraries/packages in this repo.
New packages
Auth - @stacks/auth
A package that contains all functions relating to authentication. The API has been updated to support new implementations of authenticators and Connect. Functions depending on a legacy Blockstack browser have been dropped in favour of Connect.
Storage - @stacks/storage
Storage functions have been separated from auth and the UserSession class. In order to use storage, you should import the
Storageclass from the package and create an instance of it using a validUserSessionobject.Common - @stacks/common
Utility functionality shared by packages in this monorepo have been moved to a new common package. Developers shouldn't need to include this package directly.
Profile - @stacks/profile
API used by authenticators to manipulate user profiles on BNS have been moved to this package. Social proofs are fully deprecated.
Encryption - @stacks/encryption
Common encryption functions used across the platform.
Keychain - @stacks/keychain
This package exposes the identity, key management functions. Moved from https://github.com/blockstack/ux/tree/master/packages/keychain
Transaction - @stacks/transaction
This package contains methods used to construct all types of transactions for Stacks 2.0. Migrated from https://github.com/blockstack/stacks-transactions-js
Network - @stacks/network
This package contains network functions for Stacks 2.0.
CLI - @stacks/cli
The Stacks 2.0 CLI tool. Used to create/broadcast Stacks 2.0 transactions from the command line. Moved from: stacks-archive/cli-blockstack#40
Additional Review Notes
Build instructions
lerna bootstraplerna run buildTests
All tests have been migrated to jest for consistency. Many of the tests were updated to use jest mock and jest-fetch-mock.