SpreadsheetGrid

Versions and compatibility

How versions are raised (semver), what is public, breaking changes and the deprecation process

Versions follow Semantic Versioning. The React version @ishibashi0112/spreadsheet-grid, the Solid version @ishibashi0112/spreadsheet-grid-solid and the core @ishibashi0112/spreadsheet-grid-core are always released with the same version number (the Solid version since 1.4.0; before that, 0.1.x had its own numbers). Changes in each version are in the CHANGELOG (changes only in the Solid version are in the Solid CHANGELOG; both are in Japanese) and in GitHub Releases.

How versions are raised

Since 1.0.0, versions are raised like this:

  • major (X.0.0): breaking changes. Anything removed is deprecated in a minor version before that.
  • minor (X.Y.0): new features and deprecations. Code written today keeps working.
  • patch (X.Y.Z): bug fixes only.
  • npm's default range ^X.Y.Z accepts newer versions within the same major. When you move to a new major, check the "削除" (removed), "挙動の変化" (behavior changes) and "core の破壊的変更" (core breaking changes) sections for that version in the CHANGELOG.

Before 1.0 (up to 0.65.0), breaking changes were also released in minor versions. They are listed under "挙動の変化" and "core の破壊的変更" for each version in the CHANGELOG. The Solid version follows the same rules since 1.4.0; in 0.1.x, before the versions were aligned, breaking changes were also released in minor versions.

What is public

semver covers the following:

  • React version: anything you can import from its entry points (@ishibashi0112/spreadsheet-grid / /lite / /ai / /locales/en / /testing), the CSS files (style.css / style.layer.css / themes/*.css), and the props, column definitions, imperative API and types documented in the API reference, with their meaning.
  • Solid version: anything you can import from its entry points (@ishibashi0112/spreadsheet-grid-solid / /ai / /locales/en / /testing), the CSS files (the same as the React version), the same props, column definitions, imperative API and types as the React version with their meaning, and the Solid-only rules written in Notes for Solid (such as when render functions are called again).
  • CSS: the tokens (--ssg-*), and the classes and attributes listed in the API reference's styling state classes (public contract).
  • core: anything you can import from the entry points @ishibashi0112/spreadsheet-grid-core and /testing. The React and Solid versions depend on the core of the same version, so if you also use the core directly, use the same version (a different version installs two copies of the core).

The following are internal and may change in any version:

  • The core's parts (@ishibashi0112/spreadsheet-grid-core/internal/<dir>/<module>). These are used by the React and Solid versions, which both pin the core to the same version. The old subpaths without internal/ (@ishibashi0112/spreadsheet-grid-core/<dir>/<module>) were deprecated in 0.60.0 and removed in 0.61.0.
  • ssg-* classes not listed in the table, the nesting of the DOM, and the inline styles the grid sets.

TypeScript

  • TypeScript 5.8 or later is supported, with moduleResolution set to bundler (bundlers such as Vite and Next.js) or nodenext (ESM and CommonJS). The old node (node10) can't resolve the paths of entry points such as /lite, so it isn't supported. Types are also checked with strict and exactOptionalPropertyTypes enabled (@tsconfig/strictest and the like; you can pass undefined to optional fields, since 1.0.2).
  • Public types are type-checked before release with these combinations (the minimum and latest TypeScript, React 18 / 19 types, npm / pnpm).

Building a library on top of the React version

When you distribute something built on this package with declaration: true, such as shared in-house components, you can export column definitions and feature combinations with inferred types (since 0.65.0; annotating the types is fine too).

import { createSpreadsheetGrid, findFeature, standardFeatures } from '@ishibashi0112/spreadsheet-grid/lite';

// d.ts can be emitted without annotations (only names from the public entry points are written into it)
export const companyFeatures = { ...standardFeatures, find: findFeature };
export const CompanyGrid = createSpreadsheetGrid({ features: companyFeatures });
  • The emitted d.ts refers only to names from the entry points of the React version and the core (@ishibashi0112/spreadsheet-grid / @ishibashi0112/spreadsheet-grid-core and so on), never to the core's internal paths. A d.ts built with 0.64.0 or earlier may contain internal paths, so rebuild it with 0.65.0 or later. This applies when you use the React version's entry points. The d.ts of a library that uses the core directly (createGridEngine and so on) may contain the core's internal paths.
  • Put the React version and the core in peerDependencies with the same version (so the library uses the same copies as the app). The type of a feature part, GridFeature<K>, can't be passed between two installed copies of the React version, even for the same part. For things whose inferred types come from the core, such as column definitions, pnpm may fail to write the type's name when the core isn't a direct dependency (TS2742 / TS2883; the number depends on the TypeScript version).

Breaking changes

The following changes are released only in a major version:

  • Removing or renaming a public API, or narrowing a type
  • Changing a default value or documented behavior
  • Removing or renaming a public token, class or attribute, or changing which elements get it and when
  • Raising the minimum supported browsers, React or TypeScript (for the Solid version, also the minimum ^2.0.0 of solid-js / @solidjs/web)

The following are not breaking changes (minor or patch):

  • Adding optional props, functions or types
  • Fixing a bug so that it works as documented
  • Adding tokens or classes, and adjusting the default values of tokens (colors, sizes)

Deprecation process

Anything to be removed is deprecated in a minor version first and removed in the next major.

  1. Add a @deprecated JSDoc tag to the type (props and methods show a strikethrough in your editor. Selectable string values don't, so values are announced through the warning in step 3)
  2. Mark the row in the API reference as "Deprecated" with the version that removes it
  3. In development builds only, log a warning to the console once when it is used (never in production builds)
  4. List it in the "非推奨" (deprecated) section of the CHANGELOG, with what to use instead

The warning has two lines, one in Japanese and one in English (this example was shown in 0.65.0).

[spreadsheet-grid] 非推奨: エクスポートの scope `'all'` は 1.0.0 で消します。`'view'` を使ってください(挙動は同じです)。
[spreadsheet-grid] Deprecated: The export scope `'all'` will be removed in 1.0.0. Use `'view'` instead (same behavior).

Nothing is deprecated right now. The export scopes 'all' (use 'view' instead) and 'visible' (use 'rendered' instead), deprecated since 0.9.0, were removed in 1.0.0.

On this page