Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5dae2e5
[tb/add-catalog-hashing] Add string-hash library
Myranae Oct 30, 2025
10d0801
[tb/add-catalog-hashing] Add logic to create and add catalog hashes
Myranae Oct 30, 2025
740bba6
[tb/add-catalog-hashing] Add the very first catalog hashes
Myranae Oct 30, 2025
fc5f17e
[tb/add-catalog-hashing] Add the script to the package.json
Myranae Oct 30, 2025
9367e79
[tb/add-catalog-hashing] Update sync script to update hashes too
Myranae Oct 30, 2025
b832bd0
[tb/add-catalog-hashing] Lint updates
Myranae Oct 30, 2025
cb7a40c
[tb/add-catalog-hashing] Add verify catalog hashes to pre-publish checks
Myranae Oct 30, 2025
f0ec82d
[tb/add-catalog-hashing] Update the README
Myranae Oct 30, 2025
ec05a49
[tb/add-catalog-hashing] Update to ignore devDeps
Myranae Oct 30, 2025
f0c43db
[tb/add-catalog-hashing] Add tests for hash logic and updates
Myranae Oct 30, 2025
de71187
[tb/add-catalog-hashing] docs(changeset): Add catalog hash system for…
Myranae Oct 30, 2025
60d98d2
[tb/add-catalog-hashing] Update linting
Myranae Oct 30, 2025
5ba0353
[tb/add-catalog-hashing] Update based on PR comments
Myranae Nov 10, 2025
ef3adfe
[tb/add-catalog-hashing] Update based on PR comments
Myranae Nov 12, 2025
8a44b41
[tb/add-catalog-hashing] Merge branch 'main' into tb/add-catalog-hashing
Myranae Nov 12, 2025
f1e26ec
[tb/add-catalog-hashing] Update all hashes based on new hashing
Myranae Nov 12, 2025
f2aa48d
[tb/add-catalog-hashing] Streamline tests a bit
Myranae Nov 13, 2025
aea7f1f
[tb/add-catalog-hashing] Check for expected hash instead of string type
Myranae Nov 13, 2025
cc46582
[tb/add-catalog-hashing] Add logic and tests to handle vendor package…
Myranae Nov 13, 2025
b3e8ad9
[tb/add-catalog-hashing] Revert spacing changes to vendor package.json
Myranae Nov 13, 2025
e06db49
[tb/add-catalog-hashing] Streamline console logging
Myranae Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/ninety-toys-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@khanacademy/kas": patch
"@khanacademy/keypad-context": patch
"@khanacademy/kmath": patch
"@khanacademy/math-input": patch
"@khanacademy/perseus": patch
"@khanacademy/perseus-core": patch
"@khanacademy/perseus-editor": patch
"@khanacademy/perseus-linter": patch
"@khanacademy/perseus-score": patch
"@khanacademy/perseus-utils": patch
"@khanacademy/pure-markdown": patch
"@khanacademy/simple-markdown": patch
---

Add catalog hash system for dependency tracking
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ To make changes to Perseus, create a new branch based on `main`, commit your cha
### Everyday commands

```bash
pnpm tsc -w # run the typechecker in watch mode
pnpm test # run all tests
pnpm lint # find problems
pnpm lint --fix # fix problems
pnpm storybook # open component gallery
pnpm changeset # create a changeset file (see below)
pnpm tsc -w # run the typechecker in watch mode
pnpm test # run all tests
pnpm lint # find problems
pnpm lint --fix # fix problems
pnpm storybook # open component gallery
pnpm changeset # create a changeset file (see below)
pnpm update-catalog-hashes # update catalog dependency hashes (see below)
```

