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
8 changes: 8 additions & 0 deletions .changeset/node-26-runtime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"tokenometer": major
"@tokenometer/core": major
"@tokenometer/mcp": major
"@tokenometer/react": major
---

Require Node.js 26 and run CI, release, registry, and automation workflows on Node 26.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '26'
cache: 'npm'
registry-url: 'https://registry.npmjs.org/'
- run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/registry-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '26'
cache: 'npm'
registry-url: 'https://registry.npmjs.org/'
- run: npm ci
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '26'
registry-url: 'https://registry.npmjs.org/'

- run: npm ci
Expand Down Expand Up @@ -318,7 +318,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '26'
registry-url: 'https://registry.npmjs.org/'

- name: Smoke test published CLI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tokenlens-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '26'
cache: 'npm'

- run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"url": "https://github.com/faraa2m/tokenometer/issues"
},
"engines": {
"node": ">=20"
"node": ">=26"
},
Comment on lines 16 to 18
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add Node engine to published packages

This only updates the private workspace root, so npm consumers of the packages being major-bumped here still receive package manifests without a Node 26 engine requirement: packages/cli/package.json, packages/core/package.json, packages/mcp/package.json, and packages/react/package.json do not declare engines.node. Because npm publishes each workspace's own package.json, installing tokenometer or @tokenometer/* on Node 20/22 will not warn or reject even though the release notes say these packages now require Node 26.

Useful? React with 👍 / 👎.

"workspaces": ["packages/*", "apps/*"],
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ outputs:
comment-url:
description: 'URL of the sticky comment.'
runs:
using: 'node20'
using: 'node24'
main: 'dist/index.cjs'
2 changes: 1 addition & 1 deletion packages/action/dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -59856,7 +59856,7 @@ var gpt4params = {
var chatModelParams = Object.fromEntries(chatEnabledModels.flatMap((modelName) => modelName.startsWith("gpt-3.5") ? [[modelName, gpt3params]] : [[modelName, gpt4params]]));

// ../../node_modules/gpt-tokenizer/esm/encodingParams/constants.js
var R50K_TOKEN_SPLIT_REGEX = new RegExp("'s|'t|'re|'ve|'m|'ll|'d| ?\\p{L}+| ?\\p{N}+| ?[^\\s\\p{L}\\p{N}]+|\\s+(?!\\S)|\\s+", "gu");
var R50K_TOKEN_SPLIT_REGEX = /'s|'t|'re|'ve|'m|'ll|'d| ?\p{L}+| ?\p{N}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+/gu;
var CONTRACTION_SUFFIX_PATTERN = String.raw`'(?:[sS]|[dD]|[mM]|[tT]|[lL][lL]|[vV][eE]|[rR][eE])`;
var OPTIONAL_CONTRACTION_SUFFIX = String.raw`(?:${CONTRACTION_SUFFIX_PATTERN})?`;
var CL100K_TOKEN_SPLIT_PATTERN = String.raw`${CONTRACTION_SUFFIX_PATTERN}|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}{1,3}| ?[^\s\p{L}\p{N}]+[\r\n]*|\s+$|\s*[\r\n]|\s+(?!\S)|\s`;
Expand Down
2 changes: 1 addition & 1 deletion packages/action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"type": "module",
"main": "./dist/index.js",
"scripts": {
"build": "tsc -b && esbuild src/index.ts --bundle --platform=node --target=node20 --format=cjs --outfile=dist/index.cjs"
"build": "tsc -b && esbuild src/index.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/index.cjs"
},
"dependencies": {
"@actions/core": "^1.11.1",
Expand Down
Loading