Skip to content

fix: accept normalize argument as object, too#332

Merged
gka merged 5 commits into
mainfrom
fix/transform-arg-object
Jan 18, 2026
Merged

fix: accept normalize argument as object, too#332
gka merged 5 commits into
mainfrom
fix/transform-arg-object

Conversation

@gka

@gka gka commented Jan 18, 2026

Copy link
Copy Markdown
Contributor

Both normalizeX and normalizeY now accept an options object (e.g., { basis: 'sum' }) in addition to the previous string/function forms, allowing for more extensible and descriptive usage.

Type Improvements

  • Introduced a MapIndexFunction type alias for improved clarity and type safety, and updated MapIndexObject to use this alias.
  • Added a runtime type guard (isMapIndex) to distinguish between options objects and map index objects, improving robustness in the normalize function.
  • Improved type annotations for normalization-related functions, such as normalizeBasis and normalizeDeviation, for better maintainability and developer experience. [1] [2]

Channel Renaming Fix

  • Changed the RENAME export in rename.ts from a string constant to a unique symbol, preventing potential collisions and making channel renaming more reliable.

@netlify

netlify Bot commented Jan 18, 2026

Copy link
Copy Markdown

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit c860fa7
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/696d68f764cf800008c48067
😎 Deploy Preview https://deploy-preview-332--svelteplot.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown

TypeScript error report:

  • This branch: 855
  • main branch: 1114
  • Difference (PR - main): -259 🎉

Svelte TypeScript error report:

  • This branch: 2113
  • main branch: 2112
  • Difference (PR - main): +1 ⚠️

@github-actions

Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.9.1-pr-332.0

Install it with:

npm install svelteplot@pr-332
# or install the specific version
npm install [email protected]

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb801ec168

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/transforms/normalize.ts
@github-actions

Copy link
Copy Markdown

TypeScript error report:

  • This branch: 855
  • main branch: 1114
  • Difference (PR - main): -259 🎉

Svelte TypeScript error report:

  • This branch: 2113
  • main branch: 2112
  • Difference (PR - main): +1 ⚠️

@github-actions

Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.9.1-pr-332.1

Install it with:

npm install svelteplot@pr-332
# or install the specific version
npm install [email protected]

@github-actions

Copy link
Copy Markdown

TypeScript error report:

  • This branch: 855
  • main branch: 1114
  • Difference (PR - main): -259 🎉

Svelte TypeScript error report:

  • This branch: 2113
  • main branch: 2112
  • Difference (PR - main): +1 ⚠️

@github-actions

Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.9.1-pr-332.2

Install it with:

npm install svelteplot@pr-332
# or install the specific version
npm install [email protected]

@github-actions

Copy link
Copy Markdown

TypeScript error report:

  • This branch: 855
  • main branch: 1114
  • Difference (PR - main): -259 🎉

Svelte TypeScript error report:

  • This branch: 2113
  • main branch: 2112
  • Difference (PR - main): +1 ⚠️

@github-actions

Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.9.1-pr-332.3

Install it with:

npm install svelteplot@pr-332
# or install the specific version
npm install [email protected]

@gka gka merged commit 17c45ec into main Jan 18, 2026
8 checks passed
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