Skip to content

fix(tinyini): export TokenTypes as a type too, as @one-ini/wasm's enum is - #30

Merged
vite-hub[bot] merged 1 commit into
mainfrom
fix/one-ini-tokentypes-type
Nov 3, 2026
Merged

vite-hub[bot] merged 1 commit into
mainfrom
fix/one-ini-tokentypes-type

Conversation

@onmax

@onmax onmax commented Nov 3, 2026

Copy link
Copy Markdown
Owner

@one-ini/wasm declares TokenTypes as an enum, so it is a type as well as a value. editorconfig 3 uses it as one in parseBuffer:

switch (parsed[i] as TokenTypes) {

tinyini/one-ini only exported the value, so swapping the import in editorconfig-core-js failed its build with TS2749: 'TokenTypes' refers to a value, but is being used as a type here. This adds a TokenTypes type next to the frozen object, the union of its numbers, for both tinyini/one-ini and tinyini/one-ini-v0.1.

test/types/one-ini.ts fails pnpm typecheck on main and passes here. With this build of tinyini in place of @one-ini/wasm, editorconfig-core-js builds unchanged and passes all 19 mocha tests and all 202 editorconfig-core-test cases.

The README and the compatibility page also get the memory numbers right. 65,504 calls before RuntimeError: unreachable was for a 6.4 KB file, not an 800-byte one. An 800-byte file takes about 258,000. Measured on 0.2.1 and 0.2.2 with this reproduction, where call 65,506 is the first to throw.

@vite-hub

vite-hub Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Waiting 2026-11-03T08:47:22.758Z 1m 40s
View session Completed 2026-11-03T08:42:42.611Z 3m 31s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Waiting for GitHub merge request abda72dc-5051-4765-9c83-05c6ad2abcb4.

View session

Ready; no actionable findings in the supplied reviews or four-file diff. Both subpaths export the new type. Six Node runtime checks and git diff --check passed; hosted lint, typecheck, build, and tests are green. Local dependencies were unavailable because host installation rejected an unsupported dependency source protocol. Working tree is clean; no repair commit or push was needed.

Session

Ready; no actionable findings or repair needed. The type fixture reproduced TS2749 against base source and passed on HEAD for both entry points. Package typecheck and lint passed; focused one-ini tests passed 5 tests with 1 skipped. Host installation rejected a dependency protocol; pnpm fetched dependencies, although prepare hooks encountered read-only Git configuration. The working tree is clean; no commit or push was needed.

View session

Ready; no actionable findings or repair needed. The type fixture reproduced TS2749 against base source and passed on HEAD for both entry points. Package typecheck and lint passed; focused one-ini tests passed 5 tests with 1 skipped. Host installation rejected a dependency protocol; pnpm fetched dependencies, although prepare hooks encountered read-only Git configuration. The working tree is clean; no commit or push was needed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T08:43:41.026003Z ec9ce6e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes in all four files, including the shared type export, both public subpaths, regression coverage, and documentation corrections.

  • Type export: Adds the 0 | 1 | 2 | 3 | 4 type alongside the existing frozen TokenTypes value without changing runtime behavior. Both emitted subpath declarations retain it.
  • Regression coverage: Checks the exact type through both entry points and the editorconfig-style cast and switch. Package typechecking, build/publint, five focused compatibility tests, and six export tests pass. Full editorconfig integration was not rerun.
  • Documentation: Corrects the WASM memory-limit examples consistently across the README and compatibility page; the linked reproduction supports the revised numbers.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@pkg-pr-new

pkg-pr-new Bot commented Nov 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/tinyaml@30
pnpm add https://pkg.pr.new/tinyini@30
pnpm add https://pkg.pr.new/tinyjson5@30
pnpm add https://pkg.pr.new/tinyswap@30

commit: ec9ce6e

@vite-hub
vite-hub Bot merged commit 6dcd5b4 into main Nov 3, 2026
10 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 3, 2026
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