Skip to content

Conversation

Sidnioulz
Copy link
Collaborator

Changes

  • Adds a general diff algorithm for two tokens
  • Adds a general diff algorithm for two token listings
  • Adds a general diff algorithm for two token dictionaries
  • Adds documentation for token diffing

How to Review

  • Add more realistic test fixtures / debug package to help reviewers

Copy link

changeset-bot bot commented Oct 7, 2025

⚠️ No Changeset found

Latest commit: 413fc83

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Sidnioulz Sidnioulz self-assigned this Oct 7, 2025
"./token": "./dist/token.js",
"./package.json": "./package.json"
},
"homepage": "https://terrazzo.app/docs/cli/-TODO-CONFIRM-LATER-/api/token-diff",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  • Update once doc is written

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  • Add function to compare two entire token trees (without listing)

* @returns The escaped key
*/
function _escapeKey(key: string): string {
return key.replace(/\./g, '\\.');

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This does not escape backslash characters in the input.
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.

1 participant