fix(build): Fix import paths, update CI workflows and upgrade dependencies for ESM compliance

This commit is contained in:
2025-05-12 13:37:34 +00:00
parent d647706881
commit 4fc2eb6ece
20 changed files with 9474 additions and 28835 deletions

View File

@@ -19,11 +19,7 @@ npm install @push.rocks/smartfuzzy --save
First, ensure you import the necessary components:
```typescript
import {
Smartfuzzy,
ObjectSorter,
ArticleSearch
} from '@push.rocks/smartfuzzy';
import { Smartfuzzy, ObjectSorter, ArticleSearch } from '@push.rocks/smartfuzzy';
```
### Basic String Matching
@@ -58,7 +54,7 @@ interface ICar {
const carList: ICar[] = [
{ brand: 'BMW', model: 'M3' },
{ brand: 'Mercedes Benz', model: 'E-Class' },
{ brand: 'Volvo', model: 'XC90' }
{ brand: 'Volvo', model: 'XC90' },
];
const carSorter = new ObjectSorter<ICar>(carList);
@@ -78,8 +74,22 @@ If your application involves searching through articles or similar textual conte
import { IArticle } from '@tsclass/tsclass/content';
const articles: IArticle[] = [
{ title: 'History of Berlin', content: 'Berlin has a rich history...', tags: ['history', 'Berlin'], timestamp: Date.now(), featuredImageUrl: null, url: null },
{ title: 'Tourism in Berlin', content: 'Discover the vibrant city of Berlin...', tags: ['travel', 'Berlin'], timestamp: Date.now(), featuredImageUrl: null, url: null }
{
title: 'History of Berlin',
content: 'Berlin has a rich history...',
tags: ['history', 'Berlin'],
timestamp: Date.now(),
featuredImageUrl: null,
url: null,
},
{
title: 'Tourism in Berlin',
content: 'Discover the vibrant city of Berlin...',
tags: ['travel', 'Berlin'],
timestamp: Date.now(),
featuredImageUrl: null,
url: null,
},
];
const articleSearch = new ArticleSearch(articles);
@@ -99,7 +109,7 @@ Remember to always consider the specific requirements of your project when imple
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.