Skip to content

Commit

Permalink
Merge branch 'release/2.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sequba committed May 29, 2023
2 parents 9f7b2db + 1f0e2a3 commit 405d3c0
Show file tree
Hide file tree
Showing 111 changed files with 5,883 additions and 5,412 deletions.
40 changes: 15 additions & 25 deletions .config/webpack/languages.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/**
* Config responsible for building not minified Handsontable `languages/` files.
*/
const NEW_LINE_CHAR = '\n';
const SOURCE_LANGUAGES_DIRECTORY = 'lib/i18n/languages';
const OUTPUT_LANGUAGES_DIRECTORY = 'languages';

const path = require('path');
const StringReplacePlugin = require('string-replace-webpack-plugin');
const WebpackOnBuildPlugin = require('on-build-webpack');
const fs = require('fs');
const fsExtra = require('fs-extra');
Expand Down Expand Up @@ -34,31 +32,23 @@ function getEntryJsFiles() {

const ruleForSnippetsInjection = {
test: /\.js$/,
loader: StringReplacePlugin.replace({
replacements: [
{
pattern: /\/\/.import/,
replacement: function() {
const snippet1 = `import HyperFormula from '../..';`;

return `${snippet1}${NEW_LINE_CHAR.repeat(2)}`;
loader: 'string-replace-loader',
options: {
multiple: [
{ search: 'export default dictionary', replace: `
if (!HyperFormula.languages) {
HyperFormula.languages = {};
}
},
{
pattern: /export default dictionary/,
replacement: function(matchingPhrase) {
const snippet = `
if (!HyperFormula.languages) {
HyperFormula.languages = {};
}
HyperFormula.languages[dictionary.langCode] = dictionary;
`;

return `${snippet}${NEW_LINE_CHAR.repeat(2)}${matchingPhrase}`;
}
}
HyperFormula.languages[dictionary.langCode] = dictionary;
export default dictionary
`},
{ search: /\/\/.import/, replace: `
import HyperFormula from '../..';
`}
]
})
}
};

module.exports.create = function create() {
Expand Down
73 changes: 42 additions & 31 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
root: true,
ignorePatterns: ['.eslintrc.js'],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
Expand Down Expand Up @@ -27,17 +28,21 @@ module.exports = {
delimiter: 'comma',
},
}],
'@typescript-eslint/camelcase': 'error',
'@typescript-eslint/naming-convention': [
'error',
{ 'selector': 'variableLike', 'format': ['camelCase', 'UPPER_CASE', 'PascalCase'], 'leadingUnderscore': 'allow' },
{ 'selector': 'interface', 'format': ['PascalCase'], 'custom': { 'regex': '^I[A-Z]', 'match': false } },
],
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/brace-style': 'error', // wtf
'@typescript-eslint/brace-style': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': ['error'],
'@typescript-eslint/no-extra-non-null-assertion': ['error'],
'@typescript-eslint/no-throw-literal': ['error'],
'@typescript-eslint/array-type': ['error'],
'@typescript-eslint/space-before-function-paren': ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
'@typescript-eslint/space-before-function-paren': ['error', {
'anonymous': 'never',
'named': 'never',
'asyncArrow': 'always'
}],
'@typescript-eslint/quotes': ['error', 'single', { avoidEscape: true }],
'@typescript-eslint/no-extra-semi': ['error'],
Expand All @@ -64,35 +69,41 @@ module.exports = {
'no-useless-escape': 'off',
'no-inner-declarations': 'off',

// Overrides
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/prefer-regexp-exec': 'warn',
'@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/interface-name-prefix': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/restrict-template-expressions': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',

"jsdoc/check-access": 'warn',
"jsdoc/check-alignment": 'warn',
"jsdoc/check-param-names": 'warn',
"jsdoc/check-property-names": 'warn',
"jsdoc/check-tag-names": ['warn', {definedTags: ['category']}],
"jsdoc/check-types": 'warn',
"jsdoc/empty-tags": 'warn',
"jsdoc/implements-on-classes": 'warn',
"jsdoc/multiline-blocks": 'warn',
"jsdoc/newline-after-description": 'warn',
"jsdoc/no-multi-asterisks": 'warn',
"jsdoc/require-param-description": 'warn',
"jsdoc/require-param-name": 'warn',
"jsdoc/require-param-type": 'warn',
"jsdoc/require-property-description": 'warn',
"jsdoc/require-property-name": 'warn',
"jsdoc/require-property-type": 'warn',
"jsdoc/require-returns-check": 'warn',
"jsdoc/require-returns-description": 'warn',
"jsdoc/require-returns-type": 'warn',
"jsdoc/require-yields-check": 'warn',
"jsdoc/valid-types": 'warn',
"jsdoc/require-jsdoc": ['warn', {
'jsdoc/check-access': 'warn',
'jsdoc/check-alignment': 'warn',
'jsdoc/check-param-names': 'warn',
'jsdoc/check-property-names': 'warn',
'jsdoc/check-tag-names': ['warn', { definedTags: ['category', 'internal'] }],
'jsdoc/check-types': 'warn',
'jsdoc/empty-tags': 'warn',
'jsdoc/implements-on-classes': 'warn',
'jsdoc/multiline-blocks': 'warn',
'jsdoc/tag-lines': 'warn',
'jsdoc/no-multi-asterisks': 'warn',
'jsdoc/require-param-description': 'warn',
'jsdoc/require-param-name': 'warn',
'jsdoc/require-param-type': 'warn',
'jsdoc/require-property-description': 'warn',
'jsdoc/require-property-name': 'warn',
'jsdoc/require-property-type': 'warn',
'jsdoc/require-returns-check': 'warn',
'jsdoc/require-returns-description': 'warn',
'jsdoc/require-returns-type': 'warn',
'jsdoc/require-yields-check': 'warn',
'jsdoc/valid-types': 'warn',
'jsdoc/require-jsdoc': ['warn', {
require: {
ArrowFunctionExpression: true,
ClassDeclaration: true,
Expand All @@ -117,4 +128,4 @@ module.exports = {
}
},
],
};
}
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Bug report
description: Is something not working? Report a bug to help us improve.
title: "[Bug]: "
labels: [bug]
body:
- type: textarea
id: describe-bug
attributes:
label: Description
description: Describe what happens, and specify the exact steps to reproduce the problem. If we can't recreate the issue, we'll close it down.
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Video or screenshots
description: Add a screenshot or a short video that clearly illustrates the problem.
- type: input
id: demo
attributes:
label: Demo
description: Add a link to a demo that will let us reproduce the bug. Use StackBlitz, CodeSandbox, CodePen, JSFiddle, or any other online sandbox.
validations:
required: true
- type: input
id: hf-version
attributes:
label: HyperFormula version
description: Which version of HyperFormula are you using?
validations:
required: true
- type: input
id: framework
attributes:
label: Your framework
description: What framework are you using? For example, React 16.0, Angular v15 or Vue 3.
- type: input
id: environment
attributes:
label: Your environment
description: What's your browser and operating system? For example, Chrome 90 on macOS 11.3.
validations:
required: true
- type: markdown
attributes:
value: |
Thank you for taking the time to report the issue! ❤️
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: Feature requests and questions
url: https://github.com/handsontable/hyperformula/discussions
about: Start a new discussion about your idea.
30 changes: 0 additions & 30 deletions .github/ISSUE_TEMPLATE/default_template.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/documentation.md

This file was deleted.

15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/improve_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Documentation improvement
description: Suggest an improvement to the docs.
labels: [docs]
body:
- type: input
id: link
attributes:
label: Page URL
description: Which page are you referring to?
placeholder: https://hyperformula.handsontable.com/…
- type: textarea
id: improvement
attributes:
label: Improvement description
- type: markdown
attributes:
value: |
Thank you for contributing by creating this issue! ❤️
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/new_function.md

This file was deleted.

21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ and this project adheres to

## [Unreleased]

## [2.5.0] - 2023-05-29

### Added

- Added a new function: ADDRESS.
[#1221](https://github.com/handsontable/hyperformula/issues/1221)
- Added a new function: HYPERLINK.
[#1215](https://github.com/handsontable/hyperformula/issues/1215)
- Added a new function: IFS.
[#1157](https://github.com/handsontable/hyperformula/issues/1157)

### Changed

- Optimized the `updateConfig()` method to rebuild HyperFormula only when the new configuration is different from the old one.
[#1251](https://github.com/handsontable/hyperformula/issues/1251)

### Fixed

- Fixed the SEARCH function to be case-insensitive regardless of HyperFormula's configuration.
[#1225](https://github.com/handsontable/hyperformula/issues/1225)

## [2.4.0] - 2023-04-24

### Added
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/advanced-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ console.log(winningTeam)
## Demo

<iframe
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.4.x/advanced-usage?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.5.x/advanced-usage?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
title="handsontable/hyperformula-demos: advanced-usage"
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
Expand Down
Loading

0 comments on commit 405d3c0

Please sign in to comment.