Skip to content

Create umbruella package#27

Merged
jeffersonBastos merged 2 commits into
bleu/refactorfrom
jefferson/cow-480-create-umbruella-package
Jun 26, 2025
Merged

Create umbruella package#27
jeffersonBastos merged 2 commits into
bleu/refactorfrom
jefferson/cow-480-create-umbruella-package

Conversation

@jeffersonBastos
Copy link
Copy Markdown

This PR introduces the umbrella package to simplify SDK usage and centralize the initialization of all packages.

It provides a unified entry point, similar to the CowSdk, giving users streamlined access to all modules through a single interface.

alfetopito and others added 2 commits June 18, 2025 06:55
…eed up base branch sync (cowprotocol#354)

* chore: switch to pnpm and update Node.js to v20

* chore: reorganize project structure under packages/cow-sdk

* feat: init monorepo structure with Turborepo

* chore: format codebase with pnpm script

* chore: eslint config.

* chore: update lint config, .npmrc, and VSCode settings

* feat: copy entire src, tests folders, and package/tsconfig files from app-data project into the monorepo

* feat: add typescript-config

* feat: create common package with abstract adapter and context classes

* feat: implement adapters for ethers v5, ethers v6, and viem

* chore: update pnpm-lock

* chore: remove appdata and cow-sdk from build

* feat: create config package

* chore: fix eslint tsconfig path

* feat: refactor config

* chore: update pnpm-lock

* feat: add contracts-ts package

* feat: refactor contracts-ts

* feat: update adapters with new contracts-ts features

* feat: add tests for contracts-ts

* feat: move order-signing to new package

* feat: refactor order-signing

* feat: add new order-signing features to adapters

* feat: refactor order-signing tests

* feat: implement adapter usage in app-data; update app-data config and test files

* chore: update pnpm-lock file

* chore: fix lint and remove cow-sdk from lint.

* chore: update sdk-config tsconfig

* feat: add contracts-ts package

* feat: refactor contracts-ts

* feat: update adapters with new contracts-ts features

* feat: add tests for contracts-ts

* chore: update contracts-ts config

* chore(order-book): move order-book to monorepo package

* restore: bring back deleted type files with their history

* restore: bring back deleted config and path files with their history

* refactor: move cow-error and wallets.ts and remove duplicate types

* feat(order-book): setup order-book package, jest and tsconfig

* feat(order-book): refact order-book

* feat(monorepo-config): adjust all package.json and scripts

* chore(lint): lint

* chore(subgraph): move subgraph to monorepo package

* chore(subgraph): create package, tsconfig and jest config

* feat(subgraph): refactor subgraph package

* chore(subgraph): update pnpm-lock and run lint

* chore: add hashDomain to abstract utils

* feat: move composable package from original sdk to refactor sdk

* chore(subgraph): move cow-shed to monorepo package

* chore(cow-shed): copy wallets.ts

* feat(cow-shed): create package.json and tsconfig.json

* feat(cow-shed): add estimateGas method to SignerAdapters

* feat: refactor composable module to be framework-agnostic

* feat: enhance adapters and utils with composable features

* chore: move composable tests file to composable/tests

* feat: update tests to work with ethersV5 adapter

* feat: enhance composable to test the 3 adapters

* chore: remove console logs

* feat(cow-shed): refact on common and contract-ts

* chore(cow-shed): rename CowShedHooks test file

* feat(cow-shed): refact cow-she to use adapters and fix tests

* fix(cow-shed): fix adapters - estimateGas  and encodeAbi

* chore: lint files

* chore: move constants to sdk-common

* feat: update Node.js to version 22

* chore: align settings.json with .editorconfig configuration.

* chore: adjust cow-shed hooks test

* chore: add check to verify if the signature is the same across all three adapters in cowshedHooks test

* chore: apply PR suggestions

* chore: update pnpm-lock.json

* fix: viemUtils encodeAbi

---------

Co-authored-by: Jean Neiverth <jeanneiverth@gmail.com>
Co-authored-by: Jean Neiverth <79885562+jean-neiverth@users.noreply.github.com>
@linear
Copy link
Copy Markdown

linear Bot commented Jun 25, 2025

@github-actions
Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


0 out of 2 committers have signed the CLA.
@alfetopito
@jeffersonBastos
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@socket-security
Copy link
Copy Markdown

@socket-security
Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert (click for details)
Warn High
es5-ext@0.10.64 is Protestware or potentially unwanted behavior.

Note: This package prints a protestware console message on install regarding Ukraine for users with Russian language locale

From: pnpm-lock.yamlnpm/json-schema-to-typescript@10.1.5npm/es5-ext@0.10.64

ℹ Read more on: This package | This alert | What is protestware?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Consider that consuming this package may come along with functionality unrelated to its primary purpose.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/es5-ext@0.10.64. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
es5-ext@0.10.64 is Protestware or potentially unwanted behavior.

Note: The script attempts to run a local post-install script, which could potentially contain malicious code. The error handling suggests that it is designed to fail silently, which is a common tactic in malicious scripts.

From: pnpm-lock.yamlnpm/json-schema-to-typescript@10.1.5npm/es5-ext@0.10.64

ℹ Read more on: This package | This alert | What is protestware?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Consider that consuming this package may come along with functionality unrelated to its primary purpose.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/es5-ext@0.10.64. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@jeffersonBastos jeffersonBastos merged commit 2eea721 into bleu/refactor Jun 26, 2025
3 of 8 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 26, 2025
Comment thread packages/sdk/src/index.ts
@@ -0,0 +1 @@
export * from './CowSdk'
Copy link
Copy Markdown

@yvesfracari yvesfracari Jun 26, 2025

Choose a reason for hiding this comment

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

shouldn't we export the types as well ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, I will add this export. Tks!

Copy link
Copy Markdown

@yvesfracari yvesfracari left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread packages/sdk/package.json
@@ -0,0 +1,78 @@
{
"name": "@cowprotocol/sdk",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 all other ones then are a subspace of this right?

@@ -0,0 +1,9 @@
{
"extends": "@repo/typescript-config/base.json",
Copy link
Copy Markdown

@ribeirojose ribeirojose Jun 26, 2025

Choose a reason for hiding this comment

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants