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

feat: Split library in to framework and primitives sub-packages #42

Merged
merged 62 commits into from Nov 28, 2023

Conversation

morgsmccauley
Copy link
Collaborator

@morgsmccauley morgsmccauley commented Nov 16, 2023

This PR merges dev-1.1 in to main, the major change in this being the splitting of the core library in to sub-packages, @near-lake/framework and @near-lake/primitives.

I've merged main back in to this branch to make them compatible. This included #28, which has been slightly modified to fit the new package structure.

I've also updated the main README.md to highlight this package split.

After this is merged, I'll add the Changesets Action to automate package releases :)

roshaans and others added 30 commits January 24, 2023 09:16
Co-authored-by: Morgan McCauley <morgan@mccauley.co.nz>
Build: update to monorepo + use turborepo
roshaans and others added 17 commits February 1, 2023 10:03
…rimitives

feat: port rust indexer primitives to JS
Beta Release Of Packages + renaming packages
fix: Ensure `primitives` is installed when installing `framework`
* add README

* add dependency explaination

* Update packages/near-lake-framework/README.md

Co-authored-by: Roshaan Siddiqui <siddiqui.roshaan@gmail.com>

* Update packages/near-lake-framework/README.md

Co-authored-by: Roshaan Siddiqui <siddiqui.roshaan@gmail.com>

* Update README.md

Remove Events interface spec

* Update packages/near-lake-framework/README.md

Co-authored-by: Bohdan Khorolets <bogdan@khorolets.com>

* Update packages/near-lake-framework/README.md

Co-authored-by: Bohdan Khorolets <bogdan@khorolets.com>

---------

Co-authored-by: Roshaan Siddiqui <siddiqui.roshaan@gmail.com>
Co-authored-by: Bohdan Khorolets <bogdan@khorolets.com>
* add README

* add Receipt section

* Event section

* add StateChange section

* Update README.md

Remove executed receipts private field

* Update README.md

Remove private explanation from Block

* Apply suggestions from code review

Co-authored-by: Roshaan Siddiqui <siddiqui.roshaan@gmail.com>

* Update README.md

Add Read More on trx section note

* add event interface spec

* Update packages/near-lake-primitives/README.md

Co-authored-by: Bohdan Khorolets <bogdan@khorolets.com>

* Update README.md

* Update README.md

add missing return types

* Update README.md

add return type for from constructor

---------

Co-authored-by: Roshaan Siddiqui <siddiqui.roshaan@gmail.com>
Co-authored-by: Bohdan Khorolets <bogdan@khorolets.com>
feat: can fetch logs from a block
* typedocs

---------

Co-authored-by: Roshaan Siddiqui <siddiqui.roshaan@gmail.com>
* fix: Current version of `turbo` breaks `npm i` in GitHub Actions

* chore: Remove `postinstall` hook to unblock GH action
@morgsmccauley morgsmccauley changed the title Merge dev-1.1 in to main feat: Split library in to framework and primitives sub-packages Nov 16, 2023
@morgsmccauley morgsmccauley linked an issue Nov 16, 2023 that may be closed by this pull request
Copy link
Contributor

@roshaans roshaans left a comment

Choose a reason for hiding this comment

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

Overall looks good to me, but I have not been able to successfully build this package on my machine yet.

},
"dependencies": {
"@aws-sdk/client-s3": "^3.32.0",
"@near-lake/primitives": "^0.1.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we change this to file../near-lake-primitives now that this will be published in the main package?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is the error I get when I try to run npm run build from the root directory:

@near-lake/framework:build: src/types.ts(3,53): error TS2307: Cannot find module '@near-lake/prim
itives' or its corresponding type declarations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The NPM entry point was incorrect, I've pushed a fix. Can you please try rebuild?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should we change this to file../near-lake-primitives now that this will be published in the main package?

NPM will use the local package if the versions align. It's better to keep it locked at a specific version so we can work on them independently, i.e. we might make changes to primitives which aren't yet ready to be merged in to framework. Using file wouldn't allow us to choose when to upgrade.

@roshaans roshaans self-requested a review November 28, 2023 19:33
Copy link
Contributor

@roshaans roshaans left a comment

Choose a reason for hiding this comment

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

LGTM! Able to build the package successfully.

@morgsmccauley morgsmccauley merged commit cab772c into main Nov 28, 2023
4 of 6 checks passed
@morgsmccauley morgsmccauley deleted the dev-1.1 branch November 28, 2023 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge dev-1.1 branch
4 participants