Skip to content

Conversation

@kaze-cow
Copy link
Contributor

@kaze-cow kaze-cow commented Jan 21, 2026

Description

as commented in the previous PR introducing the wrapper by @alfetopito #746 (comment) , we should be using camel case for all fields in appData. This PR follows up on this previous PR to rename the field as requested.

I also updated the test to explicitly initialize the isOmittable property. I figure the old tests for wrapper hold little value because they won't be used, so I renamed the file.

How to Test

Follow README instructions to build the repo and verify no new generated files are included. Additionally, run the tests with pnpm test in packages/app-data.

Summary by CodeRabbit

  • New Features

    • Added support for app-data v1.13.0 and updated generated types/schemas.
    • Introduced new metadata version constants for UTM tracking and hooks.
    • Extended wrappers schema with optional data and an "isOmittable" setting for greater flexibility.
  • Tests

    • Updated validation tests and fixtures to reference v1.13.0 and the new wrapper fields.

✏️ Tip: You can customize this high-level summary in your review settings.

it isnt good pattern to use snake case in JSON, so we use camel case instead
@kaze-cow kaze-cow requested review from a team and alfetopito January 21, 2026 07:09
@kaze-cow kaze-cow self-assigned this Jan 21, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

Adds app-data v1.13.0: new TypeScript types and JSON schema, bumps latest version constants (app-data and wrappers), exposes v1_13_0 in public exports, adds UTM/Hooks metadata version constants, and updates tests to v1.13.0.

Changes

Cohort / File(s) Summary
Version Constants & Public Exports
packages/app-data/src/generatedTypes/index.ts
Bumps LATEST_APP_DATA_VERSION to 1.13.0, bumps LATEST_WRAPPERS_METADATA_VERSION to 0.2.0, adds LATEST_UTM_METADATA_VERSION and LATEST_HOOKS_METADATA_VERSION, extends LatestAppDataDocVersion and AnyAppDataDocVersion to include v1_13_0, and exposes v1_13_0 export.
Latest Alias
packages/app-data/src/generatedTypes/latest.ts
Updates cowAppDataLatestScheme export to point at ./v1.13.0 instead of ./v1.12.0.
New Type Definitions (v1.13.0)
packages/app-data/src/generatedTypes/v1.13.0.ts
Adds generated TypeScript types/interfaces for AppDataRootSchema and nested metadata (signer, referrer, utm, quote, orderClass, hooks, widget, partnerFee, replacedOrder, bridging, flashloan, wrappers, userConsents, etc.).
JSON Schemas
packages/app-data/src/schemas/v1.13.0.json, packages/app-data/src/schemas/wrappers/v0.2.0.json
Adds root schema v1.13.0.json referencing versioned metadata and adds wrappers schema v0.2.0.json (wrapper entries now include optional data and isOmittable).
Tests
packages/app-data/test/wrappers.v1.13.0.spec.ts
Updates test fixtures and descriptions to use 1.13.0; adds isOmittable: false to wrapper test fixtures and updates version strings.

Sequence Diagram(s)

