Skip to content
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
6689397
HF-307 PR 2: public API guards (ensureCapability)
marcin-kordas-hoc Aug 11, 2026
8a26e2b
HF-307 PR 2: close the Crud gate on row/column reordering
marcin-kordas-hoc Aug 11, 2026
c29a9ba
HF-307 PR 2: ungate resumeEvaluation - gating it could brick an engine
marcin-kordas-hoc Aug 11, 2026
88feb29
HF-307 PR2: close a Crud bypass through cut+paste, fix docs and a pac…
marcin-kordas-hoc Aug 18, 2026
f88d59b
HF-307 PR 3: vendor the typed-key reader
marcin-kordas-hoc Aug 11, 2026
9370f68
HF-307 PR 3: resolve typed license keys into both gates
marcin-kordas-hoc Aug 11, 2026
89dae84
HF-307 PR 3: real capability table, and read both payload shapes
marcin-kordas-hoc Aug 11, 2026
49a9109
HF-307 PR 3: fix review findings - two crashes, a gating hole and fai…
marcin-kordas-hoc Aug 12, 2026
f808820
HF-307 PR 3: read the expiry date in UTC when formatting the warning
marcin-kordas-hoc Aug 12, 2026
8afd177
HF-307 PR 3: real feature gating and decoupled silence, per Kuba's an…
marcin-kordas-hoc Aug 12, 2026
a286fca
HF-307 PR 3: feature tokens are opt-in, and every silent spelling is …
marcin-kordas-hoc Aug 13, 2026
c970ff1
HF-307 PR 3: a prototype-named tier must not crash the constructor
marcin-kordas-hoc Aug 16, 2026
ab1bba1
HF-307 PR 3: the release-date comment promised an agreement that does…
marcin-kordas-hoc Aug 16, 2026
f63b3bd
HF-307: report the first uncovered day when a key expires inside its …
marcin-kordas-hoc Aug 26, 2026
8dcca66
HF-307: keep internal identifiers out of the public source
marcin-kordas-hoc Aug 26, 2026
f26bd56
HF-307 PR 4: describe only the functions the license grants
marcin-kordas-hoc Aug 12, 2026
f4eb581
HF-307 PR4: close the capability-table drift against Kuba's 12.08 doc
marcin-kordas-hoc Aug 17, 2026
6bfe8f8
HF-307 PR 4: the docs promised two things the code does not do
marcin-kordas-hoc Aug 19, 2026
693afdd
HF-307: stop the docs promising a gate that is wider than it is
marcin-kordas-hoc Aug 26, 2026
cd79b06
HF-307: keep internal identifiers out of the public source
marcin-kordas-hoc Aug 26, 2026
fc32b7b
HF-307: warn once when a typed key enters its notice window
marcin-kordas-hoc Aug 13, 2026
67cbfcd
HF-307: review fixups for the notice window
marcin-kordas-hoc Aug 20, 2026
78849f1
HF-307: open the notice window `notice` days before the licensed day,…
marcin-kordas-hoc Aug 26, 2026
db92bcd
HF-307: keep internal identifiers out of the public source
marcin-kordas-hoc Aug 26, 2026
dac1d7b
HF-307: wire the two commercial add-on tokens, strictly additively
marcin-kordas-hoc Aug 13, 2026
755ec9b
HF-307: add the add-on grants CHANGELOG entry the DoD gate flagged
marcin-kordas-hoc Aug 20, 2026
6161a15
HF-307: say what the Spreadsheet Bundle actually grants, and why it s…
marcin-kordas-hoc Aug 26, 2026
3dbcbe6
HF-307: keep internal identifiers out of the public source
marcin-kordas-hoc Aug 26, 2026
0744007
HF-329: re-port the license key reader to the entitlement key format
marcin-kordas-hoc Aug 20, 2026
a425d37
HF-329: require the entitlement date to actually be a string
marcin-kordas-hoc Aug 26, 2026
6b23a40
HF-307/HF-306: teach the capability table both token dialects
marcin-kordas-hoc Aug 20, 2026
978001a
HF-307: finish D2 - align getRegisteredFunctionNames with the license…
marcin-kordas-hoc Aug 20, 2026
918a6cd
Document the 3.4.0 removal of the static function metadata API
marcin-kordas-hoc Aug 26, 2026
4ee01ae
Merge remote-tracking branch 'origin/hf-307-entitlement-gating-pr1' i…
marcin-kordas-hoc Sep 18, 2026
e88b96b
HF-307/HF-329/HF-306: license key reader, resolution and capability t…
marcin-kordas-hoc Sep 18, 2026
45126e0
merge: retarget onto collapsed hf-307-entitlement-gating-pr3
marcin-kordas-hoc Sep 18, 2026
dfeb8f1
Merge PR1 (drop the unused implication step)
marcin-kordas-hoc Sep 22, 2026
bee030b
refactor(HF-307): let a clipboard grant cover pasting a cut
marcin-kordas-hoc Sep 22, 2026
b3e8c2f
Merge PR2 (clipboard covers pasting a cut)
marcin-kordas-hoc Sep 22, 2026
48ee653
refactor(HF-307): rename the vendored parser directory and trim its p…
marcin-kordas-hoc Sep 22, 2026
67432bc
Merge PR3 (parser directory rename, provenance and guide fixes)
marcin-kordas-hoc Sep 22, 2026
7d5ac2d
docs(HF-307): stop promising a Crud refusal paste() can no longer make
marcin-kordas-hoc Sep 22, 2026
7b78d02
Merge PR3 (throws tag correction)
marcin-kordas-hoc Sep 22, 2026
27a672c
Merge PR2 (throws tag correction)
marcin-kordas-hoc Sep 22, 2026
14f1ed5
style(HF-307): close the gap the removed wrapper left
marcin-kordas-hoc Sep 22, 2026
fab1a6f
Merge PR3
marcin-kordas-hoc Sep 22, 2026
f782d0e
Merge PR2
marcin-kordas-hoc Sep 22, 2026
3735c2f
Merge PR3 (changelog wording)
marcin-kordas-hoc Sep 22, 2026
dd731a9
docs(HF-307): name the parser change without describing the key format
marcin-kordas-hoc Sep 22, 2026
c048798
docs(HF-307): mirror the retroactive 3.4.0 removal into the release n…
marcin-kordas-hoc Sep 22, 2026
ce18576
fix(HF-307): stop blaming the installed version for a usage-based expiry
marcin-kordas-hoc Sep 22, 2026
59622b5
Merge PR3 (expiry message axis)
marcin-kordas-hoc Sep 22, 2026
690ef69
Merge branch 'hf307-fix/pr1' into hf307-fix/pr2
marcin-kordas-hoc Sep 22, 2026
fbb81a2
fix(HF-307): merge PR2's axis split forward, correct stale JSDoc
marcin-kordas-hoc Sep 22, 2026
dbc884c
Merge branch 'hf307-fix/pr3' into hf307-fix/pr4
marcin-kordas-hoc Sep 22, 2026
8d5c39a
docs(HF-307): fix a JSDoc line missed in the previous merge commit
marcin-kordas-hoc Sep 22, 2026
361c884
Merge branch 'hf307-fix/pr3' into hf307-fix/pr4
marcin-kordas-hoc Sep 22, 2026
258786e
refactor(HF-307): read capabilities only, never packages
marcin-kordas-hoc Sep 23, 2026
00c1d05
Merge PR3 (capabilities only, never packages)
marcin-kordas-hoc Sep 23, 2026
d8b9285
refactor(HF-307): reduce the registry listing change to the deprecation
marcin-kordas-hoc Sep 23, 2026
15d7231
docs(HF-307): drop the core token from the coverage invariant's descr…
marcin-kordas-hoc Sep 24, 2026
6500823
Merge PR3 (coverage invariant wording)
marcin-kordas-hoc Sep 24, 2026
be183b9
docs(HF-307): withdraw a 3.4.0 changelog entry for a removal that nev…
marcin-kordas-hoc Sep 24, 2026
a8ffef3
Merge branch 'hf-307-entitlement-gating-pr1' into hf-307-registered-f…
sequba Sep 24, 2026
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
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Added

