Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
cae8573
Native demos in the docs (#1447)
sequba Nov 6, 2024
096aadf
Merge branch 'master' into develop
sequba Nov 6, 2024
76aaae5
Deploy documentation with native HTML+JS demos (#1441) (#1454)
sequba Nov 6, 2024
34d0a37
Remove deprecated APIs (#1453)
sequba Nov 6, 2024
5def4ef
Increase font-weight for the text in the demos in the docs (#1455)
sequba Nov 6, 2024
c27a9d5
Fix language files for Node+ESM (#1377)
sequba Nov 12, 2024
4ca2f87
Change signatures of `simpleCellAddressToString` and `simpleCellRange…
sequba Nov 13, 2024
2a5cd84
Set default value of `precisionRounding` to `10` (#1456)
sequba Nov 13, 2024
9a36fae
Fix Typo in docs
kentongray Nov 22, 2024
41b2d62
Update dev dependencies (#1459)
sequba Nov 26, 2024
0c3961a
Merge branch 'patch-1' of github.com:kentongray/hyperformula into ken…
sequba Nov 26, 2024
5368e84
Fix Typo in docs (#1464)
sequba Nov 26, 2024
fa06221
Use CODECOVE_TOKEN secret while uploading data to codecov (#1467)
sequba Dec 3, 2024
bf325c3
Fix the browser tests by extending the browserDisconnectTimeout (#1468)
sequba Dec 4, 2024
245799c
Docs: Fix exceljs API usage in the file import code example to handle…
sequba Dec 10, 2024
aec974e
Docs: Explain `getSheetDimensions()` issue with empty rows and column…
sequba Dec 21, 2024
ba2bc97
XLOOKUP function (#1469)
sequba Jan 3, 2025
79812de
Update cdn link in vuepress config to use the latest HF instead of th…
sequba Jan 7, 2025
068a7f0
Update links to hyperformula-demos to use 3.0.x branch
sequba Jan 7, 2025
161b812
3.0.0
sequba Jan 7, 2025
fd14592
Change year 2024 -> 2025 in the copyright notice in all the source files
sequba Jan 8, 2025
a2a3e6f
Merge branch 'release/3.0.0'
sequba Jan 14, 2025
cdb234e
Merge tag '3.0.0' into develop
sequba Jan 14, 2025
94dd0db
Fix registerLanguage() issue in the code examples (#1484)
sequba Jan 15, 2025
f392eae
Fix mortgage calculator demo error `Cannot load native addon because …
sequba Jan 15, 2025
ed575db
Describe the limitation of the OFFSET function in the runtime differe…
sequba Jan 21, 2025
14ae706
Make typedoc generate documentation for cellerror and other minor cla…
sequba Feb 4, 2025
fc0c1b5
Setup permissions for GH workflows (#1492)
sequba Feb 4, 2025
9fff869
Fix CodeQL security warnings (#1493)
sequba Feb 4, 2025
e4b6cbc
Add a test command for working in tdd (#1494)
sequba Feb 4, 2025
2fd65dd
Fixed `Edge does not exist` error when a named expression is used twi…
sequba May 18, 2025
d8fa00f
Fix typos in built-in functions guide (#1517)
sequba Jun 23, 2025
11932a3
Clarifications for the home page (#1519)
warpech Jul 11, 2025
d3ac97a
Docs: Add Quality page (#1518)
sequba Jul 11, 2025
69adfc3
Fixed an issue where named expressions added on engine initialization…
sequba Jul 18, 2025
0acb591
Document defining named expressions on HyperFormula initialization (#…
sequba Aug 5, 2025
f7e11eb
Docs: Add a code snippet that demonstrates how to reference a named e…
sequba Aug 5, 2025
6eb679a
Docs: add section about handling Unicode characters in a sheet name w…
sequba Aug 5, 2025
9defc38
Docs: Add information that string literals inside formulas need to be…
sequba Aug 5, 2025
44f9d98
Docs: Fix clipboard operations demo to handle NothingToPasteError (#1…
sequba Aug 5, 2025
abf2a54
3.0.1
sequba Aug 5, 2025
52fd455
Merge branch 'release/3.0.1' of github.com:handsontable/hyperformula …
sequba Aug 5, 2025
20e8d85
Deploy adjustments
sequba Aug 5, 2025
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
90 changes: 90 additions & 0 deletions .config/babel/add-import-extension.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// Based on https://github.com/handsontable/handsontable/blob/bd7628544ff83d6e74a9cc949e2c3c38fef74d76/handsontable/.config/plugin/babel/add-import-extension.js

const { existsSync, lstatSync } = require('fs');
const { dirname, resolve } = require('path');
const { types } = require('@babel/core');
const { declare } = require('@babel/helper-plugin-utils');

const VALID_EXTENSIONS = ['js', 'mjs'];

const hasExtension = moduleName => VALID_EXTENSIONS.some(ext => moduleName.endsWith(`.${ext}`));
const isCoreJSPolyfill = moduleName => moduleName.startsWith('core-js');
const isLocalModule = moduleName => moduleName.startsWith('.');
const isProcessableModule = (moduleName) => {
return !hasExtension(moduleName) && (isCoreJSPolyfill(moduleName) || isLocalModule(moduleName));
};

const createVisitor = ({ declaration, origArgs, extension = 'js' }) => {
return (path, { file }) => {
const { node: { source, exportKind, importKind } } = path;
const { opts: { filename } } = file;
const isTypeOnly = exportKind === 'type' || importKind === 'type';

if (!source || isTypeOnly || !isProcessableModule(source.value)) {
return;
}

const { value: moduleName } = source;
const absoluteFilePath = resolve(dirname(filename), moduleName);
const finalExtension = isCoreJSPolyfill(moduleName) ? 'js' : extension;

let newModulePath;

// Resolves a case where "import" points to a module name which exists as a file and
// as a directory. For example in this case:
// ```
// import { registerPlugin } from 'plugins';
// ```
// and with this directory structure:
// |- editors
// |- plugins
// |- filters/
// |- ...
// +- index.js
// |- plugins.js
// |- ...
// +- index.js
//
// the plugin will rename import declaration to point to the `plugins.js` file.
if (existsSync(`${absoluteFilePath}.js`)) {
newModulePath = `${moduleName}.${finalExtension}`;

// In a case when the file doesn't exist and the module is a directory it will
// rename to `plugins/index.js`.
} else if (existsSync(absoluteFilePath) && lstatSync(absoluteFilePath).isDirectory()) {
newModulePath = `${moduleName}/index.${finalExtension}`;

// And for other cases it simply put the extension on the end of the module path
} else {
newModulePath = `${moduleName}.${finalExtension}`;
}

path.replaceWith(declaration(...origArgs(path), types.stringLiteral(newModulePath)));
};
};

module.exports = declare((api, options) => {
api.assertVersion(7);

return {
name: 'add-import-extension',
visitor: {
// It covers default and named imports
ImportDeclaration: createVisitor({
extension: options.extension,
declaration: types.importDeclaration,
origArgs: ({ node: { specifiers } }) => [specifiers],
}),
ExportNamedDeclaration: createVisitor({
extension: options.extension,
declaration: types.exportNamedDeclaration,
origArgs: ({ node: { declaration, specifiers } }) => [declaration, specifiers],
}),
ExportAllDeclaration: createVisitor({
extension: options.extension,
declaration: types.exportAllDeclaration,
origArgs: () => [],
}),
}
};
});
3 changes: 3 additions & 0 deletions .config/karma/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ module.exports.create = function(config) {
// how many browser should be started simultaneous
concurrency: Infinity,

// Extending timeout fixes https://github.com/handsontable/hyperformula/issues/1430
browserDisconnectTimeout : 60000,

// Webpack's configuration for Karma
webpack: (function() {
// Take the second config from an array - full HF build.
Expand Down
2 changes: 1 addition & 1 deletion .config/source-license-header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* @license
* Copyright (c) 2024 Handsoncode. All rights reserved.
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
2 changes: 2 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Security
permissions:
contents: read

on:
pull_request:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Build docs
permissions:
contents: read

on:
pull_request:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Build on various envs
permissions:
contents: read

on:
pull_request:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: "CodeQL"
permissions:
contents: read
pull-requests: write

on:
pull_request:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Lint
permissions:
contents: read

on:
pull_request:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Performance
permissions:
contents: read
pull-requests: write

on:
pull_request:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Publish
permissions:
contents: read
pages: write

on:
push:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Test
permissions:
contents: read

on:
pull_request:
Expand Down Expand Up @@ -38,6 +40,8 @@ jobs:

- name: Upload coverage to Codecov
uses: codecov/codecov-action@6004246f47ab62d32be025ce173b241cd84ac58e # https://github.com/codecov/codecov-action/releases/tag/v1.0.13
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

browser-tests:
strategy:
Expand Down
5 changes: 0 additions & 5 deletions .typedoc.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
module.exports = {
"inputFiles": [
"./src/HyperFormula.ts",
"./src/ConfigParams.ts",
"./src/Emitter.ts",
],
"exclude": [
"./test/**",
"./src/interpreter/**",
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [3.0.1] - 2025-08-11

### Fixed

- Fixed `Edge does not exist` error when a named expression is used twice in the same formula. [#1102](https://github.com/handsontable/hyperformula/issues/1102)
- Fixed typos in the built-in functions guide. [#1517](https://github.com/handsontable/hyperformula/issues/1517)
- Fixed an issue where named expressions added on engine initialization were not updated on changes. [#1501](https://github.com/handsontable/hyperformula/issues/1501)

## [3.0.0] - 2025-01-14

### Added

- Added a new function: XLOOKUP. [#1458](https://github.com/handsontable/hyperformula/issues/1458)

### Changed

- **Breaking change**: Changed ES module build to use `mjs` files and `exports` property in `package.json` to make importing language files possible in Node environment. [#1344](https://github.com/handsontable/hyperformula/issues/1344)
- **Breaking change**: Changed the default value of the `precisionRounding` configuration option to `10`. [#1300](https://github.com/handsontable/hyperformula/issues/1300)
- Make methods `simpleCellAddressToString` and `simpleCellRangeToString` more logical and easier to use. [#1151](https://github.com/handsontable/hyperformula/issues/1151)

### Removed

- **Breaking change**: Removed the `binarySearchThreshold` configuration option. [#1439](https://github.com/handsontable/hyperformula/issues/1439)

## [2.7.1] - 2024-07-18

### Fixed
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ HyperFormula doesn't assume any existing user interface, making it a general-pur
- [Support for named expressions](https://hyperformula.handsontable.com/guide/named-expressions.html)
- [Support for data sorting](https://hyperformula.handsontable.com/guide/sorting-data.html)
- [Support for formula localization with 17 built-in languages](https://hyperformula.handsontable.com/guide/i18n-features.html)
- GPLv3 license
- Easy integration with any front-end or back-end application
- GPLv3 or a [commercial license](https://handsontable.com/get-a-quote)
- Maintained by the team that stands behind the [Handsontable](https://handsontable.com/) data grid

## Documentation
Expand Down Expand Up @@ -97,7 +98,7 @@ hf.setCellContents({ sheet: sheetId, row: 0, col: 0 }, [['Monthly Payment', '=PM
console.log(`${hf.getCellValue({ sheet: sheetId, row: 0, col: 0 })}: ${hf.getCellValue({ sheet: sheetId, row: 0, col: 1 })}`);
```

[Run this code in CodeSandbox](https://codesandbox.io/p/sandbox/github/handsontable/hyperformula-demos/tree/2.7.x/mortgage-calculator)
[Run this code in StackBlitz](https://stackblitz.com/github/handsontable/hyperformula-demos/tree/3.0.x/mortgage-calculator)

## Contributing

Expand Down
8 changes: 5 additions & 3 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
['@babel/preset-env', {
modules: false,
useBuiltIns: 'usage',
corejs: '3.23',
corejs: '3.39.0',
}]
],
plugins: [
Expand All @@ -18,7 +18,7 @@ module.exports = {
helpers: false,
regenerator: false,
useESModules: false,
version: '^7.18.9',
version: '^7.25.9',
}],
['@babel/plugin-transform-modules-commonjs', { loose: true }]
]
Expand All @@ -31,7 +31,9 @@ module.exports = {
},
// Environment for transpiling files to be compatible with ES Modules.
es: {
plugins: [],
plugins: [
['./.config/babel/add-import-extension.js', { extension: 'mjs' }],
],
},
},
};
12 changes: 7 additions & 5 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ module.exports = {
title: 'HyperFormula (v' + HyperFormula.version + ')',
description: 'HyperFormula is an open-source, high-performance calculation engine for spreadsheets and web applications.',
head: [
// Robots for staging: noindex, nofollow
['meta', {name: 'robots', content: 'noindex, nofollow'}],
// Robots for staging: noindex, nofollow
['meta', {name: 'robots', content: 'noindex, nofollow'}],
// Import HF (required for the examples)
[ 'script', { src: 'https://cdn.jsdelivr.net/npm/hyperformula/dist/hyperformula.full.min.js' } ],
[ 'script', { src: 'https://cdn.jsdelivr.net/npm/hyperformula@2.7.1/dist/languages/enUS.js' } ],
[ 'script', { src: 'https://cdn.jsdelivr.net/npm/hyperformula@2.7.1/dist/languages/frFR.js' } ],
[ 'script', { src: 'https://cdn.jsdelivr.net/npm/hyperformula/dist/languages/enUS.js' } ],
[ 'script', { src: 'https://cdn.jsdelivr.net/npm/hyperformula/dist/languages/frFR.js' } ],
// Import moment (required for the examples)
[ 'script', { src: 'https://cdn.jsdelivr.net/npm/moment/moment.min.js' } ],
// Google Tag Manager, an extra element within the `ssr.html` file.
Expand Down Expand Up @@ -175,6 +175,7 @@ module.exports = {
title: 'Overview',
collapsable: false,
children: [
['/guide/quality', 'Quality'],
['/guide/supported-browsers', 'Supported browsers'],
['/guide/dependencies', 'Dependencies'],
['/guide/licensing', 'Licensing'],
Expand Down Expand Up @@ -267,7 +268,8 @@ module.exports = {
children: [
['/guide/release-notes', 'Release notes'],
['/guide/migration-from-0.6-to-1.0', 'Migrating from 0.6 to 1.0'],
['/guide/migration-from-1.0-to-2.0', 'Migrating from 1.x to 2.0'],
['/guide/migration-from-1.x-to-2.0', 'Migrating from 1.x to 2.0'],
['/guide/migration-from-2.x-to-3.0', 'Migrating from 2.x to 3.0'],
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/advanced-usage/example1.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
color: #606c76;
font-family: sans-serif;
font-size: 14px;
font-weight: 300;
font-weight: 400;
letter-spacing: .01em;
line-height: 1.6;
-webkit-box-sizing: border-box;
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/advanced-usage/example1.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import HyperFormula from 'hyperformula';

console.log(
`%c Using HyperFormula ${HyperFormula.version}`,
'color: blue; font-weight: bold'
'color: blue; font-weight: bold',
);

/* end:skip-in-compilation */
Expand Down Expand Up @@ -67,7 +67,7 @@ hf.setSheetContent(hf.getSheetId(sheetInfo.formulas.sheetName), formulasData);
function renderTable(sheetName) {
const sheetId = hf.getSheetId(sheetName);
const tbodyDOM = document.querySelector(
`.example #${sheetName}-container tbody`
`.example #${sheetName}-container tbody`,
);

const { height, width } = hf.getSheetDimensions(sheetId);
Expand Down Expand Up @@ -101,7 +101,7 @@ function renderResult() {
const resultOutputDOM = document.querySelector('.example #output');
const cellAddress = hf.simpleCellAddressFromString(
`${sheetInfo.formulas.sheetName}!A1`,
hf.getSheetId(sheetInfo.formulas.sheetName)
hf.getSheetId(sheetInfo.formulas.sheetName),
);

resultOutputDOM.innerHTML = `<span>
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/advanced-usage/example1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import HyperFormula from 'hyperformula';

console.log(
`%c Using HyperFormula ${HyperFormula.version}`,
'color: blue; font-weight: bold'
'color: blue; font-weight: bold',
);
/* end:skip-in-compilation */

Expand Down Expand Up @@ -69,7 +69,7 @@ hf.setSheetContent(hf.getSheetId(sheetInfo.formulas.sheetName), formulasData);
function renderTable(sheetName) {
const sheetId = hf.getSheetId(sheetName);
const tbodyDOM = document.querySelector(
`.example #${sheetName}-container tbody`
`.example #${sheetName}-container tbody`,
);

const { height, width } = hf.getSheetDimensions(sheetId);
Expand Down Expand Up @@ -103,7 +103,7 @@ function renderResult() {
const resultOutputDOM = document.querySelector('.example #output');
const cellAddress = hf.simpleCellAddressFromString(
`${sheetInfo.formulas.sheetName}!A1`,
hf.getSheetId(sheetInfo.formulas.sheetName)
hf.getSheetId(sheetInfo.formulas.sheetName),
);

resultOutputDOM.innerHTML = `<span>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/basic-operations/example1.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
color: #606c76;
font-family: sans-serif;
font-size: 14px;
font-weight: 300;
font-weight: 400;
letter-spacing: .01em;
line-height: 1.6;
-webkit-box-sizing: border-box;
Expand Down
Loading
Loading