(Skipped — changes are schema/type additions and tests without multi-component control-flow changes.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • anxolin
  • fedgiac
  • shoom3301

Poem

🐰 I hopped in with types and schemas neat,

v1.13.0 makes the metadata complete.
Wrappers and hooks, a tidy new song,
Updated exports to carry them along.
🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: renaming the is_omittable property to isOmittable (camelCase) in the appData wrapper schema and related files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2026

📦 GitHub Packages Published

Last updated: Jan 21, 2026, 07:15:25 AM UTC

The following packages have been published to GitHub Packages with pre-release version pr-776-c847d224:

  • @cowprotocol/cow-sdk@7.2.11-pr-776-c847d224.0
  • @cowprotocol/sdk-app-data@4.5.1-pr-776-c847d224.0
  • @cowprotocol/sdk-bridging@1.4.0-pr-776-c847d224.0
  • @cowprotocol/sdk-common@0.5.0-pr-776-c847d224.0
  • @cowprotocol/sdk-composable@0.1.24-pr-776-c847d224.0
  • @cowprotocol/sdk-config@0.6.3-pr-776-c847d224.0
  • @cowprotocol/sdk-contracts-ts@1.1.0-pr-776-c847d224.0
  • @cowprotocol/sdk-cow-shed@0.2.10-pr-776-c847d224.0
  • @cowprotocol/sdk-ethers-v5-adapter@0.3.1-pr-776-c847d224.0
  • @cowprotocol/sdk-ethers-v6-adapter@0.3.1-pr-776-c847d224.0
  • @cowprotocol/sdk-flash-loans@1.6.6-pr-776-c847d224.0
  • @cowprotocol/sdk-order-book@0.5.1-pr-776-c847d224.0
  • @cowprotocol/sdk-order-signing@0.1.24-pr-776-c847d224.0
  • @cowprotocol/sdk-subgraph@0.2.7-pr-776-c847d224.0
  • @cowprotocol/sdk-trading@0.8.1-pr-776-c847d224.0
  • @cowprotocol/sdk-viem-adapter@0.3.1-pr-776-c847d224.0
  • @cowprotocol/sdk-weiroll@0.1.12-pr-776-c847d224.0

Installation

These packages require authentication to install from GitHub Packages. First, create a .npmrc file:

# Create .npmrc file in your project root
echo "@cowprotocol:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN" >> .npmrc

To get your GitHub token:

  1. Go to https://github.com/settings/tokens
  2. Click "Generate new token (classic)"
  3. Check only the "read:packages" scope
  4. Copy the token and replace YOUR_GITHUB_TOKEN in the .npmrc file

Then install any of the packages above, either by exact version (i.e. @cowprotocol/cow-sdk@7.2.11-pr-776-c847d224.0) or more conveniently by using the tag (@cowprotocol/cow-sdk@pr-776):

# Yarn
yarn add npm:@cowprotocol/cow-sdk@pr-776

# pnpm
pnpm install npm:@cowprotocol/cow-sdk@pr-776

# NPM
npm install npm:@cowprotocol/cow-sdk@pr-776

Update to the latest version (only if you used the tag)

Every commit will publish a new package. To upgrade to the latest version, run:

# Yarn
yarn upgrade @cowprotocol/cow-sdk

# pnpm
pnpm update @cowprotocol/cow-sdk

# NPM
npm update @cowprotocol/cow-sdk

View Packages

You can view the published packages at: https://github.com/cowprotocol/cow-sdk/packages

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@packages/app-data/test/wrappers.v1.13.0.spec.ts`:
- Line 26: Rename the test title string for the test defined in the
test('Validates valid flashloan metadata v1.13.0', ...) to correctly reflect
what it validates (e.g., "Validates valid wrappers metadata v1.13.0"); update
only the test name in that test call so the function/test identifier remains the
same and CI/test behavior is unchanged.
- Line 14: Rename the test description string in the test call currently written
as 'Creates appDataDoc with flashloan metadata v1.13.0' to accurately reflect
what's being tested (e.g., 'Creates appDataDoc with wrappers metadata v1.13.0')
so the test name matches the wrappers behavior being asserted; update the
test(...) invocation string accordingly in the test file where that literal
appears.
- Line 131: The test title string in the test declaration 'Creates appDataDoc
with flashloan and other metadata v1.13.0' is misleading because the spec
validates wrappers and other metadata, not flashloan; update the test name
inside the test(...) call to accurately describe what's being asserted (for
example, "Creates appDataDoc with wrappers and other metadata v1.13.0") and
ensure any related test descriptions or snapshot names that reference the old
title are updated accordingly so they remain consistent with the assertions in
wrappers.v1.13.0.spec.ts.

]

test('Creates appDataDoc with flashloan metadata v1.11.0', async () => {
test('Creates appDataDoc with flashloan metadata v1.13.0', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Test name mentions "flashloan" but tests wrappers.

The test name 'Creates appDataDoc with flashloan metadata v1.13.0' should reference "wrappers" instead of "flashloan" to match what's being tested.

Suggested fix
-  test('Creates appDataDoc with flashloan metadata v1.13.0', async () => {
+  test('Creates appDataDoc with wrappers metadata v1.13.0', async () => {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
test('Creates appDataDoc with flashloan metadata v1.13.0', async () => {
test('Creates appDataDoc with wrappers metadata v1.13.0', async () => {
🤖 Prompt for AI Agents
In `@packages/app-data/test/wrappers.v1.13.0.spec.ts` at line 14, Rename the test
description string in the test call currently written as 'Creates appDataDoc
with flashloan metadata v1.13.0' to accurately reflect what's being tested
(e.g., 'Creates appDataDoc with wrappers metadata v1.13.0') so the test name
matches the wrappers behavior being asserted; update the test(...) invocation
string accordingly in the test file where that literal appears.

})

test('Validates valid flashloan metadata v1.11.0', async () => {
test('Validates valid flashloan metadata v1.13.0', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Test name mentions "flashloan" but validates wrappers.

Similar to above, this test validates wrappers metadata, not flashloan.

Suggested fix
-  test('Validates valid flashloan metadata v1.13.0', async () => {
+  test('Validates valid wrappers metadata v1.13.0', async () => {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
test('Validates valid flashloan metadata v1.13.0', async () => {
test('Validates valid wrappers metadata v1.13.0', async () => {
🤖 Prompt for AI Agents
In `@packages/app-data/test/wrappers.v1.13.0.spec.ts` at line 26, Rename the test
title string for the test defined in the test('Validates valid flashloan
metadata v1.13.0', ...) to correctly reflect what it validates (e.g., "Validates
valid wrappers metadata v1.13.0"); update only the test name in that test call
so the function/test identifier remains the same and CI/test behavior is
unchanged.

})

test('Creates appDataDoc with flashloan and other metadata v1.11.0', async () => {
test('Creates appDataDoc with flashloan and other metadata v1.13.0', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Test name mentions "flashloan" but tests wrappers with other metadata.

Suggested fix
-  test('Creates appDataDoc with flashloan and other metadata v1.13.0', async () => {
+  test('Creates appDataDoc with wrappers and other metadata v1.13.0', async () => {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
test('Creates appDataDoc with flashloan and other metadata v1.13.0', async () => {
test('Creates appDataDoc with wrappers and other metadata v1.13.0', async () => {
🤖 Prompt for AI Agents
In `@packages/app-data/test/wrappers.v1.13.0.spec.ts` at line 131, The test title
string in the test declaration 'Creates appDataDoc with flashloan and other
metadata v1.13.0' is misleading because the spec validates wrappers and other
metadata, not flashloan; update the test name inside the test(...) call to
accurately describe what's being asserted (for example, "Creates appDataDoc with
wrappers and other metadata v1.13.0") and ensure any related test descriptions
or snapshot names that reference the old title are updated accordingly so they
remain consistent with the assertions in wrappers.v1.13.0.spec.ts.

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.

3 participants