Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Runnable examples live in the [`examples/`](https://github.com/BlockchainCommons

### Version History

- **1.0.0-beta.5 (October 19, 2026)** - Installs with npm on a host without Bun: the TypeScript 6 pin for the lint tools runs from `prepare`, not `postinstall` ([bc-components-ts#11](https://github.com/BlockchainCommons/bc-components-ts/issues/11)).
- **1.0.0-beta.2 (September 16, 2026)** - Constructor names (`makeFromUtf8`, `makeFromData`, `makeFromDigest`), `hasAlpha` and `colors`; images of any size a `number` can count render;
- **1.0.0-beta.1 (September 16, 2026)** - Initial beta implementation.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@blockchaincommons/lifehash",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.5",
"type": "module",
"sideEffects": false,
"description": "Blockchain Commons LifeHash Visual Hash Library for TypeScript",
Expand Down Expand Up @@ -62,7 +62,7 @@
"api:check": "bun scripts/api-snapshot.ts --check && bun scripts/api-report.ts",
"clean": "rm -rf dist",
"docs": "typedoc",
"postinstall": "bun scripts/pin-lint-typescript.ts",
"prepare": "bun scripts/pin-lint-typescript.ts",
"prepublishOnly": "npm run build",
"lint:pkg": "publint && attw --pack . --profile node16",
"check:deps": "node -e \"const p=require('./package.json');for(const g of ['dependencies','devDependencies','peerDependencies','optionalDependencies'])for(const [n,r] of Object.entries(p[g]||{})){if(n.startsWith('@bcts/')||String(r).startsWith('workspace:')){console.error(g+': '+n+'@'+r+' is not publishable');process.exit(1)}}console.log('dependencies are publishable')\"",
Expand Down
13 changes: 9 additions & 4 deletions scripts/pin-lint-typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
* `typescript6` npm alias devDependency) via node_modules symlinks; `tsc`
* and tsdown keep resolving the root TypeScript 7.
*
* Runs from the root `postinstall` hook. Remove this script together with
* the `typescript6` devDependency once upstream supports TS7.
* Runs from the root `prepare` hook, which a package manager runs for the
* project being installed and not for a dependency fetched from the registry
* (this script is not shipped). It also runs on `npm pack` and `npm publish`,
* so a missing `typescript6` is a notice, not a failure: inside the
* `bc-typescript` workspace the dependency is hoisted to the root, which
* applies the same pin once with `bun run pin`. Remove this script together
* with the `typescript6` devDependency once upstream supports TS7.
*/
import { existsSync, mkdirSync, readdirSync, rmSync, symlinkSync } from "node:fs";
import { dirname, join } from "node:path";
Expand All @@ -17,8 +22,8 @@ const nodeModules = join(dirname(fileURLToPath(import.meta.url)), "..", "node_mo
const ts6 = join(nodeModules, "typescript6");

if (!existsSync(ts6)) {
console.error("pin-lint-typescript: node_modules/typescript6 missing - run bun install");
process.exit(1);
console.log("pin-lint-typescript: no local node_modules/typescript6 - nothing to pin here");
process.exit(0);
}

const consumers = [
Expand Down
Loading