diff --git a/.config/webpack/development.js b/.config/webpack/development.js index e626677b26..029b8246ce 100644 --- a/.config/webpack/development.js +++ b/.config/webpack/development.js @@ -29,12 +29,6 @@ module.exports.create = function create() { commonjs: 'tiny-emitter', amd: 'tiny-emitter', }, - unorm: { - root: 'unorm', - commonjs2: 'unorm', - commonjs: 'unorm', - amd: 'unorm', - }, }; c.plugins.push(new WebpackBar({ name: ` ${PACKAGE_FILENAME}.js` })); }); diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d1ea96409..e714d21333 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Changed + +- Removed `unorm` dependency. [#1370](https://github.com/handsontable/hyperformula/issues/1370) + ## [2.6.1] - 2023-12-27 ### Fixed diff --git a/docs/guide/client-side-installation.md b/docs/guide/client-side-installation.md index 25e9cb03e1..e53636b185 100644 --- a/docs/guide/client-side-installation.md +++ b/docs/guide/client-side-installation.md @@ -47,7 +47,6 @@ Or you may load just a minimal build and add the dependencies on your own: ```html - ``` diff --git a/docs/guide/dependencies.md b/docs/guide/dependencies.md index 1e0e266d36..cdc9b3eab2 100644 --- a/docs/guide/dependencies.md +++ b/docs/guide/dependencies.md @@ -11,8 +11,6 @@ features. | [core-js](https://github.com/zloirock/core-js) | The MIT License | Denis Pushkarev | | [jStat](https://github.com/jstat/jstat) | The MIT License | jStat | | [tiny-emitter](https://github.com/scottcorgan/tiny-emitter) | The MIT License | Scott Corgan | -| [unorm](https://github.com/walling/unorm) | The MIT License | Matsuza, Bjarke Walling | - The _bessel_ and _jStat_ projects are distributed with the code repository at the path `src/interpreter/plugin/3rdparty` and bundled with the code package. diff --git a/package-lock.json b/package-lock.json index c2f01c9334..f89896f652 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,7 @@ "license": "GPL-3.0-only", "dependencies": { "chevrotain": "^6.5.0", - "tiny-emitter": "^2.1.0", - "unorm": "^1.6.0" + "tiny-emitter": "^2.1.0" }, "devDependencies": { "@babel/cli": "^7.8.4", @@ -25,7 +24,6 @@ "@types/jest": "^26.0.0", "@types/jsdom": "^16.2.1", "@types/node": "^10.17.19", - "@types/unorm": "^1.3.28", "@types/webpack-env": "^1.15.2", "@typescript-eslint/eslint-plugin": "^5.59.1", "@typescript-eslint/parser": "^5.59.1", @@ -3385,12 +3383,6 @@ "source-map": "^0.6.1" } }, - "node_modules/@types/unorm": { - "version": "1.3.31", - "resolved": "https://registry.npmjs.org/@types/unorm/-/unorm-1.3.31.tgz", - "integrity": "sha512-qCPX/Lo14ECb9Wkb/1sxdcTQqIiHTVNlaHczGrh2WqMVSlWjfn8Hu7DxraCtBYz1+Ud6Id/d+4OH/hkd+dlnpw==", - "dev": true - }, "node_modules/@types/webpack": { "version": "4.41.38", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.38.tgz", @@ -23222,14 +23214,6 @@ "node": ">= 4.0.0" } }, - "node_modules/unorm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", - "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -28812,12 +28796,6 @@ "source-map": "^0.6.1" } }, - "@types/unorm": { - "version": "1.3.31", - "resolved": "https://registry.npmjs.org/@types/unorm/-/unorm-1.3.31.tgz", - "integrity": "sha512-qCPX/Lo14ECb9Wkb/1sxdcTQqIiHTVNlaHczGrh2WqMVSlWjfn8Hu7DxraCtBYz1+Ud6Id/d+4OH/hkd+dlnpw==", - "dev": true - }, "@types/webpack": { "version": "4.41.38", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.38.tgz", @@ -44398,11 +44376,6 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, - "unorm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", - "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==" - }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", diff --git a/package.json b/package.json index 6942e7f94e..e6fc70d48d 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,6 @@ "@types/jest": "^26.0.0", "@types/jsdom": "^16.2.1", "@types/node": "^10.17.19", - "@types/unorm": "^1.3.28", "@types/webpack-env": "^1.15.2", "@typescript-eslint/eslint-plugin": "^5.59.1", "@typescript-eslint/parser": "^5.59.1", @@ -157,7 +156,6 @@ }, "dependencies": { "chevrotain": "^6.5.0", - "tiny-emitter": "^2.1.0", - "unorm": "^1.6.0" + "tiny-emitter": "^2.1.0" } } diff --git a/src/interpreter/ArithmeticHelper.ts b/src/interpreter/ArithmeticHelper.ts index a273167861..9444f05bfb 100644 --- a/src/interpreter/ArithmeticHelper.ts +++ b/src/interpreter/ArithmeticHelper.ts @@ -3,7 +3,6 @@ * Copyright (c) 2024 Handsoncode. All rights reserved. */ -import unorm from 'unorm' import {CellError, CellValueTypeOrd, ErrorType, getCellValueType} from '../Cell' import {Config} from '../Config' import {DateTimeHelper} from '../DateTimeHelper' @@ -835,6 +834,5 @@ export function coerceRangeToScalar(arg: SimpleRangeValue, state: InterpreterSta type NormalizationForm = 'nfc' | 'nfd' | 'nfkc' | 'nfkd' export function normalizeString(str: string, form: NormalizationForm): string { - return typeof str.normalize === 'function' - ? str.normalize(form.toUpperCase()) : unorm[form](str) + return str.normalize(form.toUpperCase()) }