- Added support for proprietary license keys that grant a subset of the library ("feature packages and add-ons"). A function your key does not include evaluates to a `#LIC!` error, and the corresponding parts of the API throw a `LicenseCapabilityMissingError`. Keys that grant everything, including `gpl-v3`, are unaffected. [#1728](https://github.com/handsontable/hyperformula/pull/1728) [#1729](https://github.com/handsontable/hyperformula/pull/1729) [#1730](https://github.com/handsontable/hyperformula/pull/1730)
- Added a one-time console notice when a license key's usage-based expiry date falls within its configured notice period, naming the key's last covered day ("valid until … (UTC)"). The notice is silenced by the key's own silent flag, and never fires for a key expiring on the perpetual (`release_until`) axis. Blocking behavior at and after expiry is unchanged. [#1730](https://github.com/handsontable/hyperformula/pull/1730)
- Added grants to the two commercial add-on tokens: `spreadsheet` (the Spreadsheet Bundle) now grants the CRUD, undo/redo, clipboard, and batching feature areas, and `import_export` grants the reserved import/export feature that nothing gates on until the feature ships. A key naming neither add-on keeps every feature area it has today. [#1730](https://github.com/handsontable/hyperformula/pull/1730)

### Changed

- Changed `getAvailableFunctions()` and `getFunctionDetails()` to describe only the functions the instance's license key includes, so they no longer advertise a function that would evaluate to a `#LIC!` error. A missing, invalid, or expired key does not shorten the list. [#1730](https://github.com/handsontable/hyperformula/pull/1730)
- Changed the parser for the new proprietary license keys to the entitlement key format (a human-readable text ending with a machine-readable block in square brackets), following its upstream specification. This replaces the tagged key format, which was never issued to anyone. Classic 25-character license keys and `gpl-v3` are unaffected. [#1730](https://github.com/handsontable/hyperformula/pull/1730)
- Changed the license capability tokens to be matched case-insensitively, and added support for the packaging group-token vocabulary (`fun:all`, `fun:<family>.<A|B|C>`, and per-function `fun:<FUNCTION_NAME>` tokens) alongside the existing package tokens (`functions_1`–`functions_4` and the add-ons). A key worded in either vocabulary grants the same functions. [#1730](https://github.com/handsontable/hyperformula/pull/1730)
- Changed the `getRegisteredFunctionNames()` instance method to list exactly the functions the instance can evaluate, the same way `getAvailableFunctions()` does: the protected built-ins are now included, and a function the instance's license key does not include is no longer listed. A missing, invalid, or expired key does not shorten the list. [#1743](https://github.com/handsontable/hyperformula/pull/1743)

### Deprecated

- Deprecated the static `HyperFormula.getRegisteredFunctionNames()` method; it will be removed in one of the next major releases. Use the instance method of the same name instead — a static method has no engine, and therefore no license key or configuration, in scope, so it can only answer for the function registry as a whole. The two are not interchangeable: the static one translates into any registered language without an engine, so migrating means building one, for example `HyperFormula.buildEmpty({ language: 'plPL' }).getRegisteredFunctionNames()`. [#1743](https://github.com/handsontable/hyperformula/pull/1743)

### Fixed

- Fixed the `AVERAGEIF` function returning a division-by-zero error when the calculated average was `0`. [#1733](https://github.com/handsontable/hyperformula/pull/1733)
Expand All @@ -26,6 +43,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Added an Indonesian (Bahasa Indonesia) language pack. [#1674](https://github.com/handsontable/hyperformula/pull/1674)
- Added a `stringifyCurrency` config option that lets you plug in a custom currency formatter for the `TEXT` function. [#1145](https://github.com/handsontable/hyperformula/issues/1145)

### Removed

- **Breaking change**: Removed the static `HyperFormula.getAvailableFunctions()` and `HyperFormula.getFunctionDetails()` methods. Use the instance methods of the same names, added in this release: a static method has no engine, and therefore no configuration, in scope, so it can only answer for the package as a whole. This entry was missing from the 3.4.0 release notes and is added retroactively. [#1724](https://github.com/handsontable/hyperformula/pull/1724)
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved

### Fixed

- Fixed the behavior of `MATCH`, `VLOOKUP`, `HLOOKUP`, and `XLOOKUP` functions when the search range contained empty cells. [#1697](https://github.com/handsontable/hyperformula/pull/1697)
Expand Down
79 changes: 75 additions & 4 deletions docs/guide/license-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,96 @@ const options = {
}
```

### Proprietary license key formats

Your proprietary license key is in one of two formats, and both work the same way:

* A classic key: 25 characters in five dash-separated groups, for example
`1a2b3-4c5d6-7e8f9-0a1b2-3c4d5`.
* An entitlement key: a short, human-readable license text that ends with a machine-readable
block in square brackets. Assign the whole text to the `licenseKey` option, or just the
bracketed block — the block is the only part HyperFormula reads, so both work. The text around
the block may be re-wrapped on its way to you (for example, by an email client) without
affecting the key; the block itself has to arrive character for character.

### Proprietary license key validation

::: tip
HyperFormula doesn't use an internet connection to validate your proprietary license key.
:::

To determine whether a user is still entitled to use a particular
version of the software, HyperFormula compares the time between
two dates:
* The HyperFormula build date
* The date in your proprietary license key
version of the software, HyperFormula compares the date in your
proprietary license key against one of two references, depending on
the license you purchased:
* The HyperFormula build date, when the key ends maintenance on a set
date (versions released before that date keep working indefinitely)
* The current date (in UTC), when the key ends usage on a set date

This process doesn't require any connection to the server.

## Feature packages and add-ons

A proprietary license key may grant the whole library, or only part of it. If your key covers
everything you buy nothing new to think about, and neither does the GPLv3 key `gpl-v3`, which
always grants everything.

If your key grants only part of the library, then:

* A function your key doesn't include evaluates to a `#LIC!` error, in the same way as any other
[error value](types-of-errors.md). Everything else in the sheet keeps calculating.
* An API method your key doesn't include throws a `LicenseCapabilityMissingError` when you call
it. Getters never throw; `copy()` and `cut()` do, because they belong to the clipboard feature.
* [`getAvailableFunctions()`](../api/classes/hyperformula.md#getavailablefunctions),
[`getFunctionDetails()`](../api/classes/hyperformula.md#getfunctiondetails) and the instance
[`getRegisteredFunctionNames()`](../api/classes/hyperformula.md#getregisteredfunctionnames)
Comment thread
sequba marked this conversation as resolved.
Resolved
describe only the functions your key includes, so a function picker built from them never offers
a function that then fails. The static method of the same name has no engine, and therefore no
key, in scope: it answers for the whole package and is deprecated.

Custom functions you register yourself are available whatever your key grants, as long as they use
an id of their own. The licence covers built-in ids, so a plugin registered under a built-in id your
key does not include is treated as that built-in and stays unavailable — it will not be described and
it evaluates to `#LIC!`. Pick an id the built-in catalogue does not use and this cannot happen.

Two commercial add-ons build on top of a package:

* **Spreadsheet Bundle** grants the CRUD API (adding, removing, and moving rows, columns, sheets,
and cell contents), undo/redo, clipboard operations, and batching (`batch()` /
`suspendEvaluation()`; `resumeEvaluation()` is deliberately never gated, so an engine can always
leave a suspended state). It does not grant named expressions, which stay outside both add-ons.
* **Import/export** is reserved for a future release. HyperFormula doesn't have an import/export
feature yet, so this add-on doesn't grant or restrict anything today.

In this release, not having either add-on doesn't restrict anything either: a key that names no
feature token at all is granted every feature area — CRUD, undo/redo, clipboard, named expressions
and batching — regardless of whether it names these add-ons. Every key issued today is of that
shape, so the add-on tokens describe what was sold rather than changing what the engine allows.

::: tip
To find out which package your key includes, check your order confirmation or
[contact our team](contact.md). HyperFormula deliberately reports nothing about the contents of
your key at runtime.
:::

## License key notifications

If your license key is missing, invalid, or expired, you see a
corresponding notification in the console.

In that case every licence-gated function call evaluates to a `#LIC!` error — but no API method
starts throwing, and the three listing methods above still describe the full set of functions. A key
problem never narrows what the library reports it can do.

Arithmetic keeps working: operators such as `=A1+B1` are not function calls, so nothing gates them.
`VERSION()` and `OFFSET()` are function calls, but they are protected built-ins that sit outside the
licence system entirely, so they keep evaluating too. A sheet with a key problem therefore does not
go blank.

A **valid** key can print one notification too: if it expires on a set date and that date is
within the notice period your license carries, the console names the last day the key covers. It
is a heads-up only — nothing is restricted while a key is valid, and the message appears once.

## License key support

If you have any issues with your license key, [contact our team](contact.md).
2 changes: 1 addition & 1 deletion docs/guide/types-of-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ according to the language settings.
| #VALUE! | Wrong type of argument | It occurs when a formula tries to improperly use different types of data. For example, you will see this error when you will try to add a string to a number. |
| #CYCLE! | Circular reference | It occurs when a formula refers to its own cell, both directly and indirectly. |
| #ERROR! | An error occurred | It indicates that there is an unknown error in a formula. |
| #LIC! | Invalid license key | It occurs when the license key is invalid, expired, or missing. |
| #LIC! | License key problem | It occurs when the license key is invalid, expired, or missing, or when the function is not included in the [feature package](license-key.md#feature-packages-and-add-ons) your license key grants. |
27 changes: 25 additions & 2 deletions src/BuildEngineFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {Config} from './Config'
import {CrudOperations} from './CrudOperations'
import {DateTimeHelper} from './DateTimeHelper'
import {DependencyGraph} from './DependencyGraph'
import {SheetSizeLimitExceededError} from './errors'
import {LicenseCapabilityMissingError, SheetSizeLimitExceededError} from './errors'
import {Evaluator} from './Evaluator'
import {Exporter} from './Exporter'
import {GraphBuilder} from './GraphBuilder'
Expand All @@ -19,6 +19,8 @@ import {ArithmeticHelper} from './interpreter/ArithmeticHelper'
import {FunctionRegistry} from './interpreter/FunctionRegistry'
import {Interpreter} from './interpreter/Interpreter'
import {LazilyTransformingAstService} from './LazilyTransformingAstService'
import {allowsFeature} from './license/CapabilityRegistry'
import {FeatureId} from './license/LicenseEntitlement'
import {buildColumnSearchStrategy, ColumnSearchStrategy} from './Lookup/SearchStrategy'
import {NamedExpressions} from './NamedExpressions'
import {NumberLiteralHelper} from './NumberLiteralHelper'
Expand Down Expand Up @@ -50,23 +52,44 @@ export type EngineState = {
export class BuildEngineFactory {
public static buildFromSheets(sheets: Sheets, configInput: Partial<ConfigParams> = {}, namedExpressions: SerializedNamedExpression[] = []): EngineState {
const config = new Config(configInput)
this.ensureNamedExpressionsCapability(config, namedExpressions)
return this.buildEngine(config, sheets, namedExpressions)
}

public static buildFromSheet(sheet: Sheet, configInput: Partial<ConfigParams> = {}, namedExpressions: SerializedNamedExpression[] = []): EngineState {
const config = new Config(configInput)
this.ensureNamedExpressionsCapability(config, namedExpressions)
const newsheetprefix = config.translationPackage.getUITranslation(UIElement.NEW_SHEET_PREFIX) + '1'
return this.buildEngine(config, {[newsheetprefix]: sheet}, namedExpressions)
}

public static buildEmpty(configInput: Partial<ConfigParams> = {}, namedExpressions: SerializedNamedExpression[] = []): EngineState {
return this.buildEngine(new Config(configInput), {}, namedExpressions)
const config = new Config(configInput)
this.ensureNamedExpressionsCapability(config, namedExpressions)
return this.buildEngine(config, {}, namedExpressions)
}

public static rebuildWithConfig(config: Config, sheets: Sheets, namedExpressions: SerializedNamedExpression[], stats: Statistics): EngineState {
return this.buildEngine(config, sheets, namedExpressions, stats)
}

/**
* Throws if `namedExpressions` is non-empty and `config`'s entitlement does not grant
* {@link FeatureId.NamedExpressions} (HF-307 PR 2, task 2.3 - the build-time counterpart of
* {@link HyperFormula.ensureCapability}). An empty list is never checked: building an engine
* with no named expressions never touches the feature. Deliberately not called from
* {@link rebuildWithConfig}, which re-serializes named expressions an already-built instance
* created (and was allowed to create) rather than accepting them fresh from a caller.
*/
private static ensureNamedExpressionsCapability(config: Config, namedExpressions: SerializedNamedExpression[]): void {
if (namedExpressions.length === 0) {
return
}
if (config.isLicenseGateActive && !allowsFeature(config.licenseCapabilities, FeatureId.NamedExpressions)) {
throw new LicenseCapabilityMissingError(FeatureId.NamedExpressions)
}
}

private static buildEngine(config: Config, sheets: Sheets = {}, inputNamedExpressions: SerializedNamedExpression[] = [], stats: Statistics = config.useStats ? new Statistics() : new EmptyStatistics()): EngineState {
stats.start(StatType.BUILD_ENGINE_TOTAL)

Expand Down
20 changes: 8 additions & 12 deletions src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import {DateTime, instanceOfSimpleDate, SimpleDate, SimpleDateTime, SimpleTime}
import {AlwaysDense, ChooseAddressMapping} from './DependencyGraph/AddressMapping/ChooseAddressMappingPolicy'
import {ConfigValueEmpty, ExpectedValueOfTypeError} from './errors'
import {defaultStringifyCurrency, defaultStringifyDateTime, defaultStringifyDuration} from './format/format'
import {checkLicenseKeyValidity, LicenseKeyValidityState} from './helpers/licenseKeyValidator'
import {LicenseKeyValidityState} from './helpers/licenseKeyValidator'
import {HyperFormula} from './HyperFormula'
import {TranslationPackage} from './i18n'
import {FunctionPluginDefinition} from './interpreter'
import {CapabilityRegistry, ResolvedCapabilities} from './license/CapabilityRegistry'
import {unrestrictedEntitlement} from './license/LicenseEntitlement'
import {resolveLicense} from './license/licenseResolution'
import {Maybe} from './Maybe'
import {ParserConfig} from './parser/ParserConfig'
import {ConfigParams, ConfigParamsList} from './ConfigParams'
Expand Down Expand Up @@ -180,7 +180,7 @@ export class Config implements ConfigParams, ParserConfig {
/** @inheritDoc */
public readonly matchWholeCell: boolean

constructor(options: Partial<ConfigParams> = {}, showDeprecatedWarns: boolean = true) {
constructor(options: Partial<ConfigParams> = {}, showDeprecatedWarns: boolean = true, notifyLicenseMessages: boolean = true) {
const {
accentSensitive,
caseSensitive,
Expand Down Expand Up @@ -279,13 +279,9 @@ export class Config implements ConfigParams, ParserConfig {
validateNumberToBeAtLeast(this.maxColumns, 'maxColumns', 1)
this.context = context

const licenseKeyValidityState = checkLicenseKeyValidity(this.licenseKey)
const {validityState: licenseKeyValidityState, entitlement} = resolveLicense(this.licenseKey, notifyLicenseMessages)
const capabilityRegistry = new CapabilityRegistry()
// PR 1 (HF-307) ships the gate infrastructure without a real license-key payload adapter —
// that lands in PR 3 as src/license/payloadAdapter.ts. Until then every entitlement resolves
// as unrestricted, so isLicenseGateActive below reduces to today's licenseKeyValidityState
// check and gate B in the interpreter never actually restricts a function.
const licenseCapabilities = capabilityRegistry.resolve(unrestrictedEntitlement())
const licenseCapabilities = capabilityRegistry.resolve(entitlement)

privatePool.set(this, {
licenseKeyValidityState,
Expand Down Expand Up @@ -345,7 +341,7 @@ export class Config implements ConfigParams, ParserConfig {

/**
* Whether gate B (the entitlement check in the interpreter) needs to run at all for this
* config. `false` — the common case, for `gpl-v3`, legacy keys, and an unrestricted typed
* config. `false` — the common case, for `gpl-v3`, legacy keys, and an unrestricted entitlement
* key — is a single boolean read, cheaper than the string-enum comparison it replaces.
*
* @internal
Expand All @@ -369,12 +365,12 @@ export class Config implements ConfigParams, ParserConfig {
return getFullConfigFromPartial(this)
}

public mergeConfig(init: Partial<ConfigParams>): Config {
public mergeConfig(init: Partial<ConfigParams>, notifyLicenseMessages: boolean = true): Config {
const mergedConfig: ConfigParams = Object.assign({}, this.getConfig(), init)

Config.warnDeprecatedOptions(init)

return new Config(mergedConfig, false)
return new Config(mergedConfig, false, notifyLicenseMessages)
}

private static warnDeprecatedOptions(options: Partial<ConfigParams>) {
Expand Down
11 changes: 11 additions & 0 deletions src/CrudOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,17 @@ export class CrudOperations {
return this.clipboardOperations.clipboard === undefined
}

/**
* Returns whether the clipboard currently holds a cut (as opposed to a copy, or nothing) -
* i.e. whether the next {@link paste} call will move cells rather than only copy their content.
* Exposed so the public API layer can gate a cut-then-paste as the cell-relocating mutation it
* actually is (HF-307 PR 2: {@link paste} must require the Crud feature in this case, not just
* Clipboard, since it performs the same move {@link HyperFormula.moveCells} requires Crud for).
*/
public isCutClipboard(): boolean {
return this.clipboardOperations.isCutClipboard()
}

public clearClipboard(): void {
this.clipboardOperations.clear()
}
Expand Down
Loading
Loading