Additionally, we use Khan Academy's Git extensions (OLC) to manage pull requests.
Expand All @@ -63,6 +64,10 @@ The components and widgets of Perseus are developed using [Storybook](https://gi

We use [changesets](https://github.com/changesets/changesets) to help manage our versioning/releases. Each pull request must include a changeset file stating which packages changed and how their versions should be incremented. Run `pnpm changeset` to generate and commit a changeset file.

### Catalog Hashes

Catalog hashes ensure packages are rebuilt when their catalog dependencies (Wonder Blocks, React, etc.) are updated. These hashes are automatically updated when running `utils/sync-dependencies.ts`. If you manually add catalog dependencies to a package.json, run `pnpm update-catalog-hashes` to update the hashes. The pre-publish check will verify all hashes are current before releasing.

### Releasing Perseus to npm

1. Landing changes to `main` creates/updates a “Version Packages” PR
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@types/react": "~18.2.64",
"@types/react-dom": "~18.2.19",
"@types/semver": "7.7.0",
"@types/string-hash": "^1.1.3",
"@types/underscore": "^1.11.4",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
Expand Down Expand Up @@ -120,6 +121,7 @@
"sloc": "^0.2.1",
"storybook": "^9.0.4",
"storybook-multilevel-sort": "^2.0.1",
"string-hash": "^1.1.3",
"style-loader": "^3.3.3",
"swc_mut_cjs_exports": "^8.0.1",
"tiny-invariant": "catalog:devDeps",
Expand All @@ -144,6 +146,7 @@
"lint": "eslint . --ext .js --ext .jsx --ext .ts --ext .tsx",
"lint:timing": "cross-env TIMING=1 pnpm lint",
"publish:ci": "utils/pre-publish-check-ci.ts && git diff --stat --exit-code HEAD && pnpm build && pnpm build:types && changeset publish",
"update-catalog-hashes": "utils/update-catalog-hashes-cli.ts",
"sloc": "sloc packages --exclude node_modules",
"test": "jest",
"storybook": "storybook dev -p 6006",
Expand Down
5 changes: 4 additions & 1 deletion packages/kas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@
"expression",
"algebra",
"symbolic"
]
],
"khan": {
"catalogHash": "1315561098"
}
}
5 changes: 4 additions & 1 deletion packages/keypad-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@
"peerDependencies": {
"react": "catalog:peerDeps"
},
"keywords": []
"keywords": [],
"khan": {
"catalogHash": "1430796529"
}
}
5 changes: 4 additions & 1 deletion packages/kmath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@
"jquery": "catalog:peerDeps",
"underscore": "catalog:peerDeps"
},
"keywords": []
"keywords": [],
"khan": {
"catalogHash": "2806871786"
}
}
5 changes: 4 additions & 1 deletion packages/math-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,8 @@
"react-dom": "catalog:peerDeps",
"react-transition-group": "^4.4.1"
},
"keywords": []
"keywords": [],
"khan": {
"catalogHash": "4265157434"
}
}
5 changes: 4 additions & 1 deletion packages/perseus-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,8 @@
"@khanacademy/wonder-stuff-core": "catalog:peerDeps",
"underscore": "catalog:peerDeps"
},
"keywords": []
"keywords": [],
"khan": {
"catalogHash": "2504152792"
}
}
5 changes: 4 additions & 1 deletion packages/perseus-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,8 @@
"react-dom": "catalog:peerDeps",
"underscore": "catalog:peerDeps"
},
"keywords": []
"keywords": [],
"khan": {
"catalogHash": "3388811657"
}
}
5 changes: 4 additions & 1 deletion packages/perseus-linter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@
"@khanacademy/pure-markdown": "workspace:*",
"perseus-build-settings": "workspace:*"
},
"keywords": []
"keywords": [],
"khan": {
"catalogHash": "5381"
}
}
5 changes: 4 additions & 1 deletion packages/perseus-score/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@
"peerDependencies": {
"underscore": "catalog:peerDeps"
},
"keywords": []
"keywords": [],
"khan": {
"catalogHash": "1315561098"
}
}
3 changes: 3 additions & 0 deletions packages/perseus-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
"dependencies": {},
"devDependencies": {
"perseus-build-settings": "workspace:*"
},
"khan": {
"catalogHash": "5381"
}
}
5 changes: 4 additions & 1 deletion packages/perseus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,8 @@
"react-popper": "^2.2.5",
"underscore": "catalog:peerDeps"
},
"keywords": []
"keywords": [],
"khan": {
"catalogHash": "2287515007"
}
}
5 changes: 4 additions & 1 deletion packages/pure-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@
"perseus-build-settings": "workspace:*"
},
"peerDependencies": {},
"keywords": []
"keywords": [],
"khan": {
"catalogHash": "5381"
}
}
5 changes: 4 additions & 1 deletion packages/simple-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@
},
"keywords": [
"markdown"
]
],
"khan": {
"catalogHash": "2928525122"
}
}
11 changes: 11 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading